forked from yogstation13/Yogstation
-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ate_without_table debuf remove & some mood tweaks (#18)
* 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
Showing
27 changed files
with
278 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
#define TRAIT_PSYCHOPATHIC "psychopathic" | ||
#define TRAIT_APATHETIC "apathetic" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
File renamed without changes.
File renamed without changes.
15 changes: 15 additions & 0 deletions
15
modular_dripstation/code/datums/mood_events/generic_negative_events.dm
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
30 changes: 30 additions & 0 deletions
30
modular_dripstation/code/datums/mood_events/generic_positive_events.dm
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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
11
modular_dripstation/code/game/effects/temporary_visuals/misc.dm
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 not shown.
Oops, something went wrong.