Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implemented the Feeble quirk #4024

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions code/__DEFINES/traits/monkestation/declarations.dm
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@
// Traits given by quirks
#define TRAIT_ANIME "anime"
#define TRAIT_CAT "cat"
#define TRAIT_FEEBLE "feeble"
#define TRAIT_GOURMAND "gourmand"
#define TRAIT_HIDDEN_CLOWN "clown_disbelief"
#define TRAIT_HIDDEN_IMAGE "generic-hidden-image"
Expand Down
3 changes: 3 additions & 0 deletions code/__DEFINES/~monkestation/blood_datums.dm
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,6 @@

/// Updating a mob's movespeed when lacking limbs. (list/modifiers)
#define COMSIG_LIVING_LIMBLESS_MOVESPEED_UPDATE "living_get_movespeed_modifiers"

/// Updating a mob's movespeed when they have the feeble trait. (list/modifiers)
#define COMSIG_LIVING_FEEBLE_MOVESPEED_UPDATE "living_get_movespeed_modifiers_feeble"
1 change: 1 addition & 0 deletions code/_globalvars/traits/_traits.dm
Original file line number Diff line number Diff line change
Expand Up @@ -228,6 +228,7 @@ GLOBAL_LIST_INIT(traits_by_type, list(
"TRAIT_FAST_CLIMBER" = TRAIT_FAST_CLIMBER,
"TRAIT_FAT" = TRAIT_FAT,
"TRAIT_FEARLESS" = TRAIT_FEARLESS,
"TRAIT_FEEBLE" = TRAIT_FEEBLE,
"TRAIT_FENCE_CLIMBER" = TRAIT_FENCE_CLIMBER,
"TRAIT_FINGERPRINT_PASSTHROUGH" = TRAIT_FINGERPRINT_PASSTHROUGH,
"TRAIT_FIXED_MUTANT_COLORS" = TRAIT_FIXED_MUTANT_COLORS,
Expand Down
6 changes: 5 additions & 1 deletion code/datums/components/riding/riding_vehicle.dm
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,7 @@
COOLDOWN_START(src, message_cooldown, 0.75 SECONDS)
return COMPONENT_DRIVER_BLOCK_MOVE
return ..()

/datum/component/riding/vehicle/speedbike
vehicle_move_delay = 0
override_allow_spacemove = TRUE
Expand Down Expand Up @@ -259,6 +259,10 @@
// special messaging for those without arms
/datum/component/riding/vehicle/wheelchair/hand/driver_move(obj/vehicle/vehicle_parent, mob/living/user, direction)
var/delay_multiplier = 4 // magic number from wheelchair code //MONKESTATION EDIT
//MONKESTATION EDIT START
if(HAS_TRAIT(user, TRAIT_FEEBLE))
delay_multiplier *= 2
//MONKESTATION EDIT END
vehicle_move_delay = round(CONFIG_GET(number/movedelay/run_delay) * delay_multiplier) / clamp(user.usable_hands, 1, 2)
return ..()

Expand Down
6 changes: 4 additions & 2 deletions code/datums/elements/climbable.dm
Original file line number Diff line number Diff line change
Expand Up @@ -67,10 +67,12 @@
adjusted_climb_time *= 0.25 //aliens are terrifyingly fast
if(HAS_TRAIT(user, TRAIT_FREERUNNING)) //do you have any idea how fast I am???
adjusted_climb_time *= 0.8
//monkestation edit - CYBERNETICS
//MONKESTATION EDIT START
if(HAS_TRAIT(user, TRAIT_FEEBLE)) //do you have any idea how slow I am???
adjusted_climb_time *= 1.25
if(HAS_TRAIT(user,TRAIT_FAST_CLIMBER)) //How it feels to chew 5 gum
adjusted_climb_time *= 0.3
//monkestation edit - CYBERNETICS
//MONKESTATION EDIT END
LAZYADDASSOCLIST(current_climbers, climbed_thing, user)
if(do_after(user, adjusted_climb_time, climbed_thing, interaction_key = DOAFTER_SOURCE_CLIMBING)) // monkestation edit: add an interaction key
if(QDELETED(climbed_thing)) //Checking if structure has been destroyed
Expand Down
4 changes: 4 additions & 0 deletions code/game/machinery/doors/airlock.dm
Original file line number Diff line number Diff line change
Expand Up @@ -1226,6 +1226,10 @@
if(istype(I, /obj/item/fireaxe) && !HAS_TRAIT(I, TRAIT_WIELDED)) //being fireaxe'd
to_chat(user, span_warning("You need to be wielding [I] to do that!"))
return
//MONKESTATION EDIT START
if(apply_feeble_delay(user, density ? "open" : "close"))
return FALSE
//MONKESTATION EDIT END
INVOKE_ASYNC(src, density ? PROC_REF(open) : PROC_REF(close), BYPASS_DOOR_CHECKS)

/obj/machinery/door/airlock/open(forced = DEFAULT_DOOR_CHECKS)
Expand Down
5 changes: 5 additions & 0 deletions code/game/objects/items/extinguisher.dm
Original file line number Diff line number Diff line change
Expand Up @@ -220,6 +220,11 @@
var/obj/B = user.buckled
var/movementdirection = turn(direction,180)
addtimer(CALLBACK(src, TYPE_PROC_REF(/obj/item/extinguisher, move_chair), B, movementdirection), 1)
//MONKESTATION EDIT START
else if(HAS_TRAIT(user, TRAIT_FEEBLE) && w_class > WEIGHT_CLASS_SMALL && prob(15) && isliving(user))
if(!feeble_quirk_recoil(user, direction, FALSE))
user.newtonian_move(turn(direction, 180))
//MONKESTATION EDIT END
else
user.newtonian_move(turn(direction, 180))

Expand Down
30 changes: 27 additions & 3 deletions code/game/objects/items/hand_items.dm
Original file line number Diff line number Diff line change
Expand Up @@ -225,6 +225,12 @@
user.do_attack_animation(slapped)

var/slap_volume = 50
//MONKESTATION EDIT START
var/feeble = HAS_TRAIT(slapped, TRAIT_FEEBLE)
var/no_harm = feeble && HAS_TRAIT(user, TRAIT_PACIFISM) && slapped != user
if(no_harm)
slap_volume *= 0.5
//MONKESTATION EDIT END
var/datum/status_effect/offering/kiss_check = slapped.has_status_effect(/datum/status_effect/offering)
if(kiss_check && istype(kiss_check.offered_item, /obj/item/hand_item/kisser) && (user in kiss_check.possible_takers))
user.visible_message(
Expand Down Expand Up @@ -268,11 +274,29 @@
)
else
user.visible_message(
span_danger("[user] slaps [slapped]!"),
span_notice("You slap [slapped]!"),
span_hear("You hear a slap."),
//MONKESTATION EDIT START
// span_danger("[user] slaps [slapped]!"), - MONKESTATION EDIT ORIGINAL
// span_notice("You slap [slapped]!"), - MONKESTATION EDIT ORIGINAL
// span_hear("You hear a slap."), - MONKESTATION EDIT ORIGINAL
span_danger("[user] [no_harm?"gently ":""]slaps [slapped]!"),
span_notice("You [no_harm?"gently ":""]slap [slapped]!"),
span_hear("You hear a [no_harm?"light ":""]slap."),
//MONKESTATION EDIT END
)
playsound(slapped, 'sound/weapons/slap.ogg', slap_volume, TRUE, -1)
//MONKESTATION EDIT START
if (feeble && !no_harm)
var/damage = 5
var/attack_direction = get_dir(user, slapped)
var/obj/item/bodypart/affecting = slapped.get_bodypart(slapped.get_random_valid_zone(user.zone_selected))
var/armor_block = slapped.run_armor_check(affecting, MELEE)
slapped.apply_damage(damage, BRUTE, affecting, armor_block, attack_direction = attack_direction)

slapped.visible_message(
span_danger("[user] hurt [slapped]!"),
span_userdanger("[user]'s slap really hurt!"),
)
//MONKESTATION EDIT END
return

/obj/item/hand_item/slapper/pre_attack_secondary(atom/target, mob/living/user, params)
Expand Down
4 changes: 4 additions & 0 deletions code/game/objects/items/robot/items/generic.dm
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,10 @@
else
user.visible_message(span_notice("[user] hugs [attacked_mob] to make [attacked_mob.p_them()] feel better!"), \
span_notice("You hug [attacked_mob] to make [attacked_mob.p_them()] feel better!"))
//MONKESTATION EDIT START
if(HAS_TRAIT(attacked_mob, TRAIT_FEEBLE))
feeble_quirk_wound_chest(attacked_mob, hugger=user)
//MONKESTATION EDIT END
if(attacked_mob.resting)
attacked_mob.set_resting(FALSE, TRUE)
else
Expand Down
8 changes: 8 additions & 0 deletions code/game/objects/structures/grille.dm
Original file line number Diff line number Diff line change
Expand Up @@ -190,6 +190,10 @@
if(shock(user, 100))
return
tool.play_tool_sound(src, 100)
//MONKESTATION EDIT START
if(feeble_quirk_slow_interact(user, "cut", src))
return
//MONKESTATION EDIT END
deconstruct()
return TOOL_ACT_TOOLTYPE_SUCCESS

Expand All @@ -201,6 +205,10 @@
return FALSE
if(!tool.use_tool(src, user, 0, volume=100))
return FALSE
//MONKESTATION EDIT START
if(feeble_quirk_slow_interact(user, "[anchored ? "unfasten" : "fasten"]", src))
return
//MONKESTATION EDIT END
set_anchored(!anchored)
user.visible_message(span_notice("[user] [anchored ? "fastens" : "unfastens"] [src]."), \
span_notice("You [anchored ? "fasten [src] to" : "unfasten [src] from"] the floor."))
Expand Down
4 changes: 4 additions & 0 deletions code/game/turfs/open/floor.dm
Original file line number Diff line number Diff line change
Expand Up @@ -194,6 +194,10 @@

/turf/open/floor/proc/pry_tile(obj/item/I, mob/user, silent = FALSE)
I.play_tool_sound(src, 80)
//MONKESTATION EDIT START
if(feeble_quirk_slow_interact(user, "remove", src))
return
//MONKESTATION EDIT END
return remove_tile(user, silent)

/turf/open/floor/proc/remove_tile(mob/user, silent = FALSE, make_tile = TRUE, force_plating)
Expand Down
18 changes: 18 additions & 0 deletions code/modules/food_and_drinks/machinery/microwave.dm
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,20 @@
var/ingredient_count = 0

for (var/atom/movable/ingredient as anything in ingredients)
//MONKESTATION EDIT START
// quick hack to make any living mobs in the microwave be drawn lying down
// hopefully this wont't break anything
var/mob/living/L = ingredient
var/lying_angle
if(istype(L))
lying_angle = L.get_lying_angle()
L.set_lying_angle(90)
//MONKESTATION EDIT END
var/image/ingredient_overlay = image(ingredient, src)
//MONKESTATION EDIT START
if(istype(L))
L.set_lying_angle(lying_angle)
//MONKESTATION EDIT END

var/icon/ingredient_icon = icon(ingredient.icon, ingredient.icon_state)

Expand Down Expand Up @@ -324,6 +337,11 @@
update_appearance()
return

//MONKESTATION EDIT START
if (istype(O, /obj/item/riding_offhand))
var/obj/item/riding_offhand/riding = O
return stuff_mob_in(riding.rider, user)
//MONKESTATION EDIT END
return ..()

/obj/machinery/microwave/attack_hand_secondary(mob/user, list/modifiers)
Expand Down
7 changes: 7 additions & 0 deletions code/modules/mob/emote.dm
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,13 @@
act = copytext(act, 1, custom_param)

act = lowertext(act)

//MONKESTATION EDIT START
// not a fan of this but I don't think there's a less hacky way to do it without changing how emotes work
if (HAS_TRAIT(src, TRAIT_FEEBLE) && !intentional && (act in list("scream", "screech", "screams", "screeches")))
act = pick("whimper", "cry")
//MONKESTATION EDIT END

var/list/key_emotes = GLOB.emote_list[act]

if(!length(key_emotes))
Expand Down
33 changes: 32 additions & 1 deletion code/modules/mob/living/carbon/carbon.dm
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,12 @@
var/turf/end_T = get_turf(target)
if(start_T && end_T)
log_combat(src, thrown_thing, "thrown", addition="grab from tile in [AREACOORD(start_T)] towards tile at [AREACOORD(end_T)]")
//MONKESTATION EDIT START
var/feeble = HAS_TRAIT(src, TRAIT_FEEBLE)
var/leg_aid = HAS_TRAIT(src, TRAIT_NO_LEG_AID)
if (feeble && !leg_aid && prob(buckled ? 45 : 15))
return fumble_throw_item(target, thrown_thing)
//MONKESTATION EDIT START
var/power_throw = 0
if(HAS_TRAIT(src, TRAIT_HULK))
power_throw++
Expand All @@ -155,6 +161,10 @@
power_throw++
if(neckgrab_throw)
power_throw++
//MONKESTATION EDIT START
if (feeble)
power_throw = 0
//MONKESTATION EDIT END
if(isitem(thrown_thing))
var/obj/item/thrown_item = thrown_thing
if(thrown_item.throw_verb)
Expand All @@ -164,7 +174,28 @@
log_message("has thrown [thrown_thing] [power_throw > 0 ? "really hard" : ""]", LOG_ATTACK)
var/extra_throw_range = HAS_TRAIT(src, TRAIT_THROWINGARM) ? 2 : 0
newtonian_move(get_dir(target, src))
thrown_thing.safe_throw_at(target, thrown_thing.throw_range + extra_throw_range, max(1,thrown_thing.throw_speed + power_throw), src, null, null, null, move_force)
//MONKESTATION EDIT START
var/total_throw_range = thrown_thing.throw_range + extra_throw_range
if (feeble)
total_throw_range = ceil(total_throw_range / (buckled ? 3 : 2))
// thrown_thing.safe_throw_at(target, thrown_thing.throw_range + extra_throw_range, max(1,thrown_thing.throw_speed + power_throw), src, null, null, null, move_force) - MONKESTATION EDIT ORIGINAL
thrown_thing.safe_throw_at(target, total_throw_range, max(1,thrown_thing.throw_speed + power_throw), src, null, null, null, move_force)
if (!feeble || body_position == LYING_DOWN || buckled)
return
var/bulky = FALSE
var/obj/item/I = thrown_thing
if (istype(I))
if (I.w_class > WEIGHT_CLASS_NORMAL || (thrown_thing.throwforce && !leg_aid))
bulky = I.w_class > WEIGHT_CLASS_NORMAL
else
return
if (!bulky && prob(50))
return
visible_message(span_danger("[src] looses [src.p_their()] balance."), \
span_danger("You loose your balance."))
Knockdown(2 SECONDS)

//MONKESTATION EDIT END

/mob/living/carbon/proc/canBeHandcuffed()
return FALSE
Expand Down
27 changes: 22 additions & 5 deletions code/modules/mob/living/carbon/carbon_defense.dm
Original file line number Diff line number Diff line change
Expand Up @@ -336,7 +336,10 @@
//Don't hit people through windows, ok?
if(!directional_blocked && SEND_SIGNAL(target_shove_turf, COMSIG_CARBON_DISARM_COLLIDE, src, target, shove_blocked) & COMSIG_CARBON_SHOVE_HANDLED)
return
if(directional_blocked || shove_blocked)
//MONKESTATION EDIT START
// if(directional_blocked || shove_blocked) - MONKESTATION EDIT ORIGINAL
if(directional_blocked || shove_blocked || HAS_TRAIT(target, TRAIT_FEEBLE))
//MONKESTATION EDIT END
target.Knockdown(SHOVE_KNOCKDOWN_SOLID)
target.visible_message(span_danger("[name] shoves [target.name], knocking [target.p_them()] down!"),
span_userdanger("You're knocked down from a shove by [name]!"), span_hear("You hear aggressive shuffling followed by a loud thud!"), COMBAT_MESSAGE_RANGE, src)
Expand Down Expand Up @@ -500,16 +503,30 @@
helper.add_mood_event("rippedtail", /datum/mood_event/rippedtail)

else
if (helper.grab_state >= GRAB_AGGRESSIVE)
//MONKESTATION EDIT START
var/feeble = HAS_TRAIT(src, TRAIT_FEEBLE)
var/gently = feeble && HAS_TRAIT(helper, TRAIT_PACIFISM) ? "gently " : null
// if (helper.grab_state >= GRAB_AGGRESSIVE) - MONKESTATION EDIT ORIGINAL
if (helper.grab_state >= GRAB_AGGRESSIVE && !gently)
//MONKESTATION EDIT END
helper.visible_message(span_notice("[helper] embraces [src] in a tight bear hug!"), \
null, span_hear("You hear the rustling of clothes."), DEFAULT_MESSAGE_RANGE, list(helper, src))
to_chat(helper, span_notice("You wrap [src] into a tight bear hug!"))
to_chat(src, span_notice("[helper] squeezes you super tightly in a firm bear hug!"))
else
helper.visible_message(span_notice("[helper] hugs [src] to make [p_them()] feel better!"), \
//MONKESTATION EDIT START
// helper.visible_message(span_notice("[helper] [gently]hugs [src] to make [p_them()] feel better!"), \ - MONKESTATION EDIT ORIGINAL
// null, span_hear("You hear the rustling of clothes."), DEFAULT_MESSAGE_RANGE, list(helper, src)) - MONKESTATION EDIT ORIGINAL
// to_chat(helper, span_notice("You [gently]hug [src] to make [p_them()] feel better!")) - MONKESTATION EDIT ORIGINAL
// to_chat(src, span_notice("[helper] [gently]hugs you to make you feel better!")) - MONKESTATION EDIT ORIGINAL
helper.visible_message(span_notice("[helper] [gently]hugs [src] to make [p_them()] feel better!"), \
null, span_hear("You hear the rustling of clothes."), DEFAULT_MESSAGE_RANGE, list(helper, src))
to_chat(helper, span_notice("You hug [src] to make [p_them()] feel better!"))
to_chat(src, span_notice("[helper] hugs you to make you feel better!"))
to_chat(helper, span_notice("You [gently]hug [src] to make [p_them()] feel better!"))
to_chat(src, span_notice("[helper] [gently]hugs you to make you feel better!"))

if (feeble && !gently)
feeble_quirk_wound_chest(src, hugger=helper, force=helper.grab_state >= GRAB_AGGRESSIVE)
//MONKESTATION EDIT END

// Warm them up with hugs
share_bodytemperature(helper)
Expand Down
9 changes: 8 additions & 1 deletion code/modules/mob/living/carbon/human/_species.dm
Original file line number Diff line number Diff line change
Expand Up @@ -1243,7 +1243,14 @@ GLOBAL_LIST_EMPTY(features_by_species)

var/armor_block = target.run_armor_check(affecting, MELEE)

playsound(target.loc, attacking_bodypart.unarmed_attack_sound, 25, TRUE, -1)
//MONKESTATION EDIT START
var/feeble = HAS_TRAIT(user, TRAIT_FEEBLE)
if (feeble)
damage *= 0.5
atk_verb = "weakly [atk_verb]"
// playsound(target.loc, attacking_bodypart.unarmed_attack_sound, 25, TRUE, -1) - MONKESTATION EDIT ORIGINAL
playsound(target.loc, attacking_bodypart.unarmed_attack_sound, feeble ? 10 : 25, TRUE, -1)
//MONKESTATION EDIT END

target.visible_message(span_danger("[user] [atk_verb]ed [target]!"), \
span_userdanger("You're [atk_verb]ed by [user]!"), span_hear("You hear a sickening sound of flesh hitting flesh!"), COMBAT_MESSAGE_RANGE, user)
Expand Down
6 changes: 6 additions & 0 deletions code/modules/mob/living/living.dm
Original file line number Diff line number Diff line change
Expand Up @@ -1086,6 +1086,12 @@
if(buckled || mob_negates_gravity())
return

//MONKESTATION EDIT START
if (pressure_difference > pressure_resistance && body_position != LYING_DOWN && HAS_TRAIT(src, TRAIT_FEEBLE))
Paralyze(1 SECONDS)
Knockdown(4 SECONDS)
emote("scream", intentional=FALSE)
//MONKESTATION EDIT END
if(client && client.move_delay >= world.time + world.tick_lag*2)
pressure_resistance_prob_delta -= 30

Expand Down
10 changes: 10 additions & 0 deletions code/modules/mob/living/living_defense.dm
Original file line number Diff line number Diff line change
Expand Up @@ -206,13 +206,23 @@
visible_message(span_danger("[src] is hit by [thrown_item]!"), \
span_userdanger("You're hit by [thrown_item]!"))
if(!thrown_item.throwforce)
//MONKESTATION EDIT START
if (HAS_TRAIT(src, TRAIT_FEEBLE) && body_position != LYING_DOWN && thrown_item.w_class > WEIGHT_CLASS_NORMAL && !buckled)
Knockdown(4 SECONDS)
emote("scream", intentional=FALSE)
//MONKESTATION EDIT END
return
var/armor = run_armor_check(zone, MELEE, "Your armor has protected your [parse_zone(zone)].", "Your armor has softened hit to your [parse_zone(zone)].", thrown_item.armour_penetration, "", FALSE, thrown_item.weak_against_armour)
apply_damage(thrown_item.throwforce, thrown_item.damtype, zone, armor, sharpness = thrown_item.get_sharpness(), wound_bonus = (nosell_hit * CANT_WOUND))
if(QDELETED(src)) //Damage can delete the mob.
return
if(body_position == LYING_DOWN) // physics says it's significantly harder to push someone by constantly chucking random furniture at them if they are down on the floor.
hitpush = FALSE
//MONKESTATION EDIT START
else if (HAS_TRAIT(src, TRAIT_FEEBLE) && thrown_item.w_class > WEIGHT_CLASS_SMALL && !buckled)
Knockdown(4 SECONDS)
emote("scream", intentional=FALSE)
//MONKESTATION EDIT END
return ..()

playsound(loc, 'sound/weapons/genhit.ogg', 50, TRUE, -1) //Item sounds are handled in the item itself
Expand Down
5 changes: 5 additions & 0 deletions code/modules/mob/living/living_movement.dm
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,11 @@
SEND_SIGNAL(src, COMSIG_LIVING_UPDATING_PULL_MOVESPEED)

if(pulling)
//MONKESTATION EDIT START
if (HAS_TRAIT(src, TRAIT_FEEBLE))
update_pull_movespeed_feeble()
return
//MONKESTATION EDIT END
if(isliving(pulling))
var/mob/living/L = pulling
if(!slowed_by_drag || L.body_position == STANDING_UP || L.buckled || grab_state >= GRAB_AGGRESSIVE)
Expand Down
12 changes: 12 additions & 0 deletions monkestation/code/datums/components/riding/riding_mob.dm
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
/datum/component/riding/creature/human/Initialize(mob/living/riding_mob, force = FALSE, ride_check_flags = NONE, potion_boost = FALSE)
. = ..()
var/mob/living/carbon/human/human_parent = parent
if (HAS_TRAIT(human_parent, TRAIT_FEEBLE))
human_parent.Paralyze(1 SECONDS)
human_parent.Knockdown(4 SECONDS)
human_parent.emote("scream", intentional=FALSE)
human_parent.adjustBruteLoss(15)
human_parent.visible_message(span_danger("The weight of [riding_mob] is too much for [human_parent]!"), \
span_userdanger("The weight of [riding_mob] is too much. You are crushed beneath [riding_mob.p_them()]!"))
playsound(human_parent.loc, 'sound/weapons/punch1.ogg', 35, TRUE, -1)
Unbuckle(riding_mob)
Loading
Loading