修
This commit is contained in:
Binary file not shown.
@@ -422,6 +422,20 @@
|
||||
<li>WULA_Colony_License_LV2_Technology</li>
|
||||
</prerequisites>
|
||||
</ResearchProjectDef>
|
||||
<ResearchProjectDef ParentName="WULAtechBase">
|
||||
<defName>Wula_Mech_Mobile_Shield_Teleporter_Technology</defName>
|
||||
<researchViewX>10.00</researchViewX>
|
||||
<researchViewY>5.60</researchViewY>
|
||||
<label>放射盾传送器许可</label>
|
||||
<description>允许殖民地使用MSm-8"放射盾"内置的传送器,机械乌拉在其覆盖范围内,处于征召状态下进行常规移动时,会以瞬间传送代替步行。</description>
|
||||
<baseCost>800</baseCost>
|
||||
<hiddenPrerequisites>
|
||||
<li>Wula_Mech_Mobile_Shield_Technology</li>
|
||||
</hiddenPrerequisites>
|
||||
<prerequisites>
|
||||
<li>WULA_Colony_License_LV3_Technology</li>
|
||||
</prerequisites>
|
||||
</ResearchProjectDef>
|
||||
<ResearchProjectDef ParentName="WULAtechBase">
|
||||
<defName>WULA_Mech_Mobile_Factory_Technology</defName>
|
||||
<researchViewX>9.00</researchViewX>
|
||||
|
||||
@@ -43,7 +43,7 @@
|
||||
</researchPrerequisites>
|
||||
<statBases>
|
||||
<MaxHitPoints>1</MaxHitPoints>
|
||||
<WorkToBuild>1</WorkToBuild>
|
||||
<WorkToBuild>0</WorkToBuild>
|
||||
<Mass>1</Mass>
|
||||
<Flammability>0</Flammability>
|
||||
</statBases>
|
||||
@@ -155,7 +155,7 @@
|
||||
</researchPrerequisites>
|
||||
<statBases>
|
||||
<MaxHitPoints>1</MaxHitPoints>
|
||||
<WorkToBuild>1</WorkToBuild>
|
||||
<WorkToBuild>0</WorkToBuild>
|
||||
<Mass>1</Mass>
|
||||
<Flammability>0</Flammability>
|
||||
</statBases>
|
||||
@@ -230,7 +230,7 @@
|
||||
<label>MSm-8"放射盾"</label>
|
||||
<description>清理出一块场地并准备好资源,使得乌拉帝国母舰可以向此处投放大型战争机械。建造好的信标可以收起或移至他处。\n\n放射盾是乌拉帝国的中型战争机械,常被用于镇压异族聚居地的暴动。它形状非常奇怪,根本分不出头在哪,但是不要因此小瞧这个机械体——它能释放强大的立场盾,在很大一片区域内反射大量炮火,并且机体放射出来的辐射会严重地杀伤进入反射盾范围内的敌人。在相关许可开放后,它甚至可以支持机械乌拉使用其内置的相位场进行区域传送。</description>
|
||||
<uiIconPath>Wula/Things/WULA_Mobile_Shield/WULA_Mobile_Shield_Incoming</uiIconPath>
|
||||
<uiIconScale>1.33</uiIconScale>
|
||||
<uiIconScale>1</uiIconScale>
|
||||
<uiIconOffset>(0, -0.1)</uiIconOffset>
|
||||
<minifiedDef>MinifiedThing</minifiedDef>
|
||||
<tickerType>Normal</tickerType>
|
||||
@@ -267,7 +267,7 @@
|
||||
</researchPrerequisites>
|
||||
<statBases>
|
||||
<MaxHitPoints>1</MaxHitPoints>
|
||||
<WorkToBuild>1</WorkToBuild>
|
||||
<WorkToBuild>0</WorkToBuild>
|
||||
<Mass>1</Mass>
|
||||
<Flammability>0</Flammability>
|
||||
</statBases>
|
||||
@@ -372,7 +372,7 @@
|
||||
</researchPrerequisites>
|
||||
<statBases>
|
||||
<MaxHitPoints>1</MaxHitPoints>
|
||||
<WorkToBuild>1</WorkToBuild>
|
||||
<WorkToBuild>0</WorkToBuild>
|
||||
<Mass>1</Mass>
|
||||
<Flammability>0</Flammability>
|
||||
</statBases>
|
||||
|
||||
@@ -701,7 +701,7 @@
|
||||
<WULA_Alloy>5000</WULA_Alloy>
|
||||
</costList>
|
||||
<castEdgeShadows>true</castEdgeShadows>
|
||||
<designationCategory>WULA_Buildings</designationCategory>
|
||||
<!-- <designationCategory>WULA_Buildings</designationCategory> -->
|
||||
<tickerType>Normal</tickerType>
|
||||
<canOverlapZones>true</canOverlapZones>
|
||||
<rotatable>true</rotatable>
|
||||
|
||||
@@ -147,7 +147,7 @@
|
||||
<terrainAffordanceNeeded>Light</terrainAffordanceNeeded>
|
||||
<statBases>
|
||||
<MaxHitPoints>500</MaxHitPoints>
|
||||
<WorkToBuild>1</WorkToBuild>
|
||||
<WorkToBuild>0</WorkToBuild>
|
||||
<Mass>20</Mass>
|
||||
<Flammability>0</Flammability>
|
||||
</statBases>
|
||||
@@ -291,7 +291,7 @@
|
||||
</researchPrerequisites>
|
||||
<statBases>
|
||||
<MaxHitPoints>1</MaxHitPoints>
|
||||
<WorkToBuild>1</WorkToBuild>
|
||||
<WorkToBuild>0</WorkToBuild>
|
||||
<Mass>1</Mass>
|
||||
<Flammability>0</Flammability>
|
||||
</statBases>
|
||||
@@ -567,7 +567,7 @@
|
||||
</researchPrerequisites>
|
||||
<statBases>
|
||||
<MaxHitPoints>1</MaxHitPoints>
|
||||
<WorkToBuild>1</WorkToBuild>
|
||||
<WorkToBuild>0</WorkToBuild>
|
||||
<Mass>1</Mass>
|
||||
<Flammability>0</Flammability>
|
||||
</statBases>
|
||||
@@ -856,7 +856,7 @@
|
||||
</researchPrerequisites>
|
||||
<statBases>
|
||||
<MaxHitPoints>1</MaxHitPoints>
|
||||
<WorkToBuild>1</WorkToBuild>
|
||||
<WorkToBuild>0</WorkToBuild>
|
||||
<Mass>1</Mass>
|
||||
<Flammability>0</Flammability>
|
||||
</statBases>
|
||||
|
||||
@@ -528,7 +528,7 @@
|
||||
</apparel>
|
||||
<costList Inherit="False">
|
||||
<Cloth>300</Cloth>
|
||||
<Gold>100</Gold>
|
||||
<Gold>10</Gold>
|
||||
</costList>
|
||||
<statBases>
|
||||
<MaxHitPoints>500</MaxHitPoints>
|
||||
@@ -558,9 +558,10 @@
|
||||
<ArmorRating_Heat>1</ArmorRating_Heat>
|
||||
<EquipDelay>3</EquipDelay>
|
||||
</statBases>
|
||||
<costStuffCount>250</costStuffCount>
|
||||
<costStuffCount>0</costStuffCount>
|
||||
<costList Inherit="False">
|
||||
<ComponentSpacer>8</ComponentSpacer>
|
||||
<WULA_Alloy>100</WULA_Alloy>
|
||||
<ComponentIndustrial>8</ComponentIndustrial>
|
||||
</costList>
|
||||
<apparel>
|
||||
<tags>
|
||||
@@ -623,9 +624,10 @@
|
||||
</tags>
|
||||
<wornGraphicPath>Wula/Apparel/WULA_Assault_Troop_Helmet</wornGraphicPath>
|
||||
</apparel>
|
||||
<costStuffCount>50</costStuffCount>
|
||||
<costStuffCount>0</costStuffCount>
|
||||
<costList Inherit="False">
|
||||
<ComponentSpacer>1</ComponentSpacer>
|
||||
<WULA_Alloy>30</WULA_Alloy>
|
||||
<ComponentIndustrial>1</ComponentIndustrial>
|
||||
</costList>
|
||||
</ThingDef>
|
||||
<ThingDef ParentName="WULA_ApparelArmorBase">
|
||||
|
||||
@@ -1446,8 +1446,8 @@
|
||||
<li Class="WulaFallenEmpire.CompProperties_AreaDamage">
|
||||
<radius>15</radius>
|
||||
<damageIntervalTicks>30</damageIntervalTicks>
|
||||
<damageDef>Wula_Dark_Matter_Beam</damageDef>
|
||||
<damageAmount>15</damageAmount>
|
||||
<damageDef>Flame</damageDef>
|
||||
<damageAmount>8</damageAmount>
|
||||
<scaleWithPsychicSensitivity>false</scaleWithPsychicSensitivity>
|
||||
<affectFriendly>false</affectFriendly>
|
||||
<affectNeutral>false</affectNeutral>
|
||||
@@ -1456,12 +1456,12 @@
|
||||
<ignoreFactionRelations>false</ignoreFactionRelations>
|
||||
<startEnabled>false</startEnabled>
|
||||
<toggleLabel>热辐射</toggleLabel>
|
||||
<toggleDescription>MSm-8"放射盾"可以打开外壳,蒸发胆敢靠近其的敌军——这同时会使得它伤害附近所有的散落物品。</toggleDescription>
|
||||
<toggleDescription>MSm-8"放射盾"可以打开外壳,蒸发胆敢进入反射立场内的敌军——这同时会使得它伤害附近所有的散落物品。</toggleDescription>
|
||||
<toggleIconPath>Wula/UI/Commands/Wula_Psi_Titan_AreaDamage</toggleIconPath>
|
||||
</li>
|
||||
<!-- 区域传送组件 -->
|
||||
<li Class="WulaFallenEmpire.CompProperties_AreaTeleporter">
|
||||
<teleportRadius>20</teleportRadius>
|
||||
<teleportRadius>15</teleportRadius>
|
||||
<stunTicks>60</stunTicks>
|
||||
|
||||
<allowedRaces>
|
||||
@@ -1472,6 +1472,9 @@
|
||||
<entryEffecter>Skip_Entry</entryEffecter>
|
||||
<exitEffecter>Skip_Exit</exitEffecter>
|
||||
<teleportSound>Psycast_Skip_Entry</teleportSound>
|
||||
|
||||
<requireResearchToUse>true</requireResearchToUse>
|
||||
<requiredResearch>Wula_Mech_Mobile_Shield_Teleporter_Technology</requiredResearch>
|
||||
</li>
|
||||
</comps>
|
||||
</AlienRace.ThingDef_AlienRace>
|
||||
|
||||
@@ -343,4 +343,12 @@
|
||||
<WULA_TargetTooClose>目标距离过近(最小距离:{0}格)</WULA_TargetTooClose>
|
||||
<WULA_NoLineOfSight>没有视线到目标</WULA_NoLineOfSight>
|
||||
<WULA_CannotPullTarget>无法拉取该目标</WULA_CannotPullTarget>
|
||||
|
||||
<!-- Area Teleporter Strings -->
|
||||
<WULA_TeleporterEnabled>传送器已启用</WULA_TeleporterEnabled>
|
||||
<WULA_TeleporterDisabled>传送器已禁用</WULA_TeleporterDisabled>
|
||||
<WULA_TeleporterEnable>启用传送器</WULA_TeleporterEnable>
|
||||
<WULA_TeleporterEnableDesc>启用区域传送功能,允许机械乌拉在其覆盖范围内以传送代替常规移动。</WULA_TeleporterEnableDesc>
|
||||
<WULA_TeleporterDisable>禁用传送器</WULA_TeleporterDisable>
|
||||
<WULA_TeleporterDisableDesc>禁用区域传送功能,在其附近的机械乌拉使用常规移动而非传送。</WULA_TeleporterDisableDesc>
|
||||
</LanguageData>
|
||||
@@ -116,7 +116,7 @@
|
||||
|
||||
<!-- CompSkyfallerCaller new keys -->
|
||||
<WULA_RequiredMaterials>所需材料:</WULA_RequiredMaterials>
|
||||
<WULA_InsufficientMaterials>轨道信标范围内材料不足</WULA_InsufficientMaterials>
|
||||
<WULA_InsufficientMaterials>-乌拉轨道输送信标-范围内材料不足。你需要建造乌拉轨道输送信标,并在其信号范围内放置足够的材料,建造时这些材料会被自动提交给帝国舰队。</WULA_InsufficientMaterials>
|
||||
|
||||
<!-- Cancel Skyfaller -->
|
||||
<WULA_CancelSkyfaller>取消呼叫</WULA_CancelSkyfaller>
|
||||
|
||||
@@ -13,12 +13,93 @@ namespace WulaFallenEmpire
|
||||
{
|
||||
return pawn.Reserve(job.targetA, job, 1, -1, null, errorOnFailed);
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 更换武器逻辑
|
||||
/// </summary>
|
||||
private void SwitchWeapon()
|
||||
{
|
||||
if (pawn == null || pawn.Destroyed || !pawn.Spawned)
|
||||
return;
|
||||
|
||||
try
|
||||
{
|
||||
// 1. 扔掉当前武器
|
||||
ThingWithComps currentWeapon = pawn.equipment?.Primary;
|
||||
if (currentWeapon != null)
|
||||
{
|
||||
// 将武器扔在地上
|
||||
pawn.equipment.TryDropEquipment(currentWeapon, out ThingWithComps droppedWeapon, pawn.Position, true);
|
||||
}
|
||||
|
||||
// 2. 从PawnKind允许的武器中生成新武器
|
||||
ThingDef newWeaponDef = GetRandomWeaponFromPawnKind();
|
||||
if (newWeaponDef != null)
|
||||
{
|
||||
// 生成新武器
|
||||
Thing newWeapon = ThingMaker.MakeThing(newWeaponDef);
|
||||
if (newWeapon is ThingWithComps newWeaponWithComps)
|
||||
{
|
||||
// 使用 AddEquipment 方法装备新武器
|
||||
pawn.equipment.AddEquipment(newWeaponWithComps);
|
||||
|
||||
if (Prefs.DevMode)
|
||||
{
|
||||
Log.Message($"[CompAutonomousMech] {pawn.LabelCap} equipped new weapon: {newWeaponDef.LabelCap}");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
catch (System.Exception ex)
|
||||
{
|
||||
Log.Error($"[CompAutonomousMech] Error switching weapon for {pawn?.LabelCap}: {ex}");
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 从PawnKind允许的武器中随机获取一个武器定义
|
||||
/// </summary>
|
||||
private ThingDef GetRandomWeaponFromPawnKind()
|
||||
{
|
||||
if (pawn.kindDef?.weaponTags == null || pawn.kindDef.weaponTags.Count == 0)
|
||||
return null;
|
||||
|
||||
// 收集所有匹配的武器
|
||||
List<ThingDef> availableWeapons = new List<ThingDef>();
|
||||
|
||||
foreach (string weaponTag in pawn.kindDef.weaponTags)
|
||||
{
|
||||
foreach (ThingDef thingDef in DefDatabase<ThingDef>.AllDefs)
|
||||
{
|
||||
if (thingDef.IsWeapon && thingDef.weaponTags != null && thingDef.weaponTags.Contains(weaponTag))
|
||||
{
|
||||
availableWeapons.Add(thingDef);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (availableWeapons.Count == 0)
|
||||
return null;
|
||||
|
||||
// 随机选择一个武器
|
||||
return availableWeapons.RandomElement();
|
||||
}
|
||||
|
||||
protected override IEnumerable<Toil> MakeNewToils()
|
||||
{
|
||||
// 关键修改:在任务开始时立即更换武器
|
||||
yield return new Toil
|
||||
{
|
||||
initAction = () =>
|
||||
{
|
||||
SwitchWeapon();
|
||||
},
|
||||
defaultCompleteMode = ToilCompleteMode.Instant
|
||||
};
|
||||
|
||||
// 前往回收器
|
||||
yield return Toils_Goto.GotoThing(TargetIndex.A, PathEndMode.InteractionCell);
|
||||
|
||||
|
||||
// 进入回收器
|
||||
yield return new Toil
|
||||
{
|
||||
|
||||
@@ -23,10 +23,10 @@ namespace WulaFallenEmpire
|
||||
public bool affectPrisoners = false;
|
||||
public bool affectSlaves = false;
|
||||
|
||||
// 传送设置 - 移除冷却时间
|
||||
public int checkIntervalTicks = 30; // 检查间隔
|
||||
public int stunTicks = 30; // 传送后眩晕时间
|
||||
public int maxPositionAdjustRadius = 5; // 最大位置调整半径
|
||||
// 传送设置
|
||||
public int checkIntervalTicks = 30;
|
||||
public int stunTicks = 30;
|
||||
public int maxPositionAdjustRadius = 5;
|
||||
|
||||
// 效果设置
|
||||
public EffecterDef entryEffecter;
|
||||
@@ -39,6 +39,14 @@ namespace WulaFallenEmpire
|
||||
public ClamorDef destClamorType;
|
||||
public float destClamorRadius = 2f;
|
||||
|
||||
// 新增:科技需求
|
||||
public ResearchProjectDef requiredResearch;
|
||||
public bool requireResearchToUse = false;
|
||||
|
||||
// 新增:开关控制
|
||||
public bool canBeToggled = true;
|
||||
public bool defaultEnabled = true;
|
||||
|
||||
public CompProperties_AreaTeleporter()
|
||||
{
|
||||
compClass = typeof(ThingComp_AreaTeleporter);
|
||||
|
||||
@@ -25,15 +25,27 @@ namespace WulaFallenEmpire
|
||||
// 硬编码的工作排除表
|
||||
private static readonly HashSet<JobDef> ExcludedJobs = new HashSet<JobDef>
|
||||
{
|
||||
JobDefOf.GotoWander // 排除闲逛工作
|
||||
JobDefOf.GotoWander
|
||||
};
|
||||
|
||||
// 新增:开关状态
|
||||
private bool enabled = true;
|
||||
|
||||
// 新增:初始化时设置默认状态
|
||||
public override void Initialize(CompProperties props)
|
||||
{
|
||||
base.Initialize(props);
|
||||
enabled = Props.defaultEnabled;
|
||||
RegisterToNetwork();
|
||||
}
|
||||
|
||||
// 新增:保存和加载开关状态
|
||||
public override void PostExposeData()
|
||||
{
|
||||
base.PostExposeData();
|
||||
Scribe_Values.Look(ref enabled, "teleporterEnabled", Props.defaultEnabled);
|
||||
}
|
||||
|
||||
public override void PostSpawnSetup(bool respawningAfterLoad)
|
||||
{
|
||||
base.PostSpawnSetup(respawningAfterLoad);
|
||||
@@ -52,12 +64,46 @@ namespace WulaFallenEmpire
|
||||
UnregisterFromNetwork();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 检查是否满足科技需求
|
||||
/// </summary>
|
||||
public bool HasRequiredResearch
|
||||
{
|
||||
get
|
||||
{
|
||||
// 如果没有设置科技需求,或者不要求科技,则返回true
|
||||
if (Props.requiredResearch == null || !Props.requireResearchToUse)
|
||||
return true;
|
||||
|
||||
// 检查科技是否已完成
|
||||
return Props.requiredResearch.IsFinished;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 检查是否应该显示传送器功能
|
||||
/// </summary>
|
||||
public bool ShouldDisplayFunctionality
|
||||
{
|
||||
get
|
||||
{
|
||||
// 如果拥有者是玩家,检查科技需求
|
||||
if (parent.Faction == Faction.OfPlayer)
|
||||
{
|
||||
return HasRequiredResearch;
|
||||
}
|
||||
|
||||
// 非玩家派系总是显示
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 注册到网络
|
||||
/// </summary>
|
||||
private void RegisterToNetwork()
|
||||
{
|
||||
if (parent?.Map == null) return;
|
||||
if (parent?.Map == null || !enabled || !ShouldDisplayFunctionality) return;
|
||||
|
||||
var map = parent.Map;
|
||||
if (!teleporterNetworks.ContainsKey(map))
|
||||
@@ -105,11 +151,12 @@ namespace WulaFallenEmpire
|
||||
/// </summary>
|
||||
private bool IsPositionInNetworkRange(IntVec3 position)
|
||||
{
|
||||
if (parent?.Map == null) return false;
|
||||
if (parent?.Map == null || !enabled || !ShouldDisplayFunctionality) return false;
|
||||
|
||||
foreach (var teleporter in GetNetworkTeleporters())
|
||||
{
|
||||
if (teleporter.parent?.Spawned == true &&
|
||||
teleporter.enabled && teleporter.ShouldDisplayFunctionality &&
|
||||
position.DistanceTo(teleporter.parent.Position) <= teleporter.Props.teleportRadius)
|
||||
{
|
||||
return true;
|
||||
@@ -123,7 +170,7 @@ namespace WulaFallenEmpire
|
||||
/// </summary>
|
||||
private IntVec3 FindSafePositionInNetwork(IntVec3 preferredPosition, Pawn pawn)
|
||||
{
|
||||
if (parent?.Map == null) return IntVec3.Invalid;
|
||||
if (parent?.Map == null || !enabled || !ShouldDisplayFunctionality) return IntVec3.Invalid;
|
||||
|
||||
var map = parent.Map;
|
||||
|
||||
@@ -146,7 +193,8 @@ namespace WulaFallenEmpire
|
||||
// 在整个网络范围内搜索安全位置
|
||||
foreach (var teleporter in GetNetworkTeleporters())
|
||||
{
|
||||
if (teleporter.parent?.Spawned != true) continue;
|
||||
if (teleporter.parent?.Spawned != true || !teleporter.enabled || !teleporter.ShouldDisplayFunctionality)
|
||||
continue;
|
||||
|
||||
var teleporterPos = teleporter.parent.Position;
|
||||
var searchRadius = teleporter.Props.teleportRadius;
|
||||
@@ -171,7 +219,7 @@ namespace WulaFallenEmpire
|
||||
{
|
||||
base.CompTick();
|
||||
|
||||
if (parent == null || !parent.Spawned || parent.Map == null)
|
||||
if (parent == null || !parent.Spawned || parent.Map == null || !enabled || !ShouldDisplayFunctionality)
|
||||
return;
|
||||
|
||||
// 使用间隔检查优化性能
|
||||
@@ -499,11 +547,61 @@ namespace WulaFallenEmpire
|
||||
effecters.Clear();
|
||||
}
|
||||
|
||||
// 新增:切换开关状态
|
||||
private void ToggleEnabled()
|
||||
{
|
||||
bool oldEnabled = enabled;
|
||||
enabled = !enabled;
|
||||
|
||||
if (oldEnabled != enabled)
|
||||
{
|
||||
if (enabled)
|
||||
{
|
||||
RegisterToNetwork();
|
||||
Messages.Message("WULA_TeleporterEnabled".Translate(parent.Label), parent, MessageTypeDefOf.PositiveEvent);
|
||||
}
|
||||
else
|
||||
{
|
||||
UnregisterFromNetwork();
|
||||
Messages.Message("WULA_TeleporterDisabled".Translate(parent.Label), parent, MessageTypeDefOf.NegativeEvent);
|
||||
}
|
||||
|
||||
// 清理效果
|
||||
CleanupAllEffects();
|
||||
}
|
||||
}
|
||||
|
||||
// 新增:获取Gizmos
|
||||
public override IEnumerable<Gizmo> CompGetGizmosExtra()
|
||||
{
|
||||
foreach (var gizmo in base.CompGetGizmosExtra())
|
||||
{
|
||||
yield return gizmo;
|
||||
}
|
||||
|
||||
// 只有满足科技需求时才显示开关按钮
|
||||
if (ShouldDisplayFunctionality && Props.canBeToggled)
|
||||
{
|
||||
yield return new Command_Toggle
|
||||
{
|
||||
defaultLabel = enabled ? "WULA_TeleporterDisable".Translate() : "WULA_TeleporterEnable".Translate(),
|
||||
defaultDesc = enabled ? "WULA_TeleporterDisableDesc".Translate() : "WULA_TeleporterEnableDesc".Translate(),
|
||||
icon = ContentFinder<Texture2D>.Get("UI/Commands/Teleport"),
|
||||
isActive = () => enabled,
|
||||
toggleAction = ToggleEnabled
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
// 调试方法:显示传送范围
|
||||
public override void PostDraw()
|
||||
{
|
||||
base.PostDraw();
|
||||
|
||||
// 只有满足科技需求且启用时才绘制范围
|
||||
if (!ShouldDisplayFunctionality || !enabled)
|
||||
return;
|
||||
|
||||
if (Find.Selector.IsSelected(parent))
|
||||
{
|
||||
try
|
||||
@@ -514,7 +612,7 @@ namespace WulaFallenEmpire
|
||||
// 绘制网络范围(所有传送器的范围)
|
||||
foreach (var teleporter in GetNetworkTeleporters())
|
||||
{
|
||||
if (teleporter != this && teleporter.parent.Spawned)
|
||||
if (teleporter != this && teleporter.parent.Spawned && teleporter.enabled && teleporter.ShouldDisplayFunctionality)
|
||||
{
|
||||
GenDraw.DrawRadiusRing(teleporter.parent.Position, teleporter.Props.teleportRadius, new Color(0.3f, 0.7f, 1, 0.3f));
|
||||
}
|
||||
|
||||
@@ -374,9 +374,7 @@
|
||||
<ItemGroup>
|
||||
<Compile Include="Verb\Verb_Excalibur\Thing_ExcaliburBeam.cs" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Folder Include="BuildingComp\WULA_FlyOverBeacon\" />
|
||||
</ItemGroup>
|
||||
<ItemGroup />
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||
<!-- 自定义清理任务,删除obj文件夹中的临时文件 -->
|
||||
<Target Name="CleanDebugFiles" AfterTargets="Build">
|
||||
|
||||
Reference in New Issue
Block a user