Simple property requests (something that exists but has no way to read/write it)
- Ranakastrasz
- Smart Inserter
- Posts: 2173
- Joined: Thu Jun 12, 2014 3:05 am
- Contact:
Re: Simple property requests (something that exists but has no way to read/write it)
LuaEntity: SetAnimationFrame, SetAnimationSpeed
I think speed doesn't exist except for things like cars, but frame should be feasible. Ideally this would let us make custom animations/graphic displays, without using the wierd Car workaround.
I think speed doesn't exist except for things like cars, but frame should be feasible. Ideally this would let us make custom animations/graphic displays, without using the wierd Car workaround.
My Mods:
Modular Armor Revamp - V16
Large Chests - V16
Agent Orange - V16
Flare - V16
Easy Refineries - V16
Modular Armor Revamp - V16
Large Chests - V16
Agent Orange - V16
Flare - V16
Easy Refineries - V16
Re: Simple property requests (something that exists but has no way to read/write it)
LuaForce.Rockets_sent()
Re: Simple property requests (something that exists but has no way to read/write it)
Already exists:steinio wrote:LuaForce.Rockets_sent()
http://lua-api.factorio.com/latest/LuaF ... s_launched
http://lua-api.factorio.com/latest/LuaF ... s_launched
If you want to get ahold of me I'm almost always on Discord.
Re: Simple property requests (something that exists but has no way to read/write it)
k, sorry.Rseding91 wrote:Already exists:steinio wrote:LuaForce.Rockets_sent()
http://lua-api.factorio.com/latest/LuaF ... s_launched
http://lua-api.factorio.com/latest/LuaF ... s_launched
-
- Filter Inserter
- Posts: 302
- Joined: Fri Mar 18, 2016 4:34 pm
- Contact:
Re: Simple property requests (something that exists but has no way to read/write it)
(or just the same count for both, but since they're different properties in create_entity...)
Re: Simple property requests (something that exists but has no way to read/write it)
Player::is_catching_up or Player::is_being_dropped
I'd like a simple flag to tell if a player is catching up, being dropped, or perhaps a flag to see if a player was disconnected due to being unable to keep up.
Use case: If too many players can't keep up, (iterate over game.players.is_catching_up) and if count exceeds a certain amount, lower game speed.
I'd like a simple flag to tell if a player is catching up, being dropped, or perhaps a flag to see if a player was disconnected due to being unable to keep up.
Use case: If too many players can't keep up, (iterate over game.players.is_catching_up) and if count exceeds a certain amount, lower game speed.
Re: Simple property requests (something that exists but has no way to read/write it)
That data isn't part of the game state and as such isn't available to expose in the Lua API.Mylon wrote:Player::is_catching_up or Player::is_being_dropped
I'd like a simple flag to tell if a player is catching up, being dropped, or perhaps a flag to see if a player was disconnected due to being unable to keep up.
Use case: If too many players can't keep up, (iterate over game.players.is_catching_up) and if count exceeds a certain amount, lower game speed.
If you want to get ahold of me I'm almost always on Discord.
Re: Simple property requests (something that exists but has no way to read/write it)
Factorio Mod Portal Notifier - https://fac-notify.ml/
Cut and paste tools - https://mods.factorio.com/mods/mickael9/cut-and-paste
Portable Chests - https://mods.factorio.com/mods/mickael9/portable-chests
Cut and paste tools - https://mods.factorio.com/mods/mickael9/cut-and-paste
Portable Chests - https://mods.factorio.com/mods/mickael9/portable-chests
-
- Fast Inserter
- Posts: 152
- Joined: Sun Dec 18, 2016 3:02 pm
- Contact:
Re: Simple property requests (something that exists but has no way to read/write it)
defines.events.on_unit_spawned
has following field :
entity :: the spawned entity
spawner :: the spawner entity
fired when :
unit-spawner spawns an entity
has following field :
entity :: the spawned entity
spawner :: the spawner entity
fired when :
unit-spawner spawns an entity
-
- Fast Inserter
- Posts: 152
- Joined: Sun Dec 18, 2016 3:02 pm
- Contact:
Re: Simple property requests (something that exists but has no way to read/write it)
LuaEntity :
spawner : unit-spawner creating this entity
units : array of LuaEntity created by this unit-spawner
Re: Simple property requests (something that exists but has no way to read/write it)
For entity type "entity-ghost" where inner entity is of type "programmable-speaker":
LuaEntity.parameters :: ProgrammableSpeakerParameters [R]
LuaEntity.alert_parameters :: ProgrammableSpeakerAlertParameters [R]
LuaEntity.parameters :: ProgrammableSpeakerParameters [R]
LuaEntity.alert_parameters :: ProgrammableSpeakerAlertParameters [R]
My mods:
-
- Filter Inserter
- Posts: 302
- Joined: Fri Mar 18, 2016 4:34 pm
- Contact:
Re: Simple property requests (something that exists but has no way to read/write it)
Generally for ghosts of circuit-connected things (especially arith/decider combinators), I'd like the ability to configure their control behaviors before they are (re)spawned.321freddy wrote:For entity type "entity-ghost" where inner entity is of type "programmable-speaker":
LuaEntity.parameters :: ProgrammableSpeakerParameters [R]
LuaEntity.alert_parameters :: ProgrammableSpeakerAlertParameters [R]
-
- Filter Inserter
- Posts: 302
- Joined: Fri Mar 18, 2016 4:34 pm
- Contact:
Re: Simple property requests (something that exists but has no way to read/write it)
Not quite sure if this counts, but:
LuaEntity.color on simple-entity (or simple-entity-with-color?) - The lack of color is the only thing currently stopping me from switching Nixie Tubes from the evil lamp-car-player stack to a much nicer lamp-simple stack.
LuaEntity.color on simple-entity (or simple-entity-with-color?) - The lack of color is the only thing currently stopping me from switching Nixie Tubes from the evil lamp-car-player stack to a much nicer lamp-simple stack.
Re: Simple property requests (something that exists but has no way to read/write it)
It doesn't. The entity doesn't support color and as such I can't just add it to the Lua API.justarandomgeek wrote:Not quite sure if this counts, but:
LuaEntity.color on simple-entity (or simple-entity-with-color?) - The lack of color is the only thing currently stopping me from switching Nixie Tubes from the evil lamp-car-player stack to a much nicer lamp-simple stack.
If you want to get ahold of me I'm almost always on Discord.
-
- Filter Inserter
- Posts: 302
- Joined: Fri Mar 18, 2016 4:34 pm
- Contact:
Re: Simple property requests (something that exists but has no way to read/write it)
Bah. Then I guess My original request (which I believe you may have misread at the time) still appliesRseding91 wrote:It doesn't. The entity doesn't support color and as such I can't just add it to the Lua API.justarandomgeek wrote:Not quite sure if this counts, but:
LuaEntity.color on simple-entity (or simple-entity-with-color?) - The lack of color is the only thing currently stopping me from switching Nixie Tubes from the evil lamp-car-player stack to a much nicer lamp-simple stack.
Re: Simple property requests (something that exists but has no way to read/write it)
LuaEntity.collision_box - r/w access at runtime please. Especially write. Alternatively something like LuaEntity.enableCollision :: boolean [RW]
Re: Simple property requests (something that exists but has no way to read/write it)
Read I can do. Write is not happening as that's a very delicate system that you can't just change them runtime and have the game keep working correctlykumpu wrote:LuaEntity.collision_box - r/w access at runtime please. Especially write. Alternatively something like LuaEntity.enableCollision :: boolean [RW]
If you want to get ahold of me I'm almost always on Discord.
Re: Simple property requests (something that exists but has no way to read/write it)
Oh that's bad news... Enable/Disable collision is out of the question too, I suppose?Rseding91 wrote:Read I can do. Write is not happening as that's a very delicate system that you can't just change them runtime and have the game keep working correctlykumpu wrote:LuaEntity.collision_box - r/w access at runtime please. Especially write. Alternatively something like LuaEntity.enableCollision :: boolean [RW]
Don't bother doing it if write is not possible. No use for me in that case.
Re: Simple property requests (something that exists but has no way to read/write it)
kumpu wrote:Oh that's bad news... Enable/Disable collision is out of the question too, I suppose?Rseding91 wrote:Read I can do. Write is not happening as that's a very delicate system that you can't just change them runtime and have the game keep working correctlykumpu wrote:LuaEntity.collision_box - r/w access at runtime please. Especially write. Alternatively something like LuaEntity.enableCollision :: boolean [RW]
Don't bother doing it if write is not possible. No use for me in that case.
I can find many uses for read on entity xxxx-box including not having to do weird things like offsetting to get get the correct position then having to decide if it needs to be rotated
Re: Simple property requests (something that exists but has no way to read/write it)
I don't see solar production value, it's missing?Helfima wrote:....
luaEntityPrototype.production - Solar production