|
1 ---@class entity EntityPrototype |
|
2 ---@class item ItemPrototype |
|
3 local function copy_item_sounds_to_entity(item, entity) |
|
4 entity.open_sound = table.deepcopy(item.pick_sound) |
|
5 entity.close_sound = table.deepcopy(item.drop_sound) |
|
6 end |
|
7 |
|
8 -- prevent metallic machine sounds when placing power poles |
|
9 local sounds = require("__base__.prototypes.entity.sounds") |
|
10 for _, electric_pole in pairs(data.raw["electric-pole"]) |
|
11 do |
|
12 electric_pole.open_sound = sounds.electric_large_open |
|
13 electric_pole.close_sound = sounds.electric_large_close |
|
14 end |
|
15 |
|
16 -- prevent metallic machine sounds when placing stuff made of bricks |
|
17 copy_item_sounds_to_entity(data.raw.item["stone-furnace"], data.raw.furnace["stone-furnace"]) |
|
18 copy_item_sounds_to_entity(data.raw.item["stone-wall"], data.raw.wall["stone-wall"]) |