Skip to content

Commit

Permalink
ate_without_table debuf remove & some mood tweaks (#18)
Browse files Browse the repository at this point in the history
* ate_without_table debuf remove

& /datum/mood_event/surgery apply when medic screw up

* fix1

* moodproc tweaking

* Sac makes happy

Pain, suffering, joy

* fix2

* Update mood.dm

* fixing datums

* Psychopathic&Bad Touch added

* Fixing blind\paralized nukies

Adding them a new moodlet

* protesic fix

* negative fix

* balance issue

* lints fix

* logic signals&to_chat remake

some balance tweaks

* Update yogstation.dme

---------

Co-authored-by: Blundir <[email protected]>
  • Loading branch information
MrCastmer and Blundir authored Feb 22, 2024
1 parent a167c64 commit 8b9f111
Show file tree
Hide file tree
Showing 27 changed files with 278 additions and 12 deletions.
4 changes: 0 additions & 4 deletions code/__DEFINES/traits.dm
Original file line number Diff line number Diff line change
Expand Up @@ -128,8 +128,6 @@
#define TRAIT_BLIND "blind"
#define TRAIT_NEARSIGHT "nearsighted"

#define HYPNOCHAIR_TRAIT "hypnochair" //dripstation edit

#define TRAIT_MONKEYLIKE "monkeylike" //sets IsAdvancedToolUser to FALSE

#define TRAIT_REDUCED_DAMAGE_SLOWDOWN "reduced_damage_slowdown"
Expand Down Expand Up @@ -161,7 +159,6 @@
#define TRAIT_ALWAYS_CLEAN "always-clean"

#define TRAIT_QUICKEST_CARRY "quickest-carry"
#define TRAIT_QUICK_BUILD "quick-build" //dripstation edit
#define TRAIT_STRONG_GRIP "strong-grip"

#define TRAIT_SHELTERED "sheltered"
Expand Down Expand Up @@ -218,7 +215,6 @@

#define TRAIT_SEE_REAGENTS "see_reagents"
#define TRAIT_STARGAZED "stargazed"
#define TRAIT_TRANSFORM_ACTIVE "active_transform" //dripstation edit

/// The item is magically cursed
#define CURSED_ITEM_TRAIT(item_type) "cursed_item_[item_type]"
Expand Down
2 changes: 2 additions & 0 deletions code/__DEFINES/{dripstation_defines}/traits.dm
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
#define TRAIT_PSYCHOPATHIC "psychopathic"
#define TRAIT_APATHETIC "apathetic"
4 changes: 3 additions & 1 deletion code/controllers/subsystem/processing/quirks.dm
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,11 @@ PROCESSING_SUBSYSTEM_DEF(quirks)
if(!quirks.len)
SetupQuirks()

//Psychopathic, Bad Touch dripstation edit
quirk_blacklist = list(
list("Blind","Nearsighted"),
list("Jolly","Depression","Apathetic","Hypersensitive"),
list("Jolly","Depression","Apathetic","Hypersensitive","Psychopathic"),
list("Bad Touch", "Friendly"),
list("Ageusia","Vegetarian","Deviant Tastes"),
list("Ananas Affinity","Ananas Aversion"),
list("Alcohol Tolerance","Light Drinker"),
Expand Down
2 changes: 2 additions & 0 deletions code/datums/components/mood.dm
Original file line number Diff line number Diff line change
Expand Up @@ -176,6 +176,7 @@
screen_obj.color = "#2eeb9a"
break

/*
/datum/component/mood/process(delta_time) //Called on SSmood process
var/mob/living/owner = parent
if(!owner)
Expand Down Expand Up @@ -259,6 +260,7 @@
master.remove_movespeed_modifier(MOVESPEED_ID_SANITY, TRUE)
sanity_level = 1
update_mood_icon()
*/

/datum/component/mood/proc/setInsanityEffect(newval)
if(newval == insanity_effect)
Expand Down
2 changes: 2 additions & 0 deletions code/modules/antagonists/cult/runes.dm
Original file line number Diff line number Diff line change
Expand Up @@ -336,6 +336,8 @@ structure_check() searches for nearby cultist structures required for the invoca
to_chat(M, span_cultlarge("\"I accept this sacrifice.\""))
else
to_chat(M, span_cultlarge("\"I accept this meager sacrifice.\""))
var/mob/living/carbon/carbon_user = M //dripstation edit
SEND_SIGNAL(carbon_user, COMSIG_ADD_MOOD_EVENT, "geometeroffer", /datum/mood_event/sacrifice_geometer) //dripstation edit

var/obj/item/soulstone/stone = new /obj/item/soulstone(get_turf(src))
if(sacrificial.mind && !sacrificial.suiciding)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -179,6 +179,7 @@

if(LH.target?.stat) ///wow this works
to_chat(carbon_user,span_danger("Your patrons accepts your offer.."))
SEND_SIGNAL(carbon_user, COMSIG_ADD_MOOD_EVENT, "hereticoffer", /datum/mood_event/sacrifice_heretic) //dripstation edit
var/mob/living/carbon/human/H = LH.target
H.apply_status_effect(STATUS_EFFECT_BRAZIL_PENANCE)
var/datum/antagonist/heretic/EC = carbon_user.mind.has_antag_datum(/datum/antagonist/heretic)
Expand Down
21 changes: 21 additions & 0 deletions code/modules/mob/living/carbon/carbon_defense.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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())
Expand All @@ -511,6 +530,8 @@
M.adjust_wet_stacks(-averagestacks)
to_chat(src, span_notice("The hug [M] gave you was a little wet..."))

SEND_SIGNAL(src, COMSIG_CARBON_HELP_ACT, M) //dripstation edit
SEND_SIGNAL(M, COMSIG_CARBON_HELPED, src) //dripstation edit
adjust_status_effects_on_shake_up()

adjustStaminaLoss(-10) //dripstation edit, now shakes and hugs recovers stamina again
Expand Down
1 change: 1 addition & 0 deletions code/modules/mob/living/living.dm
Original file line number Diff line number Diff line change
Expand Up @@ -273,6 +273,7 @@
if(ismob(AM))
var/mob/M = AM

SEND_SIGNAL(M, COMSIG_LIVING_GET_PULLED, src) //dripstation edit
log_combat(src, M, "grabbed", addition="passive grab")
if(!supress_message && !(iscarbon(AM) && HAS_TRAIT(src, TRAIT_STRONG_GRABBER)))
visible_message(span_warning("[src] has grabbed [M] passively!"))
Expand Down
2 changes: 2 additions & 0 deletions code/modules/religion/rites.dm
Original file line number Diff line number Diff line change
Expand Up @@ -299,6 +299,8 @@
var/favor_gained = 100 + round(chosen_sacrifice.getFireLoss())
GLOB.religious_sect?.adjust_favor(favor_gained, user)
to_chat(user, span_notice("[GLOB.deity] absorb the burning corpse and any trace of fire with it. [GLOB.deity] rewards you with [favor_gained] favor."))
var/mob/living/carbon/carbon_user = user //dripstation edit
SEND_SIGNAL(carbon_user, COMSIG_ADD_MOOD_EVENT, "chap_sac", /datum/mood_event/sacrifice_good) //dripstation edit
chosen_sacrifice.dust(force = TRUE)
playsound(get_turf(religious_tool), 'sound/effects/supermatter.ogg', 50, TRUE)
chosen_sacrifice = null
Expand Down
87 changes: 87 additions & 0 deletions modular_dripstation/code/datums/component/mood.dm
Original file line number Diff line number Diff line change
@@ -0,0 +1,87 @@
#define MINOR_INSANITY_PEN 5
#define MAJOR_INSANITY_PEN 10
//Okey, just mood rebalance
/datum/component/mood/process(delta_time)
var/mob/living/owner = parent
if(!owner)
qdel(src)
return

switch(mood_level)
if(1)
setSanity(sanity-0.3*delta_time, minimum=SANITY_INSANE)
if(2)
setSanity(sanity-0.15*delta_time, minimum=SANITY_INSANE)
if(3)
setSanity(sanity-0.1*delta_time, minimum=SANITY_CRAZY)
if(4)
setSanity(sanity-0.05*delta_time, minimum=SANITY_UNSTABLE)
if(5)
setSanity(sanity, minimum=SANITY_UNSTABLE) //This makes sure that mood gets increased should you be below the minimum.
if(6)
setSanity(sanity+0.15*delta_time, minimum=SANITY_UNSTABLE)
if(7)
setSanity(sanity+0.2*delta_time, minimum=SANITY_UNSTABLE)
if(8)
setSanity(sanity+0.25*delta_time, minimum=SANITY_NEUTRAL, maximum=SANITY_GREAT)
if(9)
setSanity(sanity+0.4*delta_time, minimum=SANITY_NEUTRAL, maximum=INFINITY)


if(HAS_TRAIT(owner, TRAIT_DEPRESSION))
if(prob(0.05))
add_event(null, "depression", /datum/mood_event/depression_mild)
clear_event(null, "jolly")
if(HAS_TRAIT(owner, TRAIT_JOLLY))
if(prob(0.05))
add_event(null, "jolly", /datum/mood_event/jolly)
clear_event(null, "depression")
if(HAS_TRAIT(owner, TRAIT_PSYCHOPATHIC))
if(prob(0.005))
add_event(null, "depression", /datum/mood_event/depression_moderate)
clear_event(null, "jolly")
if(prob(0.005))
add_event(null, "jolly", /datum/mood_event/jolly)
clear_event(null, "depression")

HandleNutrition(owner)


/datum/component/mood/proc/setSanity(amount, minimum=SANITY_INSANE, maximum=SANITY_NEUTRAL)
if(amount < minimum)
amount += clamp(minimum - amount, 0, 0.7)
if(HAS_TRAIT(parent, TRAIT_UNSTABLE) || amount > maximum)
amount = min(sanity, amount)
if(amount == sanity) //Prevents stuff from flicking around.
return
sanity = amount
var/mob/living/master = parent
switch(sanity)
if(SANITY_INSANE to SANITY_CRAZY)
setInsanityEffect(MAJOR_INSANITY_PEN)
master.add_movespeed_modifier(MOVESPEED_ID_SANITY, TRUE, 100, override=TRUE, multiplicative_slowdown=0.75, movetypes=(~FLYING))
sanity_level = 6
if(SANITY_CRAZY to SANITY_UNSTABLE)
setInsanityEffect(MINOR_INSANITY_PEN)
master.add_movespeed_modifier(MOVESPEED_ID_SANITY, TRUE, 100, override=TRUE, multiplicative_slowdown=0.5, movetypes=(~FLYING))
sanity_level = 5
if(SANITY_UNSTABLE to SANITY_DISTURBED)
setInsanityEffect(0)
master.add_movespeed_modifier(MOVESPEED_ID_SANITY, TRUE, 100, override=TRUE, multiplicative_slowdown=0.25, movetypes=(~FLYING))
sanity_level = 4
if(SANITY_DISTURBED to SANITY_NEUTRAL)
setInsanityEffect(0)
master.remove_movespeed_modifier(MOVESPEED_ID_SANITY, TRUE)
sanity_level = 3
if(SANITY_NEUTRAL+1 to SANITY_GREAT+1) //shitty hack but +1 to prevent it from responding to super small differences
setInsanityEffect(0)
master.remove_movespeed_modifier(MOVESPEED_ID_SANITY, TRUE)
sanity_level = 2
if(SANITY_GREAT+1 to INFINITY)
setInsanityEffect(0)
master.remove_movespeed_modifier(MOVESPEED_ID_SANITY, TRUE)
sanity_level = 1
update_mood_icon()

#undef MINOR_INSANITY_PEN
#undef MAJOR_INSANITY_PEN
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
/datum/mood_event/ate_without_table
mood_change = 0 //F THIS RIMWORLD REFERENCE

/datum/mood_event/surgery
timeout = 5 MINUTES

/datum/mood_event/bad_touch
description = "<span class='warning'>I don't like when people touch me.</span>\n"
mood_change = -3
timeout = 4 MINUTES

/datum/mood_event/very_bad_touch
description = "<span class='warning'>I really don't like when people touch me.</span>\n"
mood_change = -5
timeout = 4 MINUTES
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
/datum/mood_event/focused
mood_change = 10 //Used for syndies, nukeops etc so they can focus on their goals

/datum/mood_event/slaughter
description ="<span class='alertsyndie'>These pitiful NanoTrasen scam will have to drink vacuum sooner or later. Slaughter... THEM... ALL!!</span>\n"
mood_change = 15

/datum/mood_event/heretics
mood_change = 8

/datum/mood_event/cult
mood_change = 15 //maybe being a cultist isnt that bad after all

/datum/mood_event/drankblood
mood_change = 8

/datum/mood_event/sacrifice_geometer
description ="<span class='cult italic'>The Great Geometer of Blood is pleased with this offering!</span>\n"
mood_change = 5
timeout = 3 MINUTES

/datum/mood_event/sacrifice_heretic
description ="<span class='nicegreen'>Your patrons are pleased with this offering!</span>\n"
mood_change = 5
timeout = 3 MINUTES

/datum/mood_event/jolly_moderate
description = "<span class='nicegreen'>That was a really funny joke that my inner self told me!</span>\n"
mood_change = 9
timeout = 2 MINUTES
52 changes: 52 additions & 0 deletions modular_dripstation/code/datums/traits/negative.dm
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
/datum/quirk/bad_touch
name = "Bad Touch"
desc = "You don't like hugs. You'd really prefer if people just left you alone."
icon = "tg-bad-touch"
mob_trait = TRAIT_BADTOUCH
value = -1
gain_text = span_danger("You just want people to leave you alone.")
lose_text = span_notice("You could use a big hug.")
medical_record_text = "Patient has disdain for being touched. Potentially has undiagnosed haphephobia."
mood_quirk = TRUE

/datum/quirk/bad_touch/add(client/client_source)
RegisterSignals(quirk_holder, list(COMSIG_LIVING_GET_PULLED, COMSIG_CARBON_HELP_ACT), PROC_REF(uncomfortable_touch))

/datum/quirk/bad_touch/remove()
UnregisterSignal(quirk_holder, list(COMSIG_LIVING_GET_PULLED, COMSIG_CARBON_HELP_ACT))

/// Causes a negative moodlet to our quirk holder on signal
/datum/quirk/bad_touch/proc/uncomfortable_touch(datum/source)
SIGNAL_HANDLER

if(quirk_holder.stat == DEAD)
return

new /obj/effect/temp_visual/annoyed(quirk_holder.loc)
var/datum/component/mood/mob_mood = quirk_holder.GetComponent(/datum/component/mood)
if(mob_mood.sanity <= SANITY_NEUTRAL)
SEND_SIGNAL(quirk_holder, COMSIG_ADD_MOOD_EVENT, "bad_touch", /datum/mood_event/very_bad_touch)
else
SEND_SIGNAL(quirk_holder, COMSIG_ADD_MOOD_EVENT, "bad_touch", /datum/mood_event/bad_touch)

/datum/quirk/prosthetic_limb
value = -1

/datum/quirk/prosthetic_limb/check_quirk(datum/preferences/prefs)
var/species_type = prefs.read_preference(/datum/preference/choiced/species)

if(species_type == /datum/species/ipc) // IPCs are already cybernetic
return "You already have cybernetic limbs!"
return FALSE

/datum/quirk/prosthetic_limb/left_arm
value = -0.5

/datum/quirk/prosthetic_limb/right_arm
value = -0.5

/datum/quirk/prosthetic_limb/left_leg
value = -0.5

/datum/quirk/prosthetic_limb/right_leg
value = -0.5
24 changes: 24 additions & 0 deletions modular_dripstation/code/datums/traits/positive.dm
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
/datum/quirk/psychopathic
name = "Psychopathic"
desc = "You often hear to yourself: Hey, secy, how many animals have you killed as a child?"
icon = "meh"
value = 5
mob_trait = TRAIT_PSYCHOPATHIC
mood_quirk = TRUE
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.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.6

/datum/quirk/apathetic
mob_trait = TRAIT_APATHETIC
11 changes: 11 additions & 0 deletions modular_dripstation/code/game/effects/temporary_visuals/misc.dm
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
/obj/effect/temp_visual/annoyed
name = "annoyed"
icon = 'modular_dripstation/icons/effects/effects.dmi'
icon_state = "annoyed"
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)
7 changes: 7 additions & 0 deletions modular_dripstation/code/modules/antagonists/nukeop/nukeop.dm
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
/datum/antagonist/nukeop
antag_moodlet = /datum/mood_event/slaughter

