返回提交历史
Modified
LICENSE.txt
+1
-1
Modified
README.md
+61
-1
Modified
XFEExtension.SpaceEngineers.ScriptingHelper/XFEExtension.SpaceEngineers.ScriptingHelper.nuspec
+1
-1
XFEstudio/XFEExtension.SpaceEngineers.ScriptingHelper
更改readme
4b10d18
代码差异
3 个文件
+63
-3
@@ -1,6 +1,6 @@
1
1
MIT License
2
2
3
Copyright (c) [year] [fullname]
3
Copyright (c) [2026] [XFEstudio]
4
4
5
5
Permission is hereby granted, free of charge, to any person obtaining a copy
6
6
of this software and associated documentation files (the "Software"), to deal
@@ -1 +1,61 @@
1
# XFEExtension.SpaceEngineers.ScriptingHelper
1
# XFEExtension.SpaceEngineers.ScriptingHelper
2
3
Space Engineers Scripting Helper
4
================================
5
6
Thank you for installing XFEExtension.SpaceEngineers.ScriptingHelper!
7
8
# How to use:
9
1. This package has added a 'ProgramBase.cs' file to your project.
10
2. Your main 'Program' class should inherit from 'ProgramBase':
11
12
public class Program : ProgramBase
13
{
14
public override void Main(string argument, UpdateType updateSource)
15
{
16
// Your code here
17
}
18
}
19
20
3. When you are ready to deploy to Space Engineers:
21
- Copy the content of your 'Program' class.
22
- Copy the content of 'ProgramBase' class (helper methods).
23
- Paste them into the in-game script editor.
24
25
# Features:
26
- GetBlock<T>(name): Get a block by name.
27
- GetBlock<T>(filter): Get the first block matching a filter.
28
- GetBlocks<T>(filter): Get a list of blocks matching a filter.
29
30
Happy scripting!
31
32
--------------------------------
33
34
Space Engineers 脚本助手
35
================================
36
37
感谢您安装 XFEExtension.SpaceEngineers.ScriptingHelper!
38
39
# 使用方法:
40
1. 此包已向您的项目添加了 'ProgramBase.cs' 文件。
41
2. 您的主 'Program' 类应继承自 'ProgramBase':
42
43
public class Program : ProgramBase
44
{
45
public override void Main(string argument, UpdateType updateSource)
46
{
47
// 您的代码写在这里
48
}
49
}
50
51
3. 当您准备部署到《太空工程师》时:
52
- 复制您的 'Program' 类里面的内容。
53
- 复制 'ProgramBase' 类的内容(辅助方法)。
54
- 将它们粘贴到游戏内的脚本编辑器中。
55
56
# 功能:
57
- GetBlock<T>(name): 根据名称获取方块。
58
- GetBlock<T>(filter): 获取匹配过滤器的第一个方块。
59
- GetBlocks<T>(filter): 获取匹配过滤器的方块列表。
60
61
祝您编程愉快!
@@ -5,7 +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
<readme>readme.md</readme>
9
9
<dependencies>
10
10
<group targetFramework=".NETFramework4.8" />
11
11
</dependencies>