mirror of
https://github.com/quotefox/Hyper-Station-13.git
synced 2026-08-30 08:06:17 +01:00
fixes + balancing
This commit is contained in:
@@ -386,7 +386,7 @@
|
||||
/datum/config_entry/flag/dynamic_mode
|
||||
|
||||
/datum/config_entry/number/economy_base_payment
|
||||
config_entry_value = 80
|
||||
config_entry_value = 60
|
||||
min_val = 0
|
||||
|
||||
/datum/config_entry/number/economy_base_pay_ratio
|
||||
|
||||
@@ -14,20 +14,22 @@ SUBSYSTEM_DEF(job)
|
||||
|
||||
var/overflow_role = "Assistant"
|
||||
|
||||
var/list/economy_multipliers_by_job
|
||||
var/list/economy_multipliers_by_type
|
||||
var/static/list/economy_multipliers_by_job
|
||||
var/static/list/economy_multipliers_by_type
|
||||
|
||||
|
||||
/datum/controller/subsystem/job/Initialize(timeofday)
|
||||
SSmapping.HACK_LoadMapConfig()
|
||||
if(!economy_multipliers_by_job)
|
||||
economy_multipliers_by_job = CONFIG_GET(keyed_list/economy_job_rate)
|
||||
if(!economy_multipliers_by_type)
|
||||
economy_multipliers_by_type = CONFIG_GET(keyed_list/economy_job_rate_area)
|
||||
if(!occupations.len)
|
||||
SetupOccupations()
|
||||
if(CONFIG_GET(flag/load_jobs_from_txt))
|
||||
LoadJobs()
|
||||
generate_selectable_species()
|
||||
set_overflow_role(CONFIG_GET(string/overflow_job))
|
||||
economy_multipliers_by_job = CONFIG_GET(keyed_list/economy_job_rate)
|
||||
economy_multipliers_by_type = CONFIG_GET(keyed_list/economy_job_rate_area)
|
||||
return ..()
|
||||
|
||||
/datum/controller/subsystem/job/proc/set_overflow_role(new_overflow_role)
|
||||
|
||||
@@ -168,7 +168,7 @@ IF YOU MODIFY THE PRODUCTS LIST OF A MACHINE, MAKE SURE TO UPDATE ITS RESUPPLY C
|
||||
R.name = initial(temp.name)
|
||||
R.product_path = typepath
|
||||
if(!free)
|
||||
R.price = baseprice
|
||||
R.price = FLOOR(baseprice * CONFIG_GET(number/economy_price_multiplier), 1)
|
||||
if(product) //its a item!
|
||||
var/product_price = SSeconomy.GetPrice(product)
|
||||
if(!isnull(product_price))
|
||||
|
||||
@@ -593,7 +593,7 @@ BOX_RANDOM_ENGINE Box P.A.C.M.A.N,0
|
||||
# Bank Accounts are tied to the ID cards that players spawn with. If you have an unset pin, then that means anyone that gets the ID card has access to your money
|
||||
|
||||
# The base amount of credits, before any math whatsoever gets involved, that paychecks give
|
||||
ECONOMY_BASE_PAYMENT 40
|
||||
ECONOMY_BASE_PAYMENT 60
|
||||
|
||||
# The base pay for paychecks get divided by this amount. Useful for slowing down the rate of payment.
|
||||
ECONOMY_BASE_PAY_RATIO 3
|
||||
@@ -627,4 +627,4 @@ ECONOMY_PRICE_EXPENSIVE_AF 90
|
||||
|
||||
# A multiplier to the prices of items inside vendors. Avoid setting this higher than the Assistant's paycheck multiplier if possible
|
||||
# This scales every item found in vendors. If you want to change an individual item, you have to change it through code
|
||||
ECONOMY_PRICE_MULTIPLIER 1
|
||||
ECONOMY_PRICE_MULTIPLIER 1.25
|
||||
|
||||
@@ -37,13 +37,23 @@ SUBSYSTEM_DEF(economy)
|
||||
* job datums if the respective one is null. You can pass zero arguments here and you'd get the "default" amount of a paycheck.
|
||||
*/
|
||||
/datum/controller/subsystem/economy/proc/GetPaycheck(datum/bank_account/account, datum/job/job, multiplier=1)
|
||||
return FLOOR((account:base_pay * job:base_paycheck_multiplier * multiplier) / 3, 1)
|
||||
return FLOOR(account:base_pay * job:base_paycheck_multiplier * multiplier, 1)
|
||||
|
||||
/**
|
||||
* Returns a price value from a subtype of an /obj/item, assuming it was compiled to use money.
|
||||
* Otherwise, returns null if it does not use economy
|
||||
*/
|
||||
/datum/controller/subsystem/economy/proc/GetPrice(obj/item/costly_item)
|
||||
if(!costly_item.economy_type)
|
||||
var/economy_type
|
||||
var/price_multiplier
|
||||
|
||||
if(istype(costly_item))
|
||||
economy_type = costly_item.economy_type
|
||||
price_multiplier = costly_item.economy_price_mul
|
||||
else
|
||||
economy_type = initial(costly_item.economy_type)
|
||||
price_multiplier = initial(costly_item.economy_price_mul)
|
||||
|
||||
if(!economy_type)
|
||||
return
|
||||
return FLOOR(prices_by_type[costly_item.economy_type] * costly_item.economy_price_mul, 1)
|
||||
return FLOOR(prices_by_type[economy_type] * price_multiplier, 1)
|
||||
|
||||
Reference in New Issue
Block a user