Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PTL renumber #18505

Merged
Merged
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
18 changes: 9 additions & 9 deletions code/modules/power/pt_laser.dm
Original file line number Diff line number Diff line change
Expand Up @@ -187,15 +187,15 @@

var/output_mw = adjusted_output / 1e6

#define LOW_CAP (20) //provide a nice scalar for deminishing returns instead of a slow steady climb
#define LOW_CAP (23) //provide a nice scalar for deminishing returns instead of a slow steady climb
#define BUX_PER_WORK_CAP (5000-LOW_CAP) //at inf power, generate 5000$/tick, also max amt to drain/tick
#define ACCEL_FACTOR 69 //our acceleration factor towards cap
#define ACCEL_FACTOR 15 //our acceleration factor towards cap
#define STEAL_FACTOR 4 //Adjusts the curve of the stealing EQ (2nd deriv/concavity)

//For equation + explanation, https://www.desmos.com/calculator/r8bsyz5gf9
//For equation + explanation, https://www.desmos.com/calculator/6pft2ayzt9
//Adjusted to give a decent amt. of cash/tick @ 50GW (said to be average hellburn)
var/generated_moolah = (2*output_mw*BUX_PER_WORK_CAP)/(2*output_mw+BUX_PER_WORK_CAP*ACCEL_FACTOR) //used if output_mw > 0
generated_moolah += (4*output_mw*LOW_CAP)/(4*output_mw + LOW_CAP)
generated_moolah += (5*output_mw*LOW_CAP)/(2*output_mw + LOW_CAP)

if (src.output < 0) //steals money since you emagged it
generated_moolah = (-2*output_mw*BUX_PER_WORK_CAP)/(2*STEAL_FACTOR*output_mw - BUX_PER_WORK_CAP*STEAL_FACTOR*ACCEL_FACTOR)
Expand Down Expand Up @@ -465,25 +465,25 @@

//this will probably need fiddling with, hard to decide on reasonable values
switch(power)
if(10 to 1e7)
if(10 to 10 MEGA WATTS)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should this be to 5 MEGA WATTS?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch, you really would think the compiler should be able to catch this.

L.set_burning(power/1e5) //100 (max burning) at 10MW
L.bodytemperature = max(power/1e4, L.bodytemperature) //1000K at 10MW. More than hotspot because it's hitting them not just radiating heat (i guess? idk)
if(1e7+1 to 5e8)
if(5 MEGA WATTS + 1 to 200 MEGA WATTS)
L.set_burning(100)
L.bodytemperature = max(power/1e4, L.bodytemperature)
L.TakeDamage("chest", 0, power/1e7) //ow
if(ishuman(L) && prob(min(power/1e7,50)))
var/limb = pick("l_arm","r_arm","l_leg","r_leg")
L:sever_limb(limb)
L.visible_message("<b>The [src.name] slices off one of [L.name]'s limbs!</b>")
if(5e8+1 to 1e11) //you really fucked up this time buddy
if(200 MEGA WATTS + 1 to 5 GIGA WATTS) //you really fucked up this time buddy
make_cleanable( /obj/decal/cleanable/ash,src.loc)
L.unlock_medal("For Your Ohm Good", 1)
L.visible_message("<b>[L.name] is vaporised by the [src]!</b>")
logTheThing(LOG_COMBAT, L, "was elecgibbed by the PTL at [log_loc(L)].")
L.elecgib()
return 1 //tells the caller to remove L from the laser's affecting_mobs
if(1e11+1 to INFINITY) //you really, REALLY fucked up this time buddy
if(5 GIGA WATTS + 1 to INFINITY) //you really, REALLY fucked up this time buddy
L.unlock_medal("For Your Ohm Good", 1)
L.visible_message("<b>[L.name] is detonated by the [src]!</b>")
logTheThing(LOG_COMBAT, L, "was explosively gibbed by the PTL at [log_loc(L)].")
Expand Down Expand Up @@ -861,7 +861,7 @@ TYPEINFO(/obj/laser_sink/splitter)
src.sink = seller
var/power = src.source.laser_power()
alpha = clamp(((log(10, max(power,1)) - 5) * (255 / 5)), 50, 255) //50 at ~1e7 255 at 1e11 power, the point at which the laser's most deadly effect happens
if(istype(src.loc, /turf/simulated/floor) && prob(power/1e6))
if(istype(src.loc, /turf/simulated/floor) && prob(power/1 MEGA WATT))
src.loc:burn_tile()

for (var/mob/living/L in src.loc)
Expand Down