Medieval Engineers

Medieval Engineers

Yurand's Advanced Torch
7 条留言
TheBoot 2017 年 9 月 24 日 上午 4:01 
The joys of early access. :)

Thank you for all your hard work!
Yurand2000  [作者] 2017 年 9 月 24 日 上午 2:39 
Yeah indeed it seems that the last updates that changed how interaction with objects work messed up with the mod. Working already on a fix.
TheBoot 2017 年 9 月 23 日 下午 3:31 
I can't access the inventory screen for the Advanced Torch currently. Torch still lights and extinguishes. I'm going to try deconstructing and reconstructing it. Maybe there's something conflicting because it's from an older version.
DiegoKevin 2017 年 7 月 12 日 上午 1:08 
Yurand you shurely do make the best mods for this game, they should get to vanilla and you should be credited for it.
Yurand2000  [作者] 2017 年 7 月 10 日 下午 12:52 
Oh thanks for your suggestions, I'm surely gonna update and use them for the new stuff that is already coming :D
Mirzipan  [开发者] 2017 年 7 月 10 日 上午 7:35 
part2 .. :P

3) Instead of unsubscribing from the on inventory content changed when it is called and you are a client, you can do the isServer check in the OnAddedToScene, and in case you are server, you subscribe.

4) Add nullcheck for inventory to the OnRemovedFromScene methods, otherwise it may be sad :P

5) The torch component definition is empty, there is no point on caching it is you do not use it for anything (though I would suggest moving the entity state names for on, off and empty to the definition and use them from there, instead of calling GetOrCompute everytime something in the inventory changed).

I hope this feedback helps you and I am looking forward to seeing more cool mods like this :)
Mirzipan  [开发者] 2017 年 7 月 10 日 上午 7:35 
Nice mod!

Just a couple of suggestions:
1) Please update your Cubeblock and EntityContainer definition to the new definition format (we might not have all blocks re-formatted yet, but is it wise to use the latest and greatest, since the legacy systems will no be around forever).

2) To get inventory and state component, you can just call:

var inventory = Container.Get<MyInventoryBase>();
and
var state = Container.Get<MyEntityStateComponent>();

since Entity.Components == Container