fix up bombs

This commit is contained in:
Katherine Kiefer
2022-04-17 18:35:16 +10:00
parent 0efea57007
commit bec911cefe
4 changed files with 19 additions and 30 deletions

View File

@@ -77,10 +77,6 @@
TECHWEB_POINT_TYPE_NANITES = "Nanite Research"\
)
#define TECHWEB_BOMB_POINTCAP 50000 //Adjust as needed; Stops toxins from nullifying RND progression mechanics. Current Value Cap Radius: 100
///This is the maximum amount of research points a toxins bomb can get.
#define TOXINS_RESEARCH_MAX 70000
///This determines how easy it is for a toxins bomb to reach the max research cap.
#define TOXINS_RESEARCH_LAMBDA 3940
#define BOMB_TARGET_POINTS 50000 //Adjust as needed. Actual hard cap is double this, but will never be reached due to hyperbolic curve.
#define BOMB_TARGET_SIZE 175 // The shockwave radius required for a bomb to get TECHWEB_BOMB_MIDPOINT points.
#define BOMB_SUB_TARGET_EXPONENT 3 // The power of the points curve below the target size. Higher = less points for worse bombs, below target.

View File

@@ -95,8 +95,8 @@ GLOBAL_LIST_EMPTY(doppler_arrays)
desc = "A specialized tachyon-doppler bomb detection array that uses the results of the highest yield of explosions for research."
var/datum/techweb/linked_techweb
/obj/machinery/doppler_array/research/sense_explosion(datum/source, turf/epicenter, devastation_range, heavy_impact_range, light_impact_range,
took, orig_dev_range, orig_heavy_range, orig_light_range) //probably needs a way to ignore admin explosives later on
/obj/machinery/doppler_array/research/sense_explosion(datum/source, turf/epicenter, dev, heavy, light, time, orig_dev, orig_heavy, orig_light) //probably needs a way to ignore admin explosives later on
. = ..()
if(!.)
return
@@ -108,15 +108,13 @@ GLOBAL_LIST_EMPTY(doppler_arrays)
/*****The Point Calculator*****/
if(orig_light_range < 10)
if(orig_light < 5)
say("Explosion not large enough for research calculations.")
return
else if(orig_light_range >= INFINITY) // Colton-proofs the doppler array
say("WARNING: INFINITE DENSITY OF TACHYONS DETECTED.")
point_gain = TOXINS_RESEARCH_MAX
else
point_gain = (TOXINS_RESEARCH_MAX * orig_light_range) / (orig_light_range + TOXINS_RESEARCH_LAMBDA)//New yogs function has the limit built into it because l'Hopital's rule
else if(orig_light < BOMB_TARGET_SIZE) // we want to give fewer points if below the target; this curve does that
point_gain = (BOMB_TARGET_POINTS * orig_light ** BOMB_SUB_TARGET_EXPONENT) / (BOMB_TARGET_SIZE**BOMB_SUB_TARGET_EXPONENT)
else // once we're at the target, switch to a hyperbolic function so we can't go too far above it, but bigger bombs always get more points
point_gain = (BOMB_TARGET_POINTS * 2 * orig_light) / (orig_light + BOMB_TARGET_SIZE)
/*****The Point Capper*****/
if(point_gain > linked_techweb.largest_bomb_value)
@@ -126,8 +124,8 @@ GLOBAL_LIST_EMPTY(doppler_arrays)
var/datum/bank_account/D = SSeconomy.get_dep_account(ACCOUNT_CAR)
if(D)
D.adjust_money(point_gain)
linked_techweb.add_point_type(TECHWEB_POINT_TYPE_DEFAULT, point_gain)
say("Explosion details and mixture analyzed and sold to the highest bidder for $[point_gain], with a reward of [point_gain] points.")
linked_techweb.add_point_type(TECHWEB_POINT_TYPE_DEFAULT, point_gain)
say("Explosion details and mixture analyzed and sold to the highest bidder for [point_gain], with a reward of [point_gain] points.")
else //you've made smaller bombs
say("Data already captured. Aborting.")
@@ -136,4 +134,4 @@ GLOBAL_LIST_EMPTY(doppler_arrays)
/obj/machinery/doppler_array/research/science/Initialize()
. = ..()
linked_techweb = SSresearch.science_tech
linked_techweb = SSresearch.science_tech

View File

@@ -128,22 +128,17 @@
target_self = TRUE
if(change_volume)
if(!target_self)
target.set_volume(target.return_volume() + tank_two.air_contents.return_volume())
target.set_volume(target.return_volume() + tank_two.volume)
target.set_volume(target.return_volume() + tank_one.air_contents.return_volume())
var/datum/gas_mixture/temp
temp = tank_one.air_contents.remove_ratio(1)
target.merge(temp)
tank_one.air_contents.transfer_ratio_to(target, 1)
if(!target_self)
temp = tank_two.air_contents.remove_ratio(1)
target.merge(temp)
tank_two.air_contents.transfer_ratio_to(target, 1)
/obj/item/transfer_valve/proc/split_gases()
if (!valve_open || !tank_one || !tank_two)
return
var/ratio1 = tank_one.air_contents.return_volume()/tank_two.air_contents.return_volume()
var/datum/gas_mixture/temp
temp = tank_two.air_contents.remove_ratio(ratio1)
tank_one.air_contents.merge(temp)
tank_two.air_contents.transfer_ratio_to(tank_one.air_contents, ratio1)
tank_two.air_contents.set_volume(tank_two.air_contents.return_volume() - tank_one.air_contents.return_volume())
/*
@@ -246,4 +241,4 @@
attached_device = null
. = TRUE
update_icon()
update_icon()

View File

@@ -99,7 +99,7 @@
flags = GAS_FLAG_DANGEROUS
fusion_power = 1
fire_products = list(GAS_H2O = 1)
enthalpy = 40000
enthalpy = 300000
fire_burn_rate = 2
fire_radiation_released = 50 // arbitrary number, basically 60 moles of trit burning will just barely start to harm you
fire_temperature = FIRE_MINIMUM_TEMPERATURE_TO_EXIST - 50