Merge pull request #4383 from IK3I/Pod-Refactor

[Ready for Review] Pod refactor and fixes
This commit is contained in:
TheDZD
2016-05-31 20:48:05 -04:00
17 changed files with 522 additions and 373 deletions
@@ -118,8 +118,8 @@
return 1
if(istype(the_target, /obj/spacepod))
var/obj/spacepod/S = the_target
if(S.occupant || S.occupant2)//Just so we don't attack empty mechs
if(CanAttack(S.occupant) || CanAttack(S.occupant2))
if(S.pilot) //Just so we don't attack empty pods
if(CanAttack(S.pilot))
return 1
if(isliving(the_target))
var/mob/living/L = the_target
@@ -14,7 +14,7 @@
return A
else if(istype(A, /obj/spacepod))
var/obj/spacepod/M = A
if(M.occupant || M.occupant2)
if(M.pilot)
return A
/mob/living/simple_animal/hostile/retaliate/ListTargets()
@@ -47,9 +47,9 @@
enemies |= M.occupant
else if(istype(A, /obj/spacepod))
var/obj/spacepod/M = A
if(M.occupant || M.occupant2)
if(M.pilot)
enemies |= M
enemies |= M.occupant
enemies |= M.pilot
for(var/mob/living/simple_animal/hostile/retaliate/H in around)
var/retaliate_faction_check = 0
@@ -536,7 +536,7 @@
return 0
if (istype(the_target,/obj/spacepod))
var/obj/spacepod/S = the_target
if (S.occupant || S.occupant2)
if (S.pilot)
return 0
return 1