diff --git a/code/WorkInProgress/Cael_Aislinn/Economy/Accounts.dm b/code/WorkInProgress/Cael_Aislinn/Economy/Accounts.dm index e95e2b2c458..3c1d3570b77 100644 --- a/code/WorkInProgress/Cael_Aislinn/Economy/Accounts.dm +++ b/code/WorkInProgress/Cael_Aislinn/Economy/Accounts.dm @@ -63,6 +63,7 @@ var/global/obj/machinery/account_database/centcomm_account_db var/access_level = 0 var/datum/money_account/detailed_account_view var/creating_new_account = 0 + var/activated = 1 /obj/machinery/account_database/New() ..() @@ -81,6 +82,7 @@ var/global/obj/machinery/account_database/centcomm_account_db dat += "Confirm identity: [held_card ? held_card : "-----"]
" if(access_level > 0) + dat += "Toggle remote access to this database (warning!)" dat += "You may not edit accounts at this terminal, only create and view them.
" if(creating_new_account) dat += "
" @@ -151,6 +153,10 @@ var/global/obj/machinery/account_database/centcomm_account_db ..() /obj/machinery/account_database/Topic(var/href, var/href_list) + + if(href_list["toggle_activated"]) + activated = !activated + if(href_list["choice"]) switch(href_list["choice"]) if("sync_accounts") @@ -283,6 +289,8 @@ var/global/obj/machinery/account_database/centcomm_account_db return M /obj/machinery/account_database/proc/charge_to_account(var/attempt_account_number, var/source_name, var/purpose, var/terminal_id, var/amount) + if(!activated) + return 0 for(var/datum/money_account/D in accounts) if(D.account_number == attempt_account_number) D.money += amount @@ -306,6 +314,8 @@ var/global/obj/machinery/account_database/centcomm_account_db //this returns the first account datum that matches the supplied accnum/pin combination, it returns null if the combination did not match any account /obj/machinery/account_database/proc/attempt_account_access(var/attempt_account_number, var/attempt_pin_number, var/security_level_passed = 0) + if(!activated) + return 0 for(var/datum/money_account/D in 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) ) diff --git a/code/WorkInProgress/Cael_Aislinn/Economy/Economy.dm b/code/WorkInProgress/Cael_Aislinn/Economy/Economy.dm index 95163f043c7..84000d1b46f 100644 --- a/code/WorkInProgress/Cael_Aislinn/Economy/Economy.dm +++ b/code/WorkInProgress/Cael_Aislinn/Economy/Economy.dm @@ -14,6 +14,17 @@ #define ANIMAL_RIGHTS_RAID 13 #define FESTIVAL 14 +#define RESEARCH_BREAKTHROUGH 15 +#define BARGAINS 16 +#define SONG_DEBUT 17 +#define MOVIE_RELEASE 18 +#define BIG_GAME_HUNTERS 19 +#define ELECTION 20 +#define GOSSIP 21 +#define TOURISM 22 +#define CELEBRITY_DEATH 23 +#define RESIGNATION 24 + #define DEFAULT 1 #define ADMINISTRATIVE 2 @@ -54,10 +65,25 @@ var/setup_economy = 0 /proc/setup_economy() + if(setup_economy) + return var/datum/feed_channel/newChannel = new /datum/feed_channel newChannel.channel_name = "Tau Ceti Daily" newChannel.author = "CentComm Minister of Information" newChannel.locked = 1 newChannel.is_admin_channel = 1 news_network.network_channels += newChannel - setup_economy = 1 + + newChannel = new /datum/feed_channel + newChannel.channel_name = "The Gibson Gazette" + newChannel.author = "Editor Mike Hammers" + newChannel.locked = 1 + newChannel.is_admin_channel = 1 + news_network.network_channels += newChannel + + for(var/loc_type in typesof(/datum/trade_destination) - /datum/trade_destination) + var/datum/trade_destination/D = new loc_type + weighted_randomevent_locations[D] = D.viable_random_events.len + weighted_mundaneevent_locations[D] = D.viable_mundane_events.len + + setup_economy = 1 \ No newline at end of file diff --git a/code/WorkInProgress/Mini/ATM.dm b/code/WorkInProgress/Mini/ATM.dm index 83c1f911865..68f9315182a 100644 --- a/code/WorkInProgress/Mini/ATM.dm +++ b/code/WorkInProgress/Mini/ATM.dm @@ -40,6 +40,15 @@ log transactions machine_id = "[station_name()] RT #[num_financial_terminals++]" /obj/machinery/atm/process() + if(stat & NOPOWER) + return + + if(linked_db && linked_db.stat & NOPOWER) + linked_db = null + authenticated_account = null + src.visible_message("\red \icon[src] [src] buzzes rudely, \"Connection to remote database lost.\"") + updateDialog() + if(ticks_left_timeout > 0) ticks_left_timeout-- if(ticks_left_timeout <= 0) @@ -59,7 +68,7 @@ log transactions /obj/machinery/atm/proc/reconnect_database() for(var/obj/machinery/account_database/DB in world) - if(DB.z == src.z) + if(DB.z == src.z && !DB.stat & NOPOWER) linked_db = DB break diff --git a/code/game/gamemodes/gameticker.dm b/code/game/gamemodes/gameticker.dm index 3c803be1f5d..7ba18a69120 100644 --- a/code/game/gamemodes/gameticker.dm +++ b/code/game/gamemodes/gameticker.dm @@ -118,6 +118,9 @@ var/global/datum/controller/gameticker/ticker data_core.manifest() current_state = GAME_STATE_PLAYING + //here to initialize the random events nicely at round start + setup_economy() + spawn(0)//Forking here so we dont have to wait for this to finish mode.post_setup() //Cleanup some stuff