[NLA] Deprecated Components / Code?


#1

As I am playing around a bit with the code, here and there it seems like code is / components are not used by Stonehearth. This is not a real bug, but maybe it is worth to highlight this kind of code to either make the devs aware (and check) or even get some more insights from other people who might know for what this code is used.

:one: My first candidate:

…\Stonehearth\mods\stonehearth\ui\game\main_actionbar

To me it seems like this folder and the files in there are not really used (at least for the professions) and that the code might be replaced by:

…\Stonehearth\mods\stonehearth\ui\game\start_menu

:two: The second inconsistency I have found:

Both of the following folders include the same two .qb-files and the same .json-file (only the path included in the file differs). Actually one of them should be enough, no?

…\Stonehearth\mods\stonehearth\entities\professions\carpenter\carpenter_saw

…\Stonehearth\mods\stonehearth\entities\tools\carpenter_saw

Someone has any clue?


#2

i suppose its possible these might be “hooks” for future use? or does it look as though the same functionality is present in start_menu as is in main_actionbar?


#3

I was thinking about the UI-update which we can expect soon (was mentioned as one of the features for the next patch). Maybe it will be of use there. For the moment it just looks like there is no use (from my very humble point of view).

The other item is a 1:1 copy with updated paths.

I am just looking at this from a modders point of view. To add a new profession I have to update 9 different places (which includes folders with e.g. 3 files). If the two items would vanish - and two Lua-files would be updated to no longer include hard-coded references - I would end up with “only” 5… sounds more reasonable to me.


#4

Yes, both are legacy that we should definitely remove. I have accidentally added code to both of them, found it not working, and wondered what they were still doing there. :stuck_out_tongue:

I think the carpenter saw under tools is the one that’s obsolete.


[Tutorial] Adding Custom Professions