Re-enabling features: hotbar icons, name, plank pattern.
This commit is contained in:
@@ -74,9 +74,9 @@ void CaveGame::Client::TileHotbar::Load(CaveGame::Client::LocalWorld *world) {
|
||||
auto* tile_icon_canvas = new RenderTarget(canvas_texture, {0, 0, 0, 0});
|
||||
|
||||
JGL::J2D::Begin(tile_icon_canvas, true);
|
||||
//for (int x = 0; x < icon_size; x++)
|
||||
// for (int y = 0; y < icon_size; y++)
|
||||
// world->RenderTile(item->NumericID(), x, y, x, y);
|
||||
for (int x = 0; x < icon_size; x++)
|
||||
for (int y = 0; y < icon_size; y++)
|
||||
world->RenderTile(item.numeric_id, x, y, x, y);
|
||||
JGL::J2D::End();
|
||||
|
||||
delete tile_icon_canvas;
|
||||
@@ -134,8 +134,7 @@ void CaveGame::Client::TileHotbar::Update(float elapsed) {
|
||||
|
||||
// Update item name label.
|
||||
Core::TileID active_item = slots[slot_index];
|
||||
//auto* data = Tiles().Get(active_item);
|
||||
//item_label->SetContent(data->Name());
|
||||
item_label->SetContent(Tiles()[active_item].display_name);
|
||||
|
||||
// Set appearance of selected slot.
|
||||
hotbar_elements[slot_index]->CornerRounding(8);
|
||||
|
@@ -326,8 +326,7 @@ namespace CaveGame::Client {
|
||||
base_b += 30;
|
||||
}
|
||||
|
||||
if (wy % brick_height == 0 || (wx + brick_offset) % brick_length == 0)
|
||||
{
|
||||
if (wy % brick_height == 0 || (wx + brick_offset) % brick_length == 0) {
|
||||
base_r -= 55;
|
||||
base_g -= 60;
|
||||
base_b -= 55;
|
||||
@@ -351,7 +350,7 @@ namespace CaveGame::Client {
|
||||
using CaveGame::Core::TileID;
|
||||
|
||||
TileID t_id;
|
||||
Core::Tile* t_data;
|
||||
Core::Tile t_data;
|
||||
Color4 t_color;
|
||||
|
||||
JGL::J2D::Begin(destination, true);
|
||||
@@ -366,11 +365,6 @@ namespace CaveGame::Client {
|
||||
int wx = (coords.x*Core::Chunk::ChunkSize) + x;
|
||||
int wy = (coords.y*Core::Chunk::ChunkSize) + y;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
//if (t_id == TileID::AIR || t_id == TileID::VOID) // Air
|
||||
//continue;
|
||||
|
||||
|
@@ -148,7 +148,7 @@
|
||||
"solid": false,
|
||||
"does-random-ticc": false,
|
||||
"does-forced-ticc": false,
|
||||
"color": "#FFFFFF"
|
||||
"color": [32, 139, 34]
|
||||
},
|
||||
{
|
||||
"mnemonic-id" : "sand",
|
||||
@@ -267,6 +267,98 @@
|
||||
"pallet": []
|
||||
},
|
||||
|
||||
{
|
||||
"mnemonic-id" : "copper-ore",
|
||||
"display-name" : "Copper Ore",
|
||||
"solid": true,
|
||||
"color": [255, 140, 0],
|
||||
"pallet": [[255, 140, 0], [234, 150, 3], [241, 138, 5]]
|
||||
},
|
||||
{
|
||||
"mnemonic-id" : "tin-ore",
|
||||
"display-name" : "Tin Ore",
|
||||
"solid": true,
|
||||
"color": [255, 140, 0],
|
||||
"pallet": [[255, 140, 0], [234, 150, 3], [241, 138, 5]]
|
||||
},
|
||||
{
|
||||
"mnemonic-id" : "iron-ore",
|
||||
"display-name" : "Iron Ore",
|
||||
"solid": true,
|
||||
"color": [255, 140, 0],
|
||||
"pallet": [[255, 140, 0], [234, 150, 3], [241, 138, 5]]
|
||||
},
|
||||
{
|
||||
"mnemonic-id" : "lead-ore",
|
||||
"display-name" : "Lead Ore",
|
||||
"solid": true,
|
||||
"color": [255, 140, 0],
|
||||
"pallet": [[255, 140, 0], [234, 150, 3], [241, 138, 5]]
|
||||
},
|
||||
{
|
||||
"mnemonic-id" : "silver-ore",
|
||||
"display-name" : "Silver Ore",
|
||||
"solid": true,
|
||||
"color": [255, 140, 0],
|
||||
"pallet": [[255, 140, 0], [234, 150, 3], [241, 138, 5]]
|
||||
},
|
||||
{
|
||||
"mnemonic-id" : "tungsten-ore",
|
||||
"display-name" : "Tungsten Ore",
|
||||
"solid": true,
|
||||
"color": [255, 140, 0],
|
||||
"pallet": [[255, 140, 0], [234, 150, 3], [241, 138, 5]]
|
||||
},
|
||||
{
|
||||
"mnemonic-id" : "gold-ore",
|
||||
"display-name" : "Gold Ore",
|
||||
"solid": true,
|
||||
"color": [255, 140, 0],
|
||||
"pallet": [[255, 140, 0], [234, 150, 3], [241, 138, 5]]
|
||||
},
|
||||
{
|
||||
"mnemonic-id" : "platinum-ore",
|
||||
"display-name" : "Platinum Ore",
|
||||
"solid": true,
|
||||
"color": [255, 140, 0],
|
||||
"pallet": [[255, 140, 0], [234, 150, 3], [241, 138, 5]]
|
||||
},
|
||||
{
|
||||
"mnemonic-id" : "cobalt-ore",
|
||||
"display-name" : "Cobalt Ore",
|
||||
"solid": true,
|
||||
"color": [255, 140, 0],
|
||||
"pallet": [[255, 140, 0], [234, 150, 3], [241, 138, 5]]
|
||||
},
|
||||
{
|
||||
"mnemonic-id" : "cobalt-ore",
|
||||
"display-name" : "Cobalt Ore",
|
||||
"solid": true,
|
||||
"color": [255, 140, 0],
|
||||
"pallet": [[255, 140, 0], [234, 150, 3], [241, 138, 5]]
|
||||
},
|
||||
{
|
||||
"mnemonic-id" : "titanium-ore",
|
||||
"display-name" : "Titanium Ore",
|
||||
"solid": true,
|
||||
"color": [255, 140, 0],
|
||||
"pallet": [[255, 140, 0], [234, 150, 3], [241, 138, 5]]
|
||||
},
|
||||
{
|
||||
"mnemonic-id" : "uranium-ore",
|
||||
"display-name" : "Uranium Ore",
|
||||
"solid": true,
|
||||
"color": [255, 140, 0],
|
||||
"pallet": [[255, 140, 0], [234, 150, 3], [241, 138, 5]]
|
||||
},
|
||||
|
||||
{
|
||||
"mnemonic-id" : "oak-plank",
|
||||
"display-name" : "Oak Plank",
|
||||
"solid": true,
|
||||
"color": [222, 184, 135]
|
||||
},
|
||||
|
||||
{
|
||||
"mnemonic-id" : "water",
|
||||
"display-name" : "Water",
|
||||
|
Reference in New Issue
Block a user