Search found 289 matches

by PFQNiet
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...
by PFQNiet
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?
by PFQNiet
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...
by PFQNiet
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...
by PFQNiet
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.
by PFQNiet
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.
by PFQNiet
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 ;)
by PFQNiet
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".
by PFQNiet
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?
by PFQNiet
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.
by PFQNiet
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.
by PFQNiet
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!"
by PFQNiet
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.
by PFQNiet
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...
by PFQNiet
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.
by PFQNiet
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."
by PFQNiet
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...
by PFQNiet
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...
by PFQNiet
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

Re: [1.1.38] Tools can no longer stack

Xoriun wrote:
Mon Aug 30, 2021 11:26 am
It says `stack_size = 1`.
Maybe that's the problem?
Concrete has a stack size of 100 but that doesn't stop you shoving 1k of it into an assembling machine to make a silo ;)

Also it worked in 1.1.37. This appears to be a regression.

Go to advanced search