Page 1 of 1
Mod to disable Roboport construction via Hotkey
Posted: Wed Dec 06, 2017 7:43 pm
by terrormortis
Hello Everyone,
I saw a punch of mods which allow you to deactivate personal roboports via hotkey to prevent personal robots filling up your inventory when something is deconstructed nearby.
Would it be possible to create a Mod to disable stationary roboports construction, for example by setting the construction area to 2x2?
In this way a blueprint next to me would be completed with my personal robots, it is sometimes very annoying to wait for other construction bots to carry over parts when the parts are actually in my inventory.
Maybe someone could make this mod or give some directions if it is possible.
Best wishes
Re: Mod to disable Roboport construction via Hotkey
Posted: Sun Dec 10, 2017 4:08 pm
by darkfrei
terrormortis wrote:Hello Everyone,
I saw a punch of mods which allow you to deactivate personal roboports via hotkey to prevent personal robots filling up your inventory when something is deconstructed nearby.
Would it be possible to create a Mod to disable stationary roboports construction, for example by setting the construction area to 2x2?
In this way a blueprint next to me would be completed with my personal robots, it is sometimes very annoying to wait for other construction bots to carry over parts when the parts are actually in my inventory.
Maybe someone could make this mod or give some directions if it is possible.
Best wishes
Something like this?
Code: Select all
function active_roboports (active) -- active is bool
for i, roboport in pairs (global.roboports) do
if roboport.valid then
roboport.active = active
end
end
Re: Mod to disable Roboport construction via Hotkey
Posted: Mon Dec 11, 2017 10:05 pm
by darkfrei
Try this one. Proof of concept.
It works now for old roboports only.
Re: Mod to disable Roboport construction via Hotkey
Posted: Wed Dec 13, 2017 7:03 pm
by darkfrei
New version: you can enable/disable roboports and robots.
Re: Mod to disable Roboport construction via Hotkey
Posted: Sun Dec 31, 2017 1:22 pm
by darkfrei
Jon8RFC wrote:This looks great and I hope to try it out when I get some free time.
Is it too difficult to add an additional function to disable on two levels? The first level would be disable only for other players' construction, so that in multi-player environments, if they're blueprinting or deconstructing, mine only work for myself. The second level would be a complete disabling.
Yes, it's possible, but not for robots: they haven't
last_user parameter.
Re: Mod to disable Roboport construction via Hotkey
Posted: Sun Dec 31, 2017 1:37 pm
by Jon8RFC
I realized after I posted that this wasn't for personal robo ports and deleted the post, but you're too quick for me and managed to answer. Thanks for the information!
A follow-up, since I don't understand Lua functionality--does this mean that even though entities are blueprinted by someone else, the robots/ports can't read that parameter? I understand that a robot itself doesn't have a "last user" parameter for itself, but I'm asking for clarification regarding robots or the robo port's ability to read "last user" of entities which do support "last user".
Re: Mod to disable Roboport construction via Hotkey
Posted: Sun Dec 31, 2017 2:55 pm
by darkfrei
Jon8RFC wrote:I'm asking for clarification regarding robots or the robo port's ability to read "last user" of entities which do support "last user".
Robots have no API, they are too optimized and can be paused and unpaused.