diff --git a/code/controllers/subsystem/job/job_controller.dm b/code/controllers/subsystem/job/job_controller.dm index 97e28de5f0a..fb956912999 100644 --- a/code/controllers/subsystem/job/job_controller.dm +++ b/code/controllers/subsystem/job/job_controller.dm @@ -465,7 +465,7 @@ var/global/datum/controller/occupations/job_master if(H.mind && job.department_accounts) var/remembered_info = "" for(var/D in job.department_accounts) - var/datum/money_account/department_account = department_accounts[D] + var/datum/money_account/department_account = GLOB.department_accounts[D] if(department_account) remembered_info += "Department account number ([D]): #[department_account.account_number]
" remembered_info += "Department account pin ([D]): [department_account.remote_access_pin]
" diff --git a/code/game/machinery/computer/arcade/claw_machine.dm b/code/game/machinery/computer/arcade/claw_machine.dm index 1315301aa2b..2810c4b9937 100644 --- a/code/game/machinery/computer/arcade/claw_machine.dm +++ b/code/game/machinery/computer/arcade/claw_machine.dm @@ -23,7 +23,7 @@ if(..()) return - if(gamepaid == 0 && vendor_account && !vendor_account.suspended) + if(gamepaid == 0 && GLOB.vendor_account && !GLOB.vendor_account.suspended) var/paid = 0 var/obj/item/card/id/W = I.GetID() if(W) //for IDs and PDAs and wallets with IDs @@ -124,14 +124,14 @@ // create entry in the purchaser's account log var/datum/transaction/T = new() - T.target_name = "[vendor_account.owner_name] (via [name])" + T.target_name = "[GLOB.vendor_account.owner_name] (via [name])" T.purpose = "Purchase of arcade game([name])" if(gameprice > 0) T.amount = "([gameprice])" else T.amount = "[gameprice]" T.source_terminal = name - T.date = current_date_string + T.date = GLOB.current_date_string T.time = stationtime2text() customer_account.transaction_log.Add(T) @@ -144,16 +144,16 @@ /// Add to vendor account /obj/machinery/computer/arcade/clawmachine/proc/credit_purchase(target as text) - vendor_account.money += gameprice + GLOB.vendor_account.money += gameprice var/datum/transaction/T = new() T.target_name = target T.purpose = "Purchase of arcade game([name])" T.amount = "[gameprice]" T.source_terminal = name - T.date = current_date_string + T.date = GLOB.current_date_string T.time = stationtime2text() - vendor_account.transaction_log.Add(T) + GLOB.vendor_account.transaction_log.Add(T) /// End Payment diff --git a/code/game/machinery/vending.dm b/code/game/machinery/vending.dm index f12e34b5930..b6e4e5f42d2 100644 --- a/code/game/machinery/vending.dm +++ b/code/game/machinery/vending.dm @@ -170,7 +170,7 @@ /obj/machinery/vending/attackby(obj/item/W, mob/user) var/obj/item/card/id/I = W.GetID() - if(currently_vending && vendor_account && !vendor_account.suspended) + if(currently_vending && GLOB.vendor_account && !GLOB.vendor_account.suspended) var/paid = FALSE var/handled = FALSE @@ -258,7 +258,7 @@ .[CHARGE_DETAIL_DEVICE] = name .[CHARGE_DETAIL_LOCATION] = get_area(src).name .[CHARGE_DETAIL_REASON] = currently_vending? "Purchase of [currently_vending.item_name]" : "Unknown" - .[CHARGE_DETAIL_RECIPIENT] = vendor_account.owner_name + .[CHARGE_DETAIL_RECIPIENT] = GLOB.vendor_account.owner_name /** * Add money for current purchase to the vendor account. @@ -266,16 +266,16 @@ * Called after the money has already been taken from the customer. */ /obj/machinery/vending/proc/credit_purchase(var/target as text) - vendor_account.money += currently_vending.price + GLOB.vendor_account.money += currently_vending.price var/datum/transaction/T = new() T.target_name = target T.purpose = "Purchase of [currently_vending.item_name]" T.amount = "[currently_vending.price]" T.source_terminal = name - T.date = current_date_string + T.date = GLOB.current_date_string T.time = stationtime2text() - vendor_account.transaction_log.Add(T) + GLOB.vendor_account.transaction_log.Add(T) /obj/machinery/vending/attack_ai(mob/user as mob) return attack_hand(user) @@ -381,7 +381,7 @@ return else currently_vending = R - if(!vendor_account || vendor_account.suspended) + if(!GLOB.vendor_account || GLOB.vendor_account.suspended) status_message = "This machine is currently unable to process payments due to issues with the associated account." status_error = 1 else diff --git a/code/modules/economy/Accounts.dm b/code/modules/economy/Accounts.dm index 4191bb4f0df..44f9d720739 100644 --- a/code/modules/economy/Accounts.dm +++ b/code/modules/economy/Accounts.dm @@ -39,12 +39,12 @@ M.account_number = rand(111111, 999999) else - T.date = current_date_string + T.date = GLOB.current_date_string T.time = stationtime2text() T.source_terminal = source_db.machine_id - M.account_number = next_account_number - next_account_number += rand(1,25) + M.account_number = GLOB.next_account_number + GLOB.next_account_number += rand(1,25) //create a sealed package containing the account details var/obj/item/smallDelivery/P = new /obj/item/smallDelivery(source_db.loc) @@ -57,7 +57,7 @@ R.info += "Account number: [M.account_number]
" R.info += "Account pin: [M.remote_access_pin]
" R.info += "Starting balance: $[M.money]
" - R.info += "Date and time: [stationtime2text()], [current_date_string]

