the game where you go into mines and start crafting! but for consoles (forked directly from smartcmd's github)
at master 43 lines 1.8 kB view raw
1#pragma once 2 3#include "Tile.h" 4 5class TripWireSourceTile : public Tile 6{ 7public: 8 using Tile::getTickDelay; 9 10 static const int MASK_DIR = 0x3; 11 static const int MASK_ATTACHED = 0x4; 12 static const int MASK_POWERED = 0x8; 13 static const int WIRE_DIST_MIN = 1; 14 static const int WIRE_DIST_MAX = 2 + 40; // 2 hooks + x string 15 16 TripWireSourceTile(int id); 17 18 AABB *getAABB(Level *level, int x, int y, int z); 19 bool blocksLight(); 20 bool isSolidRender(bool isServerLevel = false); 21 bool isCubeShaped(); 22 int getRenderShape(); 23 int getTickDelay(Level *level); 24 bool mayPlace(Level *level, int x, int y, int z, int face); 25 bool mayPlace(Level *level, int x, int y, int z); 26 int getPlacedOnFaceDataValue(Level *level, int x, int y, int z, int face, float clickX, float clickY, float clickZ, int itemValue); 27 void finalizePlacement(Level *level, int x, int y, int z, int data); 28 void neighborChanged(Level *level, int x, int y, int z, int type); 29 void calculateState(Level *level, int x, int y, int z, int id, int data, bool canUpdate, int wireSource, int wireSourceData); 30 void tick(Level *level, int x, int y, int z, Random *random); 31 32private: 33 void playSound(Level *level, int x, int y, int z, bool attached, bool powered, bool wasAttached, bool wasPowered); 34 void notifyNeighbors(Level *level, int x, int y, int z, int dir); 35 bool checkCanSurvive(Level *level, int x, int y, int z); 36 37public: 38 void updateShape(LevelSource *level, int x, int y, int z, int forceData = -1, shared_ptr<TileEntity> forceEntity = shared_ptr<TileEntity>()); 39 void onRemove(Level *level, int x, int y, int z, int id, int data); 40 virtual int getSignal(LevelSource *level, int x, int y, int z, int dir); 41 virtual int getDirectSignal(LevelSource *level, int x, int y, int z, int dir); 42 bool isSignalSource(); 43};