边缘世界 RimWorld

边缘世界 RimWorld

评价数不足
Pawn Sanitizer Framework
   
奖励
收藏
已收藏
取消收藏
Mod, 1.5, 1.6
文件大小
发表于
更新日期
677.217 KB
4 月 6 日 上午 8:00
9 月 23 日 上午 7:07
6 项改动说明 ( 查看 )

订阅以下载
Pawn Sanitizer Framework

在 emitbreaker 的 2 个合集中
MIM WH40k Mod Collection
50 件物品
MIM WH40k Mod Collection 1.6 Migration Completed
45 件物品
描述
To Non-modders
Just ignore this unless your modder asked you to add this into the list.

Summary
A small QoL mod for modders.

This mod provides a flexible framework for sanitizing pawns. Use it to:
  • Remove unwanted thoughts, needs, or hediffs (including needs forcefully added by other mods like Hygiene)
  • Prevent inspiration and mental breaks
  • Wipe memories, stop mental states, and clear inspiration

Apply via:
  • Hediffs (HediffComp_PawnSanitizer)
  • ThingDef/Race (CompPawnSanitizer)
  • ThingDef/Apparel or ThingDef/Equipment (CompPawnSanitizerApparel)
  • ThingDef/Consumables (CompUseEffect_PawnSanitizerConsumables)

Use Cases
  • Mindwiping brain chips
  • Synthetic lobotomies
  • Chaos corruption suppressors
  • Servitor override masks
  • Addiction cleansing drugs
  • Cult deprogramming kits
  • Nerve stabilizers

Core Features: For modders
🧠 Thought, Inspiration, and Mental State Blocking
Dynamically block specific or all ThoughtDef, InspirationDef, and MentalStateDef values at runtime. Includes full compatibility with Biotech moods and modded traits.

💉 Need & Hediff Removal
Strip hygiene, addiction, or custom modded needs/hediffs — perfect for cleansing implants, synthetic brains, or sterilization rituals.

🧥 Modular Triggers: Apparel, Consumables, Hediffs
Effects can be applied via:

Worn gear (CompPawnSanitizerApparel)

Ingested items (CompUseEffect_PawnSanitizerConsumables)

Hediff implants or injections (HediffComp_PawnSanitizer)

🧩 Fully Keyed Localization
All UI and tag strings are translation-ready (PawnSanitizer_XXX keys).

🗂️ Taggable Thought Categorization
Thoughts are grouped by [Mood], [Social], [Needs], [Memory], or [Situational] — or overridden with <sanitizerCategory> XML.

🛠️ Restoration Logic
When a source is removed (e.g., the hediff ends or apparel is dropped), the pawn’s original needs, hediffs, and mood behaviors are fully restored.

Examples
Main Functions




Thought Category Tagging (Optional)
You can tagging thought category for Global Thought Blocker (Experimental) uses.


Recent Update
16/4/2025:
Fixed XML error for sample hediff.
4 条留言
emitbreaker  [作者] 4 月 11 日 下午 12:13 
@da812manymonkey That's actually new findings for me when I review my code with ChatGPT XD Although, ChatGPT's coding isn't 100% trustworthy, this case works.
da812manymonkey 4 月 11 日 上午 11:46 
Interesting, I never thought of it that way. I'm not a coder. I dabble.
emitbreaker  [作者] 4 月 11 日 上午 10:02 
@da812manymonkey Actually, you don't need them. To make the error handling easier and remove dependency with individual mods, all those variables are considered as plain string, not individual needsdef. So if the string matches, needs will be removed. If not, the logic will be silently failed. This may lead to difficulty in debugging, but gives better compatibility to mod users.
da812manymonkey 4 月 9 日 上午 9:28 
I love the potential for what you have here. Found an error and got a fix for ya. In your brainwasher chip example line 32 should be <li Class="emitbreaker.PawnSanitizer.HediffCompProperties_PawnSanitizer"> and on lines 34 through 36 it would help compatibility if you added MayRequire="Dubwise.DubsBadHygiene" to those lines.