Skip to content

Commit

Permalink
[THE HALF-MODULAR PRINCE] Snalance (Snail Balance) and Snissues (Snai…
Browse files Browse the repository at this point in the history
…l Issues) Adjustment (#25439)

* initial d

* holy shit i forgot

* i got so much cheese in my pocket, they thought I was a fucking calzone

* opp was sneak-dissing on the 'gram, turned his city into pompeii

* Just fixing some diffs (line breaks should match tg)

* Fixes these edit comments

---------

Co-authored-by: Giz <13398309+vinylspiders@users.noreply.github.com>
  • Loading branch information
Nerev4r and vinylspiders committed Dec 20, 2023
1 parent 6d65f0c commit 2805c86
Show file tree
Hide file tree
Showing 8 changed files with 206 additions and 91 deletions.
14 changes: 12 additions & 2 deletions code/datums/elements/snail_crawl.dm
Original file line number Diff line number Diff line change
Expand Up @@ -23,14 +23,24 @@

if(snail.resting && !snail.buckled && lubricate(snail))
snail.add_movespeed_modifier(/datum/movespeed_modifier/snail_crawl)
//SKYRAT EDIT ADDITION BEGIN - This is to prevent snails from achieving FTL speeds without gravity, think of it like snails affixing to walls irl.
ADD_TRAIT(snail, TRAIT_NEGATES_GRAVITY, TRAIT_GENERIC)
snail.AddElement(/datum/element/forced_gravity, 0)
if(HAS_TRAIT(snail, TRAIT_SETTLER)) //This is to keep settlers from reaching FTL speeds too.
snail.remove_movespeed_modifier(/datum/movespeed_modifier/snail_crawl)
//SKYRAT EDIT ADDITION END
else
snail.remove_movespeed_modifier(/datum/movespeed_modifier/snail_crawl)
//SKYRAT EDIT ADDITION BEGIN - This clears the forced gravity so they're affected by it while standing.
REMOVE_TRAIT(snail, TRAIT_NEGATES_GRAVITY, TRAIT_GENERIC)
snail.RemoveElement(/datum/element/forced_gravity, 0)
//SKYRAT EDIT ADDITION END

/datum/element/snailcrawl/proc/lubricate(atom/movable/snail)
SIGNAL_HANDLER

var/turf/open/OT = get_turf(snail)
if(istype(OT))
OT.MakeSlippery(TURF_WET_WATER, 1 SECONDS) //SKYRAT EDIT: Roundstart Snails - No more lube
OT.wash(CLEAN_WASH) //SKYRAT EDIT: Roundstart Snails - Snails Keep Clean
OT.MakeSlippery(TURF_WET_WATER, 1 SECONDS) //SKYRAT EDIT CHANGE: Roundstart Snails - No more lube - ORIGINAL: OT.MakeSlippery(TURF_WET_LUBE, 20)
OT.wash(CLEAN_WASH) //SKYRAT EDIT ADDITION: Roundstart Snails - Snails Keep Clean
return TRUE
92 changes: 8 additions & 84 deletions code/modules/mob/living/carbon/human/species_types/snail.dm
Original file line number Diff line number Diff line change
Expand Up @@ -3,21 +3,19 @@
id = SPECIES_SNAIL
inherent_traits = list(
TRAIT_MUTANT_COLORS,
// TRAIT_NO_UNDERWEAR, //SKYRAT EDIT - Snails deserve to wear underwear
// TRAIT_NO_UNDERWEAR, //SKYRAT EDIT REMOVAL - Roundstart Snails - Snails deserve to wear underwear
TRAIT_NO_SLIP_ALL,
TRAIT_WATER_BREATHING, //SKYRAT EDIT - Roundstart Snails
TRAIT_WATER_BREATHING, //SKYRAT EDIT ADDITION - Roundstart Snails - Sea snails exist, and land snails can weather being underwater for almost a day.
)

coldmod = 0.5 //snails only come out when its cold and wet
siemens_coeff = 2 //snails are mostly water
changesource_flags = MIRROR_BADMIN | WABBAJACK | MIRROR_MAGIC | MIRROR_PRIDE | RACE_SWAP
sexes = FALSE //snails are hermaphrodites

eyes_icon = 'modular_skyrat/modules/organs/icons/snail_eyes.dmi' // SKYRAT EDIT - Roundstart Snails
mutanteyes = /obj/item/organ/internal/eyes/snail
mutanttongue = /obj/item/organ/internal/tongue/snail
mutantliver = /obj/item/organ/internal/liver/snail //SKYRAT EDIT - Roundstart Snails
// exotic_blood = /datum/reagent/lube // SKYRAT EDIT REMOVAL: Roundstart Snails - No more lube
exotic_blood = /datum/reagent/lube

bodypart_overrides = list(
BODY_ZONE_HEAD = /obj/item/bodypart/head/snail,
Expand Down Expand Up @@ -50,9 +48,8 @@
if(new_snailperson.dropItemToGround(bag)) //returns TRUE even if its null
new_snailperson.equip_to_slot_or_del(new /obj/item/storage/backpack/snail(new_snailperson), ITEM_SLOT_BACK)
new_snailperson.AddElement(/datum/element/snailcrawl)
new_snailperson.update_icons() //SKYRAT EDIT: Roundstart Snails
//if(ishuman(new_snailperson)) //SKYRAT EDIT: Snails don't have exotic blood here!
// update_mail_goodies(new_snailperson) //SKYRAT EDIT END
if(ishuman(new_snailperson))
update_mail_goodies(new_snailperson)

/datum/species/snail/on_species_loss(mob/living/carbon/former_snailperson, datum/species/new_species, pref_load)
. = ..()
Expand All @@ -63,12 +60,12 @@
former_snailperson.temporarilyRemoveItemFromInventory(bag, TRUE)
qdel(bag)

/*/datum/species/snail/update_quirk_mail_goodies(mob/living/carbon/human/recipient, datum/quirk/quirk, list/mail_goodies = list()) //SKYRAT EDIT: Snails don't have exotic blood here!
/datum/species/snail/update_quirk_mail_goodies(mob/living/carbon/human/recipient, datum/quirk/quirk, list/mail_goodies = list())
if(istype(quirk, /datum/quirk/blooddeficiency))
mail_goodies += list(
/obj/item/reagent_containers/blood/snail
)
return ..()*/ //SKYRAT EDIT END
return ..()

/obj/item/storage/backpack/snail
name = "snail shell"
Expand All @@ -80,81 +77,8 @@
armor_type = /datum/armor/backpack_snail
max_integrity = 200
resistance_flags = FIRE_PROOF | ACID_PROOF
//SKYRAT EDIT BEGIN - Roundstart Snails
slowdown = 6 // The snail's shell is what's making them slow.
alternate_worn_layer = ABOVE_BODY_FRONT_LAYER //This makes them layer over tails like the cult backpack; some tails really shouldn't appear over them!
uses_advanced_reskins = TRUE
unique_reskin = list(
"Conical Shell" = list(
RESKIN_ICON = 'modular_skyrat/master_files/icons/obj/clothing/backpacks.dmi',
RESKIN_ICON_STATE = "coneshell",
RESKIN_WORN_ICON = 'modular_skyrat/master_files/icons/mob/clothing/back.dmi',
RESKIN_WORN_ICON_STATE = "coneshell"
),
"Round Shell" = list(
RESKIN_ICON = 'icons/obj/storage/backpack.dmi',
RESKIN_ICON_STATE = "snailshell",
RESKIN_WORN_ICON = 'icons/mob/clothing/back/backpack.dmi',
RESKIN_WORN_ICON_STATE = "snailshell"
),
"Cinnamon Shell" = list(
RESKIN_ICON = 'modular_skyrat/master_files/icons/obj/clothing/backpacks.dmi',
RESKIN_ICON_STATE = "cinnamonshell",
RESKIN_WORN_ICON = 'modular_skyrat/master_files/icons/mob/clothing/back.dmi',
RESKIN_WORN_ICON_STATE = "cinnamonshell"
),
"Caramel Shell" = list(
RESKIN_ICON = 'modular_skyrat/master_files/icons/obj/clothing/backpacks.dmi',
RESKIN_ICON_STATE = "caramelshell",
RESKIN_WORN_ICON = 'modular_skyrat/master_files/icons/mob/clothing/back.dmi',
RESKIN_WORN_ICON_STATE = "caramelshell"
),
"Metal Shell" = list(
RESKIN_ICON = 'modular_skyrat/master_files/icons/obj/clothing/backpacks.dmi',
RESKIN_ICON_STATE = "mechashell",
RESKIN_WORN_ICON = 'modular_skyrat/master_files/icons/mob/clothing/back.dmi',
RESKIN_WORN_ICON_STATE = "mechashell"
),
"Pyramid Shell" = list(
RESKIN_ICON = 'modular_skyrat/master_files/icons/obj/clothing/backpacks.dmi',
RESKIN_ICON_STATE = "pyramidshell",
RESKIN_WORN_ICON = 'modular_skyrat/master_files/icons/mob/clothing/back.dmi',
RESKIN_WORN_ICON_STATE = "pyramidshell"
),
"Ivory Pyramid Shell" = list(
RESKIN_ICON = 'modular_skyrat/master_files/icons/obj/clothing/backpacks.dmi',
RESKIN_ICON_STATE = "pyramidshellwhite",
RESKIN_WORN_ICON = 'modular_skyrat/master_files/icons/mob/clothing/back.dmi',
RESKIN_WORN_ICON_STATE = "pyramidshellwhite"
),
"Spiral Shell" = list(
RESKIN_ICON = 'modular_skyrat/master_files/icons/obj/clothing/backpacks.dmi',
RESKIN_ICON_STATE = "spiralshell",
RESKIN_WORN_ICON = 'modular_skyrat/master_files/icons/mob/clothing/back.dmi',
RESKIN_WORN_ICON_STATE = "spiralshell"
),
"Ivory Spiral Shell" = list(
RESKIN_ICON = 'modular_skyrat/master_files/icons/obj/clothing/backpacks.dmi',
RESKIN_ICON_STATE = "spiralshellwhite",
RESKIN_WORN_ICON = 'modular_skyrat/master_files/icons/mob/clothing/back.dmi',
RESKIN_WORN_ICON_STATE = "spiralshellwhite"
),
"Rocky Shell" = list(
RESKIN_ICON = 'modular_skyrat/master_files/icons/obj/clothing/backpacks.dmi',
RESKIN_ICON_STATE = "rockshell",
RESKIN_WORN_ICON = 'modular_skyrat/master_files/icons/mob/clothing/back.dmi',
RESKIN_WORN_ICON_STATE = "rockshell"
),
"Ivory Rocky Shell" = list(
RESKIN_ICON = 'modular_skyrat/master_files/icons/obj/clothing/backpacks.dmi',
RESKIN_ICON_STATE = "rockshellwhite",
RESKIN_WORN_ICON = 'modular_skyrat/master_files/icons/mob/clothing/back.dmi',
RESKIN_WORN_ICON_STATE = "rockshellwhite"
),
)
//SKYRAT EDIT END - Roundstart Snails

/datum/armor/backpack_snail
/datum/armor/backpack_snail //SKYRAT COMMENT CLARIFICATION - Roundstart Snails - These armor values don't actually do any protection of the wearer, this is for checking direct damage to the backpack. Damage resistance stuff is in their heart file.
melee = 40
bullet = 30
laser = 30
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,95 @@
#define SHELL_TRANSPARENCY_ALPHA 90

/datum/species/snail
eyes_icon = 'modular_skyrat/modules/organs/icons/snail_eyes.dmi' //This is to consolidate our icons and prevent future calamity.
mutantliver = /obj/item/organ/internal/liver/snail //This is just a better liver to deal with toxins, it's a thematic thing.
mutantheart = /obj/item/organ/internal/heart/snail //This gives them the shell buff where they take less damage from behind, and their heart's more durable.
exotic_blood = null

eyes_icon = 'modular_skyrat/modules/organs/icons/snail_eyes.dmi'

/datum/species/snail/on_species_gain(mob/living/carbon/new_snailperson, datum/species/old_species, pref_load)
. = ..()
new_snailperson.update_icons()

/datum/species/snail/update_quirk_mail_goodies(mob/living/carbon/human/recipient, datum/quirk/quirk, list/mail_goodies = list())
return //This is so that they don't get lube sent in the mail - they don't have exotic blood, so there's no need for it.

/obj/item/storage/backpack/snail
/// Whether or not a bluespace anomaly core has been inserted
var/storage_core = FALSE
obj_flags = IMMUTABLE_SLOW
slowdown = 6 // The snail's shell is what's making them slow.
obj_flags = IMMUTABLE_SLOW //This should hopefully solve other issues involing it as well.
alternate_worn_layer = ABOVE_BODY_FRONT_LAYER //This makes them layer over tails like the cult backpack; some tails really shouldn't appear over them!
uses_advanced_reskins = TRUE
unique_reskin = list(
"Conical Shell" = list(
RESKIN_ICON = 'modular_skyrat/master_files/icons/obj/clothing/backpacks.dmi',
RESKIN_ICON_STATE = "coneshell",
RESKIN_WORN_ICON = 'modular_skyrat/master_files/icons/mob/clothing/back.dmi',
RESKIN_WORN_ICON_STATE = "coneshell"
),
"Round Shell" = list(
RESKIN_ICON = 'icons/obj/storage/backpack.dmi',
RESKIN_ICON_STATE = "snailshell",
RESKIN_WORN_ICON = 'icons/mob/clothing/back/backpack.dmi',
RESKIN_WORN_ICON_STATE = "snailshell"
),
"Cinnamon Shell" = list(
RESKIN_ICON = 'modular_skyrat/master_files/icons/obj/clothing/backpacks.dmi',
RESKIN_ICON_STATE = "cinnamonshell",
RESKIN_WORN_ICON = 'modular_skyrat/master_files/icons/mob/clothing/back.dmi',
RESKIN_WORN_ICON_STATE = "cinnamonshell"
),
"Caramel Shell" = list(
RESKIN_ICON = 'modular_skyrat/master_files/icons/obj/clothing/backpacks.dmi',
RESKIN_ICON_STATE = "caramelshell",
RESKIN_WORN_ICON = 'modular_skyrat/master_files/icons/mob/clothing/back.dmi',
RESKIN_WORN_ICON_STATE = "caramelshell"
),
"Metal Shell" = list(
RESKIN_ICON = 'modular_skyrat/master_files/icons/obj/clothing/backpacks.dmi',
RESKIN_ICON_STATE = "mechashell",
RESKIN_WORN_ICON = 'modular_skyrat/master_files/icons/mob/clothing/back.dmi',
RESKIN_WORN_ICON_STATE = "mechashell"
),
"Pyramid Shell" = list(
RESKIN_ICON = 'modular_skyrat/master_files/icons/obj/clothing/backpacks.dmi',
RESKIN_ICON_STATE = "pyramidshell",
RESKIN_WORN_ICON = 'modular_skyrat/master_files/icons/mob/clothing/back.dmi',
RESKIN_WORN_ICON_STATE = "pyramidshell"
),
"Ivory Pyramid Shell" = list(
RESKIN_ICON = 'modular_skyrat/master_files/icons/obj/clothing/backpacks.dmi',
RESKIN_ICON_STATE = "pyramidshellwhite",
RESKIN_WORN_ICON = 'modular_skyrat/master_files/icons/mob/clothing/back.dmi',
RESKIN_WORN_ICON_STATE = "pyramidshellwhite"
),
"Spiral Shell" = list(
RESKIN_ICON = 'modular_skyrat/master_files/icons/obj/clothing/backpacks.dmi',
RESKIN_ICON_STATE = "spiralshell",
RESKIN_WORN_ICON = 'modular_skyrat/master_files/icons/mob/clothing/back.dmi',
RESKIN_WORN_ICON_STATE = "spiralshell"
),
"Ivory Spiral Shell" = list(
RESKIN_ICON = 'modular_skyrat/master_files/icons/obj/clothing/backpacks.dmi',
RESKIN_ICON_STATE = "spiralshellwhite",
RESKIN_WORN_ICON = 'modular_skyrat/master_files/icons/mob/clothing/back.dmi',
RESKIN_WORN_ICON_STATE = "spiralshellwhite"
),
"Rocky Shell" = list(
RESKIN_ICON = 'modular_skyrat/master_files/icons/obj/clothing/backpacks.dmi',
RESKIN_ICON_STATE = "rockshell",
RESKIN_WORN_ICON = 'modular_skyrat/master_files/icons/mob/clothing/back.dmi',
RESKIN_WORN_ICON_STATE = "rockshell"
),
"Ivory Rocky Shell" = list(
RESKIN_ICON = 'modular_skyrat/master_files/icons/obj/clothing/backpacks.dmi',
RESKIN_ICON_STATE = "rockshellwhite",
RESKIN_WORN_ICON = 'modular_skyrat/master_files/icons/mob/clothing/back.dmi',
RESKIN_WORN_ICON_STATE = "rockshellwhite"
),
)

/obj/item/storage/backpack/snail/Initialize(mapload)
. = ..()
Expand Down Expand Up @@ -52,14 +138,20 @@
SPECIES_PERK_TYPE = SPECIES_POSITIVE_PERK,
SPECIES_PERK_ICON = "home",
SPECIES_PERK_NAME = "Shellback",
SPECIES_PERK_DESC = "Snails have a shell fused to their back. While it doesn't offer any protection, it offers great storage. Alt click to change the sprite!",
SPECIES_PERK_DESC = "Snails have a shell fused to their back. It offers great storage and most importantly gives them 50% brute damage reduction from behind, or while resting. Alt click to change the sprite!",
),
list(
SPECIES_PERK_TYPE = SPECIES_POSITIVE_PERK,
SPECIES_PERK_ICON = "wine-glass",
SPECIES_PERK_NAME = "Poison Resistance",
SPECIES_PERK_DESC = "Snails have a higher tolerance for poison owing to their robust livers.",
),
list(
SPECIES_PERK_TYPE = SPECIES_POSITIVE_PERK,
SPECIES_PERK_ICON = "heart",
SPECIES_PERK_NAME = "Double Hearts",
SPECIES_PERK_DESC = "Snails have two hearts, meaning it'll take more to break theirs.",
),
list(
SPECIES_PERK_TYPE = SPECIES_POSITIVE_PERK,
SPECIES_PERK_ICON = "water",
Expand All @@ -70,13 +162,13 @@
SPECIES_PERK_TYPE = SPECIES_POSITIVE_PERK,
SPECIES_PERK_ICON = "bone",
SPECIES_PERK_NAME = "Boneless",
SPECIES_PERK_DESC = "Snails are invertebrates.",
SPECIES_PERK_DESC = "Snails are invertebrates, meaning they don't take bone wounds, but are easier to delimb.",
),
list(
SPECIES_PERK_TYPE = SPECIES_NEGATIVE_PERK,
SPECIES_PERK_ICON = "crutch",
SPECIES_PERK_NAME = "Sheer Mollusk Speed",
SPECIES_PERK_DESC = "Snails move incredibly slow while standing. They move much faster while crawling.",
SPECIES_PERK_DESC = "Snails move incredibly slow while standing. They move much faster while crawling, and can stick to the floors when the gravity is out.",
),
list(
SPECIES_PERK_TYPE = SPECIES_NEGATIVE_PERK,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,15 @@
id = "snailtongue"
build_path = /obj/item/organ/internal/tongue/snail
category = list(SPECIES_SNAIL, RND_CATEGORY_INITIAL)

/datum/design/liver/snail
name = "Snail Liver"
id = "snailliver"
build_path = /obj/item/organ/internal/liver/snail
category = list(SPECIES_SNAIL, RND_CATEGORY_INITIAL)

/datum/design/heart/snail
name = "Snail Heart"
id = "snailheart"
build_path = /obj/item/organ/internal/heart/snail
category = list(SPECIES_SNAIL, RND_CATEGORY_INITIAL)
Binary file modified modular_skyrat/master_files/icons/obj/surgery.dmi
Binary file not shown.
75 changes: 75 additions & 0 deletions modular_skyrat/modules/organs/code/heart.dm
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
/obj/item/organ/internal/heart/snail
name = "twin gastropod hearts"
desc = "A primary heart normally nestled inside a gastropod's shell, and another in the owner's actual chest; necessary to maintain ample bloodflow through essentially two torsos."
icon = 'modular_skyrat/master_files/icons/obj/surgery.dmi'
icon_state = "heart-snail-on"
base_icon_state = "heart-snail"
maxHealth = 2 * STANDARD_ORGAN_THRESHOLD // There's two of them. Also, due to the special interaction below, it's best we make sure these aren't easily lost.
now_fixed = span_info("Your hearts begin to beat again.") //For the sake of verisimilitude.

COOLDOWN_DECLARE(shell_effect_cd)

/obj/item/organ/internal/heart/snail/on_insert(mob/living/carbon/organ_owner, special)
. = ..()
if(!ishuman(organ_owner))
return

if(!issnail(organ_owner)) //This is cleaner than checking for the shell, because there's not really going to be any non-horribly-bugged situation in which a snail will be lacking a shell.
return

var/mob/living/carbon/human/human_owner = organ_owner

RegisterSignal(human_owner, COMSIG_MOB_APPLY_DAMAGE_MODIFIERS, PROC_REF(modify_damage))
RegisterSignal(human_owner, COMSIG_MOB_AFTER_APPLY_DAMAGE, PROC_REF(do_block_effect))

/obj/item/organ/internal/heart/snail/on_remove(mob/living/carbon/organ_owner, special)
. = ..()
if(!ishuman(organ_owner) || QDELETED(organ_owner))
return

var/mob/living/carbon/human/human_owner = organ_owner

UnregisterSignal(human_owner, list(COMSIG_MOB_APPLY_DAMAGE_MODIFIERS, COMSIG_MOB_AFTER_APPLY_DAMAGE))

/**
* Signal proc for [COMSIG_MOB_APPLY_DAMAGE_MODIFIERS]
*
* Adds a 0.5 modifier to attacks from the back, code borrowed (wholesale) from the roach heart.
*/
/obj/item/organ/internal/heart/snail/proc/modify_damage(mob/living/carbon/human/source, list/damage_mods, damage_amount, damagetype, def_zone, sharpness, attack_direction, obj/item/attacking_item)
SIGNAL_HANDLER

if(!is_blocking(source, damage_amount, damagetype, attack_direction))
return

damage_mods += 0.5

/**
* Signal proc for [COMSIG_MOB_AFTER_APPLY_DAMAGE]
*
* Does a special effect if we blocked damage with our shell.
*/
/obj/item/organ/internal/heart/snail/proc/do_block_effect(mob/living/carbon/human/source, damage_dealt, damagetype, def_zone, blocked, wound_bonus, bare_wound_bonus, sharpness, attack_direction, obj/item/attacking_item)
SIGNAL_HANDLER

if(!is_blocking(source, damage_dealt, damagetype, attack_direction))
return

if(COOLDOWN_FINISHED(src, shell_effect_cd))
source.visible_message(span_warning("[source]'s shell weathers the blow, absorbing most of the shock!"))
playsound(source, 'sound/weapons/parry.ogg', 50, extrarange = SHORT_RANGE_SOUND_EXTRARANGE)

COOLDOWN_START(src, shell_effect_cd, 5 SECONDS) // Cooldown resets EVERY time we get hit

/// Checks if the passed mob is in a valid state to be blocking damage with the snail shell
/obj/item/organ/internal/heart/snail/proc/is_blocking(mob/living/carbon/human/blocker, damage_amount, damagetype, attack_direction)
if(damage_amount < 5 || damagetype != BRUTE || !attack_direction)
return
if(!ishuman(blocker) || blocker.stat >= UNCONSCIOUS)
return FALSE
// No tactical spinning
if(HAS_TRAIT(blocker, TRAIT_SPINNING))
return FALSE
if(blocker.body_position == LYING_DOWN || (blocker.dir & attack_direction))
return TRUE
return FALSE
3 changes: 2 additions & 1 deletion modular_skyrat/modules/organs/code/liver.dm
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
/obj/item/organ/internal/liver/snail
name = "gastropod liver"
icon_state = "liver-x"
icon = 'modular_skyrat/master_files/icons/obj/surgery.dmi'
icon_state = "liver-snail"
desc = "Due to snailfolk evolving in typically poisonous environments such as bogs, their liver has a higher tolerance for poisons compared to most."
maxHealth = 1.5 * STANDARD_ORGAN_THRESHOLD
toxTolerance = 5 //can shrug off up to 5u of toxins
Loading

0 comments on commit 2805c86

Please sign in to comment.