Page 1 of 1

[0.18.17] Cannot hide locomotive from bonus gui

Posted: Tue Apr 07, 2020 9:10 am
by lovely_santa
Hello,

I have a locomotive prototype, only thing interesting to know about it I'll list below:

Code: Select all

-- prototypes/entity/trainassembly-placeable.lua
local trainassembly = util.table.deepcopy(data.raw["locomotive"]["locomotive"])
trainassembly.name = "trainassembly-placeable"
trainassembly.minable.result = "trainassembly"
Then I have an item linked to it, again giving the relevant parts:

Code: Select all

-- prototypes/item/trainassembly-placeable.lua
trainassembly.name = "trainassembly"
trainassembly.place_result = "trainassembly-placeable"
trainassembly.flags = trainassembly.flags or {}
table.insert(trainassembly.flags, "hide-from-bonus-gui")
As you can see, I'm setting the flag to hide the locomotive from the bonus gui, but it still appears:
trainbuilder.png
trainbuilder.png (565.37 KiB) Viewed 866 times
I've attached the mod to show this, just create an empty map and run the command to unlock all technologies

Code: Select all

/c game.player.force.research_all_technologies()
Kind regards
lovely_santa

Re: [0.18.17] Cannot hide locomotive from bonus gui

Posted: Tue Apr 07, 2020 9:43 am
by Bilka
You are looking at the entity (see debug info in tooltip), so you have to set the appropriate flag on the entity, which is "hidden". Moving to modding help.

Re: [0.18.17] Cannot hide locomotive from bonus gui

Posted: Tue Apr 07, 2020 9:49 am
by lovely_santa
I should've known that... :o