I am trying to have 1 entity give 2 items when broken.
Currently I have the code as entity.mineable = {mining_time=0.1, results={{type="item",name="item1 name", amount=1},{type="item",name="item2 name", amount=1}}} but is setting a different item as the mineable result instead.
Search found 4 matches
- Sun Dec 15, 2024 4:34 am
- Forum: Modding help
- Topic: Multiple items when breaking entity
- Replies: 0
- Views: 128
- Tue Dec 03, 2024 10:20 am
- Forum: Modding help
- Topic: [Solved]DeepCopy of unsorted items missing from normal gameplay
- Replies: 4
- Views: 441
Re: DeepCopy of unsorted items missing from normal gameplay
This worked for me.
local entity = table.deepcopy(data.raw['lane-splitter']['lane-splitter'])
entity.name = "my-splitter"
entity.hidden = false
data:extend{entity}
local item = table.deepcopy(data.raw['item']['lane-splitter'])
item.name = "my-splitter"
item.subgroup = "belt"
item.place_result ...
- Mon Dec 02, 2024 9:32 am
- Forum: Modding help
- Topic: [Solved]DeepCopy of unsorted items missing from normal gameplay
- Replies: 4
- Views: 441
Re: DeepCopy of unsorted items missing from normal gameplay
I tried that, also made a custom subgroup in the logistics group to move the item to and set its new order.
The custom subgroup works, but only in editor mode.
- Sun Dec 01, 2024 6:19 pm
- Forum: Modding help
- Topic: [Solved]DeepCopy of unsorted items missing from normal gameplay
- Replies: 4
- Views: 441
[Solved]DeepCopy of unsorted items missing from normal gameplay
I am trying to make a mod which utilizes the lane splitter found in the unsorted item group when in editor mode. I would love to use this during normal gameplay but when I use deepcopy to make the item and entity, nothing shows up in the menu unless I enable the editor mode. Is there a setting or ...