mirror of
https://github.com/yogstation13/Yogstation.git
synced 2025-02-26 09:04:50 +00:00
[Finally Finished] Toxins Techweb Pointcap (#40107)
cl Cobby (using cyclown's formula) balance: Techweb point gen via toxins are now very-hard-soft capped at 50K point rewards. After 50K points have been awarded, you can still get points for bombs that would reward higher than 50K, but they are worth only a flat 1K (hint: it's not beneficial). Give those other bombs to mining! balance: Techweb toxins equation has been edited (once again) /cl Reason: 10 minute prep is not worth nullifying the entire balancing act of techwebs, which are meant to more/less dripfeed items into an hour-hour thirty round.
This commit is contained in:
committed by
yogstation13-bot
parent
98b1187cba
commit
b76c61d636
@@ -71,3 +71,5 @@
|
||||
#define TECHWEB_POINT_TYPE_LIST_ASSOCIATIVE_NAMES list(\
|
||||
TECHWEB_POINT_TYPE_GENERIC = "General Research"\
|
||||
)
|
||||
|
||||
#define TECHWEB_BOMB_POINTCAP 50000 //Adjust as needed; Stops toxins from nullifying RND progression mechanics. Current Value Cap Radius: 100
|
||||
@@ -112,21 +112,38 @@ GLOBAL_LIST_EMPTY(doppler_arrays)
|
||||
if(!istype(linked_techweb))
|
||||
say("Warning: No linked research system!")
|
||||
return
|
||||
var/adjusted = orig_light - 10
|
||||
if(adjusted <= 0)
|
||||
|
||||
var/point_gain = 0
|
||||
|
||||
/*****The Point Calculator*****/
|
||||
|
||||
if(orig_light < 10)
|
||||
say("Explosion not large enough for research calculations.")
|
||||
return
|
||||
var/point_gain = techweb_scale_bomb(adjusted) - techweb_scale_bomb(linked_techweb.max_bomb_value)
|
||||
if(point_gain <= 0)
|
||||
say("Explosion not large enough for research calculations.")
|
||||
else if(orig_light < 4500)
|
||||
point_gain = (83300 * orig_light) / (orig_light + 3000)
|
||||
else
|
||||
point_gain = TECHWEB_BOMB_POINTCAP
|
||||
|
||||
/*****The Point Capper*****/
|
||||
if(point_gain > linked_techweb.largest_bomb_value)
|
||||
if(point_gain <= TECHWEB_BOMB_POINTCAP || linked_techweb.largest_bomb_value < TECHWEB_BOMB_POINTCAP)
|
||||
var/old_tech_largest_bomb_value = linked_techweb.largest_bomb_value //held so we can pull old before we do math
|
||||
linked_techweb.largest_bomb_value = point_gain
|
||||
point_gain -= old_tech_largest_bomb_value
|
||||
point_gain = min(point_gain,TECHWEB_BOMB_POINTCAP)
|
||||
else
|
||||
linked_techweb.largest_bomb_value = TECHWEB_BOMB_POINTCAP
|
||||
point_gain = 1000
|
||||
|
||||
linked_techweb.add_point_type(TECHWEB_POINT_TYPE_DEFAULT, point_gain)
|
||||
say("Gained [point_gain] points from explosion dataset.")
|
||||
|
||||
else //you've made smaller bombs
|
||||
say("Data already captured. Aborting.")
|
||||
return
|
||||
linked_techweb.max_bomb_value = adjusted
|
||||
linked_techweb.add_point_type(TECHWEB_POINT_TYPE_DEFAULT, point_gain)
|
||||
say("Gained [point_gain] points from explosion dataset.")
|
||||
|
||||
|
||||
/obj/machinery/doppler_array/research/science/Initialize()
|
||||
. = ..()
|
||||
linked_techweb = SSresearch.science_tech
|
||||
|
||||
/proc/techweb_scale_bomb(lightradius)
|
||||
return (lightradius ** 0.5) * 3000
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
var/list/obj/machinery/computer/rdconsole/consoles_accessing = list()
|
||||
var/id = "generic"
|
||||
var/list/research_logs = list() //IC logs.
|
||||
var/max_bomb_value = 0
|
||||
var/largest_bomb_value = 0
|
||||
var/organization = "Third-Party" //Organization name, used for display.
|
||||
var/list/last_bitcoins = list() //Current per-second production, used for display only.
|
||||
var/list/tiers = list() //Assoc list, datum = number, 1 is available, 2 is all reqs are 1, so on
|
||||
|
||||
Reference in New Issue
Block a user