Skip to content

Commit

Permalink
Merge pull request #108 from InvalidArgument3/initialversion
Browse files Browse the repository at this point in the history
init adminbloc
  • Loading branch information
InvalidArgument3 authored Oct 12, 2024
2 parents a3295ab + 613f6fb commit 005ad98
Show file tree
Hide file tree
Showing 13 changed files with 614 additions and 0 deletions.
29 changes: 29 additions & 0 deletions TSTSSESAdminBlocks/Data/AdminPack.sbc
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
<?xml version="1.0"?>
<Definitions xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<Components>

<!-- AdminPack -->

<Component>
<Id>
<TypeId>Component</TypeId>
<SubtypeId>AdminPack</SubtypeId>
</Id>
<DisplayName>AdminPack</DisplayName>
<Icon>Textures\GUI\Icons\Items\ZoneChip_Item.dds</Icon>
<Size>
<X>0.2</X>
<Y>0.1</Y>
<Z>0.1</Z>
</Size>
<Mass>8</Mass>
<Volume>2</Volume>
<Model>Models\Items\ZoneChip_Item.mwm</Model>
<PhysicalMaterial>Metal</PhysicalMaterial>
<MaxIntegrity>999999999</MaxIntegrity>
<DropProbability>0</DropProbability>
<Health>1</Health>
</Component>

</Components>
</Definitions>
66 changes: 66 additions & 0 deletions TSTSSESAdminBlocks/Data/Admin_Battery.sbc
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
<?xml version="1.0" ?>
<Definitions xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<CubeBlocks>

<Definition xsi:type="MyObjectBuilder_ReactorDefinition">
<Id>
<TypeId>Reactor</TypeId>
<SubtypeId>AdminGrid_Battery</SubtypeId>
</Id>
<DisplayName>Admin Battery</DisplayName>
<Icon>Textures\GUI\Icons\Cubes\Battery.dds</Icon>
<Description>Description_Battery</Description>
<CubeSize>Large</CubeSize>
<BlockTopology>TriangleMesh</BlockTopology>
<Size x="1" y="1" z="1" />
<ModelOffset x="0" y="0" z="0" />
<Model>Models\Cubes\Large\BatteryLarge.mwm</Model>

<Components>
<Component Subtype="AdminPack" Count="1" >
<DeconstructId>
<TypeId>Ore</TypeId>
<SubtypeId>Scrap</SubtypeId>
</DeconstructId>
</Component>
<Component Subtype="Computer" Count="1" />
</Components>

<CriticalComponent Subtype="AdminPack" Index="0" />

<BuildProgressModels>
<Model BuildPercentUpperBound="0.33" File="Models\Cubes\Large\BatteryLargeConstruction_1.mwm" />
<Model BuildPercentUpperBound="0.66" File="Models\Cubes\Large\BatteryLargeConstruction_2.mwm" />
<Model BuildPercentUpperBound="1.00" File="Models\Cubes\Large\BatteryLargeConstruction_3.mwm" />
</BuildProgressModels>
<BlockPairName>AdminBattery</BlockPairName>
<MirroringY>Z</MirroringY>
<MirroringZ>Y</MirroringZ>
<EdgeType>Light</EdgeType>
<BuildTimeSeconds>9999999</BuildTimeSeconds>

<MaxPowerOutput>100000</MaxPowerOutput>

<InventorySize>
<X>1</X>
<Y>1</Y>
<Z>1</Z>
</InventorySize>

<PrimarySound>ShipLrgNuclearSm</PrimarySound>
<DamageEffectName>Damage_Reactor_Damaged</DamageEffectName>
<DamagedSound>ParticleReactor</DamagedSound>
<EmissiveColorPreset>Default</EmissiveColorPreset>
<DestroyEffect>BlockDestroyedExplosion_Large</DestroyEffect>
<DestroySound>WepSmallWarheadExpl</DestroySound>
<PCU>25</PCU>
<IsAirTight>false</IsAirTight>
<TieredUpdateTimes>
<unsignedInt>900</unsignedInt>
<unsignedInt>1800</unsignedInt>
<unsignedInt>3600</unsignedInt>
</TieredUpdateTimes>
</Definition>

