Ormael13 / CoCX

Coc source from Fenoxo with Xianxia twist and not only ^^
48 stars 31 forks source link

Dynamically display the name of a racial requirement #727

Closed PhillipDaisySeventh closed 1 month ago

PhillipDaisySeventh commented 1 month ago

Racial requirement can be given a function for the name. The name can then be computed when the requirement is displayed.

For instance, the dragon's requirement taller than 10 foot (+1) will display taller than 3.05 metres (+1) when the flags USE_METRICS is set to true. Previously the name was stored in a string and computed when the requirement was created; it would not change no matter the state of USE_METRICS.

Jtecx commented 1 month ago

Presumably you've tested the changes? If you've got discord, you can join it for faster/easier communication/discussion on the change, though taking the change at face value from the comment alone, this seems fine.

PhillipDaisySeventh commented 1 month ago

I played around and tested my changes on Appearance > RacialScores screen; from what I understand from the code that's the main place the name of racial requirement are used. I tried to make sure everything worked as well as before. Let me know if there is another place where I should do some tests.

As for discord, I don't use it.