Skip to content

Commit

Permalink
Merge branch 'main' of https://github.com/StarCoreSE/TLB
Browse files Browse the repository at this point in the history
  • Loading branch information
xianson committed Sep 11, 2024
2 parents 588cede + 198d45d commit be90ae7
Show file tree
Hide file tree
Showing 6 changed files with 317 additions and 3 deletions.
306 changes: 306 additions & 0 deletions ModernWarfareCore/Data/PlaneParts/CubeBlocks_Plane_parts_A.sbc
Original file line number Diff line number Diff line change
Expand Up @@ -1059,5 +1059,311 @@
<PCU>115</PCU>
</Definition>

<!-- Below are aesthetic wing tip blocks -->

<Definition>
<Id>
<TypeId>CubeBlock</TypeId>
<SubtypeId>aero-wing_tip_A_1x1x1_rounded_half_Small</SubtypeId>
</Id>
<DisplayName>Wing_tip_A_1x1x1_rounded_half</DisplayName>
<Icon>Textures\Icons\aero-wing_tip_A_1x1x1_rounded_half.dds</Icon>
<Description>Does not provide lift</Description>
<CubeSize>Small</CubeSize>
<GeneralDamageMultiplier>0.2</GeneralDamageMultiplier>
<BlockTopology>TriangleMesh</BlockTopology>
<Components>
<Component Subtype="SteelPlate" Count="1" />
</Components>
<CriticalComponent Subtype="SteelPlate" Index="0" />

<Size x="1" y="1" z="1" />
<ModelOffset x="0" y="0" z="0" />
<Model>Models\aero-wing_tip_A_1x1x1_rounded_half\aero-wing_tip_A_1x1x1_rounded_half_Small.mwm</Model>
<BuildProgressModels>
<Model BuildPercentUpperBound="1.00" File="Models\aero-wing_tip_A_1x1x1_rounded_half\aero-wing_tip_A_1x1x1_rounded_half_Small_Constr1.mwm" />
</BuildProgressModels>
<MountPoints>
<MountPoint Side="Front" StartX="0.20" StartY="0.00" EndX="1.00" EndY="1.00" />
<MountPoint Side="Back" StartX="0.00" StartY="0.00" EndX="0.80" EndY="1.00" />
<MountPoint Side="Left" StartX="0.00" StartY="0.00" EndX="1.00" EndY="1.00" Default="true"/>
<MountPoint Side="Bottom" StartX="0.00" StartY="0.00" EndX="0.80" EndY="1.00" />
<MountPoint Side="Top" StartX="0.00" StartY="0.00" EndX="0.80" EndY="1.00" />
</MountPoints>
<BlockPairName>aero-wing_tip_A_1x1x1_rounded_half</BlockPairName>
<MirroringX>Z</MirroringX>
<MirroringY>None</MirroringY>
<MirroringZ>X</MirroringZ>
<EdgeType>Light</EdgeType>
<BuildTimeSeconds>3</BuildTimeSeconds>
<PCU>1</PCU>
</Definition>

<Definition>
<Id>
<TypeId>CubeBlock</TypeId>
<SubtypeId>aero-wing_tip_B_1x1x1_rounded_half_Small</SubtypeId>
</Id>
<DisplayName>Wing_tip_B_1x1x1_rounded_half</DisplayName>
<Icon>Textures\Icons\aero-wing_tip_B_1x1x1_rounded_half.dds</Icon>
<Description>Does not provide lift</Description>
<GuiVisible>false</GuiVisible>
<CubeSize>Small</CubeSize>
<GeneralDamageMultiplier>0.2</GeneralDamageMultiplier>
<BlockTopology>TriangleMesh</BlockTopology>
<Components>
<Component Subtype="SteelPlate" Count="1" />
</Components>
<CriticalComponent Subtype="SteelPlate" Index="0" />

