Search found 289 matches
- Mon Jan 10, 2022 6:31 pm
- Forum: Modding discussion
- Topic: Replacing Beacons with Overclocking Stations - possible?
- Replies: 24
- Views: 6489
Re: Replacing Beacons with Overclocking Stations - possible?
It sounds like it could work. It might be tricky but nothing you've described sounds outside the capabilities of the engine. For detecting the transfer of items into or out of a beacon, you will need the fast-transfer events (if the destination is a beacon) as well as player-inventory-changed and cu...
- Wed Dec 29, 2021 6:33 am
- Forum: Modding help
- Topic: Finding entities in a save that have been removed
- Replies: 4
- Views: 1112
Re: Finding entities in a save that have been removed
I'm not sure that's a problem, given that you only spawn these infinite resources when the original resource is depleted. Surely adding that resource to the exclusion list means that deletion is what you want to happen anyway?
- Fri Dec 17, 2021 7:36 am
- Forum: Implemented for 2.0
- Topic: Linked pipes
- Replies: 16
- Views: 5280
Re: Linked pipes
I'd like to +1 this request. My use case will be threefold: 1. De-cheese the flow of fluids through underground pipes by linking it to another surface where the appropriate number of normal pipes are lined up for the fluid to flow through. 2. Allow underground pipes of arbitrary length. 3. Allow wea...
- Wed Dec 08, 2021 8:36 am
- Forum: Modding help
- Topic: [Scripting Assistance] Help identifying mining drill functions
- Replies: 10
- Views: 2485
Re: [Scripting Assistance] Help identifying mining drill functions
This function gives you "local drill = event.entity", which is the mining drill that was depleted. You will have to check here that it's indeed a mining drill though, and not a pumpjack for example. You could do this by simply "if event.entity.type ~= "mining-drill" then re...
- Thu Dec 02, 2021 7:06 pm
- Forum: Modding help
- Topic: Lua command to place ghost landfill?
- Replies: 3
- Views: 1121
Re: Lua command to place ghost landfill?
You'd need to create a "tile-ghost" entity for each tile.
- Fri Nov 26, 2021 8:26 am
- Forum: Modding help
- Topic: Can't access spidertron equipment grid with console?
- Replies: 2
- Views: 1189
Re: Can't access spidertron equipment grid with console?
entity.grid gives you the equipment grid that you can then manipulate.
- Fri Nov 26, 2021 8:21 am
- Forum: Modding help
- Topic: Teach compilatron to avoid fires
- Replies: 3
- Views: 983
Re: Teach compilatron to avoid fires
If all else fails, take the lazy option and give the entity 100% fire resistance
- Sun Nov 07, 2021 2:12 am
- Forum: Modding help
- Topic: Make machine only work during day time
- Replies: 8
- Views: 2452
Re: Make machine only work during day time
Can you name a time when "hours >= 4 or hours <= 22" won't be true?
Just replace that entire second "if" line with the single word "else".
Just replace that entire second "if" line with the single word "else".
- Sat Nov 06, 2021 2:21 pm
- Forum: Implemented mod requests
- Topic: LuaPlayer.map_visibility :: boolean
- Replies: 7
- Views: 2444
Re: LuaPlayer.map_visibility :: boolean
Can't you use defines.controllers.spectator?
- Thu Oct 21, 2021 1:17 pm
- Forum: Modding help
- Topic: Possible to Create TrainStop-type Name Input for Linked-Containers?
- Replies: 10
- Views: 2369
Re: Possible to Create TrainStop-type Name Input for Linked-Containers?
As for "using that name to set the link ID", you could make use of a hashing function. For example, CRC32 would give you a 32-bit number for any given string. The downside is that collisions may occur if two different names happen to yield the same hash.
- Sat Oct 16, 2021 12:04 pm
- Forum: Won't implement
- Topic: add train_stop_id argument to LuaTrain::go_to_station()
- Replies: 16
- Views: 4100
Re: add train_stop_id argument to LuaTrain::go_to_station()
Having only ever built one-way rail systems, I didn't realise that temporary stops could be two-directional. The fix by boskid does indeed resolve the issues with the solution I put forward.
- Thu Oct 14, 2021 3:18 pm
- Forum: Won't implement
- Topic: add train_stop_id argument to LuaTrain::go_to_station()
- Replies: 16
- Views: 4100
Re: add train_stop_id argument to LuaTrain::go_to_station()
LTN achieves this by creating a temporary stop in the train schedule, right on top of the desired real train stop. The train paths to the temporary stop, then looks for a station with the given name and finds "oh hey I'm already there, what a coincidence!"
- Tue Oct 12, 2021 1:52 am
- Forum: Resolved Problems and Bugs
- Topic: [1.1.42] Selecting a wall ghost draws a solid interior
- Replies: 2
- Views: 2404
[1.1.42] Selecting a wall ghost draws a solid interior
Steps to reproduce:
- Place four wall ghosts in a square
- Move (empty) mouse cursor over the ghost walls
Observed behaviour: three out of the four walls, when hovered, will make the interior "filling" of the wall be drawn solid, not ghosty.
- Place four wall ghosts in a square
- Move (empty) mouse cursor over the ghost walls
Observed behaviour: three out of the four walls, when hovered, will make the interior "filling" of the wall be drawn solid, not ghosty.
- Fri Sep 24, 2021 10:54 pm
- Forum: Modding interface requests
- Topic: Don't let robots take only-in-cursor items
- Replies: 1
- Views: 829
Don't let robots take only-in-cursor items
This is very much a "me" problem but I have an issue and this is a solution I have come up with that doesn't involve tons of Lua. My mod includes a "build gun" feature, where instead of crafting buildings you can just place them and the necessary materials are taken directly from...
- Sun Sep 19, 2021 4:42 pm
- Forum: Modding interface requests
- Topic: [Kinda added with swap_children] Modding - order property in LuaGuiElement
- Replies: 9
- Views: 3135
Re: Modding - order property in LuaGuiElement
Potential duplicate: viewtopic.php?f=28&t=99233
- Mon Sep 13, 2021 4:01 pm
- Forum: Modding interface requests
- Topic: spill_item_stack() causes heavy lag
- Replies: 4
- Views: 1124
Re: spill_item_stack() causes heavy lag
A `spill_inventory()` function would be nice. Among other uses, it could take the temporary LuaInventory buffer from a `player_mined_entity` event and spill that.
- Sun Sep 12, 2021 12:47 am
- Forum: Modding help
- Topic: Can I make a chest where slots can be filtered?
- Replies: 4
- Views: 1410
Re: Can I make a chest where slots can be filtered?
Set `render_no_power_icon = false` on the vehicle's burner prototype.
While it might feel "dirty", a lot of great mods are entirely made based on this "use prototypes for things they weren't necessarily intended for."
While it might feel "dirty", a lot of great mods are entirely made based on this "use prototypes for things they weren't necessarily intended for."
- Wed Sep 01, 2021 10:00 pm
- Forum: Modding discussion
- Topic: New API Docs website
- Replies: 68
- Views: 20432
Re: New API Docs website
I have to agree, when looking for documentation I want it clear and boring so I can find the information I want and get back to work. Any time lost to things like visual clutter or scrolling performance is time lost in development, and multiply that by every modder's every search through the documen...
- Mon Aug 30, 2021 12:18 pm
- Forum: Duplicates
- Topic: [1.1.38] selection-tool items do not stack in input slot
- Replies: 6
- Views: 2181
Re: [1.1.38] Tools can no longer stack
I have "fixed" this by just making it a regular `item` and, instead of `mod-openable`, I made a `custom-input` that listens for `open-item` inputs. If the selected prototype is an item, that item is the one I want, and if the player has either no GUI or their own character open, then the i...
- Mon Aug 30, 2021 11:58 am
- Forum: Duplicates
- Topic: [1.1.38] selection-tool items do not stack in input slot
- Replies: 6
- Views: 2181