1
This commit is contained in:
@@ -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}");
|
||||
// 出错时不改变原列表
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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; // 出错时继续执行原始方法
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user