mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2026-01-03 22:12:38 +00:00
This should fix forks being broken as fuck and you able to eat from them forever. also, spoons aren't sharp anymore. Also, this ports the baystation fix to neckgrabs always flooring people, and makes resisting out of grabs when you are weakened a bit more harder. Fix the lack of delay when attacking a ninja nest Carp now have a chance of staying after their event ends
51 lines
1.7 KiB
Plaintext
51 lines
1.7 KiB
Plaintext
/datum/event/carp_migration
|
|
announceWhen = 50
|
|
endWhen = 900
|
|
|
|
var/list/spawned_carp = list()
|
|
ic_name = "biological entities"
|
|
|
|
/datum/event/carp_migration/setup()
|
|
announceWhen = rand(40, 60)
|
|
endWhen = rand(600,1200)
|
|
|
|
/datum/event/carp_migration/announce()
|
|
var/announcement = ""
|
|
if(severity == EVENT_LEVEL_MAJOR)
|
|
announcement = "Massive migration of unknown biological entities has been detected near [station_name()], please stand-by."
|
|
else
|
|
announcement = "Unknown biological [spawned_carp.len == 1 ? "entity has" : "entities have"] been detected near [station_name()], please stand-by."
|
|
command_announcement.Announce(announcement, "Lifesign Alert")
|
|
|
|
/datum/event/carp_migration/start()
|
|
if(severity == EVENT_LEVEL_MAJOR)
|
|
spawn_fish(landmarks_list.len)
|
|
else if(severity == EVENT_LEVEL_MODERATE)
|
|
spawn_fish(rand(4, 6)) //12 to 30 carp, in small groups
|
|
else
|
|
spawn_fish(rand(1, 3), 1, 2) //1 to 6 carp, alone or in pairs
|
|
|
|
/datum/event/carp_migration/proc/spawn_fish(var/num_groups, var/group_size_min=3, var/group_size_max=5)
|
|
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++)
|
|
spawned_carp.Add(new /mob/living/simple_animal/hostile/carp(spawn_locations[i]))
|
|
i++
|
|
|
|
/datum/event/carp_migration/end()
|
|
for(var/mob/living/simple_animal/hostile/carp/C in spawned_carp)
|
|
if(!C.stat)
|
|
var/turf/T = get_turf(C)
|
|
if(istype(T, /turf/space))
|
|
if(!prob(50))
|
|
qdel(C)
|