tomjn / Shard

A reprogrammable AI framework for the Spring Engine
https://shard.tomjn.com
17 stars 13 forks source link

add OwnerBuilt, OwnerDamaged, OwnerIdle, OwnerMoveFailed #108

Closed eronoobos closed 7 years ago

tomjn commented 8 years ago

I see unitdestroyed etc is always called, should these be called after or before the owner version is called? I expected either unit\ or owner* would be called not both

eronoobos commented 8 years ago

Hm. I just did it how OwnerDied worked. What you suggest makes sense, but I'm reluctant to do it that way because some of the behaviours in BA/BAR expect Unit**\ to include its own unit, and I'm not sure if other configs do. ZK might. It would be pretty simple to switch over, but I'll do a quick search through the other configs.

eronoobos commented 8 years ago

Yeah, the default behaviours, EvoRTS, ZK, and BA/BAR all make use of Behaviour:Unit*\ and an if statement checking for the behaviour's own unit. Should definitely fix the default behaviours, and the kind thing would be to give EvoRTS a PR, and to fix ZK.

eronoobos commented 8 years ago

i made Unit** and Owner** mutually exclusive, and converted the default behaviours and ZK's behaviours to use Owner where they need to

eronoobos commented 8 years ago

also i changed OwnerDied to OwnerDead, because i thought the inconsistency was confusing

tomjn commented 7 years ago

@eronoobos are you happy for me to merge these changes as is?