Files
CHOMPStation2/code/modules/events/mutants.dm
Rykka ed798113d9 Compiler Fixes
Fixes in order:
- Removes List of defines in misc_ch.dm that are no longer used - they're defined here for the casino prize dispenser, making these obsolete:
![](https://i.imgur.com/8iCsb98.png)

- Fixes relative pathing in mecha_parts_ch.dm
- Fixes relative pathing in bodybag.dm
- Fixes relative pathing in sahoc_ch.dm
- Fixes relative pathing in toys_yw.dm
- Fixes def_zone being defined when only the variable was needed in twohanded_ch.dm
- Fixes relative pathing in trash_pile_vr_ch.dm
- Fixes clip_mask being missing in misc_ch.dm
- Fixes relative pathing in tesh_synth_facemask.dm
- Fixes absolute path being indented in by one (typo?)
- Fixes relative pathing in armor_yw.dm
- Fixes unreachable parent call in audible_scream_ch.dm
- Fixes VERM_LIZARDS being undefined when it wasn't defined, as VERM_LIZARDMEN was the variable being defined + used in mutants.dm
- Removes two un-needed parent calls - these procs have no parent on /obj/structure - thecake_ch.dm
- Fixes invalid kword nano_state in protean_blob.dm
- Fixes relative pathing in drone_manufacturer_unify.dm
- Fixes relative pathing in synx.dm
- Removes arguments of drop_item that don't exist (port was from TG and had force_drop = 1 and src defined.) - vox.dm
- Added vision_required = TRUE to fix proc argument missing - bigdragon_ch.dm
- Added include_robo = TRUE to fix argument missing in demon_ch.dm
- Fixes relative pathing in rakshasa_abilities.dm
- Adds comment to solargrub.dm, unable to fix operator overload error yet.
- Fixes relative pathing in sprite_accessories_extra_ch.dm
- Fixes relative pathing in sprite_accessories_yw.dm
- Fixes relative pathing in phase.dm
- Fixes relative pathing in bluespacecoffee.dm
- Fixes relative pathing in other_ch.dm
- Fixes relative pathing and ambigious ! in living_ch.dm
- Fixes relative pathing in custom_clothes_yw.dm
- Fixes relative pathing in custom_rigs_yw.dm
- Fixes relative pathing in MadokaSpear.dm
- Comments out duplicate #includes in southern_cross.dm as vorestation.dme has them #include'd.
2021-09-03 17:22:49 -07:00

101 lines
2.5 KiB
Plaintext

#define LOC_KITCHEN 0
#define LOC_ATMOS 1
#define LOC_CHAPEL 2
#define LOC_LIBRARY 3
#define LOC_HYDRO 4
#define LOC_TECH 5
#define LOC_HANGAR1 6
#define LOC_HANGAR2 7
#define LOC_HANGAR3 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_TECH)
spawn_area_type = /area/storage/tech
locstring = "technical storage"
if(LOC_HANGAR1)
spawn_area_type = /area/hangar/one
locstring = "the hangar deck"
if(LOC_HANGAR2)
spawn_area_type = /area/hangar/two
locstring = "the hangar deck"
if(LOC_HANGAR3)
spawn_area_type = /area/hangar/three
locstring = "the hangar deck"
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,1)
switch(vermin)
if(VERM_RATS)
spawn_types = list(/mob/living/simple_mob/animal/passive/mouse/event)
max_number = 6
vermstring = "mutant mice"
if(VERM_LIZARDMEN)
spawn_types = list(/mob/living/simple_mob/animal/passive/lizard/event)
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_TECH
#undef LOC_HANGAR1
#undef LOC_HANGAR2
#undef LOC_HANGAR3
#undef VERM_RATS
#undef VERM_LIZARDMEN