mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-07-22 05:25:15 +01:00
[MIRROR] Station Trait: Spider Infestation [MDB IGNORE] (#19813)
* Station Trait: Spider Infestation (#73893) ## About The Pull Request Hate having your cables eaten by mice? Nanotrasen have heard your complaints and settled on a natural, _organic_, and eco-friendly solution. When this station trait is active, roundstart and event mouse spawns have a chance to instead be replaced with duct spiders (both will exist, it doesn't remove mice). Duct spiders are largely harmless to humans, actively hunt other maintenance creatures (such as mice), and have only one _tiny_ downside.  These mobs can also sometimes be spawned by a minor scrubber clog event. As a side note, all spider basic mobs with AI (except Araneus) will now try to automatically fill a small area around them with webs. Also I made it so that mobs will ignore their random_walking behaviour if they're engaged in a `do_after`, just in case. ## Why It's Good For The Game Adds a little bit of variety to things which can slightly annoy you in maintenance. Spiders will automatically make places they live in look like spiders live there. ## Changelog 🆑 add: A station trait which sometimes populates maintenance with small spiders. You can wear them as a hat if you wanted to have a spider on your head for some reason. add: Spider mobs will automatically start webbing up their environment. /🆑 * Station Trait: Spider Infestation --------- Co-authored-by: Jacquerel <hnevard@gmail.com>
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
#define PROB_MOUSE_SPAWN 98
|
||||
#define PROB_SPIDER_REPLACEMENT 50
|
||||
|
||||
SUBSYSTEM_DEF(minor_mapping)
|
||||
name = "Minor Mapping"
|
||||
@@ -13,15 +14,20 @@ SUBSYSTEM_DEF(minor_mapping)
|
||||
place_satchels()
|
||||
return SS_INIT_SUCCESS
|
||||
|
||||
/datum/controller/subsystem/minor_mapping/proc/trigger_migration(num_mice=10)
|
||||
/// Spawns some critters on exposed wires, usually but not always mice
|
||||
/datum/controller/subsystem/minor_mapping/proc/trigger_migration(to_spawn=10)
|
||||
var/list/exposed_wires = find_exposed_wires()
|
||||
var/turf/open/proposed_turf
|
||||
while((num_mice > 0) && exposed_wires.len)
|
||||
while((to_spawn > 0) && exposed_wires.len)
|
||||
proposed_turf = pick_n_take(exposed_wires)
|
||||
if (!valid_mouse_turf(proposed_turf))
|
||||
continue
|
||||
|
||||
num_mice--
|
||||
to_spawn--
|
||||
if(HAS_TRAIT(SSstation, STATION_TRAIT_SPIDER_INFESTATION) && prob(PROB_SPIDER_REPLACEMENT))
|
||||
new /mob/living/basic/giant_spider/maintenance(proposed_turf)
|
||||
return
|
||||
|
||||
if (prob(PROB_MOUSE_SPAWN))
|
||||
new /mob/living/basic/mouse(proposed_turf)
|
||||
else
|
||||
@@ -74,3 +80,4 @@ SUBSYSTEM_DEF(minor_mapping)
|
||||
return shuffle(suitable)
|
||||
|
||||
#undef PROB_MOUSE_SPAWN
|
||||
#undef PROB_SPIDER_REPLACEMENT
|
||||
|
||||
Reference in New Issue
Block a user