diff --git a/code/__DEFINES/research.dm b/code/__DEFINES/research.dm index 16776ed8e2b..5349b40baec 100644 --- a/code/__DEFINES/research.dm +++ b/code/__DEFINES/research.dm @@ -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 \ No newline at end of file diff --git a/code/game/machinery/doppler_array.dm b/code/game/machinery/doppler_array.dm index 9d522f8f1cc..a34e078f445 100644 --- a/code/game/machinery/doppler_array.dm +++ b/code/game/machinery/doppler_array.dm @@ -111,22 +111,39 @@ GLOBAL_LIST_EMPTY(doppler_arrays) return FALSE if(!istype(linked_techweb)) say("Warning: No linked research system!") - return - var/adjusted = orig_light - 10 - if(adjusted <= 0) + return + + 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 diff --git a/code/modules/research/techweb/_techweb.dm b/code/modules/research/techweb/_techweb.dm index f11b0ad7097..dbfca477d6b 100644 --- a/code/modules/research/techweb/_techweb.dm +++ b/code/modules/research/techweb/_techweb.dm @@ -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