/datum/antagonist/nukeop/on_gain()
. = ..()
equip_op()
Expand Down Expand Up @@ -25,6 +28,10 @@
purrbation_toggle_onlyhumans(H)
var/chosen_name = H.dna.species.random_name(H.gender,0,pick(GLOB.last_names))
owner.current.real_name = "[chosen_name]"
if(H.has_trauma_type(/datum/brain_trauma/severe/paralysis/paraplegic, TRAUMA_RESILIENCE_ABSOLUTE))
H.cure_trauma_type(/datum/brain_trauma/severe/paralysis/paraplegic, TRAUMA_RESILIENCE_ABSOLUTE) //you won it, gamer
if(is_blind(H))
H.cure_blind()

H.equipOutfit(nukeop_outfit)
return TRUE
Expand Down
3 changes: 3 additions & 0 deletions modular_dripstation/code/modules/surgery/surgery_step.dm
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
/datum/surgery_step/cause_ouchie(mob/user, mob/living/carbon/target, target_zone, obj/item/tool, success)
. = ..()
SEND_SIGNAL(target, COMSIG_ADD_MOOD_EVENT, "screw_up", /datum/mood_event/surgery)
Binary file added modular_dripstation/icons/effects/effects.dmi
Binary file not shown.
Loading

0 comments on commit 8b9f111

Please sign in to comment.