summaryrefslogtreecommitdiff
path: root/src/unittest/CMakeLists.txt
Commit message (Expand)AuthorAge
* Rename “Minimal development test” to “Development Test” (#9928)Wuzzy2020-05-26
* Add Irrlicht-specific smart pointer (#6814)Vitaliy2019-04-12
* Fix Address::isLocalhost algorithmLoic Blot2019-02-09
* Add an activeobject manager to hold active objects (#7939)Loïc Blot2018-12-13
* Replace auth.txt with SQLite auth database (#7279)Ben Deutsch2018-08-05
* Revert 6587 - Optimize entity-entity collision (#7539)lhofhansl2018-07-08
* Server: move shutdown parts to a specific shutdown state object (#7437)Loïc Blot2018-06-13
* Optimize entity-entity collision (#6587)Vitaliy2018-04-03
* Client eventmanager refactor (#7179)Loïc Blot2018-03-30
* Server: delegate mod management & config to ServerModConfiguration (#7131)Loïc Blot2018-03-16
* Add Voxelarea unittests (#7121)Loïc Blot2018-03-11
* GameUI refactor (part 1/X): GameUI object creation + GameUIFlags move to GameUILoic Blot2018-01-05
* Add unittests on ActiveObject and BanManager class (#6866)Loïc Blot2018-01-01
* Implement mod communication channels (#6351)Loïc Blot2017-09-26
* Add unittests to test player saving/loading (#4679)Ner'zhul2016-10-27
* Only include keycode unittests in client build (fixes #4559)sfan52016-09-29
* Add keycode.cpp unittestssfan52016-09-25
* Add MapSettingsManager and new mapgen setting script API functionskwolekr2016-07-03
* Clean up threadingShadowNinja2015-08-23
* Add AreaStore data structureest312015-07-27
* Tests: Add schematic unittestskwolekr2015-05-08
* Tests: Add NodeResolver unittestskwolekr2015-05-05
* Tests: Add ObjDef unittestskwolekr2015-05-03
* Tests: Add random unittestskwolekr2015-04-29
* Tests: Modularize unit testingkwolekr2015-04-26
ram1 bit 0-6: probability bit 7: specific node force placement For each node in schematic: [u8] param2 } Version changes: 1 - Initial version 2 - Fixed messy never/always place; 0 probability is now never, 0xFF is always 3 - Added y-slice probabilities; this allows for variable height structures 4 - Compressed range of node occurence prob., added per-node force placement bit */ //// Schematic constants #define MTSCHEM_FILE_SIGNATURE 0x4d54534d // 'MTSM' #define MTSCHEM_FILE_VER_HIGHEST_READ 4 #define MTSCHEM_FILE_VER_HIGHEST_WRITE 4 #define MTSCHEM_PROB_MASK 0x7F #define MTSCHEM_PROB_NEVER 0x00 #define MTSCHEM_PROB_ALWAYS 0x7F #define MTSCHEM_PROB_ALWAYS_OLD 0xFF #define MTSCHEM_FORCE_PLACE 0x80 enum SchematicType { SCHEMATIC_NORMAL, }; enum SchematicFormatType { SCHEM_FMT_HANDLE, SCHEM_FMT_MTS, SCHEM_FMT_LUA, }; class Schematic : public ObjDef, public NodeResolver { public: Schematic(); virtual ~Schematic(); virtual void resolveNodeNames(); bool loadSchematicFromFile(const std::string &filename, INodeDefManager *ndef, StringMap *replace_names=NULL); bool saveSchematicToFile(const std::string &filename, INodeDefManager *ndef); bool getSchematicFromMap(Map *map, v3s16 p1, v3s16 p2); bool deserializeFromMts(std::istream *is, std::vector<std::string> *names); bool serializeToMts(std::ostream *os, const std::vector<std::string> &names); bool serializeToLua(std::ostream *os, const std::vector<std::string> &names, bool use_comments, u32 indent_spaces); void blitToVManip(v3s16 p, MMVManip *vm, Rotation rot, bool force_place); void placeStructure(Map *map, v3s16 p, u32 flags, Rotation rot, bool force_place); void applyProbabilities(v3s16 p0, std::vector<std::pair<v3s16, u8> > *plist, std::vector<std::pair<s16, u8> > *splist); std::vector<content_t> c_nodes; u32 flags; v3s16 size; MapNode *schemdata; u8 *slice_probs; }; class SchematicManager : public ObjDefManager { public: SchematicManager(IGameDef *gamedef); virtual ~SchematicManager() {} virtual void clear(); const char *getObjectTitle() const { return "schematic"; } static Schematic *create(SchematicType type) { return new Schematic; } private: IGameDef *m_gamedef; }; void generate_nodelist_and_update_ids(MapNode *nodes, size_t nodecount, std::vector<std::string> *usednodes, INodeDefManager *ndef); #endif