Global variable wrappers (#25325)

* Add the system for managed global variables

* Travis ban old globals

* So you CAN inline proccall, that's neat

* Fix that

* master.dm

* Remove the hack procs

* Move InitGlobals to the proper spot

* configuration.dm

* Fix the missing pre-slash

* clockcult.dm

* This is probably for the best

* Doy

* Fix shit

* Rest of the DEFINES tree

* Fix

* Use global. for access

* Update find_references_in_globals

Always hated that proc

Whoever made it must've bee a r e a l idiot...

* __HELPERS tree

* Move global initialization to master.

Fix the declaration

* database.dm

* Dat newline

* I said DECLARATIVE order!

* Here's something you can chew on @Iamgoofball

* game_modes.dm

* Fix this

* genetics.dm

* flavor_misc.dm

* More stuff

* Do it mso's way. Keep the controllers as global

* Make master actually see it

* Fix

* Finish _globalvars/lists

* Finish the rest of the _globalvars tree

* This is weird

* Migrate the controllers

* SLOTH -> GLOB

* Lighting globals

* round_start_time -> ticker

* PAI card list -> pai SS

* record_id_num -> static

* Diseases list -> SSdisease

* More disease globals to the SS

* More disease stuff

* Emote list

* Better and better

* Bluh

* So much stuff

* Ahh

* Wires

* dview

* station_areas

* Teleportlocs

* blood_splatter_icons

* Stuff and such

* More stuff

* RAD IO

* More stuff and such

* Blob shit

* Changeling stuff

* Add "Balance" to changelogs

* Balance for changelog compiler + Auto Tagging

* Update the PR template

* hivemind_bank

* Bip

* sacrificed

* Good shit

* Better define

* More cult shit

* Devil shit

* Gang shit

* > borers

Fix shit

* Rename the define

* Nuke

* Objectives

* Sandbox

* Multiverse sword

* Announce systems

* Stuff and such

* TC con

* Airlock

* doppllllerrrrrr

* holopads

* Shut up byond you inconsistent fuck

* Sneaky fuck

* Burp

* Bip

* Fixnshit

* Port without regard

* askdlfjs;

* asdfjasoidojfi

* Protected globals and more

* SO MANY

* ajsimkvahsaoisd

* akfdsiaopwimfeoiwafaw

* gsdfigjosidjfgiosdg

* AHHHHHHHHHHHHHHHHHHHHHHH!!!!!

* facerolll

* ASDFASDFASDF

* Removes the unused parts of dmm_suite

* WIP

* Fix quote

* asdfjauwfnkjs

* afwlunhskjfda

* asfjlaiwuefhaf

* SO CLOSE

* wwwweeeeeewwwww

* agdgmoewranwg

* HOLY MOTHER OF FUCK AND THATS JUST HALF THE JOB?!?

* Fix syntax errors

* 100 errors

* Another 100

* So many...

* Ugh

* More shit

* kilme

* Stuuuuuufffff

* ajrgmrlshio;djfa;sdkl

* jkbhkhjbmjvjmh

* soi soi soi

* butt

* TODAY WE LEARNED THAT GLOBAL AND STATIC ARE THE EXACT SAME FUCKING THING

* lllllllllllllllllllllllllllllllllllllllllll

* afsdijfiawhnflnjhnwsdfs

* yugykihlugk,kj

* time to go

* STUFFF!!!

* AAAAAAAAAAAAAAAAAHHHHHHHHHHHHHHHHHHHHHHHHHHH!!!!!!!!!!!!!!!!!!!!!!!

* ngoaijdjlfkamsdlkf

* Break time

* aufjsdklfalsjfi

* CONTROL KAY AND PRAY

* IT COMPILEELEELELAKLJFKLDAFJLKFDJLADKJHFLJKAJGAHIEJALDFJ!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

* Goteem

* Fix testing mode

* This does not belong in this PR

* Convert it to a controller

* Eh, fuck this option

* Revert controllerization Ill do it some other time

* Fix

* Working controllerization

* FOR THE LOVE OF CHRIST PROTECT THE LOGS

* Protect admins and deadmins

* Use the inbuilt proc
This commit is contained in:
Cyberboss
2017-04-06 23:26:13 -06:00
committed by duncathan salt
parent e550f019b0
commit 9e1ef0ffe2
825 changed files with 5425 additions and 6057 deletions
+7 -7
View File
@@ -39,23 +39,23 @@
areas = list()
var/list/new_latejoin = list()
for(var/area/shuttle/arrival/A in sortedAreas)
for(var/area/shuttle/arrival/A in GLOB.sortedAreas)
for(var/obj/structure/chair/C in A)
new_latejoin += C
if(!console)
console = locate(/obj/machinery/requests_console) in A
areas += A
if(latejoin.len)
if(GLOB.latejoin.len)
WARNING("Map contains predefined latejoin spawn points and an arrivals shuttle. Using the arrivals shuttle.")
if(!new_latejoin.len)
WARNING("Arrivals shuttle contains no chairs for spawn points. Reverting to latejoin landmarks.")
if(!latejoin.len)
if(!GLOB.latejoin.len)
WARNING("No latejoin landmarks exist. Players will spawn unbuckled on the shuttle.")
return
latejoin = new_latejoin
GLOB.latejoin = new_latejoin
/obj/docking_port/mobile/arrivals/dockRoundstart()
SSshuttle.generate_transit_dock(src)
@@ -88,7 +88,7 @@
damaged = TRUE
if(console)
console.say("Alert, hull breach detected!")
var/obj/machinery/announcement_system/announcer = pick(announcement_systems)
var/obj/machinery/announcement_system/announcer = pick(GLOB.announcement_systems)
announcer.announce("ARRIVALS_BROKEN", channels = list())
if(mode != SHUTTLE_CALL)
sound_played = FALSE
@@ -112,7 +112,7 @@
Launch(FALSE)
/obj/docking_port/mobile/arrivals/proc/CheckTurfsPressure()
for(var/I in latejoin)
for(var/I in GLOB.latejoin)
var/turf/open/T = get_turf(I)
var/pressure = T.air.return_pressure()
if(pressure < HAZARD_LOW_PRESSURE || pressure > HAZARD_HIGH_PRESSURE) //simple safety check
@@ -120,7 +120,7 @@
return FALSE
/obj/docking_port/mobile/arrivals/proc/PersonCheck()
for(var/M in (living_mob_list & player_list))
for(var/M in (GLOB.living_mob_list & GLOB.player_list))
var/mob/living/L = M
if((get_area(M) in areas) && L.stat != DEAD)
return TRUE
+3 -3
View File
@@ -32,8 +32,8 @@
/obj/item/device/assault_pod/attack_self(mob/living/user)
var/target_area
target_area = input("Area to land", "Select a Landing Zone", target_area) in teleportlocs
var/area/picked_area = teleportlocs[target_area]
target_area = input("Area to land", "Select a Landing Zone", target_area) in GLOB.teleportlocs
var/area/picked_area = GLOB.teleportlocs[target_area]
if(!src || QDELETED(src))
return
@@ -49,7 +49,7 @@
landing_zone.height = height
landing_zone.setDir(lz_dir)
for(var/obj/machinery/computer/shuttle/S in machines)
for(var/obj/machinery/computer/shuttle/S in GLOB.machines)
if(S.shuttleId == shuttle_id)
S.possible_destinations = "[landing_zone.id]"
+8 -8
View File
@@ -16,7 +16,7 @@
say("Please equip your ID card into your ID slot to authenticate.")
. = ..()
/obj/machinery/computer/emergency_shuttle/ui_interact(mob/user, ui_key = "main", datum/tgui/ui = null, force_open = 0, datum/tgui/master_ui = null, datum/ui_state/state = human_adjacent_state)
/obj/machinery/computer/emergency_shuttle/ui_interact(mob/user, ui_key = "main", datum/tgui/ui = null, force_open = 0, datum/tgui/master_ui = null, datum/ui_state/state = GLOB.human_adjacent_state)
ui = SStgui.try_update_ui(user, src, ui_key, ui, force_open)
if(!ui)
@@ -63,7 +63,7 @@
to_chat(user, "<span class='warning'>You don't have an ID.</span>")
return
if(!(access_heads in ID.access))
if(!(GLOB.access_heads in ID.access))
to_chat(user, "<span class='warning'>The access level of your card is not high enough.</span>")
return
@@ -243,7 +243,7 @@
/obj/docking_port/mobile/emergency/proc/is_hijacked()
var/has_people = FALSE
for(var/mob/living/player in player_list)
for(var/mob/living/player in GLOB.player_list)
if(player.mind)
if(player.stat != DEAD)
if(issilicon(player)) //Borgs are technically dead anyways
@@ -330,7 +330,7 @@
if(time_left <= 50 && !sound_played) //4 seconds left:REV UP THOSE ENGINES BOYS. - should sync up with the launch
sound_played = 1 //Only rev them up once.
var/list/areas = list()
for(var/area/shuttle/escape/E in sortedAreas)
for(var/area/shuttle/escape/E in GLOB.sortedAreas)
areas += E
hyperspace_sound(HYPERSPACE_WARMUP, areas)
@@ -344,7 +344,7 @@
//now move the actual emergency shuttle to its transit dock
var/list/areas = list()
for(var/area/shuttle/escape/E in sortedAreas)
for(var/area/shuttle/escape/E in GLOB.sortedAreas)
areas += E
hyperspace_sound(HYPERSPACE_LAUNCH, areas)
enterTransit()
@@ -359,7 +359,7 @@
if(SHUTTLE_ESCAPE)
if(sound_played && time_left <= HYPERSPACE_END_TIME)
var/list/areas = list()
for(var/area/shuttle/escape/E in sortedAreas)
for(var/area/shuttle/escape/E in GLOB.sortedAreas)
areas += E
hyperspace_sound(HYPERSPACE_END, areas)
if(areaInstance.parallax_movedir && time_left <= PARALLAX_LOOP_TIME)
@@ -404,7 +404,7 @@
/obj/docking_port/mobile/pod/request()
var/obj/machinery/computer/shuttle/S = getControlConsole()
if(security_level == SEC_LEVEL_RED || security_level == SEC_LEVEL_DELTA || (S && S.emagged))
if(GLOB.security_level == SEC_LEVEL_RED || GLOB.security_level == SEC_LEVEL_DELTA || (S && S.emagged))
if(launch_status == UNLAUNCHED)
launch_status = EARLY_LAUNCHED
return ..()
@@ -510,7 +510,7 @@
return
/obj/item/weapon/storage/pod/MouseDrop(over_object, src_location, over_location)
if(security_level == SEC_LEVEL_RED || security_level == SEC_LEVEL_DELTA || unlocked)
if(GLOB.security_level == SEC_LEVEL_RED || GLOB.security_level == SEC_LEVEL_DELTA || unlocked)
. = ..()
else
to_chat(usr, "The storage unit will only unlock during a Red or Delta security alert.")
+3 -3
View File
@@ -3,7 +3,7 @@
circuit = /obj/item/weapon/circuitboard/computer/ferry
shuttleId = "ferry"
possible_destinations = "ferry_home;ferry_away"
req_access = list(access_cent_general)
req_access = list(GLOB.access_cent_general)
var/aiControlDisabled = 1
@@ -20,7 +20,7 @@
var/last_request //prevents spamming admins
var/cooldown = 600
possible_destinations = "ferry_home;ferry_away"
req_access = list(access_cent_general)
req_access = list(GLOB.access_cent_general)
resistance_flags = INDESTRUCTIBLE | LAVA_PROOF | FIRE_PROOF | ACID_PROOF
/obj/machinery/computer/shuttle/ferry/request/Topic(href, href_list)
@@ -30,4 +30,4 @@
return
last_request = world.time
to_chat(usr, "<span class='notice'>Your request has been recieved by Centcom.</span>")
to_chat(admins, "<b>FERRY: <font color='blue'>[key_name_admin(usr)] (<A HREF='?_src_=holder;adminmoreinfo=\ref[usr]'>?</A>) (<A HREF='?_src_=holder;adminplayerobservefollow=\ref[usr]'>FLW</A>) (<A HREF='?_src_=holder;secrets=moveferry'>Move Ferry</a>)</b> is requesting to move the transport ferry to Centcom.</font>")
to_chat(GLOB.admins, "<b>FERRY: <font color='blue'>[key_name_admin(usr)] (<A HREF='?_src_=holder;adminmoreinfo=\ref[usr]'>?</A>) (<A HREF='?_src_=holder;adminplayerobservefollow=\ref[usr]'>FLW</A>) (<A HREF='?_src_=holder;secrets=moveferry'>Move Ferry</a>)</b> is requesting to move the transport ferry to Centcom.</font>")
+1 -1
View File
@@ -35,7 +35,7 @@
/obj/machinery/shuttle_manipulator/ui_interact(mob/user, ui_key = "main", \
datum/tgui/ui = null, force_open = 0, datum/tgui/master_ui = null, \
datum/ui_state/state = admin_state)
datum/ui_state/state = GLOB.admin_state)
ui = SStgui.try_update_ui(user, src, ui_key, ui, force_open)
if(!ui)
+1 -1
View File
@@ -428,7 +428,7 @@
return ripple_turfs
/obj/docking_port/mobile/proc/check_poddoors()
for(var/obj/machinery/door/poddoor/shuttledock/pod in airlocks)
for(var/obj/machinery/door/poddoor/shuttledock/pod in GLOB.airlocks)
pod.check()
//this is the main proc. It instantly moves our mobile port to stationary port S1
+3 -3
View File
@@ -151,7 +151,7 @@
/mob/living/simple_animal/drone/snowflake/bardrone/Initialize()
. = ..()
access_card.access |= access_cent_bar
access_card.access |= GLOB.access_cent_bar
grant_all_languages(omnitongue=TRUE)
/mob/living/simple_animal/hostile/alien/maid/barmaid
@@ -169,7 +169,7 @@
access_card = new /obj/item/weapon/card/id(src)
var/datum/job/captain/C = new /datum/job/captain
access_card.access = C.get_access()
access_card.access |= access_cent_bar
access_card.access |= GLOB.access_cent_bar
access_card.flags |= NODROP
grant_all_languages(omnitongue=TRUE)
@@ -212,7 +212,7 @@
return TRUE
var/obj/item/weapon/card/id/ID = user.get_idcard()
if(ID && (access_cent_bar in ID.access))
if(ID && (GLOB.access_cent_bar in ID.access))
return TRUE
//Luxury Shuttle Blockers
+5 -5
View File
@@ -1,4 +1,4 @@
var/list/blacklisted_cargo_types = typecacheof(list(
GLOBAL_LIST_INIT(blacklisted_cargo_types, typecacheof(list(
/mob/living,
/obj/structure/blob,
/obj/effect/rune,
@@ -18,7 +18,7 @@ var/list/blacklisted_cargo_types = typecacheof(list(
/obj/effect/clockwork/spatial_gateway,
/obj/structure/destructible/clockwork/powered/clockwork_obelisk,
/obj/item/device/warp_cube
))
)))
/obj/docking_port/mobile/supply
name = "supply shuttle"
@@ -49,7 +49,7 @@ var/list/blacklisted_cargo_types = typecacheof(list(
for(var/trf in areaInstance)
var/turf/T = trf
for(var/a in T.GetAllContents())
if(is_type_in_typecache(a, blacklisted_cargo_types))
if(is_type_in_typecache(a, GLOB.blacklisted_cargo_types))
return FALSE
return TRUE
@@ -102,7 +102,7 @@ var/list/blacklisted_cargo_types = typecacheof(list(
/obj/docking_port/mobile/supply/proc/sell()
var/presale_points = SSshuttle.points
if(!exports_list.len) // No exports list? Generate it!
if(!GLOB.exports_list.len) // No exports list? Generate it!
setupExports()
var/msg = ""
@@ -116,7 +116,7 @@ var/list/blacklisted_cargo_types = typecacheof(list(
if(sold_atoms)
sold_atoms += "."
for(var/a in exports_list)
for(var/a in GLOB.exports_list)
var/datum/export/E = a
var/export_text = E.total_printout()
if(!export_text)
+4 -4
View File
@@ -6,7 +6,7 @@
icon_screen = "syndishuttle"
icon_keyboard = "syndie_key"
light_color = LIGHT_COLOR_RED
req_access = list(access_syndicate)
req_access = list(GLOB.access_syndicate)
shuttleId = "syndicate"
possible_destinations = "syndicate_away;syndicate_z5;syndicate_ne;syndicate_nw;syndicate_n;syndicate_se;syndicate_sw;syndicate_s"
resistance_flags = INDESTRUCTIBLE | LAVA_PROOF | FIRE_PROOF | ACID_PROOF
@@ -32,11 +32,11 @@
var/moved = FALSE
/obj/item/weapon/circuitboard/computer/syndicate_shuttle/New()
syndicate_shuttle_boards += src
GLOB.syndicate_shuttle_boards += src
..()
/obj/item/weapon/circuitboard/computer/syndicate_shuttle/Destroy()
syndicate_shuttle_boards -= src
GLOB.syndicate_shuttle_boards -= src
return ..()
/obj/machinery/computer/shuttle/syndicate/drop_pod
@@ -44,7 +44,7 @@
icon = 'icons/obj/terminals.dmi'
icon_state = "dorm_available"
light_color = LIGHT_COLOR_BLUE
req_access = list(access_syndicate)
req_access = list(GLOB.access_syndicate)
shuttleId = "steel_rain"
possible_destinations = null
clockwork = TRUE //it'd look weird
+2 -2
View File
@@ -7,8 +7,8 @@
/obj/effect/landmark/transit/New()
. = ..()
transit_markers += src
GLOB.transit_markers += src
/obj/effect/landmark/transit/Destroy()
transit_markers -= src
GLOB.transit_markers -= src
. = ..()