1
This commit is contained in:
Binary file not shown.
@@ -204,7 +204,7 @@
|
||||
<tradeability>None</tradeability>
|
||||
<destroyOnDrop>true</destroyOnDrop>
|
||||
<graphicData>
|
||||
<texPath>Wula/Weapon/Wula_Mobile_Factory_Turret</texPath>
|
||||
<texPath>Wula/Weapon/WULA_RW_Unlimit_Penetrating_Beam_Cannon</texPath>
|
||||
<graphicClass>Graphic_Single</graphicClass>
|
||||
<drawSize>0.75</drawSize>
|
||||
</graphicData>
|
||||
|
||||
@@ -118,9 +118,9 @@
|
||||
<turretDef>Wula_AI_Heavy_Panzer_Turret_Weapon</turretDef>
|
||||
<traverseSpeed>20</traverseSpeed>
|
||||
<aimTicks>0</aimTicks>
|
||||
<idleRotationSpeed>5</idleRotationSpeed>
|
||||
<idleRotationSpeed>3</idleRotationSpeed>
|
||||
<smoothRotation>true</smoothRotation>
|
||||
<resetCooldownTime>3</resetCooldownTime>
|
||||
<resetCooldownTime>7</resetCooldownTime>
|
||||
<!-- <angleOffset>-90</angleOffset> -->
|
||||
<renderNodeProperties>
|
||||
<li>
|
||||
@@ -384,10 +384,10 @@
|
||||
<ID>0</ID>
|
||||
<turretDef>Wula_AI_Rocket_Panzer_Turret_Weapon</turretDef>
|
||||
<traverseSpeed>20</traverseSpeed>
|
||||
<aimTicks>30</aimTicks>
|
||||
<aimTicks>0</aimTicks>
|
||||
<idleRotationSpeed>8</idleRotationSpeed>
|
||||
<smoothRotation>true</smoothRotation>
|
||||
<resetCooldownTime>3</resetCooldownTime>
|
||||
<resetCooldownTime>10</resetCooldownTime>
|
||||
<!-- <angleOffset>-90</angleOffset> -->
|
||||
<!-- <angleOffset>-90</angleOffset> -->
|
||||
<renderNodeProperties>
|
||||
@@ -866,7 +866,7 @@
|
||||
<comps>
|
||||
<li Class="WulaFallenEmpire.CompProperties_MultiTurretGun">
|
||||
<ID>0</ID>
|
||||
<turretDef>Wula_CR_Mobile_Factory_Turret</turretDef>
|
||||
<turretDef>Wula_MR_Mobile_Factory_Turret</turretDef>
|
||||
<!-- <angleOffset>-90</angleOffset> -->
|
||||
<renderNodeProperties>
|
||||
<li>
|
||||
@@ -879,7 +879,7 @@
|
||||
<drawData>
|
||||
<dataNorth>
|
||||
<rotationOffset>-90</rotationOffset>
|
||||
<offset>(-1, 0, -1.45)</offset>
|
||||
<offset>(-1.5, 0, -1.45)</offset>
|
||||
<flip>true</flip>
|
||||
<layer>-5</layer>
|
||||
</dataNorth>
|
||||
@@ -890,7 +890,7 @@
|
||||
</dataEast>
|
||||
<dataSouth>
|
||||
<rotationOffset>-90</rotationOffset>
|
||||
<offset>(1.5, 0, -1.45)</offset>
|
||||
<offset>(2.1, 0, -1.45)</offset>
|
||||
</dataSouth>
|
||||
<dataWest>
|
||||
<rotationOffset>90</rotationOffset>
|
||||
@@ -902,7 +902,7 @@
|
||||
</li>
|
||||
<li Class="WulaFallenEmpire.CompProperties_MultiTurretGun">
|
||||
<ID>1</ID>
|
||||
<turretDef>Wula_CR_Mobile_Factory_Turret</turretDef>
|
||||
<turretDef>Wula_MR_Mobile_Factory_Turret</turretDef>
|
||||
<!-- <angleOffset>-90</angleOffset> -->
|
||||
<renderNodeProperties>
|
||||
<li>
|
||||
@@ -915,7 +915,7 @@
|
||||
<drawData>
|
||||
<dataNorth>
|
||||
<rotationOffset>-90</rotationOffset>
|
||||
<offset>(1, 0, -1.45)</offset>
|
||||
<offset>(1.5, 0, -1.45)</offset>
|
||||
<layer>-5</layer>
|
||||
</dataNorth>
|
||||
<dataEast>
|
||||
@@ -924,7 +924,7 @@
|
||||
</dataEast>
|
||||
<dataSouth>
|
||||
<rotationOffset>-90</rotationOffset>
|
||||
<offset>(-1.6, 0, -1.45)</offset>
|
||||
<offset>(-2.1, 0, -1.45)</offset>
|
||||
</dataSouth>
|
||||
<dataWest>
|
||||
<rotationOffset>90</rotationOffset>
|
||||
@@ -937,7 +937,7 @@
|
||||
</li>
|
||||
<li Class="WulaFallenEmpire.CompProperties_MultiTurretGun">
|
||||
<ID>2</ID>
|
||||
<turretDef>Wula_MR_Mobile_Factory_Turret</turretDef>
|
||||
<turretDef>Wula_LR_Mobile_Factory_Turret</turretDef>
|
||||
<!-- <angleOffset>-90</angleOffset> -->
|
||||
<renderNodeProperties>
|
||||
<li>
|
||||
@@ -950,7 +950,7 @@
|
||||
<drawData>
|
||||
<dataNorth>
|
||||
<rotationOffset>-90</rotationOffset>
|
||||
<offset>(-1.3, 0, -0.45)</offset>
|
||||
<offset>(-1.8, 0, -0.45)</offset>
|
||||
<flip>true</flip>
|
||||
<layer>-5</layer>
|
||||
</dataNorth>
|
||||
@@ -961,7 +961,7 @@
|
||||
</dataEast>
|
||||
<dataSouth>
|
||||
<rotationOffset>-90</rotationOffset>
|
||||
<offset>(2.3, 0, -0.45)</offset>
|
||||
<offset>(2.8, 0, -0.45)</offset>
|
||||
</dataSouth>
|
||||
<dataWest>
|
||||
<rotationOffset>90</rotationOffset>
|
||||
@@ -973,7 +973,7 @@
|
||||
</li>
|
||||
<li Class="WulaFallenEmpire.CompProperties_MultiTurretGun">
|
||||
<ID>3</ID>
|
||||
<turretDef>Wula_MR_Mobile_Factory_Turret</turretDef>
|
||||
<turretDef>Wula_LR_Mobile_Factory_Turret</turretDef>
|
||||
<!-- <angleOffset>-90</angleOffset> -->
|
||||
<renderNodeProperties>
|
||||
<li>
|
||||
@@ -986,7 +986,7 @@
|
||||
<drawData>
|
||||
<dataNorth>
|
||||
<rotationOffset>-90</rotationOffset>
|
||||
<offset>(1.3, 0, -0.45)</offset>
|
||||
<offset>(1.8, 0, -0.45)</offset>
|
||||
<flip>true</flip>
|
||||
<layer>-5</layer>
|
||||
</dataNorth>
|
||||
@@ -996,7 +996,7 @@
|
||||
</dataEast>
|
||||
<dataSouth>
|
||||
<rotationOffset>-90</rotationOffset>
|
||||
<offset>(-2.3, 0, -0.45)</offset>
|
||||
<offset>(-2.8, 0, -0.45)</offset>
|
||||
</dataSouth>
|
||||
<dataWest>
|
||||
<rotationOffset>90</rotationOffset>
|
||||
@@ -1022,7 +1022,7 @@
|
||||
<drawData>
|
||||
<dataNorth>
|
||||
<rotationOffset>-90</rotationOffset>
|
||||
<offset>(1.25, 0, 0.45)</offset>
|
||||
<offset>(1.75, 0, 0.45)</offset>
|
||||
<flip>true</flip>
|
||||
<layer>-5</layer>
|
||||
</dataNorth>
|
||||
@@ -1033,7 +1033,7 @@
|
||||
</dataEast>
|
||||
<dataSouth>
|
||||
<rotationOffset>-90</rotationOffset>
|
||||
<offset>(-2.15, 0, 0.65)</offset>
|
||||
<offset>(-2.65, 0, 0.65)</offset>
|
||||
</dataSouth>
|
||||
<dataWest>
|
||||
<rotationOffset>90</rotationOffset>
|
||||
@@ -1058,7 +1058,7 @@
|
||||
<drawData>
|
||||
<dataNorth>
|
||||
<rotationOffset>-90</rotationOffset>
|
||||
<offset>(-1.25, 0, 0.45)</offset>
|
||||
<offset>(-1.75, 0, 0.45)</offset>
|
||||
<flip>true</flip>
|
||||
<layer>-5</layer>
|
||||
</dataNorth>
|
||||
@@ -1068,7 +1068,7 @@
|
||||
</dataEast>
|
||||
<dataSouth>
|
||||
<rotationOffset>-90</rotationOffset>
|
||||
<offset>(2.05, 0, 0.65)</offset>
|
||||
<offset>(2.65, 0, 0.65)</offset>
|
||||
</dataSouth>
|
||||
<dataWest>
|
||||
<rotationOffset>90</rotationOffset>
|
||||
|
||||
BIN
Content/Textures/Wula/UI/Commands/WULA_TargetFocus.png
Normal file
BIN
Content/Textures/Wula/UI/Commands/WULA_TargetFocus.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 6.8 KiB |
@@ -689,22 +689,23 @@ namespace WulaFallenEmpire
|
||||
// 为主控炮塔创建集中火力Gizmo
|
||||
if (IsMasterTurret)
|
||||
{
|
||||
cachedFocusGizmo = new Command_Action();
|
||||
cachedFocusGizmo.defaultLabel = "Wula_FocusFire".Translate();
|
||||
cachedFocusGizmo.defaultDesc = "Wula_FocusFireDesc".Translate();
|
||||
cachedFocusGizmo.icon = ContentFinder<Texture2D>.Get("UI/Gizmos/TargetFocus", false) ?? BaseContent.BadTex;
|
||||
cachedFocusGizmo.action = () =>
|
||||
{
|
||||
// 显示目标选择菜单
|
||||
ShowTargetSelectMenu();
|
||||
};
|
||||
|
||||
// 如果有集中火力目标,添加清除按钮
|
||||
if (focusTarget.IsValid && lastFocusPawn == parent)
|
||||
{
|
||||
cachedFocusGizmo.defaultLabel = "Wula_ClearFocus".Translate();
|
||||
cachedFocusGizmo.defaultDesc = "Wula_ClearFocusDesc".Translate();
|
||||
cachedFocusGizmo.icon = ContentFinder<Texture2D>.Get("UI/Gizmos/TargetClear", false) ?? BaseContent.BadTex;
|
||||
cachedFocusGizmo.icon = ContentFinder<Texture2D>.Get("Wula/UI/Commands/WULA_TargetFocus", false) ?? BaseContent.BadTex;
|
||||
}
|
||||
else {
|
||||
cachedFocusGizmo = new Command_Action();
|
||||
cachedFocusGizmo.defaultLabel = "Wula_FocusFire".Translate();
|
||||
cachedFocusGizmo.defaultDesc = "Wula_FocusFireDesc".Translate();
|
||||
cachedFocusGizmo.icon = ContentFinder<Texture2D>.Get("Wula/UI/Commands/WULA_TargetFocus", false) ?? BaseContent.BadTex;
|
||||
cachedFocusGizmo.action = () =>
|
||||
{
|
||||
// 显示目标选择菜单
|
||||
ShowTargetSelectMenu();
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -715,52 +716,13 @@ namespace WulaFallenEmpire
|
||||
if (focusTarget.IsValid && lastFocusPawn == parent)
|
||||
{
|
||||
focusTarget = LocalTargetInfo.Invalid;
|
||||
Messages.Message("Wula_FocusCleared".Translate(), MessageTypeDefOf.NeutralEvent);
|
||||
return;
|
||||
}
|
||||
|
||||
// 创建目标选择器
|
||||
CameraJumper.TryJump(parent);
|
||||
|
||||
// 显示选择目标的消息
|
||||
Messages.Message("Wula_SelectFocusTarget".Translate(), MessageTypeDefOf.NeutralEvent);
|
||||
|
||||
// 设置目标选择回调
|
||||
TargetingParameters targetingParameters = new TargetingParameters();
|
||||
targetingParameters.canTargetPawns = true;
|
||||
targetingParameters.canTargetBuildings = true;
|
||||
targetingParameters.canTargetItems = false;
|
||||
targetingParameters.canTargetLocations = false;
|
||||
targetingParameters.canTargetSelf = false;
|
||||
targetingParameters.canTargetFires = false;
|
||||
targetingParameters.canTargetAnimals = true;
|
||||
targetingParameters.canTargetHumans = true;
|
||||
targetingParameters.canTargetMechs = true;
|
||||
|
||||
// 添加地图上的所有有生命值的目标
|
||||
targetingParameters.validator = (TargetInfo targ) =>
|
||||
{
|
||||
if (targ.Thing == null)
|
||||
return false;
|
||||
|
||||
// 必须有生命值
|
||||
if (targ.Thing.def.useHitPoints && targ.Thing.HitPoints > 0)
|
||||
{
|
||||
// 不能是友方(可选,根据需求调整)
|
||||
if (targ.Thing.Faction != null && targ.Thing.Faction == parent.Faction)
|
||||
{
|
||||
// 如果是友方,需要特殊确认
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
};
|
||||
|
||||
// 启动目标选择
|
||||
Find.Targeter.BeginTargeting(new TargetingParameters
|
||||
{
|
||||
canTargetLocations = true,
|
||||
canTargetLocations = false,
|
||||
canTargetPawns = true,
|
||||
canTargetBuildings = true,
|
||||
canTargetItems = false
|
||||
@@ -774,11 +736,6 @@ namespace WulaFallenEmpire
|
||||
focusTarget = target;
|
||||
lastFocusSetTick = Find.TickManager.TicksGame;
|
||||
lastFocusPawn = parent;
|
||||
|
||||
Messages.Message(
|
||||
"Wula_FocusTargetSet".Translate(target.Thing.LabelCap),
|
||||
MessageTypeDefOf.PositiveEvent
|
||||
);
|
||||
}
|
||||
}
|
||||
private void OnFocusTargetCancelled()
|
||||
|
||||
BIN
美术与文本源文件/Wula/UI/Abilities/WULA_TargetFocus.sai2
Normal file
BIN
美术与文本源文件/Wula/UI/Abilities/WULA_TargetFocus.sai2
Normal file
Binary file not shown.
Reference in New Issue
Block a user