Files
Bubberstation/code/modules/cargo
ArcaneMusic 87cf3da1fd Stock market event refactor and code improvements (#80985)
## About The Pull Request

Stock market events are a system coded into the stock market system in
an attempt to keep the stocks unpredictable, at least on paper. They...
need work, I'm in full agreement on that, but I haven't been able to get
the energy to really fix stocks as of recently. I plan on going and
kicking events up and making them a lot cooler, but in the meantime,
I've refactored stock market events into their own datum type,
`/datum/stock_market_event`. This works like most similar event datum
style objects, where an event has a proc called when an event starts, a
proc called when an event ends, and a proc called between on subsequent
stock market subsystem firings.

This does some minor tweaks to the newscaster stories automatically
generated after an event fires, namely so that they can be produced
quickly while emphasizing the important part of the event, what material
is being effected, and a summary of what kind of behavior has happened
to the material stock.

Additionally, this made for a good excuse to do some code cleanup here
while I had the opportunity, swapping to `::` as opposed to `initial()`
calls where it seemed cleaner and more appropriate. This should make
adding new stock market events as well as more unique events that can
effect cargo and the round at large simple to do.

This PR shouldn't have any mechanical changes to how stock market
behaves in a live round.

## Why It's Good For The Game

Improves code quality of stock market, increases readability of stock
market events that have happened on the newscaster, and performs some
minor cleanup to the TGUI for the stock market while I'm at it, all
while keeping balance the same while we're still in the feature freeze.

Full disclosure, once the freeze is over I have some pretty easy numbers
tweaks planned to help significantly improve the stock market system
that I had layered on this branch, but we've shuttled them off this PR
for now to get this part ready to ship.

## Changelog

🆑
refactor: Stock market events are now their own objects, and are handled
by the stock market individually.
/🆑

---------

Co-authored-by: MrMelbert <51863163+MrMelbert@users.noreply.github.com>
Co-authored-by: Ghom <42542238+Ghommie@users.noreply.github.com>
2024-01-24 22:11:20 +01:00
..
2023-12-25 11:19:56 -08:00
2023-12-09 13:31:50 +01:00