feat(mech): localize work modes/jobs, update icons, and remove main tab patch
This commit is contained in:
@@ -1,23 +0,0 @@
|
||||
using HarmonyLib;
|
||||
using RimWorld;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using Verse;
|
||||
|
||||
namespace WulaFallenEmpire
|
||||
{
|
||||
[HarmonyPatch(typeof(MainTabWindow_Mechs), "Pawns", MethodType.Getter)]
|
||||
public static class Patch_MainTabWindow_Mechs_Pawns
|
||||
{
|
||||
[HarmonyPostfix]
|
||||
public static void Postfix(ref IEnumerable<Pawn> __result)
|
||||
{
|
||||
// 获取所有自主机械体
|
||||
var autonomousMechs = Find.CurrentMap.mapPawns.PawnsInFaction(Faction.OfPlayer)
|
||||
.Where(p => p.RaceProps.IsMechanoid && p.GetComp<CompAutonomousMech>()?.CanBeAutonomous == true);
|
||||
|
||||
// 将自主机械体合并到结果中,并去重
|
||||
__result = __result.Concat(autonomousMechs).Distinct();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -84,6 +84,7 @@ namespace WulaFallenEmpire
|
||||
public static DroneWorkModeDef Recharge;
|
||||
public static DroneWorkModeDef Shutdown;
|
||||
public static DroneWorkModeDef AutoFight;
|
||||
public static PawnTableDef WULA_AutonomousMechs;
|
||||
|
||||
static WulaDefOf()
|
||||
{
|
||||
|
||||
@@ -190,7 +190,6 @@
|
||||
<Compile Include="Pawn\WULA_AutonomousMech\ThinkNode_ConditionalWorkMode_Drone.cs" />
|
||||
<Compile Include="Pawn\WULA_AutonomousMech\ThinkNode_ConditionalLowEnergy_Drone.cs" />
|
||||
<Compile Include="HarmonyPatches\WULA_AutonomousMech\Patch_MechanitorUtility_EverControllable.cs" />
|
||||
<Compile Include="HarmonyPatches\WULA_AutonomousMech\Patch_MainTabWindow_Mechs_Pawns.cs" />
|
||||
<Compile Include="Pawn\WULA_AutonomousMech\CompAutonomousMech.cs" />
|
||||
<Compile Include="Pawn\WULA_AutonomousMech\ThinkNode_ConditionalAutonomousWorkMode.cs" />
|
||||
<Compile Include="Pawn\WULA_AutonomousMech\ThinkNode_ConditionalNeedRecharge.cs" />
|
||||
|
||||
Reference in New Issue
Block a user