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

Method init

source/game/interfaces/StarBeamItem.cpp:46–58  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

44}
45
46void BeamItem::init(ToolUserEntity* owner, ToolHand hand) {
47 ToolUserItem::init(owner, hand);
48
49 m_beamCurve = CSplineF();
50
51 if (initialized()) {
52 m_color = owner->favoriteColor();
53 m_range = owner->beamGunRadius();
54 return;
55 }
56
57 throw ItemException("BeamItem::init: Beam Gun not init'd properly, or user not recognized as Tool User.");
58}
59
60void BeamItem::update(float dt, FireMode, bool, HashSet<MoveControlType> const&) {
61 if (m_particleGenerateCooldown >= 0)

Callers

nothing calls this directly

Calls 3

initFunction · 0.85
favoriteColorMethod · 0.45
beamGunRadiusMethod · 0.45

Tested by

no test coverage detected