mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-07-20 12:35:33 +01:00
Merge pull request #4803 from Incoming5643/summonbadmins
Allows wizard events to be forced outside of summon events
This commit is contained in:
@@ -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))
|
||||
|
||||
@@ -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
|
||||
Reference in New Issue
Block a user