mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-23 05:00:55 +01:00
[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 🆑 fix: exporting seeds won't yield ridiculously large profits /🆑
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user