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

Method setDance

source/game/StarNpc.cpp:882–891  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

880}
881
882void Npc::setDance(Maybe<String> const& danceName) {
883 assert(!isSlave());
884 m_dance = danceName;
885
886 if (danceName.isValid()) {
887 auto danceDatabase = Root::singleton().danceDatabase();
888 DancePtr dance = danceDatabase->getDance(*danceName);
889 m_danceCooldownTimer = GameTimer(dance->duration);
890 }
891}
892
893bool Npc::isInteractive() const {
894 return m_isInteractive.get();

Callers 4

updateMethod · 0.45
switchPlayerMethod · 0.45
updateMethod · 0.45
getNetStatesMethod · 0.45

Calls 5

singletonClass · 0.85
GameTimerClass · 0.85
isValidMethod · 0.80
danceDatabaseMethod · 0.80
getDanceMethod · 0.45

Tested by

no test coverage detected