#pragma once #include "../../DNACommon/DNACommon.hpp" #include "IScriptObject.hpp" #include "Parameters.hpp" namespace DataSpec::DNAMP1 { struct Magdolite : IScriptObject { AT_DECL_DNA_YAMLV String<-1> name; Value location; Value orientation; Value scale; PatternedInfo patternedInfo; ActorParameters actorParameters; Value unknown1; Value unknown2; DamageInfo damageInfo1; DamageInfo damageInfo2; DamageVulnerability damageVulnerabilty1; DamageVulnerability damageVulnerabilty2; UniqueID32 cmdlHeadless; UniqueID32 cskrHeadless; Value unknown3; Value unknown4; Value unknown5; Value unknown6; struct MagdoliteParameters : BigDNA { AT_DECL_DNA Value propertyCount; Value unknown1; UniqueID32 particle; Value unknown2; Value unknown3; Value unknown4; Value unknown5; } magdoliteParameters; Value unknown7; Value unknown8; Value unknown9; void addCMDLRigPairs(PAKRouter& pakRouter, CharacterAssociations& charAssoc) const override { UniqueID32 cinf = patternedInfo.animationParameters.getCINF(pakRouter); actorParameters.addCMDLRigPairs(pakRouter, charAssoc, patternedInfo.animationParameters); if (cmdlHeadless.isValid() && cskrHeadless.isValid()) { charAssoc.m_cmdlRigs[cmdlHeadless] = std::make_pair(cskrHeadless, cinf); charAssoc.m_cskrCinfToCharacter[cskrHeadless] = std::make_pair(patternedInfo.animationParameters.animationCharacterSet, "ATTACH.HEADLESS.CSKR"); charAssoc.addAttachmentRig(patternedInfo.animationParameters.animationCharacterSet, {}, cmdlHeadless, "HEADLESS"); } } void nameIDs(PAKRouter& pakRouter) const override { if (cmdlHeadless.isValid()) { PAK::Entry* ent = (PAK::Entry*)pakRouter.lookupEntry(cmdlHeadless); ent->name = name + "_emodel"; } if (cskrHeadless.isValid()) { PAK::Entry* ent = (PAK::Entry*)pakRouter.lookupEntry(cskrHeadless); ent->name = name + "_eskin"; } if (magdoliteParameters.particle.isValid()) { PAK::Entry* ent = (PAK::Entry*)pakRouter.lookupEntry(magdoliteParameters.particle); ent->name = name + "_part"; } patternedInfo.nameIDs(pakRouter, name + "_patterned"); actorParameters.nameIDs(pakRouter, name + "_actp"); } void gatherDependencies(std::vector& pathsOut, std::vector& lazyOut) const override { g_curSpec->flattenDependencies(cmdlHeadless, pathsOut); g_curSpec->flattenDependencies(cskrHeadless, pathsOut); g_curSpec->flattenDependencies(magdoliteParameters.particle, pathsOut); patternedInfo.depIDs(pathsOut); actorParameters.depIDs(pathsOut, lazyOut); } void gatherScans(std::vector& scansOut) const override { actorParameters.scanIDs(scansOut); } }; } // namespace DataSpec::DNAMP1