mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-25 22:19:30 +01:00
All mechs have a melee attack now, the force of non combat mechs is 5.
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)
This commit is contained in:
@@ -1,11 +1,11 @@
|
||||
obj/structure
|
||||
/obj/structure
|
||||
icon = 'icons/obj/structures.dmi'
|
||||
|
||||
obj/structure/blob_act()
|
||||
/obj/structure/blob_act()
|
||||
if(prob(50))
|
||||
qdel(src)
|
||||
|
||||
obj/structure/ex_act(severity)
|
||||
/obj/structure/ex_act(severity)
|
||||
switch(severity)
|
||||
if(1.0)
|
||||
qdel(src)
|
||||
@@ -17,7 +17,14 @@ obj/structure/ex_act(severity)
|
||||
if(3.0)
|
||||
return
|
||||
|
||||
obj/structure/Destroy()
|
||||
/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
|
||||
|
||||
Reference in New Issue
Block a user