Page 1 of 1
Requester methods and fields?
Posted: Sun Jan 17, 2016 9:38 pm
by Phenix0cs
I cant find the way to get the methods and fields of requesters.
The best I got was entity methods and fields.
Here is the code I used.
Code: Select all
script.on_event({defines.events.on_built_entity, defines.events.on_robot_built_entity},
function(event)
if event.created_entity.name == "logistic-chest-requester" then
print(event.created_entity.type)
print(event.created_entity.help())
end
end)
Thanks for the help.
Re: Requester methods and fields?
Posted: Sun Jan 17, 2016 9:54 pm
by Klonan
Re: Requester methods and fields?
Posted: Sun Jan 17, 2016 9:58 pm
by Phenix0cs
Klonan, that's the same i got but that's only for entity.
I need the same for requester, which is not on the wiki.
Re: Requester methods and fields?
Posted: Sun Jan 17, 2016 10:00 pm
by Klonan
requester chest is an entity
all the info about the requester chest is on that page
(also in the doc-html in the factorio directoy)
there is nothing more specific
Re: Requester methods and fields?
Posted: Sun Jan 17, 2016 10:04 pm
by Phenix0cs
Ok i understood that.
So what you are saying is that there is no other fields and/or methods specific to requesters?
Re: Requester methods and fields?
Posted: Tue Jan 19, 2016 5:34 pm
by matjojo
Phenix0cs wrote:Ok i understood that.
So what you are saying is that there is no other fields and/or methods specific to requesters?
so, everything that is on the wiki is in the game. it should, in the lua parts, not be outdated. The piece
logistic network contains information specific for anything that has to do with logistics.
This and below has the info you are probably looking for.
Re: Requester methods and fields?
Posted: Tue Jan 19, 2016 5:48 pm
by Phenix0cs
Yes, I had found the info mentioned but I expected Inheritance, since I'm more used to OO programming.
Now I'm looking to add functions to do what I need using the methods and fields provided.
I'm learning how to make custom events to trigger functions when a field change.
New language and new API, means learning new ways to do things
Thanks for the help provided.
Re: Requester methods and fields?
Posted: Wed Aug 08, 2018 5:59 pm
by Iccor56
matjojo wrote:Phenix0cs wrote:Ok i understood that.
So what you are saying is that there is no other fields and/or methods specific to requesters?
so, everything that is on the wiki is in the game. it should, in the lua parts, not be outdated. The piece
logistic network contains information specific for anything that has to do with logistics.
This and below has the info you are probably looking for.
matjojo,
that page does not work anymore. could you post the new location?
Re: Requester methods and fields?
Posted: Wed Aug 08, 2018 6:02 pm
by Bilka
Iccor56 wrote:that page does not work anymore. could you post the new location?
Of course not, this thread is 2 years old. Use the official doc:
https://lua-api.factorio.com/latest/Lua ... ic_network and
https://lua-api.factorio.com/latest/Lua ... quest_slot