Makes all global variables handled by the GLOB controller (#13152)

* Handlers converted, now to fix 3532 compile errors

* 3532 compile fixes later, got runtimes on startup

* Well the server loads now atleast

* Take 2

* Oops
This commit is contained in:
AffectedArc07
2020-03-21 03:56:37 +00:00
committed by GitHub
parent c8dbd0190e
commit 210f8badf4
667 changed files with 4243 additions and 4240 deletions
+1 -1
View File
@@ -1,6 +1,6 @@
/mob/dead/observer/Logout()
if(client)
client.images -= ghost_images
client.images -= GLOB.ghost_images
..()
spawn(0)
if(src && !key) //we've transferred to another mob. This ghost should be deleted.
+14 -14
View File
@@ -1,7 +1,7 @@
#define GHOST_CAN_REENTER 1
#define GHOST_IS_OBSERVER 2
var/list/image/ghost_images = list()
GLOBAL_LIST_EMPTY(ghost_images)
GLOBAL_VAR_INIT(observer_default_invisibility, INVISIBILITY_OBSERVER)
@@ -75,10 +75,10 @@ GLOBAL_VAR_INIT(observer_default_invisibility, INVISIBILITY_OBSERVER)
ghostimage.appearance_flags |= KEEP_TOGETHER
ghostimage.alpha = alpha
appearance_flags |= KEEP_TOGETHER
ghost_images |= ghostimage
GLOB.ghost_images |= ghostimage
updateallghostimages()
if(!T)
T = pick(latejoin) //Safety in case we cannot find the body's position
if(!T)
T = pick(GLOB.latejoin) //Safety in case we cannot find the body's position
forceMove(T)
if(!name) //To prevent nameless ghosts
@@ -95,7 +95,7 @@ GLOBAL_VAR_INIT(observer_default_invisibility, INVISIBILITY_OBSERVER)
M.following_mobs -= src
following = null
if(ghostimage)
ghost_images -= ghostimage
GLOB.ghost_images -= ghostimage
QDEL_NULL(ghostimage)
updateallghostimages()
return ..()
@@ -319,11 +319,11 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp
src << sound(sound)
/mob/dead/observer/proc/show_me_the_hud(hud_index)
var/datum/atom_hud/H = huds[hud_index]
var/datum/atom_hud/H = GLOB.huds[hud_index]
H.add_hud_to(src)
/mob/dead/observer/proc/remove_the_hud(hud_index) //remove old huds
var/datum/atom_hud/H = huds[hud_index]
var/datum/atom_hud/H = GLOB.huds[hud_index]
H.remove_hud_from(src)
/mob/dead/observer/verb/toggle_medHUD()
@@ -340,7 +340,7 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp
show_me_the_hud(DATA_HUD_SECURITY_ADVANCED)
show_me_the_hud(DATA_HUD_MEDICAL_ADVANCED)
to_chat(src, "<span class='notice'>All HUDs enabled.</span>")
if(DATA_HUD_DIAGNOSTIC + DATA_HUD_SECURITY_ADVANCED + DATA_HUD_MEDICAL_ADVANCED)
if(DATA_HUD_DIAGNOSTIC + DATA_HUD_SECURITY_ADVANCED + DATA_HUD_MEDICAL_ADVANCED)
data_hud_seen = DATA_HUD_SECURITY_ADVANCED
remove_the_hud(DATA_HUD_DIAGNOSTIC)
remove_the_hud(DATA_HUD_MEDICAL_ADVANCED)
@@ -386,7 +386,7 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp
//var/datum/atom_hud/A = huds[DATA_HUD_SECURITY_ADVANCED]
//var/adding_hud = (usr in A.hudusers) ? 0 : 1
for(var/datum/atom_hud/antag/H in (huds))
for(var/datum/atom_hud/antag/H in (GLOB.huds))
if(!M.antagHUD)
H.add_hud_to(usr)
else
@@ -407,7 +407,7 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp
to_chat(usr, "Not when you're not dead!")
return
var/datum/async_input/A = input_autocomplete_async(usr, "Area to jump to: ", ghostteleportlocs)
var/datum/async_input/A = input_autocomplete_async(usr, "Area to jump to: ", GLOB.ghostteleportlocs)
A.on_close(CALLBACK(src, .proc/teleport))
/mob/dead/observer/proc/teleport(area/thearea)
@@ -505,7 +505,7 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp
set name = "Jump to Mob"
set desc = "Teleport to a mob"
if(isobserver(usr)) //Make sure they're an observer!
if(isobserver(usr)) //Make sure they're an observer!
var/list/dest = getpois(mobs_only=1) //Fill list, prompt user with list
var/datum/async_input/A = input_autocomplete_async(usr, "Enter a mob name: ", dest)
A.on_close(CALLBACK(src, .proc/jump_to_mob))
@@ -616,7 +616,7 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp
var/dat
dat += "<h4>Crew Manifest</h4>"
dat += data_core.get_manifest()
dat += GLOB.data_core.get_manifest()
src << browse(dat, "window=manifest;size=370x420;can_close=1")
@@ -743,10 +743,10 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp
if(!client)
return
if(seedarkness || !ghostvision)
client.images -= ghost_images
client.images -= GLOB.ghost_images
else
//add images for the 60inv things ghosts can normally see when darkness is enabled so they can see them now
client.images |= ghost_images
client.images |= GLOB.ghost_images
if(ghostimage)
client.images -= ghostimage //remove ourself