#pragma once #include "../../DNACommon/DNACommon.hpp" #include "IScriptObject.hpp" #include "Parameters.hpp" namespace DataSpec::DNAMP1 { struct GunTurret : IScriptObject { AT_DECL_DNA_YAMLV String<-1> name; Value unknown1; Value location; Value orientation; Value scale; Value collisionExtent; Value collisionOffset; AnimationParameters animationParameters; ActorParameters actorParameters; HealthInfo healthInfo; DamageVulnerability damageVulnerabilty; Value intoDeactivateDelay; Value reloadTime; Value reloadTimeVariance; Value panStartTime; Value panHoldTime; Value totalPanSearchTime; Value leftMaxAngle; Value rightMaxAngle; Value downMaxAngle; Value turnSpeed; Value detectionRange; Value detectionZRange; Value freezeDuration; Value freezeVariance; Value freezeTimeout; UniqueID32 projectileRes; DamageInfo projectileDamage; UniqueID32 idleLightRes; UniqueID32 deactivateLightRes; UniqueID32 targettingLightRes; UniqueID32 frozenEffectRes; UniqueID32 chargingEffectRes; UniqueID32 panningEffectRes; UniqueID32 visorEffectRes; Value trackingSoundId; Value lockOnSoundId; Value unfreezeSoundId; Value stopClankSoundId; Value chargingSoundId; Value visorSoundId; UniqueID32 extensionModelResId; Value extensionDropDownDist; Value numInitialShots; Value initialShotTableIndex; Value numSubsequentShots; Value frenzyDuration; Value scriptedStartOnly; void addCMDLRigPairs(PAKRouter& pakRouter, CharacterAssociations& charAssoc) const override { actorParameters.addCMDLRigPairs(pakRouter, charAssoc, animationParameters); } void nameIDs(PAKRouter& pakRouter) const override { if (projectileRes.isValid()) { PAK::Entry* ent = (PAK::Entry*)pakRouter.lookupEntry(projectileRes); ent->name = name + "_projectileRes"; } if (idleLightRes.isValid()) { PAK::Entry* ent = (PAK::Entry*)pakRouter.lookupEntry(idleLightRes); ent->name = name + "_idleLightRes"; } if (deactivateLightRes.isValid()) { PAK::Entry* ent = (PAK::Entry*)pakRouter.lookupEntry(deactivateLightRes); ent->name = name + "_deactivateLightRes"; } if (targettingLightRes.isValid()) { PAK::Entry* ent = (PAK::Entry*)pakRouter.lookupEntry(targettingLightRes); ent->name = name + "_targettingLightRes"; } if (frozenEffectRes.isValid()) { PAK::Entry* ent = (PAK::Entry*)pakRouter.lookupEntry(frozenEffectRes); ent->name = name + "_frozenEffectRes"; } if (chargingEffectRes.isValid()) { PAK::Entry* ent = (PAK::Entry*)pakRouter.lookupEntry(chargingEffectRes); ent->name = name + "_chargingEffectRes"; } if (panningEffectRes.isValid()) { PAK::Entry* ent = (PAK::Entry*)pakRouter.lookupEntry(panningEffectRes); ent->name = name + "_panningEffectRes"; } if (visorEffectRes.isValid()) { PAK::Entry* ent = (PAK::Entry*)pakRouter.lookupEntry(visorEffectRes); ent->name = name + "_visorEffectRes"; } if (extensionModelResId.isValid()) { PAK::Entry* ent = (PAK::Entry*)pakRouter.lookupEntry(extensionModelResId); ent->name = name + "_extensionModelResId"; } animationParameters.nameANCS(pakRouter, name + "_animp"); actorParameters.nameIDs(pakRouter, name + "_actp"); } void gatherDependencies(std::vector& pathsOut, std::vector& lazyOut) const override { g_curSpec->flattenDependencies(projectileRes, pathsOut); g_curSpec->flattenDependencies(idleLightRes, pathsOut); g_curSpec->flattenDependencies(deactivateLightRes, pathsOut); g_curSpec->flattenDependencies(targettingLightRes, pathsOut); g_curSpec->flattenDependencies(frozenEffectRes, pathsOut); g_curSpec->flattenDependencies(chargingEffectRes, pathsOut); g_curSpec->flattenDependencies(panningEffectRes, pathsOut); g_curSpec->flattenDependencies(visorEffectRes, pathsOut); g_curSpec->flattenDependencies(extensionModelResId, pathsOut); animationParameters.depANCS(pathsOut); actorParameters.depIDs(pathsOut, lazyOut); } void gatherScans(std::vector& scansOut) const override { actorParameters.scanIDs(scansOut); } }; } // namespace DataSpec::DNAMP1