Shard icon indicating copy to clipboard operation
Shard copied to clipboard

more behaviour:Owner* callins

Open eronoobos opened this issue 9 years ago • 4 comments

I think in addition to OwnerDied (though OwnerDead would be a more consistent name), there ought to be OwnerIdle, OwnerBuilt, OwnerDamaged, and OwnerMoveFailed. It's fairly rare for a behaviour to be interested in callins for other units, so behaviours tend to be filled with if unit.engineID == self.unit.engineID then. The owner callins would make behaviours easier to read and to write.

eronoobos avatar Jul 07 '16 15:07 eronoobos

This is entirely a Lua issue, I'm pretty sure. I'll happily do the work, I just want to run the idea by you.

eronoobos avatar Jul 07 '16 15:07 eronoobos

Sounds like a good idea, saves some extra work, where do you expect the check will reside though? In the unit object? Putting it in the behaviour object would require the check to be readded to any behaviour that uses it

tomjn avatar Jul 07 '16 15:07 tomjn

In the Unit object, where OwnerDied's check is currently.

eronoobos avatar Jul 07 '16 15:07 eronoobos

Sounds good to me :)

tomjn avatar Jul 07 '16 16:07 tomjn