w hitsound

This commit is contained in:
keronshb
2021-11-10 16:49:18 -05:00
parent efd12e4fd5
commit 0aceecee2e
+2 -2
View File
@@ -16,11 +16,11 @@
if(log_amount && (!(flags_1 & NODECONSTRUCT_1)))
if(W.sharpness && W.force > 0)
if(W.hitsound)
playsound(get_turf(src), 'modular_citadel/code/modules/eventmaps/Spookystation/woodchop.ogg', 100, 0, 0)
playsound(get_turf(src), W.hitsound, 100, 0, 0)
user.visible_message("<span class='notice'>[user] begins to cut down [src] with [W].</span>","<span class='notice'>You begin to cut down [src] with [W].</span>", "You hear the sound of sawing.")
if(do_after(user, 1000/W.force, target = src)) //5 seconds with 20 force, 8 seconds with a hatchet, 20 seconds with a shard.
user.visible_message("<span class='notice'>[user] fells [src] with the [W].</span>","<span class='notice'>You fell [src] with the [W].</span>", "You hear the sound of a tree falling.")
playsound(get_turf(src), 'modular_citadel/code/modules/eventmaps/Spookystation/treefall.ogg', 100 , 0, 0)
playsound(get_turf(src), 'sound/effects/meteorimpact.ogg', 100 , 0, 0)
for(var/i=1 to log_amount)
new /obj/item/grown/log/tree(get_turf(src))