SimpleEntityWithDirection

Post Reply
User avatar
DaveMcW
Smart Inserter
Smart Inserter
Posts: 3700
Joined: Tue May 13, 2014 11:06 am
Contact:

SimpleEntityWithDirection

Post by DaveMcW »

I love SimpleEntityWithForce, it is my first choice whenever I want to add a new entity. But SimpleEntityWithForce does not work well with entities that are not square, or entities that have different rotations.

I propose a new entity prototype, SimpleEntityWithDirection. It is intended to be used for player buildings, so it includes most of the functionality of SimpleEntityWithForce.

SimpleEntityWithDirection

Supported LuaEntity properties:
direction
force

Basics
Extends Prototype/EntityWithHealth. Will be targeted by units/turrets.

Optional prototype properties:

animation
Type: Types/Animation4Way
Must have one of 'pictures' or 'animations' defined.

pictures
Type: Types/Sprite4Way
Must have one of 'pictures' or 'animations' defined.

force_visibility
Type: Types/ForceCondition

random_animation_offset
Type: Types/bool

render_layer
Type: Types/RenderLayer

posila
Factorio Staff
Factorio Staff
Posts: 5202
Joined: Thu Jun 11, 2015 1:35 pm
Contact:

Re: SimpleEntityWithDirection

Post by posila »

If someone is going to implement this, I think it shouldn't be new entity type but rather just adding support for direction on SimpleEntityWithForce and SimpleEntityWithOwner (not SimpleEntity though, keep that one simple for real)

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

Re: SimpleEntityWithDirection

Post by Bilka »

4-way-direction support was added to SimpleEntityWithOwner (and by extension also SimpleEntityWithForce) in 1.1.0. However, it does not support Animation4Way. For that there is a new request here: 109313
I'm an admin over at https://wiki.factorio.com. Feel free to contact me if there's anything wrong (or right) with it.

Post Reply

Return to “Implemented mod requests”