diff --git a/code/_onclick/hud/_defines.dm b/code/_onclick/hud/_defines.dm index dc6dfd37cea7..c996c0f8b294 100644 --- a/code/_onclick/hud/_defines.dm +++ b/code/_onclick/hud/_defines.dm @@ -160,7 +160,7 @@ #define ui_pai_view_images "SOUTH:6,WEST+13" //Ghosts -#define ui_ghost_jumptomob "SOUTH:6,CENTER-3:24" +#define ui_ghost_respawn "SOUTH:6,CENTER-3:24" #define ui_ghost_orbit "SOUTH:6,CENTER-2:24" #define ui_ghost_reenter_corpse "SOUTH:6,CENTER-1:24" #define ui_ghost_teleport "SOUTH:6,CENTER:24" diff --git a/code/_onclick/hud/ghost.dm b/code/_onclick/hud/ghost.dm index 9c96a3f5cf18..d1c7cb81ca7d 100644 --- a/code/_onclick/hud/ghost.dm +++ b/code/_onclick/hud/ghost.dm @@ -5,6 +5,7 @@ . = ..() flick(icon_state + "_anim", src) +/* /atom/movable/screen/ghost/jumptomob name = "Jump to mob" icon_state = "jumptomob" @@ -12,6 +13,15 @@ /atom/movable/screen/ghost/jumptomob/Click() var/mob/dead/observer/G = usr G.jumptomob() +*/ + +/atom/movable/screen/ghost/respawn + name = "Respawn" + icon_state = "respawn" + +/atom/movable/screen/ghost/respawn/Click() + var/mob/dead/observer/G = usr + G.respawn() /atom/movable/screen/ghost/orbit name = "Orbit" @@ -58,8 +68,8 @@ ..() var/atom/movable/screen/using - using = new /atom/movable/screen/ghost/jumptomob() - using.screen_loc = ui_ghost_jumptomob + using = new /atom/movable/screen/ghost/respawn() + using.screen_loc = ui_ghost_respawn using.hud = src static_inventory += using diff --git a/code/modules/mob/dead/observer/observer.dm b/code/modules/mob/dead/observer/observer.dm index e79427f2381d..bf6c63790cb1 100644 --- a/code/modules/mob/dead/observer/observer.dm +++ b/code/modules/mob/dead/observer/observer.dm @@ -520,6 +520,13 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp else to_chat(A, "This mob is not located in the game world.") +/mob/dead/observer/verb/respawn() + if(can_reenter_corpse && client?.holder) + var/poll_client = tgui_alert(usr, "Returning to the title screen will forfeit any possible revival. Are you sure?", "Confirmation", list("Yes", "No")) + if(poll_client == "No") + return + abandon_mob() + /mob/dead/observer/verb/change_view_range() set category = "Ghost" set name = "View Range" diff --git a/icons/hud/screen_ghost.dmi b/icons/hud/screen_ghost.dmi index 663cf91e3622..1bd2be6e4144 100644 Binary files a/icons/hud/screen_ghost.dmi and b/icons/hud/screen_ghost.dmi differ