makes economy use managed globals for vv (#4501)

Co-authored-by: VM_USER <VM_USER>
This commit is contained in:
silicons
2022-10-07 18:30:53 -05:00
committed by GitHub
co-authored by VM_USER <VM_USER>
parent b6ec7b3919
commit 54f0eb4ee8
18 changed files with 107 additions and 108 deletions
@@ -12,8 +12,8 @@
/datum/gm_action/money_hacker/set_up()
active = TRUE
end_time = world.time + 6000
if(all_money_accounts.len)
affected_account = pick(all_money_accounts)
if(GLOB.all_money_accounts.len)
affected_account = pick(GLOB.all_money_accounts)
account_hack_attempted = 1
@@ -57,7 +57,7 @@
T.amount = pick("","([rand(0,99999)])","alla money","9001$","HOLLA HOLLA GET DOLLA","([lost])")
var/date1 = "31 December, 1999"
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]"
T.time = pick("", stationtime2text(), time2, "Never")
@@ -76,4 +76,4 @@
MS.send_rc_message("Head of Personnel's Desk", my_department, message, "", "", 2)
/datum/gm_action/money_hacker/get_weight()
return 30 * all_money_accounts.len
return 30 * GLOB.all_money_accounts.len
@@ -8,8 +8,8 @@
/datum/gm_action/money_lotto/start()
..()
winner_sum = pick(5000, 10000, 50000, 100000, 500000, 1000000, 1500000)
if(all_money_accounts.len)
var/datum/money_account/D = pick(all_money_accounts)
if(GLOB.all_money_accounts.len)
var/datum/money_account/D = pick(GLOB.all_money_accounts)
winner_name = D.owner_name
if(!D.suspended)
D.money += winner_sum
@@ -18,7 +18,7 @@
T.target_name = "The [GLOB.using_map.starsys_name] Times Grand Slam -Stellar- Lottery"
T.purpose = "Winner!"
T.amount = winner_sum
T.date = current_date_string
T.date = GLOB.current_date_string
T.time = stationtime2text()
T.source_terminal = "Sif TCD Terminal #[rand(111,333)]"
D.transaction_log.Add(T)
@@ -8,7 +8,7 @@
/datum/gm_action/station_fund_raise/get_weight()
var/weight_modifier = 0.5
if(station_account.money <= 80000)
if(GLOB.station_account.money <= 80000)
weight_modifier = 1
return (max(-20, 10 + gm.staleness) + ((metric.count_people_in_department(DEPARTMENT_SECURITY) + (metric.count_people_in_department(DEPARTMENT_CARGO))) * 5) + (metric.count_people_in_department(DEPARTMENT_EVERYONE) * 3)) * weight_modifier