Could be a bug, but given that LuaEntity.circuit_connection_definitions did have data, maybe it was deprecated and just needs to be marked as deprecated, or removed from docs?
Documentation Improvement Requests
Re: Documentation Improvement Requests
Could be a bug, but given that LuaEntity.circuit_connection_definitions did have data, maybe it was deprecated and just needs to be marked as deprecated, or removed from docs?
Re: Documentation Improvement Requests
LuaEntity.circuit_connected_entities did not appear to be populated when inspecting entities attached to circuit networks.
[/quote]
Hovering over the connected entity and performing [code]/c game.print(serpent.line(game.player.selected.circuit_connected_entities))[/code], can't reproduce.
Re: Documentation Improvement Requests
[code]/c game.print(serpent.line(game.player.selected.circuit_connected_entities))
, can't reproduce.[/code]
[/quote]
...weird, that is working for me now.
I swear I was getting nothing but nils when I tried to use it in my mod, I guess I had some other bug.
Thanks for checking, and for the easy repro command!
- undermark5
- Burner Inserter
- Posts: 14
- Joined: Thu May 21, 2020 10:55 pm
- Contact:
Re: Documentation Improvement Requests
It would be good to add a note to "on_player_placed_equipment" indicating that it is triggered multiple times when ctrl-clicking in a stack of equipment. While it makes sense as to why this would be the case (you are adding multiple items and they each get a specific position in the grid), it does present some inconsistency with "on_player_removed_equipment" that only fires once with a count of items that were removed (and to be honest, I first wondered if I found a bug, because I didn't care about the particulars of the equipment that was added). So, it should be made clear in documentation that "on_player_placed_equipment" can be called multiple times when ctrl-clicking as changing the behavior of "on_player_removed_equipment" to fire for every item may result in breaking changes to existing mods.
Combine the above with the fact that the grid passed in the event already has all of the added pieces of equipment present makes me question if this is in fact a bug or not (previously, ctrl-clicking didn't trigger the event at all). Like it still makes some sense to have multiple times, but couldn't it get changed to give the index/key of any new equipment in the grid's equipment table?
Combine the above with the fact that the grid passed in the event already has all of the added pieces of equipment present makes me question if this is in fact a bug or not (previously, ctrl-clicking didn't trigger the event at all). Like it still makes some sense to have multiple times, but couldn't it get changed to give the index/key of any new equipment in the grid's equipment table?
Re: Documentation Improvement Requests
The event already has that? "equipment" https://lua-api.factorio.com/latest/eve ... _equipmentundermark5 wrote: ↑Sat May 06, 2023 9:48 pm ... but couldn't it get changed to give the index/key of any new equipment in the grid's equipment table?
If you want to get ahold of me I'm almost always on Discord.
- undermark5
- Burner Inserter
- Posts: 14
- Joined: Thu May 21, 2020 10:55 pm
- Contact:
Re: Documentation Improvement Requests
I'm aware, I'm saying that rather than firing the event multiple times for every piece of equipment, it could instead fire once and include a list/table of every piece of equipment that was added (it's all already present in the grid provided by the event, but you don't know which ones are new unless you've tracked this yourself or wait for each individual event).Rseding91 wrote: ↑Sun May 07, 2023 2:37 pmThe event already has that? "equipment" https://lua-api.factorio.com/latest/eve ... _equipmentundermark5 wrote: ↑Sat May 06, 2023 9:48 pm ... but couldn't it get changed to give the index/key of any new equipment in the grid's equipment table?
My whole point is that there is inconsistency that isn't inherently apparent between 2 similar events. Not trying to say that this inconsistency can't exist, just that if it does, it should be documented better. As I stated, it does make some sense to get multiple events but it's not immediately apparent from the documents that ctrl-clicking into the grid fires multiple events while ctrl-clicking out of the grid fires a single event. Either changing the behavior or providing more details around when the events fire in the documentation solves the problem (documentation likely being the simpler of the two because it doesn't create potentially breaking charges and doesn't require writing code).
Re: Documentation Improvement Requests
https://lua-api.factorio.com/latest/Lua ... ate_chunks
Lists `radius` as a required 2nd parameter, but the function is happy to run with a single `position` parameter and nothing for `radius`. Not sure if that actually does anything or not but the function should either be changed to require the 2nd parameter or the documentation should be updated for what it means to not pass the `radius` parameter.
-> Added to the docs with 1.1.102. It defaults to 0, which requests only the given chunk.
Re: Documentation Improvement Requests
-> Added to the docs in 1.1.102, thanks Honktown for the description/pointer to discord.
Re: Documentation Improvement Requests
[code]boskid — 06/24/2022 2:14 AM
value from "entity tag" inside of AdditionalEntityInfoGui will be accessible in the expansion (1.2.0) through LuaEntity::name_tag[/code]
and
[code]
boskid — 05/14/2023 1:47 AM
Great I made entity name tags writable from lua in 1.2.0[/code]
Edit: I see, the doc literally shows nothing lol.
-> Added to the docs in 1.1.102, thanks Honktown for the description/pointer to discord.
I have mods! I guess!
Link
Link
Re: Documentation Improvement Requests
LogisticParameters is missing the nil interpretations. min is 0 by default, and max is infinite
-> Thanks, added to the docs with 1.1.102.
I have mods! I guess!
Link
Link
Re: Documentation Improvement Requests
The description for LuaEntityPrototype.allow_passengers is misleading:
Vehicles may have a driver and/or a passenger. I therefore expected that I could use vehicle.set_driver() -- but not vehicle.set_passenger() -- if vehicle was based on a prototype where allow_passengers has been set to "false". Unfortunately, this doesn't work -- if allow_passengers is false, the vehicle may have neither driver nor player. I therefore suggest using the same explanation as for Prototype/Vehicle.allow_passengers:
Code: Select all
allow_passengers :: boolean? Read
Whether this vehicle allows passengers.
Can only be used if this is Vehicle
Code: Select all
Determines whether this vehicle accepts passengers. This includes both drivers and gunners, if applicable.
A good mod deserves a good changelog. Here's a tutorial (WIP) about Factorio's way too strict changelog syntax!
Re: Documentation Improvement Requests
[code]
running_speed :: double? Read
The current movement speed of this character, including effects from exoskeletons, tiles, stickers and shooting.
Can only be used if this is Character
[/code]
-> Thanks for the note, description fixed for 1.1.110, see 114510.
I have mods! I guess!
Link
Link
Re: Documentation Improvement Requests
-> Changed it for the type of LuaGuiElement, if you have any specific things you want changed please let us know.
- _CodeGreen
- Long Handed Inserter
- Posts: 72
- Joined: Sat Mar 05, 2022 11:30 am
- Contact:
Re: Documentation Improvement Requests
-> Fixed. See 109201.
My Mods | If you can't make it perfect, make it adjustable
Re: Documentation Improvement Requests
https://lua-api.factorio.com/latest/Con ... #Alignment says that a single-word alignment implies middle vertical alignment when in reality the vertical alignment is top.
Re: Documentation Improvement Requests
https://lua-api.factorio.com/latest/Con ... enSettings I'd love an explanation of autoplace_settings, and how it differs to autoplace_controls. autoplace_settings seems empty most of the time
My mods
Content: Lunar Landings | Freight Forwarding | Spidertron Patrols | Spidertron Enhancements | Power Overload
QoL: Factory Search | Module Inserter Simplified | Wire Shortcuts X | Ghost Warnings
Content: Lunar Landings | Freight Forwarding | Spidertron Patrols | Spidertron Enhancements | Power Overload
QoL: Factory Search | Module Inserter Simplified | Wire Shortcuts X | Ghost Warnings
Re: Documentation Improvement Requests
Locking this thread because any future doc requests should get their own thread in this new subforum.
Any requests already posted in this thread will be looked at, so no need to repost those issues.
Any requests already posted in this thread will be looked at, so no need to repost those issues.