Simple property requests (something that exists but has no way to read/write it)
Re: Simple property requests (something that exists but has no way to read/write it)
Since most of the posts are no longer "read/write access to things that already exist" but new mechanics/properties that require new backing C++ logic I'm going to un-sticky this post and call it good for now.
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)
I think it's often difficult to judge wether something requires new logic behind it. From a players perspective, without having seen the code, it can easily seem like the game has stored information_x somewhere, but simply does not give api control over it - while in game code it's far more complicated.Rseding91 wrote:Since most of the posts are no longer "read/write access to things that already exist" but new mechanics/properties that require new backing C++ logic I'm going to un-sticky this post and call it good for now.
Re: Simple property requests (something that exists but has no way to read/write it)
What about combot time to live? I can't get the entity and then extend its lifetime.
Re: Simple property requests (something that exists but has no way to read/write it)
Did this get missed?Earendel wrote:Entity prototype: explosion
beam
rotate
If it's not clear which property I'm referring to:
game.entity_prototypes["large-explosion"].beam would return false.
game.entity_prototypes["railgun-beam"].beam would return true.
Re: Simple property requests (something that exists but has no way to read/write it)
LuaLogisticNetwork::unsatisfied_requesters --array of LuaEntity [Read-only]
An array of entities with unsatisfied logistic requests.
Desired use-case: Query if a logistic network has an unfilled demand for ore, and if so turn on logistic mining (a mod). Prevents case of logistic mining completely clogging storage without doing much more expensive checks.
LuaLogisticNetwork::satisfied_requester_points --Array of LuaLogisticPoint (Read-only]
(For completeness sake)
An array of entities with unsatisfied logistic requests.
Desired use-case: Query if a logistic network has an unfilled demand for ore, and if so turn on logistic mining (a mod). Prevents case of logistic mining completely clogging storage without doing much more expensive checks.
LuaLogisticNetwork::satisfied_requester_points --Array of LuaLogisticPoint (Read-only]
(For completeness sake)
Re: Simple property requests (something that exists but has no way to read/write it)
Make stack_size writeable
Desired usage: In a mod where space is a factor and one has to mine a lot to expand ones base. This is instead of having to create new items to support higher stacks on not change the base item.
Edit:
Sorry, this was posted twice.
Desired usage: In a mod where space is a factor and one has to mine a lot to expand ones base. This is instead of having to create new items to support higher stacks on not change the base item.
Edit:
Sorry, this was posted twice.
Last edited by napu on Sat Nov 18, 2017 6:17 am, edited 1 time in total.
Casual modder
- 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)
I still want access to however Regeneration delay is handled.
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)
Added for 0.16.Ranakastrasz wrote:I still want access to however Regeneration delay is handled.
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)
requester_points is the list of possibly unsatisfied requester points. full or satisfied points is the list of satisfied (or full) points.Mylon wrote:LuaLogisticNetwork::unsatisfied_requesters --array of LuaEntity [Read-only]
An array of entities with unsatisfied logistic requests.
Desired use-case: Query if a logistic network has an unfilled demand for ore, and if so turn on logistic mining (a mod). Prevents case of logistic mining completely clogging storage without doing much more expensive checks.
LuaLogisticNetwork::satisfied_requester_points --Array of LuaLogisticPoint (Read-only]
(For completeness sake)
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)
LuaEntity.products_finished - not currently writable, but I dont see why it couldnt be
Re: Simple property requests (something that exists but has no way to read/write it)
Added for 0.16.LukeM212 wrote:LuaEntity.products_finished - not currently writable, but I dont see why it couldnt be
If you want to get ahold of me I'm almost always on Discord.
- 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)
Awesome!Rseding91 wrote:Added for 0.16.Ranakastrasz wrote:I still want access to however Regeneration delay is handled.
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)
LuaStyle.column_alignments [Read-only]
Klonan had told me the opposite on an old post, so I point out the impossibility of changing the value of this property.
Klonan had told me the opposite on an old post, so I point out the impossibility of changing the value of this property.
Re: Simple property requests (something that exists but has no way to read/write it)
Read-only here means you can't do style.column_alignments = { "top-left", "middle-center" }, but it returns array that you can modify: style.column_alignments[1] = "top-left"; style.column_alignments[2] = "middle-center"Angamara wrote:LuaStyle.column_alignments [Read-only]
Klonan had told me the opposite on an old post, so I point out the impossibility of changing the value of this property.
LuaForce::technologies or LuaForce::recipes work the same way
Re: Simple property requests (something that exists but has no way to read/write it)
Ok that's another explanation, or at least I understand it differently.
Here is the link of the subject on which I had spoken to continue the discussion and not overload this topic.
viewtopic.php?f=28&t=53943
Here is the link of the subject on which I had spoken to continue the discussion and not overload this topic.
viewtopic.php?f=28&t=53943
Re: Simple property requests (something that exists but has no way to read/write it)
Could we get a LuaControl.cursor_direction for reading the current orientation of the cursor? (i.e. the direction a belt/blueprint/whatnot would be placed)?
I'm writing a mod that snaps a blueprint to a specific edge to make it easier to place very large blueprints. The problem is I want it the 'snap' to be relative to the map, not the blueprint's current orientation -- which I can't do without knowing said orientation.
Thanks!
I'm writing a mod that snaps a blueprint to a specific edge to make it easier to place very large blueprints. The problem is I want it the 'snap' to be relative to the map, not the blueprint's current orientation -- which I can't do without knowing said orientation.
Thanks!
Re: Simple property requests (something that exists but has no way to read/write it)
No, that data isn't part of the game state and as such would cause desyncs if used in MP.dewiniaid wrote:Could we get a LuaControl.cursor_direction for reading the current orientation of the cursor? (i.e. the direction a belt/blueprint/whatnot would be placed)?
I'm writing a mod that snaps a blueprint to a specific edge to make it easier to place very large blueprints. The problem is I want it the 'snap' to be relative to the map, not the blueprint's current orientation -- which I can't do without knowing said orientation.
Thanks!
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)
Can we get read-only access to the contents of core/data/backers.json, perhaps as game.backer_names?
I realize I could just duplicate that in Lua (and will for now), but that's a bit of a mess for maintainability down the road.
(My end goal here is to determine if a train stop name is automatically chosen or has been manually set via the player or via blueprint placement)
I realize I could just duplicate that in Lua (and will for now), but that's a bit of a mess for maintainability down the road.
(My end goal here is to determine if a train stop name is automatically chosen or has been manually set via the player or via blueprint placement)
Re: Simple property requests (something that exists but has no way to read/write it)
Sure, added for the next version of 0.16.dewiniaid wrote:Can we get read-only access to the contents of core/data/backers.json, perhaps as game.backer_names?
I realize I could just duplicate that in Lua (and will for now), but that's a bit of a mess for maintainability down the road.
(My end goal here is to determine if a train stop name is automatically chosen or has been manually set via the player or via blueprint placement)
If you want to get ahold of me I'm almost always on Discord.
-
- Fast Inserter
- Posts: 153
- Joined: Fri Jan 06, 2017 1:54 am
- Contact:
Re: Simple property requests (something that exists but has no way to read/write it)
An entity have circuit_connection_definitions, but ghost entity - doesn't.
An entity have connect_neighbour, but ghost entity - doesn't.
Same problem with get_inventory(1).getbar() and setbar
(This exists in game, but there is no way to write to it now).
An entity have connect_neighbour, but ghost entity - doesn't.
Same problem with get_inventory(1).getbar() and setbar
(This exists in game, but there is no way to write to it now).