From b513d3ba7736533d17bec75560e81293c6de0e21 Mon Sep 17 00:00:00 2001 From: Dip Date: Wed, 7 Oct 2020 23:56:44 -0300 Subject: [PATCH] i am dumb --- code/__HELPERS/time.dm | 5 ----- code/game/objects/structures/ghost_role_spawners.dm | 2 +- code/modules/awaymissions/corpse.dm | 11 ++++++----- 3 files changed, 7 insertions(+), 11 deletions(-) diff --git a/code/__HELPERS/time.dm b/code/__HELPERS/time.dm index b606b0ea..67da8a27 100644 --- a/code/__HELPERS/time.dm +++ b/code/__HELPERS/time.dm @@ -86,8 +86,3 @@ GLOBAL_VAR_INIT(rollovercheck_last_timeofday, 0) if(!wtime) wtime = world.time return time2text(wtime - GLOB.timezoneOffset, format) - -//Approximate time in seconds, which it then calculates the ticks using the world's fps value and the master tick rate.. -//Warning, this will likely be innacurate if the server is having tickrate issues. It's fine for shorter things though. -/proc/approximateSecondsToTicks(seconds) - return seconds*(world.fps/CONFIG_GET(number/mc_tick_rate/base_mc_tick_rate))/2 diff --git a/code/game/objects/structures/ghost_role_spawners.dm b/code/game/objects/structures/ghost_role_spawners.dm index 66b875d9..dd5ecd95 100644 --- a/code/game/objects/structures/ghost_role_spawners.dm +++ b/code/game/objects/structures/ghost_role_spawners.dm @@ -319,7 +319,7 @@ /obj/effect/mob_spawn/human/exiled/Initialize(mapload) . = ..() - delayusability(900) + delayusability(9000, FALSE) //Probably should not show up on the menu? It gives it away that snowdin is the away mission. var/arrpee = rand(1,3) switch(arrpee) if(1) diff --git a/code/modules/awaymissions/corpse.dm b/code/modules/awaymissions/corpse.dm index 4fddd798..8658a2ec 100644 --- a/code/modules/awaymissions/corpse.dm +++ b/code/modules/awaymissions/corpse.dm @@ -86,13 +86,14 @@ /obj/effect/mob_spawn/proc/equip(mob/M) return -/obj/effect/mob_spawn/proc/delayusability(seconds) - addtimer(CALLBACK(src, .proc/enableghostrole), approximateSecondsToTicks(seconds)) +/obj/effect/mob_spawn/proc/delayusability(deciseconds, showOnMenu) //How many deciseconds until it is enabled, + should it show up on the menu? + addtimer(CALLBACK(src, .proc/enableghostrole, showOnMenu), deciseconds) -/obj/effect/mob_spawn/proc/enableghostrole() +/obj/effect/mob_spawn/proc/enableghostrole(show) ghost_usable = TRUE - GLOB.poi_list |= src - LAZYADD(GLOB.mob_spawners[job_description ? job_description : name], src) + if (show == TRUE) + GLOB.poi_list |= src + LAZYADD(GLOB.mob_spawners[job_description ? job_description : name], src) /obj/effect/mob_spawn/proc/create(ckey, name) var/mob/living/M = new mob_type(get_turf(src)) //living mobs only