mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-11 10:43:20 +00:00
Merge branch 'master' of https://github.com/PolarisSS13/Polaris into polaris-sync-2018-03-15
# Conflicts: # README.md # code/__defines/mobs.dm # code/__defines/subsystems.dm # code/_helpers/global_lists.dm # code/controllers/subsystems/garbage.dm # code/controllers/subsystems/overlays.dm # code/datums/datacore.dm # code/datums/supplypacks/munitions.dm # code/game/machinery/suit_storage_unit.dm # code/game/objects/items/devices/communicator/UI.dm # code/game/objects/items/weapons/id cards/station_ids.dm # code/game/objects/random/random.dm # code/game/turfs/simulated/floor.dm # code/game/turfs/simulated/floor_icon.dm # code/modules/awaymissions/gateway.dm # code/modules/client/preferences.dm # code/modules/ext_scripts/python.dm # code/modules/mob/living/carbon/human/human.dm # code/modules/mob/living/carbon/human/life.dm # code/modules/mob/living/carbon/human/species/station/station.dm # code/modules/mob/living/carbon/human/species/virtual_reality/avatar.dm # code/modules/mob/living/carbon/human/update_icons.dm # code/modules/mob/living/living.dm # code/modules/mob/living/living_defines.dm # code/modules/mob/living/simple_animal/animals/bear.dm # code/modules/mob/mob_helpers.dm # code/modules/mob/new_player/new_player.dm # code/modules/mob/new_player/preferences_setup.dm # code/modules/mob/new_player/sprite_accessories.dm # code/modules/organs/organ_external.dm # code/modules/organs/organ_icon.dm # code/modules/organs/robolimbs.dm # code/modules/reagents/reagent_containers/glass.dm # code/modules/reagents/reagent_containers/syringes.dm # html/changelogs/.all_changelog.yml # maps/southern_cross/southern_cross-1.dmm # maps/southern_cross/southern_cross-3.dmm # maps/southern_cross/southern_cross-4.dmm # maps/southern_cross/southern_cross-6.dmm # vorestation.dme
This commit is contained in:
@@ -8,19 +8,21 @@
|
||||
|
||||
/datum/controller/process/scheduler/setup()
|
||||
name = "scheduler"
|
||||
schedule_interval = 3 SECONDS
|
||||
schedule_interval = 1 SECOND
|
||||
scheduled_tasks = list()
|
||||
scheduler = src
|
||||
|
||||
/datum/controller/process/scheduler/doWork()
|
||||
var/world_time = world.time
|
||||
for(last_object in scheduled_tasks)
|
||||
var/datum/scheduled_task/scheduled_task = last_object
|
||||
if(world_time < scheduled_task.trigger_time)
|
||||
break // Too early for this one, and therefore too early for all remaining.
|
||||
try
|
||||
if(world.time > scheduled_task.trigger_time)
|
||||
unschedule(scheduled_task)
|
||||
scheduled_task.pre_process()
|
||||
scheduled_task.process()
|
||||
scheduled_task.post_process()
|
||||
unschedule(scheduled_task)
|
||||
scheduled_task.pre_process()
|
||||
scheduled_task.process()
|
||||
scheduled_task.post_process()
|
||||
catch(var/exception/e)
|
||||
catchException(e, last_object)
|
||||
SCHECK
|
||||
@@ -45,7 +47,7 @@
|
||||
stat(null, "[scheduled_tasks.len] task\s")
|
||||
|
||||
/datum/controller/process/scheduler/proc/schedule(var/datum/scheduled_task/st)
|
||||
scheduled_tasks += st
|
||||
dd_insertObjectList(scheduled_tasks, st)
|
||||
|
||||
/datum/controller/process/scheduler/proc/unschedule(var/datum/scheduled_task/st)
|
||||
scheduled_tasks -= st
|
||||
@@ -106,6 +108,9 @@
|
||||
task_after_process_args.Cut()
|
||||
return ..()
|
||||
|
||||
/datum/scheduled_task/dd_SortValue()
|
||||
return trigger_time
|
||||
|
||||
/datum/scheduled_task/proc/pre_process()
|
||||
task_triggered_event.raise_event(list(src))
|
||||
|
||||
|
||||
@@ -212,7 +212,7 @@ var/list/gamemode_cache = list()
|
||||
|
||||
var/starlight = 0 // Whether space turfs have ambient light or not
|
||||
|
||||
var/list/ert_species = list("Human")
|
||||
var/list/ert_species = list(SPECIES_HUMAN)
|
||||
|
||||
var/law_zero = "ERROR ER0RR $R0RRO$!R41.%%!!(%$^^__+ @#F0E4'ALL LAWS OVERRIDDEN#*?&110010"
|
||||
|
||||
@@ -721,7 +721,7 @@ var/list/gamemode_cache = list()
|
||||
if("ert_species")
|
||||
config.ert_species = splittext(value, ";")
|
||||
if(!config.ert_species.len)
|
||||
config.ert_species += "Human"
|
||||
config.ert_species += SPECIES_HUMAN
|
||||
|
||||
if("law_zero")
|
||||
law_zero = value
|
||||
|
||||
@@ -11,6 +11,8 @@ SUBSYSTEM_DEF(overlays)
|
||||
var/list/overlay_icon_state_caches // Cache thing
|
||||
var/list/overlay_icon_cache // Cache thing
|
||||
|
||||
var/global/image/stringbro = new() // Temporarily super-global because of BYOND init order dumbness.
|
||||
var/global/image/iconbro = new() // Temporarily super-global because of BYOND init order dumbness.
|
||||
var/global/image/appearance_bro = new() // Temporarily super-global because of BYOND init order dumbness.
|
||||
|
||||
/datum/controller/subsystem/overlays/PreInit()
|
||||
@@ -64,7 +66,7 @@ var/global/image/appearance_bro = new() // Temporarily super-global because of B
|
||||
count = 0
|
||||
|
||||
/proc/iconstate2appearance(icon, iconstate)
|
||||
var/static/image/stringbro = new()
|
||||
// var/static/image/stringbro = new() // Moved to be superglobal due to BYOND insane init order stupidness.
|
||||
var/list/icon_states_cache = SSoverlays.overlay_icon_state_caches
|
||||
var/list/cached_icon = icon_states_cache[icon]
|
||||
if (cached_icon)
|
||||
@@ -81,7 +83,7 @@ var/global/image/appearance_bro = new() // Temporarily super-global because of B
|
||||
return cached_appearance
|
||||
|
||||
/proc/icon2appearance(icon)
|
||||
var/static/image/iconbro = new()
|
||||
// var/static/image/iconbro = new() // Moved to be superglobal due to BYOND insane init order stupidness.
|
||||
var/list/icon_cache = SSoverlays.overlay_icon_cache
|
||||
. = icon_cache[icon]
|
||||
if (!.)
|
||||
|
||||
Reference in New Issue
Block a user