Cryopod naming fixes.

Fixes issue where the cryopod name would not update if left willingly.
Fixes issue where the cryopod name would not update if forced inside.
This commit is contained in:
PsiOmega
2015-03-19 20:10:51 +01:00
parent 45971dfcc1
commit 44c8b03fcd

View File

@@ -398,10 +398,9 @@
announce.autosay("[occupant.real_name] [on_store_message]", "[on_store_name]")
visible_message("<span class='notice'>\The [src] hums and hisses as it moves [occupant.real_name] into storage.</span>", 3)
set_occupant(null)
// Delete the mob.
del(occupant)
occupant = null
name = initial(name)
/obj/machinery/cryopod/attackby(var/obj/item/weapon/G as obj, var/mob/user as mob)
@@ -448,7 +447,7 @@
M << "<span class='notice'>[on_enter_occupant_message]</span>"
M << "<span class='notice'><b>If you ghost, log out or close your client now, your character will shortly be permanently removed from the round.</b></span>"
occupant = M
set_occupant(M)
time_entered = world.time
// Book keeping!
@@ -517,7 +516,7 @@
usr.client.perspective = EYE_PERSPECTIVE
usr.client.eye = src
usr.loc = src
src.occupant = usr
set_occupant(usr)
if(orient_right)
icon_state = "[occupied_icon_state]-r"
@@ -526,11 +525,10 @@
usr << "<span class='notice'>[on_enter_occupant_message]</span>"
usr << "<span class='notice'><b>If you ghost, log out or close your client now, your character will shortly be permanently removed from the round.</b></span>"
occupant = usr
time_entered = world.time
src.add_fingerprint(usr)
name = "[name] ([usr.name])"
return
@@ -544,7 +542,7 @@
occupant.client.perspective = MOB_PERSPECTIVE
occupant.loc = get_turf(src)
occupant = null
set_occupant(null)
if(orient_right)
icon_state = "[base_icon_state]-r"
@@ -553,6 +551,12 @@
return
/obj/machinery/cryopod/proc/set_occupant(var/occupant)
src.occupant = occupant
name = initial(name)
if(occupant)
name = "[name] ([occupant])]"
//Attacks/effects.
/obj/machinery/cryopod/blob_act()