#pragma once #include "../../DNACommon/DNACommon.hpp" #include "IScriptObject.hpp" #include "Parameters.hpp" namespace DataSpec::DNAMP1 { struct SpacePirate : IScriptObject { AT_DECL_DNA_YAML AT_DECL_DNAV String<-1> name; Value location; Value orientation; Value scale; PatternedInfo patternedInfo; ActorParameters actorParameters; Value AggressionCheck; Value CoverCheck; Value SearchRadius; Value FallBackCheck; Value FallBackRadius; Value HearingRadius; /* * 0x1: pendingAmbush * 0x2: ceilingAmbush * 0x4: nonAggressive * 0x8: melee * 0x10: noShuffleCloseCheck * 0x20: onlyAttackInRange * 0x40: unk * 0x80: noKnockbackImpulseReset * 0x200: noMeleeAttack * 0x400: breakAttack * 0x1000: seated * 0x2000: shadowPirate * 0x4000: alertBeforeCloak * 0x8000: noBreakDodge * 0x10000: floatingCorpse * 0x20000: ragdollNoAiCollision * 0x40000: trooper */ Value flags; Value unknown8; UniqueID32 Projectile; DamageInfo ProjectileDamage; Value Sound_Projectile; DamageInfo BladeDamage; Value KneelAttackChance; UniqueID32 KneelAttackShot; DamageInfo KneelAttackDamage; Value DodgeCheck; Value Sound_Impact; Value averageNextShotTime; Value nextShotTimeVariation; Value Sound_Alert; Value GunTrackDelay; Value firstBurstCount; Value CloakOpacity; Value MaxCloakOpacity; Value dodgeDelayTimeMin; Value dodgeDelayTimeMax; Value Sound_Hurled; Value Sound_Death; Value unknown19; Value AvoidDistance; void addCMDLRigPairs(PAKRouter& pakRouter, CharacterAssociations& charAssoc) const { actorParameters.addCMDLRigPairs(pakRouter, charAssoc, patternedInfo.animationParameters); } void nameIDs(PAKRouter& pakRouter) const { if (Projectile) { PAK::Entry* ent = (PAK::Entry*)pakRouter.lookupEntry(Projectile); ent->name = name + "_Projectile"; } if (KneelAttackShot) { PAK::Entry* ent = (PAK::Entry*)pakRouter.lookupEntry(KneelAttackShot); ent->name = name + "_KneelAttackShot"; } patternedInfo.nameIDs(pakRouter, name + "_patterned"); actorParameters.nameIDs(pakRouter, name + "_actp"); } void gatherDependencies(std::vector& pathsOut, std::vector& lazyOut) const { g_curSpec->flattenDependencies(Projectile, pathsOut); g_curSpec->flattenDependencies(KneelAttackShot, pathsOut); patternedInfo.depIDs(pathsOut); actorParameters.depIDs(pathsOut, lazyOut); } void gatherScans(std::vector& scansOut) const { actorParameters.scanIDs(scansOut); } }; } // namespace DataSpec::DNAMP1