From 364cca49aca019f5e5f1812839aa1b8ce2e5ff55 Mon Sep 17 00:00:00 2001 From: Razgriz Date: Sun, 17 Feb 2019 01:04:56 -0700 Subject: [PATCH] Mutant event added +Added a mutant infestation that causes special event mice to mutate and grow into rats. +Placeholder stuff has been added for mutant lizards to spawn as well. So far it spawns regular lizards. -Reverted mundane infestation mice back to regular mice that won't mutate into rats. --- code/modules/events/event_container_vr.dm | 2 + code/modules/events/infestation.dm | 4 +- code/modules/events/mutants.dm | 99 +++++++++++++++++++++++ 3 files changed, 103 insertions(+), 2 deletions(-) create mode 100644 code/modules/events/mutants.dm diff --git a/code/modules/events/event_container_vr.dm b/code/modules/events/event_container_vr.dm index 3870f399fa..902bd87669 100644 --- a/code/modules/events/event_container_vr.dm +++ b/code/modules/events/event_container_vr.dm @@ -78,6 +78,8 @@ // Pure RP fun, no mechanical effects. new /datum/event_meta(EVENT_LEVEL_MODERATE, "Ion Storm", /datum/event/ionstorm, -50, list(ASSIGNMENT_AI = 200, ASSIGNMENT_CYBORG = 100, ASSIGNMENT_ENGINEER = 15, ASSIGNMENT_SCIENTIST = 5), 0), new /datum/event_meta(EVENT_LEVEL_MODERATE, "Meteor Shower", /datum/event/meteor_wave, -15, list(ASSIGNMENT_ENGINEER = 5), 1), + //New CHOMPStation event. Mice grow into rats. + new /datum/event_meta(EVENT_LEVEL_MODERATE, "Mutants", /datum/event/mutants, 0, list(ASSIGNMENT_SECURITY = 50, ASSIGNMENT_ENGINEER = 50), 1), // Opens doors in brig. So just RP fun new /datum/event_meta(EVENT_LEVEL_MODERATE, "Prison Break", /datum/event/prison_break, -50, list(ASSIGNMENT_SECURITY = 30, ASSIGNMENT_ENGINEER = 50), 1), // Not bad (dorms are shielded) but inconvenient diff --git a/code/modules/events/infestation.dm b/code/modules/events/infestation.dm index 5f3a85e15c..611b3005ad 100644 --- a/code/modules/events/infestation.dm +++ b/code/modules/events/infestation.dm @@ -65,8 +65,8 @@ vermin = rand(0,2) switch(vermin) if(VERM_MICE) - spawn_types = list(/mob/living/simple_animal/mouse/event) - max_number = 6 + spawn_types = list(/mob/living/simple_animal/mouse) + max_number = 12 vermstring = "mice" if(VERM_LIZARDS) spawn_types = list(/mob/living/simple_animal/lizard) diff --git a/code/modules/events/mutants.dm b/code/modules/events/mutants.dm new file mode 100644 index 0000000000..119a0deabf --- /dev/null +++ b/code/modules/events/mutants.dm @@ -0,0 +1,99 @@ +#define LOC_KITCHEN 0 +#define LOC_ATMOS 1 +#define LOC_CHAPEL 2 +#define LOC_LIBRARY 3 +#define LOC_HYDRO 4 +#define LOC_VAULT 5 +#define LOC_CONSTR 6 +#define LOC_TECH 7 +#define LOC_GARDEN 8 + +#define VERM_RATS 0 +#define VERM_LIZARDMEN 1 + +/datum/event/mutants + announceWhen = 25 + endWhen = 26 + var/location + var/locstring + var/vermin + var/vermstring + +/datum/event/mutants/start() + + location = rand(0,8) + var/list/turf/simulated/floor/turfs = list() + var/spawn_area_type + switch(location) + if(LOC_KITCHEN) + spawn_area_type = /area/crew_quarters/kitchen + locstring = "the kitchen" + if(LOC_ATMOS) + spawn_area_type = /area/engineering/atmos + locstring = "atmospherics" + if(LOC_CHAPEL) + spawn_area_type = /area/chapel/main + locstring = "the chapel" + if(LOC_LIBRARY) + spawn_area_type = /area/library + locstring = "the library" + if(LOC_HYDRO) + spawn_area_type = /area/hydroponics + locstring = "hydroponics" + if(LOC_VAULT) + spawn_area_type = /area/security/nuke_storage + locstring = "the vault" + if(LOC_CONSTR) + spawn_area_type = /area/construction + locstring = "the construction area" + if(LOC_TECH) + spawn_area_type = /area/storage/tech + locstring = "technical storage" + if(LOC_GARDEN) + spawn_area_type = /area/hydroponics/garden + locstring = "the public garden" + + for(var/areapath in typesof(spawn_area_type)) + var/area/A = locate(areapath) + for(var/turf/simulated/floor/F in A.contents) + if(turf_clear(F)) + turfs += F + + var/list/spawn_types = list() + var/max_number + vermin = rand(0,2) + switch(vermin) + if(VERM_RATS) + spawn_types = list(/mob/living/simple_animal/mouse/event) + max_number = 6 + vermstring = "mutant mice" + if(VERM_LIZARDMEN) + spawn_types = list(/mob/living/simple_animal/lizard) + max_number = 6 + vermstring = "mutant lizards" + + spawn(0) + var/num = rand(2,max_number) + while(turfs.len > 0 && num > 0) + var/turf/simulated/floor/T = pick(turfs) + turfs.Remove(T) + num-- + var/spawn_type = pick(spawn_types) + new spawn_type(T) + + +/datum/event/mutants/announce() + command_announcement.Announce("Bioscans indicate... What are those? It looks like [vermstring] have been breeding in [locstring]. Clear them out, just in case.", "Vermin infestation") + +#undef LOC_KITCHEN +#undef LOC_ATMOS +#undef LOC_CHAPEL +#undef LOC_LIBRARY +#undef LOC_HYDRO +#undef LOC_VAULT +#undef LOC_TECH +#undef LOC_GARDEN + +#undef VERM_MICE +#undef VERM_LIZARDS +#undef VERM_SPIDERS