Hey there fellow modders / devs. I’m working on updating Nihonjin to Alpha 10 and ran into an issue. By the looks of it the icons for the various building pieces (roof/wall/ types etc.) are all hardcoded in the ui design by the looks of it…
Can anyone confirm this and does anyone have any ways around this issue if that is the case?
@Voxelpirate Yeah I found that last night. The images are there but i cant find exactly what calls upon them. It doesnt seem to be the brush files or portrait files in the stonehearth/data/building folder files, so im assuming they are hardcoded in the html, though i cant find it.
If so it’s a big no no for them to be hard coded instead of data based xD
I’ve played a bit around with adding doors and windows to the building tool, which works apart from… the icon of course. So where I would like to see a picture of my new door or window in the tool, I see a blank space (which can be selected and the e.g. door can be place and will be build).
Did not find a place where this could be hard-coded. Anyone tried to do something similar with more success?
Hmm… You could always debug the UI with the web inspector. Perhaps it’s in the .less file (building_designer_2.less) around line 264. But maybe that’s deprecated code, and the path it’s in a js file, I haven’t checked.
I inspected the UI and by the looks of it, the url of the icon (which is located inside the entity’s folder) is indeed in the file that I mentioned. Unless something has changed since I’m playing with an older version, but the css didn’t lie, it showed the classes and identifiers that lead to the url in the less file: