mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-01-15 19:46:38 +00:00
Changing the mech melee attack code to be more object oriented. Creating mech_melee_attack() proc for atom and overidden in its children. Mechs can now hit windoors with their melee attack. (they can still open them by bumping)
31 lines
601 B
Plaintext
31 lines
601 B
Plaintext
/obj/structure
|
|
icon = 'icons/obj/structures.dmi'
|
|
|
|
/obj/structure/blob_act()
|
|
if(prob(50))
|
|
qdel(src)
|
|
|
|
/obj/structure/ex_act(severity)
|
|
switch(severity)
|
|
if(1.0)
|
|
qdel(src)
|
|
return
|
|
if(2.0)
|
|
if(prob(50))
|
|
qdel(src)
|
|
return
|
|
if(3.0)
|
|
return
|
|
|
|
/obj/structure/Destroy()
|
|
if(opacity)
|
|
UpdateAffectingLights()
|
|
..()
|
|
|
|
/obj/structure/mech_melee_attack(obj/mecha/M)
|
|
if(M.damtype == "brute")
|
|
M.occupant_message("<span class='danger'>You hit [src].</span>")
|
|
visible_message("<span class='danger'>[src] has been hit by [M.name].</span>")
|
|
return 1
|
|
return 0
|