</CubeBlocks>
</Definitions>
104 changes: 104 additions & 0 deletions TSTSSESAdminBlocks/Data/Admin_H2O2Gen.sbc
Original file line number Diff line number Diff line change
@@ -0,0 +1,104 @@
<?xml version="1.0" ?>
<Definitions xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<CubeBlocks>

<Definition xsi:type="MyObjectBuilder_OxygenGeneratorDefinition">
<Id>
<TypeId>OxygenGenerator</TypeId>
<SubtypeId>AdminGrid_OxygenGenerator</SubtypeId>
</Id>
<DisplayName>Admin O2/H2 Generator</DisplayName>
<Icon>Textures\GUI\Icons\Cubes\OxygenGenerator.dds</Icon>
<Description>Description_OxygenGenerator</Description>
<CubeSize>Large</CubeSize>
<BlockTopology>TriangleMesh</BlockTopology>
<Size x="1" y="2" z="1" />
<ModelOffset x="0" y="0" z="0" />
<Model>Models\Cubes\Large\OxygenGenerator.mwm</Model>

<Components>
<Component Subtype="AdminPack" Count="1" >
<DeconstructId>
<TypeId>Ore</TypeId>
<SubtypeId>Scrap</SubtypeId>
</DeconstructId>
</Component>
<Component Subtype="Computer" Count="1" />
</Components>

<CriticalComponent Subtype="AdminPack" Index="0" />
<MountPoints>
<MountPoint Side="Back" StartX="0.1" StartY="0.1" EndX="0.9" EndY="0.9" />
<MountPoint Side="Front" StartX="0.1" StartY="0.1" EndX="0.9" EndY="0.9" />
<MountPoint Side="Bottom" StartX="0.1" StartY="0.1" EndX="0.9" EndY="0.9" Default="true" />
<MountPoint Side="Top" StartX="0.1" StartY="0.1" EndX="0.9" EndY="0.9" />
<MountPoint Side="Left" StartX="0.1" StartY="0.1" EndX="0.9" EndY="0.9" />
<MountPoint Side="Right" StartX="0.1" StartY="0.1" EndX="0.9" EndY="0.9" />
</MountPoints>
<IsAirTight>true</IsAirTight>
<BuildProgressModels>
<Model BuildPercentUpperBound="0.33" File="Models\Cubes\Large\OxygenGeneratorConstruction_1.mwm" />
<Model BuildPercentUpperBound="0.66" File="Models\Cubes\Large\OxygenGeneratorConstruction_2.mwm" />
<Model BuildPercentUpperBound="1.00" File="Models\Cubes\Large\OxygenGeneratorConstruction_3.mwm" />
</BuildProgressModels>
<BlockPairName>AdminOxygenGenerator</BlockPairName>
<EdgeType>Light</EdgeType>
<BuildTimeSeconds>999999</BuildTimeSeconds>
<ResourceSourceGroup>Reactors</ResourceSourceGroup>
<ResourceSinkGroup>Factory</ResourceSinkGroup>
<IceConsumptionPerSecond>25</IceConsumptionPerSecond>
<InventoryMaxVolume>4</InventoryMaxVolume>
<InventorySize>
<X>2</X>
<Y>2</Y>
<Z>2</Z>
</InventorySize>

<InventoryFillFactorMin>0.3</InventoryFillFactorMin>
<InventoryFillFactorMax>0.6</InventoryFillFactorMax>

<FuelPullAmountFromConveyorInMinutes>2.2</FuelPullAmountFromConveyorInMinutes>

