Merge pull request #937 from quotefox/economy

Hyper Economy part 1 - Money Movement.
This commit is contained in:
QuoteFox
2021-01-29 01:18:58 +00:00
committed by GitHub
15 changed files with 280 additions and 15 deletions
+17 -1
View File
@@ -58,7 +58,7 @@
var/list/mind_traits // Traits added to the mind of the mob assigned this job
var/list/blacklisted_quirks //list of quirk typepaths blacklisted.
var/list/alt_titles = list()
//Only override this proc
@@ -90,6 +90,15 @@
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 = 50
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)
@@ -230,6 +239,13 @@
C.update_label(C.registered_name, preference_source.prefs.alt_titles_preferences[J.title])
else
C.update_label()
for(var/A in SSeconomy.bank_accounts)
var/datum/bank_account/B = A
if(B.account_id == H.account_id)
C.registered_account = B
B.bank_cards += C
break
H.sec_hud_set_ID()
var/obj/item/pda/PDA = H.get_item_by_slot(pda_slot)
@@ -68,5 +68,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"
@@ -132,6 +132,7 @@
to_chat(src, "<span class='warning'>Use of ranged weaponry would bring dishonor to the clan.</span>")
return FALSE
/mob/living/carbon/human/can_see_reagents()
. = ..()
if(.) //No need to run through all of this if it's already true.