返回提交历史
Modified
XFEExtension.SpaceEngineers.ScriptingHelper/XFEExtension.SpaceEngineers.ScriptingHelper.csproj
+3
-0
Modified
XFEExtension.SpaceEngineers.ScriptingHelper/XFEExtension.SpaceEngineers.ScriptingHelper.nuspec
+3
-0
Added
XFEExtension.SpaceEngineers.ScriptingHelper/readme.md
+59
-0
XFEstudio/XFEExtension.SpaceEngineers.ScriptingHelper
完善部分内容
a32e683
代码差异
3 个文件
+65
-0
@@ -101,5 +101,8 @@
101
101
<ItemGroup>
102
102
<None Include="XFEExtension.SpaceEngineers.ScriptingHelper.nuspec" />
103
103
</ItemGroup>
104
<ItemGroup>
105
<None Include="readme.md" />
106
</ItemGroup>
104
107
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
105
108
</Project>
@@ -5,6 +5,7 @@
5
5
<version>1.0.0</version>
6
6
<authors>XFEStudio</authors>
7
7
<description>Provides a base class for Space Engineers scripts. Adds ProgramBase directly to your project for easy copy-pasting into the game.</description>
8
<readme>readme.txt</readme>
8
9
<dependencies>
9
10
<group targetFramework=".NETFramework4.8" />
10
11
</dependencies>
@@ -15,5 +16,7 @@
15
16
<files>
16
17
<file src="ProgramBase.cs" target="content/ProgramBase.cs" />
17
18
<file src="ProgramBase.cs" target="contentFiles/cs/any/ProgramBase.cs" />
19
<file src="readme.md" target="readme.md" />
20
<file src="readme.md" target="content/readme.md" />
18
21
</files>
19
22
</package>
@@ -0,0 +1,59 @@
1
Space Engineers Scripting Helper
2
================================
3
4
Thank you for installing XFEExtension.SpaceEngineers.ScriptingHelper!
5
6
# How to use:
7
1. This package has added a 'ProgramBase.cs' file to your project.
8
2. Your main 'Program' class should inherit from 'ProgramBase':
9
10
public class Program : ProgramBase
11
{
12
public override void Main(string argument, UpdateType updateSource)
13
{
14
// Your code here
15
}
16
}
17
18
3. When you are ready to deploy to Space Engineers:
19
- Copy the content of your 'Program' class.
20
- Copy the content of 'ProgramBase' class (helper methods).
21
- Paste them into the in-game script editor.
22
23
# Features:
24
- GetBlock<T>(name): Get a block by name.
25
- GetBlock<T>(filter): Get the first block matching a filter.
26
- GetBlocks<T>(filter): Get a list of blocks matching a filter.
27
28
Happy scripting!
29
30
--------------------------------
31
32
Space Engineers 脚本助手
33
================================
34
35
感谢您安装 XFEExtension.SpaceEngineers.ScriptingHelper!
36
37
# 使用方法:
38
1. 此包已向您的项目添加了 'ProgramBase.cs' 文件。
39
2. 您的主 'Program' 类应继承自 'ProgramBase':
40
41
public class Program : ProgramBase
42
{
43
public override void Main(string argument, UpdateType updateSource)
44
{
45
// 您的代码写在这里
46
}
47
}
48
49
3. 当您准备部署到《太空工程师》时:
50
- 复制您的 'Program' 类里面的内容。
51
- 复制 'ProgramBase' 类的内容(辅助方法)。
52
- 将它们粘贴到游戏内的脚本编辑器中。
53
54
# 功能:
55
- GetBlock<T>(name): 根据名称获取方块。
56
- GetBlock<T>(filter): 获取匹配过滤器的第一个方块。
57
- GetBlocks<T>(filter): 获取匹配过滤器的方块列表。
58
59
祝您编程愉快!