Requester methods and fields?

Place to get help with not working mods / modding interface.
Post Reply
Phenix0cs
Inserter
Inserter
Posts: 22
Joined: Mon Jan 11, 2016 1:30 am
Contact:

Requester methods and fields?

Post 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.

User avatar
Klonan
Factorio Staff
Factorio Staff
Posts: 5150
Joined: Sun Jan 11, 2015 2:09 pm
Contact:

Re: Requester methods and fields?

Post by Klonan »

You can find useful information here:
https://forums.factorio.com/wiki/inde ... Lua/Entity

Phenix0cs
Inserter
Inserter
Posts: 22
Joined: Mon Jan 11, 2016 1:30 am
Contact:

Re: Requester methods and fields?

Post 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.

User avatar
Klonan
Factorio Staff
Factorio Staff
Posts: 5150
Joined: Sun Jan 11, 2015 2:09 pm
Contact:

Re: Requester methods and fields?

Post by Klonan »

requester chest is an entity :P

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

Phenix0cs
Inserter
Inserter
Posts: 22
Joined: Mon Jan 11, 2016 1:30 am
Contact:

Re: Requester methods and fields?

Post by Phenix0cs »

Ok i understood that.

So what you are saying is that there is no other fields and/or methods specific to requesters?

matjojo
Filter Inserter
Filter Inserter
Posts: 336
Joined: Wed Jun 17, 2015 6:08 pm
Contact:

Re: Requester methods and fields?

Post 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.

Phenix0cs
Inserter
Inserter
Posts: 22
Joined: Mon Jan 11, 2016 1:30 am
Contact:

Re: Requester methods and fields?

Post 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.

Iccor56
Long Handed Inserter
Long Handed Inserter
Posts: 65
Joined: Mon Dec 25, 2017 12:29 am
Contact:

Re: Requester methods and fields?

Post 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?

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

Re: Requester methods and fields?

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

Post Reply

Return to “Modding help”