SSevent -> SSevents

This commit is contained in:
Cyberboss
2017-03-22 11:26:01 -04:00
parent e86a353f00
commit 73fa1e61f8
17 changed files with 41 additions and 41 deletions

View File

@@ -82,10 +82,10 @@ var/religion_name = null
name = ""
// Prefix
for(var/holiday_name in SSevent.holidays)
for(var/holiday_name in SSevents.holidays)
if(holiday_name == "Friday the 13th")
random = 13
var/datum/holiday/holiday = SSevent.holidays[holiday_name]
var/datum/holiday/holiday = SSevents.holidays[holiday_name]
name = holiday.getStationPrefix()
//get normal name
if(!name)

View File

@@ -1,4 +1,4 @@
var/datum/controller/subsystem/events/SSevent
var/datum/controller/subsystem/events/SSevents
/datum/controller/subsystem/events
name = "Events"
@@ -17,7 +17,7 @@ var/datum/controller/subsystem/events/SSevent
/datum/controller/subsystem/events/New()
NEW_SS_GLOBAL(SSevent)
NEW_SS_GLOBAL(SSevents)
/datum/controller/subsystem/events/Initialize(time, zlevel)
@@ -133,7 +133,7 @@ var/datum/controller/subsystem/events/SSevent
var/normal = ""
var/magic = ""
var/holiday = ""
for(var/datum/round_event_control/E in SSevent.control)
for(var/datum/round_event_control/E in SSevents.control)
dat = "<BR><A href='?src=\ref[src];forceevent=\ref[E]'>[E]</A>"
if(E.holidayID)
holiday += dat
@@ -156,7 +156,7 @@ var/datum/controller/subsystem/events/SSevent
//Uncommenting ALLOW_HOLIDAYS in config.txt will enable holidays
//It's easy to add stuff. Just add a holiday datum in code/modules/holiday/holidays.dm
//You can then check if it's a special day in any code in the game by doing if(SSevent.holidays["Groundhog Day"])
//You can then check if it's a special day in any code in the game by doing if(SSevents.holidays["Groundhog Day"])
//You can also make holiday random events easily thanks to Pete/Gia's system.
//simply make a random event normally, then assign it a holidayID string which matches the holiday's name.
@@ -193,7 +193,7 @@ var/datum/controller/subsystem/events/SSevent
/datum/controller/subsystem/events/proc/toggleWizardmode()
wizardmode = !wizardmode
message_admins("Summon Events has been [wizardmode ? "enabled, events will occur every [SSevent.frequency_lower / 600] to [SSevent.frequency_upper / 600] minutes" : "disabled"]!")
message_admins("Summon Events has been [wizardmode ? "enabled, events will occur every [SSevents.frequency_lower / 600] to [SSevents.frequency_upper / 600] minutes" : "disabled"]!")
log_game("Summon Events was [wizardmode ? "enabled" : "disabled"]!")

View File

@@ -621,7 +621,7 @@ var/datum/controller/subsystem/garbage_collector/SSgarbage
SearchVar(SSaugury)
SearchVar(SScommunications)
SearchVar(SSdisease)
SearchVar(SSevent)
SearchVar(SSevents)
SearchVar(SSfire_burning)
SearchVar(SSgarbage)
SearchVar(SSicon_smooth)

View File

@@ -211,10 +211,10 @@ var/datum/controller/subsystem/ticker/SSticker
current_state = GAME_STATE_PLAYING
if(SSevent.holidays)
if(SSevents.holidays)
to_chat(world, "<font color='blue'>and...</font>")
for(var/holidayname in SSevent.holidays)
var/datum/holiday/holiday = SSevent.holidays[holidayname]
for(var/holidayname in SSevents.holidays)
var/datum/holiday/holiday = SSevents.holidays[holidayname]
to_chat(world, "<h4>[holiday.greet()]</h4>")
PostSetup()

View File

