Making progress refactoring, there are certain parts I am leaving alone since they are well decoupled and I don’t think I will end up working on them again for awhile.
I’ve seen mixed things about using inheritance vs. Modular nodes that you can attach. I habe opted away from inheritances with my scenes, while keeping them for my sceneless resources.
I have been mainly focusing on clear naming of func and variables, and better communication between nodes and scenes.
Examples of name changes:
set_attack → set_attack_target()
attack → attack_target()
health_change → change_parent_curr_health()
update → update_parent_max_health()
There are more, but trying to make functions clearly communicate what they are actually doing at just a glance.
I am sure there are many things that I left as is that would have been better to change, however I am not primarily focused on optimization of code so much as optimization of code clarity at the func/variable/signal level.
Because I decided not to do a deep dive and massive rewrites it isn’t taking me as long to work through it. There are some scenes I am having to rewrite because they were just disasters, and with reformulating scene communication they ended up being Frankenstein code.
I am hoping another couple evenings I’ll have tackled the primary things and begin again working on leveling system, lootable containers and equipment.