|
1 require"sb-util" |
|
2 |
|
3 -- in case something changes conditions or collision masks in the meantime |
|
4 for _, entity_type in pairs (entity_categories) |
|
5 do |
|
6 for _, base_entity in pairs (data.raw[entity_type] or {}) |
|
7 do |
|
8 local ct = data.raw["assembling-machine"]["collision-tester-"..base_entity.name] |
|
9 if ct |
|
10 then |
|
11 ct.collision_mask = table.deepcopy(base_entity.collision_mask) |
|
12 ct.collision_box = table.deepcopy(base_entity.collision_box) |
|
13 ct.surface_conditions = table.deepcopy(base_entity.surface_conditions) |
|
14 end |
|
15 end |
|
16 end |