[MIRROR] Spiders don't automatically grant an antag datum [MDB IGNORE] (#23029)

* Spiders don't automatically grant an antag datum (#77523)

## 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.
/🆑

* Spiders don't automatically grant an antag datum

* Modular paths

* Modular paths

---------

Co-authored-by: Jacquerel <hnevard@gmail.com>
Co-authored-by: Giz <13398309+vinylspiders@users.noreply.github.com>
This commit is contained in:
SkyratBot
2023-08-12 00:17:56 -04:00
committed by GitHub
co-authored by Jacquerel Giz
parent 67c6c8900b
commit d2b4b475cb
36 changed files with 1336 additions and 1527 deletions
@@ -1,107 +0,0 @@
/**
* # Giant Spider
*
* A mob which can be created by dynamic event, botany, or xenobiology.
* The basic type is the guard, which is slow but sturdy and outputs good damage.
* All spiders can produce webbing.
*/
/mob/living/basic/giant_spider
name = "giant spider"
desc = "Furry and black, it makes you shudder to look at it. This one has deep red eyes."
icon = 'icons/mob/simple/arachnoid.dmi'
icon_state = "guard"
icon_living = "guard"
icon_dead = "guard_dead"
mob_biotypes = MOB_ORGANIC|MOB_BUG
speak_emote = list("chitters")
butcher_results = list(/obj/item/food/meat/slab/spider = 2, /obj/item/food/spiderleg = 8)
response_help_continuous = "pets"
response_help_simple = "pet"
response_disarm_continuous = "gently pushes aside"
response_disarm_simple = "gently push aside"
initial_language_holder = /datum/language_holder/spider
speed = 5
maxHealth = 125
health = 125
damage_coeff = list(BRUTE = 1, BURN = 1.25, TOX = 1, CLONE = 1, STAMINA = 1, OXY = 1)
basic_mob_flags = FLAMMABLE_MOB
status_flags = NONE
unsuitable_cold_damage = 4
unsuitable_heat_damage = 4
obj_damage = 30
melee_damage_lower = 20
melee_damage_upper = 25
combat_mode = TRUE
faction = list(FACTION_SPIDER)
pass_flags = PASSTABLE
attack_verb_continuous = "bites"
attack_verb_simple = "bite"
attack_sound = 'sound/weapons/bite.ogg'
attack_vis_effect = ATTACK_EFFECT_BITE
unique_name = TRUE
gold_core_spawnable = HOSTILE_SPAWN
// VERY red, to fit the eyes
lighting_cutoff_red = 22
lighting_cutoff_green = 5
lighting_cutoff_blue = 5
ai_controller = /datum/ai_controller/basic_controller/giant_spider
/// Speed modifier to apply if controlled by a human player
var/player_speed_modifier = -4
/// What reagent the mob injects targets with
var/poison_type = /datum/reagent/toxin/hunterspider
/// How much of a reagent the mob injects on attack
var/poison_per_bite = 0
/// Multiplier to apply to web laying speed. Fractional numbers make it faster, because it's a multiplier.
var/web_speed = 1
/// Type of webbing ability to learn.
var/web_type = /datum/action/cooldown/lay_web
/// The message that the mother spider left for this spider when the egg was layed.
var/directive = ""
/// Short description of what this mob is capable of, for radial menu uses
var/menu_description = "Tanky and strong for the defense of the nest and other spiders."
/// If true then you shouldn't be told that you're a spider antagonist as soon as you are placed into this mob
var/apply_spider_antag = TRUE
/mob/living/basic/giant_spider/Initialize(mapload)
. = ..()
ADD_TRAIT(src, TRAIT_WEB_SURFER, INNATE_TRAIT)
AddElement(/datum/element/footstep, FOOTSTEP_MOB_CLAW)
AddElement(/datum/element/nerfed_pulling, GLOB.typecache_general_bad_things_to_easily_move)
AddElement(/datum/element/prevent_attacking_of_types, GLOB.typecache_general_bad_hostile_attack_targets, "this tastes awful!")
AddElement(/datum/element/cliff_walking)
if(poison_per_bite)
AddElement(/datum/element/venomous, poison_type, poison_per_bite)
var/datum/action/cooldown/lay_web/webbing = new web_type(src)
webbing.webbing_time *= web_speed
webbing.Grant(src)
ai_controller.set_blackboard_key(BB_SPIDER_WEB_ACTION, webbing)
/mob/living/basic/giant_spider/Login()
. = ..()
if(!. || !client)
return FALSE
GLOB.spidermobs[src] = TRUE
add_or_update_variable_movespeed_modifier(/datum/movespeed_modifier/player_spider_modifier, multiplicative_slowdown = player_speed_modifier)
if (apply_spider_antag)
var/datum/antagonist/spider/spider_antag = new(directive)
mind.add_antag_datum(spider_antag)
/mob/living/basic/giant_spider/Logout()
. = ..()
remove_movespeed_modifier(/datum/movespeed_modifier/player_spider_modifier)
/mob/living/basic/giant_spider/Destroy()
GLOB.spidermobs -= src
return ..()
/mob/living/basic/giant_spider/mob_negates_gravity()
if(locate(/obj/structure/spider/stickyweb) in loc)
return TRUE
return ..()
/mob/living/basic/giant_spider/expose_reagents(list/reagents, datum/reagents/source, methods=TOUCH, volume_modifier=1, show_message=TRUE)
. = ..()
for(var/datum/reagent/toxin/pestkiller/current_reagent in reagents)
apply_damage(50 * volume_modifier, STAMINA, BODY_ZONE_CHEST)
@@ -1,9 +1,32 @@
/**
* ### Spider Ambush
* # Giant Spider
*
* A mob which can be created by dynamic event, botany, or xenobiology.
* The basic type is the guard, which is slow but sturdy and outputs good damage.
* All spiders can produce webbing.
*/
/mob/living/basic/spider/giant
name = "giant spider"
desc = "Furry and black, it makes you shudder to look at it. This one has deep red eyes."
icon_state = "guard"
icon_living = "guard"
icon_dead = "guard_dead"
speed = 5
maxHealth = 125
health = 125
obj_damage = 30
melee_damage_lower = 20
melee_damage_upper = 25
gold_core_spawnable = HOSTILE_SPAWN
ai_controller = /datum/ai_controller/basic_controller/giant_spider
/**
* ### Ambush Spider
* A subtype of the giant spider which is slower, stronger and able to sneak into its surroundings to pull pray aggressively.
* This spider is only slightly slower than a human.
*/
/mob/living/basic/giant_spider/ambush
/mob/living/basic/spider/giant/ambush
name = "ambush spider"
desc = "Furry and white, it makes you shudder to look at it. This one has sparkling pink eyes."
icon = 'icons/mob/simple/arachnoid.dmi'
@@ -20,7 +43,7 @@
player_speed_modifier = -3.1
menu_description = "Slow spider variant specializing in stalking and ambushing prey, above avarage health and damage with a strong grip."
/mob/living/basic/giant_spider/ambush/Initialize(mapload)
/mob/living/basic/spider/giant/ambush/Initialize(mapload)
. = ..()
ADD_TRAIT(src, TRAIT_STRONG_GRABBER, INNATE_TRAIT)
@@ -30,11 +53,11 @@
sneak_web.Grant(src)
/**
* ### Spider Guard
* ### Guard Spider
* A subtype of the giant spider which is similar on every single way,
* This spider is only slightly slower than a human.
*/
/mob/living/basic/giant_spider/guard
/mob/living/basic/spider/giant/guard
name = "guard spider"
desc = "Furry and black, it makes you shudder to look at it. This one has deep red eyes."
icon = 'icons/mob/simple/arachnoid.dmi'
@@ -51,7 +74,7 @@
player_speed_modifier = -4
menu_description = "Tanky and strong for the defense of the nest and other spiders."
/mob/living/basic/giant_spider/guard/Initialize(mapload)
/mob/living/basic/spider/giant/guard/Initialize(mapload)
. = ..()
AddElement(/datum/element/web_walker, /datum/movespeed_modifier/average_web)
@@ -59,11 +82,11 @@
shed.Grant(src)
/**
* ### Spider Hunter
* ### Hunter Spider
* A subtype of the giant spider which is faster, has toxin injection, but less health and damage.
* This spider is only slightly slower than a human.
*/
/mob/living/basic/giant_spider/hunter
/mob/living/basic/spider/giant/hunter
name = "hunter spider"
desc = "Furry and black, it makes you shudder to look at it. This one has sparkling purple eyes."
icon = 'icons/mob/simple/arachnoid.dmi'
@@ -79,17 +102,17 @@
player_speed_modifier = -3.1
menu_description = "Fast spider variant specializing in catching running prey and toxin injection, but has less health and damage."
/mob/living/basic/giant_spider/hunter/Initialize(mapload)
/mob/living/basic/spider/giant/hunter/Initialize(mapload)
. = ..()
AddElement(/datum/element/web_walker, /datum/movespeed_modifier/fast_web)
/**
* ### Spider Scout
* ### Scout Spider
* A subtype of the giant spider which is faster, has thermal vision, but less health and damage.
* This spider is only slightly faster than a human.
*/
/mob/living/basic/giant_spider/scout
/mob/living/basic/spider/giant/scout
name = "scout spider"
desc = "Furry and blueish black, it makes you shudder to look at it. This one has sparkling blue eyes."
icon = 'icons/mob/simple/arachnoid.dmi'
@@ -108,7 +131,7 @@
sight = SEE_SELF|SEE_MOBS
menu_description = "Fast spider variant specializing in scouting and alerting of prey, with the ability to travel in vents."
/mob/living/basic/giant_spider/scout/Initialize(mapload)
/mob/living/basic/spider/giant/scout/Initialize(mapload)
. = ..()
ADD_TRAIT(src, TRAIT_VENTCRAWLER_ALWAYS, INNATE_TRAIT)
@@ -116,13 +139,13 @@
spiders_communication.Grant(src)
/**
* ### Spider Nurse
* ### Nurse Spider
*
* A subtype of the giant spider which specializes in support skills.
* Nurses can place down webbing in a quarter of the time that other species can and can wrap other spiders' wounds, healing them.
* Note that it cannot heal itself.
*/
/mob/living/basic/giant_spider/nurse
/mob/living/basic/spider/giant/nurse
name = "nurse spider"
desc = "Furry and black, it makes you shudder to look at it. This one has brilliant green eyes."
icon = 'icons/mob/simple/arachnoid.dmi'
@@ -143,7 +166,7 @@
///The health HUD applied to the mob.
var/health_hud = DATA_HUD_MEDICAL_ADVANCED
/mob/living/basic/giant_spider/nurse/Initialize(mapload)
/mob/living/basic/spider/giant/nurse/Initialize(mapload)
. = ..()
var/datum/atom_hud/datahud = GLOB.huds[health_hud]
datahud.show_to(src)
@@ -152,7 +175,7 @@
heal_brute = 25,\
heal_burn = 25,\
interaction_key = DOAFTER_SOURCE_SPIDER,\
valid_targets_typecache = typecacheof(list(/mob/living/basic/giant_spider)),\
valid_targets_typecache = typecacheof(list(/mob/living/basic/spider/giant)),\
action_text = "%SOURCE% begins wrapping the wounds of %TARGET%.",\
complete_text = "%SOURCE% wraps the wounds of %TARGET%.",\
)
@@ -166,7 +189,7 @@
* Tangle spiders can place down webbing in a quarter of the time that other species plus has an expanded arsenal of traps and web structures to place to benefit the nest.
* Note that it can heal itself.
*/
/mob/living/basic/giant_spider/tangle
/mob/living/basic/spider/giant/tangle
name = "tangle spider"
desc = "Furry and brown, it makes you shudder to look at it. This one has dim brown eyes."
icon = 'icons/mob/simple/arachnoid.dmi'
@@ -188,7 +211,7 @@
web_type = /datum/action/cooldown/lay_web/sealer
menu_description = "Support spider variant specializing in contruction to protect their brethren, but has very low amount of health and deals low damage."
/mob/living/basic/giant_spider/tangle/Initialize(mapload)
/mob/living/basic/spider/giant/tangle/Initialize(mapload)
. = ..()
var/datum/action/cooldown/lay_web/solid_web/web_solid = new(src)
web_solid.Grant(src)
@@ -210,14 +233,14 @@
heal_time = 3 SECONDS,\
self_targetting = HEALING_TOUCH_SELF_ONLY,\
interaction_key = DOAFTER_SOURCE_SPIDER,\
valid_targets_typecache = typecacheof(list(/mob/living/basic/giant_spider/tangle)),\
valid_targets_typecache = typecacheof(list(/mob/living/basic/spider/growing/young/tangle, /mob/living/basic/spider/giant/tangle)),\
extra_checks = CALLBACK(src, PROC_REF(can_mend)),\
action_text = "%SOURCE% begins mending themselves...",\
complete_text = "%SOURCE%'s wounds mend together.",\
)
/// Prevent you from healing other tangle spiders, or healing when on fire
/mob/living/basic/giant_spider/tangle/proc/can_mend(mob/living/source, mob/living/target)
/mob/living/basic/spider/giant/tangle/proc/can_mend(mob/living/source, mob/living/target)
if (on_fire)
balloon_alert(src, "on fire!")
return FALSE
@@ -229,7 +252,7 @@
* A subtype of the giant spider which specializes in pure strength and staying power.
* Is slowed down when not on webbing, but can lunge to throw off attackers and possibly to stun them.
*/
/mob/living/basic/giant_spider/tarantula
/mob/living/basic/spider/giant/tarantula
name = "tarantula"
desc = "Furry and black, it makes you shudder to look at it. This one has abyssal red eyes."
icon = 'icons/mob/simple/arachnoid.dmi'
@@ -252,7 +275,7 @@
/// Charging ability
var/datum/action/cooldown/mob_cooldown/charge/basic_charge/charge
/mob/living/basic/giant_spider/tarantula/Initialize(mapload)
/mob/living/basic/spider/giant/tarantula/Initialize(mapload)
. = ..()
var/datum/action/cooldown/lay_web/solid_web/web_solid = new(src)
web_solid.Grant(src)
@@ -266,12 +289,12 @@
AddElement(/datum/element/tear_wall)
AddElement(/datum/element/web_walker, /datum/movespeed_modifier/slow_web)
/mob/living/basic/giant_spider/tarantula/Destroy()
/mob/living/basic/spider/giant/tarantula/Destroy()
QDEL_NULL(charge)
return ..()
/// Lunge if you click something at range
/mob/living/basic/giant_spider/tarantula/ranged_secondary_attack(atom/atom_target, modifiers)
/mob/living/basic/spider/giant/tarantula/ranged_secondary_attack(atom/atom_target, modifiers)
charge.Trigger(target = atom_target)
/**
@@ -280,7 +303,7 @@
* A subtype of the giant spider which specializes in speed and poison.
* Injects a deadlier toxin than other spiders, moves extremely fast, but has a limited amount of health.
*/
/mob/living/basic/giant_spider/viper
/mob/living/basic/spider/giant/viper
name = "viper spider"
desc = "Furry and black, it makes you shudder to look at it. This one has effervescent purple eyes."
icon = 'icons/mob/simple/arachnoid.dmi'
@@ -298,7 +321,7 @@
gold_core_spawnable = NO_SPAWN
menu_description = "Assassin spider variant with an unmatched speed and very deadly poison, but has very low amount of health and damage."
/mob/living/basic/giant_spider/viper/Initialize(mapload)
/mob/living/basic/spider/giant/viper/Initialize(mapload)
. = ..()
AddElement(/datum/element/bonus_damage)
@@ -314,7 +337,7 @@
* After consuming human bodies can lay specialised eggs including more broodmothers.
* They are also capable of sending messages to all living spiders and setting directives for their children.
*/
/mob/living/basic/giant_spider/midwife
/mob/living/basic/spider/giant/midwife
name = "broodmother spider"
desc = "Furry and black, it makes you shudder to look at it. This one has scintillating green eyes. Might also be hiding a real knife somewhere."
gender = FEMALE
@@ -333,7 +356,7 @@
web_type = /datum/action/cooldown/lay_web/sealer
menu_description = "Royal spider variant specializing in reproduction and leadership, deals low damage."
/mob/living/basic/giant_spider/midwife/Initialize(mapload)
/mob/living/basic/spider/giant/midwife/Initialize(mapload)
. = ..()
var/datum/action/cooldown/lay_web/solid_web/web_solid = new(src)
web_solid.Grant(src)
@@ -370,7 +393,7 @@
* A subtype of the giant spider which is immune to temperature damage, unlike its normal counterpart.
* Currently unused in the game unless spawned by admins.
*/
/mob/living/basic/giant_spider/ice
/mob/living/basic/spider/giant/ice
name = "giant ice spider"
habitable_atmos = list("min_oxy" = 0, "max_oxy" = 0, "min_plas" = 0, "max_plas" = 0, "min_co2" = 0, "max_co2" = 0, "min_n2" = 0, "max_n2" = 0)
minimum_survivable_temperature = 0
@@ -384,7 +407,7 @@
*
* A temperature-proof nurse spider. Also unused.
*/
/mob/living/basic/giant_spider/nurse/ice
/mob/living/basic/spider/giant/nurse/ice
name = "giant ice spider"
habitable_atmos = list("min_oxy" = 0, "max_oxy" = 0, "min_plas" = 0, "max_plas" = 0, "min_co2" = 0, "max_co2" = 0, "min_n2" = 0, "max_n2" = 0)
minimum_survivable_temperature = 0
@@ -398,7 +421,7 @@
*
* A temperature-proof hunter with chilling venom. Also unused.
*/
/mob/living/basic/giant_spider/hunter/ice
/mob/living/basic/spider/giant/hunter/ice
name = "giant ice spider"
habitable_atmos = list("min_oxy" = 0, "max_oxy" = 0, "min_plas" = 0, "max_plas" = 0, "min_co2" = 0, "max_co2" = 0, "min_n2" = 0, "max_n2" = 0)
minimum_survivable_temperature = 0
@@ -414,7 +437,7 @@
* A hunter spider that trades damage for health, unable to smash enviroments.
* Used as a minor threat in abandoned places, such as areas in maintenance or a ruin.
*/
/mob/living/basic/giant_spider/hunter/scrawny
/mob/living/basic/spider/giant/hunter/scrawny
name = "scrawny spider"
health = 60
maxHealth = 60
@@ -430,7 +453,7 @@
* A weaker version of the Tarantula, unable to smash enviroments.
* Used as a moderately strong but slow threat in abandoned places, such as areas in maintenance or a ruin.
*/
/mob/living/basic/giant_spider/tarantula/scrawny
/mob/living/basic/spider/giant/tarantula/scrawny
name = "scrawny tarantula"
health = 150
maxHealth = 150
@@ -447,7 +470,7 @@
* Mainly used as a weak threat in abandoned places, such as areas in maintenance or a ruin.
* In the future we should give this AI so that it actually heals its teammates.
*/
/mob/living/basic/giant_spider/nurse/scrawny
/mob/living/basic/spider/giant/nurse/scrawny
name = "scrawny nurse spider"
health = 30
maxHealth = 30
@@ -462,7 +485,7 @@
* Has the base stats of a hunter, but they can heal themselves and spin webs faster.
* They also occasionally leave puddles of blood when they walk around. Flavorful!
*/
/mob/living/basic/giant_spider/hunter/flesh
/mob/living/basic/spider/giant/hunter/flesh
name = "flesh spider"
desc = "A odd fleshy creature in the shape of a spider. Its eyes are pitch black and soulless."
icon = 'icons/mob/simple/arachnoid.dmi'
@@ -474,7 +497,7 @@
health = 90
menu_description = "Self-sufficient spider variant capable of healing themselves and producing webbbing fast."
/mob/living/basic/giant_spider/hunter/flesh/Initialize(mapload)
/mob/living/basic/spider/giant/hunter/flesh/Initialize(mapload)
. = ..()
AddComponent(/datum/component/blood_walk, \
blood_type = /obj/effect/decal/cleanable/blood/bubblegum, \
@@ -485,7 +508,7 @@
heal_burn = 45,\
self_targetting = HEALING_TOUCH_SELF_ONLY,\
interaction_key = DOAFTER_SOURCE_SPIDER,\
valid_targets_typecache = typecacheof(list(/mob/living/basic/giant_spider/hunter/flesh)),\
valid_targets_typecache = typecacheof(list(/mob/living/basic/spider/giant/hunter/flesh)),\
extra_checks = CALLBACK(src, PROC_REF(can_mend)),\
action_text = "%SOURCE% begins mending themselves...",\
complete_text = "%SOURCE%'s wounds mend together.",\
@@ -498,7 +521,7 @@
web_sticky.Grant(src)
/// Prevent you from healing other flesh spiders, or healing when on fire
/mob/living/basic/giant_spider/hunter/flesh/proc/can_mend(mob/living/source, mob/living/target)
/mob/living/basic/spider/giant/hunter/flesh/proc/can_mend(mob/living/source, mob/living/target)
if (on_fire)
balloon_alert(src, "on fire!")
return FALSE
@@ -509,7 +532,7 @@
*
* A spider form for wizards. Has the viper spider's extreme speed and strong venom, with additional health and vent crawling abilities.
*/
/mob/living/basic/giant_spider/viper/wizard
/mob/living/basic/spider/giant/viper/wizard
name = "water spider"
desc = "Furry and black, it makes you shudder to look at it. This one has effervescent orange eyes."
icon = 'icons/mob/simple/arachnoid.dmi'
@@ -525,7 +548,7 @@
menu_description = "Stronger assassin spider variant with an unmatched speed, high amount of health and very deadly poison, but deals very low amount of damage. It also has ability to ventcrawl."
apply_spider_antag = FALSE
/mob/living/basic/giant_spider/viper/wizard/Initialize(mapload)
/mob/living/basic/spider/giant/viper/wizard/Initialize(mapload)
. = ..()
ADD_TRAIT(src, TRAIT_VENTCRAWLER_ALWAYS, INNATE_TRAIT)
@@ -541,7 +564,7 @@
*
* This friendly arachnid hangs out in the HoS office on some space stations. Better trained than an average officer and does not attack except in self-defence.
*/
/mob/living/basic/giant_spider/sgt_araneus
/mob/living/basic/spider/giant/sgt_araneus
name = "Sergeant Araneus"
real_name = "Sergeant Araneus"
desc = "A fierce companion of the Head of Security, this spider has been carefully trained by Nanotrasen specialists. Its beady, staring eyes send shivers down your spine."
@@ -554,48 +577,8 @@
ai_controller = /datum/ai_controller/basic_controller/giant_spider/retaliate
apply_spider_antag = FALSE
/mob/living/basic/giant_spider/sgt_araneus/Initialize(mapload)
/mob/living/basic/spider/giant/sgt_araneus/Initialize(mapload)
. = ..()
AddElement(/datum/element/pet_bonus, "chitters proudly!")
AddElement(/datum/element/ai_retaliate)
ADD_TRAIT(src, TRAIT_VENTCRAWLER_ALWAYS, INNATE_TRAIT)
/**
* ### Duct Spider
*
* A less giant spider which lives in the maintenance ducts and makes them annoying to traverse.
*/
/mob/living/basic/giant_spider/maintenance
name = "duct spider"
desc = "Nanotrasen's imported solution to mice, comes with its own problems."
icon = 'icons/mob/simple/arachnoid.dmi'
icon_state = "maint_spider"
icon_living = "maint_spider"
icon_dead = "maint_spider_dead"
can_be_held = TRUE
mob_size = MOB_SIZE_TINY
held_w_class = WEIGHT_CLASS_TINY
worn_slot_flags = ITEM_SLOT_HEAD
head_icon = 'icons/mob/clothing/head/pets_head.dmi'
density = FALSE
pass_flags = PASSTABLE|PASSGRILLE|PASSMOB
gold_core_spawnable = FRIENDLY_SPAWN
maxHealth = 10
health = 10
melee_damage_lower = 1
melee_damage_upper = 1
speed = 0
player_speed_modifier = 0
web_speed = 0.25
menu_description = "Fragile spider variant which is not good for much other than laying webs."
response_harm_continuous = "splats"
response_harm_simple = "splat"
ai_controller = /datum/ai_controller/basic_controller/giant_spider/pest
apply_spider_antag = FALSE
/mob/living/basic/giant_spider/maintenance/Initialize(mapload)
. = ..()
ADD_TRAIT(src, TRAIT_VENTCRAWLER_ALWAYS, INNATE_TRAIT)
AddElement(/datum/element/web_walker, /datum/movespeed_modifier/average_web)
AddElement(/datum/element/ai_retaliate)
AddElement(/datum/element/tiny_mob_hunter)
@@ -0,0 +1,176 @@
/**
* Base type of various spider life stages
*/
/mob/living/basic/spider
name = "abstract spider"
desc = "Furry and abstract, it makes you shudder to look at it. This one should not exist."
icon = 'icons/mob/simple/arachnoid.dmi'
mob_biotypes = MOB_ORGANIC|MOB_BUG
speak_emote = list("chitters")
butcher_results = list(/obj/item/food/meat/slab/spider = 2, /obj/item/food/spiderleg = 8)
response_help_continuous = "pets"
response_help_simple = "pet"
response_disarm_continuous = "gently pushes aside"
response_disarm_simple = "gently push aside"
initial_language_holder = /datum/language_holder/spider
damage_coeff = list(BRUTE = 1, BURN = 1.25, TOX = 1, CLONE = 1, STAMINA = 1, OXY = 1)
basic_mob_flags = FLAMMABLE_MOB
status_flags = NONE
unsuitable_cold_damage = 4
unsuitable_heat_damage = 4
combat_mode = TRUE
faction = list(FACTION_SPIDER)
pass_flags = PASSTABLE
attack_verb_continuous = "bites"
attack_verb_simple = "bite"
attack_sound = 'sound/weapons/bite.ogg'
attack_vis_effect = ATTACK_EFFECT_BITE
unique_name = TRUE
lighting_cutoff_red = 22
lighting_cutoff_green = 5
lighting_cutoff_blue = 5
/// Speed modifier to apply if controlled by a human player
var/player_speed_modifier = -4
/// What reagent the mob injects targets with
var/poison_type = /datum/reagent/toxin/hunterspider
/// How much of a reagent the mob injects on attack
var/poison_per_bite = 0
/// Multiplier to apply to web laying speed. Fractional numbers make it faster, because it's a multiplier.
var/web_speed = 1
/// Type of webbing ability to learn.
var/web_type = /datum/action/cooldown/lay_web
/// The message that the mother spider left for this spider when the egg was layed.
var/directive = ""
/// Short description of what this mob is capable of, for radial menu uses
var/menu_description = "Tanky and strong for the defense of the nest and other spiders."
/// If true then you shouldn't be told that you're a spider antagonist as soon as you are placed into this mob
var/apply_spider_antag = TRUE
/mob/living/basic/spider/Initialize(mapload)
. = ..()
ADD_TRAIT(src, TRAIT_WEB_SURFER, INNATE_TRAIT)
AddElement(/datum/element/footstep, FOOTSTEP_MOB_CLAW)
AddElement(/datum/element/nerfed_pulling, GLOB.typecache_general_bad_things_to_easily_move)
AddElement(/datum/element/prevent_attacking_of_types, GLOB.typecache_general_bad_hostile_attack_targets, "this tastes awful!")
AddElement(/datum/element/cliff_walking)
if(poison_per_bite)
AddElement(/datum/element/venomous, poison_type, poison_per_bite)
var/datum/action/cooldown/lay_web/webbing = new web_type(src)
webbing.webbing_time *= web_speed
webbing.Grant(src)
ai_controller?.set_blackboard_key(BB_SPIDER_WEB_ACTION, webbing)
/mob/living/basic/spider/Login()
. = ..()
if(!. || !client)
return FALSE
GLOB.spidermobs[src] = TRUE
add_or_update_variable_movespeed_modifier(/datum/movespeed_modifier/player_spider_modifier, multiplicative_slowdown = player_speed_modifier)
/mob/living/basic/spider/Logout()
. = ..()
remove_movespeed_modifier(/datum/movespeed_modifier/player_spider_modifier)
/mob/living/basic/spider/Destroy()
GLOB.spidermobs -= src
return ..()
/mob/living/basic/spider/mob_negates_gravity()
if(locate(/obj/structure/spider/stickyweb) in loc)
return TRUE
return ..()
/mob/living/basic/spider/expose_reagents(list/reagents, datum/reagents/source, methods=TOUCH, volume_modifier=1, show_message=TRUE)
. = ..()
for(var/datum/reagent/toxin/pestkiller/current_reagent in reagents)
apply_damage(50 * volume_modifier, STAMINA, BODY_ZONE_CHEST)
/// Spider which turns into another spider over time
/mob/living/basic/spider/growing
/// The mob type we will grow into.
var/mob/living/basic/spider/grow_as = null
/// The time it takes for the spider to grow into the next stage
var/spider_growth_time = 1 MINUTES
/mob/living/basic/spider/growing/Initialize(mapload)
. = ..()
AddComponent(\
/datum/component/growth_and_differentiation,\
growth_time = spider_growth_time,\
growth_path = grow_as,\
growth_probability = 25,\
lower_growth_value = 1,\
upper_growth_value = 2,\
optional_checks = CALLBACK(src, PROC_REF(ready_to_grow)),\
optional_grow_behavior = CALLBACK(src, PROC_REF(grow_up))\
)
/**
* Checks to see if we're ready to grow, primarily if we are on solid ground and not in a vent or something.
* The component will automagically grow us when we return TRUE and that threshold has been met.
*/
/mob/living/basic/spider/growing/proc/ready_to_grow()
if(isturf(loc))
return TRUE
return FALSE
/// Actually grows the young spider into a giant spider. We have to do a bunch of unique behavior that really can't be genericized, so we have to override the component in this manner.
/**
* Actually move to our next stage of life.
*/
/mob/living/basic/spider/growing/proc/grow_up()
if(isnull(grow_as))
if(prob(3))
grow_as = pick(/mob/living/basic/spider/giant/tarantula, /mob/living/basic/spider/giant/viper, /mob/living/basic/spider/giant/midwife)
else
grow_as = pick(/mob/living/basic/spider/giant/guard, /mob/living/basic/spider/giant/ambush, /mob/living/basic/spider/giant/hunter, /mob/living/basic/spider/giant/scout, /mob/living/basic/spider/giant/nurse, /mob/living/basic/spider/giant/tangle)
var/mob/living/basic/spider/giant/grown = change_mob_type(grow_as, get_turf(src), initial(grow_as.name))
ADD_TRAIT(grown, TRAIT_WAS_EVOLVED, REF(src))
grown.faction = faction.Copy()
grown.directive = directive
grown.set_name()
grown.setBruteLoss(getBruteLoss())
grown.setFireLoss(getFireLoss())
qdel(src)
/**
* ### Duct Spider
* A less than giant spider which lives in the maintenance ducts and makes them annoying to traverse.
*/
/mob/living/basic/spider/maintenance
name = "duct spider"
desc = "Nanotrasen's imported solution to mice, comes with its own problems."
icon_state = "maint_spider"
icon_living = "maint_spider"
icon_dead = "maint_spider_dead"
can_be_held = TRUE
mob_size = MOB_SIZE_TINY
held_w_class = WEIGHT_CLASS_TINY
worn_slot_flags = ITEM_SLOT_HEAD
head_icon = 'icons/mob/clothing/head/pets_head.dmi'
density = FALSE
pass_flags = PASSTABLE|PASSGRILLE|PASSMOB
gold_core_spawnable = FRIENDLY_SPAWN
maxHealth = 10
health = 10
melee_damage_lower = 1
melee_damage_upper = 1
speed = 0
player_speed_modifier = 0
web_speed = 0.25
menu_description = "Fragile spider variant which is not good for much other than laying webs."
response_harm_continuous = "splats"
response_harm_simple = "splat"
ai_controller = /datum/ai_controller/basic_controller/giant_spider/pest
apply_spider_antag = FALSE
/mob/living/basic/spider/maintenance/Initialize(mapload)
. = ..()
ADD_TRAIT(src, TRAIT_VENTCRAWLER_ALWAYS, INNATE_TRAIT)
AddElement(/datum/element/web_walker, /datum/movespeed_modifier/average_web)
AddElement(/datum/element/ai_retaliate)
AddElement(/datum/element/tiny_mob_hunter)
@@ -5,50 +5,28 @@
* Able to vent-crawl and eventually grow into a full fledged giant spider.
*
*/
/mob/living/basic/spiderling
/mob/living/basic/spider/growing/spiderling
name = "spiderling"
desc = "It never stays still for long."
icon = 'icons/mob/simple/arachnoid.dmi'
icon_state = "spiderling"
icon_dead = "spiderling_dead"
density = FALSE
faction = list(FACTION_SPIDER)
speed = -0.75
move_resist = INFINITY // YOU CAN'T HANDLE ME LET ME BE FREE LET ME BE FREE LET ME BE FREE
speak_emote = list("hisses")
initial_language_holder = /datum/language_holder/spider
basic_mob_flags = FLAMMABLE_MOB | DEL_ON_DEATH
mob_size = MOB_SIZE_TINY
unique_name = TRUE
// we have _some_ bite
melee_damage_lower = 1
melee_damage_upper = 2
health = 5 // very low.
health = 5
maxHealth = 5
unsuitable_cold_damage = 4
unsuitable_heat_damage = 4
death_message = "lets out a final hiss..."
player_speed_modifier = 0
spider_growth_time = 40 SECONDS
ai_controller = /datum/ai_controller/basic_controller/spiderling
// VERY red, to fit the eyes
lighting_cutoff_red = 22
lighting_cutoff_green = 5
lighting_cutoff_blue = 5
/// The mob we will grow into.
var/mob/living/basic/young_spider/grow_as = null
/// The message that the mother left for our big strong selves.
var/directive = ""
/// Simple boolean that determines if we should apply the spider antag to the player if they possess this mob. TRUE by default since we're always going to evolve into a spider that will have an antagonistic role.
var/apply_spider_antag = TRUE
/// The time it takes for the spider to grow into the next stage
var/spider_growth_time = 40 SECONDS
/mob/living/basic/spiderling/Initialize(mapload)
/mob/living/basic/spider/growing/spiderling/Initialize(mapload)
. = ..()
// random placement since we're pretty small and to make the swarming component actually look like it's doing something when we have a buncha these fuckers
pixel_x = rand(6,-6)
@@ -56,36 +34,18 @@
add_overlay(image(icon = src.icon, icon_state = "spiderling_click_underlay", layer = BELOW_MOB_LAYER))
// the proc that handles passtable is nice but we should always be able to pass through table since we're so small so we can eschew adding that here
pass_flags |= PASSTABLE
add_traits(list(TRAIT_PASSTABLE, TRAIT_VENTCRAWLER_ALWAYS, TRAIT_WEB_SURFER), INNATE_TRAIT)
ADD_TRAIT(src, TRAIT_VENTCRAWLER_ALWAYS, INNATE_TRAIT)
AddComponent(/datum/component/swarming)
AddElement(/datum/element/footstep, FOOTSTEP_MOB_CLAW, volume = 0.2) // they're small but you can hear 'em
AddElement(/datum/element/web_walker, /datum/movespeed_modifier/spiderling_web)
// it's A-OKAY for grow_as to be null for the purposes of this component since we override that behavior anyhow.
AddComponent(\
/datum/component/growth_and_differentiation,\
growth_time = spider_growth_time,\
growth_path = grow_as,\
growth_probability = 25,\
lower_growth_value = 1,\
upper_growth_value = 2,\
optional_checks = CALLBACK(src, PROC_REF(ready_to_grow)),\
optional_grow_behavior = CALLBACK(src, PROC_REF(grow_into_young_spider))\
)
// keep in mind we have infinite range (the entire pipenet is our playground, it's just a matter of random choice as to where we end up) so lower and upper both have their gives and takes.
// but, also remember the more time we aren't in a vent, the more susceptible we are to dying to anything and everything.
// also remember we can't evolve if we're in a vent. lots to keep in mind when you set these variables.
ai_controller.set_blackboard_key(BB_LOWER_VENT_TIME_LIMIT, rand(9, 11) SECONDS)
ai_controller.set_blackboard_key(BB_UPPER_VENT_TIME_LIMIT, rand(12, 14) SECONDS)
/mob/living/basic/spiderling/Destroy()
GLOB.spidermobs -= src
return ..()
/mob/living/basic/spiderling/death(gibbed)
/mob/living/basic/spider/growing/spiderling/death(gibbed)
if(isturf(get_turf(loc)) && (basic_mob_flags & DEL_ON_DEATH || gibbed))
var/obj/item/food/spiderling/dead_spider = new(loc) // mmm yummy
dead_spider.name = name
@@ -93,48 +53,9 @@
return ..()
/mob/living/basic/spiderling/Login() // this is only really here for admins dragging and dropping players into spiderlings, player control of spiderlings is otherwise unimplemented
. = ..()
if(!. || isnull(client))
return FALSE
basic_mob_flags &= ~DEL_ON_DEATH // we don't want to be deleted if we die while player controlled in case there's some revive schenanigans going on that can bring us back
GLOB.spidermobs[src] = TRUE
if (apply_spider_antag)
var/datum/antagonist/spider/spider_antag = new(directive)
mind.add_antag_datum(spider_antag)
/mob/living/basic/spiderling/mob_negates_gravity() // in case our sisters want to give us a helping hand
if(locate(/obj/structure/spider/stickyweb) in loc)
return TRUE
return ..()
/mob/living/basic/spiderling/start_pulling(atom/movable/pulled_atom, state, force = move_force, supress_message = FALSE) // we're TOO FUCKING SMALL
/mob/living/basic/spider/growing/spiderling/start_pulling(atom/movable/pulled_atom, state, force = move_force, supress_message = FALSE) // we're TOO FUCKING SMALL
return
/// Checks to see if we're ready to grow, primarily if we are on solid ground and not in a vent or something.
/// The component will automagically grow us when we return TRUE and that threshold has been met.
/mob/living/basic/spiderling/proc/ready_to_grow()
if(isturf(loc))
return TRUE
return FALSE
/// Actually grows the spiderling into a young spider. We have to do a bunch of unique behavior that really can't be genericized, so we have to override the component in this manner.
/mob/living/basic/spiderling/proc/grow_into_young_spider()
if(isnull(grow_as))
if(prob(3))
grow_as = pick(/mob/living/basic/young_spider/tarantula, /mob/living/basic/young_spider/viper, /mob/living/basic/young_spider/midwife)
else
grow_as = pick(/mob/living/basic/young_spider/guard, /mob/living/basic/young_spider/ambush, /mob/living/basic/young_spider/hunter, /mob/living/basic/young_spider/scout, /mob/living/basic/young_spider/nurse, /mob/living/basic/young_spider/tangle)
var/mob/living/basic/young_spider/grown = change_mob_type(grow_as, get_turf(src), initial(grow_as.name))
ADD_TRAIT(grown, TRAIT_WAS_EVOLVED, REF(src))
grown.faction = faction.Copy()
grown.directive = directive
grown.set_name()
qdel(src)
/// Opportunistically hops in and out of vents, if it can find one. We aren't interested in attacking due to how weak we are, we gotta be quick and hidey.
/datum/ai_controller/basic_controller/spiderling
blackboard = list(
@@ -1,14 +1,14 @@
// This whole file is just a container for the spiderling subtypes that actually differentiate into different young spiders. None of them are particularly special as of now.
/// Will differentiate into the base young spider (known colloquially as the "guard" spider).
/mob/living/basic/spiderling/guard
grow_as = /mob/living/basic/young_spider/guard
/mob/living/basic/spider/growing/spiderling/guard
grow_as = /mob/living/basic/spider/growing/young/guard
name = "guard spiderling"
desc = "Furry and brown, it looks defenseless. This one has sparkling red eyes."
/// Will differentiate into the "ambush" young spider.
/mob/living/basic/spiderling/ambush
grow_as = /mob/living/basic/young_spider/ambush
/mob/living/basic/spider/growing/spiderling/ambush
grow_as = /mob/living/basic/spider/growing/young/ambush
name = "ambush spiderling"
desc = "Furry and white, it looks defenseless. This one has sparkling pink eyes."
icon = 'icons/mob/simple/arachnoid.dmi'
@@ -16,8 +16,8 @@
icon_dead = "ambush_spiderling_dead"
/// Will differentiate into the "scout" young spider.
/mob/living/basic/spiderling/scout
grow_as = /mob/living/basic/young_spider/scout
/mob/living/basic/spider/growing/spiderling/scout
grow_as = /mob/living/basic/spider/growing/young/scout
name = "scout spiderling"
desc = "Furry and black, it looks defenseless. This one has sparkling blue eyes."
icon = 'icons/mob/simple/arachnoid.dmi'
@@ -26,8 +26,8 @@
sight = SEE_SELF|SEE_MOBS
/// Will differentiate into the "hunter" young spider.
/mob/living/basic/spiderling/hunter
grow_as = /mob/living/basic/young_spider/hunter
/mob/living/basic/spider/growing/spiderling/hunter
grow_as = /mob/living/basic/spider/growing/young/hunter
name = "hunter spiderling"
desc = "Furry and black, it looks defenseless. This one has sparkling purple eyes."
icon = 'icons/mob/simple/arachnoid.dmi'
@@ -35,8 +35,8 @@
icon_dead = "hunter_spiderling_dead"
/// Will differentiate into the "nurse" young spider.
/mob/living/basic/spiderling/nurse
grow_as = /mob/living/basic/young_spider/nurse
/mob/living/basic/spider/growing/spiderling/nurse
grow_as = /mob/living/basic/spider/growing/young/nurse
name = "nurse spiderling"
desc = "Furry and black, it looks defenseless. This one has sparkling green eyes."
icon = 'icons/mob/simple/arachnoid.dmi'
@@ -44,8 +44,8 @@
icon_dead = "nurse_spiderling_dead"
/// Will differentiate into the "tangle" young spider.
/mob/living/basic/spiderling/tangle
grow_as = /mob/living/basic/young_spider/tangle
/mob/living/basic/spider/growing/spiderling/tangle
grow_as = /mob/living/basic/spider/growing/young/tangle
name = "tangle spiderling"
desc = "Furry and brown, it looks defenseless. This one has dim brown eyes."
icon = 'icons/mob/simple/arachnoid.dmi'
@@ -53,8 +53,8 @@
icon_dead = "tangle_spiderling_dead"
/// Will differentiate into the "midwife" young spider.
/mob/living/basic/spiderling/midwife
grow_as = /mob/living/basic/young_spider/midwife
/mob/living/basic/spider/growing/spiderling/midwife
grow_as = /mob/living/basic/spider/growing/young/midwife
name = "broodmother spiderling"
desc = "Furry and black, it looks defenseless. This one has scintillating green eyes. Might also be hiding a real knife somewhere."
icon = 'icons/mob/simple/arachnoid.dmi'
@@ -62,8 +62,8 @@
icon_dead = "midwife_spiderling_dead"
/// Will differentiate into the "viper" young spider.
/mob/living/basic/spiderling/viper
grow_as = /mob/living/basic/young_spider/viper
/mob/living/basic/spider/growing/spiderling/viper
grow_as = /mob/living/basic/spider/growing/young/viper
name = "viper spiderling"
desc = "Furry and black, it looks defenseless. This one has sparkling magenta eyes."
icon = 'icons/mob/simple/arachnoid.dmi'
@@ -71,20 +71,10 @@
icon_dead = "viper_spiderling_dead"
/// Will differentiate into the "tarantula" young spider.
/mob/living/basic/spiderling/tarantula
grow_as = /mob/living/basic/young_spider/tarantula
/mob/living/basic/spider/growing/spiderling/tarantula
grow_as = /mob/living/basic/spider/growing/young/tarantula
name = "tarantula spiderling"
desc = "Furry and black, it looks defenseless. This one has abyssal red eyes."
icon = 'icons/mob/simple/arachnoid.dmi'
icon_state = "tarantula_spiderling"
icon_dead = "tarantula_spiderling_dead"
/// Will differentiate into the "flesh" young spider.
/mob/living/basic/spiderling/hunter/flesh
grow_as = /mob/living/basic/young_spider/hunter/flesh
name = "flesh spiderling"
desc = "Fleshy and red, it looks defenseless. This one has sparkling grey eyes."
icon = 'icons/mob/simple/arachnoid.dmi'
icon_state = "flesh_spiderling"
icon_dead = "flesh_spiderling_dead"
spider_growth_time = 20 SECONDS
@@ -5,149 +5,26 @@
* The basic type is the guard, which is slow but sturdy and outputs good damage.
* All spiders can produce webbing.
*/
/mob/living/basic/young_spider
/mob/living/basic/spider/growing/young
name = "young spider"
desc = "Furry and black, it makes you shudder to look at it. This one has deep red eyes."
icon = 'icons/mob/simple/arachnoid.dmi'
icon_state = "young_guard"
icon_living = "young_guard"
icon_dead = "young_guard_dead"
mob_biotypes = MOB_ORGANIC|MOB_BUG
speak_emote = list("chitters")
butcher_results = list(/obj/item/food/meat/slab/spider = 1)
response_help_continuous = "pets"
response_help_simple = "pet"
response_disarm_continuous = "gently pushes aside"
response_disarm_simple = "gently push aside"
initial_language_holder = /datum/language_holder/spider
speed = 1
maxHealth = 60
health = 60
damage_coeff = list(BRUTE = 1, BURN = 1.25, TOX = 1, CLONE = 1, STAMINA = 1, OXY = 1)
basic_mob_flags = FLAMMABLE_MOB
status_flags = NONE
unsuitable_cold_damage = 4
unsuitable_heat_damage = 4
obj_damage = 10
melee_damage_lower = 8
melee_damage_upper = 12
combat_mode = TRUE
faction = list(FACTION_SPIDER)
pass_flags = PASSTABLE
attack_verb_continuous = "bites"
attack_verb_simple = "bite"
attack_sound = 'sound/weapons/bite.ogg'
attack_vis_effect = ATTACK_EFFECT_BITE
unique_name = TRUE
// VERY red, to fit the eyes
lighting_cutoff_red = 22
lighting_cutoff_green = 5
lighting_cutoff_blue = 5
ai_controller = /datum/ai_controller/basic_controller/young_spider
/// The mob we will grow into.
var/mob/living/basic/giant_spider/grow_as = null
/// Speed modifier to apply if controlled by a human player
var/player_speed_modifier = -1
/// What reagent the mob injects targets with
var/poison_type = /datum/reagent/toxin/hunterspider
/// How much of a reagent the mob injects on attack
var/poison_per_bite = 0
/// Multiplier to apply to web laying speed. Fractional numbers make it faster, because it's a multiplier.
var/web_speed = 1
/// Type of webbing ability to learn.
var/web_type = /datum/action/cooldown/lay_web
/// The message that the mother spider left for this spider when the egg was layed.
var/directive = ""
/// Short description of what this mob is capable of, for radial menu uses
var/menu_description = "Tanky and strong for the defense of the nest and other spiders."
/// If true then you shouldn't be told that you're a spider antagonist as soon as you are placed into this mob
var/apply_spider_antag = TRUE
/// The time it takes for the spider to grow into the next stage
var/spider_growth_time = 1 MINUTES
player_speed_modifier = -1
/mob/living/basic/young_spider/Initialize(mapload)
/mob/living/basic/spider/growing/young/Initialize(mapload)
. = ..()
ADD_TRAIT(src, TRAIT_WEB_SURFER, INNATE_TRAIT)
AddElement(/datum/element/ai_retaliate)
AddElement(/datum/element/ai_flee_while_injured)
AddElement(/datum/element/footstep, FOOTSTEP_MOB_CLAW)
AddElement(/datum/element/nerfed_pulling, GLOB.typecache_general_bad_things_to_easily_move)
AddElement(/datum/element/prevent_attacking_of_types, GLOB.typecache_general_bad_hostile_attack_targets, "this tastes awful!")
AddElement(/datum/element/web_walker, /datum/movespeed_modifier/young_web)
if(poison_per_bite)
AddElement(/datum/element/venomous, poison_type, poison_per_bite)
var/datum/action/cooldown/lay_web/webbing = new web_type(src)
webbing.webbing_time *= web_speed
webbing.Grant(src)
ai_controller.set_blackboard_key(BB_SPIDER_WEB_ACTION, webbing)
AddComponent(\
/datum/component/growth_and_differentiation,\
growth_time = spider_growth_time,\
growth_path = grow_as,\
growth_probability = 25,\
lower_growth_value = 1,\
upper_growth_value = 2,\
optional_checks = CALLBACK(src, PROC_REF(ready_to_grow)),\
optional_grow_behavior = CALLBACK(src, PROC_REF(grow_into_giant_spider))\
)
/mob/living/basic/young_spider/Login()
. = ..()
if(!. || !client)
return FALSE
GLOB.spidermobs[src] = TRUE
add_or_update_variable_movespeed_modifier(/datum/movespeed_modifier/player_spider_modifier, multiplicative_slowdown = player_speed_modifier)
if (apply_spider_antag)
var/datum/antagonist/spider/spider_antag = new(directive)
mind.add_antag_datum(spider_antag)
/mob/living/basic/young_spider/Logout()
. = ..()
remove_movespeed_modifier(/datum/movespeed_modifier/player_spider_modifier)
/mob/living/basic/young_spider/Destroy()
GLOB.spidermobs -= src
return ..()
/mob/living/basic/young_spider/mob_negates_gravity()
if(locate(/obj/structure/spider/stickyweb) in loc)
return TRUE
return ..()
/mob/living/basic/young_spider/expose_reagents(list/reagents, datum/reagents/source, methods=TOUCH, volume_modifier=1, show_message=TRUE)
. = ..()
for(var/datum/reagent/toxin/pestkiller/current_reagent in reagents)
apply_damage(50 * volume_modifier, STAMINA, BODY_ZONE_CHEST)
/// Checks to see if we're ready to grow, primarily if we are on solid ground and not in a vent or something.
/// The component will automagically grow us when we return TRUE and that threshold has been met.
/mob/living/basic/young_spider/proc/ready_to_grow()
if(isturf(loc))
return TRUE
return FALSE
/// Actually grows the young spider into a giant spider. We have to do a bunch of unique behavior that really can't be genericized, so we have to override the component in this manner.
/mob/living/basic/young_spider/proc/grow_into_giant_spider()
if(isnull(grow_as))
if(prob(3))
grow_as = pick(/mob/living/basic/giant_spider/tarantula, /mob/living/basic/giant_spider/viper, /mob/living/basic/giant_spider/midwife)
else
grow_as = pick(/mob/living/basic/giant_spider/guard, /mob/living/basic/giant_spider/ambush, /mob/living/basic/giant_spider/hunter, /mob/living/basic/giant_spider/scout, /mob/living/basic/giant_spider/nurse, /mob/living/basic/giant_spider/tangle)
var/mob/living/basic/giant_spider/grown = change_mob_type(grow_as, get_turf(src), initial(grow_as.name))
ADD_TRAIT(grown, TRAIT_WAS_EVOLVED, REF(src))
grown.faction = faction.Copy()
grown.directive = directive
grown.set_name()
if(getBruteLoss() - 5 > 0)
grown.setBruteLoss(getBruteLoss() - 5)
if(getFireLoss() - 5 > 0)
grown.setFireLoss(getFireLoss() - 5)
qdel(src)
/// Used by all young spiders if they ever appear.
/datum/ai_controller/basic_controller/young_spider
@@ -1,8 +1,8 @@
// This whole file is just a container for the young spider subtypes that actually differentiate into different giant spiders. None of them are particularly special as of now.
/// Will differentiate into the base giant spider (known colloquially as the "guard" spider).
/mob/living/basic/young_spider/guard
grow_as = /mob/living/basic/giant_spider/guard
/mob/living/basic/spider/growing/young/guard
grow_as = /mob/living/basic/spider/giant/guard
name = "young guard spider"
desc = "Furry and brown, it looks defenseless. This one has sparkling red eyes."
maxHealth = 70
@@ -12,8 +12,8 @@
speed = 0.7
/// Will differentiate into the "ambush" giant spider.
/mob/living/basic/young_spider/ambush
grow_as = /mob/living/basic/giant_spider/ambush
/mob/living/basic/spider/growing/young/ambush
grow_as = /mob/living/basic/spider/giant/ambush
name = "young ambush spider"
desc = "Furry and white, it looks defenseless. This one has sparkling pink eyes."
icon = 'icons/mob/simple/arachnoid.dmi'
@@ -25,14 +25,14 @@
melee_damage_upper = 18
speed = 1
/mob/living/basic/young_spider/ambush/Initialize(mapload)
/mob/living/basic/spider/growing/young/ambush/Initialize(mapload)
. = ..()
var/datum/action/cooldown/sneak/spider/sneak_web = new(src)
sneak_web.Grant(src)
/// Will differentiate into the "scout" giant spider.
/mob/living/basic/young_spider/scout
grow_as = /mob/living/basic/giant_spider/scout
/mob/living/basic/spider/growing/young/scout
grow_as = /mob/living/basic/spider/giant/scout
name = "young scout spider"
desc = "Furry and black, it looks defenseless. This one has sparkling blue eyes."
icon = 'icons/mob/simple/arachnoid.dmi'
@@ -47,13 +47,13 @@
poison_type = /datum/reagent/peaceborg/confuse
sight = SEE_SELF|SEE_MOBS
/mob/living/basic/young_spider/scout/Initialize(mapload)
/mob/living/basic/spider/growing/young/scout/Initialize(mapload)
. = ..()
ADD_TRAIT(src, TRAIT_VENTCRAWLER_ALWAYS, INNATE_TRAIT)
/// Will differentiate into the "hunter" giant spider.
/mob/living/basic/young_spider/hunter
grow_as = /mob/living/basic/giant_spider/hunter
/mob/living/basic/spider/growing/young/hunter
grow_as = /mob/living/basic/spider/giant/hunter
name = "young hunter spider"
desc = "Furry and black, it looks defenseless. This one has sparkling purple eyes."
icon = 'icons/mob/simple/arachnoid.dmi'
@@ -67,8 +67,8 @@
poison_per_bite = 2
/// Will differentiate into the "nurse" giant spider.
/mob/living/basic/young_spider/nurse
grow_as = /mob/living/basic/giant_spider/nurse
/mob/living/basic/spider/growing/young/nurse
grow_as = /mob/living/basic/spider/giant/nurse
name = "young nurse spider"
desc = "Furry and black, it looks defenseless. This one has sparkling green eyes."
icon = 'icons/mob/simple/arachnoid.dmi'
@@ -84,7 +84,7 @@
///The health HUD applied to the mob.
var/health_hud = DATA_HUD_MEDICAL_ADVANCED
/mob/living/basic/young_spider/nurse/Initialize(mapload)
/mob/living/basic/spider/growing/young/nurse/Initialize(mapload)
. = ..()
var/datum/atom_hud/datahud = GLOB.huds[health_hud]
datahud.show_to(src)
@@ -93,14 +93,14 @@
heal_brute = 15,\
heal_burn = 15,\
interaction_key = DOAFTER_SOURCE_SPIDER,\
valid_targets_typecache = typecacheof(list(/mob/living/basic/giant_spider)),\
valid_targets_typecache = typecacheof(list(/mob/living/basic/spider/giant)),\
action_text = "%SOURCE% begins wrapping the wounds of %TARGET%.",\
complete_text = "%SOURCE% wraps the wounds of %TARGET%.",\
)
/// Will differentiate into the "tangle" giant spider.
/mob/living/basic/young_spider/tangle
grow_as = /mob/living/basic/giant_spider/tangle
/mob/living/basic/spider/growing/young/tangle
grow_as = /mob/living/basic/spider/giant/tangle
name = "young tangle spider"
desc = "Furry and brown, it looks defenseless. This one has dim brown eyes."
icon = 'icons/mob/simple/arachnoid.dmi'
@@ -116,7 +116,7 @@
poison_per_bite = 2
poison_type = /datum/reagent/toxin/acid
/mob/living/basic/young_spider/tangle/Initialize(mapload)
/mob/living/basic/spider/growing/young/tangle/Initialize(mapload)
. = ..()
AddComponent(/datum/component/healing_touch,\
heal_brute = 10,\
@@ -124,22 +124,22 @@
heal_time = 3 SECONDS,\
self_targetting = HEALING_TOUCH_SELF_ONLY,\
interaction_key = DOAFTER_SOURCE_SPIDER,\
valid_targets_typecache = typecacheof(list(/mob/living/basic/giant_spider/tangle)),\
valid_targets_typecache = typecacheof(list(/mob/living/basic/spider/growing/young/tangle, /mob/living/basic/spider/giant/tangle)),\
extra_checks = CALLBACK(src, PROC_REF(can_mend)),\
action_text = "%SOURCE% begins mending themselves...",\
complete_text = "%SOURCE%'s wounds mend together.",\
)
/// Prevent you from healing other tangle spiders, or healing when on fire
/mob/living/basic/young_spider/tangle/proc/can_mend(mob/living/source, mob/living/target)
/mob/living/basic/spider/growing/young/tangle/proc/can_mend(mob/living/source, mob/living/target)
if (on_fire)
balloon_alert(src, "on fire!")
return FALSE
return TRUE
/// Will differentiate into the "midwife" giant spider.
/mob/living/basic/young_spider/midwife
grow_as = /mob/living/basic/giant_spider/midwife
/mob/living/basic/spider/growing/young/midwife
grow_as = /mob/living/basic/spider/giant/midwife
name = "young broodmother spider"
desc = "Furry and black, it looks defenseless. This one has scintillating green eyes. Might also be hiding a real knife somewhere."
icon = 'icons/mob/simple/arachnoid.dmi'
@@ -154,8 +154,8 @@
web_type = /datum/action/cooldown/lay_web/sealer
/// Will differentiate into the "viper" giant spider.
/mob/living/basic/young_spider/viper
grow_as = /mob/living/basic/giant_spider/viper
/mob/living/basic/spider/growing/young/viper
grow_as = /mob/living/basic/spider/giant/viper
name = "young viper spider"
desc = "Furry and black, it looks defenseless. This one has sparkling magenta eyes."
icon = 'icons/mob/simple/arachnoid.dmi'
@@ -170,8 +170,8 @@
poison_per_bite = 2
/// Will differentiate into the "tarantula" giant spider.
/mob/living/basic/young_spider/tarantula
grow_as = /mob/living/basic/giant_spider/tarantula
/mob/living/basic/spider/growing/young/tarantula
grow_as = /mob/living/basic/spider/giant/tarantula
name = "young tarantula spider"
desc = "Furry and black, it looks defenseless. This one has abyssal red eyes."
icon = 'icons/mob/simple/arachnoid.dmi'
@@ -183,40 +183,3 @@
melee_damage_upper = 25
speed = 1
obj_damage = 40
/// Will differentiate into the "flesh" giant spider.
/mob/living/basic/young_spider/hunter/flesh
grow_as = /mob/living/basic/giant_spider/hunter/flesh
name = "young flesh spider"
desc = "Furry and red, it looks defenseless. This one has sparkling grey eyes."
icon = 'icons/mob/simple/arachnoid.dmi'
icon_state = "young_flesh"
icon_dead = "young_flesh_dead"
maxHealth = 55
health = 55
web_speed = 0.7
spider_growth_time = 30 SECONDS
/mob/living/basic/young_spider/hunter/flesh/Initialize(mapload)
. = ..()
AddComponent(/datum/component/blood_walk, \
blood_type = /obj/effect/decal/cleanable/blood/bubblegum, \
blood_spawn_chance = 3)
// It might be easier and more fitting to just replace this with Regenerator
AddComponent(/datum/component/healing_touch,\
heal_brute = 25,\
heal_burn = 25,\
self_targetting = HEALING_TOUCH_SELF_ONLY,\
interaction_key = DOAFTER_SOURCE_SPIDER,\
valid_targets_typecache = typecacheof(list(/mob/living/basic/giant_spider/hunter/flesh)),\
extra_checks = CALLBACK(src, PROC_REF(can_mend)),\
action_text = "%SOURCE% begins mending themselves...",\
complete_text = "%SOURCE%'s wounds mend together.",\
)
/// Prevent you from healing other flesh spiders, or healing when on fire
/mob/living/basic/young_spider/hunter/flesh/proc/can_mend(mob/living/source, mob/living/target)
if (on_fire)
balloon_alert(src, "on fire!")
return FALSE
return TRUE