diff --git a/code/modules/mob/living/carbon/xenomorph/strains/castes/boiler/trapper.dm b/code/modules/mob/living/carbon/xenomorph/strains/castes/boiler/trapper.dm index c18973209220..e6c8061bd0fe 100644 --- a/code/modules/mob/living/carbon/xenomorph/strains/castes/boiler/trapper.dm +++ b/code/modules/mob/living/carbon/xenomorph/strains/castes/boiler/trapper.dm @@ -20,7 +20,6 @@ behavior_delegate_type = /datum/behavior_delegate/boiler_trapper /datum/xeno_strain/trapper/apply_strain(mob/living/carbon/xenomorph/boiler/boiler) - . = ..() if(!istype(boiler)) return FALSE @@ -35,7 +34,6 @@ boiler.speed_modifier += XENO_SPEED_SLOWMOD_TIER_5 // compensating for base buffs boiler.recalculate_everything() - return TRUE /datum/behavior_delegate/boiler_trapper name = "Boiler Trapper Behavior Delegate" diff --git a/code/modules/mob/living/carbon/xenomorph/strains/castes/carrier/eggsac.dm b/code/modules/mob/living/carbon/xenomorph/strains/castes/carrier/eggsac.dm index f1ba672d63e5..97d6770be33c 100644 --- a/code/modules/mob/living/carbon/xenomorph/strains/castes/carrier/eggsac.dm +++ b/code/modules/mob/living/carbon/xenomorph/strains/castes/carrier/eggsac.dm @@ -17,7 +17,6 @@ behavior_delegate_type = /datum/behavior_delegate/carrier_eggsac /datum/xeno_strain/eggsac/apply_strain(mob/living/carbon/xenomorph/carrier/carrier) - . = ..() carrier.plasma_types = list(PLASMA_EGG) carrier.phero_modifier += XENO_PHERO_MOD_LARGE // praetorian level pheremones @@ -32,7 +31,6 @@ carrier.eggs_max = 12 carrier.egg_planting_range = 2 carrier.update_eggsac_overlays() - return TRUE #define EGGSAC_OFF_WEED_EGGCAP 4 #define EGGSAC_EGG_SUSTAIN_DISTANCE 14 diff --git a/code/modules/mob/living/carbon/xenomorph/strains/castes/crusher/charger.dm b/code/modules/mob/living/carbon/xenomorph/strains/castes/crusher/charger.dm index f2dd564cb2ee..84877b43571e 100644 --- a/code/modules/mob/living/carbon/xenomorph/strains/castes/crusher/charger.dm +++ b/code/modules/mob/living/carbon/xenomorph/strains/castes/crusher/charger.dm @@ -32,8 +32,6 @@ behavior_delegate_type = /datum/behavior_delegate/crusher_charger /datum/xeno_strain/charger/apply_strain(mob/living/carbon/xenomorph/crusher/crusher) - . = ..() - crusher.small_explosives_stun = FALSE crusher.health_modifier += XENO_HEALTH_MOD_LARGE crusher.speed_modifier += XENO_SPEED_FASTMOD_TIER_3 @@ -42,7 +40,6 @@ crusher.ignore_aura = "frenzy" // no funny crushers going 7 morbillion kilometers per second crusher.phero_modifier = -crusher.caste.aura_strength crusher.recalculate_everything() - return TRUE /datum/behavior_delegate/crusher_charger name = "Charger Crusher Behavior Delegate" diff --git a/code/modules/mob/living/carbon/xenomorph/strains/castes/defender/steel_crest.dm b/code/modules/mob/living/carbon/xenomorph/strains/castes/defender/steel_crest.dm index 891c1ce08e1e..1560387c218b 100644 --- a/code/modules/mob/living/carbon/xenomorph/strains/castes/defender/steel_crest.dm +++ b/code/modules/mob/living/carbon/xenomorph/strains/castes/defender/steel_crest.dm @@ -18,8 +18,6 @@ behavior_delegate_type = /datum/behavior_delegate/defender_steel_crest /datum/xeno_strain/steel_crest/apply_strain(mob/living/carbon/xenomorph/defender/defender) - . = ..() - defender.damage_modifier -= XENO_DAMAGE_MOD_VERY_SMALL if(defender.fortify) defender.ability_speed_modifier += 2.5 diff --git a/code/modules/mob/living/carbon/xenomorph/strains/castes/drone/gardener.dm b/code/modules/mob/living/carbon/xenomorph/strains/castes/drone/gardener.dm index 456768cdd25a..88a6cb50148b 100644 --- a/code/modules/mob/living/carbon/xenomorph/strains/castes/drone/gardener.dm +++ b/code/modules/mob/living/carbon/xenomorph/strains/castes/drone/gardener.dm @@ -19,8 +19,6 @@ behavior_delegate_type = /datum/behavior_delegate/drone_gardener /datum/xeno_strain/gardener/apply_strain(mob/living/carbon/xenomorph/drone/drone) - . = ..() - drone.available_fruits = list( /obj/effect/alien/resin/fruit/greater, /obj/effect/alien/resin/fruit/unstable, diff --git a/code/modules/mob/living/carbon/xenomorph/strains/castes/drone/healer.dm b/code/modules/mob/living/carbon/xenomorph/strains/castes/drone/healer.dm index bca247899428..6a985eb8d7ec 100644 --- a/code/modules/mob/living/carbon/xenomorph/strains/castes/drone/healer.dm +++ b/code/modules/mob/living/carbon/xenomorph/strains/castes/drone/healer.dm @@ -22,8 +22,6 @@ behavior_delegate_type = /datum/behavior_delegate/drone_healer /datum/xeno_strain/healer/apply_strain(mob/living/carbon/xenomorph/drone/drone) - . = ..() - drone.phero_modifier += XENO_PHERO_MOD_LARGE drone.plasma_types += PLASMA_PHEROMONE drone.damage_modifier -= XENO_DAMAGE_MOD_VERY_SMALL diff --git a/code/modules/mob/living/carbon/xenomorph/strains/castes/facehugger/watcher.dm b/code/modules/mob/living/carbon/xenomorph/strains/castes/facehugger/watcher.dm index c5d9986c7b6a..7fba30b6f352 100644 --- a/code/modules/mob/living/carbon/xenomorph/strains/castes/facehugger/watcher.dm +++ b/code/modules/mob/living/carbon/xenomorph/strains/castes/facehugger/watcher.dm @@ -13,11 +13,8 @@ behavior_delegate_type = /datum/behavior_delegate/facehugger_watcher /datum/xeno_strain/watcher/apply_strain(mob/living/carbon/xenomorph/facehugger/huggy) - . = ..() - huggy.viewsize = 10 huggy.layer = initial(huggy.layer) - return TRUE // This has no special effects, it's just here to skip `/datum/behavior_delegate/facehugger_base/on_life()`. /datum/behavior_delegate/facehugger_watcher diff --git a/code/modules/mob/living/carbon/xenomorph/strains/castes/hivelord/resin_whisperer.dm b/code/modules/mob/living/carbon/xenomorph/strains/castes/hivelord/resin_whisperer.dm index 2b3e790ab21b..cca2210a30b4 100644 --- a/code/modules/mob/living/carbon/xenomorph/strains/castes/hivelord/resin_whisperer.dm +++ b/code/modules/mob/living/carbon/xenomorph/strains/castes/hivelord/resin_whisperer.dm @@ -17,8 +17,6 @@ ) /datum/xeno_strain/resin_whisperer/apply_strain(mob/living/carbon/xenomorph/hivelord/hivelord) - . = ..() - hivelord.plasmapool_modifier = 0.8 // -20% plasma pool hivelord.extra_build_dist = 12 // 1 + 12 = 13 tile build range hivelord.can_stack_builds = TRUE diff --git a/code/modules/mob/living/carbon/xenomorph/strains/castes/lurker/vampire.dm b/code/modules/mob/living/carbon/xenomorph/strains/castes/lurker/vampire.dm index 4beec851c420..1f220a02dd79 100644 --- a/code/modules/mob/living/carbon/xenomorph/strains/castes/lurker/vampire.dm +++ b/code/modules/mob/living/carbon/xenomorph/strains/castes/lurker/vampire.dm @@ -16,8 +16,6 @@ ) /datum/xeno_strain/vampire/apply_strain(mob/living/carbon/xenomorph/lurker/lurker) - . = ..() - lurker.plasmapool_modifier = 0 lurker.health_modifier -= XENO_HEALTH_MOD_MED lurker.speed_modifier += XENO_SPEED_FASTMOD_TIER_1 diff --git a/code/modules/mob/living/carbon/xenomorph/strains/castes/praetorian/dancer.dm b/code/modules/mob/living/carbon/xenomorph/strains/castes/praetorian/dancer.dm index 2d6d7bb7b15d..ef2eb377d01e 100644 --- a/code/modules/mob/living/carbon/xenomorph/strains/castes/praetorian/dancer.dm +++ b/code/modules/mob/living/carbon/xenomorph/strains/castes/praetorian/dancer.dm @@ -20,8 +20,6 @@ behavior_delegate_type = /datum/behavior_delegate/praetorian_dancer /datum/xeno_strain/dancer/apply_strain(mob/living/carbon/xenomorph/praetorian/prae) - . = ..() - prae.armor_modifier -= XENO_ARMOR_MOD_VERY_SMALL prae.speed_modifier += XENO_SPEED_FASTMOD_TIER_5 prae.plasma_types = list(PLASMA_CATECHOLAMINE) diff --git a/code/modules/mob/living/carbon/xenomorph/strains/castes/praetorian/oppressor.dm b/code/modules/mob/living/carbon/xenomorph/strains/castes/praetorian/oppressor.dm index 6d3d50c1d12d..74dc1b9d6ecd 100644 --- a/code/modules/mob/living/carbon/xenomorph/strains/castes/praetorian/oppressor.dm +++ b/code/modules/mob/living/carbon/xenomorph/strains/castes/praetorian/oppressor.dm @@ -23,8 +23,6 @@ behavior_delegate_type = /datum/behavior_delegate/oppressor_praetorian /datum/xeno_strain/oppressor/apply_strain(mob/living/carbon/xenomorph/praetorian/prae) - . = ..() - prae.damage_modifier -= XENO_DAMAGE_MOD_SMALL prae.explosivearmor_modifier += XENO_EXPOSIVEARMOR_MOD_SMALL prae.small_explosives_stun = FALSE diff --git a/code/modules/mob/living/carbon/xenomorph/strains/castes/praetorian/vanguard.dm b/code/modules/mob/living/carbon/xenomorph/strains/castes/praetorian/vanguard.dm index b8baef5e518f..a5d4b757cf6d 100644 --- a/code/modules/mob/living/carbon/xenomorph/strains/castes/praetorian/vanguard.dm +++ b/code/modules/mob/living/carbon/xenomorph/strains/castes/praetorian/vanguard.dm @@ -21,8 +21,6 @@ behavior_delegate_type = /datum/behavior_delegate/praetorian_vanguard /datum/xeno_strain/vanguard/apply_strain(mob/living/carbon/xenomorph/praetorian/prae) - . = ..() - prae.speed_modifier += XENO_SPEED_FASTMOD_TIER_3 prae.health_modifier -= XENO_HEALTH_MOD_MED prae.claw_type = CLAW_TYPE_SHARP diff --git a/code/modules/mob/living/carbon/xenomorph/strains/castes/praetorian/warden.dm b/code/modules/mob/living/carbon/xenomorph/strains/castes/praetorian/warden.dm index 3cb42e59e175..56dfca99a732 100644 --- a/code/modules/mob/living/carbon/xenomorph/strains/castes/praetorian/warden.dm +++ b/code/modules/mob/living/carbon/xenomorph/strains/castes/praetorian/warden.dm @@ -21,8 +21,6 @@ behavior_delegate_type = /datum/behavior_delegate/praetorian_warden /datum/xeno_strain/warden/apply_strain(mob/living/carbon/xenomorph/praetorian/prae) - . = ..() - // Make a 'halftank' prae.speed_modifier += XENO_SPEED_SLOWMOD_TIER_5 prae.damage_modifier -= XENO_DAMAGE_MOD_SMALL diff --git a/code/modules/mob/living/carbon/xenomorph/strains/castes/ravager/berserker.dm b/code/modules/mob/living/carbon/xenomorph/strains/castes/ravager/berserker.dm index 80261d295ab6..7b912cc620a0 100644 --- a/code/modules/mob/living/carbon/xenomorph/strains/castes/ravager/berserker.dm +++ b/code/modules/mob/living/carbon/xenomorph/strains/castes/ravager/berserker.dm @@ -17,8 +17,6 @@ behavior_delegate_type = /datum/behavior_delegate/ravager_berserker /datum/xeno_strain/berserker/apply_strain(mob/living/carbon/xenomorph/ravager/ravager) - . = ..() - ravager.plasma_max = 0 ravager.health_modifier -= XENO_HEALTH_MOD_MED ravager.armor_modifier += XENO_ARMOR_MOD_VERY_SMALL diff --git a/code/modules/mob/living/carbon/xenomorph/strains/castes/ravager/hedgehog.dm b/code/modules/mob/living/carbon/xenomorph/strains/castes/ravager/hedgehog.dm index 75a85ca3e72e..4e452fb1a18a 100644 --- a/code/modules/mob/living/carbon/xenomorph/strains/castes/ravager/hedgehog.dm +++ b/code/modules/mob/living/carbon/xenomorph/strains/castes/ravager/hedgehog.dm @@ -17,8 +17,6 @@ behavior_delegate_type = /datum/behavior_delegate/ravager_hedgehog /datum/xeno_strain/hedgehog/apply_strain(mob/living/carbon/xenomorph/ravager/ravager) - . = ..() - ravager.plasma_max = 0 ravager.small_explosives_stun = FALSE ravager.explosivearmor_modifier += XENO_EXPOSIVEARMOR_MOD_SMALL diff --git a/code/modules/mob/living/carbon/xenomorph/strains/castes/runner/acid.dm b/code/modules/mob/living/carbon/xenomorph/strains/castes/runner/acid.dm index d768ad61ce2d..8f2ce0ef7150 100644 --- a/code/modules/mob/living/carbon/xenomorph/strains/castes/runner/acid.dm +++ b/code/modules/mob/living/carbon/xenomorph/strains/castes/runner/acid.dm @@ -17,15 +17,12 @@ behavior_delegate_type = /datum/behavior_delegate/runner_acider /datum/xeno_strain/acider/apply_strain(mob/living/carbon/xenomorph/runner/runner) - . = ..() - runner.speed_modifier += XENO_SPEED_SLOWMOD_TIER_5 runner.armor_modifier += XENO_ARMOR_MOD_MED runner.health_modifier += XENO_HEALTH_MOD_ACIDER runner.recalculate_everything() - /datum/behavior_delegate/runner_acider var/acid_amount = 0 diff --git a/code/modules/mob/living/carbon/xenomorph/strains/xeno_strain.dm b/code/modules/mob/living/carbon/xenomorph/strains/xeno_strain.dm index 0098f61b1e29..586bf95aec7b 100644 --- a/code/modules/mob/living/carbon/xenomorph/strains/xeno_strain.dm +++ b/code/modules/mob/living/carbon/xenomorph/strains/xeno_strain.dm @@ -21,11 +21,11 @@ * * Returns a bool indicating if the strain was successfully applied. */ -/datum/xeno_strain/proc/apply_strain(mob/living/carbon/xenomorph/xeno) - SHOULD_CALL_PARENT(TRUE) +/datum/xeno_strain/proc/_add_to_xeno(mob/living/carbon/xenomorph/xeno) + // Override `apply_changes()`, not this! (Unless you know what you're doing.) + SHOULD_NOT_OVERRIDE(TRUE) xeno.strain = src - register_signals(xeno) // Update the xeno's actions. for(var/action_path in actions_to_remove) @@ -41,17 +41,24 @@ xeno.behavior_delegate.bound_xeno = xeno xeno.behavior_delegate.add_to_xeno() + apply_strain() + xeno.update_icons() xeno.hive.hive_ui.update_xeno_info() - // Give them all the info about the strain. + // Give them all of the info about the strain. to_chat(xeno, SPAN_XENOANNOUNCE(description)) if(flavor_description) to_chat(xeno, SPAN_XENOLEADER(flavor_description)) return TRUE -/// TODO: documentation -/datum/xeno_strain/proc/register_signals(mob/living/carbon/xenomorph/xeno) +/** + * Adds any special modifiers/changes from this strain to `xeno`. + * + * Called when the strain is first added to the player. + */ +/datum/xeno_strain/proc/apply_strain(mob/living/carbon/xenomorph/xeno) + // Override with custom behaviour. return @@ -85,7 +92,7 @@ // Create the strain datum and apply it to the xeno. var/datum/xeno_strain/strain_instance = new chosen_strain() - if(strain_instance.apply_strain(src)) + if(strain_instance._add_to_xeno(src)) xeno_jitter(1.5 SECONDS) // If it applied successfully, add it to the logs. log_strain("[name] purchased strain '[strain_instance.type]'")