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-20 21:56:37 -06:00
committed by GitHub
parent c8dbd0190e
commit 210f8badf4
667 changed files with 4243 additions and 4240 deletions
+1 -1
View File
@@ -20,7 +20,7 @@
opening = 1
playsound(src.loc, 'sound/items/bubblewrap.ogg', 30, 1, extrarange = -4, falloff = 10)
icon_state = "prizeconfetti"
src.color = pick(random_color_list)
src.color = pick(GLOB.random_color_list)
var/prize_inside = pick(possible_contents)
spawn(10)
user.unEquip(src)
+4 -4
View File
@@ -1,4 +1,4 @@
/var/claw_game_html = null
GLOBAL_VAR(claw_game_html)
/obj/machinery/arcade/claw
name = "Claw Game"
@@ -30,8 +30,8 @@
component_parts += new /obj/item/stack/sheet/glass(null, 1)
RefreshParts()
if(!claw_game_html)
claw_game_html = file2text('code/modules/arcade/crane.html')
if(!GLOB.claw_game_html)
GLOB.claw_game_html = file2text('code/modules/arcade/crane.html')
/obj/machinery/arcade/claw/RefreshParts()
var/bin_upgrades = 0
@@ -65,7 +65,7 @@
user << browse_rsc('page.css')
for(var/i in 1 to img_resources.len)
user << browse_rsc(img_resources[i])
var/my_game_html = replacetext(claw_game_html, "/* ref src */", UID())
var/my_game_html = replacetext(GLOB.claw_game_html, "/* ref src */", UID())
user << browse(my_game_html, "window=[window_name];size=915x600;can_resize=0")
/obj/machinery/arcade/claw/Topic(href, list/href_list)
+1 -1
View File
@@ -108,7 +108,7 @@
/datum/mob_hunt/proc/get_possible_areas()
var/list/possible_areas = list()
//setup, sets all station areas (and subtypes) to weight 1
for(var/A in the_station_areas)
for(var/A in GLOB.the_station_areas)
if(A == /area/holodeck) //don't allow holodeck areas as possible spawns since it will allow it to spawn in the holodeck rooms on z2 as well
continue
if(A in possible_areas)
+4 -4
View File
@@ -140,11 +140,11 @@ th.cost.toomuch {background:maroon;}
<tbody>
"}
for(var/datum/prize_item/item in global_prizes.prizes)
for(var/datum/prize_item/item in GLOB.global_prizes.prizes)
var/cost_class="affordable"
if(item.cost>tickets)
cost_class="toomuch"
var/itemID = global_prizes.prizes.Find(item)
var/itemID = GLOB.global_prizes.prizes.Find(item)
var/row_color="light"
if(itemID%2 == 0)
row_color="dark"
@@ -185,12 +185,12 @@ th.cost.toomuch {background:maroon;}
if(href_list["buy"])
var/itemID = text2num(href_list["buy"])
var/datum/prize_item/item = global_prizes.prizes[itemID]
var/datum/prize_item/item = GLOB.global_prizes.prizes[itemID]
var/sure = alert(usr,"Are you sure you wish to purchase [item.name] for [item.cost] tickets?","You sure?","Yes","No") in list("Yes","No")
if(sure=="No")
updateUsrDialog()
return
if(!global_prizes.PlaceOrder(src, itemID))
if(!GLOB.global_prizes.PlaceOrder(src, itemID))
to_chat(usr, "<span class='warning'>Unable to complete the exchange.</span>")
else
to_chat(usr, "<span class='notice'>You've successfully purchased the item.</span>")
+2 -3
View File
@@ -1,5 +1,4 @@
var/global/datum/prizes/global_prizes = new
GLOBAL_DATUM_INIT(global_prizes, /datum/prizes, new())
/datum/prizes
var/list/prizes = list()
@@ -14,7 +13,7 @@ var/global/datum/prizes/global_prizes = new
return
if(!prize_counter)
return 0
var/datum/prize_item/item = global_prizes.prizes[itemID]
var/datum/prize_item/item = GLOB.global_prizes.prizes[itemID]
if(!item)
return 0
if(prize_counter.tickets >= item.cost)