2018-10-07 03:42:33 +00:00
|
|
|
#pragma once
|
2015-09-10 20:30:35 +00:00
|
|
|
|
|
|
|
#include "../../DNACommon/DNACommon.hpp"
|
|
|
|
#include "IScriptObject.hpp"
|
|
|
|
#include "Parameters.hpp"
|
|
|
|
|
2018-12-08 05:30:43 +00:00
|
|
|
namespace DataSpec::DNAMP1 {
|
|
|
|
struct GunTurret : IScriptObject {
|
2019-08-11 00:49:41 +00:00
|
|
|
AT_DECL_DNA_YAMLV
|
2018-12-08 05:30:43 +00:00
|
|
|
String<-1> name;
|
|
|
|
Value<atUint32> unknown1;
|
|
|
|
Value<atVec3f> location;
|
|
|
|
Value<atVec3f> orientation;
|
|
|
|
Value<atVec3f> scale;
|
2019-02-18 05:47:46 +00:00
|
|
|
Value<atVec3f> collisionExtent;
|
|
|
|
Value<atVec3f> collisionOffset;
|
2018-12-08 05:30:43 +00:00
|
|
|
AnimationParameters animationParameters;
|
|
|
|
ActorParameters actorParameters;
|
|
|
|
HealthInfo healthInfo;
|
|
|
|
DamageVulnerability damageVulnerabilty;
|
2019-02-18 05:47:46 +00:00
|
|
|
Value<float> intoDeactivateDelay;
|
|
|
|
Value<float> reloadTime;
|
|
|
|
Value<float> reloadTimeVariance;
|
|
|
|
Value<float> panStartTime;
|
|
|
|
Value<float> panHoldTime;
|
|
|
|
Value<float> totalPanSearchTime;
|
|
|
|
Value<float> leftMaxAngle;
|
|
|
|
Value<float> rightMaxAngle;
|
|
|
|
Value<float> downMaxAngle;
|
|
|
|
Value<float> turnSpeed;
|
|
|
|
Value<float> detectionRange;
|
|
|
|
Value<float> detectionZRange;
|
|
|
|
Value<float> freezeDuration;
|
|
|
|
Value<float> freezeVariance;
|
|
|
|
Value<bool> freezeTimeout;
|
|
|
|
UniqueID32 projectileRes;
|
|
|
|
DamageInfo projectileDamage;
|
|
|
|
UniqueID32 idleLightRes;
|
|
|
|
UniqueID32 deactivateLightRes;
|
|
|
|
UniqueID32 targettingLightRes;
|
|
|
|
UniqueID32 frozenEffectRes;
|
|
|
|
UniqueID32 chargingEffectRes;
|
|
|
|
UniqueID32 panningEffectRes;
|
|
|
|
UniqueID32 visorEffectRes;
|
|
|
|
Value<atUint32> trackingSoundId;
|
|
|
|
Value<atUint32> lockOnSoundId;
|
|
|
|
Value<atUint32> unfreezeSoundId;
|
|
|
|
Value<atUint32> stopClankSoundId;
|
|
|
|
Value<atUint32> chargingSoundId;
|
|
|
|
Value<atUint32> visorSoundId;
|
|
|
|
UniqueID32 extensionModelResId;
|
|
|
|
Value<float> extensionDropDownDist;
|
|
|
|
Value<atUint32> numInitialShots;
|
|
|
|
Value<atUint32> initialShotTableIndex;
|
|
|
|
Value<atUint32> numSubsequentShots;
|
|
|
|
Value<float> frenzyDuration;
|
|
|
|
Value<bool> scriptedStartOnly;
|
2015-10-27 00:19:03 +00:00
|
|
|
|
2019-08-10 02:32:48 +00:00
|
|
|
void addCMDLRigPairs(PAKRouter<PAKBridge>& pakRouter, CharacterAssociations<UniqueID32>& charAssoc) const override {
|
2018-12-08 05:30:43 +00:00
|
|
|
actorParameters.addCMDLRigPairs(pakRouter, charAssoc, animationParameters);
|
|
|
|
}
|
2015-10-27 00:19:03 +00:00
|
|
|
|
2019-08-10 02:32:48 +00:00
|
|
|
void nameIDs(PAKRouter<PAKBridge>& pakRouter) const override {
|
2019-07-20 04:27:21 +00:00
|
|
|
if (projectileRes.isValid()) {
|
2019-02-18 05:47:46 +00:00
|
|
|
PAK::Entry* ent = (PAK::Entry*)pakRouter.lookupEntry(projectileRes);
|
|
|
|
ent->name = name + "_projectileRes";
|
2015-10-27 00:19:03 +00:00
|
|
|
}
|
2019-07-20 04:27:21 +00:00
|
|
|
if (idleLightRes.isValid()) {
|
2019-02-18 05:47:46 +00:00
|
|
|
PAK::Entry* ent = (PAK::Entry*)pakRouter.lookupEntry(idleLightRes);
|
|
|
|
ent->name = name + "_idleLightRes";
|
2016-10-02 22:41:36 +00:00
|
|
|
}
|
2019-07-20 04:27:21 +00:00
|
|
|
if (deactivateLightRes.isValid()) {
|
2019-02-18 05:47:46 +00:00
|
|
|
PAK::Entry* ent = (PAK::Entry*)pakRouter.lookupEntry(deactivateLightRes);
|
|
|
|
ent->name = name + "_deactivateLightRes";
|
2016-10-02 22:41:36 +00:00
|
|
|
}
|
2019-07-20 04:27:21 +00:00
|
|
|
if (targettingLightRes.isValid()) {
|
2019-02-18 05:47:46 +00:00
|
|
|
PAK::Entry* ent = (PAK::Entry*)pakRouter.lookupEntry(targettingLightRes);
|
|
|
|
ent->name = name + "_targettingLightRes";
|
2018-12-08 05:30:43 +00:00
|
|
|
}
|
2019-07-20 04:27:21 +00:00
|
|
|
if (frozenEffectRes.isValid()) {
|
2019-02-18 05:47:46 +00:00
|
|
|
PAK::Entry* ent = (PAK::Entry*)pakRouter.lookupEntry(frozenEffectRes);
|
|
|
|
ent->name = name + "_frozenEffectRes";
|
2018-12-08 05:30:43 +00:00
|
|
|
}
|
2019-07-20 04:27:21 +00:00
|
|
|
if (chargingEffectRes.isValid()) {
|
2019-02-18 05:47:46 +00:00
|
|
|
PAK::Entry* ent = (PAK::Entry*)pakRouter.lookupEntry(chargingEffectRes);
|
|
|
|
ent->name = name + "_chargingEffectRes";
|
2018-12-08 05:30:43 +00:00
|
|
|
}
|
2019-07-20 04:27:21 +00:00
|
|
|
if (panningEffectRes.isValid()) {
|
2019-02-18 05:47:46 +00:00
|
|
|
PAK::Entry* ent = (PAK::Entry*)pakRouter.lookupEntry(panningEffectRes);
|
|
|
|
ent->name = name + "_panningEffectRes";
|
2018-12-08 05:30:43 +00:00
|
|
|
}
|
2019-07-20 04:27:21 +00:00
|
|
|
if (visorEffectRes.isValid()) {
|
2019-02-18 05:47:46 +00:00
|
|
|
PAK::Entry* ent = (PAK::Entry*)pakRouter.lookupEntry(visorEffectRes);
|
|
|
|
ent->name = name + "_visorEffectRes";
|
2018-12-08 05:30:43 +00:00
|
|
|
}
|
2019-07-20 04:27:21 +00:00
|
|
|
if (extensionModelResId.isValid()) {
|
2019-02-18 05:47:46 +00:00
|
|
|
PAK::Entry* ent = (PAK::Entry*)pakRouter.lookupEntry(extensionModelResId);
|
|
|
|
ent->name = name + "_extensionModelResId";
|
2018-12-08 05:30:43 +00:00
|
|
|
}
|
|
|
|
animationParameters.nameANCS(pakRouter, name + "_animp");
|
|
|
|
actorParameters.nameIDs(pakRouter, name + "_actp");
|
|
|
|
}
|
|
|
|
|
2019-08-10 02:32:48 +00:00
|
|
|
void gatherDependencies(std::vector<hecl::ProjectPath>& pathsOut,
|
|
|
|
std::vector<hecl::ProjectPath>& lazyOut) const override {
|
2019-02-18 05:47:46 +00:00
|
|
|
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);
|
2018-12-08 05:30:43 +00:00
|
|
|
animationParameters.depANCS(pathsOut);
|
|
|
|
actorParameters.depIDs(pathsOut, lazyOut);
|
|
|
|
}
|
2015-09-10 20:30:35 +00:00
|
|
|
|
2019-08-10 02:32:48 +00:00
|
|
|
void gatherScans(std::vector<Scan>& scansOut) const override { actorParameters.scanIDs(scansOut); }
|
2018-12-08 05:30:43 +00:00
|
|
|
};
|
|
|
|
} // namespace DataSpec::DNAMP1
|