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.
LuaPlayer.logistic_network and LuaLogisticNetwork.active_construction_robots
- eradicator
- Smart Inserter
- Posts: 5209
- Joined: Tue Jul 12, 2016 9:03 am
- Contact:
Re: LuaPlayer.logistic_network and LuaLogisticNetwork.active_construction_robots
1) This should be LuaPlayer.character.logistic_network or LuaPlayer.character.logistic_cell.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.
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.
Mod support languages: 日本語, Deutsch, English
My code in the post above is dedicated to the public domain under CC0.
Re: LuaPlayer.logistic_network and LuaLogisticNetwork.active_construction_robots
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
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
Re: LuaPlayer.logistic_network and LuaLogisticNetwork.active_construction_robots
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.
Re: LuaPlayer.logistic_network and LuaLogisticNetwork.active_construction_robots
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"