Get command system working, permissions system and ModAPI extensions in progress
This commit is contained in:
39
Torch.API/ModAPI/Ingame/GridExtensions.cs
Normal file
39
Torch.API/ModAPI/Ingame/GridExtensions.cs
Normal file
@@ -0,0 +1,39 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Collections.ObjectModel;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using Sandbox.Game.Entities.Blocks;
|
||||
using Sandbox.ModAPI.Ingame;
|
||||
using VRage.Game.ModAPI.Ingame;
|
||||
|
||||
namespace Torch.API.ModAPI.Ingame
|
||||
{
|
||||
public static class GridExtensions
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public static class PistonExtensions
|
||||
{
|
||||
public static IMyCubeGrid GetConnectedGrid(this IMyPistonBase pistonBase)
|
||||
{
|
||||
if (!pistonBase.IsAttached)
|
||||
return null;
|
||||
|
||||
return ((Sandbox.ModAPI.IMyPistonBase)pistonBase).TopGrid;
|
||||
}
|
||||
}
|
||||
|
||||
public static class RotorExtensions
|
||||
{
|
||||
public static IMyCubeGrid GetConnectedGrid(this IMyMotorStator rotorBase)
|
||||
{
|
||||
if (!rotorBase.IsAttached)
|
||||
return null;
|
||||
|
||||
return ((Sandbox.ModAPI.IMyMotorStator)rotorBase).RotorGrid;
|
||||
}
|
||||
}
|
||||
}
|
13
Torch.API/ModAPI/TorchAPI.cs
Normal file
13
Torch.API/ModAPI/TorchAPI.cs
Normal file
@@ -0,0 +1,13 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Torch.API.ModAPI
|
||||
{
|
||||
public static class TorchAPI
|
||||
{
|
||||
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user