Ради вашего удобства наш сайт использует cookies! Узнать больше! Мы используем cookies

Can't You See I'm Busy

Introduction Have you ever lost a colonist because their Gourmand trait triggered in the middle of an insectoid raid? Did you ever get your immersion ruined in the middle of the combat because your most badass pawn lost their ♥♥♥♥ and decided fighting wasn't worth it? If these things happened to you and you hated it, this mod is for you. Initially, I made this mod for my own playthroughs, but my friends told me to publish it. Technicalities When a raid hits and your colonists are drafted, [b]Can't You See I'm Busy[/b] freezes need decay and blocks mental breaks so colonists focus on fighting instead of wandering off for a snack or having a mental breakdown. When combat ends, all needs resume decaying exactly where they left off. Needs are determined by the presence of hostile pawns in the map + the drafted status. [u]Yes, I am aware this can sorta be done with xenogenetics, but the mod lets you tweak everything. Refer to the image below.[/u] [img]https://waifuvault.moe/f/1e06fe1b-1b8e-4836-8f70-d66d2bb2af38/settings_screenshot.png[/img] [b]Features:[/b] [list] [*] Needs stop decaying while drafted and in active combat [*] Mental breaks are blocked during combat [*] Configurable decay rate per need (0–100%): fully frozen, partially slowed, or normal [*] 300-tick grace period after undrafting so needs don't spike immediately [*] Visual "Focused" hediff indicator on protected colonists [*] Pawns Incapable of Violence won't be affected [*] Mod settings panel with per-need sliders, "Freeze All" / "Normal All" buttons, and reset to defaults [/list] [img]https://waifuvault.moe/f/491ea7d5-f09d-4169-9654-eafd86d4be69/focused_tooltip.png[/img] Only applies to player colonists who are drafted, not downed, and capable of violence while hostiles are on the map. Requirements [list] [*] [url=https://steamcommunity.com/workshop/filedetails/?id=2009463077]Harmony[/url] [/list] Compability I tested with over 180 mods, from Vanilla Extended, all the way to... yes... CE TOO! But if you find a bug, mention me here and i'll try to fix it ASAP. It should work with any mods and be safe to remove/add mid-save. Expect one-time errors on removal though. Support Development If you enjoy this mod and want to support me: [url=https%3A%2F%2Fko-fi.com%2Fsum117][img]https://storage.ko-fi.com/cdn/kofi5.png[/img][/url][ko-fi.com] Thank you for helping me stay awake. Translations Chinese and Simplified Chinese translations made by @神崎次郎 [url=http%3A%2F%2F%28https%3A%2F%2Fsteamcommunity.com%2Fid%2Fyanzilme%29](https://steamcommunity.com/id/yanzilme)[/url] For Modders The hediff does not actually change the break state/anything. It is purely visual. The source of truth is in the C# implementation. [b]1. Need Decay[/b] A prefix snapshots all need levels before the vanilla tick, and a postfix interpolates between the pre-tick and post-tick values based on each need's configured decay rate. At 0% decay, needs are completely frozen. At 50%, they decay at half speed. [b]2. Mental Break Blocking[/b] Intercepts [i]MentalStateHandler.TryStartMentalState()[/i] and prevents mental breaks from firing on eligible pawns, sending a notification letter instead. A [i]CombatStateCache[/i] map component tracks hostiles, draft states, and grace periods. The [i]FocusedHediffManager[/i] reconciles the visual hediff indicator every 60 ticks to handle edge cases like saving/loading and mid-combat state changes.