@@ -85,7 +85,7 @@ var/list/blobs_legit = list() //used for win-score calculations, contains only b
SSshuttle.registerHostileEnvironment(src)
// Disable the blob event for this round.
var/datum/round_event_control/blob/B = locate() in SSevent.control
var/datum/round_event_control/blob/B = locate() in SSevents.control
if(B)
B.max_occurrences = 0 // disable the event

View File

@@ -168,9 +168,9 @@
if(isliving(wizard.current) && wizard.current.stat!=DEAD)
return ..()
if(SSevent.wizardmode) //If summon events was active, turn it off
SSevent.toggleWizardmode()
SSevent.resetFrequency()
if(SSevents.wizardmode) //If summon events was active, turn it off
SSevents.toggleWizardmode()
SSevents.resetFrequency()
return ..()

View File

@@ -524,7 +524,7 @@
if("events")
if(!check_rights(R_FUN))
return
if(!SSevent.wizardmode)
if(!SSevents.wizardmode)
if(alert("Do you want to toggle summon events on?",,"Yes","No") == "Yes")
summonevents()
feedback_inc("admin_secrets_fun_used",1)
@@ -537,8 +537,8 @@
feedback_inc("admin_secrets_fun_used",1)
feedback_add_details("admin_secrets_fun_used","SE")
if("Turn Off Summon Events")
SSevent.toggleWizardmode()
SSevent.resetFrequency()
SSevents.toggleWizardmode()
SSevents.resetFrequency()
if("dorf")
if(!check_rights(R_FUN))

View File

@@ -161,7 +161,7 @@
else if(href_list["forceevent"])
if(!check_rights(R_FUN))
return
var/datum/round_event_control/E = locate(href_list["forceevent"]) in SSevent.control
var/datum/round_event_control/E = locate(href_list["forceevent"]) in SSevents.control
if(E)
var/datum/round_event/event = E.runEvent()
if(event.announceWhen>0)

View File

