Lots of fixes for Mechs (#7692)

Spent lots of time and lots of changes to fix issues:

    bugfix: "Mechs no longer runtime during destroy call."

    bugfix: "Turrets and NPCS no longer target empty mechs."

    bugfix: "Mechs no longer runtime during armor check. Mechs now use their armor and values for it. Before it would ignore them entirely and deal 100% damage."

    Added ismech() define and also QDEL_NULL_LIST() define from TG. Matt's suggestion

    renamed any armour references in mech code to armor to keep it consistent
This commit is contained in:
Mykhailo Bykhovtsev
2019-12-17 17:28:31 +02:00
committed by Erki
parent 6210e2bb44
commit a4a6fb5f03
19 changed files with 102 additions and 53 deletions
@@ -339,6 +339,11 @@ mob/living/simple_animal/hostile/hitby(atom/movable/AM as mob|obj,var/speed = TH
//////////////////////////////
/mob/living/simple_animal/hostile/proc/validator_living(var/mob/living/L, var/atom/current)
if(ismech(L))
var/mob/living/heavy_vehicle/M = L
if(!M.pilots?.len)
return FALSE
if((L.faction == src.faction) && !attack_same)
return FALSE
if(L in friends)