diff --git a/code/__DEFINES/fishing.dm b/code/__DEFINES/fishing.dm index 0fd2b13749e..9ec30afbb33 100644 --- a/code/__DEFINES/fishing.dm +++ b/code/__DEFINES/fishing.dm @@ -8,6 +8,8 @@ #define FAV_BAIT_DIFFICULTY_MOD -5 /// Difficulty modifier when bait is fish's disliked #define DISLIKED_BAIT_DIFFICULTY_MOD 15 +/// Difficulty modifier when our fisherman has the trait TRAIT_SETTLER +#define SETTLER_DIFFICULTY_MOD -5 #define FISH_TRAIT_MINOR_DIFFICULTY_BOOST 5 diff --git a/code/__DEFINES/traits.dm b/code/__DEFINES/traits.dm index 70b7e66671e..5c2e7ece5c5 100644 --- a/code/__DEFINES/traits.dm +++ b/code/__DEFINES/traits.dm @@ -795,6 +795,7 @@ Remember to update _globalvars/traits.dm if you're adding/removing/renaming trai #define TRAIT_SMOKER "smoker" #define TRAIT_POSTERBOY "poster_boy" #define TRAIT_THROWINGARM "throwing_arm" +#define TRAIT_SETTLER "settler" ///if the atom has a sticker attached to it #define TRAIT_STICKERED "stickered" diff --git a/code/_globalvars/traits.dm b/code/_globalvars/traits.dm index c566ccaf266..c996b633c17 100644 --- a/code/_globalvars/traits.dm +++ b/code/_globalvars/traits.dm @@ -158,6 +158,7 @@ GLOBAL_LIST_INIT(traits_by_type, list( "TRAIT_VORACIOUS" = TRAIT_VORACIOUS, "TRAIT_SELF_AWARE" = TRAIT_SELF_AWARE, "TRAIT_FREERUNNING" = TRAIT_FREERUNNING, + "TRAIT_SETTLER" = TRAIT_SETTLER, "TRAIT_SKITTISH" = TRAIT_SKITTISH, "TRAIT_PROSOPAGNOSIA" = TRAIT_PROSOPAGNOSIA, "TRAIT_TAGGER" = TRAIT_TAGGER, diff --git a/code/controllers/subsystem/processing/quirks.dm b/code/controllers/subsystem/processing/quirks.dm index 20b02be8b80..922f7c6b370 100644 --- a/code/controllers/subsystem/processing/quirks.dm +++ b/code/controllers/subsystem/processing/quirks.dm @@ -34,8 +34,9 @@ PROCESSING_SUBSYSTEM_DEF(quirks) list("Mute", "Soft-Spoken"), list("Stormtrooper Aim", "Big Hands"), list("Bilingual", "Foreigner"), - list("Spacer", "Paraplegic"), + list("Spacer", "Paraplegic", "Settler"), list("Photophobia", "Nyctophobia"), + list("Settler", "Freerunning"), ) /datum/controller/subsystem/processing/quirks/Initialize() diff --git a/code/datums/components/riding/riding_mob.dm b/code/datums/components/riding/riding_mob.dm index ba0d92226b6..b3a0f70ff6a 100644 --- a/code/datums/components/riding/riding_mob.dm +++ b/code/datums/components/riding/riding_mob.dm @@ -103,7 +103,27 @@ var/turf/next = get_step(living_parent, direction) step(living_parent, direction) last_move_diagonal = ((direction & (direction - 1)) && (living_parent.loc == next)) - COOLDOWN_START(src, vehicle_move_cooldown, (last_move_diagonal? 2 : 1) * vehicle_move_delay) + var/modified_move_cooldown = vehicle_move_cooldown + var/modified_move_delay = vehicle_move_delay + if(ishuman(user) && HAS_TRAIT(user, TRAIT_SETTLER)) + var/mob/living/carbon/human/settler_rider = user + switch(settler_rider.mob_mood.sanity_level) + if(SANITY_LEVEL_GREAT) + modified_move_cooldown *= 0.5 + modified_move_delay *= 0.5 + if(SANITY_LEVEL_NEUTRAL) + modified_move_cooldown *= 0.8 + modified_move_delay *= 0.8 + if(SANITY_LEVEL_DISTURBED) + modified_move_cooldown *= 1 + modified_move_delay *= 1 + if(SANITY_LEVEL_CRAZY) + modified_move_cooldown *= 1.2 + modified_move_delay *= 1.2 + if(SANITY_LEVEL_INSANE) + modified_move_cooldown *= 1.5 + modified_move_delay *= 1.5 + COOLDOWN_START(src, vehicle_move_cooldown = modified_move_cooldown, (last_move_diagonal ? 2 : 1) * modified_move_delay) return ..() /// Yeets the rider off, used for animals and cyborgs, redefined for humans who shove their piggyback rider off diff --git a/code/datums/components/tameable.dm b/code/datums/components/tameable.dm index fa342bbbbd4..2799934c2cb 100644 --- a/code/datums/components/tameable.dm +++ b/code/datums/components/tameable.dm @@ -43,10 +43,15 @@ return COMPONENT_CANCEL_ATTACK_CHAIN var/atom/atom_parent = source + var/inform_tamer = FALSE atom_parent.balloon_alert(attacker, "fed") + var/modified_tame_chance = current_tame_chance + if(HAS_TRAIT(attacker, TRAIT_SETTLER)) + modified_tame_chance += 50 + inform_tamer = TRUE if(unique || !already_friends(attacker)) - if(prob(current_tame_chance)) //note: lack of feedback message is deliberate, keep them guessing! - on_tame(source, attacker, food) + if(prob(modified_tame_chance)) //note: lack of feedback message is deliberate, keep them guessing unless they're an expert! + on_tame(source, attacker, food, inform_tamer) else current_tame_chance += bonus_tame_chance @@ -61,13 +66,16 @@ return living_parent.faction.Find(REF(potential_friend)) ///Ran once taming succeeds -/datum/component/tameable/proc/on_tame(datum/source, mob/living/tamer, atom/food) +/datum/component/tameable/proc/on_tame(datum/source, mob/living/tamer, atom/food, inform_tamer = FALSE) SIGNAL_HANDLER after_tame?.Invoke(tamer, food)//Run custom behavior if needed if(isliving(parent) && isliving(tamer)) var/mob/living/tamed = parent INVOKE_ASYNC(tamed, TYPE_PROC_REF(/mob/living, befriend), tamer) + if(inform_tamer) + var/atom/atom_parent = source + atom_parent.balloon_alert(tamer, "tamed") if(unique) qdel(src) diff --git a/code/datums/elements/climbable.dm b/code/datums/elements/climbable.dm index 64bb61e89ce..e953766571c 100644 --- a/code/datums/elements/climbable.dm +++ b/code/datums/elements/climbable.dm @@ -70,6 +70,9 @@ if(HAS_TRAIT(user, TRAIT_FREERUNNING)) //do you have any idea how fast I am??? adjusted_climb_time *= 0.8 adjusted_climb_stun *= 0.8 + if(HAS_TRAIT(user, TRAIT_SETTLER)) //hold on, gimme a moment, my tiny legs can't get over the goshdamn table + adjusted_climb_time *= 1.5 + adjusted_climb_stun *= 1.5 LAZYADDASSOCLIST(current_climbers, climbed_thing, user) if(do_after(user, adjusted_climb_time, climbed_thing)) if(QDELETED(climbed_thing)) //Checking if structure has been destroyed diff --git a/code/datums/quirks/positive_quirks/positive_quirks.dm b/code/datums/quirks/positive_quirks/positive_quirks.dm index f589689c134..6893b236ba1 100644 --- a/code/datums/quirks/positive_quirks/positive_quirks.dm +++ b/code/datums/quirks/positive_quirks/positive_quirks.dm @@ -362,3 +362,36 @@ /datum/quirk/item_quirk/signer/remove() qdel(quirk_holder.GetComponent(/datum/component/sign_language)) + +/datum/quirk/item_quirk/settler + name = "Settler" + desc = "You are from a lineage of the earliest space settlers! While your family's generational exposure to varying gravity \ + has resulted in a ... smaller height than is typical for your species, you make up for it by being much better at outdoorsmanship and \ + carrying heavy equipment. You also get along great with animals. However, you are a bit on the slow side due to your small legs." + gain_text = span_bold("You feel like the world is your oyster!") + lose_text = span_danger("You think you might stay home today.") + icon = FA_ICON_HOUSE + value = 4 + mob_trait = TRAIT_SETTLER + quirk_flags = QUIRK_HUMAN_ONLY|QUIRK_CHANGES_APPEARANCE + medical_record_text = "Patient appears to be abnormally stout." + mail_goodies = list( + /obj/item/clothing/shoes/workboots/mining, + /obj/item/gps, + ) + +/datum/quirk/item_quirk/settler/add_unique(client/client_source) + give_item_to_holder(/obj/item/storage/box/papersack/wheat, list(LOCATION_BACKPACK = ITEM_SLOT_BACKPACK, LOCATION_HANDS = ITEM_SLOT_HANDS)) + give_item_to_holder(/obj/item/storage/toolbox/fishing/small, list(LOCATION_BACKPACK = ITEM_SLOT_BACKPACK, LOCATION_HANDS = ITEM_SLOT_HANDS)) + var/mob/living/carbon/human/human_quirkholder = quirk_holder + human_quirkholder.set_mob_height(HUMAN_HEIGHT_SHORT) + human_quirkholder.add_movespeed_modifier(/datum/movespeed_modifier/settler) + human_quirkholder.physiology.hunger_mod *= 0.5 //good for you, shortass, you don't get hungry nearly as often + +/datum/quirk/item_quirk/settler/remove() + if(QDELING(quirk_holder)) + return + var/mob/living/carbon/human/human_quirkholder = quirk_holder + human_quirkholder.set_mob_height(HUMAN_HEIGHT_MEDIUM) + human_quirkholder.remove_movespeed_modifier(/datum/movespeed_modifier/settler) + human_quirkholder.physiology.hunger_mod *= 2 diff --git a/code/game/objects/items/storage/boxes/food_boxes.dm b/code/game/objects/items/storage/boxes/food_boxes.dm index fc32176139e..4e5ca1b3b63 100644 --- a/code/game/objects/items/storage/boxes/food_boxes.dm +++ b/code/game/objects/items/storage/boxes/food_boxes.dm @@ -143,6 +143,13 @@ for(var/i in 1 to 7) new /obj/item/food/meat/slab(src) +/obj/item/storage/box/papersack/wheat + desc = "It's a bit dusty, and smells like a barnyard." + +/obj/item/storage/box/papersack/wheat/PopulateContents() + for(var/i in 1 to 7) + new /obj/item/food/grown/wheat(src) + /obj/item/storage/box/ingredients //This box is for the randomly chosen version the chef used to spawn with, it shouldn't actually exist. name = "ingredients box" illustration = "fruit" diff --git a/code/modules/fishing/fishing_equipment.dm b/code/modules/fishing/fishing_equipment.dm index 0a5e697e271..51fbd8e2ed7 100644 --- a/code/modules/fishing/fishing_equipment.dm +++ b/code/modules/fishing/fishing_equipment.dm @@ -197,6 +197,18 @@ new /obj/item/fishing_hook(src) new /obj/item/fishing_line(src) +/obj/item/storage/toolbox/fishing/small + name = "compact fishing toolbox" + desc = "Contains everything you need for your fishing trip. Except for the bait." + w_class = WEIGHT_CLASS_NORMAL + force = 5 + throwforce = 5 + +/obj/item/storage/toolbox/fishing/small/PopulateContents() + new /obj/item/fishing_rod(src) + new /obj/item/fishing_hook(src) + new /obj/item/fishing_line(src) + /obj/item/storage/box/fishing_hooks name = "fishing hook set" diff --git a/code/modules/fishing/sources/_fish_source.dm b/code/modules/fishing/sources/_fish_source.dm index 5dc59898f3a..edcbd6b3cbf 100644 --- a/code/modules/fishing/sources/_fish_source.dm +++ b/code/modules/fishing/sources/_fish_source.dm @@ -44,6 +44,17 @@ GLOBAL_LIST_INIT(preset_fish_sources,init_fishing_configurations()) /datum/fish_source/proc/calculate_difficulty(result, obj/item/fishing_rod/rod, mob/fisherman, datum/fishing_challenge/challenge) . = fishing_difficulty + // Difficulty modifier added by having the Settler quirk + if(HAS_TRAIT(fisherman, TRAIT_SETTLER)) + . += SETTLER_DIFFICULTY_MOD + + // Difficulty modifier added by the fisher's skill level + if(!challenge || !(FISHING_MINIGAME_RULE_NO_EXP in challenge.special_effects)) + . += fisherman.mind?.get_skill_modifier(/datum/skill/fishing, SKILL_VALUE_MODIFIER) + + // Difficulty modifier added by the rod + . += rod.difficulty_modifier + if(!ispath(result,/obj/item/fish)) // In the future non-fish rewards can have variable difficulty calculated here return @@ -52,7 +63,7 @@ GLOBAL_LIST_INIT(preset_fish_sources,init_fishing_configurations()) var/obj/item/fish/caught_fish = result // Baseline fish difficulty . += initial(caught_fish.fishing_difficulty_modifier) - . += rod.difficulty_modifier + if(rod.bait) var/obj/item/bait = rod.bait @@ -67,9 +78,6 @@ GLOBAL_LIST_INIT(preset_fish_sources,init_fishing_configurations()) if(is_matching_bait(bait, bait_identifer)) . += DISLIKED_BAIT_DIFFICULTY_MOD - if(!challenge || !(FISHING_MINIGAME_RULE_NO_EXP in challenge.special_effects)) - . += fisherman.mind?.get_skill_modifier(/datum/skill/fishing, SKILL_VALUE_MODIFIER) - // Matching/not matching fish traits and equipment var/list/fish_traits = fish_list_properties[caught_fish][NAMEOF(caught_fish, fish_traits)] diff --git a/code/modules/mob/mob.dm b/code/modules/mob/mob.dm index 28a58b38558..82cc8832287 100644 --- a/code/modules/mob/mob.dm +++ b/code/modules/mob/mob.dm @@ -1455,6 +1455,8 @@ /mob/proc/update_equipment_speed_mods() var/speedies = equipped_speed_mods() + if(speedies > 0 && HAS_TRAIT(src, TRAIT_SETTLER)) //if our movespeed mod is in the negatives, we don't modify it since that's a benefit + speedies *= 0.2 if(!speedies) remove_movespeed_modifier(/datum/movespeed_modifier/equipment_speedmod) else diff --git a/code/modules/movespeed/modifiers/mobs.dm b/code/modules/movespeed/modifiers/mobs.dm index 89ab5cd5c17..59b514a3d57 100644 --- a/code/modules/movespeed/modifiers/mobs.dm +++ b/code/modules/movespeed/modifiers/mobs.dm @@ -168,5 +168,9 @@ /datum/movespeed_modifier/goliath_mount multiplicative_slowdown = -26 +/datum/movespeed_modifier/settler + multiplicative_slowdown = 0.2 + blacklisted_movetypes = FLOATING|FLYING + /datum/movespeed_modifier/basilisk_overheat multiplicative_slowdown = -18