-
Notifications
You must be signed in to change notification settings - Fork 20
Entity that converts between variable types #1189
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Entity that converts between variable types #1189
Conversation
Could you describe the problem that this change addresses in a little more detail? Also, do you have an example map where this new entity is used, for verifying this PR? Looking at the change, it seems like you're implementing an explicit int/string/float type converter, I'm guessing to get around the failure case at: neo/src/game/server/baseentity.cpp Lines 4420 to 4428 in 23343df
But that failure check calls: Lines 1383 to 1390 in 23343df
FIELD_INTEGER, FIELD_FLOAT, and FIELD_STRING.
Is there some specific case where this engine-native functionality is insufficient? |
There are various entities that store numerical values as strings, or only accept strings when you would want to send an int/float value. The engine seems to convert between floats/ints fine from what I can tell (dont know if it gets rounded when dealing floats), but will always fail when trying to use a string output on a float input or vice versa. There are a couple entities that have this problem but at the time of making this entity it was so I could display a variable number in I also considered adding functionality for vectors but wasn't really sure how to best implement it in a way that would be useful for the entities that support vector inputs/outputs |
Refactor

Description
Basic feature for specific things
neoAssets >>> NeotokyoRebuild/neoAssets#55
Toolchain