From 172d38c8c492491574c409a83a591258f0e9cd79 Mon Sep 17 00:00:00 2001 From: MrCastmer <125900379+MrCastmer@users.noreply.github.com> Date: Thu, 22 Feb 2024 13:19:37 +0300 Subject: [PATCH] logic signals&to_chat remake some balance tweaks --- .../mob/living/carbon/carbon_defense.dm | 23 +++++++++++++++---- .../mood_events/generic_negative_events.dm | 4 ++-- .../code/datums/traits/positive.dm | 6 ++--- .../game/effects/temporary_visuals/misc.dm | 8 ++++++- 4 files changed, 31 insertions(+), 10 deletions(-) diff --git a/code/modules/mob/living/carbon/carbon_defense.dm b/code/modules/mob/living/carbon/carbon_defense.dm index 31d83cf44a71..db9b0b1f685c 100644 --- a/code/modules/mob/living/carbon/carbon_defense.dm +++ b/code/modules/mob/living/carbon/carbon_defense.dm @@ -485,6 +485,7 @@ else M.visible_message(span_notice("[M] hugs [src] to make [p_them()] feel better!"), \ span_notice("You hug [src] to make [p_them()] feel better!")) +/* SEND_SIGNAL(src, COMSIG_ADD_MOOD_EVENT, "hug", /datum/mood_event/hug) if(HAS_TRAIT(M, TRAIT_FRIENDLY)) var/datum/component/mood/mood = M.GetComponent(/datum/component/mood) @@ -496,6 +497,24 @@ if(isethereal(src) && ismoth(M)) SEND_SIGNAL(M, COMSIG_ADD_MOOD_EVENT, "friendly_hug", /datum/mood_event/lamphug, src) +*/ + if(HAS_TRAIT(src, TRAIT_PSYCHOPATHIC) || HAS_TRAIT(src, TRAIT_APATHETIC)) //dripstation edit + to_chat(M, span_warning("[src] have no visual reaction to your hug.")) //dripstation edit + else + if(HAS_TRAIT(src, TRAIT_BADTOUCH)) //dripstation edit + to_chat(M, span_warning("[src] looks visibly upset as you hug [p_them()].")) //dripstation edit + else + SEND_SIGNAL(src, COMSIG_ADD_MOOD_EVENT, "hug", /datum/mood_event/hug) + if(HAS_TRAIT(M, TRAIT_FRIENDLY)) + var/datum/component/mood/mood = M.GetComponent(/datum/component/mood) + if (mood.sanity >= SANITY_GREAT) + new /obj/effect/temp_visual/heart(loc) + SEND_SIGNAL(src, COMSIG_ADD_MOOD_EVENT, "friendly_hug", /datum/mood_event/besthug, M) + else if (mood.sanity >= SANITY_DISTURBED) + SEND_SIGNAL(src, COMSIG_ADD_MOOD_EVENT, "friendly_hug", /datum/mood_event/betterhug, M) + + if(isethereal(src) && ismoth(M)) + SEND_SIGNAL(M, COMSIG_ADD_MOOD_EVENT, "friendly_hug", /datum/mood_event/lamphug, src) for(var/datum/brain_trauma/trauma in M.get_traumas()) trauma.on_hug(M, src) for(var/datum/brain_trauma/trauma in get_traumas()) @@ -510,10 +529,6 @@ adjust_wet_stacks(averagestacks) M.adjust_wet_stacks(-averagestacks) to_chat(src, span_notice("The hug [M] gave you was a little wet...")) - if(HAS_TRAIT(src, TRAIT_BADTOUCH)) //dripstation edit - to_chat(M, span_warning("[src] looks visibly upset as you hug [p_them()].")) //dripstation edit - if(HAS_TRAIT(src, TRAIT_PSYCHOPATHIC) || HAS_TRAIT(src, TRAIT_APATHETIC)) //dripstation edit - to_chat(M, span_warning("[src] have no visual reaction to your hug.")) //dripstation edit SEND_SIGNAL(src, COMSIG_CARBON_HELP_ACT, M) //dripstation edit SEND_SIGNAL(M, COMSIG_CARBON_HELPED, src) //dripstation edit diff --git a/modular_dripstation/code/datums/mood_events/generic_negative_events.dm b/modular_dripstation/code/datums/mood_events/generic_negative_events.dm index fc4faad09bf6..9e127c6d55ee 100644 --- a/modular_dripstation/code/datums/mood_events/generic_negative_events.dm +++ b/modular_dripstation/code/datums/mood_events/generic_negative_events.dm @@ -5,11 +5,11 @@ timeout = 5 MINUTES /datum/mood_event/bad_touch - description = "I don't like when people touch me." + description = "I don't like when people touch me.\n" mood_change = -3 timeout = 4 MINUTES /datum/mood_event/very_bad_touch - description = "I really don't like when people touch me." + description = "I really don't like when people touch me.\n" mood_change = -5 timeout = 4 MINUTES \ No newline at end of file diff --git a/modular_dripstation/code/datums/traits/positive.dm b/modular_dripstation/code/datums/traits/positive.dm index 395ff9135b0e..25491d6a5c5f 100644 --- a/modular_dripstation/code/datums/traits/positive.dm +++ b/modular_dripstation/code/datums/traits/positive.dm @@ -5,20 +5,20 @@ value = 5 mob_trait = TRAIT_PSYCHOPATHIC mood_quirk = TRUE - gain_text = span_danger("I don`t mind if they all die.") + gain_text = span_danger("You don`t mind if they all die.") lose_text = span_notice("Okey, time to touch some grass.") medical_record_text = "The patient has a psychopathic personality disorder. It is normal for him to react socially distantly to certain events." /datum/quirk/psychopathic/add() var/datum/component/mood/mood = quirk_holder.GetComponent(/datum/component/mood) if(mood) - mood.mood_modifier -= 0.4 + mood.mood_modifier -= 0.6 /datum/quirk/psychopathic/remove() if(quirk_holder) var/datum/component/mood/mood = quirk_holder.GetComponent(/datum/component/mood) if(mood) - mood.mood_modifier += 0.4 + mood.mood_modifier += 0.6 /datum/quirk/apathetic mob_trait = TRAIT_APATHETIC \ No newline at end of file diff --git a/modular_dripstation/code/game/effects/temporary_visuals/misc.dm b/modular_dripstation/code/game/effects/temporary_visuals/misc.dm index d60c5804ba31..dd1e291b0133 100644 --- a/modular_dripstation/code/game/effects/temporary_visuals/misc.dm +++ b/modular_dripstation/code/game/effects/temporary_visuals/misc.dm @@ -2,4 +2,10 @@ name = "annoyed" icon = 'modular_dripstation/icons/effects/effects.dmi' icon_state = "annoyed" - duration = 25 \ No newline at end of file + duration = 25 + +/obj/effect/temp_visual/annoyed/Initialize(mapload) + . = ..() + pixel_x = rand(-4,0) + pixel_y = rand(8,12) + animate(src, pixel_y = pixel_y + 16, alpha = 0, time = duration) \ No newline at end of file