Space Engineers

Space Engineers

332 个评价
Color Replacer Blocks
   
奖励
收藏
已收藏
取消收藏
Type: Mod
Mod category: Block, Script
文件大小
发表于
265.028 KB
2018 年 5 月 30 日 上午 11:29
1 项改动说明 ( 查看 )

订阅以下载
Color Replacer Blocks

描述
Meridius_IX has retired from modding. Click Here[gist.github.com] for more details.

Description

This mod adds a pair of blocks (Small and Large Grid Variants) that allow you to recolor multiple blocks of the same color at once.


How It Works - Basic Functionality

- Place both blocks (Color Targeter and Color Replacer) onto your desired grid.
- Paint the 'Color Targeter' block with the color you want to have replaced.
- Paint the 'Color Replacer' block with the new color you want to replace the old one with.
- In the Terminal menu of the 'Color Replacer', press the 'Replace Targeter Colors' button to initiate the color swap.

If you have multiple 'Color Targeter' blocks on your grid, the replacer will read each of them and replace their designated colors. The 'Color Replacer' will skip any 'Color Targeter' block that are turned Off. Use caution.


How It Works - Stored Colors

- The 'Color Replacer' block can store 2 colors in its Custom Data field, which can later be called to replaced.
- In the 'Color Replacer' block terminal menu, pressing the 'Store Color 1' button will save the Replacers current color as Color 1.
- In the 'Color Replacer' block terminal menu, pressing the 'Store Color 2' button will save the Replacers current color as Color 2.
- In the 'Color Replacer' block terminal menu, pressing the 'Replace Stored Colors' will replace all colors matching Color 1 with Color 2.


Toolbar Actions

The buttons in the 'Color Replacer' block terminal menu are also available to be assigned to the toolbar of your cockpit, or other automation blocks such as the Timer Block, Sensor Block, Etc.



Programmable Block Support

You can use the programmable block to control the 'Color Replacer' as well. Here's some example code below:

//Basic Block Commands var colorReplacer = GridTerminalSystem.GetBlockWithName("Color Replacer") as IMyArtificialMassBlock; //The color replacer used artificial mass as its template block. colorReplacer.ApplyAction("ReplaceTargeterColors"); //Replace Targeter Block Colors With This Blocks Color colorReplacer.ApplyAction("ReplaceStoredColors"); //Replace Colors Stored In This Replacer CustomData colorReplacer.ApplyAction("StoreFirstColor"); //Stores Replacers Color As First Color in CustomData colorReplacer.ApplyAction("StoreSecondColor"); //Stores Replacers Color As Second Color in CustomData //Manually Set Stored Colors var colorA = new Vector3(0,0,0); //Set manually or get from another block var colorB = new Vector3(0,0,0); //Set manually or get from another block colorReplacer.CustomData = colorA.ToString() + "\n" + colorB.ToString();


Modular Encounters Collection Links

Click Here For The General FAQ About The Mods I Curate.[gist.github.com]
Click Here For My Rules Regarding Mod Republishing.[gist.github.com]
Click Here For The Modular Encounters Admin and Modders Guide.[gist.github.com]
Click Here To Join The Modular Encounters Collection Discord Server.[discord.gg]
Click Here If You'd Like To Support My Work On Patreon.[www.patreon.com]
104 条留言
The Kingfish 2022 年 5 月 3 日 下午 3:02 
WOLOLO
Torsión Testicular 2022 年 2 月 23 日 上午 11:16 
WOLOLOOOOOOOOOO
LORD SARUMAN 2021 年 11 月 19 日 上午 10:32 
WOLOLO
Meridius_IX / Lucas  [作者] 2020 年 8 月 25 日 上午 11:23 
[SKG]Simonokles - Check my workshop page, there's a version 2 of this mod that can do that :)
Shiranya 2020 年 8 月 25 日 上午 11:20 
It would be super nice if it would also change the skins of the blocks.:missing:
Cpt Pillowy Giant 2020 年 4 月 4 日 上午 10:34 
Is it a way to do the same with Skins?
Kara Vaki 2020 年 3 月 4 日 下午 8:25 
nvm i'm a dumbass XD
Kara Vaki 2020 年 3 月 4 日 下午 7:00 
this only recolors the targeter ;w;
Bazil T Yat 2020 年 3 月 4 日 上午 3:13 
Can you make a version that'll recolour only one type of block? I accidentally recoloured my outer hull the same hue as my interior blocks and didn't notice until all the backups had been over-written.
SalazarWindriver 2020 年 3 月 1 日 上午 6:42 
@bcjbna just follow the directions on this page