暂存2
This commit is contained in:
Binary file not shown.
@@ -1,8 +1,9 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<Defs>
|
||||
|
||||
<ThingDef ParentName="BuildingBase">
|
||||
<defName>WULA_ArmedShuttleWithPocket</defName>
|
||||
<label>armed shuttle with pocket space</label>
|
||||
<label>乌拉武装运输机</label>
|
||||
<description>An advanced chemfuel-powered shuttle with integrated pocket space technology. Equipped with a defensive turret and internal storage dimension that doesn't require hacking to access. Perfect for long-distance exploration and mobile operations.</description>
|
||||
<thingClass>WulaFallenEmpire.Building_ArmedShuttleWithPocket</thingClass>
|
||||
<preventDroppingThingsOn>true</preventDroppingThingsOn>
|
||||
@@ -26,30 +27,28 @@
|
||||
</shadowData>
|
||||
</graphicData>
|
||||
<statBases>
|
||||
<MaxHitPoints>800</MaxHitPoints>
|
||||
<Flammability>0.4</Flammability>
|
||||
<WorkToBuild>60000</WorkToBuild>
|
||||
<Mass>200</Mass>
|
||||
<Comfort>0.75</Comfort>
|
||||
<MaxHitPoints>6000</MaxHitPoints>
|
||||
<Flammability>0.5</Flammability>
|
||||
<WorkToBuild>40000</WorkToBuild>
|
||||
<Mass>150</Mass>
|
||||
<Comfort>0.65</Comfort>
|
||||
</statBases>
|
||||
<tickerType>Normal</tickerType>
|
||||
<designationCategory>Odyssey</designationCategory>
|
||||
<constructionSkillPrerequisite>10</constructionSkillPrerequisite>
|
||||
<constructionSkillPrerequisite>8</constructionSkillPrerequisite>
|
||||
<costList>
|
||||
<Steel>400</Steel>
|
||||
<Plasteel>300</Plasteel>
|
||||
<ComponentIndustrial>12</ComponentIndustrial>
|
||||
<ComponentSpacer>4</ComponentSpacer>
|
||||
<Steel>300</Steel>
|
||||
<Plasteel>200</Plasteel>
|
||||
<ComponentIndustrial>8</ComponentIndustrial>
|
||||
<ComponentSpacer>2</ComponentSpacer>
|
||||
<ShuttleEngine>1</ShuttleEngine>
|
||||
<VanometricPowerCore>1</VanometricPowerCore>
|
||||
</costList>
|
||||
<canOverlapZones>true</canOverlapZones>
|
||||
<killedLeavings>
|
||||
<Steel>80</Steel>
|
||||
<Plasteel>90</Plasteel>
|
||||
<ChunkSlagSteel>6</ChunkSlagSteel>
|
||||
<ComponentIndustrial>6</ComponentIndustrial>
|
||||
<ComponentSpacer>1</ComponentSpacer>
|
||||
<Steel>60</Steel>
|
||||
<Plasteel>60</Plasteel>
|
||||
<ChunkSlagSteel>5</ChunkSlagSteel>
|
||||
<ComponentIndustrial>4</ComponentIndustrial>
|
||||
</killedLeavings>
|
||||
<rotatable>true</rotatable>
|
||||
<hasInteractionCell>true</hasInteractionCell>
|
||||
@@ -69,30 +68,18 @@
|
||||
<isInert>true</isInert>
|
||||
<forcedCostLeavings>
|
||||
<li MayRequire="Ludeon.RimWorld.Odyssey">ShuttleEngine</li>
|
||||
<li MayRequire="Ludeon.RimWorld.Anomaly">VanometricPowerCore</li>
|
||||
</forcedCostLeavings>
|
||||
<turretGunDef>Gun_ChargeBlasterAdvancedTurret</turretGunDef>
|
||||
<turretBurstCooldownTime>4.5</turretBurstCooldownTime>
|
||||
<turretBurstWarmupTime>1.0~1.5</turretBurstWarmupTime>
|
||||
<turretTopDrawSize>1.9</turretTopDrawSize>
|
||||
<turretTopOffset>(0, 0.08)</turretTopOffset>
|
||||
<turretGunDef>Gun_ChargeBlasterHeavyTurret</turretGunDef>
|
||||
<turretBurstCooldownTime>5.5</turretBurstCooldownTime>
|
||||
<turretTopDrawSize>1.75</turretTopDrawSize>
|
||||
<turretTopOffset>(0, 0.05)</turretTopOffset>
|
||||
</building>
|
||||
<!-- 口袋空间配置 -->
|
||||
<modExtensions>
|
||||
<li Class="WulaFallenEmpire.PocketMapProperties">
|
||||
<pocketMapGenerator>WULA_PocketSpace_Small</pocketMapGenerator>
|
||||
<exitDef>WULA_PocketMapExit</exitDef>
|
||||
<pocketMapSize>(13, 13)</pocketMapSize>
|
||||
<allowDirectAccess>true</allowDirectAccess>
|
||||
</li>
|
||||
</modExtensions>
|
||||
<inspectorTabs>
|
||||
<li>ITab_ContentsTransporter</li>
|
||||
<li>ITab_Shells</li>
|
||||
</inspectorTabs>
|
||||
<researchPrerequisites>
|
||||
<li>Shuttles</li>
|
||||
<li MayRequire="Ludeon.RimWorld.Anomaly">VoidStructure</li>
|
||||
</researchPrerequisites>
|
||||
<comps>
|
||||
<li Class="CompProperties_Shuttle">
|
||||
@@ -134,19 +121,27 @@
|
||||
<canEjectFuel>true</canEjectFuel>
|
||||
</li>
|
||||
<li Class="CompProperties_Power">
|
||||
<compClass>CompPowerTrader</compClass>
|
||||
<basePowerConsumption>200</basePowerConsumption>
|
||||
<shortCircuitInRain>false</shortCircuitInRain>
|
||||
<compClass>CompPowerPlant</compClass>
|
||||
<basePowerConsumption>-400</basePowerConsumption>
|
||||
<transmitsPower>true</transmitsPower>
|
||||
</li>
|
||||
<li Class="CompProperties_AmbientSound">
|
||||
<sound>ShuttleIdle_Ambience</sound>
|
||||
</li>
|
||||
</comps>
|
||||
<modExtensions>
|
||||
<li Class="WulaFallenEmpire.PocketMapProperties">
|
||||
<pocketMapGenerator>WULA_PocketSpace_Small</pocketMapGenerator>
|
||||
<exitDef>WULA_PocketMapExit</exitDef>
|
||||
<pocketMapSize>(13, 13)</pocketMapSize>
|
||||
<allowDirectAccess>true</allowDirectAccess>
|
||||
</li>
|
||||
</modExtensions>
|
||||
<placeWorkers>
|
||||
<li>PlaceWorker_NotUnderRoof</li>
|
||||
<li>PlaceWorker_TurretTop</li>
|
||||
</placeWorkers>
|
||||
<uiOrder>2602</uiOrder>
|
||||
<uiOrder>2601</uiOrder>
|
||||
</ThingDef>
|
||||
|
||||
<!-- 改进的武器定义 -->
|
||||
@@ -305,13 +300,15 @@
|
||||
<label>pocket space exit</label>
|
||||
<description>An exit portal that allows return from the pocket space to the main map.</description>
|
||||
<thingClass>WulaFallenEmpire.Building_PocketMapExit</thingClass>
|
||||
<size>(1,1)</size>
|
||||
<size>(3,3)</size>
|
||||
<drawerType>MapMeshAndRealTime</drawerType>
|
||||
<graphicData>
|
||||
<graphicClass>Graphic_Single</graphicClass>
|
||||
<texPath>Things/Building/Misc/CaveExit/CaveExit</texPath>
|
||||
<drawSize>(1,1)</drawSize>
|
||||
<texPath>Wula/Building/WULA_War_Machine_Recharger</texPath>
|
||||
<graphicClass>Graphic_Multi</graphicClass>
|
||||
<drawSize>(3,3)</drawSize>
|
||||
</graphicData>
|
||||
<interactionCellOffset>(0,0,0)</interactionCellOffset>
|
||||
<passability>Standable</passability>
|
||||
<statBases>
|
||||
<Flammability>0</Flammability>
|
||||
</statBases>
|
||||
@@ -323,6 +320,11 @@
|
||||
<li Class="CompProperties_Effecter">
|
||||
<effecterDef>UndercaveMapExitLightshafts</effecterDef>
|
||||
</li>
|
||||
<li Class="CompProperties_Power">
|
||||
<compClass>CompPowerPlant</compClass>
|
||||
<basePowerConsumption>-400</basePowerConsumption>
|
||||
<transmitsPower>true</transmitsPower>
|
||||
</li>
|
||||
</comps>
|
||||
</ThingDef>
|
||||
</Defs>
|
||||
@@ -36,18 +36,6 @@
|
||||
|
||||
<!-- 退出点相关 -->
|
||||
<WULA.PocketSpace.ExitThroughPortal>通过传送门返回</WULA.PocketSpace.ExitThroughPortal>
|
||||
<WULA.PocketSpace.ExitToMainMap>返回主地图</WULA.PocketSpace.ExitToMainMap>
|
||||
<WULA.PocketSpace.NoTargetMap>没有目标地图</WULA.PocketSpace.NoTargetMap>
|
||||
<WULA.PocketSpace.ViewMainMap>查看主地图</WULA.PocketSpace.ViewMainMap>
|
||||
<WULA.PocketSpace.ViewMainMapDesc>切换到主地图并查看穿梭机。</WULA.PocketSpace.ViewMainMapDesc>
|
||||
<WULA.PocketSpace.LoadShuttle>装载穿梭机</WULA.PocketSpace.LoadShuttle>
|
||||
<WULA.PocketSpace.LoadShuttleDesc>打开穿梭机装载界面,选择要装载的人员和物品。</WULA.PocketSpace.LoadShuttleDesc>
|
||||
<WULA.PocketSpace.CancelLoading>取消装载</WULA.PocketSpace.CancelLoading>
|
||||
<WULA.PocketSpace.CancelLoadingDesc>取消当前的装载操作。</WULA.PocketSpace.CancelLoadingDesc>
|
||||
<WULA.PocketSpace.ShuttleStatus>穿梭机状态</WULA.PocketSpace.ShuttleStatus>
|
||||
<WULA.PocketSpace.ShuttleStatusDesc>查看穿梭机的详细状态信息。</WULA.PocketSpace.ShuttleStatusDesc>
|
||||
<WULA.PocketSpace.ShuttleInfo>穿梭机信息</WULA.PocketSpace.ShuttleInfo>
|
||||
<WULA.PocketSpace.LoadingDialogError>无法打开装载对话框。</WULA.PocketSpace.LoadingDialogError>
|
||||
<WULA.PocketSpace.ExitAll>全员返回</WULA.PocketSpace.ExitAll>
|
||||
<WULA.PocketSpace.ExitAllDesc>将所有殖民者从口袋空间传送回主地图。</WULA.PocketSpace.ExitAllDesc>
|
||||
<WULA.PocketSpace.ExitSuccess>{0} 已成功返回主地图。</WULA.PocketSpace.ExitSuccess>
|
||||
@@ -36,18 +36,6 @@
|
||||
|
||||
<!-- Exit point related -->
|
||||
<WULA.PocketSpace.ExitThroughPortal>Return through portal</WULA.PocketSpace.ExitThroughPortal>
|
||||
<WULA.PocketSpace.ExitToMainMap>Return to main map</WULA.PocketSpace.ExitToMainMap>
|
||||
<WULA.PocketSpace.NoTargetMap>No target map</WULA.PocketSpace.NoTargetMap>
|
||||
<WULA.PocketSpace.ViewMainMap>View main map</WULA.PocketSpace.ViewMainMap>
|
||||
<WULA.PocketSpace.ViewMainMapDesc>Switch to main map and view the shuttle.</WULA.PocketSpace.ViewMainMapDesc>
|
||||
<WULA.PocketSpace.LoadShuttle>Load shuttle</WULA.PocketSpace.LoadShuttle>
|
||||
<WULA.PocketSpace.LoadShuttleDesc>Open shuttle loading interface to select personnel and items to load.</WULA.PocketSpace.LoadShuttleDesc>
|
||||
<WULA.PocketSpace.CancelLoading>Cancel loading</WULA.PocketSpace.CancelLoading>
|
||||
<WULA.PocketSpace.CancelLoadingDesc>Cancel the current loading operation.</WULA.PocketSpace.CancelLoadingDesc>
|
||||
<WULA.PocketSpace.ShuttleStatus>Shuttle status</WULA.PocketSpace.ShuttleStatus>
|
||||
<WULA.PocketSpace.ShuttleStatusDesc>View detailed shuttle status information.</WULA.PocketSpace.ShuttleStatusDesc>
|
||||
<WULA.PocketSpace.ShuttleInfo>Shuttle Information</WULA.PocketSpace.ShuttleInfo>
|
||||
<WULA.PocketSpace.LoadingDialogError>Cannot open loading dialog.</WULA.PocketSpace.LoadingDialogError>
|
||||
<WULA.PocketSpace.ExitAll>Return all</WULA.PocketSpace.ExitAll>
|
||||
<WULA.PocketSpace.ExitAllDesc>Transport all colonists from pocket space back to the main map.</WULA.PocketSpace.ExitAllDesc>
|
||||
<WULA.PocketSpace.ExitSuccess>{0} successfully returned to main map.</WULA.PocketSpace.ExitSuccess>
|
||||
|
||||
@@ -2,7 +2,6 @@ using RimWorld;
|
||||
using Verse;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using UnityEngine;
|
||||
|
||||
namespace WulaFallenEmpire
|
||||
@@ -111,104 +110,6 @@ namespace WulaFallenEmpire
|
||||
/// 重写进入按钮图标,使用原版的ViewCave图标
|
||||
/// </summary>
|
||||
protected override Texture2D EnterTex => ContentFinder<Texture2D>.Get("UI/Commands/ViewCave");
|
||||
|
||||
/// <summary>
|
||||
/// 重写GetGizmos方法,添加穿梭机装载相关按钮
|
||||
/// </summary>
|
||||
public override IEnumerable<Gizmo> GetGizmos()
|
||||
{
|
||||
// 获取基类的按钮(退出空间和查看地图按钮)
|
||||
foreach (Gizmo gizmo in base.GetGizmos())
|
||||
{
|
||||
yield return gizmo;
|
||||
}
|
||||
|
||||
// 如果有父穿梭机,添加穿梭机相关的装载按钮
|
||||
if (parentShuttle != null)
|
||||
{
|
||||
// 查看主地图按钮
|
||||
yield return new Command_Action
|
||||
{
|
||||
defaultLabel = "WULA.PocketSpace.ViewMainMap".Translate(),
|
||||
defaultDesc = "WULA.PocketSpace.ViewMainMapDesc".Translate(),
|
||||
icon = ContentFinder<Texture2D>.Get("UI/Commands/ViewWorld"),
|
||||
action = delegate
|
||||
{
|
||||
if (targetMap != null)
|
||||
{
|
||||
Current.Game.CurrentMap = targetMap;
|
||||
if (parentShuttle != null && parentShuttle.Spawned)
|
||||
{
|
||||
Find.CameraDriver.JumpToCurrentMapLoc(parentShuttle.Position);
|
||||
Find.Selector.Select(parentShuttle);
|
||||
}
|
||||
else
|
||||
{
|
||||
Find.CameraDriver.JumpToCurrentMapLoc(targetPos);
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
// 穿梭机装载管理按钮
|
||||
if (parentShuttle.Spawned)
|
||||
{
|
||||
// 获取穿梭机的CompTransporter组件
|
||||
CompTransporter transporter = parentShuttle.GetComp<CompTransporter>();
|
||||
if (transporter != null)
|
||||
{
|
||||
// 添加装载按钮(模仿原版CompTransporter的功能)
|
||||
yield return new Command_Action
|
||||
{
|
||||
defaultLabel = "WULA.PocketSpace.LoadShuttle".Translate(),
|
||||
defaultDesc = "WULA.PocketSpace.LoadShuttleDesc".Translate(),
|
||||
icon = ContentFinder<Texture2D>.Get("UI/Commands/LoadTransporter"),
|
||||
action = delegate
|
||||
{
|
||||
OpenShuttleLoadingDialog(transporter);
|
||||
}
|
||||
};
|
||||
|
||||
// 如果正在装载,添加取消装载按钮
|
||||
if (transporter.LoadingInProgress)
|
||||
{
|
||||
yield return new Command_Action
|
||||
{
|
||||
defaultLabel = "WULA.PocketSpace.CancelLoading".Translate(),
|
||||
defaultDesc = "WULA.PocketSpace.CancelLoadingDesc".Translate(),
|
||||
icon = ContentFinder<Texture2D>.Get("UI/Designators/Cancel"),
|
||||
action = delegate
|
||||
{
|
||||
transporter.CancelLoad();
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
// 添加穿梭机发射按钮(如果正在装载且可以发射)
|
||||
CompLaunchable launchable = parentShuttle.GetComp<CompLaunchable>();
|
||||
if (launchable != null && transporter != null && !transporter.LoadingInProgress)
|
||||
{
|
||||
foreach (Gizmo gizmo in launchable.CompGetGizmosExtra())
|
||||
{
|
||||
yield return gizmo;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// 穿梭机状态信息按钮
|
||||
yield return new Command_Action
|
||||
{
|
||||
defaultLabel = "WULA.PocketSpace.ShuttleStatus".Translate(),
|
||||
defaultDesc = "WULA.PocketSpace.ShuttleStatusDesc".Translate(),
|
||||
icon = ContentFinder<Texture2D>.Get("UI/Commands/InfoCard"),
|
||||
action = delegate
|
||||
{
|
||||
ShowShuttleStatusInfo();
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -242,78 +143,5 @@ namespace WulaFallenEmpire
|
||||
Log.Error($"[WULA] Error exiting pocket space: {ex}");
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 打开穿梭机装载对话框
|
||||
/// </summary>
|
||||
private void OpenShuttleLoadingDialog(CompTransporter transporter)
|
||||
{
|
||||
if (transporter == null) return;
|
||||
|
||||
try
|
||||
{
|
||||
// 使用原版的Dialog_LoadTransporters打开装载对话框
|
||||
Find.WindowStack.Add(new Dialog_LoadTransporters(parentShuttle.Map, new List<CompTransporter> { transporter }));
|
||||
}
|
||||
catch (System.Exception ex)
|
||||
{
|
||||
Log.Error($"[WULA] Error opening shuttle loading dialog: {ex}");
|
||||
Messages.Message("WULA.PocketSpace.LoadingDialogError".Translate(), MessageTypeDefOf.RejectInput);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 显示穿梭机状态信息
|
||||
/// </summary>
|
||||
private void ShowShuttleStatusInfo()
|
||||
{
|
||||
if (parentShuttle == null) return;
|
||||
|
||||
StringBuilder statusText = new StringBuilder();
|
||||
|
||||
// 基本信息
|
||||
statusText.AppendLine("WULA.PocketSpace.ShuttleInfo".Translate());
|
||||
statusText.AppendLine($"• 状态: {(parentShuttle.Spawned ? "已部署" : "飞行中")}");
|
||||
|
||||
if (parentShuttle.Spawned)
|
||||
{
|
||||
statusText.AppendLine($"• 位置: {targetMap?.Parent?.Label ?? "未知"} ({targetPos.x}, {targetPos.z})");
|
||||
|
||||
// 燃料信息
|
||||
CompRefuelable fuel = parentShuttle.GetComp<CompRefuelable>();
|
||||
if (fuel != null)
|
||||
{
|
||||
statusText.AppendLine($"• 燃料: {fuel.Fuel:F0}/{fuel.Props.fuelCapacity:F0}");
|
||||
}
|
||||
|
||||
// 装载信息
|
||||
CompTransporter transporter = parentShuttle.GetComp<CompTransporter>();
|
||||
if (transporter != null)
|
||||
{
|
||||
statusText.AppendLine($"• 载重: {transporter.MassUsage:F1}/{transporter.Props.massCapacity:F1}");
|
||||
if (transporter.LoadingInProgress)
|
||||
{
|
||||
statusText.AppendLine("• 装载状态: 正在装载...");
|
||||
}
|
||||
}
|
||||
|
||||
// 口袋空间信息
|
||||
if (parentShuttle.pocketMapGenerated)
|
||||
{
|
||||
statusText.AppendLine($"• 内部空间: 已初始化");
|
||||
if (parentShuttle.innerContainer.Count > 0)
|
||||
{
|
||||
statusText.AppendLine($"• 内部储存: {parentShuttle.innerContainer.Count} 件物品");
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
statusText.AppendLine("• 穿梭机正在飞行中,无法获取详细信息");
|
||||
}
|
||||
|
||||
// 显示信息对话框
|
||||
Find.WindowStack.Add(new Dialog_MessageBox(statusText.ToString(), "WULA.PocketSpace.ShuttleStatus".Translate()));
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user