边缘世界 RimWorld

边缘世界 RimWorld

43 个评价
Post Office: The Letter Filter
4
   
奖励
收藏
已收藏
取消收藏
Mod, 1.4, 1.5, 1.6
文件大小
发表于
更新日期
1.178 MB
2023 年 7 月 19 日 上午 6:46
7 月 29 日 上午 8:06
10 项改动说明 ( 查看 )

订阅以下载
Post Office: The Letter Filter

描述
Post Office allows you to mute certain types of letters and messages (yes, you can finally disable the "Legendary Work" messages, although you'll have to learn how to write regular expressions first, but hey, it's not that hard, I promise! ^^)

Why? Because I am playing with the "CAI 5000 - Advanced AI + Fog Of War" mod and those "Raid: [some faction]" or "Mechanoid cluster" incident letters kinda take some of the fun away of just having your colonists walk around a corner and be greeted by a bunch of angry tribals...

Have you always wanted to have mortar shells suddenly rain onto your base because you didn't notice you were being sieged?
Or have raiders appear on your door step completely out of the blue?
What about drop pods just suddenly crashing trough your roof into your storage area?

Welp, your wishes have been answered, I guess.
With Post Office, you can opt to globally disable certain letter types. For example, simply disable "ThreatBig" letters (the big red ones shown on the right) and all letters of that type (from all mods btw ^^) will be hidden.

Don't care about notifications that a new quest is available? Just disable "NewQuest" letters and you're good to go.

Why not simply use the "Silent Raids" mod? Because that one doesn't work for all mods (and because I struggled getting it to work with RimWar :P), soo yeah... now this mod exists ¯\_(ツ)_/¯

Requires Harmony to work.

Can be added and removed from your saves.

Source code: https://github.com/frederik-hoeft/post-office
热门讨论 查看全部(3)
11
2024 年 6 月 12 日 下午 3:15
Regular Expressions Help
Th3_Fr3d
2
2024 年 11 月 25 日 上午 9:03
Debug Actions Menu
Ayrlixx
2
2024 年 11 月 24 日 上午 5:48
Causes Error
XenoTheStrange
52 条留言
Geojak 9 月 18 日 上午 3:06 
their used to be a mod called "Letter Reorderer". It has not been updated for long time. it would fit well into yours
Geojak 9 月 18 日 上午 3:06 
i added the letter reoder feature to your mod

[HarmonyPatch(typeof(LetterStack), "ReceiveLetter", new Type[] { typeof(Letter), typeof(string), typeof(int), typeof(bool) })]
public static class LetterStack_ReceiveLetter_ReorderPatch
{
[HarmonyPostfix]
public static void Postfix(Letter let, int delayTicks, ref List<Letter> ___letters)
{
// ignore delayed letters or nulls
if (delayTicks > 0 || let == null || !let.CanShowInLetterStack)
return;

try
{
// remove and re-prepend to move the new letter to the front of the list
if (___letters != null && ___letters.Remove(let))
{
___letters = ___letters.Prepend(let).ToList();
}
}
catch (Exception ex)
{
Log.Error($"[Post Office] Error reordering letters: {ex}");
}
}
electrococaine 9 月 17 日 下午 12:41 
I think you can check how "Animal Filth? Don't Care" mod did it if you need to
electrococaine 9 月 17 日 下午 12:36 
can you please also make it work with those small text notifications that pop-up above weather and temperature (eg. "animal filth, "need meal source", "need holding platforms")
Eclipse 9 月 13 日 下午 6:11 
could you please make that cai thing for real fog of war mod?
Th3_Fr3d  [作者] 7 月 29 日 上午 8:07 
pushed the 1.6 update without support for CAI 5000 since it seems to have been discontinued for now
Th3_Fr3d  [作者] 7 月 28 日 上午 7:28 
The 1.6 version of this mod is now waiting for CAI 5000 - Advanced AI + Fog Of War to update, since it's a build dependency
Th3_Fr3d  [作者] 7 月 27 日 上午 8:45 
@Aegis Yes, I'll push a 1.6 update, hopefully in the next few weeks, when I have a little more time
Aegis 7 月 27 日 上午 8:23 
This mod is exactly what I was looking for (including regular expressions <3), except it doesn't work in 1.6 =( (the mod options are blank, opening them throws an error in the debug log).

Any chance someone is motivated enough to update this for 1.6?
Th3_Fr3d  [作者] 2024 年 11 月 25 日 上午 6:32 
@LeMestache I'd say one thing to be aware of is that Rimworld heavily uses the composite pattern and prefers delegation over inheritance, so you'll find rather generic concrete classes (like Pawn or Hediff) and the actual behavior is implemented by their components. Coming from more conventional OOP background it takes some getting used to, but it actually makes a lot of sense in terms of modding support. Anyways, I'm sure you'll figure it out. Good luck!