mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-22 11:37:40 +01:00
Merge remote-tracking branch 'upstream/master' into fix-bundle-4
This commit is contained in:
@@ -26,6 +26,7 @@ GLOBAL_VAR_INIT(observer_default_invisibility, INVISIBILITY_OBSERVER)
|
||||
var/image/ghostimage = null //this mobs ghost image, for deleting and stuff
|
||||
var/ghostvision = TRUE //is the ghost able to see things humans can't?
|
||||
var/seedarkness = TRUE
|
||||
var/seerads = FALSE // can the ghost see radiation?
|
||||
/// Defines from __DEFINES/hud.dm go here based on which huds the ghost has activated.
|
||||
var/list/data_hud_seen = list()
|
||||
var/ghost_orbit = GHOST_ORBIT_CIRCLE
|
||||
@@ -87,7 +88,7 @@ GLOBAL_VAR_INIT(observer_default_invisibility, INVISIBILITY_OBSERVER)
|
||||
real_name = name
|
||||
|
||||
//starts ghosts off with all HUDs.
|
||||
toggle_all_huds_on()
|
||||
toggle_all_huds_on(body)
|
||||
..()
|
||||
|
||||
/mob/dead/observer/Destroy()
|
||||
@@ -98,6 +99,8 @@ GLOBAL_VAR_INIT(observer_default_invisibility, INVISIBILITY_OBSERVER)
|
||||
if(orbit_menu)
|
||||
SStgui.close_uis(orbit_menu)
|
||||
QDEL_NULL(orbit_menu)
|
||||
if (seerads)
|
||||
STOP_PROCESSING(SSobj, src)
|
||||
return ..()
|
||||
|
||||
/mob/dead/observer/examine(mob/user)
|
||||
@@ -105,6 +108,10 @@ GLOBAL_VAR_INIT(observer_default_invisibility, INVISIBILITY_OBSERVER)
|
||||
if(!invisibility)
|
||||
. += "It seems extremely obvious."
|
||||
|
||||
/mob/dead/observer/process()
|
||||
if(seerads)
|
||||
show_rads(5)
|
||||
|
||||
// This seems stupid, but it's the easiest way to avoid absolutely ridiculous shit from happening
|
||||
// Copying an appearance directly from a mob includes it's verb list, it's invisibility, it's alpha, and it's density
|
||||
// You might recognize these things as "fucking ridiculous to put in an appearance"
|
||||
@@ -323,10 +330,31 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp
|
||||
return
|
||||
GLOB.ghost_hud_panel.ui_interact(src)
|
||||
|
||||
/mob/dead/observer/proc/toggle_all_huds_on()
|
||||
/**
|
||||
* Toggles on all HUDs for the ghost player.
|
||||
*
|
||||
* Enables antag HUD only if the ghost belongs to an admin.
|
||||
*
|
||||
* Arguments:
|
||||
* * user - A reference to the ghost's old mob. This argument is required since `src` does not have a `client` at this point.
|
||||
*/
|
||||
/mob/dead/observer/proc/toggle_all_huds_on(mob/user)
|
||||
show_me_the_hud(DATA_HUD_DIAGNOSTIC)
|
||||
show_me_the_hud(DATA_HUD_SECURITY_ADVANCED)
|
||||
show_me_the_hud(DATA_HUD_MEDICAL_ADVANCED)
|
||||
if(!check_rights((R_ADMIN | R_MOD), FALSE, user))
|
||||
return
|
||||
antagHUD = TRUE
|
||||
for(var/datum/atom_hud/antag/H in GLOB.huds)
|
||||
H.add_hud_to(src)
|
||||
|
||||
/mob/dead/observer/proc/set_radiation_view(enabled)
|
||||
if (enabled)
|
||||
seerads = TRUE
|
||||
START_PROCESSING(SSobj, src)
|
||||
else
|
||||
seerads = FALSE
|
||||
STOP_PROCESSING(SSobj, src)
|
||||
|
||||
/mob/dead/observer/verb/set_dnr()
|
||||
set name = "Set DNR"
|
||||
@@ -719,6 +747,10 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp
|
||||
if(mind)
|
||||
mind.active = TRUE
|
||||
mind.transfer_to(new_char)
|
||||
if(mind.vampire)
|
||||
mind.vampire.owner = new_char
|
||||
mind.vampire.powers.Cut()
|
||||
mind.vampire.check_vampire_upgrade(FALSE)
|
||||
else
|
||||
new_char.key = key
|
||||
|
||||
|
||||
Reference in New Issue
Block a user