Then i look into source and found this crazy whacky code:
Code: Select all
switch (droidType) // hide some engine craziness
{
case DROID_CONSTRUCT:
droidType2 = DROID_CYBORG_CONSTRUCT; break;
case DROID_WEAPON:
droidType2 = DROID_CYBORG_SUPER; break;
case DROID_REPAIR:
droidType2 = DROID_CYBORG_REPAIR; break;
case DROID_CYBORG:
droidType2 = DROID_CYBORG_SUPER; break;
default:
droidType2 = droidType;
break;
}
Then i can just call enumDroid(me, 10) and get only cyborgs constructions, but cant get ONLY trucks, if i call enumDroid(me, DROID_CONSTRUCT) i get both types..
Same thing with just compare if(droid.droidType == ???) what i need to pass there to check, if this truck or cyborg ??
Something like if(droid.body == "Body1REC") then it may be starting construction truck... but.. but.. ohh.. this is crazy.
I think we need to separate DROID_CONSTRUCT and DROID_CYBORG_CONSTRUCT.
I don't understand why was there a need to do SO??