This paper has been stamped by the Accounts Database."
-
//add the account
M.transaction_log.Add(T)
accounts.Add(M)
+ return M
+
/obj/machinery/account_database/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 accounts)
if(D.account_number == attempt_account_number)
diff --git a/code/WorkInProgress/Cael_Aislinn/Economy/EFTPOS.dm b/code/WorkInProgress/Cael_Aislinn/Economy/EFTPOS.dm
index 9cc56e5ac6b..aebb3da1ae1 100644
--- a/code/WorkInProgress/Cael_Aislinn/Economy/EFTPOS.dm
+++ b/code/WorkInProgress/Cael_Aislinn/Economy/EFTPOS.dm
@@ -1,8 +1,8 @@
/obj/item/device/eftpos
name = "EFTPOS scanner"
desc = "Swipe your ID card to pay electronically."
- icon_state = "eftpos"
- var/machine_id = ""
+ icon = 'icons/obj/device.dmi'
+ icon_state = "eftpos" var/machine_id = ""
var/eftpos_name = "Default EFTPOS scanner"
var/transaction_locked = 0
var/transaction_paid = 0
@@ -17,14 +17,15 @@
machine_id = "[station_name()] EFTPOS #[num_financial_terminals++]"
access_code = rand(1111,111111)
reconnect_database()
- print_reference()
+ spawn(0)
+ print_reference()
//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
/obj/item/device/eftpos/proc/print_reference()
- var/obj/item/weapon/paper/R = new(get_turf(src))
+ var/obj/item/weapon/paper/R = new(src.loc)
R.name = "Reference: [eftpos_name]"
R.info = "[eftpos_name] reference
"
R.info += "Access code: [access_code]
"
@@ -38,9 +39,12 @@
R.stamped += /obj/item/weapon/stamp
R.overlays += stampoverlay
R.stamps += "This paper has been stamped by the EFTPOS device."
+ var/obj/item/smallDelivery/D = new(R.loc)
+ R.loc = D
+ D.wrapped = R
+ D.name = "small parcel - 'EFTPOS access code'"
-/obj/item/device/eftpos/proc/reconnect_database()
- for(var/obj/machinery/account_database/DB in world)
+/obj/item/weapon/eftpos/proc/reconnect_database() for(var/obj/machinery/account_database/DB in world)
if(DB.z == src.z)
linked_db = DB
break
@@ -66,7 +70,9 @@
dat += "Transaction purpose: [transaction_purpose] "
dat += "Value: $[transaction_amount] "
dat += "Linked account: [linked_account ? linked_account.owner_name : "None"]"
- dat += "Change access code"
+ dat += "Change access code "
+ dat += "Change EFTPOS ID "
+ dat += "Scan card to reset access code \[------\]"
user << browse(dat,"window=eftpos")
else
user << browse(null,"window=eftpos")
@@ -76,9 +82,12 @@
//attempt to connect to a new db, and if that doesn't work then fail
if(!linked_db)
reconnect_database()
- if(linked_db && linked_account)
- var/obj/item/weapon/card/I = O
- scan_card(I)
+ if(linked_db)
+ if(linked_account)
+ var/obj/item/weapon/card/I = O
+ scan_card(I)
+ else
+ usr << "\icon[src]Unable to connect to linked account."
else
usr << "\icon[src]Unable to connect to accounts database."
else
@@ -94,13 +103,22 @@
print_reference()
else
usr << "\icon[src]Incorrect code entered."
+ if("change_id")
+ var/attempt_code = text2num(input("Re-enter the current EFTPOS access code", "Confirm EFTPOS code"))
+ if(attempt_code == access_code)
+ eftpos_name = input("Enter a new terminal ID for this device", "Enter new EFTPOS ID") + " EFTPOS scanner"
+ print_reference()
+ else
+ usr << "\icon[src]Incorrect code entered."
if("link_account")
+ if(!linked_db)
+ reconnect_database()
if(linked_db)
var/attempt_account_num = input("Enter account number to pay EFTPOS charges into", "New account number") as num
var/attempt_pin = input("Enter pin code", "Account pin") as num
linked_account = linked_db.attempt_account_access(attempt_account_num, attempt_pin, 1)
else
- usr << "Unable to connect to accounts database."
+ usr << "\icon[src]Unable to connect to accounts database."
if("trans_purpose")
transaction_purpose = input("Enter reason for EFTPOS transaction", "Transaction purpose")
if("trans_value")
@@ -125,6 +143,14 @@
scan_card(I)
else
usr << "\icon[src]Unable to link accounts."
+ if("reset")
+ //reset the access code - requires HoP/captain access
+ var/obj/item/I = usr.get_active_hand()
+ if (istype(I, /obj/item/weapon/card))
+ var/obj/item/weapon/card/C = I
+ if(access_cent_captain in C.access || access_hop in C.access || access_captain in C.access)
+ access_code = 0
+ usr << "\icon[src]Access code reset to 0."
src.attack_self(usr)
@@ -148,7 +174,7 @@
//create entries in the two account transaction logs
var/datum/transaction/T = new()
- T.target_name = "[linked_account.owner_name] ([eftpos_name])"
+ T.target_name = "[linked_account.owner_name] (via [eftpos_name])"
T.purpose = transaction_purpose
if(transaction_amount > 0)
T.amount = "([transaction_amount])"
diff --git a/code/WorkInProgress/Mini/ATM.dm b/code/WorkInProgress/Mini/ATM.dm
index 68a6c39942e..3394753d71c 100644
--- a/code/WorkInProgress/Mini/ATM.dm
+++ b/code/WorkInProgress/Mini/ATM.dm
@@ -114,11 +114,11 @@ log transactions
switch(view_screen)
if(CHANGE_SECURITY_LEVEL)
dat += "Select a new security level for this account: "
- var/text = "Zero - Only account number or card is required to access this account. EFTPOS transactions will require a card and ask for a pin, but not verify the pin is correct."
+ var/text = "Zero - Either the account number or card is required to access this account. EFTPOS transactions will require a card and ask for a pin, but not verify the pin is correct."
if(authenticated_account.security_level != 0)
text = "[text]"
dat += "[text]"
- text = "One - Both an account number and pin is required to access this account and process transactions."
+ text = "One - An account number and pin must be manually entered to access this account and process transactions."
if(authenticated_account.security_level != 1)
text = "[text]"
dat += "[text]"
@@ -185,7 +185,7 @@ log transactions
dat += "Unable to connect to accounts database, please retry and if the issue persists contact NanoTrasen IT support."
reconnect_database()
- user << browse(dat,"window=atm;size=500x650")
+ user << browse(dat,"window=atm;size=550x650")
else
user << browse(null,"window=atm")
diff --git a/code/datums/mind.dm b/code/datums/mind.dm
index 82f2e0ffad3..c472c22b581 100644
--- a/code/datums/mind.dm
+++ b/code/datums/mind.dm
@@ -61,6 +61,8 @@ datum/mind
New(var/key)
src.key = key
+ //put this here for easier tracking ingame
+ var/datum/money_account/initial_account
proc/transfer_to(mob/living/new_character)
if(!istype(new_character))
diff --git a/code/datums/supplypacks.dm b/code/datums/supplypacks.dm
index 904866d07c6..c5e3c7f84c4 100755
--- a/code/datums/supplypacks.dm
+++ b/code/datums/supplypacks.dm
@@ -894,3 +894,11 @@ var/list/all_supply_groups = list("Operations","Security","Hospitality","Enginee
containername = "Experimental shield capacitor"
group = "Engineering"
access = access_ce
+
+/datum/supply_packs/eftpos
+ contains = list(/obj/item/weapon/eftpos)
+ name = "EFTPOS scanner"
+ cost = 10
+ containertype = /obj/structure/closet/crate
+ containername = "EFTPOS crate"
+ group = "Operations"
diff --git a/code/game/area/areas.dm b/code/game/area/areas.dm
index 9900434f1cf..ffb194f79fa 100644
--- a/code/game/area/areas.dm
+++ b/code/game/area/areas.dm
@@ -269,17 +269,17 @@
if(prob(35))
if(istype(src, /area/chapel))
- sound = pick('sound/ambience/ambicha1.ogg','sound/ambience/ambicha2.ogg','sound/ambience/ambicha3.ogg','sound/ambience/ambicha4.ogg')
+ sound = pick('sound/ambience/ambicha1.ogg','sound/ambience/ambicha2.ogg','sound/ambience/ambicha3.ogg','sound/ambience/ambicha4.ogg','sound/music/traitor.ogg')
else if(istype(src, /area/medical/morgue))
- sound = pick('sound/ambience/ambimo1.ogg','sound/ambience/ambimo2.ogg','sound/ambience/title2.ogg')
+ sound = pick('sound/ambience/ambimo1.ogg','sound/ambience/ambimo2.ogg','sound/music/main.ogg')
else if(type == /area)
- sound = pick('sound/ambience/ambispace.ogg','sound/ambience/title2.ogg',)
+ sound = pick('sound/ambience/ambispace.ogg','sound/music/title2.ogg','sound/music/space.ogg','sound/music/main.ogg','sound/music/traitor.ogg')
else if(istype(src, /area/engine))
sound = pick('sound/ambience/ambisin1.ogg','sound/ambience/ambisin2.ogg','sound/ambience/ambisin3.ogg','sound/ambience/ambisin4.ogg')
else if(istype(src, /area/AIsattele) || istype(src, /area/turret_protected/ai) || istype(src, /area/turret_protected/ai_upload) || istype(src, /area/turret_protected/ai_upload_foyer))
sound = pick('sound/ambience/ambimalf.ogg')
else if(istype(src, /area/mine/explored) || istype(src, /area/mine/unexplored))
- sound = pick('sound/ambience/ambimine.ogg')
+ sound = pick('sound/ambience/ambimine.ogg', 'sound/ambience/song_game.ogg')
musVolume = 25
else if(istype(src, /area/tcommsat) || istype(src, /area/turret_protected/tcomwest) || istype(src, /area/turret_protected/tcomeast) || istype(src, /area/turret_protected/tcomfoyer) || istype(src, /area/turret_protected/tcomsat))
sound = pick('sound/ambience/ambisin2.ogg', 'sound/ambience/signal.ogg', 'sound/ambience/signal.ogg', 'sound/ambience/ambigen10.ogg')
diff --git a/code/game/gamemodes/gameticker.dm b/code/game/gamemodes/gameticker.dm
index 6f3ca781339..3c803be1f5d 100644
--- a/code/game/gamemodes/gameticker.dm
+++ b/code/game/gamemodes/gameticker.dm
@@ -37,9 +37,9 @@ var/global/datum/controller/gameticker/ticker
var/triai = 0//Global holder for Triumvirate
/datum/controller/gameticker/proc/pregame()
- login_music = pick('sound/ambience/title2.ogg','sound/ambience/title1.ogg','sound/ambience/b12_combined_start.ogg') // choose title music!
- for(var/mob/new_player/M in mob_list)
- if(M.client) M.client.playtitlemusic()
+ login_music = pick(\
+ 'sound/music/title1.ogg',\
+ 'sound/music/b12_combined_start.ogg')
do
pregame_timeleft = 180
world << "Welcome to the pre-game lobby!"
@@ -105,6 +105,13 @@ var/global/datum/controller/gameticker/ticker
else
src.mode.announce()
+ //setup the money accounts
+ if(!centcomm_account_db)
+ for(var/obj/machinery/account_database/check_db in world)
+ if(check_db.z == 2)
+ centcomm_account_db = check_db
+ break
+
create_characters() //Create player characters and transfer them
collect_minds()
equip_characters()
diff --git a/code/game/jobs/job_controller.dm b/code/game/jobs/job_controller.dm
index 03f577659a5..1214110b64b 100644
--- a/code/game/jobs/job_controller.dm
+++ b/code/game/jobs/job_controller.dm
@@ -324,6 +324,25 @@ var/global/datum/controller/occupations/job_master
if(istype(S, /obj/effect/landmark/start) && istype(S.loc, /turf))
H.loc = S.loc
+ //give them an account in the station database
+ if(centcomm_account_db)
+ var/datum/money_account/M = centcomm_account_db.add_account(H.real_name, starting_funds = rand(50,500)*10, pre_existing = 1)
+ if(H.mind)
+ var/remembered_info = ""
+ remembered_info += "Your account number is: #[M.account_number] "
+ remembered_info += "Your account pin is: [M.remote_access_pin] "
+ remembered_info += "Your account funds are: $[M.money] "
+
+ if(M.transaction_log.len)
+ var/datum/transaction/T = M.transaction_log[1]
+ remembered_info += "Your account was created: [T.time], [T.date] at [T.source_terminal] "
+ H.mind.store_memory(remembered_info)
+
+ H.mind.initial_account = M
+
+ spawn(0)
+ H << "\blueYour account number is: [M.account_number], your account pin is: [M.remote_access_pin]"
+
var/alt_title = null
if(H.mind)
H.mind.assigned_role = rank
@@ -385,13 +404,20 @@ var/global/datum/controller/occupations/job_master
C.rank = rank
C.assignment = title ? title : rank
C.name = "[C.registered_name]'s ID Card ([C.assignment])"
+
+ //put the player's account number onto the ID
+ if(H.mind && H.mind.initial_account)
+ C.associated_account_number = H.mind.initial_account.account_number
+
H.equip_to_slot_or_del(C, slot_wear_id)
+
H.equip_to_slot_or_del(new /obj/item/device/pda(H), slot_belt)
if(locate(/obj/item/device/pda,H))
var/obj/item/device/pda/pda = locate(/obj/item/device/pda,H)
pda.owner = H.real_name
pda.ownjob = C.assignment
pda.name = "PDA-[H.real_name] ([pda.ownjob])"
+
return 1
diff --git a/code/game/machinery/computer/card.dm b/code/game/machinery/computer/card.dm
index 5e9b8256e54..8cee9f811c4 100644
--- a/code/game/machinery/computer/card.dm
+++ b/code/game/machinery/computer/card.dm
@@ -124,6 +124,14 @@
var nameField = document.getElementById('namefield');
nameField.style.backgroundColor = "#DDFFDD";
}
+ function markAccountGreen(){
+ var nameField = document.getElementById('accountfield');
+ nameField.style.backgroundColor = "#DDFFDD";
+ }
+ function markAccountRed(){
+ var nameField = document.getElementById('accountfield');
+ nameField.style.backgroundColor = "#FFDDDD";
+ }
function showAll(){
var allJobsSlot = document.getElementById('alljobsslot');
allJobsSlot.innerHTML = "hide "+ "[jobs_all]";
@@ -139,10 +147,16 @@
carddesc += "registered_name: "
carddesc += ""
carddesc += ""
+
+ carddesc += ""
+
carddesc += "Assignment: "
-
var/jobs = "[target_rank]" //CHECK THIS
-
var/accesses = ""
if(istype(src,/obj/machinery/computer/card/centcom))
accesses += "
Central Command:
"
@@ -270,6 +284,13 @@
modify.registered_name = temp_name
else
src.visible_message("[src] buzzes rudely.")
+ if ("account")
+ if (authenticated)
+ var/t2 = modify
+ //var/t1 = input(usr, "What name?", "ID computer", null) as text
+ if ((authenticated && modify == t2 && (in_range(src, usr) || (istype(usr, /mob/living/silicon))) && istype(loc, /turf)))
+ var/account_num = text2num(href_list["account"])
+ modify.associated_account_number = account_num
if ("mode")
mode = text2num(href_list["mode_target"])
if ("print")
diff --git a/code/game/machinery/turrets.dm b/code/game/machinery/turrets.dm
index 1597ea83fad..51ccee7fc56 100644
--- a/code/game/machinery/turrets.dm
+++ b/code/game/machinery/turrets.dm
@@ -190,6 +190,12 @@
targeting_active = 1
target()
targeting_active = 0
+
+ if(prob(15))
+ if(prob(50))
+ playsound(src.loc, 'sound/effects/turret/move1.wav', 60, 1)
+ else
+ playsound(src.loc, 'sound/effects/turret/move2.wav', 60, 1)
else if(!isPopping())//else, pop down
if(!isDown())
popDown()
@@ -244,6 +250,7 @@
if ((!isPopping()) || src.popping==-1)
invisibility = 0
popping = 1
+ playsound(src.loc, 'sound/effects/turret/open.wav', 60, 1)
if (src.cover!=null)
flick("popup", src.cover)
src.cover.icon_state = "openTurretCover"
@@ -253,6 +260,7 @@
/obj/machinery/turret/proc/popDown()
if ((!isPopping()) || src.popping==1)
popping = -1
+ playsound(src.loc, 'sound/effects/turret/open.wav', 60, 1)
if (src.cover!=null)
flick("popdown", src.cover)
src.cover.icon_state = "turretCover"
diff --git a/code/game/objects/items/weapons/storage/wallets.dm b/code/game/objects/items/weapons/storage/wallets.dm
index 7c3e70420fd..86b12f693ec 100644
--- a/code/game/objects/items/weapons/storage/wallets.dm
+++ b/code/game/objects/items/weapons/storage/wallets.dm
@@ -1,7 +1,7 @@
/obj/item/weapon/storage/wallet
name = "wallet"
desc = "It can hold a few small and personal things."
- storage_slots = 4
+ storage_slots = 10
icon_state = "wallet"
w_class = 2
can_hold = list(
diff --git a/html/changelog.html b/html/changelog.html
index 2071172483a..abf962a5cb8 100644
--- a/html/changelog.html
+++ b/html/changelog.html
@@ -58,6 +58,17 @@ Stuff which is in development and not yet visible to players or just code relate
should be listed in the changelog upon commit though. Thanks. -->
+
+
+
February 23rd 2013
+
Cael Aislinn updated:
+
+
Finances! Players spawn with an account, and money can be transferred between accounts, withdrawn/deposited at ATMs and charged to accounts via EFTPOS scanners.
+ All players start with 500-5000 credits, credits can no longer be merged and only credits can be deposited into ATMs - so shelter your illegitimately gotten gains in physical assets and remember that fraud is frowned upon!
+
Turrets are no longer noiseless as the grave. Listen for the sound of machinery in their proximity.
+
+
+
22/02/2013
Chinsky updated:
diff --git a/icons/obj/device.dmi b/icons/obj/device.dmi
index 35f743a9a36..2128d6774f7 100644
Binary files a/icons/obj/device.dmi and b/icons/obj/device.dmi differ
diff --git a/sound/effects/3.wav b/sound/effects/3.wav
new file mode 100644
index 00000000000..b43aef90db1
Binary files /dev/null and b/sound/effects/3.wav differ
diff --git a/sound/effects/turret/move1.wav b/sound/effects/turret/move1.wav
new file mode 100644
index 00000000000..89ffcc29dc6
Binary files /dev/null and b/sound/effects/turret/move1.wav differ
diff --git a/sound/effects/turret/move2.wav b/sound/effects/turret/move2.wav
new file mode 100644
index 00000000000..b25dcfa7beb
Binary files /dev/null and b/sound/effects/turret/move2.wav differ
diff --git a/sound/effects/turret/open.wav b/sound/effects/turret/open.wav
new file mode 100644
index 00000000000..5441f92f690
Binary files /dev/null and b/sound/effects/turret/open.wav differ
diff --git a/sound/misc/TestLoop1.ogg b/sound/misc/TestLoop1.ogg
new file mode 100644
index 00000000000..5e1210bfd06
Binary files /dev/null and b/sound/misc/TestLoop1.ogg differ
diff --git a/sound/music/1.ogg b/sound/music/1.ogg
new file mode 100644
index 00000000000..5e15c8ccc01
Binary files /dev/null and b/sound/music/1.ogg differ
diff --git a/sound/music/THUNDERDOME.ogg b/sound/music/THUNDERDOME.ogg
new file mode 100644
index 00000000000..0a36b251b79
Binary files /dev/null and b/sound/music/THUNDERDOME.ogg differ
diff --git a/sound/ambience/b12_combined_start.ogg b/sound/music/b12_combined_start.ogg
similarity index 100%
rename from sound/ambience/b12_combined_start.ogg
rename to sound/music/b12_combined_start.ogg
diff --git a/sound/music/clouds.s3m b/sound/music/clouds.s3m
new file mode 100644
index 00000000000..06c88c3f43f
Binary files /dev/null and b/sound/music/clouds.s3m differ
diff --git a/sound/music/main.ogg b/sound/music/main.ogg
new file mode 100644
index 00000000000..b9e37cb65c4
Binary files /dev/null and b/sound/music/main.ogg differ
diff --git a/music/music help.txt b/sound/music/music help.txt
similarity index 100%
rename from music/music help.txt
rename to sound/music/music help.txt
diff --git a/sound/music/space.ogg b/sound/music/space.ogg
new file mode 100644
index 00000000000..d3b934d521e
Binary files /dev/null and b/sound/music/space.ogg differ
diff --git a/sound/ambience/title1.ogg b/sound/music/title1.ogg
similarity index 100%
rename from sound/ambience/title1.ogg
rename to sound/music/title1.ogg
diff --git a/sound/ambience/title2.ogg b/sound/music/title2.ogg
similarity index 100%
rename from sound/ambience/title2.ogg
rename to sound/music/title2.ogg
diff --git a/sound/music/traitor.ogg b/sound/music/traitor.ogg
new file mode 100644
index 00000000000..383d1edbe4b
Binary files /dev/null and b/sound/music/traitor.ogg differ