Skip to content
This repository was archived by the owner on May 22, 2025. It is now read-only.

Commit 3d90238

Browse files
authored
tanks and sound varying yes (#22483)
1 parent 395f03a commit 3d90238

File tree

5 files changed

+12
-1
lines changed

5 files changed

+12
-1
lines changed

code/game/objects/items.dm

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,8 @@ GLOBAL_VAR_INIT(rpg_loot_items, FALSE)
6666
var/pickup_sound
6767
///Sound uses when dropping the item, or when its thrown.
6868
var/drop_sound
69+
///Do the drop and pickup sounds vary?
70+
var/sound_vary = FALSE
6971

7072
var/w_class = WEIGHT_CLASS_NORMAL
7173
var/slot_flags = 0 //This is used to determine on which slots an item can fit.
@@ -528,7 +530,7 @@ GLOBAL_VAR_INIT(rpg_loot_items, FALSE)
528530
item_flags &= ~IN_INVENTORY
529531
SEND_SIGNAL(src, COMSIG_ITEM_DROPPED,user)
530532
if(!silent)
531-
playsound(src, drop_sound, DROP_SOUND_VOLUME, ignore_walls = FALSE)
533+
playsound(src, drop_sound, DROP_SOUND_VOLUME, vary = sound_vary, ignore_walls = FALSE)
532534

533535

534536
// called just as an item is picked up (loc is not yet changed)

code/game/objects/items/tanks/tanks.dm

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,9 @@
66
flags_1 = CONDUCT_1
77
slot_flags = ITEM_SLOT_BACK
88
hitsound = 'sound/weapons/smash.ogg'
9+
pickup_sound = 'sound/items/gas_tank_pick_up.ogg'
10+
drop_sound = 'sound/items/gas_tank_drop.ogg'
11+
sound_vary = TRUE
912
pressure_resistance = ONE_ATMOSPHERE * 5
1013
force = 5
1114
throwforce = 10

sound/items/attributions.txt

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
2+
{
3+
gas_tank_drop.ogg
4+
gas_tank_pick_up.ogg
5+
} - https://freesound.org/people/Globofonia/sounds/698346/ , License CC0
6+
edited by grungussuss

sound/items/gas_tank_drop.ogg

10.4 KB
Binary file not shown.

sound/items/gas_tank_pick_up.ogg

9.99 KB
Binary file not shown.

0 commit comments

Comments
 (0)