From 2a42a55760c8b22c840226d129a1bdeffa37af29 Mon Sep 17 00:00:00 2001 From: SkyratBot <59378654+SkyratBot@users.noreply.github.com> Date: Thu, 8 Jul 2021 02:41:11 +0100 Subject: [PATCH] [MIRROR] makes some instances of x^y into x**y because thats what exponents are in dm (#6790) * makes some instances of x^y into x**y because thats what exponents are in dm (#60050) caught by monster at yogstation13/Yogstation#11703 probably not intended, 2^15 = 13 in dm so dont call this proc more than 13 times sequentially i guess I have a suspicion that it doesn't matter assuming it gets caught by tick_usage being different but just in case also fixes two other instances in code shown to me by mso * makes some instances of x^y into x**y because thats what exponents are in dm * Update lighting.dm Co-authored-by: Kylerace Co-authored-by: Useroth <37159550+Useroth@users.noreply.github.com> --- code/__HELPERS/files.dm | 2 +- code/modules/events/ghost_role.dm | 2 +- code/modules/power/lighting.dm | 2 +- modular_skyrat/modules/aesthetics/lights/code/lighting.dm | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/code/__HELPERS/files.dm b/code/__HELPERS/files.dm index 27be78c31db..3b9d35243f1 100644 --- a/code/__HELPERS/files.dm +++ b/code/__HELPERS/files.dm @@ -84,7 +84,7 @@ var/static/notch = 0 // its importaint this code can handle md5filepath sleeping instead of hard blocking, if it's converted to use rust_g. var/filename = "tmp/md5asfile.[world.realtime].[world.timeofday].[world.time].[world.tick_usage].[notch]" - notch = WRAP(notch+1, 0, 2^15) + notch = WRAP(notch+1, 0, 2**15) fcopy(file, filename) . = md5filepath(filename) fdel(filename) diff --git a/code/modules/events/ghost_role.dm b/code/modules/events/ghost_role.dm index 620efdc60c4..827371fb040 100644 --- a/code/modules/events/ghost_role.dm +++ b/code/modules/events/ghost_role.dm @@ -25,7 +25,7 @@ if(control && control.occurrences > 0) //Don't refund if it hasn't control.occurrences-- return - var/waittime = 300 * (2^retry) + var/waittime = 300 * (2**retry) message_admins("The event will not spawn a [role_name] until certain \ conditions are met. Waiting [waittime/10]s and then retrying.") addtimer(CALLBACK(src, .proc/try_spawning, 0, ++retry), waittime) diff --git a/code/modules/power/lighting.dm b/code/modules/power/lighting.dm index 1b77b81b7ee..7f33abc0429 100644 --- a/code/modules/power/lighting.dm +++ b/code/modules/power/lighting.dm @@ -440,7 +440,7 @@ if(rigged) if(status == LIGHT_OK && trigger) explode() - else if( prob( min(60, (switchcount^2)*0.01) ) ) + else if( prob( min(60, (switchcount**2)*0.01) ) ) if(trigger) burn_out() else diff --git a/modular_skyrat/modules/aesthetics/lights/code/lighting.dm b/modular_skyrat/modules/aesthetics/lights/code/lighting.dm index 372468755fd..fdee83eea2f 100644 --- a/modular_skyrat/modules/aesthetics/lights/code/lighting.dm +++ b/modular_skyrat/modules/aesthetics/lights/code/lighting.dm @@ -32,7 +32,7 @@ if(rigged) if(status == LIGHT_OK && trigger) explode() - else if( prob( min(60, (switchcount^2)*0.01) ) ) + else if( prob( min(60, (switchcount**2)*0.01) ) ) if(trigger) burn_out() else