Space Engineers

Space Engineers

评价数不足
DeMerge - Auto Convert Station to Ship (unsupported)
   
奖励
收藏
已收藏
取消收藏
Type: Mod
Mod category: Script, Other
文件大小
发表于
更新日期
38.216 KB
2015 年 4 月 19 日 下午 12:59
2015 年 9 月 26 日 下午 2:46
9 项改动说明 ( 查看 )

订阅以下载
DeMerge - Auto Convert Station to Ship (unsupported)

描述
This mod is not supported. Please try the fixed version by Casper1123 instead:

https://psteamcommunity.yuanyoumao.com/sharedfiles/filedetails/?id=2927777502

-----------

This small script will automatically convert Station grid to Large Ship grid under certain conditions.
Can automatically rename detached grids.

Useful for making custom airtight hangar doors on stations which is not possible other wise.
Can also be used for merge-landing of large ships on stations or other large ships and taking off without need to manually hit "convert to ship" button or renaming the ship back to something meaningful.
Should work with modded Merge blocks as long as they mimic vanilla Merge Block.

Usage:
Add "[AutoConvert]" tag to one of the Merge blocks that are on side that is expected to be converted to ship. Tag is Case Sensitive.
Automatic Renaming:
If there is # anywhere in the name of the merge block then the name of converted grid will be changed to whatever is following the # sign. Auto renaming will also work for grids detached from other Ships, not just stations

Example:
Merge Block 115 [AutoConvert] #My Very Uniq Named Miner Drone

The following conditions are required for the automatic conversion to happen:
1. Owner of the tagged Merge block must be the direct owner of the detached grid.
2. Merge blocks must be turned off all at once OR block that has "[AutoConvert]" tag must be the last to be turned off.
3. One or more of direct neighbors of Merge block must actually detach from the station when tagged Merge block is turned off.
This condition can be turned off by adding bang sign to tag: "[AutoConvert!]".

Alternative tags (if tags with [] don't work for you): {AutoConvert} / {AutoConvert!}


Hint:
For automatic door you would want to control merge blocks through programming block as Blocks Groups can behave strangely on merge.

Demo world:
http://psteamcommunity.yuanyoumao.com/sharedfiles/filedetails/?id=428747064

Upd 3:
Updated for new API.

Upd 2:
Rewrote using Events.
Added multiplayer checks.
Added alternative tags.

Upd 1:
Added ability to automatically rename demerged ship.
56 条留言
Casper1123 2023 年 2 月 3 日 上午 7:39 
I managed to (mostly) fix this mod (https://psteamcommunity.yuanyoumao.com/sharedfiles/filedetails/?id=2927777502) and will attempt to keep it up to date as well. :)
Fvracer_x 2021 年 11 月 25 日 下午 4:21 
R.I.P.
Scientwist 2021 年 11 月 1 日 上午 10:21 
@Ritaelyn It's not a script it's a C# mod thats stored in C:\Users\*Username*\AppData\Local\Temp\SpaceEngineers\428599432.sbm_DeMerge\DeMerge.cs

It's got a ton of errors as it's not making calls correctly to IMyCubeGrid and IMyShipMergeBlock, errors say it doesn't exist in Sandbox.ModAPI

If I knew more about C# or.cs file in general I'd fix it and post it but sadly I just don't.
Ritaelyn 2021 年 5 月 5 日 下午 8:58 
I'm subscribed to this script but it's not showing up in game at all. All my other subscribed workshop scripts are showing up.
Dr. Secks 2021 年 1 月 4 日 上午 11:45 
doesn´t work
LavaSpringer 2019 年 4 月 17 日 上午 4:44 
However, only the grid whose merge block is deactivated is renamed.
LavaSpringer 2019 年 4 月 17 日 上午 4:42 
pjaj 2019 年 4 月 16 日 上午 12:01 
@LavaSpringer any chance I can get a copy of that? Only for my own personal use, of course.
LavaSpringer 2019 年 1 月 4 日 下午 12:31 
I probably solved the problem. I can send you the file if you want Dark.
Dark  [作者] 2019 年 1 月 3 日 上午 10:49 
Well, its been two years since I last touched SE....and judging by the error log - the old API is no more - not sure when I will have time to spend on SE and catch up with updates.

Sources should be included inside the mod package if anyone wants to try to fix it, maybe just namespace address needs changing.

Sorry folks :wat_creep: