]> git.lizzy.rs Git - dragonfireclient.git/blobdiff - src/player.cpp
Add dtime_s to entity activation
[dragonfireclient.git] / src / player.cpp
index 2eb2b10ad3f2bef86327dba2624d6bf2323c74ff..36f12c77b5053728d2e3cec221184603958ac108 100644 (file)
@@ -19,11 +19,11 @@ with this program; if not, write to the Free Software Foundation, Inc.,
 
 #include "player.h"
 #include "constants.h"
-#include "utility.h"
 #include "gamedef.h"
 #include "connection.h" // PEER_ID_INEXISTENT
 #include "settings.h"
 #include "content_sao.h"
+#include "util/numeric.h"
 
 Player::Player(IGameDef *gamedef):
        touching_ground(false),
@@ -45,9 +45,17 @@ Player::Player(IGameDef *gamedef):
        updateName("<not set>");
        inventory.clear();
        inventory.addList("main", PLAYER_INVENTORY_SIZE);
-       inventory.addList("craft", 9);
+       InventoryList *craft = inventory.addList("craft", 9);
+       craft->setWidth(3);
        inventory.addList("craftpreview", 1);
        inventory.addList("craftresult", 1);
+
+       // Can be redefined via Lua
+       inventory_formspec =  "size[8,7.5]"
+               //"image[1,0.6;1,2;player.png]"
+               "list[current_player;main;0,3.5;8,4;]"
+               "list[current_player;craft;3,0;3,3;]"
+               "list[current_player;craftpreview;7,1;1,1;]";
 }
 
 Player::~Player()
@@ -166,6 +174,10 @@ void Player::deSerialize(std::istream &is)
        RemotePlayer
 */
 
+
+
+
+
 void RemotePlayer::setPosition(const v3f &position)
 {
        Player::setPosition(position);