<Size x="1" y="1" z="1" />
<ModelOffset x="0" y="0" z="0" />
<Model>Models\aero-wing_tip_B_1x1x1_rounded_half\aero-wing_tip_B_1x1x1_rounded_half_Small.mwm</Model>
<BuildProgressModels>
<Model BuildPercentUpperBound="1.00" File="Models\aero-wing_tip_B_1x1x1_rounded_half\aero-wing_tip_B_1x1x1_rounded_half_Small_Constr1.mwm" />
</BuildProgressModels>
<MountPoints>
<MountPoint Side="Front" StartX="0.20" StartY="0.00" EndX="1.00" EndY="1.00" />
<MountPoint Side="Left" StartX="0.00" StartY="0.00" EndX="1.00" EndY="1.00" Default="true"/>
<MountPoint Side="Bottom" StartX="0.00" StartY="0.00" EndX="0.80" EndY="1.00" />
<MountPoint Side="Top" StartX="0.00" StartY="0.00" EndX="0.80" EndY="1.00" />
</MountPoints>
<BlockPairName>aero-wing_tip_B_1x1x1_rounded_half</BlockPairName>
<MirroringX>Z</MirroringX>
<MirroringY>None</MirroringY>
<MirroringZ>X</MirroringZ>
<EdgeType>Light</EdgeType>
<BuildTimeSeconds>3</BuildTimeSeconds>
<PCU>1</PCU>
</Definition>

<Definition>
<Id>
<TypeId>CubeBlock</TypeId>
<SubtypeId>aero-wing_tip_C_1x1x1_rounded_full_Small</SubtypeId>
</Id>
<DisplayName>Wing_tip_C_1x1x1_rounded_full</DisplayName>
<Icon>Textures\Icons\aero-wing_tip_C_1x1x1_rounded_full.dds</Icon>
<Description>Does not provide lift</Description>
<GuiVisible>false</GuiVisible>
<CubeSize>Small</CubeSize>
<GeneralDamageMultiplier>0.2</GeneralDamageMultiplier>
<BlockTopology>TriangleMesh</BlockTopology>
<Components>
<Component Subtype="SteelPlate" Count="1" />
</Components>
<CriticalComponent Subtype="SteelPlate" Index="0" />

<Size x="1" y="1" z="1" />
<ModelOffset x="0" y="0" z="0" />
<Model>Models\aero-wing_tip_C_1x1x1_rounded_full\aero-wing_tip_C_1x1x1_rounded_full_Small.mwm</Model>
<BuildProgressModels>
<Model BuildPercentUpperBound="1.00" File="Models\aero-wing_tip_C_1x1x1_rounded_full\aero-wing_tip_C_1x1x1_rounded_full_Small_Constr1.mwm" />
</BuildProgressModels>
<MountPoints>
<MountPoint Side="Front" StartX="0.00" StartY="0.00" EndX="1.00" EndY="1.00" />
<MountPoint Side="Left" StartX="0.00" StartY="0.00" EndX="1.00" EndY="1.00" Default="true"/>
<MountPoint Side="Bottom" StartX="0.00" StartY="0.00" EndX="1.00" EndY="1.00" />
<MountPoint Side="Top" StartX="0.00" StartY="0.00" EndX="1.00" EndY="1.00" />
</MountPoints>
<BlockPairName>aero-wing_tip_C_1x1x1_rounded_full</BlockPairName>
<MirroringX>Z</MirroringX>
<MirroringY>None</MirroringY>
<MirroringZ>X</MirroringZ>
<EdgeType>Light</EdgeType>
<BuildTimeSeconds>3</BuildTimeSeconds>
<PCU>1</PCU>
</Definition>

<Definition>
<Id>
<TypeId>CubeBlock</TypeId>
<SubtypeId>aero-wing_tip_D_2x1x1_rounded_full_to_edge_Small</SubtypeId>
</Id>
<DisplayName>Wing_tip_D_2x1x1_rounded_full_to_edge</DisplayName>
<Icon>Textures\Icons\aero-wing_tip_D_2x1x1_rounded_full_to_edge.dds</Icon>
<Description>Does not provide lift</Description>
<CubeSize>Small</CubeSize>
<GeneralDamageMultiplier>0.2</GeneralDamageMultiplier>
<BlockTopology>TriangleMesh</BlockTopology>
<Components>
<Component Subtype="SteelPlate" Count="1" />
</Components>
<CriticalComponent Subtype="SteelPlate" Index="0" />

