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

Method fireTriggered

source/game/items/StarCodexItem.cpp:30–40  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

28}
29
30void CodexItem::fireTriggered() {
31 if (auto player = as<Player>(owner())) {
32 auto codexLearned = player->codexes()->learnCodex(m_codexId);
33 if (codexLearned) {
34 player->queueUIMessage(Root::singleton().assets()->json("/codex.config:messages.learned").toString());
35 } else {
36 player->codexes()->markCodexUnread(m_codexId);
37 player->queueUIMessage(Root::singleton().assets()->json("/codex.config:messages.alreadyKnown").toString());
38 }
39 }
40}
41
42List<Drawable> CodexItem::iconDrawables() const {
43 return m_iconDrawables;

Callers

nothing calls this directly

Calls 8

singletonClass · 0.85
learnCodexMethod · 0.80
jsonMethod · 0.80
assetsMethod · 0.80
markCodexUnreadMethod · 0.80
codexesMethod · 0.45
queueUIMessageMethod · 0.45
toStringMethod · 0.45

Tested by

no test coverage detected