mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-10 18:22:39 +00:00
Code cleanup.
This commit is contained in:
@@ -162,15 +162,9 @@
|
||||
if(istype(user, /mob/living/carbon/alien/humanoid) || istype(user, /mob/living/carbon/slime/adult))
|
||||
if(src.operating)
|
||||
return
|
||||
src.health = max(0, src.health - 25)
|
||||
playsound(src.loc, 'sound/effects/Glasshit.ogg', 75, 1)
|
||||
visible_message("\red <B>[user] smashes against the [src.name].</B>", 1)
|
||||
if (src.health <= 0)
|
||||
new /obj/item/weapon/shard(src.loc)
|
||||
var/obj/item/weapon/cable_coil/CC = new /obj/item/weapon/cable_coil(src.loc)
|
||||
CC.amount = 2
|
||||
src.density = 0
|
||||
del(src)
|
||||
take_damage(25)
|
||||
else
|
||||
return src.attack_hand(user)
|
||||
|
||||
@@ -202,16 +196,10 @@
|
||||
//If it's a weapon, smash windoor. Unless it's an id card, agent card, ect.. then ignore it (Cards really shouldnt damage a door anyway)
|
||||
if(src.density && istype(I, /obj/item/weapon) && !istype(I, /obj/item/weapon/card))
|
||||
var/aforce = I.force
|
||||
if(I.damtype == BRUTE || I.damtype == BURN)
|
||||
src.health = max(0, src.health - aforce)
|
||||
playsound(src.loc, 'sound/effects/Glasshit.ogg', 75, 1)
|
||||
visible_message("\red <B>[src] was hit by [I].</B>")
|
||||
if (src.health <= 0)
|
||||
new /obj/item/weapon/shard(src.loc)
|
||||
var/obj/item/weapon/cable_coil/CC = new /obj/item/weapon/cable_coil(src.loc)
|
||||
CC.amount = 2
|
||||
src.density = 0
|
||||
del(src)
|
||||
if(I.damtype == BRUTE || I.damtype == BURN)
|
||||
take_damage(aforce)
|
||||
return
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user