diff --git a/code/controllers/subsystem/economy.dm b/code/controllers/subsystem/economy.dm
index 01b54f2319c..b8e1ab9e772 100644
--- a/code/controllers/subsystem/economy.dm
+++ b/code/controllers/subsystem/economy.dm
@@ -114,24 +114,6 @@ SUBSYSTEM_DEF(economy)
return
processing_part = ECON_PRICE_UPDATE_STEP
- var/list/obj/machinery/vending/prices_to_update = list()
- // Assoc list of "z level" -> if it's on the station
- // Hack, is station z level is too expensive to do for each machine, I hate this place
- var/list/station_z_status = list()
- for(var/obj/machinery/vending/vending_lad as anything in SSmachines.get_machines_by_type_and_subtypes(/obj/machinery/vending))
- if(istype(vending_lad, /obj/machinery/vending/custom))
- continue
- var/vending_level = vending_lad.z
- var/station_status = station_z_status["[vending_level]"]
- if(station_status == null)
- station_status = is_station_level(vending_level)
- station_z_status["[vending_level]"] = station_status
- if(!station_status)
- continue
-
- prices_to_update += vending_lad
-
- cached_processing = prices_to_update
station_target = max(round(temporary_total / max(bank_accounts_by_id.len * 2, 1)) + station_target_buffer, 1)
if(processing_part == ECON_PRICE_UPDATE_STEP)
@@ -183,19 +165,15 @@ SUBSYSTEM_DEF(economy)
return TRUE
/**
- * Updates the prices of all station vendors with the inflation_value, increasing/decreasing costs across the station, and alerts the crew.
- *
- * Iterates over the machines list for vending machines, resets their regular and premium product prices (Not contraband), and sends a message to the newscaster network.
+ * Updates the the inflation_value, effecting newscaster alerts and the mail system.
**/
/datum/controller/subsystem/economy/proc/price_update()
- var/list/cached_processing = src.cached_processing
- for(var/i in 1 to length(cached_processing))
- var/obj/machinery/vending/V = cached_processing[i]
- V.reset_prices(V.product_records, V.coin_records)
- if(MC_TICK_CHECK)
- cached_processing.Cut(1, i + 1)
- return FALSE
- earning_report = "Sector Economic Report
Sector vendor prices is currently at [SSeconomy.inflation_value()*100]%.
The station spending power is currently [station_total] Credits, and the crew's targeted allowance is at [station_target] Credits.
That's all from the Nanotrasen Economist Division."
+ var/fluff_string = ""
+ if(!HAS_TRAIT(SSeconomy, TRAIT_MARKET_CRASHING))
+ fluff_string = ", but company countermeasures protect YOU from being affected!"
+ else
+ fluff_string = ", and company countermeasures are failing to protect YOU from being affected. We're all doomed!"
+ earning_report = "Sector Economic Report
Sector vendor prices is currently at [SSeconomy.inflation_value()*100]%[fluff_string]
The station spending power is currently [station_total] Credits, and the crew's targeted allowance is at [station_target] Credits.
That's all from the Nanotrasen Economist Division."
GLOB.news_network.submit_article(earning_report, "Station Earnings Report", "Station Announcements", null, update_alert = FALSE)
return TRUE
@@ -209,6 +187,8 @@ SUBSYSTEM_DEF(economy)
/datum/controller/subsystem/economy/proc/inflation_value()
if(!bank_accounts_by_id.len)
return 1
+ if(HAS_TRAIT(SSeconomy, TRAIT_MARKET_CRASHING))
+ return inflation_value //early return instead of the actual check
inflation_value = max(round(((station_total / bank_accounts_by_id.len) / station_target), 0.1), 1.0)
return inflation_value
@@ -229,6 +209,29 @@ SUBSYSTEM_DEF(economy)
"vendor" = vendor,
))
+/**
+ * Iterates over the machines list for vending machines, resets their regular and premium product prices (Not contraband), and sends a message to the newscaster network.
+ */
+/datum/controller/subsystem/economy/proc/update_vending_prices()
+ var/list/obj/machinery/vending/prices_to_update = list()
+ // Assoc list of "z level" -> if it's on the station
+ // Hack, is station z level is too expensive to do for each machine, I hate this place
+ var/list/station_z_status = list()
+ for(var/obj/machinery/vending/vending_lad as anything in SSmachines.get_machines_by_type_and_subtypes(/obj/machinery/vending))
+ if(istype(vending_lad, /obj/machinery/vending/custom))
+ continue
+ var/vending_level = vending_lad.z
+ var/station_status = station_z_status["[vending_level]"]
+ if(station_status == null)
+ station_status = is_station_level(vending_level)
+ station_z_status["[vending_level]"] = station_status
+ if(!station_status)
+ continue
+ prices_to_update += vending_lad
+ for(var/i in 1 to length(prices_to_update))
+ var/obj/machinery/vending/V = prices_to_update[i]
+ V.reset_prices(V.product_records, V.coin_records)
+
#undef ECON_DEPARTMENT_STEP
#undef ECON_ACCOUNT_STEP
#undef ECON_PRICE_UPDATE_STEP
diff --git a/code/game/machinery/computer/accounting.dm b/code/game/machinery/computer/accounting.dm
index c38ea186f62..178c407cb58 100644
--- a/code/game/machinery/computer/accounting.dm
+++ b/code/game/machinery/computer/accounting.dm
@@ -24,8 +24,8 @@
player_accounts += list(list(
"name" = current_bank_account.account_holder,
"job" = current_bank_account.account_job.title,
- "balance" = current_bank_account.account_balance,
- "modifier" = current_bank_account.payday_modifier,
+ "balance" = round(current_bank_account.account_balance),
+ "modifier" = round((current_bank_account.payday_modifier * 0.9), 0.1),
))
data["PlayerAccounts"] = player_accounts
data["AuditLog"] = audit_list
diff --git a/code/modules/events/market_crash.dm b/code/modules/events/market_crash.dm
index be1e45e132b..1b18fe774f6 100644
--- a/code/modules/events/market_crash.dm
+++ b/code/modules/events/market_crash.dm
@@ -11,33 +11,47 @@
description = "Temporarily increases the prices of vending machines."
/datum/round_event/market_crash
- var/market_dip = 0
+ /// This counts the number of ticks that the market crash event has been processing, so that we don't call vendor price updates every tick, but we still iterate for other mechanics that use inflation.
+ var/tick_counter = 1
/datum/round_event/market_crash/setup()
start_when = 1
- end_when = rand(25, 50)
+ end_when = rand(100, 50)
announce_when = 2
/datum/round_event/market_crash/announce(fake)
var/list/poss_reasons = list("the alignment of the moon and the sun",\
"some risky housing market outcomes",\
- "The B.E.P.I.S. team's untimely downfall",\
- "speculative SolFed grants backfiring",\
- "greatly exaggerated reports of Nanotrasen accountancy personnel committing mass suicide") //Skyrat Edit; original was "speculative Terragov grants backfiring"
+ "the B.E.P.I.S. team's untimely downfall",\
+ "speculative SolFed grants backfiring", /*SKYRAT EDIT CHANGE; original was "speculative Terragov grants backfiring"*/\
+ "greatly exaggerated reports of Nanotrasen accountancy personnel being \"laid off\"",\
+ "a \"great investment\" into \"non-fungible tokens\" by a \"moron\"",\
+ "a number of raids from Tiger Cooperative agents",\
+ "supply chain shortages",\
+ "the \"Nanotrasen+\" social media network's untimely downfall",\
+ "the \"Nanotrasen+\" social media network's unfortunate success",\
+ "uhh, bad luck, we guess"
+ )
var/reason = pick(poss_reasons)
priority_announce("Due to [reason], prices for on-station vendors will be increased for a short period.", "Nanotrasen Accounting Division")
/datum/round_event/market_crash/start()
. = ..()
- market_dip = rand(1000,10000) * length(SSeconomy.bank_accounts_by_id)
- SSeconomy.station_target = max(SSeconomy.station_target - market_dip, 1)
+ SSeconomy.update_vending_prices()
SSeconomy.price_update()
ADD_TRAIT(SSeconomy, TRAIT_MARKET_CRASHING, MARKET_CRASH_EVENT_TRAIT)
/datum/round_event/market_crash/end()
. = ..()
- SSeconomy.station_target += market_dip
REMOVE_TRAIT(SSeconomy, TRAIT_MARKET_CRASHING, MARKET_CRASH_EVENT_TRAIT)
SSeconomy.price_update()
+ SSeconomy.update_vending_prices()
priority_announce("Prices for on-station vendors have now stabilized.", "Nanotrasen Accounting Division")
+/datum/round_event/market_crash/tick()
+ . = ..()
+ tick_counter = tick_counter++
+ SSeconomy.inflation_value = 5.5*(log(activeFor+1))
+ if(tick_counter == 5)
+ tick_counter = 1
+ SSeconomy.update_vending_prices()
diff --git a/code/modules/mob/living/carbon/human/_species.dm b/code/modules/mob/living/carbon/human/_species.dm
index db91e09b365..8ba30a412af 100644
--- a/code/modules/mob/living/carbon/human/_species.dm
+++ b/code/modules/mob/living/carbon/human/_species.dm
@@ -116,7 +116,7 @@ GLOBAL_LIST_EMPTY(features_by_species)
///multiplier for stun durations
var/stunmod = 1
///multiplier for money paid at payday
- var/payday_modifier = 1
+ var/payday_modifier = 1.0
///Base electrocution coefficient. Basically a multiplier for damage from electrocutions.
var/siemens_coeff = 1
///To use MUTCOLOR with a fixed color that's independent of the mcolor feature in DNA.
diff --git a/code/modules/mob/living/carbon/human/species_types/ethereal.dm b/code/modules/mob/living/carbon/human/species_types/ethereal.dm
index 5abab29cb56..9546a659e41 100644
--- a/code/modules/mob/living/carbon/human/species_types/ethereal.dm
+++ b/code/modules/mob/living/carbon/human/species_types/ethereal.dm
@@ -9,7 +9,7 @@
exotic_blood = /datum/reagent/consumable/liquidelectricity //Liquid Electricity. fuck you think of something better gamer
exotic_bloodtype = "LE"
siemens_coeff = 0.5 //They thrive on energy
- payday_modifier = 0.75
+ payday_modifier = 1.0
inherent_traits = list(
// TRAIT_NO_UNDERWEAR, // SKYRAT EDIT - LET THEM WEAR PANTIES
TRAIT_MUTANT_COLORS,
diff --git a/code/modules/mob/living/carbon/human/species_types/felinid.dm b/code/modules/mob/living/carbon/human/species_types/felinid.dm
index 611beb79ba6..a1fb38d0fd0 100644
--- a/code/modules/mob/living/carbon/human/species_types/felinid.dm
+++ b/code/modules/mob/living/carbon/human/species_types/felinid.dm
@@ -18,7 +18,7 @@
)
changesource_flags = MIRROR_BADMIN | WABBAJACK | MIRROR_PRIDE | MIRROR_MAGIC | RACE_SWAP | ERT_SPAWN | SLIME_EXTRACT
species_language_holder = /datum/language_holder/felinid
- payday_modifier = 0.75
+ payday_modifier = 1.0
ass_image = 'icons/ass/asscat.png'
family_heirlooms = list(/obj/item/toy/cattoy)
/// When false, this is a felinid created by mass-purrbation
diff --git a/code/modules/mob/living/carbon/human/species_types/flypeople.dm b/code/modules/mob/living/carbon/human/species_types/flypeople.dm
index 166cefbde6a..7f1d1112115 100644
--- a/code/modules/mob/living/carbon/human/species_types/flypeople.dm
+++ b/code/modules/mob/living/carbon/human/species_types/flypeople.dm
@@ -13,7 +13,7 @@
changesource_flags = MIRROR_BADMIN | WABBAJACK | MIRROR_PRIDE | MIRROR_MAGIC | RACE_SWAP | ERT_SPAWN | SLIME_EXTRACT
species_language_holder = /datum/language_holder/fly
wing_types = list(/obj/item/organ/external/wings/functional/fly)
- payday_modifier = 0.75
+ payday_modifier = 1.0
mutanttongue = /obj/item/organ/internal/tongue/fly
mutantheart = /obj/item/organ/internal/heart/fly
diff --git a/code/modules/mob/living/carbon/human/species_types/golems.dm b/code/modules/mob/living/carbon/human/species_types/golems.dm
index eaeb54cf2f3..cf16c236605 100644
--- a/code/modules/mob/living/carbon/human/species_types/golems.dm
+++ b/code/modules/mob/living/carbon/human/species_types/golems.dm
@@ -20,7 +20,7 @@
mutantlungs = null
inherent_biotypes = MOB_HUMANOID|MOB_MINERAL
damage_modifier = 10 //golem is stronk
- payday_modifier = 0.75
+ payday_modifier = 1.0
siemens_coeff = 0
no_equip_flags = ITEM_SLOT_MASK | ITEM_SLOT_OCLOTHING | ITEM_SLOT_GLOVES | ITEM_SLOT_FEET | ITEM_SLOT_ICLOTHING | ITEM_SLOT_SUITSTORE
nojumpsuit = 1
diff --git a/code/modules/mob/living/carbon/human/species_types/humans.dm b/code/modules/mob/living/carbon/human/species_types/humans.dm
index 3e8a8d6bbf7..2c997274ffb 100644
--- a/code/modules/mob/living/carbon/human/species_types/humans.dm
+++ b/code/modules/mob/living/carbon/human/species_types/humans.dm
@@ -8,7 +8,7 @@
mutant_bodyparts = list("wings" = "None")
skinned_type = /obj/item/stack/sheet/animalhide/human
changesource_flags = MIRROR_BADMIN | WABBAJACK | MIRROR_MAGIC | MIRROR_PRIDE | ERT_SPAWN | RACE_SWAP | SLIME_EXTRACT
- payday_modifier = 1
+ payday_modifier = 1.1
/datum/species/human/prepare_human_for_preview(mob/living/carbon/human/human)
human.set_haircolor("#bb9966", update = FALSE) // brown
diff --git a/code/modules/mob/living/carbon/human/species_types/jellypeople.dm b/code/modules/mob/living/carbon/human/species_types/jellypeople.dm
index 468f066e04c..f3f6e131255 100644
--- a/code/modules/mob/living/carbon/human/species_types/jellypeople.dm
+++ b/code/modules/mob/living/carbon/human/species_types/jellypeople.dm
@@ -25,7 +25,7 @@
blood_deficiency_drain_rate = JELLY_REGEN_RATE + BLOOD_DEFICIENCY_MODIFIER
coldmod = 6 // = 3x cold damage
heatmod = 0.5 // = 1/4x heat damage
- payday_modifier = 0.75
+ payday_modifier = 1.0
changesource_flags = MIRROR_BADMIN | WABBAJACK | MIRROR_PRIDE | MIRROR_MAGIC | RACE_SWAP | ERT_SPAWN | SLIME_EXTRACT
inherent_factions = list(FACTION_SLIME)
species_language_holder = /datum/language_holder/jelly
diff --git a/code/modules/mob/living/carbon/human/species_types/lizardpeople.dm b/code/modules/mob/living/carbon/human/species_types/lizardpeople.dm
index 591f93b5767..68420fe460f 100644
--- a/code/modules/mob/living/carbon/human/species_types/lizardpeople.dm
+++ b/code/modules/mob/living/carbon/human/species_types/lizardpeople.dm
@@ -20,7 +20,7 @@
mutanttongue = /obj/item/organ/internal/tongue/lizard
coldmod = 1.5
heatmod = 0.67
- payday_modifier = 0.75
+ payday_modifier = 1.0
changesource_flags = MIRROR_BADMIN | WABBAJACK | MIRROR_PRIDE | MIRROR_MAGIC | RACE_SWAP | ERT_SPAWN | SLIME_EXTRACT
species_cookie = /obj/item/food/meat/slab
meat = /obj/item/food/meat/slab/human/mutant/lizard
diff --git a/code/modules/mob/living/carbon/human/species_types/mothmen.dm b/code/modules/mob/living/carbon/human/species_types/mothmen.dm
index 2425bd38ea9..9f576e03f07 100644
--- a/code/modules/mob/living/carbon/human/species_types/mothmen.dm
+++ b/code/modules/mob/living/carbon/human/species_types/mothmen.dm
@@ -17,7 +17,7 @@
changesource_flags = MIRROR_BADMIN | WABBAJACK | MIRROR_MAGIC | MIRROR_PRIDE | ERT_SPAWN | RACE_SWAP | SLIME_EXTRACT
species_language_holder = /datum/language_holder/moth
wing_types = list(/obj/item/organ/external/wings/functional/moth/megamoth, /obj/item/organ/external/wings/functional/moth/mothra)
- payday_modifier = 0.75
+ payday_modifier = 1.0
family_heirlooms = list(/obj/item/flashlight/lantern/heirloom_moth)
bodypart_overrides = list(
diff --git a/code/modules/mob/living/carbon/human/species_types/plasmamen.dm b/code/modules/mob/living/carbon/human/species_types/plasmamen.dm
index bfa02ee3037..29d1ac3f129 100644
--- a/code/modules/mob/living/carbon/human/species_types/plasmamen.dm
+++ b/code/modules/mob/living/carbon/human/species_types/plasmamen.dm
@@ -24,7 +24,7 @@
mutantappendix = null
mutantheart = null
heatmod = 1.5
- payday_modifier = 0.75
+ payday_modifier = 1.0
breathid = GAS_PLASMA
changesource_flags = MIRROR_BADMIN | WABBAJACK | MIRROR_PRIDE | MIRROR_MAGIC
species_cookie = /obj/item/reagent_containers/condiment/milk
diff --git a/code/modules/mob/living/carbon/human/species_types/podpeople.dm b/code/modules/mob/living/carbon/human/species_types/podpeople.dm
index 0ef940b6101..3703f2527ac 100644
--- a/code/modules/mob/living/carbon/human/species_types/podpeople.dm
+++ b/code/modules/mob/living/carbon/human/species_types/podpeople.dm
@@ -14,7 +14,7 @@
inherent_factions = list(FACTION_PLANTS, FACTION_VINES)
heatmod = 1.5
- payday_modifier = 0.75
+ payday_modifier = 1.0
meat = /obj/item/food/meat/slab/human/mutant/plant
exotic_blood = /datum/reagent/water
changesource_flags = MIRROR_BADMIN | WABBAJACK | MIRROR_MAGIC | MIRROR_PRIDE | RACE_SWAP | ERT_SPAWN | SLIME_EXTRACT
diff --git a/code/modules/vending/_vending.dm b/code/modules/vending/_vending.dm
index b908d4fec2d..48d12c926c5 100644
--- a/code/modules/vending/_vending.dm
+++ b/code/modules/vending/_vending.dm
@@ -365,8 +365,11 @@
* * startempty - should we set vending_product record amount from the product list (so it's prefilled at roundstart)
*/
/obj/machinery/vending/proc/build_inventory(list/productlist, list/recordlist, list/categories, start_empty = FALSE)
- default_price = round(initial(default_price) * SSeconomy.inflation_value())
- extra_price = round(initial(extra_price) * SSeconomy.inflation_value())
+ default_price = round(initial(default_price))
+ extra_price = round(initial(extra_price))
+ if(HAS_TRAIT(SSeconomy, TRAIT_MARKET_CRASHING))
+ default_price *= SSeconomy.inflation_value()
+ extra_price *= SSeconomy.inflation_value()
var/list/product_to_category = list()
for (var/list/category as anything in categories)
@@ -387,8 +390,11 @@
R.amount = amount
R.max_amount = amount
///Prices of vending machines are all increased uniformly.
- R.custom_price = round(initial(temp.custom_price) * SSeconomy.inflation_value())
- R.custom_premium_price = round(initial(temp.custom_premium_price) * SSeconomy.inflation_value())
+ R.custom_price = round(initial(temp.custom_price))
+ R.custom_premium_price = round(initial(temp.custom_premium_price))
+ if(HAS_TRAIT(SSeconomy, TRAIT_MARKET_CRASHING))
+ R.custom_price = round(initial(temp.custom_price) * SSeconomy.inflation_value())
+ R.custom_premium_price = round(initial(temp.custom_premium_price) * SSeconomy.inflation_value())
R.age_restricted = initial(temp.age_restricted)
R.colorable = !!(initial(temp.greyscale_config) && initial(temp.greyscale_colors) && (initial(temp.flags_1) & IS_PLAYER_COLORABLE_1))
R.category = product_to_category[typepath]
@@ -426,21 +432,32 @@
* * premiumlist - the list of premium product datums in the vendor to refresh their prices.
*/
/obj/machinery/vending/proc/reset_prices(list/recordlist, list/premiumlist)
- default_price = round(initial(default_price) * SSeconomy.inflation_value())
- extra_price = round(initial(extra_price) * SSeconomy.inflation_value())
+ var/crash_status = HAS_TRAIT(SSeconomy, TRAIT_MARKET_CRASHING)
+ default_price = round(initial(default_price))
+ extra_price = round(initial(extra_price))
+ if(crash_status)
+ default_price *= SSeconomy.inflation_value()
+ extra_price *= SSeconomy.inflation_value()
+
for(var/R in recordlist)
var/datum/data/vending_product/record = R
var/obj/item/potential_product = record.product_path
- record.custom_price = round(initial(potential_product.custom_price) * SSeconomy.inflation_value())
+ record.custom_price = round(initial(potential_product.custom_price))
+ if(crash_status)
+ record.custom_price = round(initial(potential_product.custom_price) * SSeconomy.inflation_value())
for(var/R in premiumlist)
var/datum/data/vending_product/record = R
var/obj/item/potential_product = record.product_path
var/premium_sanity = round(initial(potential_product.custom_premium_price))
if(premium_sanity)
- record.custom_premium_price = round(premium_sanity * SSeconomy.inflation_value())
+ record.custom_premium_price = round(premium_sanity)
+ if(crash_status)
+ record.custom_premium_price = round(premium_sanity * SSeconomy.inflation_value())
continue
//For some ungodly reason, some premium only items only have a custom_price
- record.custom_premium_price = round(extra_price + (initial(potential_product.custom_price) * (SSeconomy.inflation_value() - 1)))
+ record.custom_premium_price = round(extra_price + (initial(potential_product.custom_price)))
+ if(crash_status)
+ record.custom_premium_price = round(extra_price + (initial(potential_product.custom_price) * (SSeconomy.inflation_value() - 1)))
/**
* Refill a vending machine from a refill canister
diff --git a/tgui/packages/tgui/interfaces/AccountingConsole.tsx b/tgui/packages/tgui/interfaces/AccountingConsole.tsx
index ad1aa05e0b5..25cc40cd8a3 100644
--- a/tgui/packages/tgui/interfaces/AccountingConsole.tsx
+++ b/tgui/packages/tgui/interfaces/AccountingConsole.tsx
@@ -1,4 +1,4 @@
-import { BlockQuote, Collapsible, LabeledList, Modal, Section, Stack, Tabs } from '../components';
+import { BlockQuote, Collapsible, Modal, Section, Stack, Tabs } from '../components';
import { useBackend } from '../backend';
import { useLocalState } from '../backend';
import { Window } from '../layouts';
@@ -73,18 +73,20 @@ const UsersScreen = (props, context) => {
return (
{PlayerAccounts.map((account) => (
-
-
-
- {account.job}
-
-
- {account.balance}
-
-
- {account.modifier * 100}%
-
-
+
+
+
+
+ {account.balance} credit balance
+
+
+ Employee has {account.modifier * 100}% pay modifier
+
+
+
))}