[0.18.17] Cannot hide locomotive from bonus gui

Place to get help with not working mods / modding interface.
Post Reply
User avatar
lovely_santa
Filter Inserter
Filter Inserter
Posts: 502
Joined: Sat Feb 18, 2017 9:41 pm
Contact:

[0.18.17] Cannot hide locomotive from bonus gui

Post 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 594 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
Attachments
trainConstructionSite_0.2.2.zip
(8.4 MiB) Downloaded 27 times
You can find all my mods on the mod portal. Also helping on Arch666Angel's mods.
Image

Bilka
Factorio Staff
Factorio Staff
Posts: 3135
Joined: Sat Aug 13, 2016 9:20 am
Contact:

Re: [0.18.17] Cannot hide locomotive from bonus gui

Post 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.
I'm an admin over at https://wiki.factorio.com. Feel free to contact me if there's anything wrong (or right) with it.

User avatar
lovely_santa
Filter Inserter
Filter Inserter
Posts: 502
Joined: Sat Feb 18, 2017 9:41 pm
Contact:

Re: [0.18.17] Cannot hide locomotive from bonus gui

Post by lovely_santa »

I should've known that... :o
You can find all my mods on the mod portal. Also helping on Arch666Angel's mods.
Image

Post Reply

Return to “Modding help”