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

Method update

source/game/items/StarConsumableItem.cpp:38–47  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

36}
37
38void ConsumableItem::update(float dt, FireMode fireMode, bool shifting, HashSet<MoveControlType> const& moves) {
39 SwingableItem::update(dt, fireMode, shifting, moves);
40
41 if (entityMode() == EntityMode::Master) {
42 if (m_consuming)
43 owner()->addEffectEmitters(m_emitters);
44 if (ready())
45 maybeConsume();
46 }
47}
48
49void ConsumableItem::fire(FireMode mode, bool shifting, bool edgeTriggered) {
50 if (canUse())

Callers

nothing calls this directly

Calls 1

addEffectEmittersMethod · 0.45

Tested by

no test coverage detected