Just a few lines to say that I added “container” and “static” features to the items.


Container feature allows an item to contain other items. It has 2 parameters for now :
– size : number of items it can contain
– liquid : boolean. is it a liquid container (flask, bottle, …)
Instead of considering a flask of water as an item, there will be two items : the flask and the water. Thus, you will be able to pour the water from the flask into another container. This may be useful for potion recipes in which you need to mix several liquids.

Static items

The static feature means that you cannot take or move the item. It is used on items too big to be taken (crates, barrels, big chests, …), but it allows to use the item object for other map features like doors or traps. Thus, it is possible to use the powerful features system on almost everything on the map!

Next step : creatures… Since I’m lazy, why no reuse the features system with creatures? Creating a creature which emit light (balrog) would need no line of code. There could also be ‘behavioural’ features. Not sure if this will work… To be continued…

No Comment.

Add Your Comment