mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2025-12-09 07:46:20 +00:00
## About The Pull Request This PR serves as an alternative to #89638. For this proposal, stocks are now subject to market elasticity, similar to most other standard exports in-game. As a result, the value of a stock is going to scale downward through the quantity that they're sold at, whether as a stack of material or as a stock block at a given export rate. A material's new, elastically modified price can then be reassessed by scanning it with an export scanner. There was a good bit of behind the scenes work that came with making this work properly, but the short version of it is as follows: Stock blocks are no longer their own datum export, and stock blocks are now dynamically sorted into their appropriate export datum so that the `datum/export` `cost` variable can properly track elasticity whether between the sheet of the block form of the item. `Get_cost()` now calculates the cost based on the non-elastic form when saving to the block, and then when assessed for sale elasticity is applied on the block sale instead so as to not apply elasticity twice and make them worthless. I axed the `MARKET_PROFIT_MODIFIER` define and removed it from calculation. Originally it was meant as a crude alternative to a floodgate and sales factor that would change how much a stock block is worth in Lou of an actual elastic modifier, but with this implemented I feel confident in removing this. The wording of this is also reflected in the instructions tab of the stock market as well. Lastly, there are three minor things but they came up during testing and felt appropriate to tweak, but otherwise I'm happy to atomize out because I was just kinda on a roll: * I added a small light to the material market when on and powered, as 50% of the sprite is a big hologram light and it only makes sense that it would emit some light to the surroundings, albeit not a high range. * The material market now requires power to create stock blocks. * Refined Bluespace crystals (`/obj/item/stack/ore/bluespace_crystal/refined`) and other similar stacks of ore will now throw a warning if the amount or value is less than 1 in either case, preventing you from making a functionally useless stock block. ## Why It's Good For The Game Technically fixes #79978 ? This solution still enables for the stock market to exist in a meaningful way, prevents it from being an insanely powerful method of getting far too many credits too quickly by basically implementing a soft cooldown system respective to each material export type, and means that in avoiding that system, requires for cargo to alternate between a few different types of materials, which should *hopefully* allow for cargo to also be incentivized to actually deposit some of it's purchased materials into the station's resources respectively. The QOL and fix changes mentioned at the bottom of the first section allow for there to be fewer edge cases situations where the crew is unable to sell items that would functionally have zero value without some rather cheesy implementations of how stock blocks currently work by preventing otherwise invalid stock blocks from being made, as well as to make it behave in a way more fitting of a standard machine on the station. Also just in general enables a bit less duplicate code by relying a bit more on `export_items_and_contents()` to gather quantities and values for then redistributing back into the stock blocks, either for sale or for storage. ## Changelog 🆑 balance: Sheets of material and stock blocks are now subject to elastic price changes. AKA, if you sell materials, their price will go down after sale and will return after some time. fix: Stock blocks can no longer be made with no value or with a quantity of zero material. fix: The GMM Machine can now no longer create stock blocks when unpowered. qol: The GMM machine now lights up when powered. /🆑
84 lines
3.0 KiB
Plaintext
84 lines
3.0 KiB
Plaintext
/// Number of paychecks jobs start with at the creation of a new bank account for a player (So at shift-start or game join, but not a blank new account.)
|
|
#define STARTING_PAYCHECKS 5
|
|
/// How much mail the Economy SS will create per minute, regardless of firing time.
|
|
#define MAX_MAIL_PER_MINUTE 3
|
|
/// Probability of using letters of envelope sprites on all letters.
|
|
#define FULL_CRATE_LETTER_ODDS 70
|
|
|
|
//Current Paycheck values. Altering these changes both the cost of items meant for each paygrade, as well as the passive/starting income of each job.
|
|
///Default paygrade for the Unassigned Job/Unpaid job assignments.
|
|
#define PAYCHECK_ZERO 0
|
|
///Paygrade for Prisoners and Assistants.
|
|
#define PAYCHECK_LOWER 25
|
|
///Paygrade for all regular crew not belonging to PAYGRADE_LOWER or PAYGRADE_COMMAND.
|
|
#define PAYCHECK_CREW 50
|
|
///Paygrade for Heads of Staff.
|
|
#define PAYCHECK_COMMAND 100
|
|
|
|
|
|
|
|
#define STATION_TARGET_BUFFER 25
|
|
|
|
///The coefficient for the amount of dosh that's collected everytime some is earned or received.
|
|
#define DEBT_COLLECTION_COEFF 0.75
|
|
|
|
#define MAX_GRANT_DPT 500
|
|
|
|
//What should vending machines charge when you buy something in-department.
|
|
#define DEPARTMENT_DISCOUNT 0.2
|
|
|
|
//the amount of credits collected by the vending machines that can be redeemed when restocking it.
|
|
#define VENDING_CREDITS_COLLECTION_AMOUNT 0.2
|
|
|
|
#define ACCOUNT_CIV "CIV"
|
|
#define ACCOUNT_CIV_NAME "Civil Budget"
|
|
#define ACCOUNT_ENG "ENG"
|
|
#define ACCOUNT_ENG_NAME "Engineering Budget"
|
|
#define ACCOUNT_SCI "SCI"
|
|
#define ACCOUNT_SCI_NAME "Scientific Budget"
|
|
#define ACCOUNT_MED "MED"
|
|
#define ACCOUNT_MED_NAME "Medical Budget"
|
|
#define ACCOUNT_SRV "SRV"
|
|
#define ACCOUNT_SRV_NAME "Service Budget"
|
|
#define ACCOUNT_CAR "CAR"
|
|
#define ACCOUNT_CAR_NAME "Cargo Budget"
|
|
#define ACCOUNT_SEC "SEC"
|
|
#define ACCOUNT_SEC_NAME "Defense Budget"
|
|
|
|
#define IS_DEPARTMENTAL_CARD(card) (card in SSeconomy.dep_cards)
|
|
#define IS_DEPARTMENTAL_ACCOUNT(account) (account in SSeconomy.departmental_accounts)
|
|
|
|
#define NO_FREEBIES "commies go home"
|
|
|
|
/// The special account ID for admins using debug cards.
|
|
#define ADMIN_ACCOUNT_ID "ADMIN!"
|
|
|
|
//Defines that set what kind of civilian bounties should be applied mid-round.
|
|
#define CIV_JOB_BASIC 1
|
|
#define CIV_JOB_ROBO 2
|
|
#define CIV_JOB_CHEF 3
|
|
#define CIV_JOB_SEC 4
|
|
#define CIV_JOB_DRINK 5
|
|
#define CIV_JOB_CHEM 6
|
|
#define CIV_JOB_VIRO 7
|
|
#define CIV_JOB_SCI 8
|
|
#define CIV_JOB_ENG 9
|
|
#define CIV_JOB_MINE 10
|
|
#define CIV_JOB_MED 11
|
|
#define CIV_JOB_GROW 12
|
|
#define CIV_JOB_ATMOS 13
|
|
#define CIV_JOB_BITRUN 14
|
|
#define CIV_JOB_RANDOM 15
|
|
|
|
//These defines are to be used to with the payment component, determines which lines will be used during a transaction. If in doubt, go with clinical.
|
|
#define PAYMENT_CLINICAL "clinical"
|
|
#define PAYMENT_FRIENDLY "friendly"
|
|
#define PAYMENT_ANGRY "angry"
|
|
#define PAYMENT_VENDING "vending"
|
|
|
|
#define MARKET_TREND_UPWARD 1
|
|
#define MARKET_TREND_DOWNWARD -1
|
|
#define MARKET_TREND_STABLE 0
|
|
|
|
#define MARKET_EVENT_PROBABILITY 8 //Probability of a market event firing, in percent. Fires once per material, every stock market tick.
|