mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-28 07:38:05 +01:00
[MIRROR] Adds a minor negative quirk: Bad Touch (for the anti-huggers) (#2360)
* Adds a minor negative quirk: Bad Touch (for the anti-huggers) * caw caw * AAAA FIX INDENT Co-authored-by: MrMelbert <51863163+MrMelbert@users.noreply.github.com> Co-authored-by: Avunia Takiya <git@takiya.cloud>
This commit is contained in:
co-authored by
MrMelbert
Avunia Takiya
parent
5a50b64aa0
commit
50fbeb7f04
@@ -220,10 +220,12 @@
|
||||
#define COMSIG_ATOM_SET_LIGHT_FLAGS "atom_set_light_flags"
|
||||
///called for each movable in a turf contents on /turf/zImpact(): (atom/movable/A, levels)
|
||||
#define COMSIG_ATOM_INTERCEPT_Z_FALL "movable_intercept_z_impact"
|
||||
///called on a movable (NOT living) when someone starts pulling it (atom/movable/puller, state, force)
|
||||
///called on a movable (NOT living) when it starts pulling (atom/movable/pulled, state, force)
|
||||
#define COMSIG_ATOM_START_PULL "movable_start_pull"
|
||||
///called on /living when someone starts pulling it (atom/movable/puller, state, force)
|
||||
///called on /living when someone starts pulling (atom/movable/pulled, state, force)
|
||||
#define COMSIG_LIVING_START_PULL "living_start_pull"
|
||||
///called on /living when someone is pulled (mob/living/puller)
|
||||
#define COMSIG_LIVING_GET_PULLED "living_start_pulled"
|
||||
|
||||
/// from /datum/component/singularity/proc/can_move(), as well as /obj/energy_ball/proc/can_move()
|
||||
/// if a callback returns `SINGULARITY_TRY_MOVE_BLOCK`, then the singularity will not move to that turf
|
||||
@@ -470,8 +472,12 @@
|
||||
///From /obj/item/gun/proc/check_botched()
|
||||
#define COMSIG_MOB_CLUMSY_SHOOT_FOOT "mob_clumsy_shoot_foot"
|
||||
|
||||
///When a carbon mob hugs someone, this is called on the carbon mob.
|
||||
///When a carbon mob hugs someone, this is called on the carbon that is hugging. (mob/living/hugger, mob/living/hugged)
|
||||
#define COMSIG_CARBON_HUG "carbon_hug"
|
||||
///When a carbon mob is hugged, this is called on the carbon that is hugged. (mob/living/hugger)
|
||||
#define COMSIG_CARBON_HUGGED "carbon_hugged"
|
||||
///When a carbon mob is headpatted, this is called on the carbon that is headpatted. (mob/living/headpatter)
|
||||
#define COMSIG_CARBON_HEADPAT "carbon_headpatted"
|
||||
|
||||
///When a carbon slips. Called on /turf/open/handle_slip()
|
||||
#define COMSIG_ON_CARBON_SLIP "carbon_slip"
|
||||
|
||||
@@ -281,6 +281,7 @@ Remember to update _globalvars/traits.dm if you're adding/removing/renaming trai
|
||||
#define TRAIT_GRABWEAKNESS "grab_weakness"
|
||||
#define TRAIT_SNOB "snob"
|
||||
#define TRAIT_BALD "bald"
|
||||
#define TRAIT_BADTOUCH "bad_touch"
|
||||
///Trait for dryable items
|
||||
#define TRAIT_DRYABLE "trait_dryable"
|
||||
///Trait for dried items
|
||||
|
||||
@@ -153,7 +153,8 @@ GLOBAL_LIST_INIT(traits_by_type, list(
|
||||
"TRAIT_FRIENDLY" = TRAIT_FRIENDLY,
|
||||
"TRAIT_GRABWEAKNESS" = TRAIT_GRABWEAKNESS,
|
||||
"TRAIT_SNOB" = TRAIT_SNOB,
|
||||
"TRAIT_BALD" = TRAIT_BALD
|
||||
"TRAIT_BALD" = TRAIT_BALD,
|
||||
"TRAIT_BADTOUCH" = TRAIT_BADTOUCH
|
||||
|
||||
),
|
||||
/obj/item/bodypart = list(
|
||||
|
||||
@@ -20,7 +20,13 @@ PROCESSING_SUBSYSTEM_DEF(quirks)
|
||||
if(!quirks.len)
|
||||
SetupQuirks()
|
||||
|
||||
quirk_blacklist = list(list("Blind","Nearsighted"),list("Jolly","Depression","Apathetic","Hypersensitive"),list("Ageusia","Vegetarian","Deviant Tastes"),list("Ananas Affinity","Ananas Aversion"),list("Alcohol Tolerance","Light Drinker"),list("Clown Fan","Mime Fan"))
|
||||
quirk_blacklist = list(list("Blind","Nearsighted"), \
|
||||
list("Jolly","Depression","Apathetic","Hypersensitive"), \
|
||||
list("Ageusia","Vegetarian","Deviant Tastes"), \
|
||||
list("Ananas Affinity","Ananas Aversion"), \
|
||||
list("Alcohol Tolerance","Light Drinker"), \
|
||||
list("Clown Fan","Mime Fan"), \
|
||||
list("Bad Touch", "Friendly"))
|
||||
return ..()
|
||||
|
||||
/datum/controller/subsystem/processing/quirks/proc/SetupQuirks()
|
||||
|
||||
@@ -285,3 +285,13 @@
|
||||
/datum/mood_event/bald
|
||||
description ="<span class='warning'>I need something to cover my head...</span>\n"
|
||||
mood_change = -3
|
||||
|
||||
/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
|
||||
|
||||
@@ -735,6 +735,32 @@
|
||||
carbon_quirk_holder.vomit()
|
||||
carbon_quirk_holder.adjustOrganLoss(pick(ORGAN_SLOT_BRAIN,ORGAN_SLOT_APPENDIX,ORGAN_SLOT_LUNGS,ORGAN_SLOT_HEART,ORGAN_SLOT_LIVER,ORGAN_SLOT_STOMACH),10)
|
||||
|
||||
/datum/quirk/bad_touch
|
||||
name = "Bad Touch"
|
||||
desc = "You don't like hugs. You'd really prefer if people just left you alone."
|
||||
mob_trait = TRAIT_BADTOUCH
|
||||
value = -1
|
||||
gain_text = "<span class='danger'>You just want people to leave you alone.</span>"
|
||||
lose_text = "<span class='notice'>You could use a big hug.</span>"
|
||||
medical_record_text = "Patient has disdain for being touched. Potentially has undiagnosed haphephobia."
|
||||
mood_quirk = TRUE
|
||||
hardcore_value = 1
|
||||
|
||||
/datum/quirk/bad_touch/add()
|
||||
RegisterSignal(quirk_holder, list(COMSIG_LIVING_GET_PULLED, COMSIG_CARBON_HUGGED, COMSIG_CARBON_HEADPAT), .proc/uncomfortable_touch)
|
||||
|
||||
/datum/quirk/bad_touch/remove()
|
||||
UnregisterSignal(quirk_holder, list(COMSIG_LIVING_GET_PULLED, COMSIG_CARBON_HUGGED, COMSIG_CARBON_HEADPAT))
|
||||
|
||||
/datum/quirk/bad_touch/proc/uncomfortable_touch()
|
||||
SIGNAL_HANDLER
|
||||
|
||||
var/datum/component/mood/mood = quirk_holder.GetComponent(/datum/component/mood)
|
||||
if(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)
|
||||
|
||||
#undef LOCATION_LPOCKET
|
||||
#undef LOCATION_RPOCKET
|
||||
#undef LOCATION_BACKPACK
|
||||
|
||||
@@ -472,8 +472,11 @@
|
||||
//SKYRAT EDIT ADDITION END
|
||||
|
||||
else if(check_zone(M.zone_selected) == BODY_ZONE_HEAD) //Headpats!
|
||||
SEND_SIGNAL(src, COMSIG_CARBON_HEADPAT, M)
|
||||
M.visible_message("<span class='notice'>[M] gives [src] a pat on the head to make [p_them()] feel better!</span>", \
|
||||
"<span class='notice'>You give [src] a pat on the head to make [p_them()] feel better!</span>")
|
||||
null, "<span class='hear'>You hear a soft patter.</span>", DEFAULT_MESSAGE_RANGE, list(M, src))
|
||||
to_chat(M, "<span class='notice'>You give [src] a pat on the head to make [p_them()] feel better!</span>")
|
||||
to_chat(src, "<span class='notice'>[M] gives you a pat on the head to make you feel better! </span>")
|
||||
//SKYRAT EDIT ADDITION BEGIN - EMOTES
|
||||
if(HAS_TRAIT(src, TRAIT_EXCITABLE))
|
||||
if(!src.dna.species.is_wagging_tail(src))
|
||||
@@ -481,6 +484,7 @@
|
||||
//SKYRAT EDIT ADDITION END
|
||||
|
||||
else
|
||||
SEND_SIGNAL(src, COMSIG_CARBON_HUGGED, M)
|
||||
SEND_SIGNAL(M, COMSIG_CARBON_HUG, M, src)
|
||||
M.visible_message("<span class='notice'>[M] hugs [src] to make [p_them()] feel better!</span>", \
|
||||
null, "<span class='hear'>You hear the rustling of clothes.</span>", DEFAULT_MESSAGE_RANGE, list(M, src))
|
||||
@@ -489,11 +493,15 @@
|
||||
|
||||
// Warm them up with hugs
|
||||
share_bodytemperature(M)
|
||||
if(bodytemperature > M.bodytemperature)
|
||||
SEND_SIGNAL(M, COMSIG_ADD_MOOD_EVENT, "hug", /datum/mood_event/warmhug, src) // Hugger got a warm hug
|
||||
SEND_SIGNAL(src, COMSIG_ADD_MOOD_EVENT, "hug", /datum/mood_event/hug) // Reciver always gets a mood for being hugged
|
||||
else
|
||||
SEND_SIGNAL(src, COMSIG_ADD_MOOD_EVENT, "hug", /datum/mood_event/warmhug, M) // You got a warm hug
|
||||
|
||||
// No moodlets for people who hate touches
|
||||
if(!HAS_TRAIT(src, TRAIT_BADTOUCH))
|
||||
if(bodytemperature > M.bodytemperature)
|
||||
if(!HAS_TRAIT(M, TRAIT_BADTOUCH))
|
||||
SEND_SIGNAL(M, COMSIG_ADD_MOOD_EVENT, "hug", /datum/mood_event/warmhug, src) // Hugger got a warm hug (Unless they hate hugs)
|
||||
SEND_SIGNAL(src, COMSIG_ADD_MOOD_EVENT, "hug", /datum/mood_event/hug) // Reciver always gets a mood for being hugged
|
||||
else
|
||||
SEND_SIGNAL(src, COMSIG_ADD_MOOD_EVENT, "hug", /datum/mood_event/warmhug, M) // You got a warm hug
|
||||
|
||||
// Let people know if they hugged someone really warm or really cold
|
||||
if(M.bodytemperature > BODYTEMP_HEAT_DAMAGE_LIMIT)
|
||||
@@ -507,12 +515,13 @@
|
||||
to_chat(M, "<span class='warning'>It feels like [src] is freezing as you hug them.</span>")
|
||||
|
||||
if(HAS_TRAIT(M, TRAIT_FRIENDLY))
|
||||
var/datum/component/mood/mood = M.GetComponent(/datum/component/mood)
|
||||
if (mood.sanity >= SANITY_GREAT)
|
||||
var/datum/component/mood/hugger_mood = M.GetComponent(/datum/component/mood)
|
||||
if (hugger_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)
|
||||
else if (hugger_mood.sanity >= SANITY_DISTURBED)
|
||||
SEND_SIGNAL(src, COMSIG_ADD_MOOD_EVENT, "friendly_hug", /datum/mood_event/betterhug, M)
|
||||
|
||||
AdjustStun(-60)
|
||||
AdjustKnockdown(-60)
|
||||
AdjustUnconscious(-60)
|
||||
|
||||
@@ -311,6 +311,7 @@
|
||||
M.LAssailant = usr
|
||||
if(isliving(M))
|
||||
var/mob/living/L = M
|
||||
SEND_SIGNAL(M, COMSIG_LIVING_GET_PULLED, src)
|
||||
//Share diseases that are spread by touch
|
||||
for(var/thing in diseases)
|
||||
var/datum/disease/D = thing
|
||||
|
||||
Reference in New Issue
Block a user