Item Component "usage" param

overdhose

Active Member
Contributor
Design
World
GUI
Have another weird question. Say you have an item that can be used on blocks as well as on entities, what would be the best way to achieve this?

Currently, the usagetype is either ON_BLOCK or ON_ENTITY, I'd need to use both (ex : click 2 blocks to define a grid, then click on a minion to to assign it to the grid). I can obviously work around it, create a block which stores the grid component, and then send the minion to the block where it gets it's data.

But I just thought that there might be other occurrences where this functionality might be handy, so I thought I'd ask anyway, see if anyone has thought about this before.
 

Immortius

Lead Software Architect
Contributor
Architecture
GUI
You can just change the setting depending on what state the item is in. :) Ultimately both blocks and entities can be treated as entities though, so maybe it doesn't make sense to have both.

ON_ENTITY doesn't do anything at the moment due to lack of raytrace support for entities - I'm planning this as part of the physics arc.
 

overdhose

Active Member
Contributor
Design
World
GUI
yeah I was just wondering what direction you'll take this in the future. Like Will the enum ever have an impact on the code, and if yes, wouldn't it be wise to incluse a value called ON_BLOCK_AND_ENTITY with that in mind?
 

Immortius

Lead Software Architect
Contributor
Architecture
GUI
The enum is pretty much just a hint for any AI systems, at this point - on how to use the item. It probably isn't enough on its own though.
 
Top