@@ -780,7 +780,7 @@ var/list/TYPES_SHORTCUTS = list(
if(!holder)
return
SSevent.scheduled = world.time
SSevents.scheduled = world.time
message_admins("<span class='adminnotice'>[key_name_admin(src)] pumped a random event.</span>")
feedback_add_details("admin_verb","PRE")

View File

@@ -11,7 +11,7 @@ var/sound/admin_sound
message_admins("[key_name_admin(src)] played sound [S]")
var/freq = 1
if(SSevent.holidays && SSevent.holidays[APRIL_FOOLS])
if(SSevents.holidays && SSevents.holidays[APRIL_FOOLS])
freq = pick(0.5, 0.7, 0.8, 0.85, 0.9, 0.95, 1.1, 1.2, 1.4, 1.6, 2.0, 2.5)
to_chat(src, "You feel the Honkmother messing with your song...")

View File

@@ -15,7 +15,7 @@
var/max_occurrences = 20 //The maximum number of times this event can occur (naturally), it can still be forced.
//By setting this to 0 you can effectively disable an event.
var/holidayID = "" //string which should be in the SSevents.holidays list if you wish this event to be holiday-specific
var/holidayID = "" //string which should be in the SSeventss.holidays list 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
@@ -43,7 +43,7 @@
return FALSE
if(earliest_start >= world.time)
return FALSE
if(wizardevent != SSevent.wizardmode)
if(wizardevent != SSevents.wizardmode)
return FALSE
if(players_amt < min_players)
return FALSE
@@ -51,7 +51,7 @@
return FALSE
if(gamemode_whitelist.len && !(gamemode in gamemode_whitelist))
return FALSE
if(holidayID && (!SSevent.holidays || !SSevent.holidays[holidayID]))
if(holidayID && (!SSevents.holidays || !SSevents.holidays[holidayID]))
return FALSE
return TRUE
@@ -175,12 +175,12 @@
//which should be the only place it's referenced.
//Called when start(), announce() and end() has all been called.
/datum/round_event/proc/kill()
SSevent.running -= src
SSevents.running -= src
//Sets up the event then adds the event to the the list of running events
/datum/round_event/New(my_processing = TRUE)
setup()
processing = my_processing
SSevent.running += src
SSevents.running += src
return ..()

View File

@@ -14,7 +14,7 @@
var/players_amt = get_active_player_count(alive_check = 1, afk_check = 1, human_check = 1)
var/gamemode = SSticker.mode.config_tag
for(var/datum/round_event_control/E in SSevent.control)
for(var/datum/round_event_control/E in SSevents.control)
if(!E.canSpawnEvent(players_amt, gamemode))
continue

View File

@@ -107,7 +107,7 @@
/obj/item/weapon/paper/attack_self(mob/user)
user.examinate(src)
if(rigged && (SSevent.holidays && SSevent.holidays[APRIL_FOOLS]))
if(rigged && (SSevents.holidays && SSevents.holidays[APRIL_FOOLS]))
if(spam_flag == 0)
spam_flag = 1
playsound(loc, 'sound/items/bikehorn.ogg', 50, 1)

View File

@@ -86,7 +86,7 @@
papers.Remove(P)
else
P = new papertype(src)
if(SSevent.holidays && SSevent.holidays[APRIL_FOOLS])
if(SSevents.holidays && SSevents.holidays[APRIL_FOOLS])
if(prob(30))
P.info = "<font face=\"[CRAYON_FONT]\" color=\"red\"><b>HONK HONK HONK HONK HONK HONK HONK<br>HOOOOOOOOOOOOOOOOOOOOOONK<br>APRIL FOOLS</b></font>"
P.rigged = 1

View File

@@ -203,17 +203,17 @@
/proc/summonevents()
if(!SSevent.wizardmode)
SSevent.frequency_lower = 600 //1 minute lower bound
SSevent.frequency_upper = 3000 //5 minutes upper bound
SSevent.toggleWizardmode()
SSevent.reschedule()
if(!SSevents.wizardmode)
SSevents.frequency_lower = 600 //1 minute lower bound
SSevents.frequency_upper = 3000 //5 minutes upper bound
SSevents.toggleWizardmode()
SSevents.reschedule()
else //Speed it up
SSevent.frequency_upper -= 600 //The upper bound falls a minute each time, making the AVERAGE time between events lessen
if(SSevent.frequency_upper < SSevent.frequency_lower) //Sanity
SSevent.frequency_upper = SSevent.frequency_lower
SSevents.frequency_upper -= 600 //The upper bound falls a minute each time, making the AVERAGE time between events lessen
if(SSevents.frequency_upper < SSevents.frequency_lower) //Sanity
SSevents.frequency_upper = SSevents.frequency_lower
SSevent.reschedule()
message_admins("Summon Events intensifies, events will now occur every [SSevent.frequency_lower / 600] to [SSevent.frequency_upper / 600] minutes.")
SSevents.reschedule()
message_admins("Summon Events intensifies, events will now occur every [SSevents.frequency_lower / 600] to [SSevents.frequency_upper / 600] minutes.")
log_game("Summon Events was increased!")

View File

@@ -166,7 +166,7 @@
change_meteor_chance(0.5)
/obj/machinery/satellite/meteor_shield/proc/change_meteor_chance(mod)
var/datum/round_event_control/E = locate(/datum/round_event_control/meteor_wave) in SSevent.control
var/datum/round_event_control/E = locate(/datum/round_event_control/meteor_wave) in SSevents.control
if(E)
E.weight *= mod

View File

@@ -12,7 +12,7 @@ var/static/list/bike_music = list('sound/misc/bike1.mid',
riding_datum = new/datum/riding/bicycle
/obj/vehicle/bicycle/buckle_mob(mob/living/M, force = 0, check_loc = 1)
if(prob(easter_egg_chance) || (SSevent.holidays && SSevent.holidays[APRIL_FOOLS]))
if(prob(easter_egg_chance) || (SSevents.holidays && SSevents.holidays[APRIL_FOOLS]))
M << sound(pick(bike_music), repeat = 1, wait = 0, volume = 80, channel = 42)
. = ..()