<Size x="2" y="1" z="1" />
<ModelOffset x="0" y="0" z="0" />
<Model>Models\aero-wing_tip_D_2x1x1_rounded_full_to_edge\aero-wing_tip_D_2x1x1_rounded_full_to_edge_Small.mwm</Model>
<BuildProgressModels>
<Model BuildPercentUpperBound="1.00" File="Models\aero-wing_tip_D_2x1x1_rounded_full_to_edge\aero-wing_tip_D_2x1x1_rounded_full_to_edge_Small_Constr1.mwm" />
</BuildProgressModels>
<MountPoints>
<MountPoint Side="Front" StartX="0.20" StartY="0.00" EndX="1.00" EndY="1.00" />
<MountPoint Side="Back" StartX="0.00" StartY="0.00" EndX="0.80" EndY="1.00" />
<MountPoint Side="Left" StartX="0.00" StartY="0.00" EndX="1.00" EndY="1.00" Default="true"/>
<MountPoint Side="Bottom" StartX="0.00" StartY="0.00" EndX="0.80" EndY="1.00" />
<MountPoint Side="Top" StartX="0.00" StartY="0.00" EndX="0.80" EndY="1.00" />
</MountPoints>
<BlockPairName>aero-wing_tip_D_2x1x1_rounded_full_to_edge</BlockPairName>
<MirroringX>Z</MirroringX>
<MirroringY>None</MirroringY>
<MirroringZ>X</MirroringZ>
<EdgeType>Light</EdgeType>
<BuildTimeSeconds>3</BuildTimeSeconds>
<PCU>1</PCU>
</Definition>

<Definition>
<Id>
<TypeId>CubeBlock</TypeId>
<SubtypeId>aero-wing_tip_E_2x1x1_rounded_half_to_edge_Small</SubtypeId>
</Id>
<DisplayName>Wing_tip_E_2x1x1_rounded_half_ro_edge</DisplayName>
<Icon>Textures\Icons\aero-wing_tip_E_2x1x1_rounded_half_to_edge.dds</Icon>
<Description>Does not provide lift</Description>
<GuiVisible>false</GuiVisible>
<CubeSize>Small</CubeSize>
<GeneralDamageMultiplier>0.2</GeneralDamageMultiplier>
<BlockTopology>TriangleMesh</BlockTopology>
<Components>
<Component Subtype="SteelPlate" Count="1" />
</Components>
<CriticalComponent Subtype="SteelPlate" Index="0" />

<Size x="2" y="1" z="1" />
<ModelOffset x="0" y="0" z="0" />
<Model>Models\aero-wing_tip_E_2x1x1_rounded_half_to_edge\aero-wing_tip_E_2x1x1_rounded_half_to_edge_Small.mwm</Model>
<BuildProgressModels>
<Model BuildPercentUpperBound="1.00" File="Models\aero-wing_tip_E_2x1x1_rounded_half_to_edge\aero-wing_tip_E_2x1x1_rounded_half_to_edge_Small_Constr1.mwm" />
</BuildProgressModels>
<MountPoints>
<MountPoint Side="Front" StartX="0.20" StartY="0.00" EndX="1.00" EndY="1.00" />
<MountPoint Side="Back" StartX="0.00" StartY="0.00" EndX="0.80" EndY="1.00" />
<MountPoint Side="Left" StartX="0.00" StartY="0.00" EndX="1.00" EndY="1.00" Default="true"/>
<MountPoint Side="Bottom" StartX="0.00" StartY="0.00" EndX="0.80" EndY="1.00" />
<MountPoint Side="Top" StartX="0.00" StartY="0.00" EndX="0.80" EndY="1.00" />
</MountPoints>
<BlockPairName>aero-wing_tip_E_2x1x1_rounded_half_to_edge</BlockPairName>
<MirroringX>Z</MirroringX>
<MirroringY>None</MirroringY>
<MirroringZ>X</MirroringZ>
<EdgeType>Light</EdgeType>
<BuildTimeSeconds>3</BuildTimeSeconds>
<PCU>1</PCU>
</Definition>

<Definition>
<Id>
<TypeId>CubeBlock</TypeId>
<SubtypeId>aero-wing_tip_F_2x2x1_edge_to_edge_Small</SubtypeId>
</Id>
<DisplayName>Wing_tip_F_2x2x1_edge_to_edge</DisplayName>
<Icon>Textures\Icons\aero-wing_tip_F_2x2x1_edge_to_edge.dds</Icon>
<Description>Does not provide lift</Description>
<GuiVisible>false</GuiVisible>
<CubeSize>Small</CubeSize>
<GeneralDamageMultiplier>0.2</GeneralDamageMultiplier>
<BlockTopology>TriangleMesh</BlockTopology>
<Components>
<Component Subtype="SteelPlate" Count="1" />
</Components>
<CriticalComponent Subtype="SteelPlate" Index="0" />

