mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-21 19:17:50 +01:00
tweaked, reworked and restructured a bunch of events, fixed the capitalisations issue in my repo structure
Signed-off-by: Cael_Aislinn <cael_aislinn@yahoo.com.au>
This commit is contained in:
@@ -1,3 +1,5 @@
|
||||
/var/global/sent_aliens_to_station = 0
|
||||
|
||||
/datum/event/alien_infestation
|
||||
announceWhen = 400
|
||||
oneShot = 1
|
||||
@@ -9,6 +11,7 @@
|
||||
/datum/event/alien_infestation/setup()
|
||||
announceWhen = rand(announceWhen, announceWhen + 50)
|
||||
spawncount = rand(1, 2)
|
||||
sent_aliens_to_station = 1
|
||||
|
||||
/datum/event/alien_infestation/announce()
|
||||
if(successSpawn)
|
||||
@@ -35,4 +38,4 @@
|
||||
candidates -= candidate
|
||||
vents -= vent
|
||||
spawncount--
|
||||
successSpawn = 1
|
||||
successSpawn = 1
|
||||
|
||||
@@ -6,8 +6,8 @@
|
||||
|
||||
|
||||
/datum/event/blob/announce()
|
||||
command_alert("Confirmed outbreak of level 5 biohazard aboard [station_name()]. All personnel must contain the outbreak.", "Biohazard Alert")
|
||||
world << sound('sound/AI/outbreak5.ogg')
|
||||
command_alert("Confirmed outbreak of level 7 biohazard aboard [station_name()]. All personnel must contain the outbreak.", "Biohazard Alert")
|
||||
world << sound('sound/AI/outbreak7.ogg')
|
||||
|
||||
|
||||
/datum/event/blob/start()
|
||||
|
||||
@@ -12,4 +12,4 @@
|
||||
/datum/event/carp_migration/start()
|
||||
for(var/obj/effect/landmark/C in landmarks_list)
|
||||
if(C.name == "carpspawn")
|
||||
new /mob/living/simple_animal/hostile/carp(C.loc)
|
||||
new /mob/living/simple_animal/hostile/carp(C.loc)
|
||||
|
||||
@@ -78,6 +78,6 @@
|
||||
/datum/event/New()
|
||||
setup()
|
||||
events.Add(src)
|
||||
if(oneShot)
|
||||
potentialRandomEvents.Remove(type)
|
||||
..()
|
||||
/*if(oneShot)
|
||||
potentialRandomEvents.Remove(type)*/
|
||||
..()
|
||||
|
||||
@@ -1,31 +1,45 @@
|
||||
var/list/allEvents = typesof(/datum/event) - /datum/event
|
||||
var/list/potentialRandomEvents = typesof(/datum/event) - /datum/event
|
||||
//var/list/potentialRandomEvents = typesof(/datum/event) - /datum/event - /datum/event/spider_infestation - /datum/event/alien_infestation
|
||||
|
||||
var/eventTimeLower = 15000 //15 minutes
|
||||
var/eventTimeUpper = 30000 //30 minutes
|
||||
var/eventTimeUpper = 30000 //45 minutes
|
||||
|
||||
var/scheduledEvent = null
|
||||
|
||||
|
||||
//Currently unused. Needs an admin panel for messing with events.
|
||||
/proc/addPotentialEvent(var/type)
|
||||
/*/proc/addPotentialEvent(var/type)
|
||||
potentialRandomEvents |= type
|
||||
|
||||
/proc/removePotentialEvent(var/type)
|
||||
potentialRandomEvents -= type
|
||||
potentialRandomEvents -= type*/
|
||||
|
||||
|
||||
/proc/checkEvent()
|
||||
if(!scheduledEvent)
|
||||
scheduledEvent = world.timeofday + rand(eventTimeLower, eventTimeUpper)
|
||||
//more players = more time between events, less players = less time between events
|
||||
var/playercount_modifier = 0.5
|
||||
switch(player_list.len)
|
||||
if(0 to 10)
|
||||
playercount_modifier = 1.2
|
||||
if(11 to 15)
|
||||
playercount_modifier = 1.1
|
||||
if(16 to 20)
|
||||
playercount_modifier = 1
|
||||
if(21 to 25)
|
||||
playercount_modifier = 0.9
|
||||
if(26 to 100000)
|
||||
playercount_modifier = 0.8
|
||||
scheduledEvent = world.timeofday + rand(eventTimeLower, eventTimeUpper) * playercount_modifier
|
||||
|
||||
else if(world.timeofday > scheduledEvent)
|
||||
spawnEvent()
|
||||
spawn_dynamic_event()
|
||||
|
||||
scheduledEvent = null
|
||||
checkEvent()
|
||||
|
||||
|
||||
//unused, see proc/dynamic_event()
|
||||
/*
|
||||
/proc/spawnEvent()
|
||||
if(!config.allow_random_events)
|
||||
return
|
||||
@@ -37,6 +51,7 @@ var/scheduledEvent = null
|
||||
//The event will add itself to the MC's event list
|
||||
//and start working via the constructor.
|
||||
new Type
|
||||
*/
|
||||
|
||||
/client/proc/forceEvent(var/type in allEvents)
|
||||
set name = "Trigger Event (Debug Only)"
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
|
||||
/datum/event/prison_break/announce()
|
||||
if(prisonAreas && prisonAreas.len > 0)
|
||||
command_alert("Gr3y.T1d3 virus detected in [station_name()] imprisonment subroutines. Recommend station AI involvement.", "Security Alert")
|
||||
command_alert("[pick("Gr3y.T1d3 virus","Malignant trojan","Syndicate malware")] detected in [station_name()] imprisonment subroutines. Recommend station AI involvement.", "Security Alert")
|
||||
else
|
||||
world.log << "ERROR: Could not initate grey-tide. Unable find prison or brig area."
|
||||
kill()
|
||||
@@ -29,14 +29,6 @@
|
||||
for(var/obj/machinery/light/L in A)
|
||||
L.flicker(10)
|
||||
|
||||
|
||||
/datum/event/prison_break/announce()
|
||||
if(prisonAreas && prisonAreas.len > 0)
|
||||
command_alert("Gr3y.T1d3 virus detected in [station_name()] imprisonment subroutines. Recommend station AI involvement.", "Security Alert")
|
||||
else
|
||||
world.log << "ERROR: Could not initate grey-tide. Unable find prison or brig area."
|
||||
|
||||
|
||||
/datum/event/prison_break/tick()
|
||||
if(activeFor == releaseWhen)
|
||||
if(prisonAreas && prisonAreas.len > 0)
|
||||
|
||||
@@ -1,5 +1,10 @@
|
||||
/var/global/spacevines_spawned = 0
|
||||
|
||||
//not working: wait for fix in TG code
|
||||
|
||||
/datum/event/spacevine
|
||||
oneShot = 1
|
||||
|
||||
/datum/event/spacevine/start()
|
||||
spacevine_infestation()
|
||||
spacevine_infestation()
|
||||
spacevines_spawned = 1
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
/var/global/sent_spiders_to_station = 0
|
||||
|
||||
/datum/event/spider_infestation
|
||||
announceWhen = 400
|
||||
oneShot = 1
|
||||
@@ -7,7 +9,8 @@
|
||||
|
||||
/datum/event/spider_infestation/setup()
|
||||
announceWhen = rand(announceWhen, announceWhen + 50)
|
||||
spawncount = rand(5, 8)
|
||||
spawncount = rand(8, 12) //spiderlings only have a 50% chance to grow big and strong
|
||||
sent_spiders_to_station = 0
|
||||
|
||||
/datum/event/spider_infestation/announce()
|
||||
command_alert("Unidentified lifesigns detected coming aboard [station_name()]. Secure any exterior access, including ducting and ventilation.", "Lifesign Alert")
|
||||
|
||||
@@ -10,4 +10,4 @@
|
||||
D.holder = H
|
||||
D.affected_mob = H
|
||||
H.viruses += D
|
||||
break
|
||||
break
|
||||
|
||||
Reference in New Issue
Block a user