mirror of
https://github.com/yogstation13/Yogstation.git
synced 2025-02-26 09:04:50 +00:00
* Initial conversion * Fixed cryopods * It compiles, yay * Removes cowbot's bad variables * Small fixes * Tweaked epsilon * Fix build * Switches to using defines * Nuke old file, fix typo * Add proper comment to epsilon
60 lines
1.4 KiB
Plaintext
60 lines
1.4 KiB
Plaintext
/mob/living/silicon/ai/death(gibbed)
|
|
if(stat == DEAD)
|
|
return
|
|
|
|
. = ..()
|
|
|
|
cut_overlays() //remove portraits
|
|
var/old_icon = icon_state
|
|
if("[icon_state]_dead" in icon_states(icon))
|
|
icon_state = "[icon_state]_dead"
|
|
else
|
|
icon_state = "ai_dead"
|
|
if("[old_icon]_death_transition" in icon_states(icon))
|
|
flick("[old_icon]_death_transition", src)
|
|
|
|
cameraFollow = null
|
|
|
|
anchored = FALSE //unbolt floorbolts
|
|
if(eyeobj)
|
|
eyeobj.setLoc(get_turf(src))
|
|
set_eyeobj_visible(FALSE)
|
|
|
|
|
|
GLOB.shuttle_caller_list -= src
|
|
SSshuttle.autoEvac()
|
|
|
|
ShutOffDoomsdayDevice()
|
|
|
|
GLOB.ai_os.remove_ai(src)
|
|
|
|
if(explosive)
|
|
spawn(10)
|
|
explosion(src.loc, 3, 6, 12, 15)
|
|
|
|
if(src.key)
|
|
for(var/each in GLOB.ai_status_displays) //change status
|
|
var/obj/machinery/status_display/ai/O = each
|
|
O.mode = 2
|
|
O.update()
|
|
|
|
if(istype(loc, /obj/item/aicard/aitater))
|
|
loc.icon_state = "aitater-404"
|
|
else if(istype(loc, /obj/item/aicard/aispook))
|
|
loc.icon_state = "aispook-404"
|
|
else if(istype(loc, /obj/item/aicard))
|
|
loc.icon_state = "aicard-404"
|
|
|
|
/mob/living/silicon/ai/proc/ShutOffDoomsdayDevice()
|
|
if(nuking)
|
|
SSsecurity_level.set_level(SEC_LEVEL_RED)
|
|
nuking = FALSE
|
|
for(var/obj/item/pinpointer/nuke/P in GLOB.pinpointer_list)
|
|
P.switch_mode_to(TRACK_NUKE_DISK) //Party's over, back to work, everyone
|
|
P.alert = FALSE
|
|
|
|
if(doomsday_device)
|
|
doomsday_device.timing = FALSE
|
|
SSshuttle.clearHostileEnvironment(doomsday_device)
|
|
qdel(doomsday_device)
|