From 6f2cf0b63669a7b06fb58f1b9de96212c968e8fb Mon Sep 17 00:00:00 2001 From: deathride58 Date: Tue, 7 Jan 2020 10:04:09 -0500 Subject: [PATCH] [s] adds a cooldown to area creation attempts --- code/__HELPERS/areas.dm | 7 +++++++ code/modules/mob/mob_defines.dm | 1 + 2 files changed, 8 insertions(+) diff --git a/code/__HELPERS/areas.dm b/code/__HELPERS/areas.dm index 1f5b82f7bf..4b52187e13 100644 --- a/code/__HELPERS/areas.dm +++ b/code/__HELPERS/areas.dm @@ -43,6 +43,13 @@ var/static/blacklisted_areas = typecacheof(list( /area/space, )) + + if(creator) + if(creator.create_area_cooldown >= world.time) + to_chat(creator, "You're trying to create a new area a little too fast.") + return + creator.create_area_cooldown = world.time + 10 + var/list/turfs = detect_room(get_turf(creator), area_or_turf_fail_types) if(!turfs) to_chat(creator, "The new area must be completely airtight and not a part of a shuttle.") diff --git a/code/modules/mob/mob_defines.dm b/code/modules/mob/mob_defines.dm index c7365210ab..695084a794 100644 --- a/code/modules/mob/mob_defines.dm +++ b/code/modules/mob/mob_defines.dm @@ -29,6 +29,7 @@ var/obj/machinery/machine = null var/next_move = null + var/create_area_cooldown var/notransform = null //Carbon var/eye_blind = 0 //Carbon var/eye_blurry = 0 //Carbon