[TGUI] Space Credit Economy Overhaul + Supply Point -> Space Cash (#19209)

* initial edits

* initial edits

* converting shit over to machinery/economy

* vending and mapping fixes

* vending fix pt.2

* Converts Supply Economy to Use Space Credits instead of Supply Points

* Job Payment, NanoBank, and Paychecks

* clothing type path fixes (damn merge conflicts)

* fixes map typepath issues

* adjusts supply prices

* Vendor Price Adjustments

* account uplink terminal tweaks

* please pass tests

* Apply suggestions from code review

Co-authored-by: AffectedArc07 <25063394+AffectedArc07@users.noreply.github.com>

* reviews and bug fixes

* Review Suggestions/Fixes and Request Console Rewrite

* edits

* vending changes for merge

* typepath fix

* final tweaks

* proc ref fixes

* Fixes and Tweaks from 2nd TM

* rebuild TGUI

* final tweaks

* Apply suggestions from code review

Co-authored-by: Farie82 <farie82@users.noreply.github.com>

* requested reviews

* tweaks

* updates slot machine winnings

* fixes

* GC fixes

* fixes

* oops. still need to deconflict this

* Apply suggestions from code review

Co-authored-by: Farie82 <farie82@users.noreply.github.com>
Co-authored-by: Henri215 <77684085+Henri215@users.noreply.github.com>
Co-authored-by: Luc <89928798+lewcc@users.noreply.github.com>

* requested changes and bug fixes

* atm runtime fix

* requested reviews

* vend act stuff

* attempt to pass tests

* supply packs fix

* user tochat -> debug log

* FINAL FIXES

* removes CC db stuff

* Apply suggestions from code review

Co-authored-by: AffectedArc07 <25063394+AffectedArc07@users.noreply.github.com>

Co-authored-by: AffectedArc07 <25063394+AffectedArc07@users.noreply.github.com>
Co-authored-by: Farie82 <farie82@users.noreply.github.com>
Co-authored-by: Henri215 <77684085+Henri215@users.noreply.github.com>
Co-authored-by: Luc <89928798+lewcc@users.noreply.github.com>
This commit is contained in:
Sirryan2002
2022-11-21 23:30:50 +00:00
committed by GitHub
co-authored by AffectedArc07 Farie82 Henri215 Luc
parent ae8accb766
commit 61145a02f8
151 changed files with 9392 additions and 7423 deletions
+2 -2
View File
@@ -268,9 +268,9 @@
user.drop_item()
var/datum/job_objective/make_cyborg/task = user.mind.findJobTask(/datum/job_objective/make_cyborg)
var/datum/job_objective/make_cyborg/task = user.mind.find_job_task(/datum/job_objective/make_cyborg)
if(istype(task))
task.unit_completed()
task.completed = TRUE
O.invisibility = 0
//Transfer debug settings to new mob
@@ -20,6 +20,9 @@
var/list/files = list( )
/obj/item/card/proc/get_card_account()
return GLOB.station_money_database.find_user_account(associated_account_number)
/obj/item/card/data
name = "data card"
desc = "A disk containing data."
@@ -249,6 +252,9 @@
name = "[(!registered_name) ? "identification card" : "[registered_name]'s ID Card"][(!assignment) ? "" : " ([assignment])"]"
/obj/item/card/id/proc/get_departments()
return get_departments_from_job(assignment)
/obj/item/card/id/attackby(obj/item/W as obj, mob/user as mob, params)
..()
+30 -8
View File
@@ -11,15 +11,31 @@
w_class = WEIGHT_CLASS_TINY
resistance_flags = FLAMMABLE
singular_name = "credit"
max_amount = 1000000
max_amount = MAX_STACKABLE_CASH
merge_type = /obj/item/stack/spacecash
/obj/item/stack/spacecash/New(loc, amt = null)
..()
update_icon(UPDATE_ICON_STATE)
/obj/item/stack/spacecash/Initialize(mapload, uncompensated = TRUE)
. = ..()
if(uncompensated)
SSeconomy.space_credits_created += amount
SSeconomy.total_space_cash += amount
update_icon()
/obj/item/stack/spacecash/Destroy()
SSeconomy.total_space_cash -= amount
SSeconomy.space_credits_destroyed += amount
return ..()
/obj/item/stack/spacecash/merge(obj/item/stack/S)
. = ..()
update_icon()
/obj/item/stack/spacecash/change_stack(mob/living/user)
. = ..()
update_icon()
/obj/item/stack/spacecash/update_icon_state()
name = "[amount == max_amount ? "1000000" : amount] Credit[amount > 1 ? "s" : ""]"
name = "[amount == max_amount ? "10000" : amount] Credit[amount > 1 ? "s" : ""]"
if(amount >= 1 && amount < 10)
icon_state = "cashgreen"
else if(amount >= 10 && amount < 50)
@@ -28,11 +44,14 @@
icon_state = "cashblue"
else if(amount >= 500 && amount < 1000)
icon_state = "cashindi"
else if(amount >= 1000 && amount < 1000000)
else if(amount >= 1000 && amount <= 10000)
icon_state = "cashpurp"
else
icon_state = "cashrbow"
/obj/item/stack/spacecash/c5
amount = 5
/obj/item/stack/spacecash/c10
amount = 10
@@ -54,5 +73,8 @@
/obj/item/stack/spacecash/c1000
amount = 1000
/obj/item/stack/spacecash/c1000000
amount = 1000000
/obj/item/stack/spacecash/c10000
amount = 10000
/obj/item/twohanded/required/cash_pile
name = "Pile of Cash"
+1 -1
View File
@@ -235,7 +235,7 @@
var/turf/Start = get_turf(src)
for(var/direction in GLOB.alldirs)
var/turf/dirturf = get_step(Start,direction)
if(rand(0,1))
if(prob(50))
new /obj/item/stack/spacecash/c1000(dirturf)
else
var/obj/item/storage/bag/money/M = new(dirturf)
@@ -219,8 +219,8 @@
/obj/item/storage/secure/briefcase/syndie/populate_contents()
..()
for(var/I in 1 to 5)
new /obj/item/stack/spacecash/c1000(src)
for(var/I in 1 to 3)
new /obj/item/stack/spacecash/c200(src)
// -----------------------------
// Secure Safe
@@ -75,10 +75,10 @@
/obj/item/storage/wallet/random/populate_contents()
var/cash = pick(/obj/item/stack/spacecash,
/obj/item/stack/spacecash/c5,
/obj/item/stack/spacecash/c10,
/obj/item/stack/spacecash/c100,
/obj/item/stack/spacecash/c500,
/obj/item/stack/spacecash/c1000)
/obj/item/stack/spacecash/c50,
/obj/item/stack/spacecash/c100)
var/coin = pickweight(list(/obj/item/coin/iron = 3,
/obj/item/coin/silver = 2,
/obj/item/coin/gold = 1))
@@ -73,8 +73,8 @@
/obj/structure/closet/secure_closet/freezer/money/populate_contents()
for(var/i in 1 to 3)
new /obj/item/stack/spacecash/c1000(src)
for(var/i in 1 to 5)
new /obj/item/stack/spacecash/c500(src)
for(var/i in 1 to 6)
new /obj/item/stack/spacecash/c200(src)
for(var/i in 1 to 5)
new /obj/item/stack/spacecash/c100(src)
for(var/i in 1 to 6)
new /obj/item/stack/spacecash/c50(src)