From 0a6eca818cc881d3176b90ac231224d0ba444680 Mon Sep 17 00:00:00 2001 From: SmArtKar Date: Sun, 16 Aug 2020 15:59:31 +0300 Subject: [PATCH] Succesfull removal of shuttle limit --- .../configuration/entries/game_options.dm | 7 ------- .../shuttle_creation/shuttle_creator.dm | 19 +++++-------------- .../shuttle_creator_actions.dm | 6 ------ 3 files changed, 5 insertions(+), 27 deletions(-) diff --git a/code/controllers/configuration/entries/game_options.dm b/code/controllers/configuration/entries/game_options.dm index 5765f291e9..61e3faa61c 100644 --- a/code/controllers/configuration/entries/game_options.dm +++ b/code/controllers/configuration/entries/game_options.dm @@ -523,10 +523,3 @@ * Camera mobs, AIs, ghosts and some other are of course exempt from this. This also doesn't influence simplemob AI, for the best. */ /datum/config_entry/flag/use_field_of_vision - -//Shuttle size limiter -/datum/config_entry/number/max_shuttle_count - config_entry_value = 6 - -/datum/config_entry/number/max_shuttle_size - config_entry_value = 250 diff --git a/code/modules/shuttle/shuttle_creation/shuttle_creator.dm b/code/modules/shuttle/shuttle_creation/shuttle_creator.dm index f5a11db60f..10bc2b3523 100644 --- a/code/modules/shuttle/shuttle_creation/shuttle_creator.dm +++ b/code/modules/shuttle/shuttle_creation/shuttle_creator.dm @@ -1,5 +1,3 @@ -#define SHUTTLE_CREATOR_MAX_SIZE CONFIG_GET(number/max_shuttle_size) -#define CUSTOM_SHUTTLE_LIMIT CONFIG_GET(number/max_shuttle_count) #define CARDINAL_DIRECTIONS_X list(1, 0, -1, 0) #define CARDINAL_DIRECTIONS_Y list(0, 1, 0, -1) @@ -57,10 +55,6 @@ GLOBAL_LIST_EMPTY(custom_shuttle_machines) //Machines that require updating (He ..() if(linkedShuttleId) return - if(GLOB.custom_shuttle_count > CUSTOM_SHUTTLE_LIMIT && !override_max_shuttles) - to_chat(user, "Too many shuttles have been created.") - message_admins("[ADMIN_FLW(user)] attempted to create a shuttle, however [CUSTOM_SHUTTLE_LIMIT] have already been created.") - return if(!internal_shuttle_creator) return overlay_holder.add_client(user.client) @@ -237,13 +231,13 @@ GLOBAL_LIST_EMPTY(custom_shuttle_machines) //Machines that require updating (He port.register() - icon_state = "rsd_used" + icon_state = "rsd_empty" //Clear highlights overlay_holder.clear_highlights() GLOB.custom_shuttle_count ++ - message_admins("[ADMIN_LOOKUPFLW(user)] created a new shuttle with a [src] at [ADMIN_VERBOSEJMP(user)] ([GLOB.custom_shuttle_count] custom shuttles, limit is [CUSTOM_SHUTTLE_LIMIT])") - log_game("[key_name(user)] created a new shuttle with a [src] at [AREACOORD(user)] ([GLOB.custom_shuttle_count] custom shuttles, limit is [CUSTOM_SHUTTLE_LIMIT])") + message_admins("[ADMIN_LOOKUPFLW(user)] created a new shuttle with a [src] at [ADMIN_VERBOSEJMP(user)] ([GLOB.custom_shuttle_count] custom shuttles)") + log_game("[key_name(user)] created a new shuttle with a [src] at [AREACOORD(user)] ([GLOB.custom_shuttle_count] custom shuttles)") return TRUE /obj/item/shuttle_creator/proc/create_shuttle_area(mob/user) @@ -290,13 +284,10 @@ GLOBAL_LIST_EMPTY(custom_shuttle_machines) //Machines that require updating (He return TRUE //Checks an area to ensure that the turfs provided are valid to be made into a shuttle -/obj/item/shuttle_creator/proc/check_area(list/turfs, addingTurfs = TRUE) +/obj/item/shuttle_creator/proc/check_area(list/turfs) if(!turfs) to_chat(usr, "Shuttles must be created in an airtight space, ensure that the shuttle is airtight, including corners.") return FALSE - if(turfs.len + (addingTurfs ? loggedTurfs.len : 0) > SHUTTLE_CREATOR_MAX_SIZE) - to_chat(usr, "The [src]'s internal cooling system wizzes violently and a message appears on the screen, \"Caution, this device can only handle the creation of shuttles up to [SHUTTLE_CREATOR_MAX_SIZE] units in size. Please reduce your shuttle by [turfs.len-SHUTTLE_CREATOR_MAX_SIZE]. Sorry for the inconvinience\"") - return FALSE //Check to see if it's a valid shuttle for(var/i in 1 to turfs.len) var/area/place = get_area(turfs[i]) @@ -350,7 +341,7 @@ GLOBAL_LIST_EMPTY(custom_shuttle_machines) //Machines that require updating (He loggedOldArea = get_area(get_turf(user)) loggedTurfs |= turfs overlay_holder.highlight_area(turfs) - //TODO READD THIS SHIT: icon_state = "rsd_used" + //TODO READD THIS SHIT: icon_state = "rsd_empty" to_chat(user, "You add the area into the buffer of the [src], you made add more areas or select an airlock to act as a docking port to complete the shuttle.") return turfs diff --git a/code/modules/shuttle/shuttle_creation/shuttle_creator_actions.dm b/code/modules/shuttle/shuttle_creation/shuttle_creator_actions.dm index f50b3bf59f..397cfad35a 100644 --- a/code/modules/shuttle/shuttle_creation/shuttle_creator_actions.dm +++ b/code/modules/shuttle/shuttle_creation/shuttle_creator_actions.dm @@ -81,12 +81,6 @@ return if(shuttle_creator.linkedShuttleId) return - if(GLOB.custom_shuttle_count > CUSTOM_SHUTTLE_LIMIT) - to_chat(C, "Shuttle limit reached, sorry.") - return - if(shuttle_creator.loggedTurfs.len > SHUTTLE_CREATOR_MAX_SIZE) - to_chat(C, "This shuttle is too large!") - return if(!shuttle_creator.getNonShuttleDirection(T)) to_chat(C, "Docking port must be on an external wall, with only 1 side exposed to space.") return