<Size x="2" y="1" z="2" />
<ModelOffset x="0" y="0" z="0" />
<Model>Models\aero-wing_tip_F_2x2x1_edge_to_edge\aero-wing_tip_F_2x2x1_edge_to_edge_Small.mwm</Model>
<BuildProgressModels>
<Model BuildPercentUpperBound="1.00" File="Models\aero-wing_tip_F_2x2x1_edge_to_edge\aero-wing_tip_F_2x2x1_edge_to_edge_Small_Constr1.mwm" />
</BuildProgressModels>
<MountPoints>
<MountPoint Side="Back" StartX="0.00" StartY="0.00" EndX="2.00" EndY="1.00" />
<MountPoint Side="Left" StartX="0.00" StartY="0.00" EndX="2.00" EndY="1.00" />
</MountPoints>
<BlockPairName>aero-wing_tip_F_2x2x1_edge_to_edge</BlockPairName>
<MirroringX>Z</MirroringX>
<MirroringY>None</MirroringY>
<MirroringZ>X</MirroringZ>
<EdgeType>Light</EdgeType>
<BuildTimeSeconds>3</BuildTimeSeconds>
<PCU>1</PCU>
</Definition>

<Definition>
<Id>
<TypeId>CubeBlock</TypeId>
<SubtypeId>aero-wing_tip_G_05x05x1_rounded_half_Small</SubtypeId>
</Id>
<DisplayName>Wing_tip_G_0.5x0.5x1_rounded_half</DisplayName>
<Icon>Textures\Icons\aero-wing_tip_G_05x05x1_rounded_half.dds</Icon>
<Description>Does not provide lift</Description>
<GuiVisible>false</GuiVisible>
<CubeSize>Small</CubeSize>
<GeneralDamageMultiplier>0.2</GeneralDamageMultiplier>
<BlockTopology>TriangleMesh</BlockTopology>
<Components>
<Component Subtype="SteelPlate" Count="1" />
</Components>
<CriticalComponent Subtype="SteelPlate" Index="0" />

<Size x="1" y="1" z="1" />
<ModelOffset x="0" y="0" z="0" />
<Model>Models\aero-wing_tip_G_05x05x1_rounded_half\aero-wing_tip_G_05x05x1_rounded_half_Small.mwm</Model>
<BuildProgressModels>
<Model BuildPercentUpperBound="1.00" File="Models\aero-wing_tip_G_05x05x1_rounded_half\aero-wing_tip_G_05x05x1_rounded_half_Small_Constr1.mwm" />
</BuildProgressModels>
<MountPoints>
<MountPoint Side="Front" StartX="0.50" StartY="0.00" EndX="1.00" EndY="1.00" />
<MountPoint Side="Left" StartX="0.00" StartY="0.00" EndX="0.50" EndY="1.00" />
<MountPoint Side="Bottom" StartX="0.00" StartY="0.00" EndX="0.50" EndY="0.50" />
<MountPoint Side="Top" StartX="0.00" StartY="0.50" EndX="0.50" EndY="1.00" />
</MountPoints>
<BlockPairName>aero-wing_tip_G_05x05x1_rounded_half</BlockPairName>
<MirroringX>Z</MirroringX>
<MirroringY>None</MirroringY>
<MirroringZ>X</MirroringZ>
<EdgeType>Light</EdgeType>
<BuildTimeSeconds>3</BuildTimeSeconds>
<PCU>1</PCU>
</Definition>

<Definition>
<Id>
<TypeId>CubeBlock</TypeId>
<SubtypeId>aero-wing_inside_curved_1x1x1_rounded_Small</SubtypeId>
</Id>
<DisplayName>Wing_1x1x1_inside_curved_rounded</DisplayName>
<Icon>Textures\Icons\aero-wing_inside_curved_1x1x1_rounded.dds</Icon>
<Description>Does not provide lift</Description>
<CubeSize>Small</CubeSize>
<GeneralDamageMultiplier>0.2</GeneralDamageMultiplier>
<BlockTopology>TriangleMesh</BlockTopology>
<Components>
<Component Subtype="SteelPlate" Count="1" />
</Components>
<CriticalComponent Subtype="SteelPlate" Index="0" />

