Search found 4 matches

by keeper317
Sun Dec 15, 2024 4:34 am
Forum: Modding help
Topic: Multiple items when breaking entity
Replies: 0
Views: 128

Multiple items when breaking entity

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.
by keeper317
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 ...
by keeper317
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

DaveMcW wrote: Mon Dec 02, 2024 9:16 am Try setting item.hidden = false.
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.
by keeper317
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 ...

Go to advanced search