LuaEntity.target= [(R?)/W] for Combat Robots

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

LuaEntity.target= [(R?)/W] for Combat Robots

Post by eradicator »

What?

The ability to change what entity a combat robot is following.

Why?

Because after staring at the doc for half an hour the only method i can see is to recreate the entire robot using surface.create_entity{target=NewOwnerLuaEntity}. Which is wasteful at best and breaks other mods at worst. It also produces a slight optical "bumb" because the new robots start at a different animation frame.

What for?

To smoothly change the appearanc of the player avatar by creating a new character and copying everything.
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.

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

Re: LuaEntity.target= [(R?)/W] for Combat Robots

Post by Rseding91 »

Added for the next release.
If you want to get ahold of me I'm almost always on Discord.

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

Re: LuaEntity.target= [(R?)/W] for Combat Robots

Post by eradicator »

Thanks! Is it gonna be [R/W] or just [W]?
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.

Bilka
Factorio Staff
Factorio Staff
Posts: 3133
Joined: Sat Aug 13, 2016 9:20 am
Contact:

Re: LuaEntity.target= [(R?)/W] for Combat Robots

Post by Bilka »

RW
I'm an admin over at https://wiki.factorio.com. Feel free to contact me if there's anything wrong (or right) with it.

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

Re: LuaEntity.target= [(R?)/W] for Combat Robots

Post by eradicator »

Perfect.
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.

Post Reply

Return to “Implemented mod requests”