Medieval Engineers

Medieval Engineers

Not enough ratings
Yurand's Advanced Torch
   
Award
Favorite
Favorited
Unfavorite
Type: Mod
Mod category: block, script
File Size
Posted
Updated
370.063 KB
10 Jul, 2017 @ 2:35am
10 Jul, 2017 @ 5:24pm
2 Change Notes ( view )

Subscribe to download
Yurand's Advanced Torch

In 1 collection by Yurand2000
Yurand2000's Medieval Engineers Mods
23 items
Description
Hey there guys, I'm proudly back on modding and today I'm releasing a mod that adds a more advanced version of the standard torch wall. Finally you can take or remove the torch from it so you won't need anymore to craft a torch when you have to go outside seeing all the torches attached on the walls.

- MOD INFORMATIONS:
Author: Yurand2000
Current Version: 1.01
Since: ME 0.5.9

So this mod adds a new block called Advanced Wall Torch that has its own inventory where you can put only one torch. The cost is reduced respect the normal torch and you have to put a torch in its inventory for every new placed stand. If the torch is present, you can turn it on by looking more or less where the torch head is. Depending on your placement, you'll have to crouch to access the inventory, and if put too low you can't access it because the trigger to turn it on is on the way. It may result a bit hard to turn it on when it's placed near other things that have interactions.

Also take a look to these other mods:
Yurand's Definition Loader
Yurand's Automated Fermenting
Yurand's Consumable Return
More to come!

Thanks for reading, subscribing, liking! Unlike if you wish, tell me if anything is wrong in the comments, give me love... Enjoy it!
7 Comments
TheBoot 24 Sep, 2017 @ 4:01am 
The joys of early access. :)

Thank you for all your hard work!
Yurand2000  [author] 24 Sep, 2017 @ 2:39am 
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 23 Sep, 2017 @ 3:31pm 
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 12 Jul, 2017 @ 1:08am 
Yurand you shurely do make the best mods for this game, they should get to vanilla and you should be credited for it.
Yurand2000  [author] 10 Jul, 2017 @ 12:52pm 
Oh thanks for your suggestions, I'm surely gonna update and use them for the new stuff that is already coming :D
Mirzipan  [developer] 10 Jul, 2017 @ 7:35am 
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  [developer] 10 Jul, 2017 @ 7:35am 
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