mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-01-19 05:26:28 +00:00
## About The Pull Request Fixes #77501 Spider egg ghost role spawners grant the spider antag datum, rather than the act of being a spider. This means that gold core, mapstart, polymorph belt, and other spiders will not have an antagonist datum. While doing this I also made a new abstract `mob/living/basic/spider` type which all three kinds of spider life stage (`spiderling`, `young`, `giant`) extend from, because there was a gross amount of copied code. Now there isn't. Also the Flesh Spider and Event Midwife eggs now simply hatch adult spiders instead of child ones. This is because there is no reason for either of these to have a two minute wait time before they get going. Midwife spiders spawned by the event should just start spidering immediately, and Flesh Spiders are made by changelings and shouldn't be effected by measures introduced to balance the spider gamemode. Eggs which are laid during a round and _can_ hatch into midwife spiders still hatch baby spiders. Also I swapped some white pixels on the animation of the ambush spiderling for a different colour because they looked bad. ## Why It's Good For The Game While the policy is always "if you turn yourself into something, you're not an antagonist" the presence of the antag datum still confuses people. Plus that code was gross and I didn't like it. ## Changelog 🆑 fix: Giant Spiders only have an antag datum if created by the round event. balance: Flesh spider eggs hatch into adult spiders instead of baby spiders. balance: The eggs spawned by the start of the spider infestation event hatch into adult Midwife spiders instead of baby ones. /🆑
75 lines
2.7 KiB
Plaintext
75 lines
2.7 KiB
Plaintext
/// Candidates for the petsplosion wizard event
|
|
GLOBAL_LIST_INIT(petsplosion_candidates, typecacheof(list(
|
|
/mob/living/basic/bat,
|
|
/mob/living/basic/butterfly,
|
|
/mob/living/basic/carp/pet/cayenne,
|
|
/mob/living/basic/chicken,
|
|
/mob/living/basic/cow,
|
|
/mob/living/basic/spider/giant/sgt_araneus,
|
|
/mob/living/basic/lizard,
|
|
/mob/living/basic/mothroach,
|
|
/mob/living/basic/mouse/brown/tom,
|
|
/mob/living/basic/pet,
|
|
/mob/living/basic/pig,
|
|
/mob/living/basic/rabbit,
|
|
/mob/living/basic/sheep,
|
|
/mob/living/simple_animal/hostile/retaliate/goat,
|
|
/mob/living/simple_animal/hostile/retaliate/goose/vomit,
|
|
/mob/living/simple_animal/hostile/retaliate/snake,
|
|
/mob/living/simple_animal/parrot,
|
|
/mob/living/simple_animal/pet,
|
|
/mob/living/simple_animal/sloth,
|
|
)))
|
|
|
|
/datum/round_event_control/wizard/petsplosion //the horror
|
|
name = "Petsplosion"
|
|
weight = 2
|
|
typepath = /datum/round_event/wizard/petsplosion
|
|
max_occurrences = 1 //Exponential growth is nothing to sneeze at!
|
|
earliest_start = 0 MINUTES
|
|
description = "Rapidly multiplies the animals on the station."
|
|
min_wizard_trigger_potency = 0
|
|
max_wizard_trigger_potency = 4
|
|
/// Number of mobs we're going to duplicate
|
|
var/mobs_to_dupe = 0
|
|
|
|
/datum/round_event_control/wizard/petsplosion/preRunEvent()
|
|
for(var/mob/living/basic/dupe_animal in GLOB.alive_mob_list)
|
|
count_mob(dupe_animal)
|
|
for(var/mob/living/simple_animal/dupe_animal in GLOB.alive_mob_list)
|
|
count_mob(dupe_animal)
|
|
if(mobs_to_dupe > 100 || !mobs_to_dupe)
|
|
return EVENT_CANT_RUN
|
|
|
|
return ..()
|
|
|
|
/// Counts whether we found some kind of valid living mob
|
|
/datum/round_event_control/wizard/petsplosion/proc/count_mob(mob/living/dupe_animal)
|
|
if(is_type_in_typecache(dupe_animal, GLOB.petsplosion_candidates) && is_station_level(dupe_animal.z))
|
|
mobs_to_dupe++
|
|
|
|
/datum/round_event/wizard/petsplosion
|
|
end_when = 61 //1 minute (+1 tick for endWhen not to interfere with tick)
|
|
var/countdown = 0
|
|
var/mobs_duped = 0
|
|
|
|
/datum/round_event/wizard/petsplosion/tick()
|
|
if(activeFor < 30 * countdown) // 0 seconds : 2 animals | 30 seconds : 4 animals | 1 minute : 8 animals
|
|
return
|
|
countdown += 1
|
|
|
|
//If you cull the herd before the next replication, things will be easier for you
|
|
for(var/mob/living/basic/dupe_animal in GLOB.alive_mob_list)
|
|
duplicate_mob(dupe_animal)
|
|
for(var/mob/living/simple_animal/dupe_animal in GLOB.alive_mob_list)
|
|
duplicate_mob(dupe_animal)
|
|
|
|
/// Makes a duplicate of a valid mob and increments our "too many mobs" counter
|
|
/datum/round_event/wizard/petsplosion/proc/duplicate_mob(mob/living/dupe_animal)
|
|
if(!is_type_in_typecache(dupe_animal, GLOB.petsplosion_candidates) || !is_station_level(dupe_animal.z))
|
|
return
|
|
new dupe_animal.type(dupe_animal.loc)
|
|
mobs_duped++
|
|
if(mobs_duped > 400)
|
|
kill()
|