<StandbyPowerConsumption>0.001</StandbyPowerConsumption>
<OperationalPowerConsumption>0.5</OperationalPowerConsumption>
<ProducedGases>
<GasInfo>
<Id>
<TypeId>GasProperties</TypeId>
<SubtypeId>Oxygen</SubtypeId>
</Id>
<IceToGasRatio>1000</IceToGasRatio>
</GasInfo>
<GasInfo>
<Id>
<TypeId>GasProperties</TypeId>
<SubtypeId>Hydrogen</SubtypeId>
</Id>
<IceToGasRatio>1000</IceToGasRatio>
</GasInfo>
</ProducedGases>
<BlueprintClasses>
<Class>AdminIce</Class>
<Class>OxygenBottles</Class>
<Class>HydrogenBottles</Class>
</BlueprintClasses>
<DamageEffectName>Damage_WeapExpl_Damaged</DamageEffectName>
<DamagedSound>ParticleWeapExpl</DamagedSound>
<GenerateSound>BlockOxyGenProcess</GenerateSound>
<IdleSound>BlockOxyGenIdle</IdleSound>
<EmissiveColorPreset>Extended</EmissiveColorPreset>
<DestroyEffect>BlockDestroyedExplosion_Large</DestroyEffect>
<DestroySound>WepSmallWarheadExpl</DestroySound>
<MirroringX>Y</MirroringX>
<MirroringY>Z</MirroringY>
<MirroringZ>Y</MirroringZ>
<PCU>50</PCU>
<TieredUpdateTimes>
<unsignedInt>300</unsignedInt>
<unsignedInt>600</unsignedInt>
<unsignedInt>1200</unsignedInt>
</TieredUpdateTimes>
</Definition>

</CubeBlocks>
</Definitions>
70 changes: 70 additions & 0 deletions TSTSSESAdminBlocks/Data/Admin_SafeZone.sbc
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
<?xml version="1.0" ?>
<Definitions xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<CubeBlocks>

<Definition xsi:type="MyObjectBuilder_SafeZoneBlockDefinition">
<Id>
<TypeId>SafeZoneBlock</TypeId>
<SubtypeId>AdminGrid_SafeZone</SubtypeId>
</Id>
<DisplayName>Admin Safe Zone</DisplayName>
<Icon>Textures\GUI\Icons\Cubes\ArtificialMass.dds</Icon>
<Description>Description_SafeZone</Description>
<CubeSize>Large</CubeSize>
<BlockTopology>TriangleMesh</BlockTopology>
<Size x="1" y="1" z="1" />
<ModelOffset x="0" y="0" z="0" />
<Model>Models\AdminSafeZone\AdminSafeZone.mwm</Model>

<Components>
<Component Subtype="AdminPack" Count="1" >
<DeconstructId>
<TypeId>Ore</TypeId>
<SubtypeId>Scrap</SubtypeId>
</DeconstructId>
</Component>
<Component Subtype="Computer" Count="1" />
</Components>

<CriticalComponent Subtype="AdminPack" Index="0" />

<MountPoints>
<MountPoint Side="Top" StartX="0.1" StartY="0.1" EndX="2.9" EndY="1.9" />
<MountPoint Side="Back" StartX="0.1" StartY="0.1" EndX="2.9" EndY="2.9" />
<MountPoint Side="Left" StartX="0.1" StartY="0.1" EndX="1.9" EndY="2.9" />
<MountPoint Side="Front" StartX="0.1" StartY="0.1" EndX="2.9" EndY="2.9" />
<MountPoint Side="Right" StartX="0.1" StartY="0.1" EndX="1.9" EndY="2.9" />
<MountPoint Side="Bottom" StartX="0.1" StartY="0.1" EndX="2.9" EndY="1.9" />
</MountPoints>
<BuildProgressModels>
<Model BuildPercentUpperBound="0.33" File="Models\Cubes\Large\VirtualMassBlockConstruction_1.mwm" />
<Model BuildPercentUpperBound="0.66" File="Models\Cubes\Large\VirtualMassBlockConstruction_2.mwm" />
<Model BuildPercentUpperBound="1.00" File="Models\Cubes\Large\VirtualMassBlockConstruction_3.mwm" />
</BuildProgressModels>

<BlockPairName>AdminSafeZone</BlockPairName>
<EdgeType>Light</EdgeType>
<MirroringY>Z</MirroringY>
<BuildTimeSeconds>9999999</BuildTimeSeconds>
<DamageEffectName>Damage_Electrical_Damaged</DamageEffectName>
<DamagedSound>ParticleElectrical</DamagedSound>

