Closed Speedphoenix closed 2 months ago
Sometimes you need to do something like
@:s @:condSend(specialCondition()) var fieldName; override function networkAllow(mode, prop, client) { if (!specialCondition()) { if (mode == SetField && propIsFieldName(prop)) return true; } return super.networkAllow(mode, prop, client); }
Where the condition is specific enough that you wouldn't want to add a meta and a custom getter just for that one field.
This PR allows doing prop == __net_bit_fieldName instead of networkGetName and a String comparison every time
prop == __net_bit_fieldName
networkGetName
This already exists and is called networkPropFieldName ;)
networkPropFieldName
Sometimes you need to do something like
Where the condition is specific enough that you wouldn't want to add a meta and a custom getter just for that one field.
This PR allows doing
prop == __net_bit_fieldName
instead ofnetworkGetName
and a String comparison every time