LuaEntity teleport
LuaEntity teleport
Currently, the LuaEntity teleport function only works for players when used to teleport an entity to another surface, the workaround is to create an entity of the same type on the other surface, copy data from the old entity and then delete the old entity. This creates a large portion of extra work that must be done for the entity to be "teleported". For example, each item in an inventory of an entity must be added to the teleported entity, the more items an entity contains, the more work that must be done for it to be "teleported". In addition to the extra work required, it is also entirely possible that some data may not be able to be copied at all or other mods break due to having stored references to the old entities which are destroyed.
Re: LuaEntity teleport
Yes, that's the same and more work we'd need to do to make teleporting all entities between surfaces work which is why I didn't do it when making just the player teleportable between surfaces. Some of that is planned but not for 0.13 because it would introduce so many bugs for the little gains.Simcra wrote:This creates a large portion of extra work that must be done for the entity to be "teleported".
If you want to get ahold of me I'm almost always on Discord.
Re: LuaEntity teleport
But for 0.15?Rseding91 wrote:Yes, that's the same and more work we'd need to do to make teleporting all entities between surfaces work which is why I didn't do it when making just the player teleportable between surfaces. Some of that is planned but not for 0.13 because it would introduce so many bugs for the little gains.Simcra wrote:This creates a large portion of extra work that must be done for the entity to be "teleported".
Re: LuaEntity teleport
Do you have specific entities in mind? I could do a few but I'm not going to attempt to do them all as it would take too much time for very little gains.darkfrei wrote:But for 0.15?Rseding91 wrote:Yes, that's the same and more work we'd need to do to make teleporting all entities between surfaces work which is why I didn't do it when making just the player teleportable between surfaces. Some of that is planned but not for 0.13 because it would introduce so many bugs for the little gains.Simcra wrote:This creates a large portion of extra work that must be done for the entity to be "teleported".
If you want to get ahold of me I'm almost always on Discord.
Re: LuaEntity teleport
+ Player/Character, Car, Unit, and the train sections.
Re: LuaEntity teleport
The car sounds reasonable. The unit entity just isn't going to happen and trains can't be teleported anyway so between surfaces isn't going to happen.Earendel wrote:+ Player/Character, Car, Unit, and the train sections.
If you want to get ahold of me I'm almost always on Discord.
Re: LuaEntity teleport
It means, we can't build some "underground" railway stations like in factorissimo mod?Rseding91 wrote:The car sounds reasonable. The unit entity just isn't going to happen and trains can't be teleported anyway so between surfaces isn't going to happen.Earendel wrote:+ Player/Character, Car, Unit, and the train sections.