diff --git a/TSTSSESAdminBlocks/Data/AdminPack.sbc b/TSTSSESAdminBlocks/Data/AdminPack.sbc new file mode 100644 index 00000000..48e70cbd --- /dev/null +++ b/TSTSSESAdminBlocks/Data/AdminPack.sbc @@ -0,0 +1,29 @@ + + + + + + + + + Component + AdminPack + + AdminPack + Textures\GUI\Icons\Items\ZoneChip_Item.dds + + 0.2 + 0.1 + 0.1 + + 8 + 2 + Models\Items\ZoneChip_Item.mwm + Metal + 999999999 + 0 + 1 + + + + diff --git a/TSTSSESAdminBlocks/Data/Admin_Battery.sbc b/TSTSSESAdminBlocks/Data/Admin_Battery.sbc new file mode 100644 index 00000000..789844cb --- /dev/null +++ b/TSTSSESAdminBlocks/Data/Admin_Battery.sbc @@ -0,0 +1,66 @@ + + + + + + + Reactor + AdminGrid_Battery + + Admin Battery + Textures\GUI\Icons\Cubes\Battery.dds + Description_Battery + Large + TriangleMesh + + + Models\Cubes\Large\BatteryLarge.mwm + + + + + Ore + Scrap + + + + + + + + + + + + + AdminBattery + Z + Y + Light + 9999999 + + 100000 + + + 1 + 1 + 1 + + + ShipLrgNuclearSm + Damage_Reactor_Damaged + ParticleReactor + Default + BlockDestroyedExplosion_Large + WepSmallWarheadExpl + 25 + false + + 900 + 1800 + 3600 + + + + + diff --git a/TSTSSESAdminBlocks/Data/Admin_H2O2Gen.sbc b/TSTSSESAdminBlocks/Data/Admin_H2O2Gen.sbc new file mode 100644 index 00000000..8a091e3f --- /dev/null +++ b/TSTSSESAdminBlocks/Data/Admin_H2O2Gen.sbc @@ -0,0 +1,104 @@ + + + + + + + OxygenGenerator + AdminGrid_OxygenGenerator + + Admin O2/H2 Generator + Textures\GUI\Icons\Cubes\OxygenGenerator.dds + Description_OxygenGenerator + Large + TriangleMesh + + + Models\Cubes\Large\OxygenGenerator.mwm + + + + + Ore + Scrap + + + + + + + + + + + + + + + true + + + + + + AdminOxygenGenerator + Light + 999999 + Reactors + Factory + 25 + 4 + + 2 + 2 + 2 + + + 0.3 + 0.6 + + 2.2 + + 0.001 + 0.5 + + + + GasProperties + Oxygen + + 1000 + + + + GasProperties + Hydrogen + + 1000 + + + + AdminIce + OxygenBottles + HydrogenBottles + + Damage_WeapExpl_Damaged + ParticleWeapExpl + BlockOxyGenProcess + BlockOxyGenIdle + Extended + BlockDestroyedExplosion_Large + WepSmallWarheadExpl + Y + Z + Y + 50 + + 300 + 600 + 1200 + + + + + diff --git a/TSTSSESAdminBlocks/Data/Admin_SafeZone.sbc b/TSTSSESAdminBlocks/Data/Admin_SafeZone.sbc new file mode 100644 index 00000000..3934248a --- /dev/null +++ b/TSTSSESAdminBlocks/Data/Admin_SafeZone.sbc @@ -0,0 +1,70 @@ + + + + + + + SafeZoneBlock + AdminGrid_SafeZone + + Admin Safe Zone + Textures\GUI\Icons\Cubes\ArtificialMass.dds + Description_SafeZone + Large + TriangleMesh + + + Models\AdminSafeZone\AdminSafeZone.mwm + + + + + Ore + Scrap + + + + + + + + + + + + + + + + + + + + + + AdminSafeZone + Light + Z + 9999999 + Damage_Electrical_Damaged + ParticleElectrical + + + 500 + 10 + 10 + 10 + 0 + 0 + 0 + 999999999 + + + BlockSafeZone + BlockDestroyedExplosion_Large + WepSmallWarheadExpl + 50 + + + + diff --git a/TSTSSESAdminBlocks/Data/BlockCategories_AdminBlocks.sbc b/TSTSSESAdminBlocks/Data/BlockCategories_AdminBlocks.sbc new file mode 100644 index 00000000..567a21a2 --- /dev/null +++ b/TSTSSESAdminBlocks/Data/BlockCategories_AdminBlocks.sbc @@ -0,0 +1,22 @@ + + + + + + + GuiBlockCategoryDefinition + + + Admin Blocks + Admin Blocks + + + AdminGrid_Battery + AdminGrid_SafeZone + AdminGrid_OxygenGenerator + + + + + + diff --git a/TSTSSESAdminBlocks/Data/EntityComponents-SafeZone.sbc b/TSTSSESAdminBlocks/Data/EntityComponents-SafeZone.sbc new file mode 100644 index 00000000..75a7b6c3 --- /dev/null +++ b/TSTSSESAdminBlocks/Data/EntityComponents-SafeZone.sbc @@ -0,0 +1,62 @@ + + + + + + + + + + Inventory + AdminGrid_SafeZone + + 0.005 + + + Component + ZoneChip + + + + + + + diff --git a/TSTSSESAdminBlocks/Data/EntityContainers-SafeZone.sbc b/TSTSSESAdminBlocks/Data/EntityContainers-SafeZone.sbc new file mode 100644 index 00000000..6a8bd64a --- /dev/null +++ b/TSTSSESAdminBlocks/Data/EntityContainers-SafeZone.sbc @@ -0,0 +1,65 @@ + + + + + + + + + + SafeZoneBlock + AdminGrid_SafeZone + + + + + + + + diff --git a/TSTSSESAdminBlocks/Data/PhysicalItems_AdminIce.sbc b/TSTSSESAdminBlocks/Data/PhysicalItems_AdminIce.sbc new file mode 100644 index 00000000..8533b228 --- /dev/null +++ b/TSTSSESAdminBlocks/Data/PhysicalItems_AdminIce.sbc @@ -0,0 +1,22 @@ + + + + + + Ore + AdminIce + + Ice + Textures\GUI\Icons\ore_H2O_ice.dds + + 0.07 + 0.07 + 0.07 + + 1 + 0.37 + Models\Components\Sphere.mwm + AI + + + \ No newline at end of file diff --git a/TSTSSESAdminBlocks/Data/Scripts/O2H2AutoRefill.cs.disabled b/TSTSSESAdminBlocks/Data/Scripts/O2H2AutoRefill.cs.disabled new file mode 100644 index 00000000..69a2a5bc --- /dev/null +++ b/TSTSSESAdminBlocks/Data/Scripts/O2H2AutoRefill.cs.disabled @@ -0,0 +1,50 @@ +using Sandbox.Common.ObjectBuilders; +using Sandbox.Game; +using SpaceEngineers.Game.ModAPI; +using VRage.Game; +using VRage.Game.Components; +using VRage.ModAPI; +using VRage.ObjectBuilders; +using IMyInventory = VRage.Game.ModAPI.IMyInventory; + +namespace Klime.O2H2AutoRefill +{ + [MyEntityComponentDescriptor(typeof(MyObjectBuilder_OxygenGenerator), false, "AdminGrid_OxygenGenerator")] + public class O2H2AutoRefill : MyGameLogicComponent + { + private IMyOxygenGenerator O2H2Gen; + private IMyInventory O2H2inv; + private MyObjectBuilder_Ore O2H2ore = new MyObjectBuilder_Ore(); + + public override void Init(MyObjectBuilder_EntityBase objectBuilder) + { + O2H2Gen = Entity as IMyOxygenGenerator; + O2H2ore.SubtypeName = "AdminIce"; + NeedsUpdate = MyEntityUpdateEnum.EACH_100TH_FRAME; + if (O2H2Gen != null) + { + O2H2inv = O2H2Gen.GetInventory(); + } + } + + public void UpdateInventory() + { + if (O2H2inv != null) + { + O2H2inv.AddItems(100,O2H2ore); + } + } + + public override void UpdateBeforeSimulation100() + { + if (O2H2Gen.CubeGrid.Physics != null) + { + UpdateInventory(); + } + } + + public override void Close() + { + } + } +} \ No newline at end of file diff --git a/TSTSSESAdminBlocks/Data/Scripts/admingrids.cs.disabled b/TSTSSESAdminBlocks/Data/Scripts/admingrids.cs.disabled new file mode 100644 index 00000000..64166073 --- /dev/null +++ b/TSTSSESAdminBlocks/Data/Scripts/admingrids.cs.disabled @@ -0,0 +1,109 @@ +using System.Collections.Generic; +using System.Linq; +using System.Text; +using Sandbox.Common.Components; +using Sandbox.Game.Gui; +using Sandbox.Game.GUI; +using Sandbox.Game.Localization; + +using Sandbox.Graphics.GUI; + +using VRage.Game.ModAPI; +using VRage.Game.ModAPI.Ingame; +using VRage.Game.ModAPI.Interfaces; + + +using System; +using Sandbox.Game; +using Sandbox.Game.Entities.Character; +using Sandbox.Game.Entities.Cube; +using Sandbox.Game.Multiplayer; + +using Sandbox.Common; +using Sandbox.Engine; +using Sandbox.Engine.Physics; +using Sandbox.Engine.Utils; +using Sandbox.Game.Entities; +using Sandbox.Game.Utils; +using Sandbox.Game.World; +using Sandbox.Game.Weapons; +using VRage.Utils; +using VRageMath; +using VRage.Input; + +using VRage; +using Sandbox.Definitions; +using VRage.Library.Utils; +using VRage.ModAPI; + + + + +using Sandbox.Common; +using Sandbox.Definitions; +using Sandbox.Engine.Multiplayer; +using Sandbox.Engine.Networking; +using Sandbox.Engine.Utils; +using Sandbox.Game.Entities; +using Sandbox.Game.Entities.Blocks; +using Sandbox.Game.Entities.Cube; +using Sandbox.Game.Gui; +using Sandbox.Game.GUI; +using Sandbox.Game.Localization; +using Sandbox.Game.Multiplayer; +using Sandbox.Game.SessionComponents; +using Sandbox.Game.World; +using Sandbox.Graphics.GUI; +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using VRage; +using VRage.FileSystem; +using VRage.Input; +using VRage.Library.Utils; +using VRage.Network; +using VRage.Utils; +using VRageMath; +using Sandbox.ModAPI; + + +namespace AdminGrids +{ + [MySessionComponentDescriptor(MyUpdateOrder.BeforeSimulation)] + class MissionComponent : MySessionComponentBase + { + + private bool m_init = false; + + public void gridProtection(object target,ref MyDamageInformation damageInfo) { + VRage.Game.ModAPI.IMySlimBlock damagedBlock = target as VRage.Game.ModAPI.IMySlimBlock; + if(damagedBlock == null) { return; } + VRage.Game.ModAPI.IMyCubeGrid damagedGrid = damagedBlock.CubeGrid as VRage.Game.ModAPI.IMyCubeGrid; + if(damagedGrid == null) { return; } + List blocks = new List(); + damagedGrid.GetBlocks(blocks, (x) => x.FatBlock is Sandbox.ModAPI.IMyTerminalBlock && x.FatBlock.BlockDefinition.SubtypeId.Contains("AdminGrid")); + + if(blocks.Count > 0) { + + + damageInfo.Amount = 0; + damageInfo.IsDeformation = false; + } + } + + + public override void UpdateBeforeSimulation () + { + if (!m_init) { + Init(); + } + } + + private void Init() { + MyAPIGateway.Session.DamageSystem.RegisterBeforeDamageHandler(0,gridProtection); + m_init = true; + } + } +} diff --git a/TSTSSESAdminBlocks/Models/AdminSafeZone/AdminSafeZone.mwm b/TSTSSESAdminBlocks/Models/AdminSafeZone/AdminSafeZone.mwm new file mode 100644 index 00000000..2ecb59b2 Binary files /dev/null and b/TSTSSESAdminBlocks/Models/AdminSafeZone/AdminSafeZone.mwm differ diff --git a/TSTSSESAdminBlocks/metadata.mod b/TSTSSESAdminBlocks/metadata.mod new file mode 100644 index 00000000..0a020fdf --- /dev/null +++ b/TSTSSESAdminBlocks/metadata.mod @@ -0,0 +1,4 @@ + + + 1.0 + \ No newline at end of file diff --git a/TSTSSESAdminBlocks/modinfo.sbmi b/TSTSSESAdminBlocks/modinfo.sbmi new file mode 100644 index 00000000..9ed18216 --- /dev/null +++ b/TSTSSESAdminBlocks/modinfo.sbmi @@ -0,0 +1,11 @@ + + + 76561198071098415 + 0 + + + 3347363756 + Steam + + + \ No newline at end of file