aboutsummaryrefslogtreecommitdiff
path: root/advtrains/textures/advtrains_track_swrst_45.png
diff options
context:
space:
mode:
authorMaverick2797 <git.maverick2797@gmail.com>2024-08-09 19:47:27 +0800
committergpcf <gpcf@gpcf.eu>2024-08-09 14:15:42 +0200
commit9d7cec6151c0a9eca2454e9d6c85bc5596c5e946 (patch)
tree5d3a17c890b049ace321cdf905ebcb34a70e86c6 /advtrains/textures/advtrains_track_swrst_45.png
parent45e5ad3b378b17be7e0ce314ba964e01792d673d (diff)
downloadadvtrains-9d7cec6151c0a9eca2454e9d6c85bc5596c5e946.tar.gz
advtrains-9d7cec6151c0a9eca2454e9d6c85bc5596c5e946.tar.bz2
advtrains-9d7cec6151c0a9eca2454e9d6c85bc5596c5e946.zip
Add Wagon Properties Tool
Also added the Wagon ID to the Wagon Properties formspec
Diffstat (limited to 'advtrains/textures/advtrains_track_swrst_45.png')
0 files changed, 0 insertions, 0 deletions
ral Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ #pragma once #include <unordered_set> #include "metadata.h" /* NodeMetadata stores arbitary amounts of data for special blocks. Used for furnaces, chests and signs. There are two interaction methods: inventory menu and text input. Only one can be used for a single metadata, thus only inventory OR text input should exist in a metadata. */ class Inventory; class IItemDefManager; class NodeMetadata : public Metadata { public: NodeMetadata(IItemDefManager *item_def_mgr); ~NodeMetadata(); void serialize(std::ostream &os, u8 version, bool disk=true) const; void deSerialize(std::istream &is, u8 version); void clear(); bool empty() const; // The inventory Inventory *getInventory() { return m_inventory; } inline bool isPrivate(const std::string &name) const { return m_privatevars.count(name) != 0; } void markPrivate(const std::string &name, bool set); private: int countNonPrivate() const; Inventory *m_inventory; std::unordered_set<std::string> m_privatevars; }; /* List of metadata of all the nodes of a block */ typedef std::map<v3s16, NodeMetadata *> NodeMetadataMap; class NodeMetadataList { public: NodeMetadataList(bool is_metadata_owner = true) : m_is_metadata_owner(is_metadata_owner) {} ~NodeMetadataList(); void serialize(std::ostream &os, u8 blockver, bool disk = true,