Merge pull request #4803 from Incoming5643/summonbadmins

Allows wizard events to be forced outside of summon events
This commit is contained in:
Cheridan
2014-09-23 09:23:32 -05:00
3 changed files with 15 additions and 9 deletions
+3
View File
@@ -15,7 +15,10 @@
var/holidayID //string which should match the events.holiday variable if you wish this event to be holiday-specific
//anything with a (non-null) holidayID which does not match holiday, cannot run.
var/wizardevent = 0
/datum/round_event_control/wizard
wizardevent = 1
/datum/round_event_control/proc/runEvent()
if(!ispath(typepath,/datum/round_event))
+10 -1
View File
@@ -21,8 +21,10 @@ var/datum/controller/event/events
for(var/type in typesof(/datum/round_event_control))
var/datum/round_event_control/E = new type()
if(!E.typepath || E.typepath in typesof(/datum/round_event/wizard/))
if(!E.typepath)
continue //don't want this one! leave it for the garbage collector
if(E.wizardevent && !wizardmode)
E.weight = 0
control += E //add it to the list of all events (controls)
reschedule()
getHoliday()
@@ -254,3 +256,10 @@ var/datum/controller/event/events
holiday = "Friday the 13th"
world.update_status()
/datum/controller/event/proc/toggleWizardmode()
wizardmode = !wizardmode
for(var/datum/round_event_control/E in control)
E.weight = initial(E.weight)
if((E.wizardevent && !wizardmode) || (!E.wizardevent && wizardmode))
E.weight = 0