mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-07-21 12:04:48 +01:00
Economy Changes Phase 1
This commit is contained in:
@@ -211,7 +211,15 @@
|
||||
world << "<b>The crew's final score is:</b>"
|
||||
world << "<b><font size='4'>[score_crewscore]</font></b>"
|
||||
for(var/mob/E in player_list)
|
||||
if(E.client) E.scorestats()
|
||||
if(E.client)
|
||||
E.scorestats()
|
||||
if(!istype(E,/mob/living/carbon/human)) continue
|
||||
if(E.z != 2) continue
|
||||
var/mob/living/carbon/human/H = E
|
||||
var/datum/money_account/player_account = H.mind.initial_account
|
||||
player_account.money += 1000
|
||||
player_account.update_balance(player_account.account_number, player_account.money)
|
||||
H << "You have been paid 1000 credits for having survived the shift."
|
||||
return
|
||||
|
||||
|
||||
|
||||
@@ -405,7 +405,7 @@ var/global/datum/controller/occupations/job_master
|
||||
H.buckled.loc = H.loc
|
||||
H.buckled.dir = H.dir
|
||||
|
||||
var/datum/money_account/M = create_account(H.real_name, rand(50,500)*10, null)
|
||||
var/datum/money_account/M = create_account(H.real_name, 1000, null)
|
||||
if(H.mind)
|
||||
var/remembered_info = ""
|
||||
|
||||
@@ -413,13 +413,11 @@ var/global/datum/controller/occupations/job_master
|
||||
remembered_info += "<b>Your account pin is:</b> [M.remote_access_pin]<br>"
|
||||
remembered_info += "<b>Your account funds are:</b> $[M.money]<br>"
|
||||
|
||||
if(M.transaction_log.len)
|
||||
var/datum/transaction/T = M.transaction_log[1]
|
||||
remembered_info += "<b>Your account was created:</b> [T.time], [T.date] at [T.source_terminal]<br>"
|
||||
H.mind.store_memory(remembered_info)
|
||||
|
||||
H.mind.initial_account = M
|
||||
|
||||
/*
|
||||
// If they're head, give them the account info for their department
|
||||
if(H.mind && job.head_position)
|
||||
var/remembered_info = ""
|
||||
@@ -431,7 +429,7 @@ var/global/datum/controller/occupations/job_master
|
||||
remembered_info += "<b>Your department's account funds are:</b> $[department_account.money]<br>"
|
||||
|
||||
H.mind.store_memory(remembered_info)
|
||||
|
||||
*/
|
||||
spawn(0)
|
||||
H << "\blue<b>Your account number is: [M.account_number], your account pin is: [M.remote_access_pin]</b>"
|
||||
|
||||
|
||||
@@ -248,48 +248,51 @@
|
||||
if (istype(I, /obj/item/weapon/card/id))
|
||||
var/obj/item/weapon/card/id/C = I
|
||||
visible_message("<span class='info'>[usr] swipes a card through [src].</span>")
|
||||
if(vendor_account)
|
||||
var/datum/money_account/D = attempt_account_access_nosec(C.associated_account_number)
|
||||
if(D)
|
||||
var/transaction_amount = currently_vending.price
|
||||
if(transaction_amount <= D.money)
|
||||
// if(vendor_account)
|
||||
var/datum/money_account/D = attempt_account_access_nosec(C.associated_account_number)
|
||||
if(D)
|
||||
var/transaction_amount = currently_vending.price
|
||||
if(transaction_amount <= D.money)
|
||||
|
||||
//transfer the money
|
||||
D.money -= transaction_amount
|
||||
vendor_account.money += transaction_amount
|
||||
//transfer the money
|
||||
D.money -= transaction_amount
|
||||
D.update_balance(D.account_number,D.money)
|
||||
//vendor_account.money += transaction_amount
|
||||
|
||||
//create entries in the two account transaction logs
|
||||
var/datum/transaction/T = new()
|
||||
T.target_name = "[vendor_account.owner_name] (via [src.name])"
|
||||
T.purpose = "Purchase of [currently_vending.product_name]"
|
||||
if(transaction_amount > 0)
|
||||
T.amount = "([transaction_amount])"
|
||||
else
|
||||
T.amount = "[transaction_amount]"
|
||||
T.source_terminal = src.name
|
||||
T.date = current_date_string
|
||||
T.time = worldtime2text()
|
||||
D.transaction_log.Add(T)
|
||||
//
|
||||
T = new()
|
||||
T.target_name = D.owner_name
|
||||
T.purpose = "Purchase of [currently_vending.product_name]"
|
||||
T.amount = "[transaction_amount]"
|
||||
T.source_terminal = src.name
|
||||
T.date = current_date_string
|
||||
T.time = worldtime2text()
|
||||
vendor_account.transaction_log.Add(T)
|
||||
|
||||
// Vend the item
|
||||
src.vend(src.currently_vending, usr)
|
||||
currently_vending = null
|
||||
src.updateUsrDialog()
|
||||
//create entries in the two account transaction logs
|
||||
var/datum/transaction/T = new()
|
||||
T.target_name = "(via [src.name])"
|
||||
T.purpose = "Purchase of [currently_vending.product_name]"
|
||||
if(transaction_amount > 0)
|
||||
T.amount = "([transaction_amount])"
|
||||
else
|
||||
usr << "\icon[src]<span class='warning'>You don't have that much money!</span>"
|
||||
T.amount = "[transaction_amount]"
|
||||
T.source_terminal = src.name
|
||||
T.date = current_date_string
|
||||
T.time = worldtime2text()
|
||||
D.transaction_log.Add(T)
|
||||
|
||||
/*
|
||||
T = new()
|
||||
T.target_name = D.owner_name
|
||||
T.purpose = "Purchase of [currently_vending.product_name]"
|
||||
T.amount = "[transaction_amount]"
|
||||
T.source_terminal = src.name
|
||||
T.date = current_date_string
|
||||
T.time = worldtime2text()
|
||||
vendor_account.transaction_log.Add(T)
|
||||
*/
|
||||
|
||||
// Vend the item
|
||||
src.vend(src.currently_vending, usr)
|
||||
currently_vending = null
|
||||
src.updateUsrDialog()
|
||||
else
|
||||
usr << "\icon[src]<span class='warning'>Unable to access account. Check security settings and try again.</span>"
|
||||
usr << "\icon[src]<span class='warning'>You don't have that much money!</span>"
|
||||
else
|
||||
usr << "\icon[src]<span class='warning'>Unable to access vendor account. Please record the machine ID and call CentComm Support.</span>"
|
||||
usr << "\icon[src]<span class='warning'>Unable to access account. Check security settings and try again.</span>"
|
||||
// else
|
||||
// usr << "\icon[src]<span class='warning'>Unable to access vendor account. Please record the machine ID and call CentComm Support.</span>"
|
||||
|
||||
/obj/machinery/vending/attack_paw(mob/user as mob)
|
||||
return attack_hand(user)
|
||||
|
||||
@@ -75,7 +75,7 @@
|
||||
/obj/item/weapon/storage/lockbox,
|
||||
/obj/item/weapon/storage/secure,
|
||||
/obj/item/weapon/circuitboard,
|
||||
/obj/item/device/eftpos,
|
||||
// /obj/item/device/eftpos,
|
||||
/obj/item/device/lightreplacer,
|
||||
/obj/item/device/taperecorder,
|
||||
/obj/item/device/hailer,
|
||||
|
||||
Reference in New Issue
Block a user