" + R.info += "Date and time: [stationtime2text()], [GLOB.current_date_string]

" R.info += "Creation terminal ID: [source_db.machine_id]
" R.info += "Authorised NT officer overseeing creation: [source_db.held_card.registered_name]
" @@ -72,12 +72,12 @@ //add the account M.transaction_log.Add(T) - all_money_accounts.Add(M) + GLOB.all_money_accounts.Add(M) return M /proc/charge_to_account(var/attempt_account_number, var/source_name, var/purpose, var/terminal_id, var/amount) - for(var/datum/money_account/D in all_money_accounts) + for(var/datum/money_account/D in GLOB.all_money_accounts) if(D.account_number == attempt_account_number && !D.suspended) D.money += amount @@ -89,7 +89,7 @@ T.amount = "([amount])" else T.amount = "[amount]" - T.date = current_date_string + T.date = GLOB.current_date_string T.time = stationtime2text() T.source_terminal = terminal_id D.transaction_log.Add(T) @@ -100,13 +100,13 @@ //this returns the first account datum that matches the supplied accnum/pin combination, it returns null if the combination did not match any account /proc/attempt_account_access(var/attempt_account_number, var/attempt_pin_number, var/security_level_passed = 0) - for(var/datum/money_account/D in all_money_accounts) + for(var/datum/money_account/D in GLOB.all_money_accounts) if(D.account_number == attempt_account_number) if( D.security_level <= security_level_passed && (!D.security_level || D.remote_access_pin == attempt_pin_number) ) return D break /proc/get_account(var/account_number) - for(var/datum/money_account/D in all_money_accounts) + for(var/datum/money_account/D in GLOB.all_money_accounts) if(D.account_number == account_number) return D diff --git a/code/modules/economy/economy_misc.dm b/code/modules/economy/economy_misc.dm index 077822878b5..9796011c1de 100644 --- a/code/modules/economy/economy_misc.dm +++ b/code/modules/economy/economy_misc.dm @@ -64,19 +64,18 @@ //Destroyers are medium sized vessels, often used for escorting larger ships but able to go toe-to-toe with them if need be. //Frigates are medium sized vessels, often used for escorting larger ships. They will rapidly find themselves outclassed if forced to face heavy warships head on. -var/global/current_date_string - -var/global/datum/money_account/vendor_account -var/global/datum/money_account/station_account -var/global/list/datum/money_account/department_accounts = list() -var/global/num_financial_terminals = 1 -var/global/next_account_number = 0 -var/global/list/all_money_accounts = list() -var/global/list/transaction_devices = list() -var/global/economy_init = 0 +GLOBAL_VAR(current_date_string) +GLOBAL_DATUM(vendor_account, /datum/money_account) +GLOBAL_DATUM(station_account, /datum/money_account) +GLOBAL_LIST_EMPTY_TYPED(department_accounts, /datum/money_account) +GLOBAL_VAR_INIT(num_financial_terminals, 1) +GLOBAL_VAR_INIT(next_account_number, 0) +GLOBAL_LIST_EMPTY(all_money_accounts) +GLOBAL_LIST_EMPTY(transaction_devices) +GLOBAL_VAR_INIT(economy_init, FALSE) /proc/setup_economy() - if(economy_init) + if(GLOB.economy_init) return 2 //news_network.CreateFeedChannel("The [GLOB.using_map.starsys_name] Times", "[GLOB.using_map.starsys_name] Times ExoNode - [GLOB.using_map.station_short]", 1, 1) @@ -93,33 +92,33 @@ var/global/economy_init = 0 for(var/department in economy_station_departments) create_department_account(department) create_department_account("Vendor") - vendor_account = department_accounts["Vendor"] + GLOB.vendor_account = GLOB.department_accounts["Vendor"] - for(var/obj/item/retail_scanner/RS in transaction_devices) + for(var/obj/item/retail_scanner/RS in GLOB.transaction_devices) if(RS.account_to_connect) - RS.linked_account = department_accounts[RS.account_to_connect] - for(var/obj/machinery/cash_register/CR in transaction_devices) + RS.linked_account = GLOB.department_accounts[RS.account_to_connect] + for(var/obj/machinery/cash_register/CR in GLOB.transaction_devices) if(CR.account_to_connect) - CR.linked_account = department_accounts[CR.account_to_connect] + CR.linked_account = GLOB.department_accounts[CR.account_to_connect] - current_date_string = "[num2text(rand(1,31))] [pick("January","February","March","April","May","June","July","August","September","October","November","December")], [game_year]" + GLOB.current_date_string = "[num2text(rand(1,31))] [pick("January","February","March","April","May","June","July","August","September","October","November","December")], [game_year]" - economy_init = 1 + GLOB.economy_init = 1 return 1 /proc/create_station_account() - if(!station_account) - next_account_number = rand(111111, 999999) + if(!GLOB.station_account) + GLOB.next_account_number = rand(111111, 999999) - station_account = new() - station_account.owner_name = "[station_name()] Station Account" - station_account.account_number = rand(111111, 999999) - station_account.remote_access_pin = rand(1111, 111111) - station_account.money = 75000 + GLOB.station_account = new() + GLOB.station_account.owner_name = "[station_name()] Station Account" + GLOB.station_account.account_number = rand(111111, 999999) + GLOB.station_account.remote_access_pin = rand(1111, 111111) + GLOB.station_account.money = 75000 //create an entry in the account transaction log for when it was created var/datum/transaction/T = new() - T.target_name = station_account.owner_name + T.target_name = GLOB.station_account.owner_name T.purpose = "Account creation" T.amount = 75000 T.date = "2nd April, 2555" @@ -127,11 +126,11 @@ var/global/economy_init = 0 T.source_terminal = "Biesel GalaxyNet Terminal #277" //add the account - station_account.transaction_log.Add(T) - all_money_accounts.Add(station_account) + GLOB.station_account.transaction_log.Add(T) + GLOB.all_money_accounts.Add(GLOB.station_account) /proc/create_department_account(department) - next_account_number = rand(111111, 999999) + GLOB.next_account_number = rand(111111, 999999) var/datum/money_account/department_account = new() department_account.owner_name = "[department] Account" @@ -150,6 +149,6 @@ var/global/economy_init = 0 //add the account department_account.transaction_log.Add(T) - all_money_accounts.Add(department_account) + GLOB.all_money_accounts.Add(department_account) - department_accounts[department] = department_account + GLOB.department_accounts[department] = department_account diff --git a/code/modules/economy/items/EFTPOS.dm b/code/modules/economy/items/EFTPOS.dm index 1af05144f3a..87f6cf29717 100644 --- a/code/modules/economy/items/EFTPOS.dm +++ b/code/modules/economy/items/EFTPOS.dm @@ -14,11 +14,11 @@ /obj/item/eftpos/Initialize(mapload) . = ..() - machine_id = "[station_name()] EFTPOS #[num_financial_terminals++]" + machine_id = "[station_name()] EFTPOS #[GLOB.num_financial_terminals++]" access_code = rand(1111,111111) //by default, connect to the station account //the user of the EFTPOS device can change the target account though, and no-one will be the wiser (except whoever's being charged) - linked_account = station_account + linked_account = GLOB.station_account return INITIALIZE_HINT_LATELOAD /obj/item/eftpos/LateInitialize() @@ -141,7 +141,7 @@ T.purpose = (transaction_purpose ? transaction_purpose : "None supplied.") T.amount = transaction_amount T.source_terminal = machine_id - T.date = current_date_string + T.date = GLOB.current_date_string T.time = stationtime2text() linked_account.transaction_log.Add(T) else @@ -265,7 +265,7 @@ else T.amount = "[transaction_amount]" T.source_terminal = machine_id - T.date = current_date_string + T.date = GLOB.current_date_string T.time = stationtime2text() D.transaction_log.Add(T) // @@ -274,7 +274,7 @@ T.purpose = transaction_purpose T.amount = "[transaction_amount]" T.source_terminal = machine_id - T.date = current_date_string + T.date = GLOB.current_date_string T.time = stationtime2text() linked_account.transaction_log.Add(T) else diff --git a/code/modules/economy/items/bank_card.dm b/code/modules/economy/items/bank_card.dm index 0ccaa3bd7b1..19dd7c06b7b 100644 --- a/code/modules/economy/items/bank_card.dm +++ b/code/modules/economy/items/bank_card.dm @@ -43,7 +43,7 @@ var/list/details = predicate.query_transaction_details(data) T.target_name = details[CHARGE_DETAIL_RECIPIENT] T.source_terminal = details[CHARGE_DETAIL_DEVICE] - T.date = current_date_string + T.date = GLOB.current_date_string T.time = stationtime2text() T.purpose = details[CHARGE_DETAIL_REASON] customer_account.transaction_log.Add(T) diff --git a/code/modules/economy/items/retail_scanner.dm b/code/modules/economy/items/retail_scanner.dm index 733695675ae..b90d3f026d2 100644 --- a/code/modules/economy/items/retail_scanner.dm +++ b/code/modules/economy/items/retail_scanner.dm @@ -26,10 +26,10 @@ // Claim machine ID /obj/item/retail_scanner/Initialize(mapload) . = ..() - machine_id = "[station_name()] RETAIL #[num_financial_terminals++]" + machine_id = "[station_name()] RETAIL #[GLOB.num_financial_terminals++]" if(locate(/obj/structure/table) in loc) pixel_y = 3 - transaction_devices += src // Global reference list to be properly set up by /proc/setup_economy() + GLOB.transaction_devices += src // Global reference list to be properly set up by /proc/setup_economy() // Always face the user when put on a table /obj/item/retail_scanner/afterattack(atom/movable/AM, mob/user, proximity) @@ -228,7 +228,7 @@ T.purpose = transaction_purpose T.amount = "([transaction_amount])" T.source_terminal = machine_id - T.date = current_date_string + T.date = GLOB.current_date_string T.time = stationtime2text() D.transaction_log.Add(T) @@ -238,7 +238,7 @@ T.purpose = transaction_purpose T.amount = "[transaction_amount]" T.source_terminal = machine_id - T.date = current_date_string + T.date = GLOB.current_date_string T.time = stationtime2text() linked_account.transaction_log.Add(T) @@ -271,7 +271,7 @@ T.purpose = transaction_purpose T.amount = "[transaction_amount]" T.source_terminal = machine_id - T.date = current_date_string + T.date = GLOB.current_date_string T.time = stationtime2text() linked_account.transaction_log.Add(T) diff --git a/code/modules/economy/machines/ATM.dm b/code/modules/economy/machines/ATM.dm index 0f6b18b0b22..46524b2e0e7 100644 --- a/code/modules/economy/machines/ATM.dm +++ b/code/modules/economy/machines/ATM.dm @@ -39,7 +39,7 @@ log transactions /obj/machinery/atm/Initialize(mapload) . = ..() - machine_id = "ATM Terminal #[num_financial_terminals++]" + machine_id = "ATM Terminal #[GLOB.num_financial_terminals++]" spark_system = new /datum/effect_system/spark_spread spark_system.set_up(5, 0, src) spark_system.attach(src) @@ -118,7 +118,7 @@ log transactions T.purpose = "Credit deposit" T.amount = amount T.source_terminal = machine_id - T.date = current_date_string + T.date = GLOB.current_date_string T.time = stationtime2text() authenticated_account.transaction_log.Add(T) attack_hand(user) @@ -246,7 +246,7 @@ log transactions T.target_name = "Account #[target_account_number]" T.purpose = transfer_purpose T.source_terminal = machine_id - T.date = current_date_string + T.date = GLOB.current_date_string T.time = stationtime2text() T.amount = "([transfer_amount])" authenticated_account.transaction_log.Add(T) @@ -288,7 +288,7 @@ log transactions T.target_name = failed_account.owner_name T.purpose = "Unauthorised login attempt" T.source_terminal = machine_id - T.date = current_date_string + T.date = GLOB.current_date_string T.time = stationtime2text() failed_account.transaction_log.Add(T) else @@ -308,7 +308,7 @@ log transactions T.target_name = authenticated_account.owner_name T.purpose = "Remote terminal access" T.source_terminal = machine_id - T.date = current_date_string + T.date = GLOB.current_date_string T.time = stationtime2text() authenticated_account.transaction_log.Add(T) @@ -336,7 +336,7 @@ log transactions T.purpose = "Credit withdrawal" T.amount = "([amount])" T.source_terminal = machine_id - T.date = current_date_string + T.date = GLOB.current_date_string T.time = stationtime2text() authenticated_account.transaction_log.Add(T) else @@ -361,7 +361,7 @@ log transactions T.purpose = "Credit withdrawal" T.amount = "([amount])" T.source_terminal = machine_id - T.date = current_date_string + T.date = GLOB.current_date_string T.time = stationtime2text() authenticated_account.transaction_log.Add(T) else @@ -374,7 +374,7 @@ log transactions R.info += "Account holder: [authenticated_account.owner_name]
" R.info += "Account number: [authenticated_account.account_number]
" R.info += "Balance: $[authenticated_account.money]
" - R.info += "Date and time: [stationtime2text()], [current_date_string]