<!-- Safezone info -->
<MaxSafeZoneRadius>500</MaxSafeZoneRadius>
<MinSafeZoneRadius>10</MinSafeZoneRadius>
<DefaultSafeZoneRadius>10</DefaultSafeZoneRadius>
<SafeZoneActivationTimeS>10</SafeZoneActivationTimeS>
<MaxSafeZonePowerDrainkW>0</MaxSafeZonePowerDrainkW>
<MinSafeZonePowerDrainkW>0</MinSafeZonePowerDrainkW>
<SafeZoneUpkeep>0</SafeZoneUpkeep>
<SafeZoneUpkeepTimeM>999999999</SafeZoneUpkeepTimeM>
<!-- End Safezone Props-->

<ActionSound>BlockSafeZone</ActionSound>
<DestroyEffect>BlockDestroyedExplosion_Large</DestroyEffect>
<DestroySound>WepSmallWarheadExpl</DestroySound>
<PCU>50</PCU>
</Definition>

</CubeBlocks>
</Definitions>
22 changes: 22 additions & 0 deletions TSTSSESAdminBlocks/Data/BlockCategories_AdminBlocks.sbc
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
<?xml version="1.0" encoding="utf-8"?>
<Definitions xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<CategoryClasses>

<Category xsi:type="MyObjectBuilder_GuiBlockCategoryDefinition">
<Id>
<TypeId>GuiBlockCategoryDefinition</TypeId>
<SubtypeId/>
</Id>
<DisplayName>Admin Blocks</DisplayName>
<Name>Admin Blocks</Name>

<ItemIds>
<string>AdminGrid_Battery</string>
<string>AdminGrid_SafeZone</string>
<string>AdminGrid_OxygenGenerator</string>
</ItemIds>

</Category>

</CategoryClasses>
</Definitions>
62 changes: 62 additions & 0 deletions TSTSSESAdminBlocks/Data/EntityComponents-SafeZone.sbc
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
<?xml version="1.0" encoding="utf-8" ?>
<Definitions xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<!--
Usage:
All entity component definitions (not components used in assemblers in game) have base class MyComponentDefinitionBase.
You can define default definition for all components of same type, if you ommit the SubtypeId:
<EntityComponents>
<EntityComponent xsi:type="MyObjectBuilder_CraftingComponentBlockDefinition">
<Id>
<TypeId>MyObjectBuilder_CraftingComponentBlock</TypeId>
</Id>
</EntityComponent>
</EntityComponents>
You need to define type of the definition for deserializer - xsi:type="MyObjectBuilder_CraftingComponentBlockDefinition"
When container on init of the components will look for component definition, it will first look for the same SubtypeId,
when it's not found, it will look for the definition with empty SubtypeId, if it doesn't find either, it will not call
Init(MyComponentDefinitionBase definition) on component. If definition is found, it will pass the definition and call that method.
See EntityContainers.sbc for defining default components in containers.
To enable the MyModStorageComponent and allow mods to save custom data to entities, add a entry like the following
and list all the custom GUIDs the mod uses for the dictionary keys.
<EntityComponents>
<EntityComponent xsi:type="MyObjectBuilder_ModStorageComponentDefinition">
<Id>
<TypeId>ModStorageComponent</TypeId>
<SubtypeId>ModName</SubtypeId>
</Id>
<RegisteredStorageGuids>
<guid>00000000-0000-0000-0000-000000000000</guid>
</RegisteredStorageGuids>
</EntityComponent>
</EntityComponents>
-->
<EntityComponents>



<EntityComponent xsi:type="MyObjectBuilder_InventoryComponentDefinition">
<Id>
<TypeId>Inventory</TypeId>
<SubtypeId>AdminGrid_SafeZone</SubtypeId>
</Id>
<Volume>0.005</Volume>
<InputConstraint IsWhitelist="true">
<Entry>
<TypeId>Component</TypeId>
<SubtypeId>ZoneChip</SubtypeId>
</Entry>
</InputConstraint>
</EntityComponent>

</EntityComponents>

</Definitions>
Loading

0 comments on commit 005ad98

Please sign in to comment.