Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -263,4 +263,7 @@ __pycache__/

# Ignore the game lib files (since I'm not allowed to distribute them)
gamelibs/
gamelibs
gamelibs

# Don't include the paths properties file, the MDK will regenerate it on first load.
/src/MDK/mdk.paths.props
19 changes: 4 additions & 15 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,24 +8,13 @@ The workshop item can be found [here](http://steamcommunity.com/sharedfiles/file

## Intellisense

To make the repo better for anyone to grab and use, I've set up the .csproj file to look for the game libraries in the `(repo location)/gamelibs` location. I recommend that you use a symbolic link to the `(game install folder)/Bin64` folder (since it will then also allow for game updates), however, if that is not possible, then you need to copy the following files into it:

* `Sandbox.Common.dll`
* `Sandbox.Common.xml`
* `Sandbox.Game.dll`
* `SpaceEngineers.Game.dll`
* `SpaceEngineers.Game.xml`
* `VRage.dll`
* `VRage.Game.dll`
* `VRage.Game.xml`
* `VRage.Library.dll`
* `VRage.Library.xml`
* `VRage.Math.dll`
* `VRage.Math.xml`
To make the repo better for anyone to grab and use, I've set up the project to use the [MDK-SE](https://github.com/malware-dev/MDK-SE). Install the [latest release](https://github.com/malware-dev/MDK-SE/releases) to your visual studio 2019 instance to get the tools set uup.

Once installed the first time you open the project it will ask you to repair the project, it should automatically pick up your install location of your Space Engineers game and use it during the development process. You may need to close and re-open the project after doing this to get Intellisense to work. If it did not automatically pick up the settings or you would like it to use a different installation of Space Engineers you can right click on the project and choose "MDK Script Options" to change the settings.

## Building

To generate a PB-compatible file, build the project and use the source generated in `bin/out/Script.cs`. To build, use Visual Studio, as I have set up the project to run the necessary commands that are needed to build the script. This can be done via Build->Build Solution via the top dropdowns, or Ctrl-Shift-B.
To generate a PB-compatible file, right click on the project and choose "MDK Deploy Script" and it will automatically deploy the script to a location that can be picked up by the game automatically.

## Todo

Expand Down
17 changes: 7 additions & 10 deletions TaledensInvManagerUpdated.sln
Original file line number Diff line number Diff line change
@@ -1,25 +1,22 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 15
VisualStudioVersion = 15.0.27130.2020
# Visual Studio 16
VisualStudioVersion = 16.0.29424.173
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "TIM", "src\TIM.csproj", "{A4D165AF-E180-4224-8C3C-9FED915FE024}"
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "TIM", "src\TIM.csproj", "{61B0117B-706A-4930-A099-1F13F476201C}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
Debug|x64 = Debug|x64
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{A4D165AF-E180-4224-8C3C-9FED915FE024}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{A4D165AF-E180-4224-8C3C-9FED915FE024}.Debug|Any CPU.Build.0 = Debug|Any CPU
{A4D165AF-E180-4224-8C3C-9FED915FE024}.Release|Any CPU.ActiveCfg = Release|Any CPU
{A4D165AF-E180-4224-8C3C-9FED915FE024}.Release|Any CPU.Build.0 = Release|Any CPU
{61B0117B-706A-4930-A099-1F13F476201C}.Debug|x64.ActiveCfg = Debug|x64
{61B0117B-706A-4930-A099-1F13F476201C}.Debug|x64.Build.0 = Debug|x64
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {46443B6E-DB0F-4D0F-8A53-17FCD3E9D7A7}
SolutionGuid = {EF8D87F2-834F-432F-840C-1DA4968A6E25}
EndGlobalSection
EndGlobal
Binary file removed build/Build.exe
Binary file not shown.
Binary file removed build/CSharpMinifier.dll
Binary file not shown.
Binary file removed build/ICSharpCode.NRefactory.CSharp.dll
Binary file not shown.
Binary file removed build/ICSharpCode.NRefactory.Cecil.dll
Binary file not shown.
Binary file removed build/ICSharpCode.NRefactory.Xml.dll
Binary file not shown.
Binary file removed build/ICSharpCode.NRefactory.dll
Binary file not shown.
Binary file removed build/Mono.Cecil.Mdb.dll
Binary file not shown.
Binary file removed build/Mono.Cecil.Pdb.dll
Binary file not shown.
Binary file removed build/Mono.Cecil.Rocks.dll
Binary file not shown.
Binary file removed build/Mono.Cecil.dll
Binary file not shown.
13 changes: 0 additions & 13 deletions build/settings.xml

This file was deleted.

27 changes: 27 additions & 0 deletions src/MDK/Bootstrapper.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
using Malware.MDKUtilities;

namespace IngameScript.MDK
{
public class TestBootstrapper
{
// All the files in this folder, as well as all files containing the file ".debug.", will be excluded
// from the build process. You can use this to create utilites for testing your scripts directly in
// Visual Studio.

static TestBootstrapper()
{
// Initialize the MDK utility framework
MDKUtilityFramework.Load();
}

public static void Main()
{
// In order for your program to actually run, you will need to provide a mockup of all the facilities
// your script uses from the game, since they're not available outside of the game.

// Create and configure the desired program.
var program = MDKFactory.CreateProgram<Program>();
MDKFactory.Run(program);
}
}
}
18 changes: 18 additions & 0 deletions src/MDK/MDK.options.props
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
<?xml version="1.0" encoding="utf-8"?>
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<!--
Contains basic settings that should be included in code repositories
-->
<MDKVersion>1.2.22</MDKVersion>
<MDKTrimTypes>
<Enabled>yes</Enabled>
</MDKTrimTypes>
<MDKMinify>
<Enabled>yes</Enabled>
</MDKMinify>
<MDKIgnore>
<Folder>mdk</Folder>
</MDKIgnore>
</PropertyGroup>
</Project>
36 changes: 0 additions & 36 deletions src/Properties/AssemblyInfo.cs

This file was deleted.

37 changes: 19 additions & 18 deletions src/Script.cs
Original file line number Diff line number Diff line change
@@ -1,27 +1,28 @@
/*-*/
// Base file from
// https://github.com/Gorea235/SpaceEngineers_IngameScriptingBase
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Sandbox.Common;
using Sandbox.Common.ObjectBuilders;
using Sandbox.Definitions;
using Sandbox.Engine;
// Base file from
// https://github.com/Gorea235/SpaceEngineers_IngameScriptingBaseusing Sandbox.Game.EntityComponents;
using Sandbox.ModAPI.Ingame;
using Sandbox.ModAPI.Interfaces;
using Sandbox.Game;
using SpaceEngineers.Game.ModAPI.Ingame;
using VRageMath;
using System.Collections.Generic;
using System.Collections;
using System.Linq;
using System.Text;
using System;
using VRage.Collections;
using VRage.Game.Components;
using VRage.Game.GUI.TextPanel;
using VRage.Game.ModAPI.Ingame.Utilities;
using VRage.Game.ModAPI.Ingame;
using VRage.Game.ObjectBuilders.Definitions;
using VRage.Game;
using VRage;
using VRageMath;

namespace Scripts.TIM
namespace IngameScript
{
class Program : MyGridProgram
class Program : MyGridProgram
{
/*-*/
#region mdk preserve
/*
Taleden's Inventory Manager - Updated (Unofficial)
version 1.7.7 (2019-03-07)
Expand Down Expand Up @@ -208,7 +209,8 @@ that any changes will be reverted when you update the script from the workshop.
// =================================================
const string MOB = "MyObjectBuilder_";
const string NON_AMMO = "Component,GasContainerObject,Ingot,Ore,OxygenContainerObject,PhysicalGunObject\n";
/*m*/
#endregion mdk preserve

#region Fields

#region Version
Expand Down Expand Up @@ -3545,4 +3547,3 @@ public string ToString(int width = 0)
/*-*/
}
}
/*-*/
77 changes: 26 additions & 51 deletions src/TIM.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -5,45 +5,27 @@
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>{A4D165AF-E180-4224-8C3C-9FED915FE024}</ProjectGuid>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>Scripts</RootNamespace>
<AssemblyName>Scripts</AssemblyName>
<OutputType>Exe</OutputType>
<RootNamespace>IngameScript</RootNamespace>
<AssemblyName>TaledensInvManagerUpdated</AssemblyName>
<TargetFrameworkVersion>v4.6.1</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
<TargetFrameworkProfile />
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x64'">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>..\bin\</OutputPath>
<OutputPath>bin\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<GenerateSerializationAssemblies>Off</GenerateSerializationAssemblies>
<LangVersion>7</LangVersion>
<DebugType>full</DebugType>
<PlatformTarget>x64</PlatformTarget>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>..\bin\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<GenerateSerializationAssemblies>Auto</GenerateSerializationAssemblies>
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
<Prefer32Bit>true</Prefer32Bit>
<LangVersion>6</LangVersion>
</PropertyGroup>
<ItemGroup>
<Reference Include="Sandbox.Common">
<HintPath>..\gamelibs\Sandbox.Common.dll</HintPath>
</Reference>
<Reference Include="Sandbox.Game">
<HintPath>..\gamelibs\Sandbox.Game.dll</HintPath>
</Reference>
<Reference Include="SpaceEngineers.Game">
<HintPath>..\gamelibs\SpaceEngineers.Game.dll</HintPath>
</Reference>
<Reference Include="netstandard" />
<Reference Include="System" />
<Reference Include="System.Core" />
<Reference Include="System.Xml.Linq" />
Expand All @@ -52,31 +34,24 @@
<Reference Include="System.Data" />
<Reference Include="System.Net.Http" />
<Reference Include="System.Xml" />
<Reference Include="VRage">
<HintPath>..\gamelibs\VRage.dll</HintPath>
</Reference>
<Reference Include="VRage.Game">
<HintPath>..\gamelibs\VRage.Game.dll</HintPath>
</Reference>
<Reference Include="VRage.Library">
<HintPath>..\gamelibs\VRage.Library.dll</HintPath>
</Reference>
<Reference Include="VRage.Math">
<HintPath>..\gamelibs\VRage.Math.dll</HintPath>
</Reference>
</ItemGroup>
<Import Project="MDK/MDK.options.props" />
<Import Project="MDK/MDK.paths.props" Condition="exists('MDK/MDK.paths.props')" />
<ItemGroup>
<Compile Include="MDK\Bootstrapper.cs" />
<Compile Include="Script.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<AdditionalFiles Include="MDK\MDK.options.props">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</AdditionalFiles>
<AdditionalFiles Include="MDK\MDK.paths.props">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</AdditionalFiles>
<AdditionalFiles Include="thumb.png" />
<AdditionalFiles Include="MDK\whitelist.cache" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<PropertyGroup>
<PreBuildEvent>"$(SolutionDir)build\Build.exe"
copy /Y "$(SolutionDir)workshop\*" "$(TargetDir)workshop"
copy /Y "$(TargetDir)out\*" "$(TargetDir)workshop"</PreBuildEvent>
</PropertyGroup>
<PropertyGroup>
<PostBuildEvent>
</PostBuildEvent>
</PropertyGroup>
<Target Name="AfterBuild">
<Copy SourceFiles="MDK\MDK.options.props" DestinationFolder="$(TargetDir)\MDK" />
<Copy SourceFiles="MDK\MDK.paths.props" DestinationFolder="$(TargetDir)\MDK" />
</Target>
</Project>
File renamed without changes