place-sounds/data-final-fixes.lua

changeset 12
2e09a72b2dfa
equal deleted inserted replaced
11:da16c5a08162 12:2e09a72b2dfa
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"])

mercurial