Search found 312 matches

by curiosity
Wed Feb 21, 2024 5:32 pm
Forum: Modding interface requests
Topic: Add events for `remote.add_interface` and `remote.remove_interface`
Replies: 7
Views: 280

Re: Add events for `remote.add_interface` and `remote.remove_interface`

With events as proposed, I'd imagine it would be simple to implement and go along nicely with the other similar features in the engine. In the context of the problem you are trying to solve, it's a suboptimal solution. You have to set up caches that you need to keep updated, handle events and so on...
by curiosity
Mon Feb 19, 2024 2:55 pm
Forum: Documentation Improvement Requests
Topic: What happens on invalid LuaRemote::call?
Replies: 0
Views: 81

What happens on invalid LuaRemote::call?

What if you pass it a nonexistent interface name? Does it error or return nil, or maybe do something else? What about a nonexistent function name?
by curiosity
Mon Feb 19, 2024 2:46 pm
Forum: Modding interface requests
Topic: Add events for `remote.add_interface` and `remote.remove_interface`
Replies: 7
Views: 280

Re: Add events for `remote.add_interface` and `remote.remove_interface`

Why is this better than adding a function like this?

Code: Select all

LuaRemote::try_call(interface, function, ...)  → boolean, Any?
Assuming call errors when given a nonexistent interface/function name instead of doing something similar already.
by curiosity
Tue Feb 06, 2024 10:39 am
Forum: Documentation Improvement Requests
Topic: Fill in LuaFluidEnergySourcePrototype field descriptions
Replies: 0
Views: 70

Fill in LuaFluidEnergySourcePrototype field descriptions

Most if not all of them can be found in the prototype docs.
by curiosity
Wed Jan 24, 2024 4:55 pm
Forum: Modding help
Topic: Calling other mods functions in the data stage
Replies: 5
Views: 286

Re: Calling other mods functions in the data stage

However, i don't think mods can communicate with each other in the data stage, only in the control stage. That's because there is no barrier in data stage. All mods are mashed together into the same Lua state. The docs tell you this, by the way. That's why you are able to call table.deepcopy etc. w...
by curiosity
Sun Jan 21, 2024 3:19 pm
Forum: Resolved Requests
Topic: LuaGuiElement.type
Replies: 3
Views: 195

Re: LuaGuiElement.type

Every type is like that.
by curiosity
Mon Jan 15, 2024 7:02 am
Forum: Modding interface requests
Topic: Allow to specify textfield decoration
Replies: 0
Views: 135

Allow to specify textfield decoration

What is textfield decoration? Additional text around the value of the textfield. Most prominently visible in the train GUI and Sounds and Interface game settings. The most practical way to do this, in my opinion, would be to let the user specify a LocalisedString. Then, when it's time to display tex...
by curiosity
Fri Jan 12, 2024 9:16 pm
Forum: Modding interface requests
Topic: Add localised tooltips to LuaGuiElement drop-down items
Replies: 16
Views: 1080

Re: Add localised strings to LuaGuiElement drop-down items

[Moderated by Koub : response to a moderated post]
by curiosity
Fri Jan 12, 2024 8:59 pm
Forum: Modding interface requests
Topic: Add localised tooltips to LuaGuiElement drop-down items
Replies: 16
Views: 1080

Re: Add localised strings to LuaGuiElement drop-down items

[Moderated by Koub : response to a moderated post]
by curiosity
Fri Jan 12, 2024 4:23 pm
Forum: Modding interface requests
Topic: Add localised tooltips to LuaGuiElement drop-down items
Replies: 16
Views: 1080

Re: Add localised strings to LuaGuiElement drop-down items

[Moderated by Koub : response to a moderated post]
by curiosity
Fri Jan 12, 2024 3:33 pm
Forum: Modding interface requests
Topic: Add localised tooltips to LuaGuiElement drop-down items
Replies: 16
Views: 1080

Re: Add localised strings to LuaGuiElement drop-down items

[Moderated by Koub : response to a moderated post]
by curiosity
Fri Jan 12, 2024 2:54 pm
Forum: Modding interface requests
Topic: Add localised tooltips to LuaGuiElement drop-down items
Replies: 16
Views: 1080

Re: Add localised strings to LuaGuiElement drop-down items

[Moderated by Koub : response to a moderated post]
by curiosity
Fri Jan 12, 2024 2:40 pm
Forum: Modding interface requests
Topic: Add localised tooltips to LuaGuiElement drop-down items
Replies: 16
Views: 1080

Re: Add localised strings to LuaGuiElement drop-down items

The old topic's name is not very good. What are these localised strings supposed to be added for? Dropdown already takes an array of them for item names. It shouldn't require reading the first post to tell.
by curiosity
Fri Jan 12, 2024 1:42 pm
Forum: Modding interface requests
Topic: Add localised tooltips to LuaGuiElement drop-down items
Replies: 16
Views: 1080

Allow to specify tooltips for dropdown items

Mod settings can already have dropdowns with tooltips, just expose this ability in LuaGuiElement.
by curiosity
Tue Jan 09, 2024 9:25 pm
Forum: Documentation Improvement Requests
Topic: Alignments in rendering are unclear
Replies: 8
Views: 812

Re: Alignments in rendering are unclear

For https://forums.factorio.com/viewtopic.php?p=600414#p600414 I made separate union types for the alignment and added these descriptions: firefox_LrZqpS5yPb.png "The text is at the given side of the target position" is the exact opposite of the actual behavior. The elaboration is correct...
by curiosity
Sun Jan 07, 2024 1:58 am
Forum: Modding interface requests
Topic: LuaInventory::get_filtered_slots()
Replies: 11
Views: 731

Re: LuaInventory::get_filtered_slots()

Pi-C wrote:
Sun Jan 07, 2024 12:21 am
The beauty of this is that this will also give you the number of filtered slots if you use '#returned_list'.
What would you want it for?
by curiosity
Sat Jan 06, 2024 10:08 pm
Forum: Modding interface requests
Topic: LuaInventory::get_filtered_slots()
Replies: 11
Views: 731

Re: LuaInventory::get_filtered_slots()

Pi-C wrote:
Sat Jan 06, 2024 7:51 pm
So perhaps the method should return an array of "{ filter = string, index = uint }", or even simply an array of "{ string, uint }" instead?
Why do you want it to be an array so much?
by curiosity
Sat Jan 06, 2024 2:11 pm
Forum: Modding interface requests
Topic: LuaInventory::get_filtered_slots()
Replies: 11
Views: 731

Re: LuaInventory::get_filtered_slots()

That's a good idea! But I've a question regarding the bots' job queue: Do they get assigned to pick up items from a certain logistic chest, or from a particular slot in the its inventory? In the first case, they'd still get the item if there are several stacks of it, but in the other one, they'd re...
by curiosity
Sat Jan 06, 2024 3:30 am
Forum: Modding interface requests
Topic: LuaInventory::get_filtered_slots()
Replies: 11
Views: 731

Re: LuaInventory::get_filtered_slots()

FWIW, you can still do your thing in one pass. You just have to check the chests and manually move the trashed items if they can satisfy your request. E.g. in your example you would trash 200 copper in one tick, then in the next you would bring them back into the filtered slots and request 100 more,...

Go to advanced search