This commit is contained in:
L
2020-05-30 06:16:34 -03:00
parent 266707b119
commit 4b19e5863e
4 changed files with 36 additions and 11 deletions
+9 -11
View File
@@ -186,9 +186,8 @@
GLOBAL_LIST_EMPTY(employmentCabinets)
/obj/structure/filingcabinet/employment
var/cooldown = 0
icon_state = "employmentcabinet"
var/virgin = 1
var/virgin = TRUE
/obj/structure/filingcabinet/employment/Initialize()
. = ..()
@@ -213,13 +212,12 @@ GLOBAL_LIST_EMPTY(employmentCabinets)
new /obj/item/paper/contract/employment(src, employee)
/obj/structure/filingcabinet/employment/interact(mob/user)
if(!cooldown)
if(virgin)
fillCurrent()
virgin = 0
cooldown = 1
sleep(100) // prevents the devil from just instantly emptying the cabinet, ensuring an easy win.
cooldown = 0
else
if(COOLDOWN_CHECK(src, COOLDOWN_EMPLOYMENT_CABINET))
to_chat(user, "<span class='warning'>[src] is jammed, give it a few seconds.</span>")
..()
return ..()
COOLDOWN_START(src, COOLDOWN_EMPLOYMENT_CABINET, 10 SECONDS) // prevents the devil from just instantly emptying the cabinet, ensuring an easy win.
if(virgin)
fillCurrent()
virgin = FALSE
return ..()