Non-Hostile Migrations and Angry Goats (#12016)

This commit is contained in:
Geeves
2021-06-21 18:11:54 -03:00
committed by GitHub
parent cfdc63cc94
commit 27944fb32d
14 changed files with 125 additions and 26 deletions
+24
View File
@@ -96,3 +96,27 @@
var/mob/living/simple_animal/hostile/carp/fish = carp_weakref.resolve()
if (fish && prob(50) && is_type_in_typecache(fish.loc, despawn_turfs))
qdel(fish)
/datum/event/carp_migration/cozmo/start()
spawn_fish(7, 3, 5)
/datum/event/carp_migration/cozmo/announce()
command_announcement.Announce("A migration of non-hostile entities has been detected outside the facility.", "Lifesign Alert", 'sound/AI/cozmo_migration.ogg')
/datum/event/carp_migration/cozmo/spawn_fish(var/num_groups, var/group_size_min = 3, var/group_size_max = 5, var/spawn_drones = FALSE)
set waitfor = FALSE
var/list/spawn_locations = list()
for(var/obj/effect/landmark/C in landmarks_list)
if(C.name == "carpspawn")
spawn_locations.Add(C.loc)
spawn_locations = shuffle(spawn_locations)
num_groups = min(num_groups, spawn_locations.len)
var/i = 1
while (i <= num_groups)
var/group_size = rand(group_size_min, group_size_max)
for(var/j = 1, j <= group_size, j++)
var/mob/living/simple_animal/cosmozoan/cozmo = new(spawn_locations[i])
spawned_carp += WEAKREF(cozmo)
i++
+1
View File
@@ -134,6 +134,7 @@ var/global/list/severity_to_string = list(EVENT_LEVEL_MUNDANE = "Mundane", EVENT
new /datum/event_meta(EVENT_LEVEL_MUNDANE, "Camera Damage", /datum/event/camera_damage, 20, list(ASSIGNMENT_ENGINEER = 10)),
new /datum/event_meta(EVENT_LEVEL_MUNDANE, "Economic News", /datum/event/economic_event, 300),
new /datum/event_meta(EVENT_LEVEL_MUNDANE, "Lost Carp", /datum/event/carp_migration, 20, list(ASSIGNMENT_SECURITY = 10), 1),
new /datum/event_meta(EVENT_LEVEL_MUNDANE, "Cozmozoan Migration", /datum/event/carp_migration/cozmo, 60),
new /datum/event_meta(EVENT_LEVEL_MUNDANE, "Money Hacker", /datum/event/money_hacker, 10),
new /datum/event_meta(EVENT_LEVEL_MUNDANE, "Money Lotto", /datum/event/money_lotto, 0, list(ASSIGNMENT_ANY = 1), 1, 5, 15),
new /datum/event_meta(EVENT_LEVEL_MUNDANE, "Mundane News", /datum/event/mundane_news, 300),