diff options
author | Kae <80987908+Novaenia@users.noreply.github.com> | 2023-06-20 14:33:09 +1000 |
---|---|---|
committer | Kae <80987908+Novaenia@users.noreply.github.com> | 2023-06-20 14:33:09 +1000 |
commit | 6352e8e3196f78388b6c771073f9e03eaa612673 (patch) | |
tree | e23772f79a7fbc41bc9108951e9e136857484bf4 /source/game/interfaces/StarToolUserItem.cpp | |
parent | 6741a057e5639280d85d0f88ba26f000baa58f61 (diff) |
everything everywhere
all at once
Diffstat (limited to 'source/game/interfaces/StarToolUserItem.cpp')
-rw-r--r-- | source/game/interfaces/StarToolUserItem.cpp | 59 |
1 files changed, 59 insertions, 0 deletions
diff --git a/source/game/interfaces/StarToolUserItem.cpp b/source/game/interfaces/StarToolUserItem.cpp new file mode 100644 index 0000000..e9354a1 --- /dev/null +++ b/source/game/interfaces/StarToolUserItem.cpp @@ -0,0 +1,59 @@ +#include "StarToolUserItem.hpp" + +namespace Star { + +ToolUserItem::ToolUserItem() : m_owner(nullptr) {} + +void ToolUserItem::init(ToolUserEntity* owner, ToolHand hand) { + m_owner = owner; + m_hand = hand; +} + +void ToolUserItem::uninit() { + m_owner = nullptr; + m_hand = {}; +} + +void ToolUserItem::update(FireMode, bool, HashSet<MoveControlType> const&) {} + +bool ToolUserItem::initialized() const { + return (bool)m_owner; +} + +ToolUserEntity* ToolUserItem::owner() const { + if (!m_owner) + throw ToolUserItemException("Not initialized in ToolUserItem::owner"); + return m_owner; +} + +EntityMode ToolUserItem::entityMode() const { + if (!m_owner) + throw ToolUserItemException("Not initialized in ToolUserItem::entityMode"); + return *m_owner->entityMode(); +} + +ToolHand ToolUserItem::hand() const { + if (!m_owner) + throw ToolUserItemException("Not initialized in ToolUserItem::hand"); + return *m_hand; +} + +World* ToolUserItem::world() const { + if (!m_owner) + throw ToolUserItemException("Not initialized in ToolUserItem::world"); + return m_owner->world(); +} + +List<DamageSource> ToolUserItem::damageSources() const { + return {}; +} + +List<PolyF> ToolUserItem::shieldPolys() const { + return {}; +} + +List<PhysicsForceRegion> ToolUserItem::forceRegions() const { + return {}; +} + +} |