aboutsummaryrefslogtreecommitdiff
path: root/src
Commit message (Expand)AuthorAge
...
* Store metadata as metadata name in node definitionPerttu Ahola2011-11-29
* Set block modified flag when node metadata inventory is modifiedPerttu Ahola2011-11-29
* Add names to NodeMetadataPerttu Ahola2011-11-29
* Add Lua node definition stuff (not complete)Perttu Ahola2011-11-29
* Add texture modifier [brighten and modify [toalpha to modify existing texture...Perttu Ahola2011-11-29
* Random Lua tweaks/fixesPerttu Ahola2011-11-29
* Make object hit delay smaller for fun; actually it should be roughly zero and...Perttu Ahola2011-11-29
* Relatively snappy object-ground collision detectionPerttu Ahola2011-11-29
* When digging a node, don't switch to punching an object without raising buttonPerttu Ahola2011-11-29
* Default to saving stuff more often to minimize lag caused by a single savePerttu Ahola2011-11-29
* Don't print 'Blocks modified by: ' in Map::timerUpdate if no blocks were writtenPerttu Ahola2011-11-29
* Don't print all block saves to verbosestream; rather print counts of distinct...Perttu Ahola2011-11-29
* Add reason parameter to setModified and print it out to verbosestream when sa...Perttu Ahola2011-11-29
* Improve LuaEntity velocity/acceleration handling (by kahrl); implement static...Perttu Ahola2011-11-29
* Mess up with node definitions to make CONTENT_IGNORE be correctly interpreted...Perttu Ahola2011-11-29
* Optimize map generator for the dynamic content ids a bitPerttu Ahola2011-11-29
* Make added nodes give the corresponding NodeItem as of now (placeholder code)Perttu Ahola2011-11-29
* Fix tool wearPerttu Ahola2011-11-29
* Falling sand and gravelPerttu Ahola2011-11-29
* Node place/dig Lua callbacksPerttu Ahola2011-11-29
* Remove crafting definitions from content_craft.cppPerttu Ahola2011-11-29
* Catch SerializationError in CCraftDefManager::getCraftResult()Perttu Ahola2011-11-29
* Add note about craft_get_result() not being used anymore, but don't remove be...Perttu Ahola2011-11-29
* Crafting definition in scriptsPerttu Ahola2011-11-29
* Improve item serializationPerttu Ahola2011-11-29
* Allow inputting nodename of MaterialItem in ItemSpec::checkItemPerttu Ahola2011-11-29
* Fix another silly mistake making CONTENT_IGNORE definition not being what it ...Perttu Ahola2011-11-29
* Fix silly misspelling in mapgen that made junglegrass to be CONTENT_IGNOREPerttu Ahola2011-11-29
* Actually fill in the NewNameGetter names to allow map generator operation and...Perttu Ahola2011-11-29
* MapNode constructor to allow ndef+namePerttu Ahola2011-11-29
* Initial node definition stuffPerttu Ahola2011-11-29
* Fix camera MaterialItem draw logicPerttu Ahola2011-11-29
* Clean InventoryItem interface a bitPerttu Ahola2011-11-29
* Improved MaterialItem (stores nodename)Perttu Ahola2011-11-29
* Do not expose CONTENT_* stuff in content_mapnode.h and use a name converter w...Perttu Ahola2011-11-29
* Node definition namesPerttu Ahola2011-11-29
* Add name field to ContentFeaturesPerttu Ahola2011-11-29
* Remove burn time definitions from FurnaceNodeMetadataPerttu Ahola2011-11-29
* Remove old commentsPerttu Ahola2011-11-29
* Move cook result properly to ContentFeaturesPerttu Ahola2011-11-29
* Remove node content-dependent stuff from map.cppPerttu Ahola2011-11-29
* Remove content_mapnode.h and nodedef.h #includesPerttu Ahola2011-11-29
* Remove content dependencies from mapblock.cppPerttu Ahola2011-11-29
* Remove #include <content_mapnode.h> from game.cppPerttu Ahola2011-11-29
* Saner sized saplingPerttu Ahola2011-11-29
* Cut down content transfer verbosityPerttu Ahola2011-11-29
* Cut down TextureSource verbosityPerttu Ahola2011-11-29
* Improve loading screen and protocolPerttu Ahola2011-11-29
* Clean nodefeat and content_mapnode a bitPerttu Ahola2011-11-29
* Fix flowing water being always opaquePerttu Ahola2011-11-29
lass="hl kwb">size_t, res.size(), 1); res.clear(); store->removeArea(a.id); store->getAreasForPos(&res, v3s16(0, 0, 7)); UASSERTEQ(size_t, res.size(), 0); res.clear(); store->insertArea(&a); store->getAreasForPos(&res, v3s16(0, 0, 7)); UASSERTEQ(size_t, res.size(), 1); res.clear(); store->getAreasInArea(&res, v3s16(-10, -3, 5), v3s16(0, 29, 7), false); UASSERTEQ(size_t, res.size(), 3); res.clear(); store->getAreasInArea(&res, v3s16(-100, 0, 6), v3s16(200, 0, 6), false); UASSERTEQ(size_t, res.size(), 0); res.clear(); store->getAreasInArea(&res, v3s16(-100, 0, 6), v3s16(200, 0, 6), true); UASSERTEQ(size_t, res.size(), 3); res.clear(); store->removeArea(a.id); store->removeArea(b.id); store->removeArea(c.id); Area d(v3s16(-100, -300, -200), v3s16(-50, -200, -100)); d.data = "Hi!"; store->insertArea(&d); store->getAreasForPos(&res, v3s16(-75, -250, -150)); UASSERTEQ(size_t, res.size(), 1); UASSERTEQ(u16, res[0]->data.size(), 3); UASSERT(strncmp(res[0]->data.c_str(), "Hi!", 3) == 0); res.clear(); store->removeArea(d.id); } void TestAreaStore::testSerialization() { VectorAreaStore store; Area a(v3s16(-1, 0, 1), v3s16(0, 1, 2)); a.data = "Area A"; store.insertArea(&a); Area b(v3s16(123, 456, 789), v3s16(32000, 100, 10)); b.data = "Area B"; store.insertArea(&b); std::ostringstream os; store.serialize(os); std::string str = os.str(); std::string str_wanted("\x00" // Version "\x00\x02" // Count "\xFF\xFF\x00\x00\x00\x01" // Area A min edge "\x00\x00\x00\x01\x00\x02" // Area A max edge "\x00\x06" // Area A data length "Area A" // Area A data "\x00\x7B\x00\x64\x00\x0A" // Area B min edge (last two swapped with max edge for sorting) "\x7D\x00\x01\xC8\x03\x15" // Area B max edge (^) "\x00\x06" // Area B data length "Area B", // Area B data 1 + 2 + 6 + 6 + 2 + 6 + 6 + 6 + 2 + 6); UASSERTEQ(std::string, str, str_wanted); std::istringstream is(str); store.deserialize(is); UASSERTEQ(size_t, store.size(), 4); // deserialize() doesn't clear the store }