mirror of
https://github.com/quotefox/Hyper-Station-13.git
synced 2026-08-23 20:56:19 +01:00
reworking economy, adding paychecks
This commit is contained in:
@@ -93,7 +93,7 @@
|
||||
dat += "</table>"
|
||||
dat += "</div>"
|
||||
if(onstation && C && C.registered_account)
|
||||
dat += "<b>Balance: $[account.account_balance]</b>"
|
||||
dat += "<b>Balance: $[account.balance]</b>"
|
||||
if(istype(src, /obj/machinery/vending/snack))
|
||||
dat += "<h3>Chef's Food Selection</h3>"
|
||||
dat += "<div class='statusDisplay'>"
|
||||
|
||||
@@ -61,6 +61,9 @@
|
||||
|
||||
var/list/alt_titles = list()
|
||||
|
||||
/// A multiplier for how much a person gets each paycheck
|
||||
var/base_paycheck_multiplier = 0.7
|
||||
|
||||
var/override_roundstart_spawn = null //Where the player spawns at roundstart if defined
|
||||
|
||||
//whitelisting
|
||||
@@ -95,15 +98,6 @@
|
||||
if(!H)
|
||||
return FALSE
|
||||
|
||||
if(!visualsOnly)
|
||||
var/datum/bank_account/bank_account = new(H.real_name, src)
|
||||
bank_account.account_holder = H.real_name
|
||||
bank_account.account_job = src
|
||||
bank_account.account_id = rand(111111,999999) //give account ID!
|
||||
//bank_account.account_pin = rand(1000,9999) //give random pin!
|
||||
bank_account.account_balance = 80
|
||||
H.account_id = bank_account.account_id
|
||||
|
||||
if(CONFIG_GET(flag/enforce_human_authority) && (title in GLOB.command_positions))
|
||||
if(H.dna.species.id != "human")
|
||||
H.set_species(/datum/species/human)
|
||||
@@ -118,7 +112,14 @@
|
||||
H.dna.species.after_equip_job(src, H, visualsOnly)
|
||||
|
||||
if(!visualsOnly && announce)
|
||||
announce(H)
|
||||
generate_bank_account()
|
||||
if(announce)
|
||||
announce(H)
|
||||
|
||||
/// Generates a bank account for the person who's getting this job datum
|
||||
/datum/job/proc/generate_bank_account(mob/living/carbon/human/reciever)
|
||||
var/datum/bank_account/bank_account = new(H.real_name, src)
|
||||
return bank_account
|
||||
|
||||
/datum/job/proc/get_access()
|
||||
if(!config) //Needed for robots.
|
||||
|
||||
@@ -497,8 +497,8 @@ IF YOU MODIFY THE PRODUCTS LIST OF A MACHINE, MAKE SURE TO UPDATE ITS RESUPPLY C
|
||||
updateUsrDialog()
|
||||
vend_ready = 1
|
||||
if(bankid && R == buying) //if we have a bank id, and we are trying to buy the same thing!
|
||||
if(bankid.account_balance >= R.price)
|
||||
bankid.account_balance -= R.price //take the money from the account.
|
||||
if(bankid.balance >= R.price)
|
||||
bankid.balance -= R.price //take the money from the account.
|
||||
menu = 1
|
||||
to_chat(usr, "<span class='notice'>You [R.name] via the provided bank account!</span>")
|
||||
bankid = null //so noone can buy from your account after youve purchased stuff
|
||||
|
||||
Reference in New Issue
Block a user