" + R.info += "Date and time: [stationtime2text()], [GLOB.current_date_string]

" R.info += "Service terminal ID: [machine_id]
" //stamp the paper @@ -397,7 +397,7 @@ log transactions R.info = "Transaction logs
" R.info += "Account holder: [authenticated_account.owner_name]
" R.info += "Account number: [authenticated_account.account_number]
" - R.info += "Date and time: [stationtime2text()], [current_date_string]

" + R.info += "Date and time: [stationtime2text()], [GLOB.current_date_string]

" R.info += "Service terminal ID: [machine_id]
" R.info += "" R.info += "" @@ -472,7 +472,7 @@ log transactions T.target_name = authenticated_account.owner_name T.purpose = "Remote terminal access" T.source_terminal = machine_id - T.date = current_date_string + T.date = GLOB.current_date_string T.time = stationtime2text() authenticated_account.transaction_log.Add(T) diff --git a/code/modules/economy/machines/Accounts_DB.dm b/code/modules/economy/machines/Accounts_DB.dm index 03a3b5982c5..31ae5cbbdc0 100644 --- a/code/modules/economy/machines/Accounts_DB.dm +++ b/code/modules/economy/machines/Accounts_DB.dm @@ -27,7 +27,7 @@ T.target_name = target T.purpose = reason T.amount = amount - T.date = current_date_string + T.date = GLOB.current_date_string T.time = stationtime2text() T.source_terminal = machine_id return T @@ -42,7 +42,7 @@ /obj/machinery/account_database/Initialize(mapload, newdir) . = ..() - machine_id = "[station_name()] Acc. DB #[num_financial_terminals++]" + machine_id = "[station_name()] Acc. DB #[GLOB.num_financial_terminals++]" /obj/machinery/account_database/attackby(obj/O, mob/user) if(!istype(O, /obj/item/card/id)) @@ -73,7 +73,7 @@ data["machine_id"] = machine_id data["creating_new_account"] = creating_new_account data["detailed_account_view"] = !!detailed_account_view - data["station_account_number"] = station_account.account_number + data["GLOB.station_account_number"] = GLOB.station_account.account_number data["transactions"] = null data["accounts"] = null @@ -97,8 +97,8 @@ data["transactions"] = trx var/list/accounts[0] - for(var/i=1, i<=all_money_accounts.len, i++) - var/datum/money_account/D = all_money_accounts[i] + for(var/i=1, i<=GLOB.all_money_accounts.len, i++) + var/datum/money_account/D = GLOB.all_money_accounts[i] accounts.Add(list(list(\ "account_number"=D.account_number,\ "owner_name"=D.owner_name,\ @@ -144,17 +144,17 @@ var/account_name = href_list["holder_name"] var/starting_funds = max(text2num(href_list["starting_funds"]), 0) - starting_funds = clamp(starting_funds, 0, station_account.money) // Not authorized to put the station in debt. + starting_funds = clamp(starting_funds, 0, GLOB.station_account.money) // Not authorized to put the station in debt. starting_funds = min(starting_funds, fund_cap) // Not authorized to give more than the fund cap. create_account(account_name, starting_funds, src) if(starting_funds > 0) //subtract the money - station_account.money -= starting_funds + GLOB.station_account.money -= starting_funds //create a transaction log entry var/trx = create_transation(account_name, "New account activation", "([starting_funds])") - station_account.transaction_log.Add(trx) + GLOB.station_account.transaction_log.Add(trx) creating_new_account = 0 ui.close() @@ -178,8 +178,8 @@ if("view_account_detail") var/index = text2num(href_list["account_index"]) - if(index && index <= all_money_accounts.len) - detailed_account_view = all_money_accounts[index] + if(index && index <= GLOB.all_money_accounts.len) + detailed_account_view = GLOB.all_money_accounts[index] if("view_accounts_list") detailed_account_view = null @@ -187,14 +187,14 @@ if("revoke_payroll") var/funds = detailed_account_view.money - var/account_trx = create_transation(station_account.owner_name, "Revoke payroll", "([funds])") + var/account_trx = create_transation(GLOB.station_account.owner_name, "Revoke payroll", "([funds])") var/station_trx = create_transation(detailed_account_view.owner_name, "Revoke payroll", funds) - station_account.money += funds + GLOB.station_account.money += funds detailed_account_view.money = 0 detailed_account_view.transaction_log.Add(account_trx) - station_account.transaction_log.Add(station_trx) + GLOB.station_account.transaction_log.Add(station_trx) callHook("revoke_payroll", list(detailed_account_view)) @@ -256,8 +256,8 @@ "} - for(var/i=1, i<=all_money_accounts.len, i++) - var/datum/money_account/D = all_money_accounts[i] + for(var/i=1, i<=GLOB.all_money_accounts.len, i++) + var/datum/money_account/D = GLOB.all_money_accounts[i] text += {" diff --git a/code/modules/economy/machines/cash_register.dm b/code/modules/economy/machines/cash_register.dm index a0ac60f39f7..11eef2c7909 100644 --- a/code/modules/economy/machines/cash_register.dm +++ b/code/modules/economy/machines/cash_register.dm @@ -26,9 +26,9 @@ // Claim machine ID /obj/machinery/cash_register/Initialize(mapload, newdir) . = ..() - machine_id = "RETAIL UNIT #[num_financial_terminals++]" + machine_id = "RETAIL UNIT #[GLOB.num_financial_terminals++]" cash_stored = rand(10, 70)*10 - transaction_devices += src // Global reference list to be properly set up by /proc/setup_economy() + GLOB.transaction_devices += src // Global reference list to be properly set up by /proc/setup_economy() /obj/machinery/cash_register/examine(mob/user) . = ..() @@ -251,7 +251,7 @@ T.purpose = transaction_purpose T.amount = "([transaction_amount])" T.source_terminal = machine_id - T.date = current_date_string + T.date = GLOB.current_date_string T.time = stationtime2text() D.transaction_log.Add(T) @@ -261,7 +261,7 @@ T.purpose = transaction_purpose T.amount = "[transaction_amount]" T.source_terminal = machine_id - T.date = current_date_string + T.date = GLOB.current_date_string T.time = stationtime2text() linked_account.transaction_log.Add(T) @@ -299,7 +299,7 @@ T.purpose = transaction_purpose T.amount = "[transaction_amount]" T.source_terminal = machine_id - T.date = current_date_string + T.date = GLOB.current_date_string T.time = stationtime2text() linked_account.transaction_log.Add(T) diff --git a/code/modules/events/money_lotto.dm b/code/modules/events/money_lotto.dm index be6c68e0515..f6eb88b3d15 100644 --- a/code/modules/events/money_lotto.dm +++ b/code/modules/events/money_lotto.dm @@ -5,8 +5,8 @@ /datum/event/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 @@ -15,7 +15,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) diff --git a/code/modules/gamemaster/actions/money_hacker.dm b/code/modules/gamemaster/actions/money_hacker.dm index d9c51b113e6..a1362b967c4 100644 --- a/code/modules/gamemaster/actions/money_hacker.dm +++ b/code/modules/gamemaster/actions/money_hacker.dm @@ -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 diff --git a/code/modules/gamemaster/actions/money_lotto.dm b/code/modules/gamemaster/actions/money_lotto.dm index 7cc10910594..7ce265f9cb9 100644 --- a/code/modules/gamemaster/actions/money_lotto.dm +++ b/code/modules/gamemaster/actions/money_lotto.dm @@ -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) diff --git a/code/modules/gamemaster/actions/station_fundraise.dm b/code/modules/gamemaster/actions/station_fundraise.dm index 96d4299053a..c20293892f5 100644 --- a/code/modules/gamemaster/actions/station_fundraise.dm +++ b/code/modules/gamemaster/actions/station_fundraise.dm @@ -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 diff --git a/code/modules/jobs/job.dm b/code/modules/jobs/job.dm index 331bbf17e80..1b0177a619b 100644 --- a/code/modules/jobs/job.dm +++ b/code/modules/jobs/job.dm @@ -59,7 +59,7 @@ /datum/job/New() . = ..() - department_accounts = department_accounts || departments_managed + GLOB.department_accounts = GLOB.department_accounts || departments_managed /datum/job/proc/equip(var/mob/living/carbon/human/H, var/alt_title) var/datum/outfit/outfit = get_outfit(H, alt_title) diff --git a/code/modules/modular_computers/laptop_vendor.dm b/code/modules/modular_computers/laptop_vendor.dm index 2ff33b8e5b5..8dd44e93299 100644 --- a/code/modules/modular_computers/laptop_vendor.dm +++ b/code/modules/modular_computers/laptop_vendor.dm @@ -302,7 +302,7 @@ T.purpose = "Purchase of [(devtype == 1) ? "laptop computer" : "tablet microcomputer"]." T.amount = total_price T.source_terminal = src.name - T.date = current_date_string + T.date = GLOB.current_date_string T.time = stationtime2text() customer_account.transaction_log.Add(T) return 1 diff --git a/code/modules/nifsoft/nif_softshop.dm b/code/modules/nifsoft/nif_softshop.dm index 2fa42f7eeb3..c347e0d913e 100644 --- a/code/modules/nifsoft/nif_softshop.dm +++ b/code/modules/nifsoft/nif_softshop.dm @@ -160,7 +160,7 @@ return else currently_vending = R - if(!vendor_account || vendor_account.suspended) + if(!GLOB.vendor_account || GLOB.vendor_account.suspended) status_message = "This machine is currently unable to process payments due to problems with the associated account." status_error = 1 else
#[D.account_number]