* Fixes #11409
Fixes #11409 and anything else with an occupant variable that didn't handle this

* Removes extra ()

* Removes extra ()

* Removes extra ()

* Removes extra ()
This commit is contained in:
DrCelt
2017-01-14 23:34:55 +00:00
committed by Probe1
parent 0ae00a9eea
commit 01b23e160f
5 changed files with 26 additions and 17 deletions

View File

@@ -124,7 +124,8 @@
if(!occupant)
for(var/mob/M in src)//Failsafe so you can get mobs out
M.forceMove(get_turf(src))
if(!M.gcDestroyed)
M.forceMove(get_turf(src))
/obj/machinery/dna_scannernew/verb/move_inside()
set src in oview(1)
@@ -152,7 +153,6 @@
src.occupant = usr
src.icon_state = "scanner_1"
src.add_fingerprint(usr)
return
/obj/machinery/dna_scannernew/MouseDrop_T(atom/movable/O as mob|obj, mob/user as mob)
if(!ismob(O)) //mobs only
@@ -287,8 +287,9 @@
if(locked)
visible_message("Can't eject occupants while \the [src] is locked.")
return 0
occupant.forceMove(exit)
occupant.reset_view()
if(!occupant.gcDestroyed)
occupant.forceMove(exit)
occupant.reset_view()
occupant = null
icon_state = "scanner_0"

View File

@@ -532,8 +532,9 @@
if(x in component_parts)
continue
x.forceMove(src.loc)
occupant.forceMove(exit)
occupant.reset_view()
if(!occupant.gcDestroyed)
occupant.forceMove(exit)
occupant.reset_view()
occupant = null
update_icon()
return 1
@@ -771,7 +772,7 @@
if(connected.automatic && connected.occupant && !connected.on)
connected.cook("Thermoregulate")
if(!connected.on)
else if(!src || !connected || !connected.occupant || connected.occupant.loc != connected) //Check if someone's released/replaced/bombed him already
else if(!src || !connected || !connected.occupant || connected.occupant.loc != connected || connected.occupant.gcDestroyed) //Check if someone's released/replaced/bombed him already
connected.occupant = null
connected.on = 0
connected.update_icon()

View File

@@ -219,12 +219,12 @@
continue
x.forceMove(src.loc)
src.occupant.forceMove(exit)
src.occupant.reset_view()
src.occupant = null
if(!occupant.gcDestroyed)
occupant.forceMove(exit)
occupant.reset_view()
occupant = null
update_icon()
set_light(0)
return
/obj/machinery/bodyscanner/crowbarDestroy(mob/user)
if(occupant)

View File

@@ -238,11 +238,12 @@
return
//for(var/obj/O in src)
// O.loc = src.loc
if (src.occupant.client)
src.occupant.client.eye = src.occupant.client.mob
src.occupant.client.perspective = MOB_PERSPECTIVE
src.occupant.forceMove(src.loc)
src.occupant = null
if(!occupant.gcDestroyed)
if (occupant.client)
occupant.client.eye = occupant.client.mob
occupant.client.perspective = MOB_PERSPECTIVE
occupant.forceMove(src.loc)
occupant = null
build_icon()
src.use_power = 1
// Removes dropped items/magically appearing mobs from the charger too

View File

@@ -85,7 +85,7 @@
HELMET_TYPE = null
MASK_TYPE = null
BOOT_TYPE = null
/obj/machinery/suit_storage_unit/meteor_eod //Used for meteor rounds
SUIT_TYPE = /obj/item/clothing/suit/bomb_suit
HELMET_TYPE = /obj/item/clothing/head/bomb_hood
@@ -452,6 +452,12 @@
if (!src.OCCUPANT)
return
if(OCCUPANT.gcDestroyed)
update_icon()
isopen = 1
OCCUPANT = null
return
// for(var/obj/O in src)
// O.loc = src.loc