mirror of
https://github.com/quotefox/Hyper-Station-13.git
synced 2026-07-11 07:42:29 +01:00
limits ID cards to one account
This commit is contained in:
@@ -331,7 +331,7 @@ SUBSYSTEM_DEF(job)
|
||||
|
||||
if((job.title in GLOB.silly_positions) && (player.client.prefs.sillyroles == FALSE))
|
||||
JobDebug("DO is not whitelisted, Player: [player], Job:[job.title]")
|
||||
continue
|
||||
continue
|
||||
|
||||
if(!job.player_old_enough(player.client))
|
||||
JobDebug("DO player not old enough, Player: [player], Job:[job.title]")
|
||||
@@ -473,10 +473,10 @@ SUBSYSTEM_DEF(job)
|
||||
//Account ID. ID is handled by human initialization
|
||||
if(ishuman(H))
|
||||
var/mob/living/carbon/human/wageslave = H
|
||||
to_chat(M, "<b><span class='big'>Your account ID is [wageslave.account_id]</span></b>")
|
||||
to_chat(M, "<b><span class='notice'>You do not have a pin, can set your pin at an ATM.</b>")
|
||||
if(H.mind)
|
||||
H.mind.memory += "Your account ID is [wageslave.account_id].<BR>"
|
||||
if(wageslave.wear_id)
|
||||
var/obj/item/card/id/id_card = wageslave.wear_id
|
||||
to_chat(M, "<b><span class='big'>Your account ID is [id_card.registered_account.account_id]</span></b>")
|
||||
to_chat(M, "<b><span class='notice'>You do not have a pin, can set your pin at an ATM.</b>")
|
||||
|
||||
return H
|
||||
|
||||
|
||||
@@ -255,7 +255,7 @@ GLOBAL_VAR_INIT(time_last_changed_position, 0)
|
||||
else if(mode == 4)
|
||||
dat += {"<a href='?src=[REF(src)];choice=return'>Return</a>
|
||||
<table><tr><td style='width:25%'><b>Bank Accounts</b></td><td style='width:25%'></td></tr>"}
|
||||
for(var/datum/bank_account/account in SSeconomy.bank_accounts)
|
||||
for(var/datum/bank_account/account as anything in SSeconomy.bank_accounts)
|
||||
dat += {"<td>[account.account_holder] - [account.account_id]"}
|
||||
dat += "<a href='?src=[REF(src)];choice=bankassign;assign_bank=[REF(account)]'>Assign to ID</a></td>"
|
||||
dat += "</td><tr>"
|
||||
|
||||
@@ -171,10 +171,10 @@
|
||||
var/registered_name = null // The name registered_name on the card
|
||||
var/assignment = null
|
||||
var/access_txt // mapping aid
|
||||
var/datum/bank_account/registered_account
|
||||
var/uses_overlays = TRUE
|
||||
var/uses_assignment = TRUE
|
||||
var/icon/cached_flat_icon
|
||||
var/datum/bank_account/registered_account
|
||||
|
||||
/obj/item/card/id/Initialize(mapload)
|
||||
. = ..()
|
||||
@@ -200,6 +200,9 @@
|
||||
if(mining_points)
|
||||
. += "There's [mining_points] mining equipment redemption point\s loaded onto this card."
|
||||
|
||||
/obj/item/card/id/proc/create_bank_account(owner, job_assignment)
|
||||
registered_account = new/datum/bank_account(owner, job_assignment, src)
|
||||
|
||||
/obj/item/card/id/GetAccess()
|
||||
return access
|
||||
|
||||
@@ -643,7 +646,7 @@
|
||||
icon_state = "retrosci"
|
||||
uses_overlays = FALSE
|
||||
uses_assignment = FALSE
|
||||
|
||||
|
||||
/obj/item/card/id/away/snowdin/med
|
||||
name = "Arctic Station Doctor's ID card"
|
||||
desc = "A faded Arctic Station ID card. You can make out the rank \"Doctor\"."
|
||||
|
||||
@@ -119,7 +119,7 @@
|
||||
|
||||
/// Generates a bank account for the person who's getting this job datum
|
||||
/datum/job/proc/generate_bank_account(mob/living/carbon/human/reciever)
|
||||
return new/datum/bank_account(reciever, src)
|
||||
return
|
||||
|
||||
/datum/job/proc/get_access()
|
||||
if(!config) //Needed for robots.
|
||||
@@ -246,15 +246,8 @@
|
||||
else
|
||||
C.update_label()
|
||||
|
||||
for(var/datum/bank_account/account as anything in SSeconomy.bank_accounts)
|
||||
if(account.account_id == H.account_id)
|
||||
C.registered_account = account
|
||||
account.bank_cards += C
|
||||
//Todo: remove bank_cards, have accounts for everyone who knows the pin to an ID. monkey go ook ook (he's rich)
|
||||
//one card should have one account, sorta like how real cards work
|
||||
//ping cyanosis if bank_cards is still here
|
||||
account.associated_id = C //Also make this better to work with
|
||||
break
|
||||
C.create_bank_account(H, J)
|
||||
|
||||
H.sec_hud_set_ID()
|
||||
|
||||
var/obj/item/pda/PDA = H.get_item_by_slot(pda_slot)
|
||||
|
||||
@@ -79,6 +79,5 @@
|
||||
var/static/list/can_ride_typecache = typecacheof(list(/mob/living/carbon/human, /mob/living/simple_animal/slime, /mob/living/simple_animal/parrot))
|
||||
var/lastpuke = 0
|
||||
var/last_fire_update
|
||||
var/account_id
|
||||
can_be_held = "micro"
|
||||
appearance_flags = KEEP_TOGETHER|TILE_BOUND|PIXEL_SCALE|LONG_GLIDE
|
||||
Reference in New Issue
Block a user