From 6163752e3c60c911249e76e4cfdc0cdcf3104b5a Mon Sep 17 00:00:00 2001 From: ArcaneMusic <41715314+ArcaneMusic@users.noreply.github.com> Date: Thu, 13 Jun 2024 14:02:19 -0400 Subject: [PATCH] Removes unused code from stock market and an unused market define. (#83872) ## About The Pull Request This PR removes a completely unused file, which added `/datum/supply_pack`s originally containing the materials for the mineral stock market contents, plus a define, MARKET_QUANTITY_HELPERS. Neither of these wound up being used in the final revision of the galactic mineral market, and I stumbled upon these to my horror that they're still in the code and completely unused as a result. Yikes! ## Why It's Good For The Game Removes unused code that is both not being utilized by the mineral market, but in fact was superseded by the current implementation during development and managed to slip it's way through review. ## Changelog No front facing changes, as the code was unused. --- code/__DEFINES/economy.dm | 19 ---------- .../modules/cargo/packs/stock_market_items.dm | 35 ------------------- tgstation.dme | 1 - 3 files changed, 55 deletions(-) delete mode 100644 code/modules/cargo/packs/stock_market_items.dm diff --git a/code/__DEFINES/economy.dm b/code/__DEFINES/economy.dm index 184419c2b5c..47e3db38e11 100644 --- a/code/__DEFINES/economy.dm +++ b/code/__DEFINES/economy.dm @@ -79,22 +79,3 @@ #define MARKET_EVENT_PROBABILITY 8 //Probability of a market event firing, in percent. Fires once per material, every stock market tick. #define MARKET_PROFIT_MODIFIER 0.8 //We don't make every sale a 1-1 of the actual buy price value, like with real life taxes and to encourage more smart trades - -/// Create quantity subtypes for stock market datums. -#define MARKET_QUANTITY_HELPERS(path) ##path/one {\ - amount = 1; \ -} \ -##path/five {\ - amount = 5; \ -} \ -##path/ten {\ - amount = 10; \ -} \ -##path/twenty_five {\ - amount = 25; \ -} \ -##path/fifty {\ - amount = 50; \ -} - - diff --git a/code/modules/cargo/packs/stock_market_items.dm b/code/modules/cargo/packs/stock_market_items.dm deleted file mode 100644 index 6206e8d0f4c..00000000000 --- a/code/modules/cargo/packs/stock_market_items.dm +++ /dev/null @@ -1,35 +0,0 @@ -/** - * todo: make this a supply_pack/custom. Drop pod? ohoho yes. Would be VERY fun. - */ -/datum/supply_pack/market_materials - name = "A Single Sheet of Bananium" - desc = "Going market price for this kind of sheet, by Australicus Industrial Mining." - cost = CARGO_CRATE_VALUE * 2 - crate_name = "mineral stock sheet crate" - group = "Canisters & Materials" - /// What material we are trying to buy sheets of? - var/datum/material/material - /// How many sheets of the material we are trying to buy at once? - var/amount - -/datum/supply_pack/market_materials/get_cost() - for(var/datum/material/mat as anything in SSstock_market.materials_prices) - if(material == mat) - return SSstock_market.materials_prices[mat] * amount - -/datum/supply_pack/market_materials/fill(obj/structure/closet/crate/C) - . = ..() - new material.sheet_type(C, amount) - -/datum/supply_pack/market_materials/iron - name = "Iron Sheets" - crate_name = "iron stock crate" - material = /datum/material/iron -MARKET_QUANTITY_HELPERS(/datum/supply_pack/market_materials/iron) - - -/datum/supply_pack/market_materials/gold - name = "Gold Sheets" - crate_name = "gold stock crate" - material = /datum/material/gold -MARKET_QUANTITY_HELPERS(/datum/supply_pack/market_materials/gold) diff --git a/tgstation.dme b/tgstation.dme index 5a4f39a1d66..2196f0559dd 100644 --- a/tgstation.dme +++ b/tgstation.dme @@ -3643,7 +3643,6 @@ #include "code\modules\cargo\packs\science.dm" #include "code\modules\cargo\packs\security.dm" #include "code\modules\cargo\packs\service.dm" -#include "code\modules\cargo\packs\stock_market_items.dm" #include "code\modules\cargo\packs\vending_restock.dm" #include "code\modules\chatter\chatter.dm" #include "code\modules\client\client_colour.dm"