diff --git a/code/__DEFINES/~doppler_defines/traits.dm b/code/__DEFINES/~doppler_defines/traits.dm index 718af41a3e7db..3fae0296a0c93 100644 --- a/code/__DEFINES/~doppler_defines/traits.dm +++ b/code/__DEFINES/~doppler_defines/traits.dm @@ -35,6 +35,8 @@ #define TRAIT_LEFT_HANDED "left_handed" /// Trait for people with the cybernetic quirk #define TRAIT_PERMITTED_CYBERNETIC "permitted_cybernetic" +/// No step on glass +#define TRAIT_HARD_SOLES "hard_soles" //// // Jobs diff --git a/code/datums/components/caltrop.dm b/code/datums/components/caltrop.dm index cd06bdb2a00d7..10f62a1a914b8 100644 --- a/code/datums/components/caltrop.dm +++ b/code/datums/components/caltrop.dm @@ -97,6 +97,10 @@ return if (!(flags & CALTROP_BYPASS_SHOES)) + // DOPPLER EDIT ADDITION BEGIN - Hardened Soles Quirk + if(HAS_TRAIT(digitigrade_fan, TRAIT_HARD_SOLES)) + return + // DOPPLER EDIT ADDITION END if ((digitigrade_fan.wear_suit?.body_parts_covered | digitigrade_fan.w_uniform?.body_parts_covered | digitigrade_fan.shoes?.body_parts_covered) & FEET) return diff --git a/code/modules/assembly/mousetrap.dm b/code/modules/assembly/mousetrap.dm index 69436f7985dbf..19f853885b5ac 100644 --- a/code/modules/assembly/mousetrap.dm +++ b/code/modules/assembly/mousetrap.dm @@ -121,7 +121,11 @@ return FALSE switch(type) if("feet") - if(!victim.shoes) + // DOPPLER ADDITION START - Hardened soles + if(HAS_TRAIT(victim, TRAIT_HARD_SOLES)) + to_chat(victim, span_notice("[src] snaps onto your foot, then falls off uselessly.")) + // DOPPLER ADDITION END + else if(!victim.shoes) // DOPPLER EDIT, old code: if(!victim.shoes) affecting = victim.get_bodypart(pick(BODY_ZONE_L_LEG, BODY_ZONE_R_LEG)) victim.Paralyze(60) else diff --git a/code/modules/client/preferences/middleware/_middleware.dm b/code/modules/client/preferences/middleware/_middleware.dm index 37a01371db8ef..d3c1b992fd3f2 100644 --- a/code/modules/client/preferences/middleware/_middleware.dm +++ b/code/modules/client/preferences/middleware/_middleware.dm @@ -57,7 +57,7 @@ return FALSE /// Called when applying preferences to the mob. -/datum/preference_middleware/proc/apply_to_human(mob/living/carbon/human/target, datum/preferences/preferences, visuals_only = FALSE) //NOVA EDIT CHANGE +/datum/preference_middleware/proc/apply_to_human(mob/living/carbon/human/target, datum/preferences/preferences, visuals_only = FALSE) //DOPPLER EDIT CHANGE SHOULD_NOT_SLEEP(TRUE) SHOULD_CALL_PARENT(FALSE) return diff --git a/code/modules/loadout/loadout_items.dm b/code/modules/loadout/loadout_items.dm index 618fb50ab339e..cd82da94c226f 100644 --- a/code/modules/loadout/loadout_items.dm +++ b/code/modules/loadout/loadout_items.dm @@ -255,7 +255,7 @@ GLOBAL_LIST_INIT(all_loadout_categories, init_loadout_categories()) if(can_be_named && item_details?[INFO_NAMED] && !visuals_only) equipped_item.name = trim(item_details[INFO_NAMED], PREVENT_CHARACTER_TRIM_LOSS(MAX_NAME_LEN)) ADD_TRAIT(equipped_item, TRAIT_WAS_RENAMED, "Loadout") - equipped_item.on_loadout_custom_named() // NOVA EDIT ADDITION - Loadout item names + equipped_item.on_loadout_custom_named() // DOPPLER EDIT ADDITION - Loadout item names // DOPPLER EDIT ADDITION START - Loadout item descriptions if(can_be_named && item_details?[INFO_DESCRIBED] && !visuals_only) diff --git a/modular_doppler/modular_medical/surgery/_bodyparts.dm b/modular_doppler/modular_medical/surgery/_bodyparts.dm new file mode 100644 index 0000000000000..a99c9bb061dde --- /dev/null +++ b/modular_doppler/modular_medical/surgery/_bodyparts.dm @@ -0,0 +1,6 @@ +// Digitigrade legs are augmented to have the hardened soles quirk/trait +/obj/item/bodypart/leg/left/digitigrade + bodypart_traits = list(TRAIT_HARD_SOLES) + +/obj/item/bodypart/leg/right/digitigrade + bodypart_traits = list(TRAIT_HARD_SOLES) diff --git a/modular_doppler/modular_quirks/hardened_soles/hardened_soles.dm b/modular_doppler/modular_quirks/hardened_soles/hardened_soles.dm new file mode 100644 index 0000000000000..9d534bd19f360 --- /dev/null +++ b/modular_doppler/modular_quirks/hardened_soles/hardened_soles.dm @@ -0,0 +1,9 @@ +/datum/quirk/hard_soles + name = "Hardened Soles" + desc = "You're used to walking barefoot, and won't receive the negative effects of doing so." + value = 2 + mob_trait = TRAIT_HARD_SOLES + gain_text = span_notice("The ground doesn't feel so rough on your feet anymore.") + lose_text = span_danger("You start feeling the ridges and imperfections on the ground.") + medical_record_text = "Patient's feet are more resilient against traction." + icon = FA_ICON_PERSON_RUNNING diff --git a/modular_doppler/modular_quirks/linguist/linguist.dm b/modular_doppler/modular_quirks/linguist/linguist.dm index 1a92e80509461..2b0b26fefd478 100644 --- a/modular_doppler/modular_quirks/linguist/linguist.dm +++ b/modular_doppler/modular_quirks/linguist/linguist.dm @@ -7,135 +7,3 @@ lose_text = span_danger("Your grasp of the finer points of Draconic idioms fades away.") medical_record_text = "Patient demonstrates a high brain plasticity in regards to language learning." icon = FA_ICON_BOOK_ATLAS - -/datum/quirk/night_vision - name = "Night Vision" - desc = "You can see slightly more clearly in full darkness than most people." - icon = FA_ICON_MOON - value = 4 - mob_trait = TRAIT_NIGHT_VISION - gain_text = span_notice("The shadows seem a little less dark.") - lose_text = span_danger("Everything seems a little darker.") - medical_record_text = "Patient's eyes show above-average acclimation to darkness." - mail_goodies = list( - /obj/item/flashlight/flashdark, - /obj/item/food/grown/mushroom/glowshroom/shadowshroom, - /obj/item/skillchip/light_remover, - ) - -/datum/quirk/night_vision/add(client/client_source) - refresh_quirk_holder_eyes() - -/datum/quirk/night_vision/remove() - refresh_quirk_holder_eyes() - -/datum/quirk/night_vision/proc/refresh_quirk_holder_eyes() - var/mob/living/carbon/human/human_quirk_holder = quirk_holder - var/obj/item/organ/internal/eyes/eyes = human_quirk_holder.get_organ_by_type(/obj/item/organ/internal/eyes) - if(!eyes) - return - // We've either added or removed TRAIT_NIGHT_VISION before calling this proc. Just refresh the eyes. - eyes.refresh() - -// This NV quirk variant applies color_offsets night vision to a mob based on its chosen eye color. -// Some eye colors will produce very slightly stronger mechanical night vision effects just by virtue of their RGB values being scaled higher (typically lighter colours). - -/datum/quirk/night_vision - desc = "You can see a little better in darkness than most ordinary humanoids. If your eyes are naturally more sensitive to light through other means (such as being photophobic or a mothperson), this effect is significantly stronger." - medical_record_text = "Patient's visual sensory organs demonstrate non-standard performance in low-light conditions." - var/nv_color = null /// Holds the player's selected night vision colour - var/list/nv_color_cutoffs = null /// Contains the color_cutoffs applied to the user's eyes w/ our custom hue (once built) - -/datum/quirk/night_vision/add_unique(client/client_source) - . = ..() - nv_color = client_source?.prefs.read_preference(/datum/preference/color/nv_color) - if (isnull(nv_color)) - var/mob/living/carbon/human/human_holder = quirk_holder - nv_color = process_chat_color(human_holder.eye_color_left) - nv_color_cutoffs = calculate_color_cutoffs(nv_color) - refresh_quirk_holder_eyes() // make double triple dog sure we apply the overlay - -/// Calculate eye organ color_cutoffs used in tinted night vision with a supplied hexcode colour, clamping and scaling appropriately. -/datum/quirk/night_vision/proc/calculate_color_cutoffs(color) - var/mob/living/carbon/human/target = quirk_holder - - // if we have more sensitive eyes, increase the power - var/obj/item/organ/internal/eyes/target_eyes = target.get_organ_slot(ORGAN_SLOT_EYES) - if (!istype(target_eyes)) - return - var/infravision_multiplier = max(0, (-(target_eyes.flash_protect) * DOPPLER_NIGHT_VISION_SENSITIVITY_MULT)) + 1 - - var/list/new_rgb_cutoffs = new /list(3) - for(var/i in 1 to 3) - var/base_color = hex2num(copytext(color, (i*2), (i*2)+2)) //convert their supplied hex colour value to RGB - var/adjusted_color = max(((base_color / 255) * (DOPPLER_NIGHT_VISION_POWER_MAX * infravision_multiplier)), (DOPPLER_NIGHT_VISION_POWER_MIN * infravision_multiplier)) //linear convert their eye color into a color_cutoff range, ensuring it is clamped - new_rgb_cutoffs[i] = adjusted_color - - return new_rgb_cutoffs - -/datum/quirk_constant_data/night_vision - associated_typepath = /datum/quirk/night_vision - customization_options = list(/datum/preference/color/nv_color) - -// Client preference for night vision colour -/datum/preference/color/nv_color - savefile_key = "nv_color" - savefile_identifier = PREFERENCE_CHARACTER - category = PREFERENCE_CATEGORY_MANUALLY_RENDERED - -/datum/preference/color/nv_color/is_accessible(datum/preferences/preferences) - if (!..(preferences)) - return FALSE - - return "Night Vision" in preferences.all_quirks - -/datum/preference/color/nv_color/apply_to_human(mob/living/carbon/human/target, value) - return - -// run the Blessed Runechat Proc since it does most of what we want regarding luminance clamping anyway. could it be better? probably. is it more work? yes, it's a LOT of work. -/datum/preference/color/nv_color/deserialize(input, datum/preferences/preferences) - return process_chat_color(sanitize_hexcolor(input)) - -/datum/preference/color/nv_color/serialize(input) - return process_chat_color(sanitize_hexcolor(input)) - -/datum/preference/color/nv_color/create_default_value() - return process_chat_color("#[random_color()]") - -/datum/quirk/photophobia - desc = "Bright lights are uncomfortable and upsetting to you for whatever reason. Your eyes are also more sensitive to light in general. This shares a unique interaction with Night Vision." - /// how much of a flash_protect deficit the quirk inflicts - var/severity = 1 - -/datum/quirk/photophobia/add_unique(client/client_source) - var/sensitivity = client_source?.prefs.read_preference(/datum/preference/choiced/photophobia_severity) - switch (sensitivity) - if ("Hypersensitive") - severity = 2 - if ("Sensitive") - severity = 1 - var/obj/item/organ/internal/eyes/holder_eyes = quirk_holder.get_organ_slot(ORGAN_SLOT_EYES) - restore_eyes(holder_eyes) // add_unique() happens after add() so we need to jank reset this to ensure sensitivity is properly applied at roundstart - check_eyes(holder_eyes) - -/datum/quirk_constant_data/photophobia - associated_typepath = /datum/quirk/photophobia - customization_options = list(/datum/preference/choiced/photophobia_severity) - -/datum/preference/choiced/photophobia_severity - category = PREFERENCE_CATEGORY_MANUALLY_RENDERED - savefile_key = "photophobia_severity" - savefile_identifier = PREFERENCE_CHARACTER - -/datum/preference/choiced/photophobia_severity/is_accessible(datum/preferences/preferences) - if (!..(preferences)) - return FALSE - - return "Photophobia" in preferences.all_quirks - -/datum/preference/choiced/photophobia_severity/init_possible_values() - var/list/values = list("Sensitive", "Hypersensitive") - return values - -/datum/preference/choiced/photophobia_severity/apply_to_human(mob/living/carbon/human/target, value) - return diff --git a/modular_doppler/modular_quirks/night_vision/night_vision.dm b/modular_doppler/modular_quirks/night_vision/night_vision.dm new file mode 100644 index 0000000000000..f57eefdfe0361 --- /dev/null +++ b/modular_doppler/modular_quirks/night_vision/night_vision.dm @@ -0,0 +1,131 @@ +/datum/quirk/night_vision + name = "Night Vision" + desc = "You can see slightly more clearly in full darkness than most people." + icon = FA_ICON_MOON + value = 4 + mob_trait = TRAIT_NIGHT_VISION + gain_text = span_notice("The shadows seem a little less dark.") + lose_text = span_danger("Everything seems a little darker.") + medical_record_text = "Patient's eyes show above-average acclimation to darkness." + mail_goodies = list( + /obj/item/flashlight/flashdark, + /obj/item/food/grown/mushroom/glowshroom/shadowshroom, + /obj/item/skillchip/light_remover, + ) + +/datum/quirk/night_vision/add(client/client_source) + refresh_quirk_holder_eyes() + +/datum/quirk/night_vision/remove() + refresh_quirk_holder_eyes() + +/datum/quirk/night_vision/proc/refresh_quirk_holder_eyes() + var/mob/living/carbon/human/human_quirk_holder = quirk_holder + var/obj/item/organ/internal/eyes/eyes = human_quirk_holder.get_organ_by_type(/obj/item/organ/internal/eyes) + if(!eyes) + return + // We've either added or removed TRAIT_NIGHT_VISION before calling this proc. Just refresh the eyes. + eyes.refresh() + +// This NV quirk variant applies color_offsets night vision to a mob based on its chosen eye color. +// Some eye colors will produce very slightly stronger mechanical night vision effects just by virtue of their RGB values being scaled higher (typically lighter colours). + +/datum/quirk/night_vision + desc = "You can see a little better in darkness than most ordinary humanoids. If your eyes are naturally more sensitive to light through other means (such as being photophobic or a mothperson), this effect is significantly stronger." + medical_record_text = "Patient's visual sensory organs demonstrate non-standard performance in low-light conditions." + var/nv_color = null /// Holds the player's selected night vision colour + var/list/nv_color_cutoffs = null /// Contains the color_cutoffs applied to the user's eyes w/ our custom hue (once built) + +/datum/quirk/night_vision/add_unique(client/client_source) + . = ..() + nv_color = client_source?.prefs.read_preference(/datum/preference/color/nv_color) + if (isnull(nv_color)) + var/mob/living/carbon/human/human_holder = quirk_holder + nv_color = process_chat_color(human_holder.eye_color_left) + nv_color_cutoffs = calculate_color_cutoffs(nv_color) + refresh_quirk_holder_eyes() // make double triple dog sure we apply the overlay + +/// Calculate eye organ color_cutoffs used in tinted night vision with a supplied hexcode colour, clamping and scaling appropriately. +/datum/quirk/night_vision/proc/calculate_color_cutoffs(color) + var/mob/living/carbon/human/target = quirk_holder + + // if we have more sensitive eyes, increase the power + var/obj/item/organ/internal/eyes/target_eyes = target.get_organ_slot(ORGAN_SLOT_EYES) + if (!istype(target_eyes)) + return + var/infravision_multiplier = max(0, (-(target_eyes.flash_protect) * DOPPLER_NIGHT_VISION_SENSITIVITY_MULT)) + 1 + + var/list/new_rgb_cutoffs = new /list(3) + for(var/i in 1 to 3) + var/base_color = hex2num(copytext(color, (i*2), (i*2)+2)) //convert their supplied hex colour value to RGB + var/adjusted_color = max(((base_color / 255) * (DOPPLER_NIGHT_VISION_POWER_MAX * infravision_multiplier)), (DOPPLER_NIGHT_VISION_POWER_MIN * infravision_multiplier)) //linear convert their eye color into a color_cutoff range, ensuring it is clamped + new_rgb_cutoffs[i] = adjusted_color + + return new_rgb_cutoffs + +/datum/quirk_constant_data/night_vision + associated_typepath = /datum/quirk/night_vision + customization_options = list(/datum/preference/color/nv_color) + +// Client preference for night vision colour +/datum/preference/color/nv_color + savefile_key = "nv_color" + savefile_identifier = PREFERENCE_CHARACTER + category = PREFERENCE_CATEGORY_MANUALLY_RENDERED + +/datum/preference/color/nv_color/is_accessible(datum/preferences/preferences) + if (!..(preferences)) + return FALSE + + return "Night Vision" in preferences.all_quirks + +/datum/preference/color/nv_color/apply_to_human(mob/living/carbon/human/target, value) + return + +// run the Blessed Runechat Proc since it does most of what we want regarding luminance clamping anyway. could it be better? probably. is it more work? yes, it's a LOT of work. +/datum/preference/color/nv_color/deserialize(input, datum/preferences/preferences) + return process_chat_color(sanitize_hexcolor(input)) + +/datum/preference/color/nv_color/serialize(input) + return process_chat_color(sanitize_hexcolor(input)) + +/datum/preference/color/nv_color/create_default_value() + return process_chat_color("#[random_color()]") + +/datum/quirk/photophobia + desc = "Bright lights are uncomfortable and upsetting to you for whatever reason. Your eyes are also more sensitive to light in general. This shares a unique interaction with Night Vision." + /// how much of a flash_protect deficit the quirk inflicts + var/severity = 1 + +/datum/quirk/photophobia/add_unique(client/client_source) + var/sensitivity = client_source?.prefs.read_preference(/datum/preference/choiced/photophobia_severity) + switch (sensitivity) + if ("Hypersensitive") + severity = 2 + if ("Sensitive") + severity = 1 + var/obj/item/organ/internal/eyes/holder_eyes = quirk_holder.get_organ_slot(ORGAN_SLOT_EYES) + restore_eyes(holder_eyes) // add_unique() happens after add() so we need to jank reset this to ensure sensitivity is properly applied at roundstart + check_eyes(holder_eyes) + +/datum/quirk_constant_data/photophobia + associated_typepath = /datum/quirk/photophobia + customization_options = list(/datum/preference/choiced/photophobia_severity) + +/datum/preference/choiced/photophobia_severity + category = PREFERENCE_CATEGORY_MANUALLY_RENDERED + savefile_key = "photophobia_severity" + savefile_identifier = PREFERENCE_CHARACTER + +/datum/preference/choiced/photophobia_severity/is_accessible(datum/preferences/preferences) + if (!..(preferences)) + return FALSE + + return "Photophobia" in preferences.all_quirks + +/datum/preference/choiced/photophobia_severity/init_possible_values() + var/list/values = list("Sensitive", "Hypersensitive") + return values + +/datum/preference/choiced/photophobia_severity/apply_to_human(mob/living/carbon/human/target, value) + return diff --git a/modular_doppler/modular_species/species_types/android/android_parts.dm b/modular_doppler/modular_species/species_types/android/android_parts.dm index 5937ce8a59852..ca958f8146c88 100644 --- a/modular_doppler/modular_species/species_types/android/android_parts.dm +++ b/modular_doppler/modular_species/species_types/android/android_parts.dm @@ -814,6 +814,7 @@ limb_id = "synth_lizard" /obj/item/bodypart/leg/right/robot/android/synth_lizard + bodypart_traits = list(TRAIT_HARD_SOLES) bodyshape = BODYSHAPE_HUMANOID | BODYSHAPE_DIGITIGRADE should_draw_greyscale = TRUE icon_static = ANDROID_BODYPARTS_DMI @@ -823,6 +824,7 @@ limb_id = "synth_lizard" /obj/item/bodypart/leg/left/robot/android/synth_lizard + bodypart_traits = list(TRAIT_HARD_SOLES) bodyshape = BODYSHAPE_HUMANOID | BODYSHAPE_DIGITIGRADE should_draw_greyscale = TRUE icon_static = ANDROID_BODYPARTS_DMI diff --git a/tgstation.dme b/tgstation.dme index 8e2b4184dede4..50cfcb6ca7393 100644 --- a/tgstation.dme +++ b/tgstation.dme @@ -6840,6 +6840,7 @@ #include "modular_doppler\modular_medical\reagents\reagents.dm" #include "modular_doppler\modular_medical\reagents\sprays.dm" #include "modular_doppler\modular_medical\reagents\synth_blood.dm" +#include "modular_doppler\modular_medical\surgery\_bodyparts.dm" #include "modular_doppler\modular_medical\surgery\revival.dm" #include "modular_doppler\modular_medical\surgery\organs\internal\cyberimp.dm" #include "modular_doppler\modular_medical\wounds\_wounds.dm" @@ -6863,8 +6864,10 @@ #include "modular_doppler\modular_mood\code\mood_events\hotspring.dm" #include "modular_doppler\modular_mood\code\mood_events\race_drink.dm" #include "modular_doppler\modular_quirks\excitable\excitable.dm" +#include "modular_doppler\modular_quirks\hardened_soles\hardened_soles.dm" #include "modular_doppler\modular_quirks\left_handed\left_handed.dm" #include "modular_doppler\modular_quirks\linguist\linguist.dm" +#include "modular_doppler\modular_quirks\night_vision\night_vision.dm" #include "modular_doppler\modular_quirks\overwrites\musician.dm" #include "modular_doppler\modular_quirks\paycheck_rations\code\quirk.dm" #include "modular_doppler\modular_quirks\paycheck_rations\code\rationpacks.dm" diff --git a/tgui/packages/tgui/interfaces/PreferencesMenu/MainPage.tsx b/tgui/packages/tgui/interfaces/PreferencesMenu/MainPage.tsx index 08d65723eb721..b89cb436a0b5e 100644 --- a/tgui/packages/tgui/interfaces/PreferencesMenu/MainPage.tsx +++ b/tgui/packages/tgui/interfaces/PreferencesMenu/MainPage.tsx @@ -35,7 +35,7 @@ import { ServerPreferencesFetcher } from './ServerPreferencesFetcher'; import { useRandomToggleState } from './useRandomToggleState'; const CLOTHING_CELL_SIZE = 48; -const CLOTHING_SIDEBAR_ROWS = 13.4; // NOVA EDIT CHANGE - ORIGINAL: 9 +const CLOTHING_SIDEBAR_ROWS = 13.4; // DOPPLER EDIT CHANGE - ORIGINAL: 9 const CLOTHING_SELECTION_CELL_SIZE = 48; const CLOTHING_SELECTION_WIDTH = 5.4;