| Name | Avg(s) | Last(s) | Highest(s) | Tickcount | Tickrate | State | Action |
| [data["name"]] | " + text += "[num2text(data["averageRunTime"]/10,3)] | " + text += "[num2text(data["lastRunTime"]/10,3)] | " + text += "[num2text(data["highestRunTime"]/10,3)] | " + text += "[num2text(data["ticks"],4)] | " + text += "[data["schedule"]] | " + text += "[data["status"]] | " + text += "" + if (data["disabled"]) + text += "" + else + text += "" + text += " | " + text += "
| Severity | Name | Ends At | Ends In | Stop |
| [severity_to_string[EM.severity]] | " diff --git a/code/modules/mob/living/carbon/human/life.dm b/code/modules/mob/living/carbon/human/life.dm index f7f2f1c4aa3..98f59f36cb4 100644 --- a/code/modules/mob/living/carbon/human/life.dm +++ b/code/modules/mob/living/carbon/human/life.dm @@ -2,7 +2,7 @@ //NOTE: Breathing happens once per FOUR TICKS, unless the last breath fails. In which case it happens once per ONE TICK! So oxyloss healing is done once per 4 ticks while oxyloss damage is applied once per tick! #define HUMAN_MAX_OXYLOSS 1 //Defines how much oxyloss humans can get per tick. A tile with no air at all (such as space) applies this value, otherwise it's a percentage of it. -#define HUMAN_CRIT_MAX_OXYLOSS ( (last_tick_duration) /6) //The amount of damage you'll get when in critical condition. We want this to be a 5 minute deal = 300s. There are 50HP to get through, so (1/6)*last_tick_duration per second. Breaths however only happen every 4 ticks. +#define HUMAN_CRIT_MAX_OXYLOSS ( (tickerProcess.getLastTickerTimeDuration()) / 6) //The amount of damage you'll get when in critical condition. We want this to be a 5 minute deal = 300s. There are 50HP to get through, so (1/6)*last_tick_duration per second. Breaths however only happen every 4 ticks. #define HEAT_DAMAGE_LEVEL_1 2 //Amount of damage applied when your body temperature just passes the 360.15k safety point #define HEAT_DAMAGE_LEVEL_2 4 //Amount of damage applied when your body temperature passes the 400K point diff --git a/code/modules/mob/mob.dm b/code/modules/mob/mob.dm index 6f4ac6543c7..44f99bcbb05 100644 --- a/code/modules/mob/mob.dm +++ b/code/modules/mob/mob.dm @@ -792,7 +792,8 @@ note dizziness decrements automatically in the mob's Life() proc. //reset the pixel offsets to zero is_floating = 0 - +/proc/getStatName(var/datum/controller/process/process) + return uppertext(copytext(process.name, 1, 4)) /mob/Stat() ..() @@ -802,20 +803,49 @@ note dizziness decrements automatically in the mob's Life() proc. stat(null,"Location:\t([x], [y], [z])") stat(null,"CPU:\t[world.cpu]") stat(null,"Instances:\t[world.contents.len]") - if(statpanel("Status") && master_controller) - stat(null,"MasterController-[last_tick_duration] ([master_controller.processing?"On":"Off"]-[controller_iteration])") - stat(null,"Air-[master_controller.air_cost]\tSun-[master_controller.sun_cost]") - stat(null,"Mob-[master_controller.mobs_cost]\t#[mob_list.len]") - stat(null,"Dis-[master_controller.diseases_cost]\t#[active_diseases.len]") - stat(null,"Mch-[master_controller.machines_cost]\t#[machines.len]") - stat(null,"Obj-[master_controller.objects_cost]\t#[processing_objects.len]") - stat(null,"Net-[master_controller.networks_cost]\tPnet-[master_controller.powernets_cost]") - stat(null,"NanoUI-[master_controller.nano_cost]\t#[nanomanager.processing_uis.len]") - stat(null,"Event-[master_controller.events_cost]\t#[event_manager.active_events.len]") - alarm_manager.stat_entry() - stat(null,"Tick-[master_controller.ticker_cost]\tALL-[master_controller.total_cost]") + if(statpanel("Status") && processScheduler.getIsRunning()) + var/datum/controller/process/process + + process = processScheduler.getProcess("ticker") + stat(null, "[getStatName(process)]\t - #[process.getTicks()]\t - [process.getLastRunTime()]") + + process = processScheduler.getProcess("air") + stat(null, "[getStatName(process)]\t - #[process.getTicks()]\t - [process.getLastRunTime()]") + + process = processScheduler.getProcess("lighting") + stat(null, "[getStatName(process)]\t - #[process.getTicks()]\t - [process.getLastRunTime()]") + + process = processScheduler.getProcess("alarm") + var/list/alarms = alarm_manager.active_alarms() + stat(null, "[getStatName(process)]([alarms.len])\t - #[process.getTicks()]\t - [process.getLastRunTime()]") + + process = processScheduler.getProcess("mob") + stat(null, "[getStatName(process)]([mob_list.len])\t - #[process.getTicks()]\t - [process.getLastRunTime()]") + + process = processScheduler.getProcess("machinery") + stat(null, "[getStatName(process)]([machines.len])\t - #[process.getTicks()]\t - [process.getLastRunTime()]") + + process = processScheduler.getProcess("obj") + stat(null, "[getStatName(process)]([processing_objects.len])\t - #[process.getTicks()]\t - [process.getLastRunTime()]") + + process = processScheduler.getProcess("pipenet") + stat(null, "[getStatName(process)]([pipe_networks.len])\t - #[process.getTicks()]\t - [process.getLastRunTime()]") + + process = processScheduler.getProcess("powernet") + stat(null, "[getStatName(process)]([powernets.len])\t - #[process.getTicks()]\t - [process.getLastRunTime()]") + + process = processScheduler.getProcess("nanoui") + stat(null, "[getStatName(process)]([nanomanager.processing_uis.len])\t - #[process.getTicks()]\t - [process.getLastRunTime()]") + + process = processScheduler.getProcess("disease") + stat(null, "[getStatName(process)]([active_diseases.len])\t - #[process.getTicks()]\t - [process.getLastRunTime()]") + + process = processScheduler.getProcess("sun") + stat(null, "[getStatName(process)]\t - #[process.getTicks()]\t - [process.getLastRunTime()]") + else - stat(null,"MasterController-ERROR") + stat(null, "processScheduler is not running.") + if(listed_turf && client) if(!TurfAdjacent(listed_turf)) diff --git a/code/world.dm b/code/world.dm index 2fd24cf9f5c..8e5feb58a37 100644 --- a/code/world.dm +++ b/code/world.dm @@ -60,15 +60,22 @@ var/global/datum/global_init/init = new () // Create autolathe recipes, as above. populate_lathe_recipes() + processScheduler = new master_controller = new /datum/controller/game_controller() spawn(1) + + processScheduler.deferSetupFor(/datum/controller/process/ticker) + processScheduler.setup() + master_controller.setup() + + spawn(3000) //so we aren't adding to the round-start lag if(config.ToRban) ToRban_autoupdate() - if(config.kick_inactive) - KickInactiveClients() +/* if(config.kick_inactive) // handled in scheduler + KickInactiveClients()*/ #undef RECOMMENDED_VERSION @@ -209,6 +216,9 @@ var/world_topic_spam_protect_time = world.timeofday /*spawn(0) world << sound(pick('sound/AI/newroundsexy.ogg','sound/misc/apcdestroyed.ogg','sound/misc/bangindonk.ogg')) // random end sounds!! - LastyBatsy */ + + processScheduler.stop() + for(var/client/C in clients) if(config.server) //if you set a server location in config.txt, it sends you there instead of trying to reconnect to the same world address. -- NeoFite C << link("byond://[config.server]") @@ -228,7 +238,7 @@ var/world_topic_spam_protect_time = world.timeofday log_access("AFK: [key_name(C)]") C << "\red You have been inactive for more than 10 minutes and have been disconnected." del(C) -#undef INACTIVITY_KICK +//#undef INACTIVITY_KICK /hook/startup/proc/loadMode()