Merge branch 'testshuttle' of https://git.ra3battle.cn/Kalospacer/WulaFallenEmpireRW into testshuttle
# Conflicts: # 1.6/1.6/Assemblies/WulaFallenEmpire.dll # Source/WulaFallenEmpire/WULA_Shuttle/Building_ArmedShuttleWithPocket.cs
This commit is contained in:
@@ -128,6 +128,7 @@
|
||||
<li Class="CompProperties_AmbientSound">
|
||||
<sound>ShuttleIdle_Ambience</sound>
|
||||
</li>
|
||||
|
||||
</comps>
|
||||
<modExtensions>
|
||||
<li Class="WulaFallenEmpire.PocketMapProperties">
|
||||
|
||||
@@ -7,6 +7,9 @@
|
||||
<WULA.PocketSpace.NotGenerated>未初始化</WULA.PocketSpace.NotGenerated>
|
||||
|
||||
<!-- Gizmo 按钮文本 -->
|
||||
<WULA.PocketSpace.Initialize>初始化内部空间</WULA.PocketSpace.Initialize>
|
||||
<WULA.PocketSpace.InitializeDesc>初始化穿梭机的内部口袋空间。这将在穿梭机内部创建维度储存空间。</WULA.PocketSpace.InitializeDesc>
|
||||
|
||||
<WULA.PocketSpace.Enter>进入内部空间</WULA.PocketSpace.Enter>
|
||||
<WULA.PocketSpace.EnterDesc>进入穿梭机的内部口袋空间。无需骇入即可直接访问。选中的殖民者将被传送到内部空间。</WULA.PocketSpace.EnterDesc>
|
||||
|
||||
@@ -16,6 +19,11 @@
|
||||
|
||||
|
||||
<!-- 消息文本 -->
|
||||
<WULA.PocketSpace.CannotInitialize>无法初始化内部空间。</WULA.PocketSpace.CannotInitialize>
|
||||
<WULA.PocketSpace.AlreadyInitialized>内部空间已经初始化。</WULA.PocketSpace.AlreadyInitialized>
|
||||
<WULA.PocketSpace.InitializeSuccess>内部空间初始化成功。</WULA.PocketSpace.InitializeSuccess>
|
||||
<WULA.PocketSpace.InitializeFailed>内部空间初始化失败。</WULA.PocketSpace.InitializeFailed>
|
||||
|
||||
<WULA.PocketSpace.CannotEnter>无法进入内部空间。</WULA.PocketSpace.CannotEnter>
|
||||
<WULA.PocketSpace.AccessDenied>访问被拒绝。</WULA.PocketSpace.AccessDenied>
|
||||
<WULA.PocketSpace.NotSpawned>穿梭机未部署。</WULA.PocketSpace.NotSpawned>
|
||||
|
||||
@@ -8,6 +8,9 @@
|
||||
<WULA.PocketSpace.ItemCount>Stored items: {0}</WULA.PocketSpace.ItemCount>
|
||||
|
||||
<!-- Gizmo button text -->
|
||||
<WULA.PocketSpace.Initialize>Initialize pocket space</WULA.PocketSpace.Initialize>
|
||||
<WULA.PocketSpace.InitializeDesc>Initialize the shuttle's internal pocket space. This will create the dimensional storage space inside the shuttle.</WULA.PocketSpace.InitializeDesc>
|
||||
|
||||
<WULA.PocketSpace.Enter>Enter pocket space</WULA.PocketSpace.Enter>
|
||||
<WULA.PocketSpace.EnterDesc>Enter the shuttle's internal pocket space. Direct access without hacking required. Selected colonists will be transported to the internal space.</WULA.PocketSpace.EnterDesc>
|
||||
|
||||
@@ -18,6 +21,11 @@
|
||||
<WULA.PocketSpace.ManageStorageDesc>Open internal container management interface to view and retrieve items stored in the pocket space.</WULA.PocketSpace.ManageStorageDesc>
|
||||
|
||||
<!-- Message text -->
|
||||
<WULA.PocketSpace.CannotInitialize>Cannot initialize pocket space.</WULA.PocketSpace.CannotInitialize>
|
||||
<WULA.PocketSpace.AlreadyInitialized>Pocket space already initialized.</WULA.PocketSpace.AlreadyInitialized>
|
||||
<WULA.PocketSpace.InitializeSuccess>Pocket space initialized successfully.</WULA.PocketSpace.InitializeSuccess>
|
||||
<WULA.PocketSpace.InitializeFailed>Pocket space initialization failed.</WULA.PocketSpace.InitializeFailed>
|
||||
|
||||
<WULA.PocketSpace.CannotEnter>Cannot enter pocket space.</WULA.PocketSpace.CannotEnter>
|
||||
<WULA.PocketSpace.AccessDenied>Access denied.</WULA.PocketSpace.AccessDenied>
|
||||
<WULA.PocketSpace.TransportDisabled>Transport functionality disabled (shuttle in flight).</WULA.PocketSpace.TransportDisabled>
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -0,0 +1,71 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using Verse;
|
||||
|
||||
namespace WulaFallenEmpire
|
||||
{
|
||||
/// <summary>
|
||||
/// 用于武装穿梭机口袋空间的IThingHolder实现,与CompTransporter的容器分离
|
||||
/// </summary>
|
||||
public class PocketSpaceThingHolder : IThingHolder, IExposable
|
||||
{
|
||||
/// <summary>持有的物品容器</summary>
|
||||
public ThingOwner<Thing> innerContainer;
|
||||
|
||||
/// <summary>该容器的拥有者(通常是Building_ArmedShuttleWithPocket)</summary>
|
||||
private IThingHolder owner;
|
||||
|
||||
/// <summary>实现IThingHolder.ParentHolder属性</summary>
|
||||
public IThingHolder ParentHolder => owner;
|
||||
|
||||
public PocketSpaceThingHolder()
|
||||
{
|
||||
innerContainer = new ThingOwner<Thing>(this);
|
||||
}
|
||||
|
||||
public PocketSpaceThingHolder(IThingHolder owner) : this()
|
||||
{
|
||||
this.owner = owner;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取直接持有的物品
|
||||
/// </summary>
|
||||
public ThingOwner GetDirectlyHeldThings()
|
||||
{
|
||||
return innerContainer;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取子持有者
|
||||
/// </summary>
|
||||
public void GetChildHolders(List<IThingHolder> outChildren)
|
||||
{
|
||||
// 目前没有子持有者,留空
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 通知物品被添加
|
||||
/// </summary>
|
||||
public void Notify_ThingAdded(Thing t)
|
||||
{
|
||||
// 这里可以添加逻辑来处理物品被添加到口袋空间的情况
|
||||
Log.Message($"[WULA] Item {t.LabelCap} added to pocket space container.");
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 通知物品被移除
|
||||
/// </summary>
|
||||
public void Notify_ThingRemoved(Thing t)
|
||||
{
|
||||
// 这里可以添加逻辑来处理物品被从口袋空间移除的情况
|
||||
Log.Message($"[WULA] Item {t.LabelCap} removed from pocket space container.");
|
||||
}
|
||||
|
||||
public void ExposeData()
|
||||
{
|
||||
Scribe_Deep.Look(ref innerContainer, "innerContainer", this);
|
||||
// owner 通常在构造函数中设置,不需要序列化
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -173,6 +173,7 @@
|
||||
<Compile Include="WULA_Shuttle\Building_PocketMapExit.cs" />
|
||||
<Compile Include="WULA_Shuttle\Dialog_ArmedShuttleTransfer.cs" />
|
||||
<Compile Include="WULA_Shuttle\GenStep_WulaPocketSpaceSmall.cs" />
|
||||
<Compile Include="WULA_Shuttle\PocketSpaceThingHolder.cs" />
|
||||
<Compile Include="HarmonyPatches\Patch_DropCellFinder_SkyfallerCanLandAt.cs" />
|
||||
<Compile Include="MechWeapon\FloatMenuProvider_Mech.cs" />
|
||||
<Compile Include="MechWeapon\Patch_MissingWeapon.cs" />
|
||||
|
||||
Reference in New Issue
Block a user