I recently viewed S&box wiki and noticed that some class variable names are shortened.
public class NoclipController : PlayerController
{
public override void Tick()
{
// Face whichever way the player is aiming
Rot = Input.Rot;
// Create a direction vector from the input from the client
var direction = new Vector3( Input.Forward, Input.Right, 0 );
// Rotate the vector so forward is the way we're facing
direction *= Rot;
// Normalize it and multiply by speed
direction = direction.Normal * 1000;
// Apply the move
Pos += direction * Time.Delta;
}
}
In this case there are shortened words “Pos”, “Rot” and it is ambigous how I can interpret them. Pos - is it position, positivity or possession? And Rot is completely matches with already existing word meaning decaying process. IMHO this is a bad pratice, because it makes code harder to read. Futhermore new modders can take it for a good thing and shorten every variable name more than 5 letters for example which will lead to a completely unreadable code. I would like to see no shortenings at least for class variables in S&box C# layer that Facepunch exposing as their S&box API.