Install Steam
login
|
language
简体中文 (Simplified Chinese)
繁體中文 (Traditional Chinese)
日本語 (Japanese)
한국어 (Korean)
ไทย (Thai)
Български (Bulgarian)
Čeština (Czech)
Dansk (Danish)
Deutsch (German)
Español - España (Spanish - Spain)
Español - Latinoamérica (Spanish - Latin America)
Ελληνικά (Greek)
Français (French)
Italiano (Italian)
Bahasa Indonesia (Indonesian)
Magyar (Hungarian)
Nederlands (Dutch)
Norsk (Norwegian)
Polski (Polish)
Português (Portuguese - Portugal)
Português - Brasil (Portuguese - Brazil)
Română (Romanian)
Русский (Russian)
Suomi (Finnish)
Svenska (Swedish)
Türkçe (Turkish)
Tiếng Việt (Vietnamese)
Українська (Ukrainian)
Report a translation problem
Thank you for all your hard work!
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 :)
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