FortressCraft Evolved

FortressCraft Evolved

评价数不足
steveman0's Item Configurer
   
奖励
收藏
已收藏
取消收藏
文件大小
发表于
更新日期
49.021 KB
2016 年 10 月 11 日 下午 6:24
2017 年 4 月 14 日 下午 10:00
8 项改动说明 ( 查看 )

订阅以下载
steveman0's Item Configurer

描述
Need to set a conveyor filter but don't have the item on hand? The Item Configurer mod adds a tool by the same name that enables text based search of item names (see my other mods with this feature!) to set vanilla machines settings. Just use the Item Configurer while looking at the machine you want to configure and it will open the UI for selecting the desired item.

Mod Authors, you too can take advantage of this capability!

It's so easy to implement I've copied the implementation as it appears in my Stockpiler mod! All you need to do is include the ItemConfigurerInterface as a reference and add the interface itself to the machine you want the function for. You'll need to include a copy of the ItemInterface.dll with your mod when you share it on the workshop.

The interface adds the following two functions. The first is the title of the window to indicate what the item will be for or just to list the machine name. The second is what to do when the player selects the item. That's it! If you include support for it, let others know in the comments below!

public class MSStockpiler : MachineEntity, ItemConsumerInterface, ItemConfigurerInterface

public string ItemConfigMachineName()
{
return "Set Item to Stock";
}

public void HandleItemSelected(ItemBase item)
{
MSStockpilerWindow.SetItemToStock(WorldScript.mLocalPlayer, this, item);
}

10 条留言
steveman0  [作者] 2017 年 2 月 3 日 下午 6:13 
Thanks for the confirmation!
obsiana 2017 年 2 月 3 日 下午 4:06 
In Bleeding Edge it is working now, thanks
steveman0  [作者] 2017 年 1 月 31 日 下午 7:18 
Found the issue... DJ added a catch to the panel code to deal with the weird stuck open windows which broke how the mod UI stuff works. I pushed him a fix so hopefully it'll come in the planned patch in the next day or two.
steveman0  [作者] 2017 年 1 月 31 日 下午 3:33 
Okay, will have a look. Might just be in need of a recompile.
obsiana 2017 年 1 月 31 日 下午 3:24 
No gui is showing and i cant abort it. So i must restart the game. It is happen in the Branch newworld and now in mainline.
steveman0  [作者] 2017 年 1 月 31 日 下午 2:48 
Not sure what would break it. I'd have to have more info or a chance to test it.
obsiana 2017 年 1 月 31 日 下午 2:34 
Item Configurer broken with Patch 16? when i use the Configurer nothing happens and must restart my game.
Horny Rooster 2016 年 12 月 26 日 下午 5:46 
Amazing, this has helped my mass storage retreival considerably. Before, I had to keep 1 item of each type in a storage just to add to my toolbar just to pull the item from mass storage. With you configurer, it helps a lot. Thanks. There really should be a proper UI to mass storage output, not some shit thing where you have to have the item already in your toolbar to pull the thing out of mass storage.
steveman0  [作者] 2016 年 12 月 10 日 上午 11:17 
Not sure what you mean? If you want to do another search you'll need to type in the new search anyway. I think the likelihood of a mistake is low enough that having to retype the search is pretty minor.
Эльфик 2016 年 12 月 10 日 上午 9:40 
Can you do not disable search after search done? If i was wrong or want to do another search i must start from scratch.