v1.4.4
This commit is contained in:
commit
9c94d113d3
10260 changed files with 1237388 additions and 0 deletions
50
source/game/items/StarMaterialItem.hpp
Normal file
50
source/game/items/StarMaterialItem.hpp
Normal file
|
@ -0,0 +1,50 @@
|
|||
#ifndef STAR_MATERIAL_ITEM_HPP
|
||||
#define STAR_MATERIAL_ITEM_HPP
|
||||
|
||||
#include "StarItem.hpp"
|
||||
#include "StarFireableItem.hpp"
|
||||
#include "StarBeamItem.hpp"
|
||||
#include "StarEntityRendering.hpp"
|
||||
|
||||
namespace Star {
|
||||
|
||||
STAR_CLASS(MaterialItem);
|
||||
|
||||
class MaterialItem : public Item, public FireableItem, public BeamItem {
|
||||
public:
|
||||
MaterialItem(Json const& config, String const& directory, Json const& settings);
|
||||
virtual ~MaterialItem() {}
|
||||
|
||||
ItemPtr clone() const override;
|
||||
|
||||
void init(ToolUserEntity* owner, ToolHand hand) override;
|
||||
void update(FireMode fireMode, bool shifting, HashSet<MoveControlType> const& moves) override;
|
||||
|
||||
List<Drawable> nonRotatedDrawables() const override;
|
||||
|
||||
void fire(FireMode mode, bool shifting, bool edgeTriggered) override;
|
||||
|
||||
MaterialId materialId() const;
|
||||
MaterialHue materialHueShift() const;
|
||||
|
||||
bool canPlace(bool shifting) const;
|
||||
bool multiplaceEnabled() const;
|
||||
|
||||
// FIXME: Why isn't this a PreviewTileTool then??
|
||||
List<PreviewTile> preview(bool shifting) const;
|
||||
|
||||
private:
|
||||
MaterialHue placementHueShift(Vec2I const& position) const;
|
||||
|
||||
MaterialId m_material;
|
||||
MaterialHue m_materialHueShift;
|
||||
|
||||
float m_blockRadius;
|
||||
float m_altBlockRadius;
|
||||
bool m_shifting;
|
||||
bool m_multiplace;
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#endif
|
Loading…
Add table
Add a link
Reference in a new issue