From 85084dbe7cea671303c9536b82cbf6c7c92bdff0 Mon Sep 17 00:00:00 2001 From: SyncIt21 <110812394+SyncIt21@users.noreply.github.com> Date: Wed, 29 Oct 2025 21:39:51 +0530 Subject: [PATCH] [NO GBP] Fixes high export value of seeds (#93661) ## About The Pull Request - Fixes https://github.com/tgstation/tgstation/pull/93235#discussion_r2467112106 Seeds export value now scales with this formulae `(0.1'ish most common seed -> 1 most rarest seed) * base cost(CRATE_VALUE * 0.025). ` so you get the same uniform scale before the elasticity rework. ## Changelog :cl: fix: exporting seeds won't yield ridiculously large profits /:cl: --- code/modules/cargo/exports/seeds.dm | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/code/modules/cargo/exports/seeds.dm b/code/modules/cargo/exports/seeds.dm index 3aa33ea2cf6..b560c7bbee5 100644 --- a/code/modules/cargo/exports/seeds.dm +++ b/code/modules/cargo/exports/seeds.dm @@ -3,17 +3,26 @@ k_elasticity = 0 //price inelastic/quantity elastic, only need to export a few samples unit_name = "new plant species sample" export_types = list(/obj/item/seeds) - // Only for undiscovered species + /// Only for undiscovered species var/needs_discovery = FALSE - // Plants sold on the market + /// Plants sold on the market var/static/list/discovered_plants = list() + /// Highest rarity of the most valuable seed + var/highest_rarity = 0 + +/datum/export/seed/New() + . = ..() + for(var/obj/item/seeds/seed as anything in subtypesof(/obj/item/seeds)) + if(seed::rarity > highest_rarity) + highest_rarity = seed::rarity /datum/export/seed/get_base_cost(obj/item/seeds/S) - if(!needs_discovery && (S.type in discovered_plants)) + var/discovered = discovered_plants[S.type] + if(!needs_discovery && discovered) return 0 - if(needs_discovery && !(S.type in discovered_plants)) + if(needs_discovery && !discovered) return 0 - return ..() * S.rarity // That's right, no bonus for potency. Send a crappy sample first to "show improvement" later. + return ..() * (S.rarity / highest_rarity) // That's right, no bonus for potency. Send a crappy sample first to "show improvement" later. /datum/export/seed/sell_object(obj/item/seeds/S, datum/export_report/report, dry_run, apply_elastic) . = ..() @@ -23,7 +32,6 @@ /datum/export/seed/potency cost = CARGO_CRATE_VALUE * 0.0125 // Gets multiplied by potency and rarity. unit_name = "improved plant sample" - export_types = list(/obj/item/seeds) needs_discovery = TRUE // Only for already discovered species /datum/export/seed/potency/get_base_cost(obj/item/seeds/S)