From d559fc1bd3917c2b76e449f39de7273ebeb828b4 Mon Sep 17 00:00:00 2001 From: vuonojenmustaturska Date: Wed, 11 Apr 2018 22:24:47 +0300 Subject: [PATCH] remove 512 version checks --- code/__DEFINES/is_helpers.dm | 7 ------- code/datums/components/_component.dm | 8 -------- code/game/machinery/_machinery.dm | 8 -------- .../environmental/LINDA_turf_tile.dm | 16 ---------------- code/modules/client/client_procs.dm | 4 ++-- .../reagents/chemistry/machinery/chem_master.dm | 8 -------- 6 files changed, 2 insertions(+), 49 deletions(-) diff --git a/code/__DEFINES/is_helpers.dm b/code/__DEFINES/is_helpers.dm index 5fe3df511b..dc0b6dce54 100644 --- a/code/__DEFINES/is_helpers.dm +++ b/code/__DEFINES/is_helpers.dm @@ -2,14 +2,7 @@ #define islist(L) (istype(L, /list)) -#if DM_VERSION >= 512 #define in_range(source, user) (get_dist(source, user) <= 1 && (get_step(source, 0)?:z) == (get_step(user, 0)?:z)) -#if DM_VERSION > 512 -#warn Remove this check. -#endif -#else -#define in_range(source, user) (get_dist(source, user) <= 1) -#endif #define ismovableatom(A) (istype(A, /atom/movable)) diff --git a/code/datums/components/_component.dm b/code/datums/components/_component.dm index 8f8f451f10..423dcf82df 100644 --- a/code/datums/components/_component.dm +++ b/code/datums/components/_component.dm @@ -105,14 +105,6 @@ return /datum/component/proc/_GetInverseTypeList(our_type = type) - #if DM_VERSION >= 513 - #warning 512 is definitely stable now, remove the old code - #endif - - #if DM_VERSION < 512 - //remove this when we use 512 full time - set invisibility = 101 - #endif //we can do this one simple trick var/current_type = parent_type . = list(our_type, current_type) diff --git a/code/game/machinery/_machinery.dm b/code/game/machinery/_machinery.dm index 389a7e80fa..17d4906c42 100644 --- a/code/game/machinery/_machinery.dm +++ b/code/game/machinery/_machinery.dm @@ -481,15 +481,7 @@ Class Procs: /obj/machinery/proc/adjust_item_drop_location(atom/movable/AM) // Adjust item drop location to a 3x3 grid inside the tile, returns slot id from 0 to 8 var/md5 = md5(AM.name) // Oh, and it's deterministic too. A specific item will always drop from the same slot. for (var/i in 1 to 32) - #if DM_VERSION >= 513 - #warning 512 is definitely stable now, remove the old code - #endif - - #if DM_VERSION >= 512 . += hex2num(md5[i]) - #else - . += hex2num(copytext(md5,i,i+1)) - #endif . = . % 9 AM.pixel_x = -8 + ((.%3)*8) AM.pixel_y = -8 + (round( . / 3)*8) diff --git a/code/modules/atmospherics/environmental/LINDA_turf_tile.dm b/code/modules/atmospherics/environmental/LINDA_turf_tile.dm index 49a9e96fd6..8acf6b095e 100644 --- a/code/modules/atmospherics/environmental/LINDA_turf_tile.dm +++ b/code/modules/atmospherics/environmental/LINDA_turf_tile.dm @@ -98,11 +98,6 @@ var/list/new_overlay_types = tile_graphic() var/list/atmos_overlay_types = src.atmos_overlay_types // Cache for free performance - #if DM_VERSION >= 513 - #warning 512 is stable now for sure, remove the old code - #endif - - #if DM_VERSION >= 512 if (atmos_overlay_types) for(var/overlay in atmos_overlay_types-new_overlay_types) //doesn't remove overlays that would only be added vars["vis_contents"] -= overlay @@ -112,17 +107,6 @@ vars["vis_contents"] += new_overlay_types - atmos_overlay_types //don't add overlays that already exist else vars["vis_contents"] += new_overlay_types - #else - if (atmos_overlay_types) - for(var/overlay in atmos_overlay_types-new_overlay_types) //doesn't remove overlays that would only be added - cut_overlay(overlay) - - if (new_overlay_types.len) - if (atmos_overlay_types) - add_overlay(new_overlay_types - atmos_overlay_types) //don't add overlays that already exist - else - add_overlay(new_overlay_types) - #endif UNSETEMPTY(new_overlay_types) src.atmos_overlay_types = new_overlay_types diff --git a/code/modules/client/client_procs.dm b/code/modules/client/client_procs.dm index 67d34a846c..035bd2f4b3 100644 --- a/code/modules/client/client_procs.dm +++ b/code/modules/client/client_procs.dm @@ -243,7 +243,7 @@ GLOBAL_LIST_EMPTY(external_rsc_urls) . = ..() //calls mob.Login() - #if DM_VERSION >= 512 + if (byond_version >= 512) if (!byond_build || byond_build < 1386) message_admins("[key_name(src)] has been detected as spoofing their byond version. Connection rejected.") @@ -261,7 +261,7 @@ GLOBAL_LIST_EMPTY(external_rsc_urls) else qdel(src) return - #endif + if(SSinput.initialized) set_macros() diff --git a/code/modules/reagents/chemistry/machinery/chem_master.dm b/code/modules/reagents/chemistry/machinery/chem_master.dm index a6a89d3b90..f915bc497f 100644 --- a/code/modules/reagents/chemistry/machinery/chem_master.dm +++ b/code/modules/reagents/chemistry/machinery/chem_master.dm @@ -382,15 +382,7 @@ else var/md5 = md5(AM.name) for (var/i in 1 to 32) - #if DM_VERSION >= 513 - #warning 512 is definitely stable now, remove the old code - #endif - - #if DM_VERSION >= 512 . += hex2num(md5[i]) - #else - . += hex2num(copytext(md5,i,i+1)) - #endif . = . % 9 AM.pixel_x = ((.%3)*6) AM.pixel_y = -8 + (round( . / 3)*8)