<Size x="1" y="1" z="1" />
<ModelOffset x="0" y="0" z="0" />
<Model>Models\aero-wing_inside_curved_1x1x1_rounded\aero-wing_inside_curved_1x1x1_rounded_Small.mwm</Model>
<BuildProgressModels>
<Model BuildPercentUpperBound="1.00" File="Models\aero-wing_inside_curved_1x1x1_rounded\aero-wing_inside_curved_1x1x1_rounded_Small_Constr1.mwm" />
</BuildProgressModels>
<MountPoints>
<MountPoint Side="Front" StartX="0.00" StartY="0.00" EndX="1.00" EndY="1.00" />
<MountPoint Side="Back" StartX="0.00" StartY="0.00" EndX="1.00" EndY="1.00" />
<MountPoint Side="Left" StartX="0.00" StartY="0.00" EndX="1.00" EndY="1.00" />
<MountPoint Side="Right" StartX="0.00" StartY="0.00" EndX="1.00" EndY="1.00" />
<MountPoint Side="Bottom" StartX="0.00" StartY="0.00" EndX="1.00" EndY="1.00" />
<MountPoint Side="Top" StartX="0.00" StartY="0.00" EndX="1.00" EndY="1.00" />
</MountPoints>
<BlockPairName>aero-wing_inside_curved_1x1x1_rounded</BlockPairName>
<MirroringX>Z</MirroringX>
<MirroringY>None</MirroringY>
<MirroringZ>X</MirroringZ>
<EdgeType>Light</EdgeType>
<BuildTimeSeconds>3</BuildTimeSeconds>
<PCU>1</PCU>
</Definition>

</CubeBlocks>
</Definitions>
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ public class BlockRemover : MySessionComponentBase
"Plane",
"plane", ///... plane parts, fuck you.
"wing_fill",
"wing_tip",
//"wing_tip",
"wing_rigging",
});

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

namespace bob
{
[MyEntityComponentDescriptor(typeof(MyObjectBuilder_LargeMissileTurret), false, "Shotgun", "RB_CompactTurretMissile_Small","Flamer", "Shotgun_Large", "RB_CompactTurretMissile_Small_Large", "Flamer_Large", "Minigun_Large", "Minigun")]
[MyEntityComponentDescriptor(typeof(MyObjectBuilder_LargeMissileTurret), false, "Shotgun", "RB_CompactTurretMissile_Small","Flamer", "Shotgun_Large", "RB_CompactTurretMissile_Small_Large", "Flamer_Large", "Minigun_Large", "Minigun", "SwordLauncher")]
public class MissileTurret : MyGameLogicComponent
{
private IMyFunctionalBlock block;
Expand Down
2 changes: 1 addition & 1 deletion ModernWarfareGuns/Data/Secondary Weapons/Sword.sbc
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@
<Volume>30</Volume>
<Model>Models\Magazines\GrenadeCrate.mwm</Model>
<PhysicalMaterial>Ammo</PhysicalMaterial>
<Capacity>3</Capacity>
<Capacity>140</Capacity>
<AmmoDefinitionId Subtype="SwordAmmo" />

<MinimumOfferAmount>100</MinimumOfferAmount>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ internal class GridStats // TODO convert this to be event-driven. OnBlockPlace,
private WcApi WcApi => AllGridsList.I.WcApi;

public bool NeedsUpdate { get; private set; } = true;
public bool IsPrimaryGrid = false;

#region Public Methods

Expand Down Expand Up @@ -313,6 +314,10 @@ private void CalculateCost(IMyCubeBlock block)

if (WcApi.HasCoreWeapon((MyEntity)block))
{
// Weapons on subgrids have an extra 20% cost applied (this is disabled)
//if (!IsPrimaryGrid)
// blockPoints = (int)(blockPoints * 1.2f);

var validTargetTypes = new List<string>();
WcApi.GetTurretTargetTypes((MyEntity)block, validTargetTypes);
if (validTargetTypes.Contains("Projectiles"))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,10 @@ public void Update()

// TODO: Update pilots
foreach (var gridStat in _gridStats.Values)
{
gridStat.IsPrimaryGrid = gridStat.Grid == Grid;
gridStat.Update();
}

bool bufferIsFunctional = IsFunctional;
IsFunctional = TotalPower > 0 && TotalTorque > 0 && CockpitCount > 0;
Expand Down

0 comments on commit be90ae7

Please sign in to comment.