what does Player.opened return?

Place to get help with not working mods / modding interface.
Post Reply
ixu
Fast Inserter
Fast Inserter
Posts: 105
Joined: Sun May 29, 2016 6:18 pm
Contact:

what does Player.opened return?

Post by ixu »

When calling LuaControl.opened the documentation says that LuaEntity or LuaItemStack or LuaEquipment or LuaEquipmentGrid or LuaPlayer or LuaGuiElement or defines.gui_type could be returned.
Is there an elegant way to get the actual runtime type from the returned object?
Mods: ingteb, ixuClock, ixuAutoSave, NoCheating, hardCrafting (Maintainer) and more
Desperately tried to implement redo :)

PFQNiet
Filter Inserter
Filter Inserter
Posts: 289
Joined: Sat Sep 05, 2020 7:48 pm
Contact:

Re: what does Player.opened return?

Post by PFQNiet »

That's what opened_gui_type is for :)

User avatar
eradicator
Smart Inserter
Smart Inserter
Posts: 5206
Joined: Tue Jul 12, 2016 9:03 am
Contact:

Re: what does Player.opened return?

Post by eradicator »

Common.object_name also exists nowadays.
Author of: Belt Planner, Hand Crank Generator, Screenshot Maker, /sudo and more.
Mod support languages: 日本語, Deutsch, English
My code in the post above is dedicated to the public domain under CC0.

Post Reply

Return to “Modding help”