mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-23 12:07:27 +01:00
Melee attack for mechs
This commit is contained in:
@@ -110,7 +110,12 @@
|
||||
health -= M.melee_damage_upper
|
||||
healthcheck()
|
||||
return
|
||||
|
||||
|
||||
/obj/structure/grille/mech_melee_attack(obj/mecha/M)
|
||||
if(..())
|
||||
playsound(loc, 'sound/effects/grillehit.ogg', 80, 1)
|
||||
health -= M.force * 0.5
|
||||
healthcheck()
|
||||
|
||||
/obj/structure/grille/CanPass(atom/movable/mover, turf/target, height=0, air_group=0)
|
||||
if(air_group || (height==0)) return 1
|
||||
|
||||
@@ -313,6 +313,11 @@ var/global/wcColored
|
||||
..()
|
||||
return
|
||||
|
||||
|
||||
/obj/structure/window/mech_melee_attack(obj/mecha/M)
|
||||
if(..())
|
||||
hit(M.force, 1)
|
||||
|
||||
/obj/structure/window/proc/hit(var/damage, var/sound_effect = 1)
|
||||
if(reinf) damage *= 0.5
|
||||
health = max(0, health - damage)
|
||||
|
||||
Reference in New Issue
Block a user