Search found 7 matches

by Jaren Taq
Wed Dec 02, 2020 9:33 am
Forum: Modding interface requests
Topic: allow storing tags in on_*_mined_entity event table for undo
Replies: 0
Views: 488

allow storing tags in on_*_mined_entity event table for undo

Hello, as already described in https://forums.factorio.com/viewtopic.php?f=25&t=92143 , I want to restore the state of my custom entity, if it is recreated with undo after mining it. I think an easy solution might be to extend the event table of the on_player_mined_entity and on_robot_mined_enti...
by Jaren Taq
Tue Dec 01, 2020 11:32 am
Forum: Implemented mod requests
Topic: expose upgrade direction in LuaEntity
Replies: 1
Views: 960

expose upgrade direction in LuaEntity

Hello, since the new upgrade system can change the direction of an entity, it would be nice if this information can be exposed by the LuaEntity API. Proposal: extend order_upgrade argument table with direction add a new function get_upgrade_direction() Additionally, the event table of on_marked_for_...
by Jaren Taq
Tue Dec 01, 2020 11:07 am
Forum: Modding interface requests
Topic: add information to event for fast_replace of entities
Replies: 1
Views: 750

add information to event for fast_replace of entities

Hello, is it possible to add information to the event table, if an entity is up-/downgraded/fast-replaced? Something like this: -- in on_destroy event.reason = "fast_replace" -- in on_create event.replaced_unit_number = old_entity.unit_number With this information custom entities, e.g. bas...
by Jaren Taq
Sat Nov 28, 2020 9:09 pm
Forum: Modding discussion
Topic: Reserve collision_mask layer
Replies: 0
Views: 646

Reserve collision_mask layer

If you want to reserve a collision_mask layer dynamically, just copy a prototype and allocate an unused layer to its collision mask. During runtime, the layer can be retrieved by using the ingame prototype information system. I attached some example code: data.lua local util = require("util&quo...
by Jaren Taq
Sat Nov 28, 2020 4:01 pm
Forum: Won't fix.
Topic: [1.1.2] Modded rail pipettes wrong entity if placeable_by is used
Replies: 7
Views: 2319

Re: [1.1.2] Modded rail pipettes wrong entity if placeable_by is used

Can you post, which mod or the prototype definition?
by Jaren Taq
Sat Nov 28, 2020 12:43 pm
Forum: Modding help
Topic: Help with collision_mask
Replies: 1
Views: 641

Help with collision_mask

Hello, I have two prototype classes, basically markers for the floor, which might share the same position but should collide with other entities: -- same "class" -- should collide with objects, itself, proto_b, but not with proto_c, proto_d proto_a.collision_mask = {"object-layer"...
by Jaren Taq
Sat Nov 28, 2020 8:47 am
Forum: Modding help
Topic: How to restore information for undo?
Replies: 1
Views: 626

How to restore information for undo?

Hello, I have a custom entity, for which I store additional information in a global table referenced by unit_number. For copy/paste/blueprint I am able to save and restore these information using tags. Now I also want to restore this information after I mined this entity and restore its ghost with u...

Go to advanced search