From 52120c77280bb99d6a158908b3045abeb2127751 Mon Sep 17 00:00:00 2001 From: AnturK Date: Sun, 16 Feb 2020 21:21:24 +0100 Subject: [PATCH] Drops 512 support. --- code/__DEFINES/is_helpers.dm | 8 -------- code/__DEFINES/maths.dm | 9 --------- code/__HELPERS/unsorted.dm | 9 --------- code/_compile_options.dm | 4 ++-- code/controllers/subsystem/profiler.dm | 8 ++++---- code/game/world.dm | 2 +- code/modules/admin/verbs/SDQL2/SDQL_2_parser.dm | 8 -------- code/modules/mob/living/say.dm | 4 ---- code/modules/power/solar.dm | 5 ----- 9 files changed, 7 insertions(+), 50 deletions(-) diff --git a/code/__DEFINES/is_helpers.dm b/code/__DEFINES/is_helpers.dm index f7430cfe273..9d42068320d 100644 --- a/code/__DEFINES/is_helpers.dm +++ b/code/__DEFINES/is_helpers.dm @@ -1,16 +1,8 @@ // simple is_type and similar inline helpers -#if DM_VERSION < 513 -#define islist(L) (istype(L, /list)) -#endif - #define in_range(source, user) (get_dist(source, user) <= 1 && (get_step(source, 0)?:z) == (get_step(user, 0)?:z)) -#if DM_VERSION < 513 -#define ismovableatom(A) (istype(A, /atom/movable)) -#else #define ismovableatom(A) ismovable(A) -#endif #define isatom(A) (isloc(A)) diff --git a/code/__DEFINES/maths.dm b/code/__DEFINES/maths.dm index 2f8039de9ba..e6c8211cb09 100644 --- a/code/__DEFINES/maths.dm +++ b/code/__DEFINES/maths.dm @@ -30,11 +30,7 @@ // round() acts like floor(x, 1) by default but can't handle other values #define FLOOR(x, y) ( round((x) / (y)) * (y) ) -#if DM_VERSION < 513 -#define CLAMP(CLVALUE,CLMIN,CLMAX) ( max( (CLMIN), min((CLVALUE), (CLMAX)) ) ) -#else #define CLAMP(CLVALUE,CLMIN,CLMAX) clamp(CLVALUE, CLMIN, CLMAX) -#endif // Similar to clamp but the bottom rolls around to the top and vice versa. min is inclusive, max is exclusive #define WRAP(val, min, max) ( min == max ? min : (val) - (round(((val) - (min))/((max) - (min))) * ((max) - (min))) ) @@ -43,12 +39,7 @@ #define MODULUS(x, y) ( (x) - (y) * round((x) / (y)) ) // Tangent -#if DM_VERSION < 513 -#define TAN(x) (sin(x) / cos(x)) -#else #define TAN(x) tan(x) -#endif - // Cotangent #define COT(x) (1 / TAN(x)) diff --git a/code/__HELPERS/unsorted.dm b/code/__HELPERS/unsorted.dm index bb3a7136815..88f5d5130e8 100644 --- a/code/__HELPERS/unsorted.dm +++ b/code/__HELPERS/unsorted.dm @@ -445,15 +445,6 @@ Turf and target are separate in case you want to teleport some distance from a t var/y = min(world.maxy, max(1, A.y + dy)) return locate(x,y,A.z) -#if DM_VERSION > 513 -#warn 513 is definitely stable now, remove this -#endif -#if DM_VERSION < 513 -/proc/arctan(x) - var/y=arcsin(x/sqrt(1+x*x)) - return y -#endif - /* Gets all contents of contents and returns them all in a list. */ diff --git a/code/_compile_options.dm b/code/_compile_options.dm index 15aa07c7b9d..bc99da0d3c9 100644 --- a/code/_compile_options.dm +++ b/code/_compile_options.dm @@ -32,11 +32,11 @@ #endif //Update this whenever you need to take advantage of more recent byond features -#define MIN_COMPILER_VERSION 512 +#define MIN_COMPILER_VERSION 513 #if DM_VERSION < MIN_COMPILER_VERSION //Don't forget to update this part #error Your version of BYOND is too out-of-date to compile this project. Go to https://secure.byond.com/download and update. -#error You need version 512 or higher +#error You need version 513 or higher #endif //Compatability -- These procs were added in 513.1493, not 513.1490 diff --git a/code/controllers/subsystem/profiler.dm b/code/controllers/subsystem/profiler.dm index ec8b243073e..fd79dc15d56 100644 --- a/code/controllers/subsystem/profiler.dm +++ b/code/controllers/subsystem/profiler.dm @@ -5,7 +5,7 @@ SUBSYSTEM_DEF(profiler) init_order = INIT_ORDER_PROFILER runlevels = RUNLEVELS_DEFAULT | RUNLEVEL_LOBBY wait = 3000 - flags = SS_NO_TICK_CHECK + flags = SS_NO_TICK_CHECK var/fetch_cost = 0 var/write_cost = 0 @@ -31,7 +31,7 @@ SUBSYSTEM_DEF(profiler) return ..() /datum/controller/subsystem/profiler/proc/StartProfiling() -#if DM_BUILD < 1506 || DM_VERSION < 513 +#if DM_VERSION == 513 && DM_BUILD < 1506 || DM_VERSION < 513 stack_trace("Auto profiling unsupported on this byond version") CONFIG_SET(flag/auto_profile, FALSE) #else @@ -39,12 +39,12 @@ SUBSYSTEM_DEF(profiler) #endif /datum/controller/subsystem/profiler/proc/StopProfiling() -#if DM_BUILD >= 1506 && DM_VERSION >= 513 +#if DM_BUILD >= 1506 && DM_VERSION == 513 || DM_VERSION > 513 world.Profile(PROFILE_STOP) #endif /datum/controller/subsystem/profiler/proc/DumpFile() -#if DM_BUILD < 1506 || DM_VERSION < 513 +#if DM_VERSION == 513 && DM_BUILD < 1506 || DM_VERSION < 513 stack_trace("Auto profiling unsupported on this byond version") CONFIG_SET(flag/auto_profile, FALSE) #else diff --git a/code/game/world.dm b/code/game/world.dm index 322a77c7508..007b95241f6 100644 --- a/code/game/world.dm +++ b/code/game/world.dm @@ -22,7 +22,7 @@ GLOBAL_VAR(restart_counter) enable_debugger() //Early profile for auto-profiler - will be stopped on profiler init if necessary. -#if DM_VERSION >= 513 && DM_BUILD >= 1506 +#if DM_VERSION > 513 || DM_VERSION == 513 && DM_BUILD >= 1506 world.Profile(PROFILE_START) #endif diff --git a/code/modules/admin/verbs/SDQL2/SDQL_2_parser.dm b/code/modules/admin/verbs/SDQL2/SDQL_2_parser.dm index 32f385f8ec0..1c26cd7932f 100644 --- a/code/modules/admin/verbs/SDQL2/SDQL_2_parser.dm +++ b/code/modules/admin/verbs/SDQL2/SDQL_2_parser.dm @@ -482,14 +482,6 @@ temp_expression_list = list() i = expression(i, temp_expression_list) -#if MIN_COMPILER_VERSION > 512 -#warn Remove this outdated workaround -#elif DM_BUILD < 1467 - // http://www.byond.com/forum/post/2445083 - var/dummy = src.type - dummy = dummy -#endif - while(token(i) && token(i) != "]") if (temp_expression_list) diff --git a/code/modules/mob/living/say.dm b/code/modules/mob/living/say.dm index 4177109d16c..56d5a5095c3 100644 --- a/code/modules/mob/living/say.dm +++ b/code/modules/mob/living/say.dm @@ -200,11 +200,7 @@ GLOBAL_LIST_INIT(department_radio_keys, list( spans |= L.spans if(message_mode == MODE_SING) - #if DM_VERSION < 513 - var/randomnote = "~" - #else var/randomnote = pick("\u2669", "\u266A", "\u266B") - #endif spans |= SPAN_SINGING message = "[randomnote] [message] [randomnote]" diff --git a/code/modules/power/solar.dm b/code/modules/power/solar.dm index f0ef67dd92b..8e5985bd3a7 100644 --- a/code/modules/power/solar.dm +++ b/code/modules/power/solar.dm @@ -26,10 +26,8 @@ /obj/machinery/power/solar/Initialize(mapload, obj/item/solar_assembly/S) . = ..() panel = new() -#if DM_VERSION >= 513 panel.vis_flags = VIS_INHERIT_ID|VIS_INHERIT_ICON|VIS_INHERIT_PLANE vis_contents += panel -#endif panel.icon = icon panel.icon_state = "solar_panel" panel.layer = FLY_LAYER @@ -116,9 +114,6 @@ panel.icon_state = "solar_panel-b" else panel.icon_state = "solar_panel" -#if DM_VERSION <= 512 - . += new /mutable_appearance(panel) -#endif /obj/machinery/power/solar/proc/queue_turn(azimuth) needs_to_turn = TRUE