Makes pAI's die in a consistent way

This commit is contained in:
Tastyfish
2016-05-17 09:25:30 -04:00
parent e60ba418d0
commit eb273cf76e
2 changed files with 28 additions and 25 deletions
+11 -11
View File
@@ -1,15 +1,15 @@
/mob/living/silicon/pai/death(gibbed)
if(stat == DEAD) return
if(canmove || resting)
var/turf/T = get_turf_or_move(loc)
for (var/mob/M in viewers(T))
M.show_message("\red [src] emits a dull beep before it loses power and collapses.", 3, "\red You hear a dull beep followed by the sound of glass crunching.", 2)
name = "pAI debris"
desc = "The unfortunate remains of some poor personal AI device."
icon_state = "[chassis]_dead"
else
card.overlays.Cut()
card.overlays += "pai-off"
if(stat == DEAD)
return
force_fold_out()
var/turf/T = get_turf_or_move(loc)
for (var/mob/M in viewers(T))
M.show_message("\red [src] emits a dull beep before it loses power and collapses.", 3, "\red You hear a dull beep followed by the sound of glass crunching.", 2)
name = "pAI debris"
desc = "The unfortunate remains of some poor personal AI device."
icon_state = "[chassis]_dead"
stat = DEAD
canmove = 0
sight |= SEE_TURFS|SEE_MOBS|SEE_OBJS
+17 -14
View File
@@ -351,24 +351,27 @@
last_special = world.time + 200
//I'm not sure how much of this is necessary, but I would rather avoid issues.
if(istype(card.loc,/mob))
var/mob/holder = card.loc
holder.unEquip(card)
else if(istype(card.loc,/obj/item/device/pda))
var/obj/item/device/pda/holder = card.loc
holder.pai = null
src.client.perspective = EYE_PERSPECTIVE
src.client.eye = src
src.forceMove(get_turf(card))
card.forceMove(src)
card.screen_loc = null
force_fold_out()
var/turf/T = get_turf(src)
if(istype(T)) T.visible_message("<b>[src]</b> folds outwards, expanding into a mobile form.")
/mob/living/silicon/pai/proc/force_fold_out()
if(istype(card.loc, /mob))
var/mob/holder = card.loc
holder.unEquip(card)
else if(istype(card.loc, /obj/item/device/pda))
var/obj/item/device/pda/holder = card.loc
holder.pai = null
if(client)
client.perspective = EYE_PERSPECTIVE
client.eye = src
forceMove(get_turf(card))
card.forceMove(src)
card.screen_loc = null
/mob/living/silicon/pai/verb/fold_up()
set category = "pAI Commands"
set name = "Collapse Chassis"