| 133 | } |
| 134 | |
| 135 | Json Npc::diskStore() const { |
| 136 | return JsonObject{ |
| 137 | {"npcVariant", Root::singleton().npcDatabase()->writeNpcVariantToJson(m_npcVariant)}, |
| 138 | {"movementController", m_movementController->storeState()}, |
| 139 | {"statusController", m_statusController->diskStore()}, |
| 140 | {"armor", m_armor->diskStore()}, |
| 141 | {"tools", m_tools->diskStore()}, |
| 142 | {"aimPosition", jsonFromVec2F({m_xAimPosition.get(), m_yAimPosition.get()})}, |
| 143 | {"humanoidState", Humanoid::StateNames.getRight(m_humanoid.state())}, |
| 144 | {"humanoidEmoteState", HumanoidEmoteNames.getRight(m_humanoid.emoteState())}, |
| 145 | {"isInteractive", m_isInteractive.get()}, |
| 146 | {"shifting", m_shifting.get()}, |
| 147 | {"damageOnTouch", m_damageOnTouch.get()}, |
| 148 | {"effectEmitter", m_effectEmitter->toJson()}, |
| 149 | {"disableWornArmor", m_disableWornArmor.get()}, |
| 150 | {"scriptStorage", m_scriptComponent.getScriptStorage()}, |
| 151 | {"uniqueId", jsonFromMaybe(uniqueId())}, |
| 152 | {"team", getTeam().toJson()}, |
| 153 | {"deathParticleBurst", jsonFromMaybe(m_deathParticleBurst.get())}, |
| 154 | {"dropPools", m_dropPools.get().transformed(construct<Json>())}, |
| 155 | {"aggressive", m_aggressive.get()} |
| 156 | }; |
| 157 | } |
| 158 | |
| 159 | ByteArray Npc::netStore(NetCompatibilityRules rules) { |
| 160 | return Root::singleton().npcDatabase()->writeNpcVariant(m_npcVariant, rules); |
no test coverage detected