"maximum_wire_distance" currently has a limit of 64 which is fine most of the time.
But sometimes you want to connect entities far beyond the normal ranges.
I propose a change to LuaEntity.connect_neighbour(target).
Add the optional parameter bool::ignore_maximum_wire_distance
Make maximum_wire_distance optional when placing wire in script
-
- Burner Inserter
- Posts: 17
- Joined: Sat Jun 08, 2019 1:19 pm
- Contact:
Re: Make maximum_wire_distance optional when placing wire in script
As a workaround, you can teleport the entity close, connect the wire, then teleport it back.
-
- Burner Inserter
- Posts: 17
- Joined: Sat Jun 08, 2019 1:19 pm
- Contact:
Re: Make maximum_wire_distance optional when placing wire in script
Thank you i was not aware of that. If my proposal goes nowhere then i will do that
edit: "Surface teleport can only be done for players at the moment."
edit2:Yes , it works when you leave out the surface
edit: "Surface teleport can only be done for players at the moment."
edit2:Yes , it works when you leave out the surface
Last edited by TheFunnySide on Thu Jul 25, 2019 8:36 am, edited 1 time in total.
Re: Make maximum_wire_distance optional when placing wire in script
That means you were trying to teleport it between surfaces. Wires most likely can't go between surfaces.TheFunnySide wrote: ↑Wed Jul 24, 2019 10:03 pm edit: "Surface teleport can only be done for players at the moment."
I think it errors if you give any surface into the function call, even if its already on that surface.
-
- Filter Inserter
- Posts: 587
- Joined: Sun Jun 09, 2019 10:40 pm
- Contact:
Re: Make maximum_wire_distance optional when placing wire in script
O_o today I learned a wonderfully awful hack, and shall have to find an excuse to use it. Are there any conditions that, aside from human intervention, would break the connection?
Re: Make maximum_wire_distance optional when placing wire in script
But why? Letting script logic do things which the player normally does - but the player can't reproduce - doesn't seem like a good idea. From the players perspective if they ever disconnect a wire in that state they can't reconnect it because the game will tell them it's invalid.
The only reason the game doesn't force disconnect wires after teleporting is it would add a lot of overhead to every teleport action to check if wire(s) are all still in reach and wouldn't allow things like batch teleporting where after *some other* teleports the wires will be correct.
The only reason the game doesn't force disconnect wires after teleporting is it would add a lot of overhead to every teleport action to check if wire(s) are all still in reach and wouldn't allow things like batch teleporting where after *some other* teleports the wires will be correct.
If you want to get ahold of me I'm almost always on Discord.
Re: Make maximum_wire_distance optional when placing wire in script
Some prototypes are not available for the player, here are hidden entities with hidden copper/red/green wires.Rseding91 wrote: ↑Sun Jul 28, 2019 6:27 pm But why? Letting script logic do things which the player normally does - but the player can't reproduce - doesn't seem like a good idea. From the players perspective if they ever disconnect a wire in that state they can't reconnect it because the game will tell them it's invalid.
The only reason the game doesn't force disconnect wires after teleporting is it would add a lot of overhead to every teleport action to check if wire(s) are all still in reach and wouldn't allow things like batch teleporting where after *some other* teleports the wires will be correct.
In this way we can make "radio" signal transmission (and even radio energy transmission!), that cost no UPS.