Department accounts are created now and credentials given to heads.

This commit is contained in:
cib
2013-02-27 01:55:18 +01:00
parent 3e4205ffad
commit 26b4deb33f
4 changed files with 333 additions and 1 deletions

View File

@@ -1,6 +1,7 @@
var/global/current_date_string
var/global/num_financial_terminals = 1
var/global/datum/money_account/station_account
var/global/list/datum/money_account/department_accounts = list()
var/global/next_account_number = 0
var/global/obj/machinery/account_database/centcomm_account_db
@@ -28,6 +29,31 @@ var/global/obj/machinery/account_database/centcomm_account_db
for(var/obj/machinery/account_database/A in world)
A.accounts.Add(station_account)
/proc/create_department_account(department)
next_account_number = rand(111111, 999999)
var/datum/money_account/department_account = new()
department_account.owner_name = "[department] Account"
department_account.account_number = rand(111111, 999999)
department_account.remote_access_pin = rand(1111, 111111)
department_account.money = 5000
//create an entry in the account transaction log for when it was created
var/datum/transaction/T = new()
T.target_name = department_account.owner_name
T.purpose = "Account creation"
T.amount = department_account.money
T.date = "2nd April, 2555"
T.time = "11:24"
T.source_terminal = "Biesel GalaxyNet Terminal #277"
//add the account
department_account.transaction_log.Add(T)
for(var/obj/machinery/account_database/A in world)
A.accounts.Add(department_account)
department_accounts[department] = department_account
//the current ingame time (hh:mm) can be obtained by calling:
//worldtime2text()
@@ -70,6 +96,10 @@ var/global/obj/machinery/account_database/centcomm_account_db
if(!station_account)
create_station_account()
if(department_accounts.len == 0)
for(var/department in station_departments)
create_department_account(department)
if(!current_date_string)
current_date_string = "[num2text(rand(1,31))] [pick("January","February","March","April","May","June","July","August","September","October","November","December")], 2557"

View File

@@ -0,0 +1,70 @@
var/list/station_departments = list("Command", "Medical", "Engineering", "Science", "Security", "Cargo", "Civilian")
// The department the job belongs to.
/datum/job/var/department = null
// Whether this is a head position
/datum/job/var/head_position = 0
/datum/job/captain/department = "Command"
/datum/job/captain/head_position = 1
/datum/job/hop/department = "Civilian"
/datum/job/hop/head_position = 1
/datum/job/assistant/department = "Civilian"
/datum/job/bartender/department = "Civilian"
/datum/job/chef/department = "Civilian"
/datum/job/hydro/department = "Civilian"
/datum/job/mining/department = "Civilian"
/datum/job/janitor/department = "Civilian"
/datum/job/librarian/department = "Civilian"
/datum/job/lawyer/department = "Civilian"
/datum/job/chaplain/department = "Civilian"
/datum/job/qm/department = "Cargo"
/datum/job/qm/head_position = 1
/datum/job/cargo_tech/department = "Cargo"
/datum/job/chief_engineer/department = "Engineering"
/datum/job/chief_engineer/head_position = 1
/datum/job/engineer/department = "Engineering"
/datum/job/atmos/department = "Engineering"
/datum/job/cmo/department = "Medical"
/datum/job/cmo/head_position = 1
/datum/job/doctor/department = "Medical"
/datum/job/chemist/department = "Medical"
/datum/job/geneticist/department = "Medical"
/datum/job/psychiatrist/department = "Medical"
/datum/job/rd/department = "Science"
/datum/job/rd/head_position = 1
/datum/job/scientist/department = "Science"
/datum/job/roboticist/department = "Science"
/datum/job/hos/department = "Security"
/datum/job/hos/head_position = 1
/datum/job/warden/department = "Security"
/datum/job/detective/department = "Security"
/datum/job/officer/department = "Security"