Immersive Vine Gameplay (#10052)

Added sounds and an animation to hitting space vines.
    Sharp or edged items now deal double damage against vines, which makes high damage weapons better for vine clearing.
    Attacking plants no longer produces a visible message.
This commit is contained in:
Geeves
2020-09-27 15:11:35 +03:00
committed by GitHub
parent 6a7e26225c
commit 1e322fcfb4
2 changed files with 14 additions and 4 deletions
@@ -238,8 +238,8 @@
return 1
/obj/effect/plant/attackby(var/obj/item/W, var/mob/user)
user.setClickCooldown(DEFAULT_ATTACK_COOLDOWN)
user.do_attack_animation(src)
SSplants.add_plant(src)
if(W.iswirecutter() || istype(W, /obj/item/surgery/scalpel))
@@ -261,9 +261,11 @@
health -= (rand(3,5)*5)
sampled = 1
else
..()
if(W.force)
health -= W.force
playsound(loc, /decl/sound_category/wood_break_sound, 50, TRUE)
var/damage = W.force ? W.force : 1 //always do at least a little damage
if(W.edge || W.sharp)
damage *= 2
health -= damage
check_health()
/obj/effect/plant/ex_act(severity)