Committing for Cael_Aislinn:

= Giant Spiders =
- Nurses spin webs which impede progress, bundle items and mobs up in cocoons, lay eggs to create spiderlings
- Nurses are slow and weak, but their bite has a chance to paralyse the victim
- Spiderlings skitter about and eventually grow into giant spiders. 
- Spiderlings will ventcrawl, so they can spread over the station pretty fast. 
- Hunters are fast, have decent health and the most effective poison
- Guards are medium speed but the health and direct damage
- The poison of hunters and guards can cause hallucinations if they bite you

= Farm animals =
- Cows can be milked or butchered for a large supply of meat. Sadists can also tip them over (with intent_help). 
- Goats can also be milked, but have a nasty temperament. 
- Chicks grow up to be chickens, who lay eggs and continue the cycle. But where did it start? (they're very noisy). 
- All three are orderable via QM. 

My changes:

- Added a spider infestation event.
- Optimized code with spiders and simple_animals.
- Made a /hostile/retaliate type which will only fight back when hurt. Based on Cael's code.
- Added some farm animals on the map.
- Changed events, added a setup() proc which can let you setup variables or the event. Made the event only kill itself when it has called, announce(), start() and end().
- Brainrot will only need alkysine as a cure.
- Communication blackout will always be silent.
- Changed some admin buttons to use the new event system.
- Added a forceEvent proc which you can use when you enable debug verbs.

git-svn-id: http://tgstation13.googlecode.com/svn/trunk@5525 316c924e-a436-60f5-8080-3fe189b3f50e
This commit is contained in:
giacomand@gmail.com
2013-01-12 16:44:06 +00:00
parent 616fcf1e88
commit a56e922053
29 changed files with 8275 additions and 7512 deletions

View File

@@ -1,10 +1,14 @@
/datum/event/alien_infestation
announceWhen = 75
endWhen = 75
oneShot = 1
var/spawncount = 1
/datum/event/alien_infestation/setup()
announceWhen = rand(140, 180)
spawncount = rand(1, 2)
/datum/event/alien_infestation/announce()
command_alert("Unidentified lifesigns detected coming aboard [station_name()]. Secure any exterior access, including ducting and ventilation.", "Lifesign Alert")
world << sound('sound/AI/aliens.ogg')
@@ -19,7 +23,6 @@
var/list/candidates = get_alien_candidates()
if(prob(50)) spawncount++ //sometimes, have two larvae spawn instead of one
while((spawncount >= 1) && vents.len && candidates.len)
var/obj/vent = pick(vents)
var/candidate = pick(candidates)

View File

@@ -16,9 +16,8 @@
kill()
return
Blob = new /obj/effect/blob/core(T, 200)
Blob.Life()
Blob.Life()
Blob.Life()
for(var/i = 1; i < rand(3, 6), i++)
Blob.process()
/datum/event/blob/tick()
@@ -26,4 +25,4 @@
kill()
return
if(IsMultiple(activeFor, 3))
Blob.Life()
Blob.process()

View File

@@ -1,8 +1,9 @@
/datum/event/carp_migration
announceWhen = 50
endWhen = 50
oneShot = 1
/datum/event/carp_migration/setup()
announceWhen = rand(40, 60)
/datum/event/carp_migration/announce()
command_alert("Unknown biological entities have been detected near [station_name()], please stand-by.", "Lifesign Alert")

View File

@@ -7,8 +7,8 @@
/datum/event/communications_blackout/start()
if(prob(25))
silent = 0
//if(prob(25))
// silent = 0
for(var/mob/living/silicon/ai/A in player_list) //AIs are always aware of communication blackouts.
A << "<br>"
A << "<span class='warning'><b>Ionospheric anomalies detected. Temporary telecommunication failure imminent. Please contact you-BZZT<b></span>"

View File

@@ -1,6 +1,5 @@
/datum/event/disease_outbreak
announceWhen = 15
endWhen = 15
oneShot = 1
@@ -8,6 +7,9 @@
command_alert("Confirmed outbreak of level 7 viral biohazard aboard [station_name()]. All personnel must contain the outbreak.", "Biohazard Alert")
world << sound('sound/AI/outbreak7.ogg')
/datum/event/disease_outbreak/setup()
announceWhen = rand(15, 30)
/datum/event/disease_outbreak/start()
var/virus_type = pick(/datum/disease/dnaspread, /datum/disease/advance/flu, /datum/disease/advance/cold, /datum/disease/brainrot, /datum/disease/magnitis)

View File

@@ -1,13 +1,17 @@
/datum/event //NOTE: Times are measured in master controller ticks!
var/startWhen = 0 //When in the lifetime to call start().
var/announceWhen = 0 //When in the lifetime to call announce().
var/endWhen = 0 //When in the lifetime the event should end. Include time for delayed announcements.
var/endWhen = 0 //When in the lifetime the event should end.
var/oneShot = 0 //If true, then the event removes itself from the list of potential events on creation.
var/activeFor = 0 //How long the event has existed. You don't need to change this.
//Called first before processing.
//Allows you to setup your event, such as randomly
//setting the startWhen and or announceWhen variables.
//Only called once.
/datum/event/proc/setup()
return
//Called when the tick is equal to the startWhen variable.
//Allows you to start before announcing or vice versa.
@@ -39,21 +43,24 @@
//Do not override this proc, instead use the appropiate procs.
//This proc will handle the calls to the appropiate procs.
/datum/event/proc/process()
if(activeFor > startWhen && activeFor < endWhen)
tick()
if(activeFor == startWhen)
start()
if(activeFor > startWhen)
tick()
if(activeFor == announceWhen)
announce()
if(activeFor >= endWhen)
if(activeFor == endWhen)
end()
// Everything is done, let's clean up.
if(activeFor >= endWhen && activeFor >= announceWhen && activeFor >= startWhen)
kill()
activeFor++
@@ -61,6 +68,7 @@
//Garbage collects the event by removing it from the global events list,
//which should be the only place it's referenced.
//Called when start(), announce() and end() has all been called.
/datum/event/proc/kill()
events.Remove(src)
@@ -68,7 +76,8 @@
//Adds the event to the global events list, and removes it from the list
//of potential events.
/datum/event/New()
setup()
events.Add(src)
if(oneShot)
potentialRandomEvents.Remove(type)
potentialRandomEvents.Remove(type)
..()

View File

@@ -36,4 +36,15 @@ var/scheduledEvent = null
//The event will add itself to the MC's event list
//and start working via the constructor.
new Type
new Type
/client/proc/forceEvent(var/type in allEvents)
set name = "Trigger Event (Debug Only)"
set category = "Debug"
if(!holder)
return
if(ispath(type))
new type
message_admins("[key_name_admin(usr)] has triggered an event. ([type])", 1)

View File

@@ -1,12 +1,16 @@
/datum/event/prison_break
announceWhen = 50
endWhen = 50
oneShot = 1
var/releaseWhen = 25
var/list/area/prisonAreas = list()
/datum/event/prison_break/setup()
announceWhen = rand(50, 60)
releaseWhen = rand(20, 30)
/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")
@@ -26,6 +30,13 @@
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)

View File

@@ -1,6 +1,5 @@
/datum/event/radiation_storm
announceWhen = 5
endWhen = 5
oneShot = 1

View File

@@ -1,5 +1,5 @@
/datum/event/spontaneous_appendicitis/start()
for(var/mob/living/carbon/human/H in living_mob_list)
for(var/mob/living/carbon/human/H in shuffle(living_mob_list))
var/foundAlready = 0 //don't infect someone that already has the virus
for(var/datum/disease/D in H.viruses)
foundAlready = 1