mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-11 10:43:20 +00:00
moved money accounts into a global list + removed db syncing (some procs could be global but left where they are for convenience), fixed an issue with latejoiners having no account, fixed a runtime
Signed-off-by: Cael_Aislinn <cael_aislinn@yahoo.com.au>
This commit is contained in:
@@ -8,12 +8,13 @@
|
||||
var/obj/machinery/account_database/affected_db
|
||||
|
||||
/datum/event/money_hacker/setup()
|
||||
for(var/obj/machinery/account_database/DB in world)
|
||||
if( DB.z == 1 && !(DB.stat&NOPOWER) && DB.activated && DB.accounts.len)
|
||||
affected_db = DB
|
||||
break
|
||||
if(all_money_accounts.len)
|
||||
for(var/obj/machinery/account_database/DB in world)
|
||||
if( DB.z == 1 && !(DB.stat&NOPOWER) && DB.activated )
|
||||
affected_db = DB
|
||||
break
|
||||
if(affected_db)
|
||||
affected_account = pick(affected_db.accounts)
|
||||
affected_account = pick(all_money_accounts.len)
|
||||
else
|
||||
kill()
|
||||
return
|
||||
|
||||
@@ -7,8 +7,8 @@
|
||||
|
||||
/datum/event/money_lotto/start()
|
||||
winner_sum = pick(5000, 10000, 50000, 100000, 500000, 1000000, 1500000)
|
||||
if(centcomm_account_db.accounts.len)
|
||||
var/datum/money_account/D = pick(centcomm_account_db.accounts)
|
||||
if(all_money_accounts.len)
|
||||
var/datum/money_account/D = pick(all_money_accounts)
|
||||
D.money += winner_sum
|
||||
|
||||
var/datum/transaction/T = new()
|
||||
|
||||
Reference in New Issue
Block a user