Skip to content

Commit

Permalink
Making holes in the SM chamber will provide a lot of +*=FUN=*+ (tgsta…
Browse files Browse the repository at this point in the history
…tion#53725)

Making a hole in the supermatter chamber to vent it and so to slow down the delamination will instead make the delamination way faster, more so if the SM power is very high and the power level is high too.

Fix an old unintended feature where you could just vent to space the SM chamber to slow down or even stop a delamination (sometimes you could just make a hole in the chamber and it would stabilize while delaminating), the SM is easily fixable just by looking at the pipe and the meters, no need to vent to space. (Lemons note, in some cases a vent to space is needed,  but it should not be a long term thing)
  • Loading branch information
Ghilker authored Oct 6, 2020
1 parent 390f33e commit 1faa908
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions code/modules/power/supermatter/supermatter.dm
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,8 @@
#define SLIGHTLY_CHARGED_ZAP_ICON_STATE "sm_arc_supercharged"
#define OVER_9000_ZAP_ICON_STATE "sm_arc_dbz_referance" //Witty I know

#define MAX_SPACE_EXPOSURE_DAMAGE 2

GLOBAL_DATUM(main_supermatter_engine, /obj/machinery/power/supermatter_crystal)

/obj/machinery/power/supermatter_crystal
Expand Down Expand Up @@ -555,6 +557,22 @@ GLOBAL_DATUM(main_supermatter_engine, /obj/machinery/power/supermatter_crystal)
//Only has a net positive effect when the temp is below 313.15, heals up to 2 damage. Psycologists increase this temp min by up to 45
damage = max(damage + (min(removed.temperature - ((T0C + HEAT_PENALTY_THRESHOLD) + (45 * psyCoeff)), 0) / 150 ), 0)

//Check for holes in the SM inner chamber
for(var/t in RANGE_TURFS(1, loc))
if(!isspaceturf(t))
continue
var/turf/turf_to_check = t
if(LAZYLEN(turf_to_check.atmos_adjacent_turfs))
var/integrity = get_integrity()
if(integrity < 10)
damage += clamp((power * 0.0005) * DAMAGE_INCREASE_MULTIPLIER, 0, MAX_SPACE_EXPOSURE_DAMAGE)
else if(integrity < 25)
damage += clamp((power * 0.0009) * DAMAGE_INCREASE_MULTIPLIER, 0, MAX_SPACE_EXPOSURE_DAMAGE)
else if(integrity < 45)
damage += clamp((power * 0.005) * DAMAGE_INCREASE_MULTIPLIER, 0, MAX_SPACE_EXPOSURE_DAMAGE)
else if(integrity < 75)
damage += clamp((power * 0.002) * DAMAGE_INCREASE_MULTIPLIER, 0, MAX_SPACE_EXPOSURE_DAMAGE)
break
//caps damage rate

//Takes the lower number between archived damage + (1.8) and damage
Expand Down

0 comments on commit 1faa908

Please sign in to comment.