Merge pull request #2637 from Citadel-Station-13/upstream-merge-30426
[MIRROR] Fixes swarmers breaking the SM's containment
This commit is contained in:
@@ -257,10 +257,15 @@
|
||||
/obj/machinery/door/swarmer_act(mob/living/simple_animal/hostile/swarmer/S)
|
||||
var/isonshuttle = istype(get_area(src), /area/shuttle)
|
||||
for(var/turf/T in range(1, src))
|
||||
if(isspaceturf(T) || (!isonshuttle && (istype(T.loc, /area/shuttle) || istype(T.loc, /area/space))) || (isonshuttle && !istype(T.loc, /area/shuttle)))
|
||||
var/area/A = get_area(T)
|
||||
if(isspaceturf(T) || (!isonshuttle && (istype(A, /area/shuttle) || istype(A, /area/space))) || (isonshuttle && !istype(A, /area/shuttle)))
|
||||
to_chat(S, "<span class='warning'>Destroying this object has the potential to cause a hull breach. Aborting.</span>")
|
||||
S.target = null
|
||||
return FALSE
|
||||
else if(istype(A, /area/engine/supermatter))
|
||||
to_chat(S, "<span class='warning'>Disrupting the containment of a supermatter crystal would not be to our benefit. Aborting.</span>")
|
||||
S.target = null
|
||||
return FALSE
|
||||
S.DisIntegrate(src)
|
||||
return TRUE
|
||||
|
||||
@@ -344,19 +349,29 @@
|
||||
/turf/closed/wall/swarmer_act(mob/living/simple_animal/hostile/swarmer/S)
|
||||
var/isonshuttle = istype(loc, /area/shuttle)
|
||||
for(var/turf/T in range(1, src))
|
||||
if(isspaceturf(T) || (!isonshuttle && (istype(T.loc, /area/shuttle) || istype(T.loc, /area/space))) || (isonshuttle && !istype(T.loc, /area/shuttle)))
|
||||
var/area/A = get_area(T)
|
||||
if(isspaceturf(T) || (!isonshuttle && (istype(A, /area/shuttle) || istype(A, /area/space))) || (isonshuttle && !istype(A, /area/shuttle)))
|
||||
to_chat(S, "<span class='warning'>Destroying this object has the potential to cause a hull breach. Aborting.</span>")
|
||||
S.target = null
|
||||
return TRUE
|
||||
else if(istype(A, /area/engine/supermatter))
|
||||
to_chat(S, "<span class='warning'>Disrupting the containment of a supermatter crystal would not be to our benefit. Aborting.</span>")
|
||||
S.target = null
|
||||
return TRUE
|
||||
return ..()
|
||||
|
||||
/obj/structure/window/swarmer_act(mob/living/simple_animal/hostile/swarmer/S)
|
||||
var/isonshuttle = istype(get_area(src), /area/shuttle)
|
||||
for(var/turf/T in range(1, src))
|
||||
if(isspaceturf(T) || (!isonshuttle && (istype(T.loc, /area/shuttle) || istype(T.loc, /area/space))) || (isonshuttle && !istype(T.loc, /area/shuttle)))
|
||||
var/area/A = get_area(T)
|
||||
if(isspaceturf(T) || (!isonshuttle && (istype(A, /area/shuttle) || istype(A, /area/space))) || (isonshuttle && !istype(A, /area/shuttle)))
|
||||
to_chat(S, "<span class='warning'>Destroying this object has the potential to cause a hull breach. Aborting.</span>")
|
||||
S.target = null
|
||||
return TRUE
|
||||
else if(istype(A, /area/engine/supermatter))
|
||||
to_chat(S, "<span class='warning'>Disrupting the containment of a supermatter crystal would not be to our benefit. Aborting.</span>")
|
||||
S.target = null
|
||||
return TRUE
|
||||
return ..()
|
||||
|
||||
/obj/item/stack/cable_coil/swarmer_act(mob/living/simple_animal/hostile/swarmer/S)//Wiring would be too effective as a resource
|
||||
|
||||
Reference in New Issue
Block a user