1
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
// Building_GlobalWorkTable.cs (调整为每秒处理)
|
||||
// 在 Building_GlobalWorkTable.cs 中移除材质相关代码
|
||||
using RimWorld;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
@@ -15,7 +15,7 @@ namespace WulaFallenEmpire
|
||||
private CompPowerTrader powerComp;
|
||||
private CompBreakdownable breakdownableComp;
|
||||
private int lastProcessTick = -1;
|
||||
private const int ProcessInterval = 1; // 改为每tick处理,以实现每秒1工作量
|
||||
private const int ProcessInterval = 1;
|
||||
|
||||
public Building_GlobalWorkTable()
|
||||
{
|
||||
@@ -35,12 +35,10 @@ namespace WulaFallenEmpire
|
||||
breakdownableComp = GetComp<CompBreakdownable>();
|
||||
}
|
||||
|
||||
// 在 Building_GlobalWorkTable 类中修改 Tick 方法
|
||||
protected override void Tick()
|
||||
{
|
||||
base.Tick();
|
||||
|
||||
// 修复:改为每60 ticks(1秒)处理一次,避免每tick处理导致的精度问题
|
||||
if (Find.TickManager.TicksGame % 60 == 0 &&
|
||||
Find.TickManager.TicksGame != lastProcessTick)
|
||||
{
|
||||
@@ -226,7 +224,7 @@ namespace WulaFallenEmpire
|
||||
return validSpots;
|
||||
}
|
||||
|
||||
// 新增:分配物品到空投舱
|
||||
// 简化:分配物品到空投舱,移除材质相关代码
|
||||
private List<List<Thing>> DistributeItemsToPods(GlobalStorageWorldComponent storage, int podCount)
|
||||
{
|
||||
List<List<Thing>> podContents = new List<List<Thing>>();
|
||||
@@ -266,7 +264,7 @@ namespace WulaFallenEmpire
|
||||
while (remainingCount > 0)
|
||||
{
|
||||
int stackSize = Mathf.Min(remainingCount, thingDef.stackLimit);
|
||||
Thing thing = ThingMaker.MakeThing(thingDef);
|
||||
Thing thing = ThingMaker.MakeThing(thingDef); // 不再传递材质参数
|
||||
thing.stackCount = stackSize;
|
||||
allItems.Add(thing);
|
||||
remainingCount -= stackSize;
|
||||
@@ -330,25 +328,6 @@ namespace WulaFallenEmpire
|
||||
kind.defaultFactionDef != buildingFaction.def)
|
||||
.ToList();
|
||||
|
||||
// 记录调试信息
|
||||
if (DebugSettings.godMode)
|
||||
{
|
||||
Log.Message($"[DEBUG] PawnKind selection for {pawnType.defName}:");
|
||||
Log.Message($" Building faction: {buildingFaction.def.defName}");
|
||||
Log.Message($" Matching faction kinds: {matchingFactionKinds.Count}");
|
||||
Log.Message($" No faction kinds: {noFactionKinds.Count}");
|
||||
Log.Message($" Excluded kinds: {excludedKinds.Count}");
|
||||
|
||||
foreach (var kind in matchingFactionKinds)
|
||||
Log.Message($" Matching: {kind.defName} (faction: {kind.defaultFactionDef?.defName ?? "null"})");
|
||||
|
||||
foreach (var kind in noFactionKinds)
|
||||
Log.Message($" No faction: {kind.defName}");
|
||||
|
||||
foreach (var kind in excludedKinds)
|
||||
Log.Message($" Excluded: {kind.defName} (faction: {kind.defaultFactionDef?.defName})");
|
||||
}
|
||||
|
||||
// 优先级选择
|
||||
PawnKindDef selectedKind = null;
|
||||
|
||||
@@ -356,15 +335,11 @@ namespace WulaFallenEmpire
|
||||
if (matchingFactionKinds.Count > 0)
|
||||
{
|
||||
selectedKind = matchingFactionKinds.RandomElement();
|
||||
if (DebugSettings.godMode)
|
||||
Log.Message($"[DEBUG] Selected matching faction kind: {selectedKind.defName}");
|
||||
}
|
||||
// 2. 备选:没有defaultFactionDef的PawnKind
|
||||
else if (noFactionKinds.Count > 0)
|
||||
{
|
||||
selectedKind = noFactionKinds.RandomElement();
|
||||
if (DebugSettings.godMode)
|
||||
Log.Message($"[DEBUG] Selected no-faction kind: {selectedKind.defName}");
|
||||
}
|
||||
// 3. 没有符合条件的PawnKind
|
||||
else
|
||||
@@ -376,7 +351,6 @@ namespace WulaFallenEmpire
|
||||
return selectedKind;
|
||||
}
|
||||
|
||||
|
||||
// 新增:创建空投舱
|
||||
private bool CreateDropPod(IntVec3 dropCell, List<Thing> contents)
|
||||
{
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// GlobalProductionOrder.cs (修正材质属性读取)
|
||||
// GlobalProductionOrder.cs (移除所有材质相关代码)
|
||||
using RimWorld;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
@@ -15,9 +15,6 @@ namespace WulaFallenEmpire
|
||||
public int currentCount = 0;
|
||||
public bool paused = true;
|
||||
|
||||
// 材质选择:存储配方选择的材质(只有支持材质的配方才有)
|
||||
public ThingDef chosenStuff = null;
|
||||
|
||||
// 生产状态
|
||||
public ProductionState state = ProductionState.Waiting;
|
||||
|
||||
@@ -45,28 +42,6 @@ namespace WulaFallenEmpire
|
||||
}
|
||||
}
|
||||
|
||||
// 新增:检查订单是否已经开始生产(一旦开始就不能修改材质)
|
||||
public bool HasStartedProduction => state == ProductionState.Producing || currentCount > 0;
|
||||
|
||||
// 修正:检查产物是否支持材质选择
|
||||
public bool SupportsStuffChoice
|
||||
{
|
||||
get
|
||||
{
|
||||
if (recipe?.products == null || recipe.products.Count == 0)
|
||||
return false;
|
||||
|
||||
var productDef = recipe.products[0].thingDef;
|
||||
if (productDef == null)
|
||||
return false;
|
||||
|
||||
// 检查产物是否有stuffCategories且costStuffCount > 0
|
||||
return productDef.stuffCategories != null &&
|
||||
productDef.stuffCategories.Count > 0 &&
|
||||
productDef.costStuffCount > 0;
|
||||
}
|
||||
}
|
||||
|
||||
// 修正:获取产物的ThingDef
|
||||
public ThingDef ProductDef => recipe?.products?.Count > 0 ? recipe.products[0].thingDef : null;
|
||||
|
||||
@@ -78,62 +53,22 @@ namespace WulaFallenEmpire
|
||||
Scribe_Values.Look(ref paused, "paused", true);
|
||||
Scribe_Values.Look(ref _progress, "progress", 0f);
|
||||
Scribe_Values.Look(ref state, "state", ProductionState.Waiting);
|
||||
Scribe_Defs.Look(ref chosenStuff, "chosenStuff");
|
||||
|
||||
// 修复:加载后验证数据
|
||||
if (Scribe.mode == LoadSaveMode.PostLoadInit)
|
||||
{
|
||||
progress = _progress;
|
||||
UpdateState();
|
||||
|
||||
// 确保材质选择有效
|
||||
if (SupportsStuffChoice && chosenStuff == null)
|
||||
{
|
||||
InitializeStuffChoice();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// 修正:初始化材质选择
|
||||
public void InitializeStuffChoice()
|
||||
{
|
||||
if (!SupportsStuffChoice) return;
|
||||
|
||||
var availableStuff = GetAvailableStuffForProduct();
|
||||
|
||||
if (availableStuff.Count > 0)
|
||||
{
|
||||
chosenStuff = availableStuff[0];
|
||||
}
|
||||
}
|
||||
|
||||
// 修正:获取产物的可用材质列表
|
||||
public List<ThingDef> GetAvailableStuffForProduct()
|
||||
{
|
||||
var availableStuff = new List<ThingDef>();
|
||||
|
||||
if (ProductDef?.stuffCategories != null)
|
||||
{
|
||||
foreach (var stuffCategory in ProductDef.stuffCategories)
|
||||
{
|
||||
var stuffInCategory = DefDatabase<ThingDef>.AllDefs
|
||||
.Where(def => def.IsStuff && def.stuffProps?.categories != null && def.stuffProps.categories.Contains(stuffCategory))
|
||||
.ToList();
|
||||
|
||||
availableStuff.AddRange(stuffInCategory);
|
||||
}
|
||||
}
|
||||
|
||||
return availableStuff.Distinct().ToList();
|
||||
}
|
||||
|
||||
// 修正:HasEnoughResources 方法,考虑选择的材质
|
||||
// 简化:HasEnoughResources 方法,移除材质检查
|
||||
public bool HasEnoughResources()
|
||||
{
|
||||
var globalStorage = Find.World.GetComponent<GlobalStorageWorldComponent>();
|
||||
if (globalStorage == null) return false;
|
||||
|
||||
// 检查固定消耗(costList)
|
||||
// 只检查固定消耗(costList)
|
||||
foreach (var ingredient in recipe.ingredients)
|
||||
{
|
||||
bool hasEnoughForThisIngredient = false;
|
||||
@@ -154,26 +89,16 @@ namespace WulaFallenEmpire
|
||||
return false;
|
||||
}
|
||||
|
||||
// 检查材质消耗(如果支持材质选择)
|
||||
if (SupportsStuffChoice && chosenStuff != null)
|
||||
{
|
||||
int requiredStuffCount = ProductDef.costStuffCount;
|
||||
int availableStuffCount = globalStorage.GetInputStorageCount(chosenStuff);
|
||||
|
||||
if (availableStuffCount < requiredStuffCount)
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
// 修正:ConsumeResources 方法,考虑选择的材质
|
||||
// 简化:ConsumeResources 方法,移除材质消耗
|
||||
public bool ConsumeResources()
|
||||
{
|
||||
var globalStorage = Find.World.GetComponent<GlobalStorageWorldComponent>();
|
||||
if (globalStorage == null) return false;
|
||||
|
||||
// 消耗固定资源(costList)
|
||||
// 只消耗固定资源(costList)
|
||||
foreach (var ingredient in recipe.ingredients)
|
||||
{
|
||||
bool consumedThisIngredient = false;
|
||||
@@ -197,19 +122,10 @@ namespace WulaFallenEmpire
|
||||
return false;
|
||||
}
|
||||
|
||||
// 消耗材质(如果支持材质选择)
|
||||
if (SupportsStuffChoice && chosenStuff != null)
|
||||
{
|
||||
int requiredStuffCount = ProductDef.costStuffCount;
|
||||
|
||||
if (!globalStorage.RemoveFromInputStorage(chosenStuff, requiredStuffCount))
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
// 修正:GetIngredientsTooltip 方法,显示固定消耗和可选材质
|
||||
// 简化:GetIngredientsTooltip 方法,只显示固定消耗
|
||||
public string GetIngredientsTooltip()
|
||||
{
|
||||
StringBuilder sb = new StringBuilder();
|
||||
@@ -240,34 +156,6 @@ namespace WulaFallenEmpire
|
||||
}
|
||||
}
|
||||
|
||||
// 材质消耗(如果支持材质选择)
|
||||
if (SupportsStuffChoice)
|
||||
{
|
||||
sb.AppendLine();
|
||||
sb.AppendLine("WULA_StuffMaterial".Translate() + ":");
|
||||
|
||||
if (chosenStuff != null)
|
||||
{
|
||||
int requiredStuffCount = ProductDef.costStuffCount;
|
||||
int availableStuffCount = globalStorage?.GetInputStorageCount(chosenStuff) ?? 0;
|
||||
|
||||
string stuffDisplay = $"{requiredStuffCount} {chosenStuff.LabelCap}";
|
||||
|
||||
if (availableStuffCount >= requiredStuffCount)
|
||||
{
|
||||
sb.AppendLine($" <color=green>{stuffDisplay} (Selected)</color>");
|
||||
}
|
||||
else
|
||||
{
|
||||
sb.AppendLine($" <color=red>{stuffDisplay} (Selected)</color>");
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
sb.AppendLine($" <color=yellow>{"WULA_NoStuffSelected".Translate()}</color>");
|
||||
}
|
||||
}
|
||||
|
||||
// 产品
|
||||
sb.AppendLine();
|
||||
sb.AppendLine("WULA_Products".Translate() + ":");
|
||||
@@ -279,13 +167,6 @@ namespace WulaFallenEmpire
|
||||
// 工作量信息
|
||||
sb.AppendLine();
|
||||
sb.AppendLine("WULA_WorkAmount".Translate() + ": " + GetWorkAmount().ToStringWorkAmount());
|
||||
|
||||
// 添加材质选择状态信息
|
||||
if (HasStartedProduction && SupportsStuffChoice)
|
||||
{
|
||||
sb.AppendLine();
|
||||
sb.AppendLine("<color=yellow>Material choice is locked because production has started.</color>");
|
||||
}
|
||||
|
||||
return sb.ToString();
|
||||
}
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
// GlobalStorageWorldComponent.cs (移除材质相关存储)
|
||||
using LudeonTK;
|
||||
using RimWorld;
|
||||
using RimWorld.Planet;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using UnityEngine;
|
||||
using Verse;
|
||||
using UnityEngine;
|
||||
|
||||
namespace WulaFallenEmpire
|
||||
{
|
||||
@@ -111,6 +111,7 @@ namespace WulaFallenEmpire
|
||||
Log.Message("Added test resources to global storage");
|
||||
}
|
||||
}
|
||||
|
||||
[DebugAction("WULA", "Spawn All Products", actionType = DebugActionType.Action)]
|
||||
public static void DebugSpawnAllProducts()
|
||||
{
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// ITab_GlobalBills.cs (添加图标支持)
|
||||
// ITab_GlobalBills.cs (移除材质选择功能)
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
@@ -57,13 +57,6 @@ namespace WulaFallenEmpire
|
||||
{
|
||||
Find.WindowStack.Add(new FloatMenu(GenerateRecipeOptions()));
|
||||
}
|
||||
|
||||
// 绘制鼠标悬停信息 - 使用简单的Tooltip方式
|
||||
if (mouseoverOrder != null)
|
||||
{
|
||||
// 使用Tooltip显示材料信息,不绘制额外窗口
|
||||
// 信息已经在DoOrderRow中的TooltipHandler显示
|
||||
}
|
||||
}
|
||||
|
||||
// 新增:存储查看按钮
|
||||
@@ -72,8 +65,6 @@ namespace WulaFallenEmpire
|
||||
// 绘制按钮
|
||||
if (Widgets.ButtonText(rect, "WULA_ViewStorage".Translate()))
|
||||
{
|
||||
// 点击按钮时也可以做一些事情,比如打开详细存储窗口
|
||||
// 暂时只显示Tooltip
|
||||
SoundDefOf.Click.PlayOneShotOnCamera();
|
||||
}
|
||||
|
||||
@@ -111,7 +102,6 @@ namespace WulaFallenEmpire
|
||||
{
|
||||
foreach (var kvp in inputItems)
|
||||
{
|
||||
// 使用正确的图标格式并保留名称
|
||||
sb.AppendLine($" {kvp.Value} {kvp.Key.LabelCap}");
|
||||
}
|
||||
}
|
||||
@@ -136,21 +126,13 @@ namespace WulaFallenEmpire
|
||||
{
|
||||
foreach (var kvp in outputItems)
|
||||
{
|
||||
// 使用正确的图标格式并保留名称
|
||||
sb.AppendLine($" {kvp.Value} {kvp.Key.LabelCap}");
|
||||
}
|
||||
}
|
||||
|
||||
// 添加存储统计信息
|
||||
sb.AppendLine();
|
||||
sb.AppendLine("WULA_StorageStats".Translate());
|
||||
sb.AppendLine($" {inputItems.Count} {("WULA_InputItems".Translate())}");
|
||||
sb.AppendLine($" {outputItems.Count} {("WULA_OutputItems".Translate())}");
|
||||
|
||||
return sb.ToString();
|
||||
}
|
||||
|
||||
|
||||
// 修改:将开发者模式按钮改为上帝模式按钮
|
||||
private void DoGodModeButtons(Rect rect)
|
||||
{
|
||||
@@ -182,7 +164,6 @@ namespace WulaFallenEmpire
|
||||
globalStorage.AddToInputStorage(componentDef, 100);
|
||||
|
||||
Messages.Message("Added 200 Steel and 100 Components to global storage", MessageTypeDefOf.PositiveEvent);
|
||||
Log.Message("[GOD MODE] Added test resources");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -227,7 +208,6 @@ namespace WulaFallenEmpire
|
||||
}
|
||||
|
||||
Messages.Message($"Spawned {totalSpawned} items at worktable location", MessageTypeDefOf.PositiveEvent);
|
||||
Log.Message($"[GOD MODE] Spawned {totalSpawned} output products");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -271,7 +251,9 @@ namespace WulaFallenEmpire
|
||||
|
||||
Widgets.EndScrollView();
|
||||
return result;
|
||||
}// 在 ITab_GlobalBills.cs 中修正材质选择功能
|
||||
}
|
||||
|
||||
// 简化:DoOrderRow 方法,移除材质选择按钮
|
||||
private bool DoOrderRow(Rect rect, GlobalProductionOrder order)
|
||||
{
|
||||
Widgets.DrawHighlightIfMouseover(rect);
|
||||
@@ -351,17 +333,6 @@ namespace WulaFallenEmpire
|
||||
Rect pauseButtonRect = new Rect(currentX - buttonWidth, buttonY, buttonWidth, 25f);
|
||||
currentX -= (buttonWidth + buttonSpacing);
|
||||
|
||||
// 材质选择按钮(如果支持材质选择且未开始生产)
|
||||
Rect stuffButtonRect = new Rect(0f, 0f, 0f, 0f);
|
||||
bool showStuffButton = false;
|
||||
|
||||
if (order.SupportsStuffChoice && !order.HasStartedProduction)
|
||||
{
|
||||
showStuffButton = true;
|
||||
stuffButtonRect = new Rect(currentX - buttonWidth, buttonY, buttonWidth, 25f);
|
||||
currentX -= (buttonWidth + buttonSpacing);
|
||||
}
|
||||
|
||||
// 上帝模式:立刻完成按钮
|
||||
Rect completeButtonRect = new Rect(currentX - buttonWidth, buttonY, buttonWidth, 25f);
|
||||
|
||||
@@ -381,29 +352,6 @@ namespace WulaFallenEmpire
|
||||
SoundDefOf.Click.PlayOneShotOnCamera();
|
||||
}
|
||||
|
||||
// 绘制材质选择按钮
|
||||
if (showStuffButton)
|
||||
{
|
||||
string stuffButtonText = order.chosenStuff != null ?
|
||||
order.chosenStuff.LabelCap :
|
||||
"WULA_ChooseStuff".Translate();
|
||||
|
||||
if (Widgets.ButtonText(stuffButtonRect, stuffButtonText))
|
||||
{
|
||||
ShowStuffSelectionMenu(order);
|
||||
SoundDefOf.Click.PlayOneShotOnCamera();
|
||||
}
|
||||
|
||||
// 为材质选择按钮添加Tooltip
|
||||
if (Mouse.IsOver(stuffButtonRect))
|
||||
{
|
||||
string tooltip = order.chosenStuff != null ?
|
||||
$"WULA_CurrentStuff".Translate(order.chosenStuff.LabelCap) :
|
||||
"WULA_ChooseStuffTooltip".Translate();
|
||||
TooltipHandler.TipRegion(stuffButtonRect, tooltip);
|
||||
}
|
||||
}
|
||||
|
||||
// 绘制上帝模式按钮(仅上帝模式下可见)
|
||||
if (DebugSettings.godMode && order.state != GlobalProductionOrder.ProductionState.Completed)
|
||||
{
|
||||
@@ -438,104 +386,8 @@ namespace WulaFallenEmpire
|
||||
|
||||
return Mouse.IsOver(rect);
|
||||
}
|
||||
// 修正:显示材质选择菜单
|
||||
private void ShowStuffSelectionMenu(GlobalProductionOrder order)
|
||||
{
|
||||
if (order.HasStartedProduction)
|
||||
{
|
||||
Messages.Message("WULA_CannotChangeStuffAfterStart".Translate(), MessageTypeDefOf.RejectInput);
|
||||
return;
|
||||
}
|
||||
if (!order.SupportsStuffChoice)
|
||||
{
|
||||
Messages.Message("WULA_RecipeDoesNotSupportStuff".Translate(), MessageTypeDefOf.RejectInput);
|
||||
return;
|
||||
}
|
||||
var availableStuff = order.GetAvailableStuffForProduct();
|
||||
|
||||
if (availableStuff.Count == 0)
|
||||
{
|
||||
Messages.Message("WULA_NoStuffAvailable".Translate(), MessageTypeDefOf.RejectInput);
|
||||
return;
|
||||
}
|
||||
List<FloatMenuOption> options = new List<FloatMenuOption>();
|
||||
var globalStorage = Find.World.GetComponent<GlobalStorageWorldComponent>();
|
||||
|
||||
foreach (var stuffDef in availableStuff)
|
||||
{
|
||||
var stuffDefCopy = stuffDef;
|
||||
|
||||
// 计算所需数量
|
||||
int requiredStuffCount = order.ProductDef.costStuffCount;
|
||||
int availableCount = globalStorage?.GetInputStorageCount(stuffDefCopy) ?? 0;
|
||||
|
||||
// 构建显示文本
|
||||
string label = $"{stuffDefCopy.LabelCap} ({requiredStuffCount} needed)";
|
||||
if (availableCount < requiredStuffCount)
|
||||
{
|
||||
label += $" <color=red>(Only {availableCount} available)</color>";
|
||||
}
|
||||
else
|
||||
{
|
||||
label += $" <color=green>({availableCount} available)</color>";
|
||||
}
|
||||
|
||||
// 添加材质属性信息
|
||||
if (stuffDefCopy.stuffProps != null)
|
||||
{
|
||||
label += $"\n - {"WULA_Commonality".Translate()}: {stuffDefCopy.stuffProps.commonality}";
|
||||
if (stuffDefCopy.stuffProps.stuffAdjective != null)
|
||||
{
|
||||
label += $"\n - {"WULA_Adjective".Translate()}: {stuffDefCopy.stuffProps.stuffAdjective}";
|
||||
}
|
||||
}
|
||||
|
||||
options.Add(new FloatMenuOption(
|
||||
label: label,
|
||||
action: () =>
|
||||
{
|
||||
order.chosenStuff = stuffDefCopy;
|
||||
Messages.Message($"WULA_StuffSelected".Translate(stuffDefCopy.LabelCap), MessageTypeDefOf.TaskCompletion);
|
||||
},
|
||||
shownItemForIcon: stuffDefCopy
|
||||
));
|
||||
}
|
||||
|
||||
// 添加"自动选择"选项
|
||||
options.Add(new FloatMenuOption(
|
||||
label: "WULA_AutoSelectStuff".Translate(),
|
||||
action: () =>
|
||||
{
|
||||
// 选择库存最充足的材质
|
||||
var bestStuff = availableStuff
|
||||
.OrderByDescending(stuff => globalStorage?.GetInputStorageCount(stuff) ?? 0)
|
||||
.ThenBy(stuff => stuff.stuffProps?.commonality ?? 1f)
|
||||
.FirstOrDefault();
|
||||
|
||||
if (bestStuff != null)
|
||||
{
|
||||
order.chosenStuff = bestStuff;
|
||||
Messages.Message($"WULA_StuffAutoSelected".Translate(bestStuff.LabelCap), MessageTypeDefOf.TaskCompletion);
|
||||
}
|
||||
}
|
||||
));
|
||||
|
||||
// 添加"清除选择"选项(如果当前有选择)
|
||||
if (order.chosenStuff != null)
|
||||
{
|
||||
options.Add(new FloatMenuOption(
|
||||
label: "WULA_ClearStuffSelection".Translate(),
|
||||
action: () =>
|
||||
{
|
||||
order.chosenStuff = null;
|
||||
Messages.Message("WULA_StuffSelectionCleared".Translate(), MessageTypeDefOf.TaskCompletion);
|
||||
}
|
||||
));
|
||||
}
|
||||
|
||||
Find.WindowStack.Add(new FloatMenu(options));
|
||||
}
|
||||
// 修正:在添加订单时初始化材质选择
|
||||
// 简化:在添加订单时移除材质初始化
|
||||
private List<FloatMenuOption> GenerateRecipeOptions()
|
||||
{
|
||||
var options = new List<FloatMenuOption>();
|
||||
@@ -555,15 +407,8 @@ namespace WulaFallenEmpire
|
||||
paused = true
|
||||
};
|
||||
|
||||
// 初始化材质选择(如果支持)
|
||||
if (newOrder.SupportsStuffChoice)
|
||||
{
|
||||
newOrder.InitializeStuffChoice();
|
||||
}
|
||||
|
||||
SelTable.globalOrderStack.AddOrder(newOrder);
|
||||
SoundDefOf.Click.PlayOneShotOnCamera();
|
||||
Log.Message($"[DEBUG] Added order for {recipe.defName}");
|
||||
},
|
||||
shownItemForIcon: recipe.UIIconThing,
|
||||
thingStyle: null,
|
||||
@@ -659,7 +504,6 @@ namespace WulaFallenEmpire
|
||||
|
||||
// 显示完成消息
|
||||
Messages.Message($"GOD MODE: Completed order for {order.recipe.LabelCap} ({remainingCount} units)", MessageTypeDefOf.PositiveEvent);
|
||||
Log.Message($"[GOD MODE] Force completed order: {order.recipe.defName}, produced {remainingCount} units");
|
||||
}
|
||||
|
||||
public override void TabUpdate()
|
||||
|
||||
@@ -11,8 +11,8 @@ namespace WulaFallenEmpire
|
||||
public float activeSeverity = 0.5f; // 有能量且损伤时的严重性
|
||||
public float inactiveSeverity = 1.5f; // 其他情况的严重性
|
||||
public float minEnergyThreshold = 0.1f; // 最低能量阈值
|
||||
public float repairCostPerHP = 0.1f; // 每点生命值修复的能量消耗
|
||||
public int repairCooldownAfterDamage = 300; // 受到伤害后的修复冷却时间
|
||||
public float repairCostPerHP = 0.03f; // 每点生命值修复的能量消耗
|
||||
public int repairCooldownAfterDamage = 600; // 受到伤害后的修复冷却时间
|
||||
// 新增:与 StatDef 的关联
|
||||
public StatDef repairCostStatDef;
|
||||
public StatDef cooldownStatDef;
|
||||
|
||||
@@ -9,7 +9,7 @@ namespace WulaFallenEmpire
|
||||
{
|
||||
private NeedDefExtension_Energy ext;
|
||||
|
||||
private NeedDefExtension_Energy Ext
|
||||
public NeedDefExtension_Energy Ext
|
||||
{
|
||||
get
|
||||
{
|
||||
|
||||
@@ -8,7 +8,7 @@ namespace WulaFallenEmpire
|
||||
{
|
||||
public class Need_Maintenance : Need
|
||||
{
|
||||
private MaintenanceNeedExtension Extension => def.GetModExtension<MaintenanceNeedExtension>();
|
||||
public MaintenanceNeedExtension Extension => def.GetModExtension<MaintenanceNeedExtension>();
|
||||
|
||||
// 上次维护的天数
|
||||
private float daysSinceLastMaintenance = 0f;
|
||||
|
||||
180
Source/WulaFallenEmpire/Stat/StatWorker_Energy.cs
Normal file
180
Source/WulaFallenEmpire/Stat/StatWorker_Energy.cs
Normal file
@@ -0,0 +1,180 @@
|
||||
// StatWorker_Energy.cs - 处理能量相关的统计量
|
||||
using RimWorld;
|
||||
using Verse;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace WulaFallenEmpire
|
||||
{
|
||||
public class StatWorker_Energy : StatWorker
|
||||
{
|
||||
public override bool ShouldShowFor(StatRequest req)
|
||||
{
|
||||
if (!base.ShouldShowFor(req))
|
||||
return false;
|
||||
|
||||
// 处理 ThingDef 的情况(种族定义)
|
||||
if (req.Def is ThingDef thingDef)
|
||||
{
|
||||
// 检查是否为 WulaSpecies 种族
|
||||
return thingDef.defName == "WulaSpecies";
|
||||
}
|
||||
|
||||
// 检查是否为 Pawn
|
||||
if (req.Thing is Pawn pawn)
|
||||
{
|
||||
// 检查是否有能量需求
|
||||
return HasEnergyNeed(pawn);
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
public override float GetValueUnfinalized(StatRequest req, bool applyPostProcess = true)
|
||||
{
|
||||
// 关键修复:调用基类方法让 RimWorld 的统计系统处理所有修正
|
||||
float baseValue = base.GetValueUnfinalized(req, applyPostProcess);
|
||||
|
||||
if (req.Thing is Pawn pawn)
|
||||
{
|
||||
return GetStatValueForPawn(stat.defName, pawn, baseValue);
|
||||
}
|
||||
else if (req.Def is ThingDef thingDef && thingDef.defName == "WulaSpecies")
|
||||
{
|
||||
// 对于 WulaSpecies 种族,返回经过修正的值
|
||||
return GetDefaultValueForStat(stat.defName, baseValue);
|
||||
}
|
||||
|
||||
return baseValue;
|
||||
}
|
||||
|
||||
public override string GetExplanationUnfinalized(StatRequest req, ToStringNumberSense numberSense)
|
||||
{
|
||||
var explanation = base.GetExplanationUnfinalized(req, numberSense);
|
||||
|
||||
// 添加自定义解释
|
||||
if (req.Thing is Pawn pawn)
|
||||
{
|
||||
explanation += "\n\n" + GetEnergyExplanationForPawn(stat.defName, pawn);
|
||||
}
|
||||
else if (req.Def is ThingDef thingDef && thingDef.defName == "WulaSpecies")
|
||||
{
|
||||
explanation += "\n\n" + GetEnergyExplanationForRace(stat.defName);
|
||||
}
|
||||
|
||||
return explanation;
|
||||
}
|
||||
|
||||
private bool HasEnergyNeed(Pawn pawn)
|
||||
{
|
||||
// 使用反射或其他方式检查是否有能量需求,或者直接返回 true 对于 WulaSpecies
|
||||
if (pawn?.def?.defName == "WulaSpecies")
|
||||
return true;
|
||||
|
||||
// 如果有具体的能量需求类,可以在这里检查
|
||||
// return pawn?.needs?.TryGetNeed<Need_Energy>() != null;
|
||||
return false;
|
||||
}
|
||||
|
||||
private float GetStatValueForPawn(string statDefName, Pawn pawn, float baseValue)
|
||||
{
|
||||
// 对于 WulaSpecies 种族,返回基于其特性的值
|
||||
if (pawn.def.defName == "WulaSpecies")
|
||||
{
|
||||
switch (statDefName)
|
||||
{
|
||||
case "WulaEnergyMaxLevelOffset":
|
||||
return CalculateEnergyMaxLevelOffset(pawn, baseValue);
|
||||
|
||||
case "WulaEnergyFallRateFactor":
|
||||
return CalculateEnergyFallRateFactor(pawn, baseValue);
|
||||
|
||||
default:
|
||||
return baseValue;
|
||||
}
|
||||
}
|
||||
|
||||
return baseValue;
|
||||
}
|
||||
|
||||
private float GetDefaultValueForStat(string statDefName, float baseValue)
|
||||
{
|
||||
// 关键修复:使用基础值而不是固定值
|
||||
switch (statDefName)
|
||||
{
|
||||
case "WulaEnergyMaxLevelOffset":
|
||||
return baseValue; // 使用统计系统修正后的值
|
||||
|
||||
case "WulaEnergyFallRateFactor":
|
||||
return baseValue; // 使用统计系统修正后的值
|
||||
|
||||
default:
|
||||
return baseValue;
|
||||
}
|
||||
}
|
||||
|
||||
private float CalculateEnergyMaxLevelOffset(Pawn pawn, float baseValue)
|
||||
{
|
||||
// 计算能量上限偏移量,使用基础值作为起点
|
||||
// 这里可以根据 pawn 的特性计算
|
||||
return baseValue;
|
||||
}
|
||||
|
||||
private float CalculateEnergyFallRateFactor(Pawn pawn, float baseValue)
|
||||
{
|
||||
// 计算能量下降速率因子,使用基础值作为起点
|
||||
// 这里可以根据 pawn 的特性计算
|
||||
return baseValue;
|
||||
}
|
||||
|
||||
private string GetEnergyExplanationForPawn(string statDefName, Pawn pawn)
|
||||
{
|
||||
var explanation = "WULA_Energy_Properties".Translate();
|
||||
|
||||
switch (statDefName)
|
||||
{
|
||||
case "WulaEnergyMaxLevelOffset":
|
||||
explanation += "\n" + "WULA_Energy_MaxLevelOffset_PawnExplanation".Translate();
|
||||
break;
|
||||
|
||||
case "WulaEnergyFallRateFactor":
|
||||
explanation += "\n" + "WULA_Energy_FallRateFactor_PawnExplanation".Translate();
|
||||
break;
|
||||
}
|
||||
|
||||
return explanation;
|
||||
}
|
||||
|
||||
private string GetEnergyExplanationForRace(string statDefName)
|
||||
{
|
||||
var explanation = "WULA_Energy_RaceProperties".Translate();
|
||||
|
||||
switch (statDefName)
|
||||
{
|
||||
case "WulaEnergyMaxLevelOffset":
|
||||
explanation += "\n" + "WULA_Energy_MaxLevelOffset_RaceExplanation".Translate();
|
||||
break;
|
||||
|
||||
case "WulaEnergyFallRateFactor":
|
||||
explanation += "\n" + "WULA_Energy_FallRateFactor_RaceExplanation".Translate();
|
||||
break;
|
||||
}
|
||||
|
||||
return explanation;
|
||||
}
|
||||
|
||||
public override IEnumerable<Dialog_InfoCard.Hyperlink> GetInfoCardHyperlinks(StatRequest req)
|
||||
{
|
||||
foreach (var hyperlink in base.GetInfoCardHyperlinks(req))
|
||||
{
|
||||
yield return hyperlink;
|
||||
}
|
||||
|
||||
// 添加能量系统的超链接
|
||||
var energyNeedDef = DefDatabase<NeedDef>.GetNamedSilentFail("WULA_Energy");
|
||||
if (energyNeedDef != null)
|
||||
{
|
||||
yield return new Dialog_InfoCard.Hyperlink(energyNeedDef);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -23,6 +23,9 @@ namespace WulaFallenEmpire
|
||||
|
||||
public override float GetValueUnfinalized(StatRequest req, bool applyPostProcess = true)
|
||||
{
|
||||
// 关键修复:调用基类方法让 RimWorld 的统计系统处理所有修正
|
||||
float baseValue = base.GetValueUnfinalized(req, applyPostProcess);
|
||||
|
||||
if (req.Thing is Pawn pawn)
|
||||
{
|
||||
var maintenanceNeed = GetMaintenanceNeed(pawn);
|
||||
@@ -30,11 +33,11 @@ namespace WulaFallenEmpire
|
||||
|
||||
if (maintenanceNeed != null && extension != null)
|
||||
{
|
||||
return GetStatValueForMaintenance(stat.defName, maintenanceNeed, extension);
|
||||
return GetStatValueForMaintenance(stat.defName, maintenanceNeed, extension, baseValue);
|
||||
}
|
||||
}
|
||||
|
||||
return stat.defaultBaseValue;
|
||||
return baseValue;
|
||||
}
|
||||
|
||||
public override string GetExplanationUnfinalized(StatRequest req, ToStringNumberSense numberSense)
|
||||
@@ -71,30 +74,31 @@ namespace WulaFallenEmpire
|
||||
return maintenanceNeed?.Extension;
|
||||
}
|
||||
|
||||
private float GetStatValueForMaintenance(string statDefName, Need_Maintenance need, MaintenanceNeedExtension extension)
|
||||
private float GetStatValueForMaintenance(string statDefName, Need_Maintenance need, MaintenanceNeedExtension extension, float baseValue)
|
||||
{
|
||||
// 关键修复:使用基础值而不是固定值
|
||||
switch (statDefName)
|
||||
{
|
||||
case "WULA_MaintenanceDegradationFactor":
|
||||
return CalculateDegradationFactor(need, extension);
|
||||
return CalculateDegradationFactor(need, extension, baseValue);
|
||||
|
||||
case "WULA_MaintenanceStatusThresholdFactor":
|
||||
return CalculateStatusThresholdFactor(need, extension);
|
||||
return CalculateStatusThresholdFactor(need, extension, baseValue);
|
||||
|
||||
case "WULA_MaintenanceDamageToMaintenanceFactor":
|
||||
return CalculateDamageToMaintenanceFactor(need, extension);
|
||||
return CalculateDamageToMaintenanceFactor(need, extension, baseValue);
|
||||
|
||||
case "WULA_MaintenanceMinorBreakdownThresholdFactor":
|
||||
return CalculateMinorBreakdownThresholdFactor(need, extension);
|
||||
return CalculateMinorBreakdownThresholdFactor(need, extension, baseValue);
|
||||
|
||||
case "WULA_MaintenanceMajorBreakdownThresholdFactor":
|
||||
return CalculateMajorBreakdownThresholdFactor(need, extension);
|
||||
return CalculateMajorBreakdownThresholdFactor(need, extension, baseValue);
|
||||
|
||||
case "WULA_MaintenanceCriticalFailureThresholdFactor":
|
||||
return CalculateCriticalFailureThresholdFactor(need, extension);
|
||||
return CalculateCriticalFailureThresholdFactor(need, extension, baseValue);
|
||||
|
||||
default:
|
||||
return stat.defaultBaseValue;
|
||||
return baseValue;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -132,44 +136,44 @@ namespace WulaFallenEmpire
|
||||
return explanation;
|
||||
}
|
||||
|
||||
// 计算各种统计值的方法
|
||||
private float CalculateDegradationFactor(Need_Maintenance need, MaintenanceNeedExtension extension)
|
||||
// 计算各种统计值的方法 - 现在接受基础值参数
|
||||
private float CalculateDegradationFactor(Need_Maintenance need, MaintenanceNeedExtension extension, float baseValue)
|
||||
{
|
||||
// 基础退化速率乘数
|
||||
return 1.0f; // 默认值,可以根据需要调整
|
||||
// 基础退化速率乘数,使用统计系统修正后的值
|
||||
return baseValue;
|
||||
}
|
||||
|
||||
private float CalculateStatusThresholdFactor(Need_Maintenance need, MaintenanceNeedExtension extension)
|
||||
private float CalculateStatusThresholdFactor(Need_Maintenance need, MaintenanceNeedExtension extension, float baseValue)
|
||||
{
|
||||
// 状态阈值乘数
|
||||
return 1.0f; // 默认值,可以根据需要调整
|
||||
// 状态阈值乘数,使用统计系统修正后的值
|
||||
return baseValue;
|
||||
}
|
||||
|
||||
private float CalculateDamageToMaintenanceFactor(Need_Maintenance need, MaintenanceNeedExtension extension)
|
||||
private float CalculateDamageToMaintenanceFactor(Need_Maintenance need, MaintenanceNeedExtension extension, float baseValue)
|
||||
{
|
||||
// 伤害到维护度的转换因子
|
||||
return extension?.damageToMaintenanceFactor ?? 0.01f;
|
||||
// 伤害到维护度的转换因子,使用统计系统修正后的值
|
||||
return baseValue;
|
||||
}
|
||||
|
||||
private float CalculateMinorBreakdownThresholdFactor(Need_Maintenance need, MaintenanceNeedExtension extension)
|
||||
private float CalculateMinorBreakdownThresholdFactor(Need_Maintenance need, MaintenanceNeedExtension extension, float baseValue)
|
||||
{
|
||||
// 轻微故障阈值乘数
|
||||
return 1.0f; // 默认值
|
||||
// 轻微故障阈值乘数,使用统计系统修正后的值
|
||||
return baseValue;
|
||||
}
|
||||
|
||||
private float CalculateMajorBreakdownThresholdFactor(Need_Maintenance need, MaintenanceNeedExtension extension)
|
||||
private float CalculateMajorBreakdownThresholdFactor(Need_Maintenance need, MaintenanceNeedExtension extension, float baseValue)
|
||||
{
|
||||
// 严重故障阈值乘数
|
||||
return 1.0f; // 默认值
|
||||
// 严重故障阈值乘数,使用统计系统修正后的值
|
||||
return baseValue;
|
||||
}
|
||||
|
||||
private float CalculateCriticalFailureThresholdFactor(Need_Maintenance need, MaintenanceNeedExtension extension)
|
||||
private float CalculateCriticalFailureThresholdFactor(Need_Maintenance need, MaintenanceNeedExtension extension, float baseValue)
|
||||
{
|
||||
// 完全故障阈值乘数
|
||||
return 1.0f; // 默认值
|
||||
// 完全故障阈值乘数,使用统计系统修正后的值
|
||||
return baseValue;
|
||||
}
|
||||
|
||||
// 解释文本生成方法
|
||||
// 解释文本生成方法(保持不变)
|
||||
private string GetDegradationFactorExplanation(Need_Maintenance need, MaintenanceNeedExtension extension)
|
||||
{
|
||||
return "WULA_Maintenance_DegradationFactor_Explanation".Translate(
|
||||
|
||||
@@ -13,6 +13,18 @@ namespace WulaFallenEmpire
|
||||
if (!base.ShouldShowFor(req))
|
||||
return false;
|
||||
|
||||
// 处理 ThingDef 的情况(种族定义)
|
||||
if (req.Def is ThingDef thingDef)
|
||||
{
|
||||
// 检查是否为 WulaSpecies 种族
|
||||
if (thingDef.defName == "WulaSpecies")
|
||||
{
|
||||
// 对于 WulaSpecies 种族,只在有纳米修复 hediff 时显示
|
||||
return HasNanoRepairForRace(thingDef);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
// 检查是否为 Pawn
|
||||
if (req.Thing is Pawn pawn)
|
||||
{
|
||||
@@ -24,24 +36,24 @@ namespace WulaFallenEmpire
|
||||
|
||||
public override float GetValueUnfinalized(StatRequest req, bool applyPostProcess = true)
|
||||
{
|
||||
// 关键修复:调用基类方法让 RimWorld 的统计系统处理所有修正
|
||||
float baseValue = base.GetValueUnfinalized(req, applyPostProcess);
|
||||
|
||||
if (req.Thing is Pawn pawn)
|
||||
{
|
||||
var nanoComp = GetNanoRepairComp(pawn);
|
||||
if (nanoComp != null)
|
||||
{
|
||||
// 根据请求的 StatDef 返回相应的值
|
||||
if (stat.defName == "WULA_NanoRepairCostPerHP")
|
||||
{
|
||||
return nanoComp.Props.repairCostPerHP;
|
||||
}
|
||||
else if (stat.defName == "WULA_NanoRepairCooldownAfterDamage")
|
||||
{
|
||||
return nanoComp.Props.repairCooldownAfterDamage;
|
||||
}
|
||||
return GetStatValueForNanoRepair(stat.defName, nanoComp, baseValue);
|
||||
}
|
||||
}
|
||||
else if (req.Def is ThingDef thingDef && thingDef.defName == "WulaSpecies")
|
||||
{
|
||||
// 对于 WulaSpecies 种族,返回经过修正的值
|
||||
return GetDefaultValueForStat(stat.defName, baseValue);
|
||||
}
|
||||
|
||||
return stat.defaultBaseValue;
|
||||
return baseValue;
|
||||
}
|
||||
|
||||
public override string GetExplanationUnfinalized(StatRequest req, ToStringNumberSense numberSense)
|
||||
@@ -56,10 +68,21 @@ namespace WulaFallenEmpire
|
||||
explanation += "\n\n" + GetNanoRepairExplanation(nanoComp);
|
||||
}
|
||||
}
|
||||
else if (req.Def is ThingDef thingDef && thingDef.defName == "WulaSpecies")
|
||||
{
|
||||
explanation += "\n\n" + GetNanoRepairExplanationForRace();
|
||||
}
|
||||
|
||||
return explanation;
|
||||
}
|
||||
|
||||
private bool HasNanoRepairForRace(ThingDef raceDef)
|
||||
{
|
||||
// 检查该种族是否有纳米修复 hediff
|
||||
// 这里可以添加更复杂的逻辑来检查种族是否有纳米修复能力
|
||||
return raceDef.defName == "WulaSpecies";
|
||||
}
|
||||
|
||||
private bool HasNanoRepairHediff(Pawn pawn)
|
||||
{
|
||||
if (pawn?.health?.hediffSet?.hediffs == null)
|
||||
@@ -90,6 +113,40 @@ namespace WulaFallenEmpire
|
||||
return null;
|
||||
}
|
||||
|
||||
private float GetStatValueForNanoRepair(string statDefName, HediffComp_NanoRepair nanoComp, float baseValue)
|
||||
{
|
||||
// 关键修复:使用基础值而不是固定值
|
||||
var props = nanoComp.Props;
|
||||
|
||||
switch (statDefName)
|
||||
{
|
||||
case "WULA_NanoRepairCostPerHP":
|
||||
return baseValue; // 使用统计系统修正后的值
|
||||
|
||||
case "WULA_NanoRepairCooldownAfterDamage":
|
||||
return baseValue; // 使用统计系统修正后的值
|
||||
|
||||
default:
|
||||
return baseValue;
|
||||
}
|
||||
}
|
||||
|
||||
private float GetDefaultValueForStat(string statDefName, float baseValue)
|
||||
{
|
||||
// 关键修复:使用基础值而不是固定值
|
||||
switch (statDefName)
|
||||
{
|
||||
case "WULA_NanoRepairCostPerHP":
|
||||
return baseValue; // 使用统计系统修正后的值
|
||||
|
||||
case "WULA_NanoRepairCooldownAfterDamage":
|
||||
return baseValue; // 使用统计系统修正后的值
|
||||
|
||||
default:
|
||||
return baseValue;
|
||||
}
|
||||
}
|
||||
|
||||
private string GetNanoRepairExplanation(HediffComp_NanoRepair nanoComp)
|
||||
{
|
||||
var props = nanoComp.Props;
|
||||
@@ -113,6 +170,24 @@ namespace WulaFallenEmpire
|
||||
return explanation;
|
||||
}
|
||||
|
||||
private string GetNanoRepairExplanationForRace()
|
||||
{
|
||||
var explanation = "WULA_NanoRepair_RaceProperties".Translate();
|
||||
|
||||
if (stat.defName == "WULA_NanoRepairCostPerHP")
|
||||
{
|
||||
explanation += "WULA_NanoRepair_CostPerHP_RaceLine".Translate(stat.defaultBaseValue.ToStringPercent());
|
||||
}
|
||||
else if (stat.defName == "WULA_NanoRepairCooldownAfterDamage")
|
||||
{
|
||||
explanation += "WULA_NanoRepair_CooldownAfterDamage_RaceLine".Translate(
|
||||
stat.defaultBaseValue,
|
||||
(stat.defaultBaseValue / 60f).ToString("F1"));
|
||||
}
|
||||
|
||||
return explanation;
|
||||
}
|
||||
|
||||
public override IEnumerable<Dialog_InfoCard.Hyperlink> GetInfoCardHyperlinks(StatRequest req)
|
||||
{
|
||||
foreach (var hyperlink in base.GetInfoCardHyperlinks(req))
|
||||
|
||||
@@ -15,11 +15,11 @@ namespace WulaFallenEmpire
|
||||
DefOfHelper.EnsureInitializedInCtor(typeof(ThingDefOf_WULA));
|
||||
}
|
||||
}
|
||||
|
||||
[DefOf]
|
||||
public static class JobDefOf_WULA
|
||||
{
|
||||
public static JobDef WULA_EnterMaintenancePod;
|
||||
|
||||
public static JobDef WULA_HaulToMaintenancePod;
|
||||
|
||||
static JobDefOf_WULA()
|
||||
@@ -27,6 +27,7 @@ namespace WulaFallenEmpire
|
||||
DefOfHelper.EnsureInitializedInCtor(typeof(JobDefOf_WULA));
|
||||
}
|
||||
}
|
||||
|
||||
[DefOf]
|
||||
public static class WulaStatDefOf
|
||||
{
|
||||
@@ -38,4 +39,27 @@ namespace WulaFallenEmpire
|
||||
DefOfHelper.EnsureInitializedInCtor(typeof(WulaStatDefOf));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
[DefOf]
|
||||
public static class WulaNeedDefOf
|
||||
{
|
||||
public static NeedDef WULA_Energy;
|
||||
|
||||
static WulaNeedDefOf()
|
||||
{
|
||||
DefOfHelper.EnsureInitializedInCtor(typeof(WulaNeedDefOf));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
[DefOf]
|
||||
public static class WulaStatCategoryDefOf
|
||||
{
|
||||
public static StatCategoryDef WULA_Synth;
|
||||
|
||||
static WulaStatCategoryDefOf()
|
||||
{
|
||||
DefOfHelper.EnsureInitializedInCtor(typeof(WulaStatCategoryDefOf));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -156,6 +156,8 @@
|
||||
<Compile Include="Pawn\WULA_Maintenance\MaintenanceNeedExtension.cs" />
|
||||
<Compile Include="Pawn\WULA_Maintenance\Need_Maintenance.cs" />
|
||||
<Compile Include="Pawn\WULA_Maintenance\WorkGiver_DoMaintenance.cs" />
|
||||
<Compile Include="Stat\StatWorker_Energy.cs" />
|
||||
<Compile Include="Stat\StatWorker_Maintenance.cs" />
|
||||
<Compile Include="Stat\StatWorker_NanoRepair.cs" />
|
||||
<Compile Include="ThingComp\CompAndPatch_GiveHediffOnShot.cs" />
|
||||
<Compile Include="ThingComp\CompApparelInterceptor.cs" />
|
||||
|
||||
Reference in New Issue
Block a user