Skip to content

Commit

Permalink
replaces jumptomob with respawn on the ghost hud
Browse files Browse the repository at this point in the history
  • Loading branch information
Thera-Pissed committed Jan 19, 2025
1 parent f77b347 commit a677bc8
Show file tree
Hide file tree
Showing 5 changed files with 23 additions and 6 deletions.
2 changes: 1 addition & 1 deletion code/_onclick/hud/_defines.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
14 changes: 12 additions & 2 deletions code/_onclick/hud/ghost.dm
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,23 @@
. = ..()
flick(icon_state + "_anim", src)

/*
/atom/movable/screen/ghost/jumptomob
name = "Jump to mob"
icon_state = "jumptomob"
/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"
Expand Down Expand Up @@ -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

Expand Down
7 changes: 7 additions & 0 deletions code/modules/mob/dead/observer/observer.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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, "<span class='danger'>This mob is not located in the game world.</span>")

/mob/dead/observer/verb/respawn()
if(can_reenter_corpse && client?.holder)
var/poll_client = tgui_alert(usr, "Would you like to return to the title screen? You will be unable to be revived.", "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"
Expand Down
Binary file modified icons/hud/screen_ghost.dmi
Binary file not shown.
6 changes: 3 additions & 3 deletions shiptest.dme
Original file line number Diff line number Diff line change
Expand Up @@ -200,8 +200,8 @@
#include "code\__HELPERS\game.dm"
#include "code\__HELPERS\generators.dm"
#include "code\__HELPERS\global_lists.dm"
#include "code\__HELPERS\hearted.dm"
#include "code\__HELPERS\heap.dm"
#include "code\__HELPERS\hearted.dm"
#include "code\__HELPERS\icon_smoothing.dm"
#include "code\__HELPERS\icons.dm"
#include "code\__HELPERS\level_traits.dm"
Expand Down Expand Up @@ -3302,8 +3302,6 @@
#include "code\modules\ruins\objects_and_mobs\ash_walker_den.dm"
#include "code\modules\ruins\objects_and_mobs\necropolis_gate.dm"
#include "code\modules\ruins\objects_and_mobs\sin_ruins.dm"
#include "code\modules\ruins\rockplanet_ruin_code\mining_base.dm"
#include "code\modules\ruins\sandplanet_ruin_code\cave_base.dm"
#include "code\modules\ruins\objects_and_mobs\generic_hazards\hazard_info.dm"
#include "code\modules\ruins\objects_and_mobs\generic_hazards\hazard_code\_hazard.dm"
#include "code\modules\ruins\objects_and_mobs\generic_hazards\hazard_code\_shutoff.dm"
Expand All @@ -3317,6 +3315,8 @@
#include "code\modules\ruins\objects_and_mobs\generic_hazards\hazards\generic_electrical.dm"
#include "code\modules\ruins\objects_and_mobs\generic_hazards\hazards\radioactive_barrels.dm"
#include "code\modules\ruins\objects_and_mobs\generic_hazards\hazards\water_hazard.dm"
#include "code\modules\ruins\rockplanet_ruin_code\mining_base.dm"
#include "code\modules\ruins\sandplanet_ruin_code\cave_base.dm"
#include "code\modules\ruins\spaceruin_code\bigderelict1.dm"
#include "code\modules\ruins\spaceruin_code\TheDerelict.dm"
#include "code\modules\ruins\wasteplanet_ruin_code\tradepost.dm"
Expand Down

0 comments on commit a677bc8

Please sign in to comment.