Toma400 / The_Isle_of_Ansur

Python-based text RPG game, successor of Between Shadows and Light.
Other
9 stars 0 forks source link

`_descr` and `info` parameters not being exclusive for object descriptions #85

Open Toma400 opened 9 months ago

Toma400 commented 9 months ago

At first, when doing classes, races and all other elements, info was default key which was required to aid IoA to description key. However, I see that when doing attributes and skills at least, I started using .descr function which just added _descr to the regular key, making it much simpler, yet less controllable. For now, for simplicity purposes, I will try to rewrite old stuff to work with .descr, however old idea of info key should still be available, if someone wants to override default naming.

Toma400 commented 8 months ago

I think using Python function Lyofi suggested me for other thing could be handy, that were doing "get this key from dict, else N".

file.get("info", f"{file.get('key')}_descr")

Something along those lines. Since this issue is rather small, but neat, it will be passed to pre-alpha 3b.

Toma400 commented 8 months ago

This requires more tweaking than I imagined at first, so I think I'm pushing this at least to pre-alpha 4. Don't want to bother myself with this kind of stuff when already boring things are in the way (translating).

84 is basically biggest issue that keeps me from doing it with just simple few changes in code.

Toma400 commented 7 months ago

Unbinding milestone for now, as part of code on which this issue bases on needs some proper rewrite overall.