diff --git a/code/__DEFINES/process_scheduler.dm b/code/__DEFINES/process_scheduler.dm
index f1e30c23ed3..5cdb99fc4bd 100644
--- a/code/__DEFINES/process_scheduler.dm
+++ b/code/__DEFINES/process_scheduler.dm
@@ -16,3 +16,6 @@
// Sleep check macro
#define SCHECK if(world.tick_usage >= next_sleep_usage) defer()
+
+//Timing Controller
+#define GLOBAL_PROC "some_magic_bullshit"
\ No newline at end of file
diff --git a/code/controllers/Processes/timer.dm b/code/controllers/Processes/timer.dm
index 2e60f8752b8..4add16aae31 100644
--- a/code/controllers/Processes/timer.dm
+++ b/code/controllers/Processes/timer.dm
@@ -6,7 +6,7 @@ var/global/datum/controller/process/timer/timer_master
/datum/controller/process/timer/setup()
name = "timer"
- schedule_interval = 5 //every 0.5 seconds
+ schedule_interval = 1 //every 0.1 seconds--2 server ticks
timer_master = src
log_startup_progress("Timer process starting up.")
@@ -30,7 +30,10 @@ var/global/datum/controller/process/timer/timer_master
/datum/controller/process/timer/proc/runevent(datum/timedevent/event)
set waitfor = 0
if(event.thingToCall)
- call(event.thingToCall, event.procToCall)(arglist(event.argList))
+ if(event.thingToCall == GLOBAL_PROC && istext(event.procToCall))
+ call("/proc/[event.procToCall]")(arglist(event.argList))
+ else
+ call(event.thingToCall, event.procToCall)(arglist(event.argList))
/datum/timedevent
var/thingToCall
@@ -42,8 +45,7 @@ var/global/datum/controller/process/timer/timer_master
var/static/nextid = 1
/datum/timedevent/New()
- id = nextid
- nextid++
+ id = nextid++
/datum/timedevent/Destroy()
timer_master.processing_timers -= src
@@ -53,7 +55,7 @@ var/global/datum/controller/process/timer/timer_master
/proc/addtimer(thingToCall, procToCall, wait, unique = FALSE, ...)
if(!timer_master) //can't run timers before the mc has been created
return
- if(!thingToCall || !procToCall || wait <= 0)
+ if(!thingToCall || !procToCall)
return
if(timer_master.disabled)
timer_master.disabled = 0
@@ -71,11 +73,17 @@ var/global/datum/controller/process/timer/timer_master
// Check for dupes if unique = 1.
if(unique)
- if(event.hash in timer_master.hashes)
- return
+ var/datum/timedevent/hash_event = timer_master.hashes[event.hash]
+ if(hash_event)
+ return hash_event.id
+ timer_master.hashes[event.hash] = event
+ if(wait <= 0)
+ timer_master.runevent(event)
+ timer_master.hashes -= event.hash
+ return
// If we are unique (or we're not checking that), add the timer and return the id.
timer_master.processing_timers += event
- timer_master.hashes += event.hash
+
return event.id
/proc/deltimer(id)
diff --git a/code/controllers/configuration.dm b/code/controllers/configuration.dm
index 88b631f5c18..9ac4a0eb4d6 100644
--- a/code/controllers/configuration.dm
+++ b/code/controllers/configuration.dm
@@ -139,6 +139,7 @@
var/list/irc_bot_host = list()
var/main_irc = ""
var/admin_irc = ""
+ var/admin_notify_irc = ""
var/python_path = "" //Path to the python executable. Defaults to "python" on windows and "/usr/bin/env python2" on unix
var/default_laws = 0 //Controls what laws the AI spawns with.
@@ -468,6 +469,9 @@
if("admin_irc")
config.admin_irc = value
+ if("admin_notify_irc")
+ config.admin_notify_irc = value
+
if("python_path")
if(value)
config.python_path = value
diff --git a/code/game/gamemodes/changeling/powers/revive.dm b/code/game/gamemodes/changeling/powers/revive.dm
index 2585287528c..8cb58d8dbe0 100644
--- a/code/game/gamemodes/changeling/powers/revive.dm
+++ b/code/game/gamemodes/changeling/powers/revive.dm
@@ -5,10 +5,6 @@
//Revive from regenerative stasis
/obj/effect/proc_holder/changeling/revive/sting_action(var/mob/living/carbon/user)
- if(user.stat == DEAD)
- dead_mob_list -= user
- living_mob_list |= user
- user.stat = CONSCIOUS
user.setToxLoss(0)
user.setOxyLoss(0)
user.setCloneLoss(0)
@@ -63,12 +59,13 @@
IO.damage = 0
IO.trace_chemicals = list()
H.updatehealth()
+
to_chat(user, "We have regenerated.")
user.regenerate_icons()
user.status_flags &= ~(FAKEDEATH)
- user.update_canmove()
+ user.update_revive() //Handle waking up the changeling after the regenerative stasis has completed.
user.mind.changeling.purchasedpowers -= src
user.med_hud_set_status()
user.med_hud_set_health()
diff --git a/code/game/gamemodes/gameticker.dm b/code/game/gamemodes/gameticker.dm
index 5deb2bafa0f..1b31f2d554a 100644
--- a/code/game/gamemodes/gameticker.dm
+++ b/code/game/gamemodes/gameticker.dm
@@ -209,12 +209,9 @@ var/round_start_time = 0
//start_events() //handles random events and space dust.
//new random event system is handled from the MC.
- var/admins_number = 0
- for(var/client/C)
- if(C.holder)
- admins_number++
- if(admins_number == 0)
- send2adminirc("Round has started with no admins online.")
+ var/list/admins_number = staff_countup(R_BAN)
+ if(admins_number[1] == 0 && admins_number[3] == 0)
+ send2irc(config.admin_notify_irc, "Round has started with no admins online.")
auto_toggle_ooc(0) // Turn it off
round_start_time = world.time
diff --git a/code/game/gamemodes/nuclear/pinpointer.dm b/code/game/gamemodes/nuclear/pinpointer.dm
index ee36a71a9cd..f118bf548f0 100644
--- a/code/game/gamemodes/nuclear/pinpointer.dm
+++ b/code/game/gamemodes/nuclear/pinpointer.dm
@@ -179,7 +179,7 @@
/obj/item/weapon/pinpointer/nukeop
var/mode = 0 //Mode 0 locates disk, mode 1 locates the shuttle
var/obj/docking_port/mobile/home = null
- slot_flags = SLOT_BELT
+ slot_flags = SLOT_BELT | SLOT_PDA
/obj/item/weapon/pinpointer/nukeop/attack_self(mob/user as mob)
if(!active)
diff --git a/code/game/gamemodes/vampire/vampire.dm b/code/game/gamemodes/vampire/vampire.dm
index dd40a6817b6..39c9c24ec50 100644
--- a/code/game/gamemodes/vampire/vampire.dm
+++ b/code/game/gamemodes/vampire/vampire.dm
@@ -242,6 +242,10 @@ You are weak to holy things and starlight. Don't go into space and avoid the Cha
owner.mind.spell_list.Remove(ability)
qdel(ability)
+/datum/vampire/proc/update_owner(var/mob/living/carbon/human/current) //Called when a vampire gets cloned. This updates vampire.owner to the new body.
+ if(current.mind && current.mind.vampire && current.mind.vampire.owner && (current.mind.vampire.owner != current))
+ current.mind.vampire.owner = current
+
/mob/proc/make_vampire()
if(!mind)
return
@@ -325,8 +329,7 @@ You are weak to holy things and starlight. Don't go into space and avoid the Cha
else if(istype(p, /datum/vampire_passive))
var/datum/vampire_passive/power = p
to_chat(owner, "[power.gain_desc]")
-
-
+
/datum/game_mode/proc/remove_vampire(datum/mind/vampire_mind)
if(vampire_mind in vampires)
ticker.mode.vampires -= vampire_mind
@@ -335,12 +338,12 @@ You are weak to holy things and starlight. Don't go into space and avoid the Cha
if(vampire_mind.vampire)
vampire_mind.vampire.remove_vampire_powers()
qdel(vampire_mind.vampire)
- vampire_mind.vampire = null
+ vampire_mind.vampire = null
if(issilicon(vampire_mind.current))
to_chat(vampire_mind.current, "You have been turned into a robot! You can feel your powers fading away...")
else
to_chat(vampire_mind.current, "You have been brainwashed! You are no longer a vampire.")
- ticker.mode.update_vampire_icons_removed(vampire_mind)
+ ticker.mode.update_vampire_icons_removed(vampire_mind)
//prepare for copypaste
/datum/game_mode/proc/update_vampire_icons_added(datum/mind/vampire_mind)
diff --git a/code/game/machinery/cloning.dm b/code/game/machinery/cloning.dm
index f07cd94438d..0cc1e8a0afe 100644
--- a/code/game/machinery/cloning.dm
+++ b/code/game/machinery/cloning.dm
@@ -247,6 +247,7 @@
if(grab_ghost_when == CLONER_FRESH_CLONE)
clonemind.transfer_to(H)
H.ckey = R.ckey
+ update_clone_antag(H) //Since the body's got the mind, update their antag stuff right now. Otherwise, wait until they get kicked out (as per the CLONER_MATURE_CLONE business) to do it.
to_chat(H, {"Consciousness slowly creeps over you
as your body regenerates.
So this is what cloning
feels like?"})
@@ -255,26 +256,6 @@
beginning to regenerate in a cloning pod. You will
become conscious when it is complete."})
- // -- Mode/mind specific stuff goes here
- callHook("clone", list(H))
-
- if((H.mind in ticker.mode:revolutionaries) || (H.mind in ticker.mode:head_revolutionaries))
- ticker.mode.update_rev_icons_added() //So the icon actually appears
- if(H.mind in ticker.mode.syndicates)
- ticker.mode.update_synd_icons_added()
- if(H.mind in ticker.mode.cult)
- ticker.mode.add_cult_viewpoint(H)
- ticker.mode.add_cultist(occupant.mind)
- ticker.mode.update_cult_icons_added() //So the icon actually appears
- if(("\ref[H.mind]" in ticker.mode.implanter) || (H.mind in ticker.mode.implanted))
- ticker.mode.update_traitor_icons_added(H.mind) //So the icon actually appears
- if(("\ref[H.mind]" in ticker.mode.vampire_thralls) || (H.mind in ticker.mode.vampire_enthralled))
- ticker.mode.update_vampire_icons_added(H.mind)
- if(("\ref[H.mind]" in ticker.mode.shadowling_thralls) || (H.mind in ticker.mode.shadows))
- ticker.mode.update_shadow_icons_added(H.mind)
-
- // -- End mode specific stuff
-
if(!R.dna)
H.dna = new /datum/dna()
H.dna.real_name = H.real_name
@@ -420,6 +401,28 @@
locked = 0
go_out()
+/obj/machinery/clonepod/proc/update_clone_antag(var/mob/living/carbon/human/H)
+ // Check to see if the clone's mind is an antagonist of any kind and handle them accordingly to make sure they get their spells, HUD/whatever else back.
+ callHook("clone", list(H))
+ if((H.mind in ticker.mode:revolutionaries) || (H.mind in ticker.mode:head_revolutionaries))
+ ticker.mode.update_rev_icons_added() //So the icon actually appears
+ if(H.mind in ticker.mode.syndicates)
+ ticker.mode.update_synd_icons_added()
+ if(H.mind in ticker.mode.cult)
+ ticker.mode.add_cult_viewpoint(H)
+ ticker.mode.add_cultist(occupant.mind)
+ ticker.mode.update_cult_icons_added() //So the icon actually appears
+ if((H.mind in ticker.mode.implanter) || (H.mind in ticker.mode.implanted))
+ ticker.mode.update_traitor_icons_added(H.mind) //So the icon actually appears
+ if(H.mind.vampire)
+ H.mind.vampire.update_owner(H)
+ if((H.mind in ticker.mode.vampire_thralls) || (H.mind in ticker.mode.vampire_enthralled))
+ ticker.mode.update_vampire_icons_added(H.mind)
+ if(H.mind in ticker.mode.changelings)
+ ticker.mode.update_change_icons_added(H.mind)
+ if((H.mind in ticker.mode.shadowling_thralls) || (H.mind in ticker.mode.shadows))
+ ticker.mode.update_shadow_icons_added(H.mind)
+
//Put messages in the connected computer's temp var for display.
/obj/machinery/clonepod/proc/connected_message(message)
if((isnull(connected)) || (!istype(connected, /obj/machinery/computer/cloning)))
@@ -461,6 +464,7 @@
if(grab_ghost_when == CLONER_MATURE_CLONE)
clonemind.transfer_to(occupant)
occupant.grab_ghost()
+ update_clone_antag(occupant)
to_chat(occupant, "There is a bright flash!
\
You feel like a new being.")
occupant.flash_eyes(visual = 1)
diff --git a/code/game/machinery/computer/message.dm b/code/game/machinery/computer/message.dm
index a3bd840750e..b8b2629b22b 100644
--- a/code/game/machinery/computer/message.dm
+++ b/code/game/machinery/computer/message.dm
@@ -145,7 +145,7 @@
if(!auth)
dat += "