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:
phil235
2014-11-03 21:40:25 +01:00
parent 47c2e9339b
commit 9c11d9fa25
11 changed files with 153 additions and 104 deletions
+12 -5
View File
@@ -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