mirror of
https://github.com/VOREStation/VOREStation.git
synced 2026-07-19 02:56:14 +01:00
Conversion many Globals to Managed Globals (Part 1) (#17121)
* Conversion of some Globals to Managed Globals * Fix * for later --------- Co-authored-by: Kashargul <144968721+Kashargul@users.noreply.github.com>
This commit is contained in:
@@ -10,7 +10,7 @@
|
||||
|
||||
if(!command)
|
||||
return 0
|
||||
return 30 + (command * 20) + (all_money_accounts.len * 5)
|
||||
return 30 + (command * 20) + (GLOB.all_money_accounts.len * 5)
|
||||
|
||||
|
||||
|
||||
@@ -20,8 +20,8 @@
|
||||
var/datum/money_account/targeted_account = null
|
||||
|
||||
/datum/event2/event/money_hacker/set_up()
|
||||
if(LAZYLEN(all_money_accounts))
|
||||
targeted_account = pick(all_money_accounts)
|
||||
if(LAZYLEN(GLOB.all_money_accounts))
|
||||
targeted_account = pick(GLOB.all_money_accounts)
|
||||
|
||||
if(!targeted_account)
|
||||
log_debug("Money hacker event could not find an account to hack. Aborting.")
|
||||
@@ -99,7 +99,7 @@
|
||||
|
||||
var/date1 = "1 January 1970" // Unix epoch.
|
||||
var/date2 = "[num2text(rand(1,31))] [pick("January","February","March","April","May","June","July","August","September","October","November","December")], [rand(1000,3000)]"
|
||||
T.date = pick("", current_date_string, date1, date2,"Nowhen")
|
||||
T.date = pick("", GLOB.current_date_string, date1, date2,"Nowhen")
|
||||
|
||||
var/time1 = rand(0, 99999999)
|
||||
var/time2 = "[round(time1 / 36000)+12]:[(time1 / 600 % 60) < 10 ? add_zero(time1 / 600 % 60, 1) : time1 / 600 % 60]"
|
||||
|
||||
@@ -84,9 +84,9 @@
|
||||
// Returns the sum of the station account and all the departmental accounts.
|
||||
/datum/event2/event/raise_funds/proc/count_money()
|
||||
. = 0
|
||||
. += station_account.money
|
||||
. += GLOB.station_account.money
|
||||
for(var/i = 1 to SSjob.department_datums.len)
|
||||
var/datum/money_account/account = LAZYACCESS(department_accounts, SSjob.department_datums[i])
|
||||
var/datum/money_account/account = LAZYACCESS(GLOB.department_accounts, SSjob.department_datums[i])
|
||||
if(istype(account))
|
||||
. += account.money
|
||||
|
||||
|
||||
@@ -22,8 +22,8 @@
|
||||
// The random spawn proc on the antag datum will handle announcing the spawn and whatnot, in theory.
|
||||
/datum/event2/event/random_antagonist/start()
|
||||
var/list/valid_types = list()
|
||||
for(var/antag_type in all_antag_types)
|
||||
var/datum/antagonist/antag = all_antag_types[antag_type]
|
||||
for(var/antag_type in GLOB.all_antag_types)
|
||||
var/datum/antagonist/antag = GLOB.all_antag_types[antag_type]
|
||||
if(antag.flags & ANTAG_RANDSPAWN)
|
||||
valid_types |= antag
|
||||
if(valid_types.len)
|
||||
|
||||
Reference in New Issue
Block a user