X-Git-Url: https://git.lizzy.rs/?a=blobdiff_plain;f=src%2Fcontent_nodemeta.cpp;h=fc2859d27ac0d891a8134c4a04f56925d7094a91;hb=7be082f9a8bb6bd46c226d7ef4c42f0fd9fe7314;hp=0a56db3966beee06136f528566c06caff881325d;hpb=497ff1ecd64c8908f988e15ca879824f2781e3fd;p=dragonfireclient.git diff --git a/src/content_nodemeta.cpp b/src/content_nodemeta.cpp index 0a56db396..fc2859d27 100644 --- a/src/content_nodemeta.cpp +++ b/src/content_nodemeta.cpp @@ -1,6 +1,6 @@ /* Minetest -Copyright (C) 2010-2012 celeron55, Perttu Ahola +Copyright (C) 2010-2013 celeron55, Perttu Ahola This program is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by @@ -18,8 +18,11 @@ with this program; if not, write to the Free Software Foundation, Inc., */ #include "content_nodemeta.h" +#include "nodemetadata.h" +#include "nodetimer.h" #include "inventory.h" #include "log.h" +#include "serialization.h" #include "util/serialize.h" #include "util/string.h" #include "constants.h" // MAP_BLOCKSIZE @@ -76,7 +79,7 @@ static bool content_nodemeta_deserialize_legacy_body( inv->getList("0")->setName("main"); } assert(inv->getList("main") && !inv->getList("0")); - + meta->setString("formspec","size[8,9]" "list[current_name;main;0,0;8,4;]" "list[current_player;main;0,5;8,4;]"); @@ -93,7 +96,7 @@ static bool content_nodemeta_deserialize_legacy_body( inv->getList("0")->setName("main"); } assert(inv->getList("main") && !inv->getList("0")); - + meta->setString("formspec","size[8,9]" "list[current_name;main;0,0;8,4;]" "list[current_player;main;0,5;8,4;]"); @@ -142,7 +145,7 @@ static bool content_nodemeta_deserialize_legacy_meta( void content_nodemeta_deserialize_legacy(std::istream &is, NodeMetadataList *meta, NodeTimerList *timers, - IGameDef *gamedef) + IItemDefManager *item_def_mgr) { meta->clear(); timers->clear(); @@ -151,9 +154,9 @@ void content_nodemeta_deserialize_legacy(std::istream &is, if(version > 1) { - infostream<<__FUNCTION_NAME<<": version "<get(p) != NULL) { - infostream<<"WARNING: "<<__FUNCTION_NAME<<": " + warningstream<set(p, data); if(need_timer) - timers->set(p, NodeTimer(1., 0.)); + timers->set(NodeTimer(1., 0., p)); } } - -void content_nodemeta_serialize_legacy(std::ostream &os, NodeMetadataList *meta) -{ - // Sorry, I was too lazy to implement this. --kahrl - writeU16(os, 1); // version - writeU16(os, 0); // count -} - -// END