diff --git a/code/__DEFINES/~doppler_defines/is_helpers.dm b/code/__DEFINES/~doppler_defines/is_helpers.dm index f9c1c52531c29..02e0c61088246 100644 --- a/code/__DEFINES/~doppler_defines/is_helpers.dm +++ b/code/__DEFINES/~doppler_defines/is_helpers.dm @@ -3,5 +3,6 @@ //Customization bases #define isfeline(A) (isfelinid(A) || HAS_TRAIT(A, TRAIT_FELINE)) #define isinsectoid(A) (is_species(A, /datum/species/insectoid)) +#define issnail(A) (is_species(A, /datum/species/snail)) //Species with green blood #define hasgreenblood(A) (isinsectoid(A) || HAS_TRAIT(A, TRAIT_GREEN_BLOOD)) diff --git a/code/__DEFINES/~doppler_defines/mobs.dm b/code/__DEFINES/~doppler_defines/mobs.dm new file mode 100644 index 0000000000000..9e06c02bb5eaa --- /dev/null +++ b/code/__DEFINES/~doppler_defines/mobs.dm @@ -0,0 +1 @@ +#define BODYPART_ICON_SNAIL 'modular_doppler/modular_species/species_types/snails/icons/bodyparts/snail_bodyparts.dmi' diff --git a/code/datums/elements/lube_walking.dm b/code/datums/elements/lube_walking.dm index 8ab6b2b760285..816f0702a20a3 100644 --- a/code/datums/elements/lube_walking.dm +++ b/code/datums/elements/lube_walking.dm @@ -47,9 +47,19 @@ if(new_resting && lubricate(snail)) snail.add_movespeed_modifier(/datum/movespeed_modifier/snail_crawl) RegisterSignal(snail, COMSIG_MOVABLE_MOVED, PROC_REF(lubricate)) + //DOPPLER 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) + //DOPPLER EDIT ADDITION END else snail.remove_movespeed_modifier(/datum/movespeed_modifier/snail_crawl) UnregisterSignal(snail, COMSIG_MOVABLE_MOVED) + //DOPPLER 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) + //DOPPLER EDIT ADDITION END /datum/element/lube_walking/proc/lubricate(atom/movable/snail) SIGNAL_HANDLER @@ -57,5 +67,6 @@ var/turf/open/turf_standing_on = get_turf(snail) if(!istype(turf_standing_on)) return FALSE - turf_standing_on.MakeSlippery(wet_flags, min_wet_time = min_time_wet_for) + turf_standing_on.MakeSlippery(TURF_WET_WATER, min_wet_time = 1 SECONDS) //DOPPLER EDIT CHANGE: Roundstart Snails - No more lube - ORIGINAL: turf_standing_on.MakeSlippery(wet_flags, min_wet_time = min_time_wet_for) + turf_standing_on.wash(CLEAN_WASH) //DOPPLER EDIT ADDITION: Roundstart Snails - Snails Keep Clean return TRUE diff --git a/code/modules/surgery/organs/internal/eyes/_eyes.dm b/code/modules/surgery/organs/internal/eyes/_eyes.dm index 8ccfc8b72f61d..3cfb06031cfc3 100644 --- a/code/modules/surgery/organs/internal/eyes/_eyes.dm +++ b/code/modules/surgery/organs/internal/eyes/_eyes.dm @@ -134,14 +134,14 @@ var/eye_icon = my_head?.eyes_icon || 'icons/mob/human/human_face.dmi' /// DOPPLER SHIFT ADDITION END - var/mutable_appearance/eye_left = mutable_appearance(eye_icon, "[eye_icon_state]_l", -BODY_LAYER) /// DOPPLER SHIFT EDIT: using eye_icon instead of human_face.dmi - var/mutable_appearance/eye_right = mutable_appearance(eye_icon, "[eye_icon_state]_r", -BODY_LAYER) /// DOPPLER SHIFT EDIT: using eye_icon instead of human_face.dmi + var/mutable_appearance/eye_left = mutable_appearance(eye_icon, "[eye_icon_state]_l", -eyes_layer) /// DOPPLER SHIFT EDIT: using eye_icon instead of human_face.dmi, eyes_layer instead of BODY_LAYER + var/mutable_appearance/eye_right = mutable_appearance(eye_icon, "[eye_icon_state]_r", -eyes_layer) /// DOPPLER SHIFT EDIT: using eye_icon instead of human_face.dmi, eyes_layer instead of BODY_LAYER var/list/overlays = list(eye_left, eye_right) var/obscured = parent.check_obscured_slots(TRUE) if(overlay_ignore_lighting && !(obscured & ITEM_SLOT_EYES)) - overlays += emissive_appearance(eye_left.icon, eye_left.icon_state, parent, -BODY_LAYER, alpha = eye_left.alpha) - overlays += emissive_appearance(eye_right.icon, eye_right.icon_state, parent, -BODY_LAYER, alpha = eye_right.alpha) + overlays += emissive_appearance(eye_left.icon, eye_left.icon_state, parent, -eyes_layer, alpha = eye_left.alpha) //DOPPLER SHIFT EDIT : using eyes_layer instead of BODY_LAYER + overlays += emissive_appearance(eye_right.icon, eye_right.icon_state, parent, -eyes_layer, alpha = eye_right.alpha) //DOPPLER SHIFT EDIT : using eyes_layer instead of BODY_LAYER //var/obj/item/bodypart/head/my_head = parent.get_bodypart(BODY_ZONE_HEAD) /// DOPPLER SHIFT REMOVAL if(my_head) if(my_head.head_flags & HEAD_EYECOLOR) @@ -719,6 +719,7 @@ desc = "These eyes seem to have a large range, but might be cumbersome with glasses." eye_icon_state = "snail_eyes" icon_state = "snail_eyeballs" + eyes_layer = ABOVE_BODY_FRONT_HEAD_LAYER // DOPPLER EDIT - Roundstart Snails /obj/item/organ/internal/eyes/jelly name = "jelly eyes" diff --git a/code/modules/surgery/organs/internal/tongue/_tongue.dm b/code/modules/surgery/organs/internal/tongue/_tongue.dm index 54ea59eea6169..786f93263268b 100644 --- a/code/modules/surgery/organs/internal/tongue/_tongue.dm +++ b/code/modules/surgery/organs/internal/tongue/_tongue.dm @@ -562,7 +562,10 @@ GLOBAL_LIST_INIT(english_to_zombie, list()) color = "#96DB00" // TODO proper sprite, rather than recoloured pink tongue modifies_speech = TRUE voice_filter = "atempo=0.5" // makes them talk really slow + liked_foodtypes = VEGETABLES | FRUIT | GROSS | RAW //DOPPLER EDIT - Roundstart Snails - Food Prefs + disliked_foodtypes = DAIRY | ORANGES | SUGAR //DOPPLER EDIT: Roundstart Snails - As it turns out, you can't give a snail processed sugar or citrus. +/* DOPPLER EDIT START - Roundstart Snails: Less annoying speech. /obj/item/organ/internal/tongue/snail/modify_speech(datum/source, list/speech_args) var/new_message var/message = speech_args[SPEECH_MESSAGE] @@ -572,6 +575,7 @@ GLOBAL_LIST_INIT(english_to_zombie, list()) else new_message += message[i] speech_args[SPEECH_MESSAGE] = new_message +*/ // DOPPLER EDIT END /obj/item/organ/internal/tongue/ethereal name = "electric discharger" diff --git a/code/modules/unit_tests/screenshots/screenshot_humanoids__datum_species_snail.png b/code/modules/unit_tests/screenshots/screenshot_humanoids__datum_species_snail.png index 11a4cdbf2ddac..2a080e4e19776 100644 Binary files a/code/modules/unit_tests/screenshots/screenshot_humanoids__datum_species_snail.png and b/code/modules/unit_tests/screenshots/screenshot_humanoids__datum_species_snail.png differ diff --git a/config/game_options.txt b/config/game_options.txt index e00897226aa05..3f7581c325413 100644 --- a/config/game_options.txt +++ b/config/game_options.txt @@ -374,7 +374,7 @@ ROUNDSTART_RACES primitive_felinid ROUNDSTART_RACES ethereal #ROUNDSTART_RACES jelly #ROUNDSTART_RACES abductor -#ROUNDSTART_RACES snail +ROUNDSTART_RACES snail ## Races that are straight upgrades. If these are on expect powergamers to always pick them #ROUNDSTART_RACES skeleton diff --git a/modular_doppler/modular_customization/organs/internal/eyes.dm b/modular_doppler/modular_customization/organs/internal/eyes.dm new file mode 100644 index 0000000000000..a60cfa0f8a238 --- /dev/null +++ b/modular_doppler/modular_customization/organs/internal/eyes.dm @@ -0,0 +1,2 @@ +/obj/item/organ/internal/eyes + var/eyes_layer = BODY_LAYER diff --git a/modular_doppler/modular_species/species_types/snails/icons/bodyparts/snail_bodyparts.dmi b/modular_doppler/modular_species/species_types/snails/icons/bodyparts/snail_bodyparts.dmi new file mode 100644 index 0000000000000..0b57859dca4ec Binary files /dev/null and b/modular_doppler/modular_species/species_types/snails/icons/bodyparts/snail_bodyparts.dmi differ diff --git a/modular_doppler/modular_species/species_types/snails/icons/organs/snail_eyes.dmi b/modular_doppler/modular_species/species_types/snails/icons/organs/snail_eyes.dmi new file mode 100644 index 0000000000000..aae11d7d5c9a0 Binary files /dev/null and b/modular_doppler/modular_species/species_types/snails/icons/organs/snail_eyes.dmi differ diff --git a/modular_doppler/modular_species/species_types/snails/icons/organs/snail_heart.dmi b/modular_doppler/modular_species/species_types/snails/icons/organs/snail_heart.dmi new file mode 100644 index 0000000000000..02f45e9f48676 Binary files /dev/null and b/modular_doppler/modular_species/species_types/snails/icons/organs/snail_heart.dmi differ diff --git a/modular_doppler/modular_species/species_types/snails/icons/organs/snail_liver.dmi b/modular_doppler/modular_species/species_types/snails/icons/organs/snail_liver.dmi new file mode 100644 index 0000000000000..ac2034b5ba5a3 Binary files /dev/null and b/modular_doppler/modular_species/species_types/snails/icons/organs/snail_liver.dmi differ diff --git a/modular_doppler/modular_species/species_types/snails/icons/shell/shell_mob.dmi b/modular_doppler/modular_species/species_types/snails/icons/shell/shell_mob.dmi new file mode 100644 index 0000000000000..27efa628b541c Binary files /dev/null and b/modular_doppler/modular_species/species_types/snails/icons/shell/shell_mob.dmi differ diff --git a/modular_doppler/modular_species/species_types/snails/icons/shell/shell_obj.dmi b/modular_doppler/modular_species/species_types/snails/icons/shell/shell_obj.dmi new file mode 100644 index 0000000000000..4b163939a6dd5 Binary files /dev/null and b/modular_doppler/modular_species/species_types/snails/icons/shell/shell_obj.dmi differ diff --git a/modular_doppler/modular_species/species_types/snails/modular_snail.dm b/modular_doppler/modular_species/species_types/snails/modular_snail.dm new file mode 100644 index 0000000000000..1e86caea374dc --- /dev/null +++ b/modular_doppler/modular_species/species_types/snails/modular_snail.dm @@ -0,0 +1,190 @@ +#define SHELL_TRANSPARENCY_ALPHA 90 + +/datum/species/snail + 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 + +/datum/species/snail/on_species_gain(mob/living/carbon/new_snailperson, datum/species/old_species, pref_load) + . = ..() + new_snailperson.update_icons() + +/obj/item/storage/backpack/snail + /// Whether or not a bluespace anomaly core has been inserted + var/storage_core = FALSE + 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_doppler/modular_species/species_types/snails/icons/shell/shell_obj.dmi', + RESKIN_ICON_STATE = "coneshell", + RESKIN_WORN_ICON = 'modular_doppler/modular_species/species_types/snails/icons/shell/shell_mob.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_doppler/modular_species/species_types/snails/icons/shell/shell_obj.dmi', + RESKIN_ICON_STATE = "cinnamonshell", + RESKIN_WORN_ICON = 'modular_doppler/modular_species/species_types/snails/icons/shell/shell_mob.dmi', + RESKIN_WORN_ICON_STATE = "cinnamonshell" + ), + "Caramel Shell" = list( + RESKIN_ICON = 'modular_doppler/modular_species/species_types/snails/icons/shell/shell_obj.dmi', + RESKIN_ICON_STATE = "caramelshell", + RESKIN_WORN_ICON = 'modular_doppler/modular_species/species_types/snails/icons/shell/shell_mob.dmi', + RESKIN_WORN_ICON_STATE = "caramelshell" + ), + "Metal Shell" = list( + RESKIN_ICON = 'modular_doppler/modular_species/species_types/snails/icons/shell/shell_obj.dmi', + RESKIN_ICON_STATE = "mechashell", + RESKIN_WORN_ICON = 'modular_doppler/modular_species/species_types/snails/icons/shell/shell_mob.dmi', + RESKIN_WORN_ICON_STATE = "mechashell" + ), + "Pyramid Shell" = list( + RESKIN_ICON = 'modular_doppler/modular_species/species_types/snails/icons/shell/shell_obj.dmi', + RESKIN_ICON_STATE = "pyramidshell", + RESKIN_WORN_ICON = 'modular_doppler/modular_species/species_types/snails/icons/shell/shell_mob.dmi', + RESKIN_WORN_ICON_STATE = "pyramidshell" + ), + "Ivory Pyramid Shell" = list( + RESKIN_ICON = 'modular_doppler/modular_species/species_types/snails/icons/shell/shell_obj.dmi', + RESKIN_ICON_STATE = "pyramidshellwhite", + RESKIN_WORN_ICON = 'modular_doppler/modular_species/species_types/snails/icons/shell/shell_mob.dmi', + RESKIN_WORN_ICON_STATE = "pyramidshellwhite" + ), + "Spiral Shell" = list( + RESKIN_ICON = 'modular_doppler/modular_species/species_types/snails/icons/shell/shell_obj.dmi', + RESKIN_ICON_STATE = "spiralshell", + RESKIN_WORN_ICON = 'modular_doppler/modular_species/species_types/snails/icons/shell/shell_mob.dmi', + RESKIN_WORN_ICON_STATE = "spiralshell" + ), + "Ivory Spiral Shell" = list( + RESKIN_ICON = 'modular_doppler/modular_species/species_types/snails/icons/shell/shell_obj.dmi', + RESKIN_ICON_STATE = "spiralshellwhite", + RESKIN_WORN_ICON = 'modular_doppler/modular_species/species_types/snails/icons/shell/shell_mob.dmi', + RESKIN_WORN_ICON_STATE = "spiralshellwhite" + ), + "Rocky Shell" = list( + RESKIN_ICON = 'modular_doppler/modular_species/species_types/snails/icons/shell/shell_obj.dmi', + RESKIN_ICON_STATE = "rockshell", + RESKIN_WORN_ICON = 'modular_doppler/modular_species/species_types/snails/icons/shell/shell_mob.dmi', + RESKIN_WORN_ICON_STATE = "rockshell" + ), + "Ivory Rocky Shell" = list( + RESKIN_ICON = 'modular_doppler/modular_species/species_types/snails/icons/shell/shell_obj.dmi', + RESKIN_ICON_STATE = "rockshellwhite", + RESKIN_WORN_ICON = 'modular_doppler/modular_species/species_types/snails/icons/shell/shell_mob.dmi', + RESKIN_WORN_ICON_STATE = "rockshellwhite" + ), + ) + +/obj/item/storage/backpack/snail/Initialize(mapload) + . = ..() + atom_storage.max_total_storage = 30 + +/obj/item/storage/backpack/snail/build_worn_icon( + default_layer = 0, + default_icon_file = null, + isinhands = FALSE, + female_uniform = NO_FEMALE_UNIFORM, + override_state = null, + override_file = null, + mutant_styles = NONE, + humie = null, +) + + var/mutable_appearance/standing = ..() + if(storage_core == TRUE) + standing.add_filter("bluespace_shell", 2, list("type" = "outline", "color" = COLOR_BLUE_LIGHT, "alpha" = SHELL_TRANSPARENCY_ALPHA, "size" = 1)) + return standing + +/obj/item/storage/backpack/snail/item_interaction(mob/living/user, obj/item/tool, list/modifiers) + if(storage_core || !istype(tool, /obj/item/assembly/signaler/anomaly/bluespace)) + return NONE + + qdel(tool) + upgrade_to_bluespace(user) + to_chat(user, span_notice("You insert [tool] into your shell, and it starts to glow blue with expanded storage potential!")) + return ITEM_INTERACT_SUCCESS + +/// Upgrades the storage capacity of the snail shell and gives it a glowy blue outline +/obj/item/storage/backpack/snail/proc/upgrade_to_bluespace(mob/living/wearer) + add_filter("bluespace_shell", 2, list("type" = "outline", "color" = COLOR_BLUE_LIGHT, "size" = 1)) + playsound(src, 'sound/machines/click.ogg', 50, TRUE) + storage_core = TRUE + var/old_inventory = atom_storage.return_inv(FALSE) + emptyStorage() + create_storage(max_specific_storage = WEIGHT_CLASS_GIGANTIC, max_total_storage = 35, max_slots = 30, storage_type = /datum/storage/bag_of_holding) + for(var/obj/item/stored_item in old_inventory) + atom_storage.attempt_insert(stored_item, override = TRUE, messages = FALSE, force = TRUE) + name = "snail shell of holding" + update_appearance() + + // Update the worn sprite with the blue outline too if applicable + if(isnull(wearer)) + wearer = loc + if(istype(wearer)) + wearer.update_worn_back() + +/datum/species/snail/prepare_human_for_preview(mob/living/carbon/human/snail) + snail.dna.features["mcolor"] = "#adaba7" + snail.update_body(TRUE) + +/datum/species/snail/create_pref_unique_perks() + var/list/to_add = list() + + to_add += list( + list( + 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. 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 = "bone", + SPECIES_PERK_NAME = "Boneless", + 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, and can stick to the floors when the gravity is out.", + ), + list( + SPECIES_PERK_TYPE = SPECIES_NEGATIVE_PERK, + SPECIES_PERK_ICON = "frown", + SPECIES_PERK_NAME = "Weak Fighter", + SPECIES_PERK_DESC = "Snails punch half as hard as a human.", + ), + list( + SPECIES_PERK_TYPE = SPECIES_NEGATIVE_PERK, + SPECIES_PERK_ICON = "skull", + SPECIES_PERK_NAME = "Salt Weakness", + SPECIES_PERK_DESC = "Salt burns snails, and salt piles will block their path.", + ), + ) + + return to_add + +#undef SHELL_TRANSPARENCY_ALPHA diff --git a/modular_doppler/modular_species/species_types/snails/organs/snail_heart.dm b/modular_doppler/modular_species/species_types/snails/organs/snail_heart.dm new file mode 100644 index 0000000000000..7c8362a56cd81 --- /dev/null +++ b/modular_doppler/modular_species/species_types/snails/organs/snail_heart.dm @@ -0,0 +1,76 @@ +/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_doppler/modular_species/species_types/snails/icons/organs/snail_heart.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_mob_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_mob_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, 3 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 + diff --git a/modular_doppler/modular_species/species_types/snails/organs/snail_liver.dm b/modular_doppler/modular_species/species_types/snails/organs/snail_liver.dm new file mode 100644 index 0000000000000..392b2a999c6e8 --- /dev/null +++ b/modular_doppler/modular_species/species_types/snails/organs/snail_liver.dm @@ -0,0 +1,7 @@ +/obj/item/organ/internal/liver/snail + name = "gastropod liver" + icon = 'modular_doppler/modular_species/species_types/snails/icons/organs/snail_liver.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 diff --git a/modular_doppler/modular_species/species_types/snails/snail_bodyparts.dm b/modular_doppler/modular_species/species_types/snails/snail_bodyparts.dm new file mode 100644 index 0000000000000..9a9c413e0dce8 --- /dev/null +++ b/modular_doppler/modular_species/species_types/snails/snail_bodyparts.dm @@ -0,0 +1,35 @@ +// MODULAR SNAIL OVERRIDES + +/obj/item/bodypart/head/snail + icon_greyscale = BODYPART_ICON_SNAIL + bodyshape = BODYSHAPE_HUMANOID + head_flags = HEAD_HAIR|HEAD_FACIAL_HAIR|HEAD_EYESPRITES|HEAD_EYECOLOR|HEAD_DEBRAIN + eyes_icon = 'modular_doppler/modular_species/species_types/snails/icons/organs/snail_eyes.dmi' + +/obj/item/bodypart/chest/snail + icon_greyscale = BODYPART_ICON_SNAIL + bodyshape = BODYSHAPE_HUMANOID + +/obj/item/bodypart/arm/left/snail + icon_greyscale = BODYPART_ICON_SNAIL + bodyshape = BODYSHAPE_HUMANOID + unarmed_damage_low = 1 // Roundstart Snails - Lowest possible punch damage. if this is set to 0, punches will always miss. + unarmed_damage_high = 5 // Roundstart Snails - A Bit More damage. + +/obj/item/bodypart/arm/right/snail + icon_greyscale = BODYPART_ICON_SNAIL + bodyshape = BODYSHAPE_HUMANOID + unarmed_damage_low = 1 + unarmed_damage_high = 5 + +/obj/item/bodypart/leg/left/snail + icon_greyscale = BODYPART_ICON_SNAIL + bodyshape = BODYSHAPE_HUMANOID + unarmed_damage_low = 1. + unarmed_damage_high = 5 + +/obj/item/bodypart/leg/right/snail + icon_greyscale = BODYPART_ICON_SNAIL + bodyshape = BODYSHAPE_HUMANOID + unarmed_damage_low = 1 + unarmed_damage_high = 5 diff --git a/tgstation.dme b/tgstation.dme index 68e6c9fb15a42..1d03564abb18f 100644 --- a/tgstation.dme +++ b/tgstation.dme @@ -416,6 +416,7 @@ #include "code\__DEFINES\~doppler_defines\logging.dm" #include "code\__DEFINES\~doppler_defines\manufacturer_strings.dm" #include "code\__DEFINES\~doppler_defines\mobfactions.dm" +#include "code\__DEFINES\~doppler_defines\mobs.dm" #include "code\__DEFINES\~doppler_defines\mutant_variations.dm" #include "code\__DEFINES\~doppler_defines\obj_flags_doppler.dm" #include "code\__DEFINES\~doppler_defines\organ_slots.dm" @@ -6713,6 +6714,7 @@ #include "modular_doppler\modular_customization\organs\external\tail.dm" #include "modular_doppler\modular_customization\organs\external\wings.dm" #include "modular_doppler\modular_customization\organs\internal\ears.dm" +#include "modular_doppler\modular_customization\organs\internal\eyes.dm" #include "modular_doppler\modular_customization\preferences\antennae.dm" #include "modular_doppler\modular_customization\preferences\body_marking_lizard.dm" #include "modular_doppler\modular_customization\preferences\body_marking_moth.dm" @@ -6781,6 +6783,10 @@ #include "modular_doppler\modular_species\species_types\primitive_demihuman\primitive_demihuman.dm" #include "modular_doppler\modular_species\species_types\slugcats\slugcat.dm" #include "modular_doppler\modular_species\species_types\slugcats\slugcat_bodyparts.dm" +#include "modular_doppler\modular_species\species_types\snails\modular_snail.dm" +#include "modular_doppler\modular_species\species_types\snails\snail_bodyparts.dm" +#include "modular_doppler\modular_species\species_types\snails\organs\snail_heart.dm" +#include "modular_doppler\modular_species\species_types\snails\organs\snail_liver.dm" #include "modular_doppler\modular_traits\code\neutral.dm" #include "modular_doppler\modular_traits\code\organs.dm" #include "modular_doppler\modular_weapons\code\gunsets.dm"