This commit is contained in:
2026-02-25 17:30:59 +08:00
parent 0509f26c3c
commit fff40b0edb
70 changed files with 3951 additions and 1219 deletions

View File

@@ -5,7 +5,7 @@ using Verse;
namespace ArachnaeSwarm
{
[HarmonyPatch(typeof(Hediff_Mechlink), "PostAdd")]
public static class Hediff_Mechlink_PostAdd_Patch
public static class Hediff_Mechlink_PostAWULA_Patch
{
public static bool Prefix(Hediff_Mechlink __instance, DamageInfo? dinfo)
{

View File

@@ -131,7 +131,7 @@ namespace WulaFallenEmpire
}
catch (System.Exception ex)
{
Log.Error($"[DD] Error in fixed ColonistBar patch: {ex}");
Log.Error($"[WULA] Error in fixed ColonistBar patch: {ex}");
// 出错时不改变原列表
}
}

View File

@@ -34,7 +34,7 @@ namespace WulaFallenEmpire
else
{
// 此机甲不在允许列表中
cantReason = "DD_Equipment_For_Other_Mech".Translate();
cantReason = "WULA_Equipment_For_Other_Mech".Translate();
__result = false;
return false;
}
@@ -42,7 +42,7 @@ namespace WulaFallenEmpire
else
{
// 非机甲尝试装备专用武器,禁止
cantReason = "DD_Human_Cannot_Equip_Mech_Weapon".Translate();
cantReason = "WULA_Human_Cannot_Equip_Mech_Weapon".Translate();
__result = false;
return false;
}
@@ -54,7 +54,7 @@ namespace WulaFallenEmpire
if (pawn is Wulamechunit)
{
// 机甲不能装备普通武器
cantReason = "DD_Equipment_Not_Allow_For_Mech".Translate();
cantReason = "WULA_Equipment_Not_Allow_For_Mech".Translate();
__result = false;
return false;
}
@@ -66,7 +66,7 @@ namespace WulaFallenEmpire
}
catch (Exception ex)
{
Log.Error($"[DD] CanEquip patch error: {ex}");
Log.Error($"[WULA] CanEquip patch error: {ex}");
return true;
}
}

View File

@@ -80,14 +80,14 @@ namespace WulaFallenEmpire
// 如果任一pawn是机甲单位返回拒绝
if (initiator is Wulamechunit || target is Wulamechunit)
{
__result = new AcceptanceReport("DD_MechCannotRomance".Translate());
__result = new AcceptanceReport("WULA_MechCannotRomance".Translate());
return false; // 跳过原始方法
}
// 如果任一pawn没有story组件返回拒绝
if (initiator?.story == null || target?.story == null)
{
__result = new AcceptanceReport("DD_NoStoryComponent".Translate());
__result = new AcceptanceReport("WULA_NoStoryComponent".Translate());
return false;
}

View File

@@ -17,7 +17,7 @@ namespace WulaFallenEmpire.HarmonyPatches
public static class Thing_TakeDamage_Patch
{
// 缓存装甲值StatDef
private static readonly StatDef ArmorStatDef = StatDef.Named("DD_MechArmor");
private static readonly StatDef ArmorStatDef = StatDef.Named("WULA_MechArmor");
// 阻挡效果的MoteDef
private static readonly ThingDef BlockMoteDef = DefDatabase<ThingDef>.GetNamedSilentFail("Mote_Spark");
@@ -102,7 +102,7 @@ namespace WulaFallenEmpire.HarmonyPatches
// 显示文字效果
Vector3 textPos = target.DrawPos + new Vector3(0, 0, 1f);
MoteMaker.ThrowText(textPos, target.Map, "DD_BlockByMechArmor".Translate(), Color.yellow, 2.5f);
MoteMaker.ThrowText(textPos, target.Map, "WULA_BlockByMechArmor".Translate(), Color.yellow, 2.5f);
// 显示粒子效果
if (BlockMoteDef != null)

View File

@@ -277,7 +277,7 @@ namespace WulaFallenEmpire
}
catch (Exception ex)
{
Log.Error($"[DD] Harmony patch error in TryMeleeAttack: {ex}");
Log.Error($"[WULA] Harmony patch error in TryMeleeAttack: {ex}");
return true; // 出错时继续执行原始方法
}
}