Search found 7 matches

by wizmut
Thu Dec 12, 2024 11:12 pm
Forum: Modding help
Topic: Storage and copy/paste
Replies: 2
Views: 112

Re: Storage and copy/paste

Appreciate the feedback!
by wizmut
Thu Dec 12, 2024 4:11 am
Forum: Modding help
Topic: Storage and copy/paste
Replies: 2
Views: 112

Storage and copy/paste

Right now I have some custom entities that use filters. The filters don't exist as part of any normal prototype's behavior. They're set by a custom GUI and indicated by manually drawing a sprite. The state of each filter is tracked in storage.my_cool_entity_filters[my_entity.unit_number] . And there...
by wizmut
Sat Nov 30, 2024 8:26 pm
Forum: Modding help
Topic: Locking a container
Replies: 1
Views: 135

Locking a container

I'm trying to make a container that can be locked and unlocked. A locked container would not let inserters interact with it (or anything really). My 'canister' is copied from the car prototype. This gives it other qualities I need, such as mobility, disabled collision and being drawn under other obj...
by wizmut
Thu Nov 28, 2024 7:46 pm
Forum: Modding help
Topic: [boskid] How to get the ID of a custom-event?
Replies: 6
Views: 300

Re: How to get the ID of a custom-event?

Can you post the relevant code? I assume you're looking at these pages: https://lua-api.factorio.com/latest/events.html#CustomInputEvent - particularly "selected_prototype" https://lua-api.factorio.com/latest/prototypes/CustomInputPrototype.html - which mentions "include_selected_prot...
by wizmut
Wed Nov 27, 2024 1:34 am
Forum: Modding help
Topic: Mining requires fluid depending on drill
Replies: 5
Views: 361

Re: Mining requires fluid depending on drill

Or maybe an assembler prototype that uses a custom recipe of 1 steam => nothing. Would need some way to catch when the recipe was done, and then find a random tile in range and spit out the appropriate ore. Or have a recipe for each ore.
by wizmut
Sun Nov 24, 2024 4:14 am
Forum: Modding help
Topic: Setting a default fluid amount
Replies: 0
Views: 79

Setting a default fluid amount

I am trying to fill my new 'tube' entity with some 'air' in it by default. 50 units of air. Tubes have the Storage Tank prototype. I have this snippet in control.lua: script.on_event(defines.events.on_built_entity, function(event) local entity = event.entity if entity.name == "tube" or ent...

Go to advanced search