Succesfull removal of shuttle limit
This commit is contained in:
@@ -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, "<span class='warning'>Too many shuttles have been created.</span>")
|
||||
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, "<span class='warning'>Shuttles must be created in an airtight space, ensure that the shuttle is airtight, including corners.</span>")
|
||||
return FALSE
|
||||
if(turfs.len + (addingTurfs ? loggedTurfs.len : 0) > SHUTTLE_CREATOR_MAX_SIZE)
|
||||
to_chat(usr, "<span class='warning'>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\"</span>")
|
||||
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, "<span class='notice'>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.</span>")
|
||||
return turfs
|
||||
|
||||
|
||||
@@ -81,12 +81,6 @@
|
||||
return
|
||||
if(shuttle_creator.linkedShuttleId)
|
||||
return
|
||||
if(GLOB.custom_shuttle_count > CUSTOM_SHUTTLE_LIMIT)
|
||||
to_chat(C, "<span class='warning'>Shuttle limit reached, sorry.</span>")
|
||||
return
|
||||
if(shuttle_creator.loggedTurfs.len > SHUTTLE_CREATOR_MAX_SIZE)
|
||||
to_chat(C, "<span class='warning'>This shuttle is too large!</span>")
|
||||
return
|
||||
if(!shuttle_creator.getNonShuttleDirection(T))
|
||||
to_chat(C, "<span class='warning'>Docking port must be on an external wall, with only 1 side exposed to space.</span>")
|
||||
return
|
||||
|
||||
Reference in New Issue
Block a user