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
+3 -3
View File
@@ -19,7 +19,7 @@ interface with the mining shuttle at the landing site if a mobile beacon is also
var/launch_warning = TRUE
var/list/turrets = list() //List of connected turrets
req_one_access = list(access_cargo, access_construction, access_heads, access_research)
req_one_access = list(GLOB.access_cargo, GLOB.access_construction, GLOB.access_heads, GLOB.access_research)
var/possible_destinations
clockwork = TRUE
var/obj/item/device/gps/internal/base/locator
@@ -199,7 +199,7 @@ interface with the mining shuttle at the landing site if a mobile beacon is also
var/turf/T = get_turf(user)
var/obj/machinery/computer/auxillary_base/AB
for (var/obj/machinery/computer/auxillary_base/A in machines)
for (var/obj/machinery/computer/auxillary_base/A in GLOB.machines)
if(A.z == ZLEVEL_STATION)
AB = A
break
@@ -274,7 +274,7 @@ obj/docking_port/stationary/public_mining_dock/onShuttleMove()
to_chat(user, "<span class='warning'>This device is only to be used in a mining zone.</span>")
return
var/obj/machinery/computer/auxillary_base/aux_base_console
for(var/obj/machinery/computer/auxillary_base/ABC in machines)
for(var/obj/machinery/computer/auxillary_base/ABC in GLOB.machines)
if(get_dist(landing_spot, ABC) <= console_range)
aux_base_console = ABC
break
+1 -1
View File
@@ -62,7 +62,7 @@
/obj/machinery/computer/camera_advanced/base_construction/CreateEye()
var/spawn_spot
for(var/obj/machinery/computer/auxillary_base/ABC in machines)
for(var/obj/machinery/computer/auxillary_base/ABC in GLOB.machines)
if(istype(get_area(ABC), /area/shuttle/auxillary_base))
found_aux_console = ABC
break
+2 -2
View File
@@ -82,7 +82,7 @@
var/list/destinations = list()
if(isgolem(user))
for(var/obj/item/device/radio/beacon/B in teleportbeacons)
for(var/obj/item/device/radio/beacon/B in GLOB.teleportbeacons)
var/turf/T = get_turf(B)
if(istype(T.loc, /area/ruin/powered/golem_ship))
destinations += B
@@ -91,7 +91,7 @@
if(destinations.len)
return destinations
for(var/obj/item/device/radio/beacon/B in teleportbeacons)
for(var/obj/item/device/radio/beacon/B in GLOB.teleportbeacons)
var/turf/T = get_turf(B)
if(T.z == ZLEVEL_STATION)
destinations += B
+4 -4
View File
@@ -1,4 +1,4 @@
var/list/total_extraction_beacons = list()
GLOBAL_LIST_EMPTY(total_extraction_beacons)
/obj/item/weapon/extraction_pack
name = "fulton extraction pack"
@@ -18,7 +18,7 @@ var/list/total_extraction_beacons = list()
/obj/item/weapon/extraction_pack/attack_self(mob/user)
var/list/possible_beacons = list()
for(var/B in total_extraction_beacons)
for(var/B in GLOB.total_extraction_beacons)
var/obj/structure/extraction_point/EP = B
if(EP.beacon_network in beacon_networks)
possible_beacons += EP
@@ -160,11 +160,11 @@ var/list/total_extraction_beacons = list()
/obj/structure/extraction_point/New()
var/area/area_name = get_area(src)
name += " ([rand(100,999)]) ([area_name.name])"
total_extraction_beacons += src
GLOB.total_extraction_beacons += src
..()
/obj/structure/extraction_point/Destroy()
total_extraction_beacons -= src
GLOB.total_extraction_beacons -= src
..()
/obj/effect/extraction_holder
@@ -4,7 +4,7 @@
circuit = /obj/item/weapon/circuitboard/computer/labor_shuttle
shuttleId = "laborcamp"
possible_destinations = "laborcamp_home;laborcamp_away"
req_access = list(access_brig)
req_access = list(GLOB.access_brig)
/obj/machinery/computer/shuttle/labor/one_way
@@ -35,7 +35,7 @@
return ..()
/obj/machinery/mineral/labor_claim_console/ui_interact(mob/user, ui_key = "main", datum/tgui/ui = null, force_open = 0, \
datum/tgui/master_ui = null, datum/ui_state/state = default_state)
datum/tgui/master_ui = null, datum/ui_state/state = GLOB.default_state)
ui = SStgui.try_update_ui(user, src, ui_key, ui, force_open)
if(!ui)
ui = new(user, src, ui_key, "labor_claim_console", name, 450, 475, master_ui, state)
@@ -104,8 +104,8 @@
to_chat(usr, "<span class='notice'>No permission to dock could be granted.</span>")
else
if(!emagged)
Radio.set_frequency(SEC_FREQ)
Radio.talk_into(src, "[inserted_id.registered_name] has returned to the station. Minerals and Prisoner ID card ready for retrieval.", SEC_FREQ, get_spans(), get_default_language())
Radio.set_frequency(GLOB.SEC_FREQ)
Radio.talk_into(src, "[inserted_id.registered_name] has returned to the station. Minerals and Prisoner ID card ready for retrieval.", GLOB.SEC_FREQ, get_spans(), get_default_language())
to_chat(usr, "<span class='notice'>Shuttle received message and will be sent shortly.</span>")
/obj/machinery/mineral/labor_claim_console/proc/check_auth()
@@ -486,14 +486,14 @@
..()
spirits = list()
START_PROCESSING(SSobj, src)
poi_list |= src
GLOB.poi_list |= src
/obj/item/weapon/melee/ghost_sword/Destroy()
for(var/mob/dead/observer/G in spirits)
G.invisibility = observer_default_invisibility
G.invisibility = GLOB.observer_default_invisibility
spirits.Cut()
STOP_PROCESSING(SSobj, src)
poi_list -= src
GLOB.poi_list -= src
. = ..()
/obj/item/weapon/melee/ghost_sword/attack_self(mob/user)
@@ -537,7 +537,7 @@
current_spirits |= G
for(var/mob/dead/observer/G in spirits - current_spirits)
G.invisibility = observer_default_invisibility
G.invisibility = GLOB.observer_default_invisibility
spirits = current_spirits
@@ -722,7 +722,7 @@
if(used)
return
used = TRUE
var/choice = input(user,"Who do you want dead?","Choose Your Victim") as null|anything in player_list
var/choice = input(user,"Who do you want dead?","Choose Your Victim") as null|anything in GLOB.player_list
if(!(isliving(choice)))
to_chat(user, "[choice] is already dead!")
@@ -747,7 +747,7 @@
var/obj/effect/mine/pickup/bloodbath/B = new(L)
B.mineEffect(L)
for(var/mob/living/carbon/human/H in player_list)
for(var/mob/living/carbon/human/H in GLOB.player_list)
if(H == L)
continue
to_chat(H, "<span class='userdanger'>You have an overwhelming desire to kill [L]. [L.p_they(TRUE)] [L.p_have()] been marked red! Go kill [L.p_them()]!</span>")
@@ -975,7 +975,7 @@
playsound(T,'sound/effects/bin_close.ogg', 200, 1)
sleep(2)
new /obj/effect/overlay/temp/hierophant/blast(T, user, friendly_fire_check)
for(var/d in cardinal)
for(var/d in GLOB.cardinal)
INVOKE_ASYNC(src, .proc/blast_wall, T, d, user)
/obj/item/weapon/hierophant_club/proc/blast_wall(turf/T, dir, mob/living/user) //make a wall of blasts blast_range tiles long
+3 -3
View File
@@ -10,8 +10,8 @@
anchored = 1
input_dir = NORTH
output_dir = SOUTH
req_access = list(access_mineral_storeroom)
var/req_access_reclaim = access_mining_station
req_access = list(GLOB.access_mineral_storeroom)
var/req_access_reclaim = GLOB.access_mining_station
var/stk_types = list()
var/stk_amt = list()
var/stack_list = list() //Key: Type. Value: Instance of type.
@@ -85,7 +85,7 @@
var/obj/item/stack/sheet/sheet = stack_list[s]
msg += "[capitalize(sheet.name)]: [sheet.amount] sheets<br>"
for(var/obj/machinery/requests_console/D in allConsoles)
for(var/obj/machinery/requests_console/D in GLOB.allConsoles)
if(D.receive_ore_updates)
D.createmessage("Ore Redemption Machine", "New minerals available!", msg, 1, 0)
+4 -4
View File
@@ -272,10 +272,10 @@
/obj/item/weapon/card/mining_access_card/afterattack(atom/movable/AM, mob/user, proximity)
if(istype(AM, /obj/item/weapon/card/id) && proximity)
var/obj/item/weapon/card/id/I = AM
I.access |= access_mining
I.access |= access_mining_station
I.access |= access_mineral_storeroom
I.access |= access_cargo
I.access |= GLOB.access_mining
I.access |= GLOB.access_mining_station
I.access |= GLOB.access_mineral_storeroom
I.access |= GLOB.access_cargo
to_chat(user, "You upgrade [I] with mining access.")
qdel(src)
..()
+1 -1
View File
@@ -37,7 +37,7 @@
/obj/structure/closet/secure_closet/miner
name = "miner's equipment"
icon_state = "mining"
req_access = list(access_mining)
req_access = list(GLOB.access_mining)
/obj/structure/closet/secure_closet/miner/New()
..()
+1 -1
View File
@@ -136,7 +136,7 @@
var/obj/item/weapon/ore/O
for(O in src.loc)
O.loc = src
for(var/dir in alldirs)
for(var/dir in GLOB.alldirs)
var/turf/T = get_step(src,dir)
for(O in T)
O.loc = src