more wood things pt1

This commit is contained in:
darkrose 2017-06-25 02:46:57 +10:00
parent 958f037983
commit 80710a5898
13 changed files with 677 additions and 226 deletions

BIN
data/textures/applewood.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.8 KiB

After

Width:  |  Height:  |  Size: 1.8 KiB

View File

@ -225,6 +225,7 @@ set(common_SRCS
content_mapnode_stair.cpp content_mapnode_stair.cpp
content_mapnode_slab.cpp content_mapnode_slab.cpp
content_mapnode_special.cpp content_mapnode_special.cpp
content_mapnode_sign.cpp
content_mapnode_plants.cpp content_mapnode_plants.cpp
content_mapnode_util.cpp content_mapnode_util.cpp
content_list.c content_list.c

View File

@ -1344,6 +1344,32 @@ void content_mapnode_init(bool repeat)
content_list_add("craftguide",i,1,0); content_list_add("craftguide",i,1,0);
content_list_add("creative",i,1,0); content_list_add("creative",i,1,0);
i = CONTENT_APPLEWOOD;
f = &content_features(i);
f->description = gettext("Apple Wood");
f->setAllTextures("applewood.png");
f->setInventoryTextureCube("applewood.png", "applewood.png", "applewood.png");
f->draw_type = CDT_CUBELIKE;
f->is_ground_content = true;
f->dug_item = std::string("MaterialItem2 ")+itos(i)+" 1";
f->flammable = 1; // can be replaced by fire if the node under it is set on fire
f->fuel_time = 30/4;
f->type = CMT_WOOD;
f->hardness = 0.75;
crafting::set1To4Recipe(CONTENT_TREE,CONTENT_WOOD);
crafting::set1To4Recipe(CONTENT_APPLE_TREE,CONTENT_WOOD);
//crafting::setSoftBlockRecipe(CONTENT_CRAFTITEM_WOOD_PLANK,CONTENT_WOOD);
//{
//u16 r[9] = {
//CONTENT_CRAFTITEM_WOOD_PLANK, CONTENT_IGNORE, CONTENT_CRAFTITEM_WOOD_PLANK,
//CONTENT_IGNORE, CONTENT_IGNORE, CONTENT_IGNORE,
//CONTENT_CRAFTITEM_WOOD_PLANK, CONTENT_IGNORE, CONTENT_CRAFTITEM_WOOD_PLANK
//};
//crafting::setRecipe(r,CONTENT_APPLEWOOD,1);
//}
content_list_add("craftguide",i,1,0);
content_list_add("creative",i,1,0);
i = CONTENT_JUNGLEWOOD; i = CONTENT_JUNGLEWOOD;
f = &content_features(i); f = &content_features(i);
f->description = gettext("Jungle Wood"); f->description = gettext("Jungle Wood");

View File

@ -36,6 +36,7 @@ void content_mapnode_door(bool repeat);
void content_mapnode_stair(bool repeat); void content_mapnode_stair(bool repeat);
void content_mapnode_slab(bool repeat); void content_mapnode_slab(bool repeat);
void content_mapnode_special(bool repeat); void content_mapnode_special(bool repeat);
void content_mapnode_sign(bool repeat);
void content_mapnode_plants(bool repeat); void content_mapnode_plants(bool repeat);
MapNode mapnode_translate_from_internal(MapNode n_from, u8 version); MapNode mapnode_translate_from_internal(MapNode n_from, u8 version);
@ -99,7 +100,20 @@ MapNode mapnode_translate_to_internal(MapNode n_from, u8 version);
#define CONTENT_CHEST 0x02F #define CONTENT_CHEST 0x02F
#define CONTENT_CHEST_PINE 0x030 #define CONTENT_CHEST_PINE 0x030
#define CONTENT_CHEST_JUNGLE 0x031 #define CONTENT_CHEST_JUNGLE 0x031
// FREE 0x032-0x03F #define CONTENT_CHEST_APPLE 0x032
#define CONTENT_SIGN_JUNGLE 0x033
#define CONTENT_SIGN_APPLE 0x034
#define CONTENT_SIGN_PINE 0x035
#define CONTENT_SIGN_STEEL 0x036
#define CONTENT_SIGN_WALL_JUNGLE 0x037
#define CONTENT_SIGN_WALL_APPLE 0x038
#define CONTENT_SIGN_WALL_PINE 0x039
#define CONTENT_SIGN_WALL_STEEL 0x03A
#define CONTENT_SIGN_UD_JUNGLE 0x03B
#define CONTENT_SIGN_UD_APPLE 0x03C
#define CONTENT_SIGN_UD_PINE 0x03D
#define CONTENT_SIGN_UD_STEEL 0x03E
#define CONTENT_APPLE_FENCE 0x03F
#define CONTENT_BUSH_BLUEBERRY 0x040 #define CONTENT_BUSH_BLUEBERRY 0x040
#define CONTENT_BUSH_RASPBERRY 0x041 #define CONTENT_BUSH_RASPBERRY 0x041
// FREE 0x042-0x07C // FREE 0x042-0x07C
@ -166,8 +180,8 @@ MapNode mapnode_translate_to_internal(MapNode n_from, u8 version);
#define CONTENT_ROUGHSTONE_COLUMN_CROSS 0x0BC #define CONTENT_ROUGHSTONE_COLUMN_CROSS 0x0BC
#define CONTENT_ROUGHSTONE_COLUMN_CROSS_BASE 0x0BD #define CONTENT_ROUGHSTONE_COLUMN_CROSS_BASE 0x0BD
#define CONTENT_ROUGHSTONE_COLUMN_CROSS_TOP 0x0BE #define CONTENT_ROUGHSTONE_COLUMN_CROSS_TOP 0x0BE
// FREE 0x0BF-0x7F6 // FREE 0x0BF-0x7F5
#define CONTENT_APPLEWOOD 0x7F6
#define CONTENT_LEAVES_SNOWY 0x7F7 #define CONTENT_LEAVES_SNOWY 0x7F7
#define CONTENT_TRIMMED_LEAVES_AUTUMN 0x7F8 #define CONTENT_TRIMMED_LEAVES_AUTUMN 0x7F8
#define CONTENT_TRIMMED_LEAVES_WINTER 0x7F9 #define CONTENT_TRIMMED_LEAVES_WINTER 0x7F9
@ -220,8 +234,8 @@ MapNode mapnode_translate_to_internal(MapNode n_from, u8 version);
#define CONTENT_CLOCK 0x830 #define CONTENT_CLOCK 0x830
#define CONTENT_BOOKSHELF_PINE 0x831 #define CONTENT_BOOKSHELF_PINE 0x831
#define CONTENT_BOOKSHELF_JUNGLE 0x832 #define CONTENT_BOOKSHELF_JUNGLE 0x832
// FREE 931-835 #define CONTENT_BOOKSHELF_APPLE 0x833
// FREE 834-835
#define CONTENT_COUCH_CENTRE 0x836 #define CONTENT_COUCH_CENTRE 0x836
#define CONTENT_COUCH_ENDL 0x837 #define CONTENT_COUCH_ENDL 0x837
#define CONTENT_COUCH_ENDR 0x838 #define CONTENT_COUCH_ENDR 0x838

View File

@ -1286,10 +1286,8 @@ void content_mapnode_door(bool repeat)
f = &content_features(i); f = &content_features(i);
f->param2_type = CPT_FACEDIR_SIMPLE; f->param2_type = CPT_FACEDIR_SIMPLE;
f->description = gettext("Wood Gate"); f->description = gettext("Wood Gate");
f->setAllTextures("gate_wood.png"); f->setAllTextures("wood.png");
f->rotate_tile_with_nodebox = true; f->rotate_tile_with_nodebox = true;
f->setInventoryTexture("gate_wood_inv.png");
f->wield_nodebox = false;
f->air_equivalent = true; f->air_equivalent = true;
f->param_type = CPT_LIGHT; f->param_type = CPT_LIGHT;
f->light_propagates = true; f->light_propagates = true;
@ -1302,6 +1300,7 @@ void content_mapnode_door(bool repeat)
f->flammable = 1; // can be replaced by fire if the node under it is set on fire f->flammable = 1; // can be replaced by fire if the node under it is set on fire
f->fuel_time = 30; f->fuel_time = 30;
content_nodebox_gate(f); content_nodebox_gate(f);
f->setInventoryTextureNodeBox(i,"wood.png","wood.png","wood.png");
f->type = CMT_WOOD; f->type = CMT_WOOD;
f->hardness = 0.75; f->hardness = 0.75;
f->pressure_type = CST_SOLID; f->pressure_type = CST_SOLID;
@ -1461,7 +1460,6 @@ void content_mapnode_door(bool repeat)
f->description = gettext("Wood Gate"); f->description = gettext("Wood Gate");
f->setAllTextures("wood.png"); f->setAllTextures("wood.png");
f->rotate_tile_with_nodebox = true; f->rotate_tile_with_nodebox = true;
f->setInventoryTexture("gate_wood_inv.png");
f->wield_nodebox = false; f->wield_nodebox = false;
f->param_type = CPT_LIGHT; f->param_type = CPT_LIGHT;
f->light_propagates = true; f->light_propagates = true;

View File

@ -34,11 +34,7 @@ void content_mapnode_furniture(bool repeat)
i = CONTENT_BOOKSHELF; i = CONTENT_BOOKSHELF;
f = &content_features(i); f = &content_features(i);
f->description = gettext("Book Shelf"); f->description = gettext("Book Shelf");
f->setAllTextures("bookshelf_front.png"); f->setAllTextures("wood.png");
f->setTexture(0, "bookshelf_top.png");
f->setTexture(1, "bookshelf_top.png");
f->setTexture(2, "bookshelf_side.png");
f->setTexture(3, "bookshelf_side.png");
f->setAllMetaTextures("bookshelf_book.png"); f->setAllMetaTextures("bookshelf_book.png");
f->setMetaTexture(0, "bookshelf_book_top.png"); f->setMetaTexture(0, "bookshelf_book_top.png");
f->rotate_tile_with_nodebox = true; f->rotate_tile_with_nodebox = true;
@ -52,7 +48,7 @@ void content_mapnode_furniture(bool repeat)
f->type = CMT_WOOD; f->type = CMT_WOOD;
f->hardness = 0.75; f->hardness = 0.75;
content_nodebox_bookshelf(f); content_nodebox_bookshelf(f);
f->setInventoryTextureNodeBox(i,"bookshelf_top.png", "bookshelf_front.png", "bookshelf_side.png"); f->setInventoryTextureNodeBox(i,"wood.png", "wood.png", "wood.png");
if (f->initial_metadata == NULL) if (f->initial_metadata == NULL)
f->initial_metadata = new BookShelfNodeMetadata(); f->initial_metadata = new BookShelfNodeMetadata();
{ {
@ -71,11 +67,7 @@ void content_mapnode_furniture(bool repeat)
i = CONTENT_BOOKSHELF_JUNGLE; i = CONTENT_BOOKSHELF_JUNGLE;
f = &content_features(i); f = &content_features(i);
f->description = gettext("Junglewood Book Shelf"); f->description = gettext("Junglewood Book Shelf");
f->setAllTextures("bookshelf_jungle_front.png"); f->setAllTextures("junglewood.png");
f->setTexture(0, "bookshelf_jungle_top.png");
f->setTexture(1, "bookshelf_jungle_top.png");
f->setTexture(2, "bookshelf_jungle_side.png");
f->setTexture(3, "bookshelf_jungle_side.png");
f->setAllMetaTextures("bookshelf_book.png"); f->setAllMetaTextures("bookshelf_book.png");
f->setMetaTexture(0, "bookshelf_book_top.png"); f->setMetaTexture(0, "bookshelf_book_top.png");
f->rotate_tile_with_nodebox = true; f->rotate_tile_with_nodebox = true;
@ -89,7 +81,7 @@ void content_mapnode_furniture(bool repeat)
f->type = CMT_WOOD; f->type = CMT_WOOD;
f->hardness = 0.75; f->hardness = 0.75;
content_nodebox_bookshelf(f); content_nodebox_bookshelf(f);
f->setInventoryTextureNodeBox(i,"bookshelf_jungle_top.png", "bookshelf_jungle_front.png", "bookshelf_jungle_side.png"); f->setInventoryTextureNodeBox(i,"junglewood.png", "junglewood.png", "junglewood.png");
if (f->initial_metadata == NULL) if (f->initial_metadata == NULL)
f->initial_metadata = new BookShelfNodeMetadata(); f->initial_metadata = new BookShelfNodeMetadata();
{ {
@ -108,11 +100,7 @@ void content_mapnode_furniture(bool repeat)
i = CONTENT_BOOKSHELF_PINE; i = CONTENT_BOOKSHELF_PINE;
f = &content_features(i); f = &content_features(i);
f->description = gettext("Pine Book Shelf"); f->description = gettext("Pine Book Shelf");
f->setAllTextures("bookshelf_pine_front.png"); f->setAllTextures("pine.png");
f->setTexture(0, "bookshelf_pine_top.png");
f->setTexture(1, "bookshelf_pine_top.png");
f->setTexture(2, "bookshelf_pine_side.png");
f->setTexture(3, "bookshelf_pine_side.png");
f->setAllMetaTextures("bookshelf_book.png"); f->setAllMetaTextures("bookshelf_book.png");
f->setMetaTexture(0, "bookshelf_book_top.png"); f->setMetaTexture(0, "bookshelf_book_top.png");
f->rotate_tile_with_nodebox = true; f->rotate_tile_with_nodebox = true;
@ -126,7 +114,7 @@ void content_mapnode_furniture(bool repeat)
f->type = CMT_WOOD; f->type = CMT_WOOD;
f->hardness = 0.75; f->hardness = 0.75;
content_nodebox_bookshelf(f); content_nodebox_bookshelf(f);
f->setInventoryTextureNodeBox(i,"bookshelf_pine_top.png", "bookshelf_pine_front.png", "bookshelf_pine_side.png"); f->setInventoryTextureNodeBox(i,"pine.png", "pine.png", "pine.png");
if (f->initial_metadata == NULL) if (f->initial_metadata == NULL)
f->initial_metadata = new BookShelfNodeMetadata(); f->initial_metadata = new BookShelfNodeMetadata();
{ {
@ -142,6 +130,39 @@ void content_mapnode_furniture(bool repeat)
content_list_add("creative",i,1,0); content_list_add("creative",i,1,0);
f->suffocation_per_second = 0; f->suffocation_per_second = 0;
i = CONTENT_BOOKSHELF_APPLE;
f = &content_features(i);
f->description = gettext("Applewood Book Shelf");
f->setAllTextures("applewood.png");
f->setAllMetaTextures("bookshelf_book.png");
f->setMetaTexture(0, "bookshelf_book_top.png");
f->rotate_tile_with_nodebox = true;
//f->setInventoryTextureCube("wood.png", "bookshelf.png", "bookshelf.png");
f->draw_type = CDT_NODEBOX_META;
f->param_type = CPT_FACEDIR_SIMPLE;
f->is_ground_content = true;
f->dug_item = std::string("MaterialItem2 ")+itos(i)+" 1";
f->flammable = 1; // can be replaced by fire if the node under it is set on fire
f->fuel_time = 30/4;
f->type = CMT_WOOD;
f->hardness = 0.75;
content_nodebox_bookshelf(f);
f->setInventoryTextureNodeBox(i,"applewood.png", "applewood.png", "applewood.png");
if (f->initial_metadata == NULL)
f->initial_metadata = new BookShelfNodeMetadata();
{
u16 r[9] = {
CONTENT_APPLEWOOD, CONTENT_APPLEWOOD, CONTENT_APPLEWOOD,
CONTENT_IGNORE, CONTENT_IGNORE, CONTENT_IGNORE,
CONTENT_APPLEWOOD, CONTENT_APPLEWOOD, CONTENT_APPLEWOOD
};
crafting::setRecipe(r,CONTENT_BOOKSHELF_APPLE,1);
}
f->pressure_type = CST_SOLID;
content_list_add("craftguide",i,1,0);
content_list_add("creative",i,1,0);
f->suffocation_per_second = 0;
i = CONTENT_COUCH_CENTRE; i = CONTENT_COUCH_CENTRE;
f = &content_features(i); f = &content_features(i);
f->description = gettext("Couch"); f->description = gettext("Couch");

View File

@ -0,0 +1,509 @@
/************************************************************************
* Minetest-c55
* Copyright (C) 2010 celeron55, Perttu Ahola <celeron55@gmail.com>
*
* content_mapnode_special.cpp
* Copyright (C) Lisa 'darkrose' Milne 2014 <lisa@ltmnet.com>
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
* See the GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>
************************************************************************/
#include "content_mapnode.h"
#include "content_nodebox.h"
#include "content_list.h"
#include "content_craft.h"
#include "content_nodemeta.h"
#include "player.h"
#include "intl.h"
void content_mapnode_sign(bool repeat)
{
content_t i;
ContentFeatures *f = NULL;
i = CONTENT_SIGN;
f = &content_features(i);
f->description = gettext("Sign");
f->setAllTextures("wood.png");
f->param_type = CPT_LIGHT;
f->light_propagates = true;
f->sunlight_propagates = true;
f->air_equivalent = true;
f->wallmount_alternate_node = CONTENT_SIGN_WALL;
f->roofmount_alternate_node = CONTENT_SIGN_UD;
f->param2_type = CPT_FACEDIR_SIMPLE;
f->draw_type = CDT_NODEBOX;
f->flammable = 1; // can be replaced by fire if the node under it is set on fire
f->fuel_time = 1;
f->dug_item = std::string("MaterialItem2 ")+itos(i)+" 1";
if(f->initial_metadata == NULL)
f->initial_metadata = new SignNodeMetadata("Some sign");
f->type = CMT_WOOD;
f->hardness = 0.1;
f->pressure_type = CST_CRUSHABLE;
f->suffocation_per_second = 0;
f->alternate_lockstate_node = CONTENT_LOCKABLE_SIGN;
content_nodebox_sign(f);
f->setFaceText(5,FaceText(0.05,0.0675,0.95,0.55));
f->setInventoryTextureNodeBox(i,"wood.png", "wood.png", "wood.png");
crafting::setSignRecipe(CONTENT_CRAFTITEM_WOOD_PLANK,CONTENT_SIGN);
content_list_add("craftguide",i,1,0);
content_list_add("creative",i,1,0);
i = CONTENT_SIGN_WALL;
f = &content_features(i);
f->description = gettext("Sign");
f->setAllTextures("wood.png");
f->param_type = CPT_LIGHT;
f->param2_type = CPT_FACEDIR_WALLMOUNT;
f->draw_type = CDT_NODEBOX;
f->light_propagates = true;
f->sunlight_propagates = true;
f->floormount_alternate_node = CONTENT_SIGN;
f->roofmount_alternate_node = CONTENT_SIGN_UD;
f->walkable = false;
f->air_equivalent = true;
f->flammable = 1; // can be replaced by fire if the node under it is set on fire
f->fuel_time = 1;
f->dug_item = std::string("MaterialItem2 ")+itos(CONTENT_SIGN)+" 1";
if(f->initial_metadata == NULL)
f->initial_metadata = new SignNodeMetadata("Some sign");
f->type = CMT_WOOD;
f->hardness = 0.1;
f->pressure_type = CST_CRUSHABLE;
f->suffocation_per_second = 0;
f->alternate_lockstate_node = CONTENT_LOCKABLE_SIGN_WALL;
content_nodebox_sign_wall(f);
f->setFaceText(5,FaceText(0.05,0.3,0.95,0.7));
i = CONTENT_SIGN_UD;
f = &content_features(i);
f->description = gettext("Sign");
f->setAllTextures("wood.png");
f->param_type = CPT_LIGHT;
f->light_propagates = true;
f->sunlight_propagates = true;
f->air_equivalent = true;
f->wallmount_alternate_node = CONTENT_SIGN_WALL;
f->floormount_alternate_node = CONTENT_SIGN;
f->param2_type = CPT_FACEDIR_SIMPLE;
f->draw_type = CDT_NODEBOX;
f->flammable = 1; // can be replaced by fire if the node under it is set on fire
f->fuel_time = 1;
f->dug_item = std::string("MaterialItem2 ")+itos(CONTENT_SIGN)+" 1";
if(f->initial_metadata == NULL)
f->initial_metadata = new SignNodeMetadata("Some sign");
f->type = CMT_WOOD;
f->hardness = 0.1;
f->pressure_type = CST_CRUSHABLE;
f->suffocation_per_second = 0;
f->alternate_lockstate_node = CONTENT_LOCKABLE_SIGN_UD;
content_nodebox_sign_ud(f);
f->setFaceText(5,FaceText(0.05,0.45,0.95,0.8875));
i = CONTENT_SIGN_APPLE;
f = &content_features(i);
f->description = gettext("Sign");
f->setAllTextures("applewood.png");
f->param_type = CPT_LIGHT;
f->light_propagates = true;
f->sunlight_propagates = true;
f->air_equivalent = true;
f->wallmount_alternate_node = CONTENT_SIGN_WALL_APPLE;
f->roofmount_alternate_node = CONTENT_SIGN_UD_APPLE;
f->param2_type = CPT_FACEDIR_SIMPLE;
f->draw_type = CDT_NODEBOX;
f->flammable = 1; // can be replaced by fire if the node under it is set on fire
f->fuel_time = 1;
f->dug_item = std::string("MaterialItem2 ")+itos(i)+" 1";
if(f->initial_metadata == NULL)
f->initial_metadata = new SignNodeMetadata("Some sign");
f->type = CMT_WOOD;
f->hardness = 0.1;
f->pressure_type = CST_CRUSHABLE;
f->suffocation_per_second = 0;
content_nodebox_sign(f);
f->setFaceText(5,FaceText(0.05,0.0675,0.95,0.55));
f->setInventoryTextureNodeBox(i,"applewood.png", "applewood.png", "applewood.png");
/* TODO: apple planks
crafting::setSignRecipe(CONTENT_CRAFTITEM_WOOD_PLANK,CONTENT_SIGN);*/
content_list_add("craftguide",i,1,0);
content_list_add("creative",i,1,0);
i = CONTENT_SIGN_WALL_APPLE;
f = &content_features(i);
f->description = gettext("Sign");
f->setAllTextures("applewood.png");
f->param_type = CPT_LIGHT;
f->param2_type = CPT_FACEDIR_WALLMOUNT;
f->draw_type = CDT_NODEBOX;
f->light_propagates = true;
f->sunlight_propagates = true;
f->floormount_alternate_node = CONTENT_SIGN_APPLE;
f->roofmount_alternate_node = CONTENT_SIGN_UD_APPLE;
f->walkable = false;
f->air_equivalent = true;
f->flammable = 1; // can be replaced by fire if the node under it is set on fire
f->fuel_time = 1;
f->dug_item = std::string("MaterialItem2 ")+itos(CONTENT_SIGN_APPLE)+" 1";
if(f->initial_metadata == NULL)
f->initial_metadata = new SignNodeMetadata("Some sign");
f->type = CMT_WOOD;
f->hardness = 0.1;
f->pressure_type = CST_CRUSHABLE;
f->suffocation_per_second = 0;
content_nodebox_sign_wall(f);
f->setFaceText(5,FaceText(0.05,0.3,0.95,0.7));
i = CONTENT_SIGN_UD_APPLE;
f = &content_features(i);
f->description = gettext("Sign");
f->setAllTextures("applewood.png");
f->param_type = CPT_LIGHT;
f->light_propagates = true;
f->sunlight_propagates = true;
f->air_equivalent = true;
f->wallmount_alternate_node = CONTENT_SIGN_WALL_APPLE;
f->floormount_alternate_node = CONTENT_SIGN_APPLE;
f->param2_type = CPT_FACEDIR_SIMPLE;
f->draw_type = CDT_NODEBOX;
f->flammable = 1; // can be replaced by fire if the node under it is set on fire
f->fuel_time = 1;
f->dug_item = std::string("MaterialItem2 ")+itos(CONTENT_SIGN_APPLE)+" 1";
if(f->initial_metadata == NULL)
f->initial_metadata = new SignNodeMetadata("Some sign");
f->type = CMT_WOOD;
f->hardness = 0.1;
f->pressure_type = CST_CRUSHABLE;
f->suffocation_per_second = 0;
content_nodebox_sign_ud(f);
f->setFaceText(5,FaceText(0.05,0.45,0.95,0.8875));
i = CONTENT_SIGN_JUNGLE;
f = &content_features(i);
f->description = gettext("Sign");
f->setAllTextures("junglewood.png");
f->param_type = CPT_LIGHT;
f->light_propagates = true;
f->sunlight_propagates = true;
f->air_equivalent = true;
f->wallmount_alternate_node = CONTENT_SIGN_WALL_JUNGLE;
f->roofmount_alternate_node = CONTENT_SIGN_UD_JUNGLE;
f->param2_type = CPT_FACEDIR_SIMPLE;
f->draw_type = CDT_NODEBOX;
f->flammable = 1; // can be replaced by fire if the node under it is set on fire
f->fuel_time = 1;
f->dug_item = std::string("MaterialItem2 ")+itos(i)+" 1";
if(f->initial_metadata == NULL)
f->initial_metadata = new SignNodeMetadata("Some sign");
f->type = CMT_WOOD;
f->hardness = 0.1;
f->pressure_type = CST_CRUSHABLE;
f->suffocation_per_second = 0;
content_nodebox_sign(f);
f->setFaceText(5,FaceText(0.05,0.0675,0.95,0.55));
f->setInventoryTextureNodeBox(i,"junglewood.png", "junglewood.png", "junglewood.png");
crafting::setSignRecipe(CONTENT_CRAFTITEM_JUNGLE_PLANK,CONTENT_SIGN_JUNGLE);
content_list_add("craftguide",i,1,0);
content_list_add("creative",i,1,0);
i = CONTENT_SIGN_WALL_JUNGLE;
f = &content_features(i);
f->description = gettext("Sign");
f->setAllTextures("junglewood.png");
f->param_type = CPT_LIGHT;
f->param2_type = CPT_FACEDIR_WALLMOUNT;
f->draw_type = CDT_NODEBOX;
f->light_propagates = true;
f->sunlight_propagates = true;
f->floormount_alternate_node = CONTENT_SIGN_JUNGLE;
f->roofmount_alternate_node = CONTENT_SIGN_UD_JUNGLE;
f->walkable = false;
f->air_equivalent = true;
f->flammable = 1; // can be replaced by fire if the node under it is set on fire
f->fuel_time = 1;
f->dug_item = std::string("MaterialItem2 ")+itos(CONTENT_SIGN_JUNGLE)+" 1";
if(f->initial_metadata == NULL)
f->initial_metadata = new SignNodeMetadata("Some sign");
f->type = CMT_WOOD;
f->hardness = 0.1;
f->pressure_type = CST_CRUSHABLE;
f->suffocation_per_second = 0;
content_nodebox_sign_wall(f);
f->setFaceText(5,FaceText(0.05,0.3,0.95,0.7));
i = CONTENT_SIGN_UD_JUNGLE;
f = &content_features(i);
f->description = gettext("Sign");
f->setAllTextures("junglewood.png");
f->param_type = CPT_LIGHT;
f->light_propagates = true;
f->sunlight_propagates = true;
f->air_equivalent = true;
f->wallmount_alternate_node = CONTENT_SIGN_WALL_JUNGLE;
f->floormount_alternate_node = CONTENT_SIGN_JUNGLE;
f->param2_type = CPT_FACEDIR_SIMPLE;
f->draw_type = CDT_NODEBOX;
f->flammable = 1; // can be replaced by fire if the node under it is set on fire
f->fuel_time = 1;
f->dug_item = std::string("MaterialItem2 ")+itos(CONTENT_SIGN_JUNGLE)+" 1";
if(f->initial_metadata == NULL)
f->initial_metadata = new SignNodeMetadata("Some sign");
f->type = CMT_WOOD;
f->hardness = 0.1;
f->pressure_type = CST_CRUSHABLE;
f->suffocation_per_second = 0;
content_nodebox_sign_ud(f);
f->setFaceText(5,FaceText(0.05,0.45,0.95,0.8875));
i = CONTENT_SIGN_PINE;
f = &content_features(i);
f->description = gettext("Sign");
f->setAllTextures("pine.png");
f->param_type = CPT_LIGHT;
f->light_propagates = true;
f->sunlight_propagates = true;
f->air_equivalent = true;
f->wallmount_alternate_node = CONTENT_SIGN_WALL_PINE;
f->roofmount_alternate_node = CONTENT_SIGN_UD_PINE;
f->param2_type = CPT_FACEDIR_SIMPLE;
f->draw_type = CDT_NODEBOX;
f->flammable = 1; // can be replaced by fire if the node under it is set on fire
f->fuel_time = 1;
f->dug_item = std::string("MaterialItem2 ")+itos(i)+" 1";
if(f->initial_metadata == NULL)
f->initial_metadata = new SignNodeMetadata("Some sign");
f->type = CMT_WOOD;
f->hardness = 0.1;
f->pressure_type = CST_CRUSHABLE;
f->suffocation_per_second = 0;
content_nodebox_sign(f);
f->setFaceText(5,FaceText(0.05,0.0675,0.95,0.55));
f->setInventoryTextureNodeBox(i,"pine.png", "pine.png", "pine.png");
crafting::setSignRecipe(CONTENT_CRAFTITEM_PINE_PLANK,CONTENT_SIGN_PINE);
content_list_add("craftguide",i,1,0);
content_list_add("creative",i,1,0);
i = CONTENT_SIGN_WALL_PINE;
f = &content_features(i);
f->description = gettext("Sign");
f->setAllTextures("pine.png");
f->param_type = CPT_LIGHT;
f->param2_type = CPT_FACEDIR_WALLMOUNT;
f->draw_type = CDT_NODEBOX;
f->light_propagates = true;
f->sunlight_propagates = true;
f->floormount_alternate_node = CONTENT_SIGN_PINE;
f->roofmount_alternate_node = CONTENT_SIGN_UD_PINE;
f->walkable = false;
f->air_equivalent = true;
f->flammable = 1; // can be replaced by fire if the node under it is set on fire
f->fuel_time = 1;
f->dug_item = std::string("MaterialItem2 ")+itos(CONTENT_SIGN_PINE)+" 1";
if(f->initial_metadata == NULL)
f->initial_metadata = new SignNodeMetadata("Some sign");
f->type = CMT_WOOD;
f->hardness = 0.1;
f->pressure_type = CST_CRUSHABLE;
f->suffocation_per_second = 0;
content_nodebox_sign_wall(f);
f->setFaceText(5,FaceText(0.05,0.3,0.95,0.7));
i = CONTENT_SIGN_UD_PINE;
f = &content_features(i);
f->description = gettext("Sign");
f->setAllTextures("pine.png");
f->param_type = CPT_LIGHT;
f->light_propagates = true;
f->sunlight_propagates = true;
f->air_equivalent = true;
f->wallmount_alternate_node = CONTENT_SIGN_WALL_PINE;
f->floormount_alternate_node = CONTENT_SIGN_PINE;
f->param2_type = CPT_FACEDIR_SIMPLE;
f->draw_type = CDT_NODEBOX;
f->flammable = 1; // can be replaced by fire if the node under it is set on fire
f->fuel_time = 1;
f->dug_item = std::string("MaterialItem2 ")+itos(CONTENT_SIGN_PINE)+" 1";
if(f->initial_metadata == NULL)
f->initial_metadata = new SignNodeMetadata("Some sign");
f->type = CMT_WOOD;
f->hardness = 0.1;
f->pressure_type = CST_CRUSHABLE;
f->suffocation_per_second = 0;
content_nodebox_sign_ud(f);
f->setFaceText(5,FaceText(0.05,0.45,0.95,0.8875));
i = CONTENT_SIGN_STEEL;
f = &content_features(i);
f->description = gettext("Sign");
f->setAllTextures("steel_block.png");
f->param_type = CPT_LIGHT;
f->light_propagates = true;
f->sunlight_propagates = true;
f->air_equivalent = true;
f->wallmount_alternate_node = CONTENT_SIGN_WALL_STEEL;
f->roofmount_alternate_node = CONTENT_SIGN_UD_STEEL;
f->param2_type = CPT_FACEDIR_SIMPLE;
f->draw_type = CDT_NODEBOX;
f->flammable = 1; // can be replaced by fire if the node under it is set on fire
f->fuel_time = 1;
f->dug_item = std::string("MaterialItem2 ")+itos(i)+" 1";
if(f->initial_metadata == NULL)
f->initial_metadata = new SignNodeMetadata("Some sign");
f->type = CMT_STONE;
f->hardness = 0.1;
f->pressure_type = CST_CRUSHABLE;
f->suffocation_per_second = 0;
content_nodebox_sign(f);
f->setFaceText(5,FaceText(0.05,0.0675,0.95,0.55));
f->setInventoryTextureNodeBox(i,"steel_block.png", "steel_block.png", "steel_block.png");
crafting::setSignRecipe(CONTENT_CRAFTITEM_STEEL_INGOT,CONTENT_SIGN_STEEL);
content_list_add("craftguide",i,1,0);
content_list_add("creative",i,1,0);
i = CONTENT_SIGN_WALL_STEEL;
f = &content_features(i);
f->description = gettext("Sign");
f->setAllTextures("steel_block.png");
f->param_type = CPT_LIGHT;
f->param2_type = CPT_FACEDIR_WALLMOUNT;
f->draw_type = CDT_NODEBOX;
f->light_propagates = true;
f->sunlight_propagates = true;
f->floormount_alternate_node = CONTENT_SIGN_STEEL;
f->roofmount_alternate_node = CONTENT_SIGN_UD_STEEL;
f->walkable = false;
f->air_equivalent = true;
f->flammable = 1; // can be replaced by fire if the node under it is set on fire
f->fuel_time = 1;
f->dug_item = std::string("MaterialItem2 ")+itos(CONTENT_SIGN_STEEL)+" 1";
if(f->initial_metadata == NULL)
f->initial_metadata = new SignNodeMetadata("Some sign");
f->type = CMT_STONE;
f->hardness = 0.1;
f->pressure_type = CST_CRUSHABLE;
f->suffocation_per_second = 0;
content_nodebox_sign_wall(f);
f->setFaceText(5,FaceText(0.05,0.3,0.95,0.7));
i = CONTENT_SIGN_UD_STEEL;
f = &content_features(i);
f->description = gettext("Sign");
f->setAllTextures("steel_block.png");
f->param_type = CPT_LIGHT;
f->light_propagates = true;
f->sunlight_propagates = true;
f->air_equivalent = true;
f->wallmount_alternate_node = CONTENT_SIGN_WALL_STEEL;
f->floormount_alternate_node = CONTENT_SIGN_STEEL;
f->param2_type = CPT_FACEDIR_SIMPLE;
f->draw_type = CDT_NODEBOX;
f->flammable = 1; // can be replaced by fire if the node under it is set on fire
f->fuel_time = 1;
f->dug_item = std::string("MaterialItem2 ")+itos(CONTENT_SIGN_STEEL)+" 1";
if(f->initial_metadata == NULL)
f->initial_metadata = new SignNodeMetadata("Some sign");
f->type = CMT_STONE;
f->hardness = 0.1;
f->pressure_type = CST_CRUSHABLE;
f->suffocation_per_second = 0;
content_nodebox_sign_ud(f);
f->setFaceText(5,FaceText(0.05,0.45,0.95,0.8875));
/* TODO: deprecate */
i = CONTENT_LOCKABLE_SIGN_WALL;
f = &content_features(i);
f->description = gettext("Locking Sign");
f->setAllTextures("wood.png");
f->param_type = CPT_LIGHT;
f->param2_type = CPT_FACEDIR_WALLMOUNT;
f->draw_type = CDT_NODEBOX;
f->light_propagates = true;
f->sunlight_propagates = true;
f->air_equivalent = true;
f->floormount_alternate_node = CONTENT_LOCKABLE_SIGN;
f->roofmount_alternate_node = CONTENT_LOCKABLE_SIGN_UD;
f->walkable = false;
f->air_equivalent = true;
f->flammable = 1; // can be replaced by fire if the node under it is set on fire
f->fuel_time = 1;
f->dug_item = std::string("MaterialItem2 ")+itos(CONTENT_LOCKABLE_SIGN)+" 1";
if(f->initial_metadata == NULL)
f->initial_metadata = new LockingSignNodeMetadata("Some sign");
f->type = CMT_WOOD;
f->hardness = 0.1;
f->pressure_type = CST_CRUSHABLE;
f->suffocation_per_second = 0;
f->alternate_lockstate_node = CONTENT_SIGN_WALL;
content_nodebox_sign_wall(f);
f->setFaceText(4,FaceText(0.05,0.3,0.95,0.7,FTT_OWNER));
f->setFaceText(5,FaceText(0.05,0.3,0.95,0.7));
i = CONTENT_LOCKABLE_SIGN;
f = &content_features(i);
f->description = gettext("Locking Sign");
f->setAllTextures("wood.png");
f->param_type = CPT_LIGHT;
f->light_propagates = true;
f->sunlight_propagates = true;
f->air_equivalent = true;
f->wallmount_alternate_node = CONTENT_LOCKABLE_SIGN_WALL;
f->roofmount_alternate_node = CONTENT_LOCKABLE_SIGN_UD;
f->param2_type = CPT_FACEDIR_SIMPLE;
f->draw_type = CDT_NODEBOX;
f->flammable = 1; // can be replaced by fire if the node under it is set on fire
f->fuel_time = 1;
f->dug_item = std::string("MaterialItem2 ")+itos(i)+" 1";
if(f->initial_metadata == NULL)
f->initial_metadata = new LockingSignNodeMetadata("Some sign");
f->type = CMT_WOOD;
f->hardness = 0.1;
f->pressure_type = CST_CRUSHABLE;
f->suffocation_per_second = 0;
f->alternate_lockstate_node = CONTENT_SIGN;
content_nodebox_sign(f);
f->setFaceText(4,FaceText(0.05,0.0675,0.95,0.55,FTT_OWNER));
f->setFaceText(5,FaceText(0.05,0.0675,0.95,0.55));
f->setInventoryTextureNodeBox(i,"wood.png", "wood.png", "wood.png");
crafting::set1Any2Recipe(CONTENT_SIGN,CONTENT_CRAFTITEM_STEEL_INGOT,CONTENT_LOCKABLE_SIGN);
content_list_add("craftguide",i,1,0);
content_list_add("creative",i,1,0);
i = CONTENT_LOCKABLE_SIGN_UD;
f = &content_features(i);
f->description = gettext("Locking Sign");
f->setAllTextures("wood.png");
f->param_type = CPT_LIGHT;
f->light_propagates = true;
f->sunlight_propagates = true;
f->air_equivalent = true;
f->wallmount_alternate_node = CONTENT_LOCKABLE_SIGN_WALL;
f->floormount_alternate_node = CONTENT_LOCKABLE_SIGN;
f->param2_type = CPT_FACEDIR_SIMPLE;
f->draw_type = CDT_NODEBOX;
f->flammable = 1; // can be replaced by fire if the node under it is set on fire
f->fuel_time = 1;
f->dug_item = std::string("MaterialItem2 ")+itos(CONTENT_LOCKABLE_SIGN)+" 1";
if(f->initial_metadata == NULL)
f->initial_metadata = new LockingSignNodeMetadata("Some sign");
f->type = CMT_WOOD;
f->hardness = 0.1;
f->pressure_type = CST_CRUSHABLE;
f->suffocation_per_second = 0;
f->alternate_lockstate_node = CONTENT_SIGN_UD;
content_nodebox_sign_ud(f);
f->setFaceText(4,FaceText(0.05,0.45,0.95,0.8875,FTT_OWNER));
f->setFaceText(5,FaceText(0.05,0.45,0.95,0.8875));
}

View File

@ -35,9 +35,7 @@ void content_mapnode_special(bool repeat)
i = CONTENT_FENCE; i = CONTENT_FENCE;
f = &content_features(i); f = &content_features(i);
f->description = gettext("Fence"); f->description = gettext("Fence");
f->setAllTextures("fence.png"); f->setAllTextures("wood.png");
f->setTexture(0,"fence_top.png");
f->setTexture(1,"fence_top.png");
f->light_propagates = true; f->light_propagates = true;
f->param_type = CPT_LIGHT; f->param_type = CPT_LIGHT;
f->param2_type = CPT_SPECIAL; f->param2_type = CPT_SPECIAL;
@ -55,7 +53,7 @@ void content_mapnode_special(bool repeat)
f->suffocation_per_second = 0; f->suffocation_per_second = 0;
content_nodebox_fence_inv(f); content_nodebox_fence_inv(f);
content_nodebox_fence(f); content_nodebox_fence(f);
f->setInventoryTextureNodeBox(i,"fence.png","fence_top.png","fence.png"); f->setInventoryTextureNodeBox(i,"wood.png","wood.png","wood.png");
crafting::setWallRecipe(CONTENT_CRAFTITEM_WOOD_PLANK,CONTENT_FENCE); crafting::setWallRecipe(CONTENT_CRAFTITEM_WOOD_PLANK,CONTENT_FENCE);
content_list_add("craftguide",i,1,0); content_list_add("craftguide",i,1,0);
content_list_add("creative",i,1,0); content_list_add("creative",i,1,0);
@ -90,9 +88,7 @@ void content_mapnode_special(bool repeat)
i = CONTENT_JUNGLE_FENCE; i = CONTENT_JUNGLE_FENCE;
f = &content_features(i); f = &content_features(i);
f->description = gettext("Jungle Wood Fence"); f->description = gettext("Jungle Wood Fence");
f->setAllTextures("fence_jungle.png"); f->setAllTextures("junglewood.png");
f->setTexture(0,"fence_jungle_top.png");
f->setTexture(1,"fence_jungle_top.png");
f->light_propagates = true; f->light_propagates = true;
f->param_type = CPT_LIGHT; f->param_type = CPT_LIGHT;
f->param2_type = CPT_SPECIAL; f->param2_type = CPT_SPECIAL;
@ -110,7 +106,7 @@ void content_mapnode_special(bool repeat)
f->suffocation_per_second = 0; f->suffocation_per_second = 0;
content_nodebox_fence_inv(f); content_nodebox_fence_inv(f);
content_nodebox_fence(f); content_nodebox_fence(f);
f->setInventoryTextureNodeBox(i,"fence_jungle.png","fence_jungle_top.png","fence_jungle.png"); f->setInventoryTextureNodeBox(i,"junglewood.png","junglewood.png","junglewood.png");
crafting::setWallRecipe(CONTENT_CRAFTITEM_JUNGLE_PLANK,CONTENT_JUNGLE_FENCE); crafting::setWallRecipe(CONTENT_CRAFTITEM_JUNGLE_PLANK,CONTENT_JUNGLE_FENCE);
content_list_add("craftguide",i,1,0); content_list_add("craftguide",i,1,0);
content_list_add("creative",i,1,0); content_list_add("creative",i,1,0);
@ -118,9 +114,7 @@ void content_mapnode_special(bool repeat)
i = CONTENT_PINE_FENCE; i = CONTENT_PINE_FENCE;
f = &content_features(i); f = &content_features(i);
f->description = gettext("Pine Fence"); f->description = gettext("Pine Fence");
f->setAllTextures("fence_pine.png"); f->setAllTextures("pine.png");
f->setTexture(0,"fence_pine_top.png");
f->setTexture(1,"fence_pine_top.png");
f->light_propagates = true; f->light_propagates = true;
f->param_type = CPT_LIGHT; f->param_type = CPT_LIGHT;
f->param2_type = CPT_SPECIAL; f->param2_type = CPT_SPECIAL;
@ -138,11 +132,38 @@ void content_mapnode_special(bool repeat)
f->suffocation_per_second = 0; f->suffocation_per_second = 0;
content_nodebox_fence_inv(f); content_nodebox_fence_inv(f);
content_nodebox_fence(f); content_nodebox_fence(f);
f->setInventoryTextureNodeBox(i,"fence_pine.png","fence_pine_top.png","fence_pine.png"); f->setInventoryTextureNodeBox(i,"pine.png","pine.png","pine.png");
crafting::setWallRecipe(CONTENT_CRAFTITEM_PINE_PLANK,CONTENT_PINE_FENCE); crafting::setWallRecipe(CONTENT_CRAFTITEM_PINE_PLANK,CONTENT_PINE_FENCE);
content_list_add("craftguide",i,1,0); content_list_add("craftguide",i,1,0);
content_list_add("creative",i,1,0); content_list_add("creative",i,1,0);
i = CONTENT_APPLE_FENCE;
f = &content_features(i);
f->description = gettext("Fence");
f->setAllTextures("applewood.png");
f->light_propagates = true;
f->param_type = CPT_LIGHT;
f->param2_type = CPT_SPECIAL;
f->draw_type = CDT_FENCELIKE;
f->is_ground_content = true;
f->jumpable = false;
f->dug_item = std::string("MaterialItem2 ")+itos(i)+" 1";
f->air_equivalent = true; // grass grows underneath
f->flammable = 1; // can be replaced by fire if the node under it is set on fire
f->fuel_time = 15;
f->special_alternate_node = CONTENT_APPLEWOOD;
f->type = CMT_WOOD;
f->hardness = 0.75;
f->pressure_type = CST_CRUSHABLE;
f->suffocation_per_second = 0;
content_nodebox_fence_inv(f);
content_nodebox_fence(f);
f->setInventoryTextureNodeBox(i,"applewood.png","applewood.png","applewood.png");
/* TODO: apple planks
crafting::setWallRecipe(CONTENT_CRAFTITEM_WOOD_PLANK,CONTENT_FENCE);*/
content_list_add("craftguide",i,1,0);
content_list_add("creative",i,1,0);
i = CONTENT_STEEL_BARS; i = CONTENT_STEEL_BARS;
f = &content_features(i); f = &content_features(i);
f->description = gettext("Steel Bars"); f->description = gettext("Steel Bars");
@ -1059,184 +1080,6 @@ void content_mapnode_special(bool repeat)
content_list_add("player-creative",i,1,0); content_list_add("player-creative",i,1,0);
content_list_add("creative",i,1,0); content_list_add("creative",i,1,0);
i = CONTENT_SIGN_WALL;
f = &content_features(i);
f->description = gettext("Sign");
f->setAllTextures("sign_wall.png");
f->param_type = CPT_LIGHT;
f->param2_type = CPT_FACEDIR_WALLMOUNT;
f->draw_type = CDT_NODEBOX;
f->light_propagates = true;
f->sunlight_propagates = true;
f->floormount_alternate_node = CONTENT_SIGN;
f->roofmount_alternate_node = CONTENT_SIGN_UD;
f->walkable = false;
f->air_equivalent = true;
f->flammable = 1; // can be replaced by fire if the node under it is set on fire
f->fuel_time = 1;
f->dug_item = std::string("MaterialItem2 ")+itos(CONTENT_SIGN)+" 1";
if(f->initial_metadata == NULL)
f->initial_metadata = new SignNodeMetadata("Some sign");
f->type = CMT_WOOD;
f->hardness = 0.1;
f->pressure_type = CST_CRUSHABLE;
f->suffocation_per_second = 0;
f->alternate_lockstate_node = CONTENT_LOCKABLE_SIGN_WALL;
content_nodebox_sign_wall(f);
f->setFaceText(5,FaceText(0.05,0.3,0.95,0.7));
i = CONTENT_SIGN;
f = &content_features(i);
f->description = gettext("Sign");
f->setAllTextures("sign.png");
f->setTexture(4, "sign_back.png");
f->setTexture(5, "sign_front.png"); // Z-
f->param_type = CPT_LIGHT;
f->light_propagates = true;
f->sunlight_propagates = true;
f->air_equivalent = true;
f->wallmount_alternate_node = CONTENT_SIGN_WALL;
f->roofmount_alternate_node = CONTENT_SIGN_UD;
f->param2_type = CPT_FACEDIR_SIMPLE;
f->draw_type = CDT_NODEBOX;
f->flammable = 1; // can be replaced by fire if the node under it is set on fire
f->fuel_time = 1;
f->dug_item = std::string("MaterialItem2 ")+itos(i)+" 1";
if(f->initial_metadata == NULL)
f->initial_metadata = new SignNodeMetadata("Some sign");
f->type = CMT_WOOD;
f->hardness = 0.1;
f->pressure_type = CST_CRUSHABLE;
f->suffocation_per_second = 0;
f->alternate_lockstate_node = CONTENT_LOCKABLE_SIGN;
content_nodebox_sign(f);
f->setFaceText(5,FaceText(0.05,0.0675,0.95,0.55));
f->setInventoryTextureNodeBox(i,"sign.png", "sign_front.png", "sign.png");
crafting::setSignRecipe(CONTENT_CRAFTITEM_WOOD_PLANK,CONTENT_SIGN);
crafting::setSignRecipe(CONTENT_CRAFTITEM_PINE_PLANK,CONTENT_SIGN);
crafting::setSignRecipe(CONTENT_CRAFTITEM_JUNGLE_PLANK,CONTENT_SIGN);
content_list_add("craftguide",i,1,0);
content_list_add("creative",i,1,0);
i = CONTENT_SIGN_UD;
f = &content_features(i);
f->description = gettext("Sign");
f->setAllTextures("sign.png");
f->setTexture(4, "sign_back_ud.png");
f->setTexture(5, "sign_front_ud.png"); // Z-
f->param_type = CPT_LIGHT;
f->light_propagates = true;
f->sunlight_propagates = true;
f->air_equivalent = true;
f->wallmount_alternate_node = CONTENT_SIGN_WALL;
f->floormount_alternate_node = CONTENT_SIGN;
f->param2_type = CPT_FACEDIR_SIMPLE;
f->draw_type = CDT_NODEBOX;
f->flammable = 1; // can be replaced by fire if the node under it is set on fire
f->fuel_time = 1;
f->dug_item = std::string("MaterialItem2 ")+itos(CONTENT_SIGN)+" 1";
if(f->initial_metadata == NULL)
f->initial_metadata = new SignNodeMetadata("Some sign");
f->type = CMT_WOOD;
f->hardness = 0.1;
f->pressure_type = CST_CRUSHABLE;
f->suffocation_per_second = 0;
f->alternate_lockstate_node = CONTENT_LOCKABLE_SIGN_UD;
content_nodebox_sign_ud(f);
f->setFaceText(5,FaceText(0.05,0.45,0.95,0.8875));
f->setInventoryTextureNodeBox(i,"sign.png", "sign_front.png", "sign.png");
i = CONTENT_LOCKABLE_SIGN_WALL;
f = &content_features(i);
f->description = gettext("Locking Sign");
f->setAllTextures("sign.png");
f->setTexture(4, "sign_back.png");
f->setTexture(5, "sign_wall_lock.png"); // Z-
f->param_type = CPT_LIGHT;
f->param2_type = CPT_FACEDIR_WALLMOUNT;
f->draw_type = CDT_NODEBOX;
f->light_propagates = true;
f->sunlight_propagates = true;
f->air_equivalent = true;
f->floormount_alternate_node = CONTENT_LOCKABLE_SIGN;
f->roofmount_alternate_node = CONTENT_LOCKABLE_SIGN_UD;
f->walkable = false;
f->air_equivalent = true;
f->flammable = 1; // can be replaced by fire if the node under it is set on fire
f->fuel_time = 1;
f->dug_item = std::string("MaterialItem2 ")+itos(CONTENT_LOCKABLE_SIGN)+" 1";
if(f->initial_metadata == NULL)
f->initial_metadata = new LockingSignNodeMetadata("Some sign");
f->type = CMT_WOOD;
f->hardness = 0.1;
f->pressure_type = CST_CRUSHABLE;
f->suffocation_per_second = 0;
f->alternate_lockstate_node = CONTENT_SIGN_WALL;
content_nodebox_sign_wall(f);
f->setFaceText(4,FaceText(0.05,0.3,0.95,0.7,FTT_OWNER));
f->setFaceText(5,FaceText(0.05,0.3,0.95,0.7));
i = CONTENT_LOCKABLE_SIGN;
f = &content_features(i);
f->description = gettext("Locking Sign");
f->setAllTextures("sign.png");
f->setTexture(4, "sign_back.png");
f->setTexture(5, "sign_lock.png"); // Z-
f->param_type = CPT_LIGHT;
f->light_propagates = true;
f->sunlight_propagates = true;
f->air_equivalent = true;
f->wallmount_alternate_node = CONTENT_LOCKABLE_SIGN_WALL;
f->roofmount_alternate_node = CONTENT_LOCKABLE_SIGN_UD;
f->param2_type = CPT_FACEDIR_SIMPLE;
f->draw_type = CDT_NODEBOX;
f->flammable = 1; // can be replaced by fire if the node under it is set on fire
f->fuel_time = 1;
f->dug_item = std::string("MaterialItem2 ")+itos(i)+" 1";
if(f->initial_metadata == NULL)
f->initial_metadata = new LockingSignNodeMetadata("Some sign");
f->type = CMT_WOOD;
f->hardness = 0.1;
f->pressure_type = CST_CRUSHABLE;
f->suffocation_per_second = 0;
f->alternate_lockstate_node = CONTENT_SIGN;
content_nodebox_sign(f);
f->setFaceText(4,FaceText(0.05,0.0675,0.95,0.55,FTT_OWNER));
f->setFaceText(5,FaceText(0.05,0.0675,0.95,0.55));
f->setInventoryTextureNodeBox(i,"sign.png", "sign_lock.png", "sign.png");
crafting::set1Any2Recipe(CONTENT_SIGN,CONTENT_CRAFTITEM_STEEL_INGOT,CONTENT_LOCKABLE_SIGN);
content_list_add("craftguide",i,1,0);
content_list_add("creative",i,1,0);
i = CONTENT_LOCKABLE_SIGN_UD;
f = &content_features(i);
f->description = gettext("Locking Sign");
f->setAllTextures("sign.png");
f->setTexture(4, "sign_back_ud.png");
f->setTexture(5, "sign_lock_ud.png"); // Z-
f->param_type = CPT_LIGHT;
f->light_propagates = true;
f->sunlight_propagates = true;
f->air_equivalent = true;
f->wallmount_alternate_node = CONTENT_LOCKABLE_SIGN_WALL;
f->floormount_alternate_node = CONTENT_LOCKABLE_SIGN;
f->param2_type = CPT_FACEDIR_SIMPLE;
f->draw_type = CDT_NODEBOX;
f->flammable = 1; // can be replaced by fire if the node under it is set on fire
f->fuel_time = 1;
f->dug_item = std::string("MaterialItem2 ")+itos(CONTENT_LOCKABLE_SIGN)+" 1";
if(f->initial_metadata == NULL)
f->initial_metadata = new LockingSignNodeMetadata("Some sign");
f->type = CMT_WOOD;
f->hardness = 0.1;
f->pressure_type = CST_CRUSHABLE;
f->suffocation_per_second = 0;
f->alternate_lockstate_node = CONTENT_SIGN_UD;
content_nodebox_sign_ud(f);
f->setFaceText(4,FaceText(0.05,0.45,0.95,0.8875,FTT_OWNER));
f->setFaceText(5,FaceText(0.05,0.45,0.95,0.8875));
f->setInventoryTextureNodeBox(i,"sign.png", "sign_lock.png", "sign.png");
i = CONTENT_CHEST; i = CONTENT_CHEST;
f = &content_features(i); f = &content_features(i);
f->description = gettext("Chest"); f->description = gettext("Chest");
@ -1252,7 +1095,6 @@ void content_mapnode_special(bool repeat)
f->sunlight_propagates = true; f->sunlight_propagates = true;
f->air_equivalent = true; f->air_equivalent = true;
f->rotate_tile_with_nodebox = true; f->rotate_tile_with_nodebox = true;
//-0.5*BS,-0.5*BS,-0.4375*BS,0.5*BS,0.4375*BS,0.4375*BS
f->setNodeBox(NodeBox( f->setNodeBox(NodeBox(
-0.5*BS,-0.5*BS,-0.4375*BS,0.5*BS,0.3125*BS,0.4375*BS -0.5*BS,-0.5*BS,-0.4375*BS,0.5*BS,0.3125*BS,0.4375*BS
)); ));
@ -1292,7 +1134,6 @@ void content_mapnode_special(bool repeat)
f->sunlight_propagates = true; f->sunlight_propagates = true;
f->air_equivalent = true; f->air_equivalent = true;
f->rotate_tile_with_nodebox = true; f->rotate_tile_with_nodebox = true;
//-0.5*BS,-0.5*BS,-0.4375*BS,0.5*BS,0.4375*BS,0.4375*BS
f->setNodeBox(NodeBox( f->setNodeBox(NodeBox(
-0.5*BS,-0.5*BS,-0.4375*BS,0.5*BS,0.3125*BS,0.4375*BS -0.5*BS,-0.5*BS,-0.4375*BS,0.5*BS,0.3125*BS,0.4375*BS
)); ));
@ -1332,7 +1173,6 @@ void content_mapnode_special(bool repeat)
f->sunlight_propagates = true; f->sunlight_propagates = true;
f->air_equivalent = true; f->air_equivalent = true;
f->rotate_tile_with_nodebox = true; f->rotate_tile_with_nodebox = true;
//-0.5*BS,-0.5*BS,-0.4375*BS,0.5*BS,0.4375*BS,0.4375*BS
f->setNodeBox(NodeBox( f->setNodeBox(NodeBox(
-0.5*BS,-0.5*BS,-0.4375*BS,0.5*BS,0.3125*BS,0.4375*BS -0.5*BS,-0.5*BS,-0.4375*BS,0.5*BS,0.3125*BS,0.4375*BS
)); ));
@ -1357,6 +1197,45 @@ void content_mapnode_special(bool repeat)
content_list_add("craftguide",i,1,0); content_list_add("craftguide",i,1,0);
content_list_add("creative",i,1,0); content_list_add("creative",i,1,0);
i = CONTENT_CHEST_APPLE;
f = &content_features(i);
f->description = gettext("Chest");
f->draw_type = CDT_NODEBOX_META;
f->setAllTextures("applewood.png^chests_side.png");
f->setTexture(0, "applewood.png^chests_top.png");
f->setTexture(1, "applewood.png^chests_top.png");
f->setTexture(4, "applewood.png^chests_back.png");
f->setTexture(5, "applewood.png^chests_front.png"); // Z-
f->param_type = CPT_LIGHT;
f->param2_type = CPT_FACEDIR_SIMPLE;
f->light_propagates = true;
f->sunlight_propagates = true;
f->air_equivalent = true;
f->rotate_tile_with_nodebox = true;
f->setNodeBox(NodeBox(
-0.5*BS,-0.5*BS,-0.4375*BS,0.5*BS,0.3125*BS,0.4375*BS
));
f->addNodeBox(NodeBox(
-0.5*BS,0.3125*BS,-0.3125*BS,0.5*BS,0.375*BS,0.3125*BS
));
f->addNodeBox(NodeBox(
-0.5*BS,0.375*BS,-0.125*BS,0.5*BS,0.4375*BS,0.125*BS
));
f->addNodeBox(NodeBox(
-0.0625*BS,-0.0625*BS,-0.5*BS,0.0625*BS,0.125*BS,-0.4375*BS
));
f->setInventoryTextureNodeBox(i,"applewood.png^chests_top.png", "applewood.png^chests_front.png", "applewood.png^chests_side.png");
f->dug_item = std::string("MaterialItem2 ")+itos(i)+" 1";
if (f->initial_metadata == NULL)
f->initial_metadata = new ChestNodeMetadata();
f->sound_access = "open-chest";
f->type = CMT_WOOD;
f->hardness = 1.0;
f->pressure_type = CST_SOLID;
crafting::setRoundRecipe(CONTENT_APPLEWOOD,CONTENT_CHEST_APPLE);
content_list_add("craftguide",i,1,0);
content_list_add("creative",i,1,0);
i = CONTENT_CHEST_DEPRECATED; i = CONTENT_CHEST_DEPRECATED;
f = &content_features(i); f = &content_features(i);
f->description = gettext("Chest"); f->description = gettext("Chest");

View File

@ -1850,8 +1850,7 @@ MapBlock* ServerMap::finishBlockMake(mapgen::BlockMakeData *data,
for (p0.Y=0; p0.Y<MAP_BLOCKSIZE; p0.Y++) { for (p0.Y=0; p0.Y<MAP_BLOCKSIZE; p0.Y++) {
for (p0.Z=0; p0.Z<MAP_BLOCKSIZE; p0.Z++) { for (p0.Z=0; p0.Z<MAP_BLOCKSIZE; p0.Z++) {
MapNode n = block->getNodeNoEx(p0); MapNode n = block->getNodeNoEx(p0);
/* TODO: chests */ if (n.getContent() == CONTENT_CHEST) {
if (n.getContent() == CONTENT_CHEST_DEPRECATED) {
// chest? give it metadata and put shit in it // chest? give it metadata and put shit in it
NodeMetadata *f = block->m_node_metadata.get(p0); NodeMetadata *f = block->m_node_metadata.get(p0);
Inventory *inv = f->getInventory(); Inventory *inv = f->getInventory();

View File

@ -548,8 +548,7 @@ static void make_room1(VoxelManipulator &vmanip, v3s16 roomsize, v3s16 roomplace
u32 vi = vmanip.m_area.index(p); u32 vi = vmanip.m_area.index(p);
if (vmanip.m_data[vi].getContent() == CONTENT_AIR) { if (vmanip.m_data[vi].getContent() == CONTENT_AIR) {
vmanip.m_flags[vi] |= VMANIP_FLAG_DUNGEON_UNTOUCHABLE; vmanip.m_flags[vi] |= VMANIP_FLAG_DUNGEON_UNTOUCHABLE;
/* TODO: chests vmanip.m_data[vi] = MapNode(CONTENT_CHEST);
vmanip.m_data[vi] = MapNode(CONTENT_CHEST); */
} }
} }
} }

View File

@ -327,6 +327,7 @@ void init_mapnode()
#endif #endif
content_mapnode_stair(repeat); content_mapnode_stair(repeat);
content_mapnode_slab(repeat); content_mapnode_slab(repeat);
content_mapnode_sign(repeat);
content_mapnode_special(repeat); content_mapnode_special(repeat);
} }

View File

@ -1795,8 +1795,12 @@ bool generate_image(std::string part_of_name, video::IImage *& baseimg,
gui::IGUIFont *std_font = skin->getFont(); gui::IGUIFont *std_font = skin->getFont();
static gui::IGUIFont *tex_font = NULL; static gui::IGUIFont *tex_font = NULL;
#if USE_FREETYPE #if USE_FREETYPE
if (path_get("font","unifont.ttf",1,buff,1024)) if (path_get("font","unifont.ttf",1,buff,1024)) {
tex_font = gui::CGUITTFont::createTTFont(guienv, buff,12); int sz = 10*((dim.Width/16)+1);
if (sz < 10)
sz = 12;
tex_font = gui::CGUITTFont::createTTFont(guienv, buff,sz);
}
#else #else
if (path_get((char*)"texture",(char*)"fontlucida.png",1,buff,1024)) if (path_get((char*)"texture",(char*)"fontlucida.png",1,buff,1024))
tex_font = guienv->getFont(buff); tex_font = guienv->getFont(buff);