mirror of
https://github.com/KabKebab/GS13.git
synced 2026-07-11 07:59:08 +01:00
Merge pull request #562 from ArchieBeepBoop/anotherpatch
Exiles Patch + New Functions
This commit is contained in:
@@ -85,4 +85,9 @@ GLOBAL_VAR_INIT(rollovercheck_last_timeofday, 0)
|
||||
/proc/gameTimestamp(format = "hh:mm:ss", wtime=null)
|
||||
if(!wtime)
|
||||
wtime = world.time
|
||||
return time2text(wtime - GLOB.timezoneOffset, format)
|
||||
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
|
||||
|
||||
@@ -301,7 +301,7 @@
|
||||
|
||||
//Exiles: Stranded exiles that have been left in Snowdin. Can be easily adapted for other roles as well.
|
||||
/obj/effect/mob_spawn/human/exiled
|
||||
name = "a used bed"
|
||||
name = "used bed"
|
||||
desc = "Still warm."
|
||||
mob_name = "exiled"
|
||||
job_description = "Exiles"
|
||||
@@ -315,9 +315,11 @@
|
||||
Every day, you pause and recollect your memories from before it all happened... "
|
||||
assignedrole = "Arctic Exile"
|
||||
mirrorcanloadappearance = TRUE
|
||||
ghost_usable = FALSE
|
||||
|
||||
/obj/effect/mob_spawn/human/exiled/Initialize(mapload)
|
||||
. = ..()
|
||||
delayusability(900)
|
||||
var/arrpee = rand(1,3)
|
||||
switch(arrpee)
|
||||
if(1)
|
||||
|
||||
@@ -86,6 +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/enableghostrole()
|
||||
ghost_usable = 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
|
||||
if(!random)
|
||||
|
||||
Reference in New Issue
Block a user