LuaPlayer.logistic_network and LuaLogisticNetwork.active_construction_robots

Post Reply
mophydeen
Filter Inserter
Filter Inserter
Posts: 529
Joined: Sun Nov 22, 2015 5:02 pm
Contact:

LuaPlayer.logistic_network and LuaLogisticNetwork.active_construction_robots

Post by mophydeen »

LuaPlayer.logistic_network :: LuaLogisticNetwork [R] The personal logistic network of the player.

LuaLogisticNetwork.active_construction_robots :: array of LuaEntity [R] All entities that have active construction robots (type = construction-robot) in this network.

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

Re: LuaPlayer.logistic_network and LuaLogisticNetwork.active_construction_robots

Post by eradicator »

mophydeen wrote:
Mon Sep 24, 2018 8:56 am
LuaPlayer.logistic_network :: LuaLogisticNetwork [R] The personal logistic network of the player.

LuaLogisticNetwork.active_construction_robots :: array of LuaEntity [R] All entities that have active construction robots (type = construction-robot) in this network.
1) This should be LuaPlayer.character.logistic_network or LuaPlayer.character.logistic_cell.
2) I don't know. I can only see lists for robots that need charging in a LuaLogisticCell.
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.

mophydeen
Filter Inserter
Filter Inserter
Posts: 529
Joined: Sun Nov 22, 2015 5:02 pm
Contact:

Re: LuaPlayer.logistic_network and LuaLogisticNetwork.active_construction_robots

Post by mophydeen »

or

LuaLogisticNetwork.active_robots :: array of LuaEntity
or
LuaLogisticNetwork.robots :: array of LuaEntity

and LuaEntity.robot_status :: string (inventory, charging, to_construction, to_repair, to_chest, to_player, ..) - The location/direction/status of the robot

Code: Select all

if LuaEntity.robot_status ~= "inventory" then 

Rseding91
Factorio Staff
Factorio Staff
Posts: 13209
Joined: Wed Jun 11, 2014 5:23 am
Contact:

Re: LuaPlayer.logistic_network and LuaLogisticNetwork.active_construction_robots

Post by Rseding91 »

I've added added LuaLogisticNetwork::robots, construction_robots, and logistic_robots read for 0.17.
If you want to get ahold of me I'm almost always on Discord.

mophydeen
Filter Inserter
Filter Inserter
Posts: 529
Joined: Sun Nov 22, 2015 5:02 pm
Contact:

Re: LuaPlayer.logistic_network and LuaLogisticNetwork.active_construction_robots

Post by mophydeen »

Rseding91 wrote:
Tue Sep 25, 2018 1:28 am
I've added added LuaLogisticNetwork::robots, construction_robots, and logistic_robots read for 0.17.
Thank you

How do you know to whom the network belongs to ?

Code: Select all

network.cells[1].owner.name == "player"
or
network.cells[1].owner.name == "roboport"
and not
network.cells[1].owner.name == "Rseding91"

Post Reply

Return to “Implemented mod requests”