feat: Blax Castes 1.0, work in progress
Castes bundle a pawn's apparel, food, drug and reading policy and medical
care. Join defaults put bought slaves, bought colonists, new colonists,
new slaves and new prisoners into a caste one tick after they join.
Includes the caste manager window, the Caste column in the Assign tab,
the join defaults window, Workshop art and the in-game test suite.
State: core and join defaults pass the suite (47 pass, 1 compat-only
skip). The manager window and Assign column were merged afterwards and
build, but the merged state has not run through the tests or review yet.
2026-11-28 22:22:36 +00:00
|
|
|
using Verse;
|
|
|
|
|
|
|
|
|
|
namespace BlaxCastes
|
|
|
|
|
{
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Shared mod detection. Castes has no hard dependency on any other mod and calls nothing in the
|
|
|
|
|
/// sibling Blax mods; they reach Castes, never the other way round.
|
feat: Castes 1.0 scope: schedule, work priorities, loadouts, automatic status changes
Starter castes, join rows on every status change, old caste on return, overlap warnings, review fixes, test runner switches (-NoDlc, -Dlc, -Tasoc), Blax footer, deterministic DLL.
2026-11-29 10:57:22 +00:00
|
|
|
///
|
|
|
|
|
/// Package ids of other mods, each read from the mod's own About/About.xml in its public source
|
|
|
|
|
/// repository (checked 2026-11-29):
|
|
|
|
|
/// - Better Pawn Control (Workshop 1541460369): github.com/voult2/BetterPawnControl, branch master.
|
|
|
|
|
/// - Better Pawn Control Forked (3724294345): github.com/KyleMHB/BetterPawnControlForked, branch master.
|
|
|
|
|
/// - 1trickPwnyta's Defaults (3285178686, Experimental 3522445452): github.com/1trickPwnyta/DefaultsMod,
|
|
|
|
|
/// branches master, 1.7 and experimental (the same id on all three).
|
|
|
|
|
/// - Automatic Slave Outfit (2912063732): github.com/bwiggin10/RimWorld-AutomaticSlaveOutfit, branch main
|
|
|
|
|
/// (its About/PublishedFileId.txt is 2912063732).
|
|
|
|
|
/// - PrisonerDefaults (3531556159): github.com/MSWS/PrisonerDefaults, branch main (PublishedFileId.txt 3531556159).
|
|
|
|
|
/// - Work Tab: github.com/fluffy-mods/WorkTab, branches 1.3 and 1.4 (the master About.xml predates package ids).
|
|
|
|
|
/// - Free Will: github.com/paul-freeman/rimworld-freewill, branch main (About and AboutUnstable).
|
|
|
|
|
/// - Work Manager (2029596262): github.com/LordKuper/rimworld-workmanager, branch master.
|
|
|
|
|
/// - AutoPriorities: github.com/Klok-e/RimWorld_Mod_AutoPriorities, branch master.
|
|
|
|
|
/// - WorkRoles: github.com/Spagles/rw.workroles, branch main (mod/About/About.xml).
|
|
|
|
|
/// None of these mods is installed on the test machine, so detection is tested with a simulated id.
|
|
|
|
|
/// - [1001] Weapons Tab Reborn (Workshop 2573988660): read from the installed Workshop copy's
|
|
|
|
|
/// About/About.xml (checked 2026-11-29); the mod's source is github.com/papercrane1001/-1001-WeaponsTabReborn.
|
|
|
|
|
/// It is installed on the test machine and loaded by run-tests.ps1 -Compat.
|
feat: Blax Castes 1.0, work in progress
Castes bundle a pawn's apparel, food, drug and reading policy and medical
care. Join defaults put bought slaves, bought colonists, new colonists,
new slaves and new prisoners into a caste one tick after they join.
Includes the caste manager window, the Caste column in the Assign tab,
the join defaults window, Workshop art and the in-game test suite.
State: core and join defaults pass the suite (47 pass, 1 compat-only
skip). The manager window and Assign column were merged afterwards and
build, but the merged state has not run through the tests or review yet.
2026-11-28 22:22:36 +00:00
|
|
|
/// </summary>
|
|
|
|
|
public static class Compat
|
|
|
|
|
{
|
|
|
|
|
public const string BlaxSlaves = "blax.slaves";
|
|
|
|
|
public const string BlaxZones = "blax.zones";
|
|
|
|
|
|
feat: Castes 1.0 scope: schedule, work priorities, loadouts, automatic status changes
Starter castes, join rows on every status change, old caste on return, overlap warnings, review fixes, test runner switches (-NoDlc, -Dlc, -Tasoc), Blax footer, deterministic DLL.
2026-11-29 10:57:22 +00:00
|
|
|
// Mods whose join defaults overlap with Castes (see OverlapWarnings).
|
|
|
|
|
public const string BetterPawnControl = "VouLT.BetterPawnControl";
|
|
|
|
|
public const string BetterPawnControlForked = "KyleMHB.BetterPawnControlForked";
|
|
|
|
|
public const string Defaults1trickPwnyta = "defaults.1trickPwnyta";
|
|
|
|
|
public const string AutomaticSlaveOutfit = "ben.automaticslaveoutfit";
|
|
|
|
|
public const string PrisonerDefaults = "MSWS.PrisonerDefaults";
|
|
|
|
|
|
|
|
|
|
// Automatic work managers, for the work priorities slot.
|
|
|
|
|
public const string WorkTab = "Fluffy.WorkTab";
|
|
|
|
|
public const string FreeWill = "freemapa.freewill";
|
|
|
|
|
public const string FreeWillUnstable = "freemapa.freewill.unstable";
|
|
|
|
|
public const string WorkManager = "LordKuper.WorkManager";
|
|
|
|
|
public const string AutoPriorities = "LokiVKlokeNaAndoke.AutoPriorities";
|
|
|
|
|
public const string WorkRoles = "mnmr.workroles";
|
|
|
|
|
|
|
|
|
|
/// <summary>The work managers that reset priorities on their own, so a fixed caste priority would fight them.</summary>
|
|
|
|
|
public static readonly string[] WorkManagers = { WorkTab, FreeWill, FreeWillUnstable, WorkManager, AutoPriorities, WorkRoles };
|
|
|
|
|
|
|
|
|
|
/// <summary>[1001] Weapons Tab Reborn, for the weapon loadout slot (see WeaponsTab).</summary>
|
|
|
|
|
public const string WeaponsTab = "papercrane1001.WeaponsTab";
|
|
|
|
|
|
feat: Blax Castes 1.0, work in progress
Castes bundle a pawn's apparel, food, drug and reading policy and medical
care. Join defaults put bought slaves, bought colonists, new colonists,
new slaves and new prisoners into a caste one tick after they join.
Includes the caste manager window, the Caste column in the Assign tab,
the join defaults window, Workshop art and the in-game test suite.
State: core and join defaults pass the suite (47 pass, 1 compat-only
skip). The manager window and Assign column were merged afterwards and
build, but the merged state has not run through the tests or review yet.
2026-11-28 22:22:36 +00:00
|
|
|
/// <summary>
|
|
|
|
|
/// Active by packageId, local or Steam copy. ModsConfig.IsActive misses a mod that is installed
|
|
|
|
|
/// both ways (the Steam copy gets a "_steam" postfix), so nothing in Blax Castes uses it.
|
|
|
|
|
/// </summary>
|
|
|
|
|
public static bool IsActive(string packageId) => ModLister.GetActiveModWithIdentifier(packageId, ignorePostfix: true) != null;
|
|
|
|
|
}
|
|
|
|
|
}
|