MCPcopy Create free account
hub / github.com/OpenStarbound/OpenStarbound / shouldDestroy

Method shouldDestroy

source/game/StarNpc.cpp:348–355  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

346}
347
348bool Npc::shouldDestroy() const {
349 if (auto res = m_scriptComponent.invoke<bool>("shouldDie"))
350 return *res;
351 else if (!m_statusController->resourcePositive("health") || m_scriptComponent.error())
352 return true;
353 else
354 return false;
355}
356
357void Npc::destroy(RenderCallback* renderCallback) {
358 m_scriptComponent.invoke("die");

Callers 3

updateMethod · 0.45
updateMethod · 0.45
updateMethod · 0.45

Calls 2

resourcePositiveMethod · 0.45
errorMethod · 0.45

Tested by

no test coverage detected