mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-22 12:41:09 +01:00
<!-- Write **BELOW** The Headers and **ABOVE** The comments else it may not be viewable. --> <!-- You can view Contributing.MD for a detailed description of the pull request process. --> ## About The Pull Request Renames SolFed/SolGov/Solar Goverment/Solar Federation to TerraGov/Terran Goverment <!-- Describe The Pull Request. Please be sure every change is documented or this can delay review and even discourage maintainers from merging your PR! --> <!-- Please make sure to actually test your PRs. If you have not tested your PR mention it. --> ## Why It's Good For The Game Requested by the loremins <!-- Argue for the merits of your changes and how they benefit the game, especially if they are controversial and/or far reaching. If you can't actually explain WHY what you are doing will improve the game, then it probably isn't good for the game in the first place. --> ## Proof Of Testing It compiles, nothing seems broken ingame (please TM this) <!-- Compile and run your code locally. Make sure it works. This is the place to show off your changes! We are not responsible for testing your features. --> </details> ## Changelog <!-- If your PR modifies aspects of the game that can be concretely observed by players or admins you should add a changelog. If your change does NOT meet this description, remove this section. Be sure to properly mark your PRs to prevent unnecessary GBP loss. You can read up on GBP and its effects on PRs in the tgstation guides for contributors. Please note that maintainers freely reserve the right to remove and add tags should they deem it appropriate. You can attempt to finagle the system all you want, but it's best to shoot for clear communication right off the bat. --> 🆑 add: Renames all mentions of the Solar Goverment/Federation to the Terran Goverment /🆑 <!-- Both 🆑's are required for the changelog to work! You can put your name to the right of the first 🆑 if you want to overwrite your GitHub username as author ingame. --> <!-- You can use multiple of the same prefix (they're only used for the icon ingame) and delete the unneeded ones. Despite some of the tags, changelogs should generally represent how a player might be affected by the changes rather than a summary of the PR's contents. --> <!-- By opening a pull request. You have read and understood the repository rules located on the main README.md on this project. --> --------- Co-authored-by: Waterpig <49160555+Majkl-J@users.noreply.github.com> Co-authored-by: lessthanthree <83487515+lessthnthree@users.noreply.github.com>
58 lines
2.3 KiB
Plaintext
58 lines
2.3 KiB
Plaintext
/**
|
|
* An event which decreases the station target temporarily, causing the inflation var to increase heavily.
|
|
*
|
|
* Done by decreasing the station_target by a high value per crew member, resulting in the station total being much higher than the target, and causing artificial inflation.
|
|
*/
|
|
/datum/round_event_control/market_crash
|
|
name = "Market Crash"
|
|
typepath = /datum/round_event/market_crash
|
|
weight = 10
|
|
category = EVENT_CATEGORY_BUREAUCRATIC
|
|
description = "Temporarily increases the prices of vending machines."
|
|
|
|
/datum/round_event/market_crash
|
|
/// 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(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 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()
|
|
. = ..()
|
|
SSeconomy.update_vending_prices()
|
|
SSeconomy.price_update()
|
|
ADD_TRAIT(SSeconomy, TRAIT_MARKET_CRASHING, MARKET_CRASH_EVENT_TRAIT)
|
|
|
|
/datum/round_event/market_crash/end()
|
|
. = ..()
|
|
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()
|