forked from oerkki/voxelands
rewrite content_list to C
This commit is contained in:
parent
221f079fe0
commit
59f8469cc5
|
@ -188,7 +188,7 @@ set(common_SRCS
|
|||
content_mapnode_special.cpp
|
||||
content_mapnode_plants.cpp
|
||||
content_mapnode_util.cpp
|
||||
content_list.cpp
|
||||
content_list.c
|
||||
content_nodebox.cpp
|
||||
intl.cpp
|
||||
auth.cpp
|
||||
|
|
|
@ -1623,7 +1623,7 @@ void Client::useItem()
|
|||
std::string snd("");
|
||||
content_t w = item->getContent();
|
||||
if ((w&CONTENT_CRAFTITEM_MASK) == CONTENT_CRAFTITEM_MASK)
|
||||
snd = content_craftitem_features(w).sound_use;
|
||||
snd = content_craftitem_features(w)->sound_use;
|
||||
if (snd != "")
|
||||
g_sound->playSound(snd,false);
|
||||
}
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -24,7 +24,6 @@
|
|||
#define CONTENT_CLOTHESITEM_HEADER
|
||||
|
||||
#include "mapnode.h"
|
||||
#include <map>
|
||||
|
||||
#define CONTENT_CLOTHESITEM_MASK 0x1000
|
||||
|
||||
|
@ -78,10 +77,10 @@ struct ClothesItemFeatures {
|
|||
{}
|
||||
};
|
||||
|
||||
extern std::map<content_t,struct ClothesItemFeatures> g_content_clothesitem_features;
|
||||
extern struct ClothesItemFeatures g_content_clothesitem_features[4096];
|
||||
// For getting the default properties, set id=CONTENT_IGNORE
|
||||
void content_clothesitem_init();
|
||||
ClothesItemFeatures & content_clothesitem_features(content_t i);
|
||||
ClothesItemFeatures *content_clothesitem_features(content_t i);
|
||||
|
||||
// fur was the first clothing added, they keep their original ids but are
|
||||
// actually defined below along with the other (newer) fur item. also
|
||||
|
|
|
@ -38,6 +38,8 @@
|
|||
#include <algorithm>
|
||||
#include <set>
|
||||
|
||||
#include "list.h"
|
||||
|
||||
namespace crafting {
|
||||
|
||||
std::vector<CraftDef> shaped_recipes;
|
||||
|
@ -882,7 +884,7 @@ FoundReverseRecipe getReverseRecipe(InventoryItem *iitem, int index)
|
|||
}
|
||||
|
||||
//how to update an ingredient list given a range of new craft items
|
||||
void addToIngredientList(std::vector<lists::ListData> results, uint32_t begin, std::vector<content_t>& ingredient_list)
|
||||
void addToIngredientList(std::vector<listdata_t> results, uint32_t begin, std::vector<content_t>& ingredient_list)
|
||||
{
|
||||
using namespace std;
|
||||
|
||||
|
@ -890,9 +892,9 @@ void addToIngredientList(std::vector<lists::ListData> results, uint32_t begin, s
|
|||
set<content_t> ingredients (ingredient_list.begin(), ingredient_list.end());
|
||||
|
||||
//go through the result list
|
||||
for (std::vector<lists::ListData>::iterator it = results.begin()+begin; it != results.end(); ++it) {
|
||||
for (std::vector<listdata_t>::iterator it = results.begin()+begin; it != results.end(); ++it) {
|
||||
|
||||
lists::ListData d = *it;
|
||||
listdata_t d = *it;
|
||||
//make a temporary inventory item for the result
|
||||
InventoryItem *result = InventoryItem::create(d.content, 1, 0, d.data);
|
||||
|
||||
|
@ -926,6 +928,8 @@ void addToIngredientList(std::vector<lists::ListData> results, uint32_t begin, s
|
|||
|
||||
std::vector<content_t>& getCraftGuideIngredientList()
|
||||
{
|
||||
contentlist_t *cl;
|
||||
uint32_t list_size;
|
||||
using namespace std;
|
||||
|
||||
//the ingredient list, and the number of items that were in the craftguide list at the last check
|
||||
|
@ -933,16 +937,21 @@ std::vector<content_t>& getCraftGuideIngredientList()
|
|||
static uint32_t last_craftguide_count = 0;
|
||||
|
||||
//get the craftguide list
|
||||
const vector<lists::ListData>& craft_list = lists::get("craftguide");
|
||||
cl = content_list_get("craftguide");
|
||||
if (!cl)
|
||||
return ingredient_list;
|
||||
|
||||
list_size = list_count(&cl->data);
|
||||
|
||||
//check if more items need to be added
|
||||
if (craft_list.size() > last_craftguide_count) {
|
||||
if (list_size > last_craftguide_count) {
|
||||
|
||||
//if so, add the new stuff
|
||||
addToIngredientList(craft_list, last_craftguide_count, ingredient_list);
|
||||
/* TODO: basically everything for reverse lookup */
|
||||
//addToIngredientList(craft_list, last_craftguide_count, ingredient_list);
|
||||
|
||||
//and update the craftguide count
|
||||
last_craftguide_count = craft_list.size();
|
||||
last_craftguide_count = list_size;
|
||||
}
|
||||
|
||||
//return the list
|
||||
|
@ -951,9 +960,15 @@ std::vector<content_t>& getCraftGuideIngredientList()
|
|||
|
||||
void giveCreative(Player *player)
|
||||
{
|
||||
std::vector<lists::ListData> &creativeinv = lists::get("player-creative");
|
||||
contentlist_t *cl;
|
||||
listdata_t *ld;
|
||||
InventoryList *l;
|
||||
|
||||
InventoryList *l = player->inventory.getList("main");
|
||||
cl = content_list_get("player-creative");
|
||||
if (!cl)
|
||||
return;
|
||||
|
||||
l = player->inventory.getList("main");
|
||||
|
||||
// if the player doesn't have a creative chest, reset their inventory
|
||||
if (!l || l->findItem(CONTENT_CREATIVE_CHEST,NULL) != NULL)
|
||||
|
@ -963,8 +978,10 @@ void giveCreative(Player *player)
|
|||
player->setClothesGiven(false);
|
||||
player->resetInventory();
|
||||
|
||||
for(u8 i=0; i<creativeinv.size(); i++) {
|
||||
player->inventory.addItem("main", InventoryItem::create(creativeinv[i].content,creativeinv[i].count,0,creativeinv[i].data));
|
||||
ld = cl->data;
|
||||
while (ld) {
|
||||
player->inventory.addItem("main", InventoryItem::create(ld->content,ld->count,0,ld->data));
|
||||
ld = ld->next;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -105,8 +105,7 @@ struct CraftItemFeatures {
|
|||
};
|
||||
|
||||
void content_craftitem_init();
|
||||
CraftItemFeatures & content_craftitem_features(content_t i);
|
||||
CraftItemFeatures & content_craftitem_features(std::string subname);
|
||||
CraftItemFeatures *content_craftitem_features(content_t i);
|
||||
|
||||
#define CONTENT_CRAFTITEM_PAPER (CONTENT_CRAFTITEM_MASK | 0x01)
|
||||
#define CONTENT_CRAFTITEM_CHARCOAL (CONTENT_CRAFTITEM_MASK | 0x03)
|
||||
|
|
|
@ -0,0 +1,126 @@
|
|||
/************************************************************************
|
||||
* content_list.cpp
|
||||
* voxelands - 3d voxel world sandbox game
|
||||
* Copyright (C) Lisa Milne 2014-2017 <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 <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
#include "content_list.h"
|
||||
#include "list.h"
|
||||
#include "crypto.h"
|
||||
|
||||
static struct {
|
||||
contentlist_t *lists;
|
||||
} content_list_data = {
|
||||
NULL
|
||||
};
|
||||
|
||||
static int content_list_insert_cmp(void *e1, void *e2)
|
||||
{
|
||||
contentlist_t *n1 = e1;
|
||||
contentlist_t *n2 = e2;
|
||||
|
||||
if (n2->h > n1->h)
|
||||
return 0;
|
||||
return 1;
|
||||
}
|
||||
|
||||
static listdata_t *content_list_find(contentlist_t *list, content_t c, uint16_t data)
|
||||
{
|
||||
listdata_t *d;
|
||||
|
||||
d = list->data;
|
||||
while (d) {
|
||||
if (d->content == c && d->data == data)
|
||||
return d;
|
||||
d = d->next;
|
||||
}
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
static contentlist_t *content_list_create(const char* name)
|
||||
{
|
||||
contentlist_t *l;
|
||||
|
||||
l = malloc(sizeof(contentlist_t));
|
||||
|
||||
if (!l)
|
||||
return NULL;
|
||||
|
||||
l->name = strdup(name);
|
||||
l->h = hash(name);
|
||||
l->data = NULL;
|
||||
l->count = 0;
|
||||
|
||||
content_list_data.lists = list_insert_cmp(&content_list_data.lists,l,content_list_insert_cmp);
|
||||
|
||||
return l;
|
||||
}
|
||||
|
||||
static void content_list_append(contentlist_t *list, content_t c, uint16_t count, uint16_t data)
|
||||
{
|
||||
listdata_t *d;
|
||||
|
||||
d = malloc(sizeof(listdata_t));
|
||||
if (!d)
|
||||
return;
|
||||
|
||||
d->content = c;
|
||||
d->count = count;
|
||||
d->data = data;
|
||||
|
||||
list->data = list_push(&list->data,d);
|
||||
}
|
||||
|
||||
void content_list_add(const char* name, content_t c, uint16_t count, uint16_t data)
|
||||
{
|
||||
contentlist_t *l;
|
||||
listdata_t *d;
|
||||
|
||||
l = content_list_get(name);
|
||||
if (!l)
|
||||
l = content_list_create(name);
|
||||
if (!l)
|
||||
return;
|
||||
|
||||
d = content_list_find(l,c,data);
|
||||
if (!d) {
|
||||
content_list_append(l,c,count,data);
|
||||
return;
|
||||
}
|
||||
|
||||
d->count = count;
|
||||
}
|
||||
|
||||
contentlist_t *content_list_get(const char* name)
|
||||
{
|
||||
contentlist_t *l;
|
||||
uint32_t h;
|
||||
|
||||
l = content_list_data.lists;
|
||||
h = hash(name);
|
||||
|
||||
while (l) {
|
||||
if (l->h == h && !strcmp(l->name,name))
|
||||
return l;
|
||||
l = l->next;
|
||||
}
|
||||
|
||||
return NULL;
|
||||
}
|
|
@ -1,49 +0,0 @@
|
|||
/************************************************************************
|
||||
* content_list.cpp
|
||||
* voxelands - 3d voxel world sandbox game
|
||||
* Copyright (C) Lisa 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 "mapnode.h"
|
||||
#include "content_mapnode.h"
|
||||
#include "content_list.h"
|
||||
#include <map>
|
||||
#include <vector>
|
||||
#include <algorithm>
|
||||
|
||||
namespace lists {
|
||||
|
||||
std::map< std::string , std::vector<ListData> > c_lists;
|
||||
|
||||
void add(std::string name, content_t c, uint16_t count, uint16_t data)
|
||||
{
|
||||
for (std::vector<ListData>::iterator i = c_lists[name].begin(); i != c_lists[name].end(); ++i) {
|
||||
ListData d = *i;
|
||||
if (d.content == c && d.data == data) {
|
||||
i->count = count;
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
c_lists[name].push_back(ListData(c,count,data));
|
||||
}
|
||||
|
||||
std::vector<ListData> &get(std::string name)
|
||||
{
|
||||
return c_lists[name];
|
||||
}
|
||||
|
||||
};
|
|
@ -1,29 +1,47 @@
|
|||
#ifndef _CONTENT_LIST_H
|
||||
#define _CONTENT_LIST_H
|
||||
|
||||
#include <vector>
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#include "array.h"
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
namespace lists {
|
||||
#ifndef _HAVE_CONTENT_TYPE
|
||||
#define _HAVE_CONTENT_TYPE
|
||||
typedef uint16_t content_t;
|
||||
#endif
|
||||
|
||||
struct ListData {
|
||||
#ifndef _HAVE_LISTDATA_TYPE
|
||||
#define _HAVE_LISTDATA_TYPE
|
||||
typedef struct listdata_s {
|
||||
struct listdata_s *prev;
|
||||
struct listdata_s *next;
|
||||
content_t content;
|
||||
uint16_t count;
|
||||
uint16_t data;
|
||||
} listdata_t;
|
||||
#endif
|
||||
|
||||
ListData()
|
||||
{}
|
||||
#ifndef _HAVE_CONTENTLIST_TYPE
|
||||
#define _HAVE_CONTENTLIST_TYPE
|
||||
typedef struct contentlist_s {
|
||||
struct contentlist_s *prev;
|
||||
struct contentlist_s *next;
|
||||
char* name;
|
||||
uint32_t h;
|
||||
uint32_t count;
|
||||
listdata_t *data;
|
||||
} contentlist_t;
|
||||
#endif
|
||||
|
||||
ListData(content_t c, uint16_t cc, uint16_t cd):
|
||||
content(c),
|
||||
count(cc),
|
||||
data(cd)
|
||||
{}
|
||||
};
|
||||
void content_list_add(const char* name, content_t c, uint16_t count, uint16_t data);
|
||||
contentlist_t *content_list_get(const char* name);
|
||||
|
||||
void add(std::string name, content_t c, uint16_t count=1, uint16_t data=0);
|
||||
std::vector<ListData> &get(std::string name);
|
||||
|
||||
};
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -51,8 +51,8 @@ void content_mapnode_circuit(bool repeat)
|
|||
content_nodebox_carpet(f);
|
||||
if (f->initial_metadata == NULL)
|
||||
f->initial_metadata = new CircuitNodeMetadata();
|
||||
lists::add("creative",i);
|
||||
lists::add("decrafting",i);
|
||||
content_list_add("creative",i,1,0);
|
||||
content_list_add("decrafting",i,1,0);
|
||||
|
||||
i = CONTENT_CIRCUIT_COPPERWIRE;
|
||||
f = &content_features(i);
|
||||
|
@ -82,8 +82,8 @@ void content_mapnode_circuit(bool repeat)
|
|||
};
|
||||
crafting::setShapelessRecipe(r,CONTENT_CIRCUIT_COPPERWIRE,10);
|
||||
}
|
||||
lists::add("craftguide",i);
|
||||
lists::add("creative",i);
|
||||
content_list_add("craftguide",i,1,0);
|
||||
content_list_add("creative",i,1,0);
|
||||
|
||||
i = CONTENT_CIRCUIT_REACTOR;
|
||||
f = &content_features(i);
|
||||
|
@ -104,8 +104,8 @@ void content_mapnode_circuit(bool repeat)
|
|||
if (f->initial_metadata == NULL)
|
||||
f->initial_metadata = new SourceNodeMetadata();
|
||||
crafting::setFilledRoundRecipe(CONTENT_CRAFTITEM_MITHRIL_UNBOUND,CONTENT_CRAFTITEM_QUARTZ,CONTENT_CIRCUIT_REACTOR);
|
||||
lists::add("craftguide",i);
|
||||
lists::add("creative",i);
|
||||
content_list_add("craftguide",i,1,0);
|
||||
content_list_add("creative",i,1,0);
|
||||
|
||||
i = CONTENT_CIRCUIT_SOLARPANEL;
|
||||
f = &content_features(i);
|
||||
|
@ -134,8 +134,8 @@ void content_mapnode_circuit(bool repeat)
|
|||
};
|
||||
crafting::setRecipe(r,CONTENT_CIRCUIT_SOLARPANEL,1);
|
||||
}
|
||||
lists::add("craftguide",i);
|
||||
lists::add("creative",i);
|
||||
content_list_add("craftguide",i,1,0);
|
||||
content_list_add("creative",i,1,0);
|
||||
|
||||
i = CONTENT_CIRCUIT_WATERWHEEL;
|
||||
f = &content_features(i);
|
||||
|
@ -166,8 +166,8 @@ void content_mapnode_circuit(bool repeat)
|
|||
};
|
||||
crafting::setRecipe(r,CONTENT_CIRCUIT_WATERWHEEL,1);
|
||||
}
|
||||
lists::add("craftguide",i);
|
||||
lists::add("creative",i);
|
||||
content_list_add("craftguide",i,1,0);
|
||||
content_list_add("creative",i,1,0);
|
||||
|
||||
i = CONTENT_CIRCUIT_SWITCH;
|
||||
f = &content_features(i);
|
||||
|
@ -201,8 +201,8 @@ void content_mapnode_circuit(bool repeat)
|
|||
};
|
||||
crafting::setRecipe(recipe,CONTENT_CIRCUIT_SWITCH,1);
|
||||
}
|
||||
lists::add("craftguide",i);
|
||||
lists::add("creative",i);
|
||||
content_list_add("craftguide",i,1,0);
|
||||
content_list_add("creative",i,1,0);
|
||||
|
||||
i = CONTENT_CIRCUIT_BUTTON;
|
||||
f = &content_features(i);
|
||||
|
@ -232,8 +232,8 @@ void content_mapnode_circuit(bool repeat)
|
|||
};
|
||||
crafting::setRecipe(recipe,CONTENT_CIRCUIT_BUTTON,1);
|
||||
}
|
||||
lists::add("craftguide",i);
|
||||
lists::add("creative",i);
|
||||
content_list_add("craftguide",i,1,0);
|
||||
content_list_add("creative",i,1,0);
|
||||
|
||||
i = CONTENT_CIRCUIT_PRESSUREPLATE_STONE;
|
||||
f = &content_features(i);
|
||||
|
@ -260,8 +260,8 @@ void content_mapnode_circuit(bool repeat)
|
|||
};
|
||||
crafting::setRecipe(recipe,CONTENT_CIRCUIT_PRESSUREPLATE_STONE,1);
|
||||
}
|
||||
lists::add("craftguide",i);
|
||||
lists::add("creative",i);
|
||||
content_list_add("craftguide",i,1,0);
|
||||
content_list_add("creative",i,1,0);
|
||||
|
||||
i = CONTENT_CIRCUIT_PRESSUREPLATE_WOOD;
|
||||
f = &content_features(i);
|
||||
|
@ -288,8 +288,8 @@ void content_mapnode_circuit(bool repeat)
|
|||
};
|
||||
crafting::setRecipe(recipe,CONTENT_CIRCUIT_PRESSUREPLATE_WOOD,1);
|
||||
}
|
||||
lists::add("craftguide",i);
|
||||
lists::add("creative",i);
|
||||
content_list_add("craftguide",i,1,0);
|
||||
content_list_add("creative",i,1,0);
|
||||
|
||||
i = CONTENT_CIRCUIT_NOTGATE;
|
||||
f = &content_features(i);
|
||||
|
@ -319,8 +319,8 @@ void content_mapnode_circuit(bool repeat)
|
|||
};
|
||||
crafting::setRecipe(recipe,CONTENT_CIRCUIT_NOTGATE,1);
|
||||
}
|
||||
lists::add("craftguide",i);
|
||||
lists::add("creative",i);
|
||||
content_list_add("craftguide",i,1,0);
|
||||
content_list_add("creative",i,1,0);
|
||||
|
||||
i = CONTENT_CIRCUIT_REPEATER;
|
||||
f = &content_features(i);
|
||||
|
@ -350,8 +350,8 @@ void content_mapnode_circuit(bool repeat)
|
|||
};
|
||||
crafting::setRecipe(recipe,CONTENT_CIRCUIT_REPEATER,1);
|
||||
}
|
||||
lists::add("craftguide",i);
|
||||
lists::add("creative",i);
|
||||
content_list_add("craftguide",i,1,0);
|
||||
content_list_add("creative",i,1,0);
|
||||
|
||||
i = CONTENT_CIRCUIT_LAMP;
|
||||
f = &content_features(i);
|
||||
|
@ -400,8 +400,8 @@ void content_mapnode_circuit(bool repeat)
|
|||
};
|
||||
crafting::setRecipe(recipe,CONTENT_CIRCUIT_LAMP_OFF,4);
|
||||
}
|
||||
lists::add("craftguide",i);
|
||||
lists::add("creative",i);
|
||||
content_list_add("craftguide",i,1,0);
|
||||
content_list_add("creative",i,1,0);
|
||||
|
||||
// regular piston
|
||||
i = CONTENT_CIRCUIT_PISTON_OFF;
|
||||
|
@ -435,8 +435,8 @@ void content_mapnode_circuit(bool repeat)
|
|||
};
|
||||
crafting::setRecipe(recipe,CONTENT_CIRCUIT_PISTON_OFF,1);
|
||||
}
|
||||
lists::add("craftguide",i);
|
||||
lists::add("creative",i);
|
||||
content_list_add("craftguide",i,1,0);
|
||||
content_list_add("creative",i,1,0);
|
||||
|
||||
i = CONTENT_CIRCUIT_PISTON;
|
||||
f = &content_features(i);
|
||||
|
@ -634,8 +634,8 @@ void content_mapnode_circuit(bool repeat)
|
|||
if (f->initial_metadata == NULL)
|
||||
f->initial_metadata = new PistonNodeMetadata();
|
||||
crafting::set1over1Recipe(CONTENT_CRAFTITEM_RESIN,CONTENT_CIRCUIT_PISTON_OFF,CONTENT_CIRCUIT_STICKYPISTON_OFF);
|
||||
lists::add("craftguide",i);
|
||||
lists::add("creative",i);
|
||||
content_list_add("craftguide",i,1,0);
|
||||
content_list_add("creative",i,1,0);
|
||||
|
||||
i = CONTENT_CIRCUIT_STICKYPISTON;
|
||||
f = &content_features(i);
|
||||
|
|
|
@ -86,8 +86,8 @@ void content_mapnode_door(bool repeat)
|
|||
f->pressure_type = CST_SOLID;
|
||||
f->suffocation_per_second = 0;
|
||||
crafting::set1over1Recipe(CONTENT_WOOD_HATCH,CONTENT_WOOD_HATCH,CONTENT_WOOD_DOOR_LT);
|
||||
lists::add("craftguide",i);
|
||||
lists::add("creative",i);
|
||||
content_list_add("craftguide",i,1,0);
|
||||
content_list_add("creative",i,1,0);
|
||||
|
||||
i = CONTENT_STEEL_DOOR_LB;
|
||||
f = &content_features(i);
|
||||
|
@ -145,8 +145,8 @@ void content_mapnode_door(bool repeat)
|
|||
if (f->initial_metadata == NULL)
|
||||
f->initial_metadata = new DoorNodeMetadata();
|
||||
crafting::set1over1Recipe(CONTENT_STEEL_HATCH,CONTENT_STEEL_HATCH,CONTENT_STEEL_DOOR_LT);
|
||||
lists::add("craftguide",i);
|
||||
lists::add("creative",i);
|
||||
content_list_add("craftguide",i,1,0);
|
||||
content_list_add("creative",i,1,0);
|
||||
|
||||
i = CONTENT_GLASS_DOOR_LB;
|
||||
f = &content_features(i);
|
||||
|
@ -206,8 +206,8 @@ void content_mapnode_door(bool repeat)
|
|||
f->pressure_type = CST_SOLID;
|
||||
f->suffocation_per_second = 0;
|
||||
crafting::set1over1Recipe(CONTENT_GLASS_PANE,CONTENT_GLASS_PANE,CONTENT_GLASS_DOOR_LT);
|
||||
lists::add("craftguide",i);
|
||||
lists::add("creative",i);
|
||||
content_list_add("craftguide",i,1,0);
|
||||
content_list_add("creative",i,1,0);
|
||||
|
||||
i = CONTENT_WOOD_W_DOOR_LB;
|
||||
f = &content_features(i);
|
||||
|
@ -266,8 +266,8 @@ void content_mapnode_door(bool repeat)
|
|||
f->suffocation_per_second = 0;
|
||||
crafting::set1over1Recipe(CONTENT_WOOD_W_HATCH,CONTENT_WOOD_HATCH,CONTENT_WOOD_W_DOOR_LT);
|
||||
crafting::set1over1Recipe(CONTENT_GLASS,CONTENT_WOOD_DOOR_LT,CONTENT_WOOD_W_DOOR_LT);
|
||||
lists::add("craftguide",i);
|
||||
lists::add("creative",i);
|
||||
content_list_add("craftguide",i,1,0);
|
||||
content_list_add("creative",i,1,0);
|
||||
|
||||
i = CONTENT_STEEL_W_DOOR_LB;
|
||||
f = &content_features(i);
|
||||
|
@ -328,8 +328,8 @@ void content_mapnode_door(bool repeat)
|
|||
f->initial_metadata = new DoorNodeMetadata();
|
||||
crafting::set1over1Recipe(CONTENT_STEEL_W_HATCH,CONTENT_STEEL_HATCH,CONTENT_STEEL_W_DOOR_LT);
|
||||
crafting::set1over1Recipe(CONTENT_GLASS,CONTENT_STEEL_DOOR_LT,CONTENT_STEEL_W_DOOR_LT);
|
||||
lists::add("craftguide",i);
|
||||
lists::add("creative",i);
|
||||
content_list_add("craftguide",i,1,0);
|
||||
content_list_add("creative",i,1,0);
|
||||
|
||||
// right doors
|
||||
i = CONTENT_WOOD_DOOR_RB;
|
||||
|
@ -385,7 +385,7 @@ void content_mapnode_door(bool repeat)
|
|||
f->hardness = 0.75;
|
||||
f->pressure_type = CST_SOLID;
|
||||
f->suffocation_per_second = 0;
|
||||
lists::add("creative",i);
|
||||
content_list_add("creative",i,1,0);
|
||||
|
||||
i = CONTENT_GLASS_DOOR_RB;
|
||||
f = &content_features(i);
|
||||
|
@ -446,7 +446,7 @@ void content_mapnode_door(bool repeat)
|
|||
f->hardness = 0.15;
|
||||
f->pressure_type = CST_SOLID;
|
||||
f->suffocation_per_second = 0;
|
||||
lists::add("creative",i);
|
||||
content_list_add("creative",i,1,0);
|
||||
|
||||
i = CONTENT_STEEL_DOOR_RB;
|
||||
f = &content_features(i);
|
||||
|
@ -503,7 +503,7 @@ void content_mapnode_door(bool repeat)
|
|||
f->energy_type = CET_DEVICE;
|
||||
if (f->initial_metadata == NULL)
|
||||
f->initial_metadata = new DoorNodeMetadata();
|
||||
lists::add("creative",i);
|
||||
content_list_add("creative",i,1,0);
|
||||
|
||||
i = CONTENT_WOOD_W_DOOR_RB;
|
||||
f = &content_features(i);
|
||||
|
@ -560,7 +560,7 @@ void content_mapnode_door(bool repeat)
|
|||
f->hardness = 0.75;
|
||||
f->pressure_type = CST_SOLID;
|
||||
f->suffocation_per_second = 0;
|
||||
lists::add("creative",i);
|
||||
content_list_add("creative",i,1,0);
|
||||
|
||||
i = CONTENT_STEEL_W_DOOR_RB;
|
||||
f = &content_features(i);
|
||||
|
@ -621,8 +621,8 @@ void content_mapnode_door(bool repeat)
|
|||
f->initial_metadata = new DoorNodeMetadata();
|
||||
crafting::set1To1Recipe(CONTENT_STEEL_W_DOOR_LT,CONTENT_STEEL_W_DOOR_RT);
|
||||
crafting::set1over1Recipe(CONTENT_GLASS,CONTENT_STEEL_DOOR_RT,CONTENT_STEEL_W_DOOR_RT);
|
||||
lists::add("craftguide",i);
|
||||
lists::add("creative",i);
|
||||
content_list_add("craftguide",i,1,0);
|
||||
content_list_add("creative",i,1,0);
|
||||
|
||||
// open doors
|
||||
i = CONTENT_WOOD_DOOR_LB_OPEN;
|
||||
|
@ -1195,8 +1195,8 @@ void content_mapnode_door(bool repeat)
|
|||
f->suffocation_per_second = 0;
|
||||
crafting::setSoftBlockRecipe(CONTENT_CRAFTITEM_WOOD_PLANK,CONTENT_WOOD_HATCH);
|
||||
crafting::setSoftBlockRecipe(CONTENT_CRAFTITEM_JUNGLE_PLANK,CONTENT_WOOD_HATCH);
|
||||
lists::add("craftguide",i);
|
||||
lists::add("creative",i);
|
||||
content_list_add("craftguide",i,1,0);
|
||||
content_list_add("creative",i,1,0);
|
||||
|
||||
i = CONTENT_STEEL_HATCH;
|
||||
f = &content_features(i);
|
||||
|
@ -1221,8 +1221,8 @@ void content_mapnode_door(bool repeat)
|
|||
if (f->initial_metadata == NULL)
|
||||
f->initial_metadata = new DoorNodeMetadata();
|
||||
crafting::setSoftBlockRecipe(CONTENT_CRAFTITEM_STEEL_INGOT,CONTENT_STEEL_HATCH);
|
||||
lists::add("craftguide",i);
|
||||
lists::add("creative",i);
|
||||
content_list_add("craftguide",i,1,0);
|
||||
content_list_add("creative",i,1,0);
|
||||
|
||||
i = CONTENT_WOOD_W_HATCH;
|
||||
f = &content_features(i);
|
||||
|
@ -1249,8 +1249,8 @@ void content_mapnode_door(bool repeat)
|
|||
f->pressure_type = CST_SOLID;
|
||||
f->suffocation_per_second = 0;
|
||||
crafting::set1over1Recipe(CONTENT_GLASS,CONTENT_WOOD_HATCH,CONTENT_WOOD_W_HATCH);
|
||||
lists::add("craftguide",i);
|
||||
lists::add("creative",i);
|
||||
content_list_add("craftguide",i,1,0);
|
||||
content_list_add("creative",i,1,0);
|
||||
|
||||
i = CONTENT_STEEL_W_HATCH;
|
||||
f = &content_features(i);
|
||||
|
@ -1278,8 +1278,8 @@ void content_mapnode_door(bool repeat)
|
|||
if (f->initial_metadata == NULL)
|
||||
f->initial_metadata = new DoorNodeMetadata();
|
||||
crafting::set1over1Recipe(CONTENT_GLASS,CONTENT_STEEL_HATCH,CONTENT_STEEL_W_HATCH);
|
||||
lists::add("craftguide",i);
|
||||
lists::add("creative",i);
|
||||
content_list_add("craftguide",i,1,0);
|
||||
content_list_add("creative",i,1,0);
|
||||
|
||||
// gates
|
||||
i = CONTENT_WOOD_GATE;
|
||||
|
@ -1311,8 +1311,8 @@ void content_mapnode_door(bool repeat)
|
|||
crafting::setGateRecipe(CONTENT_CRAFTITEM_JUNGLE_PLANK,CONTENT_JUNGLEWOOD,CONTENT_WOOD_GATE);
|
||||
crafting::setGateRecipe(CONTENT_CRAFTITEM_WOOD_PLANK,CONTENT_JUNGLEWOOD,CONTENT_WOOD_GATE);
|
||||
crafting::setGateRecipe(CONTENT_CRAFTITEM_JUNGLE_PLANK,CONTENT_WOOD,CONTENT_WOOD_GATE);
|
||||
lists::add("craftguide",i);
|
||||
lists::add("creative",i);
|
||||
content_list_add("craftguide",i,1,0);
|
||||
content_list_add("creative",i,1,0);
|
||||
|
||||
i = CONTENT_STEEL_GATE;
|
||||
f = &content_features(i);
|
||||
|
@ -1341,8 +1341,8 @@ void content_mapnode_door(bool repeat)
|
|||
if (f->initial_metadata == NULL)
|
||||
f->initial_metadata = new DoorNodeMetadata();
|
||||
crafting::setGateRecipe(CONTENT_CRAFTITEM_STEEL_INGOT,CONTENT_STEEL,CONTENT_STEEL_GATE);
|
||||
lists::add("craftguide",i);
|
||||
lists::add("creative",i);
|
||||
content_list_add("craftguide",i,1,0);
|
||||
content_list_add("creative",i,1,0);
|
||||
|
||||
// open hatches
|
||||
i = CONTENT_WOOD_HATCH_OPEN;
|
||||
|
|
|
@ -43,7 +43,7 @@ void content_mapnode_farm(bool repeat)
|
|||
f->dug_item = std::string("MaterialItem2 ")+itos(CONTENT_MUD)+" 1";
|
||||
f->type = CMT_DIRT;
|
||||
f->hardness = 1.0;
|
||||
lists::add("decrafting",i);
|
||||
content_list_add("decrafting",i,1,0);
|
||||
|
||||
i = CONTENT_FERTILIZER;
|
||||
f = &content_features(i);
|
||||
|
@ -81,8 +81,8 @@ void content_mapnode_farm(bool repeat)
|
|||
f->suffocation_per_second = 0;
|
||||
crafting::set5Recipe(CONTENT_CRAFTITEM_WOOD_PLANK,CONTENT_TRELLIS);
|
||||
crafting::set5Recipe(CONTENT_CRAFTITEM_JUNGLE_PLANK,CONTENT_TRELLIS);
|
||||
lists::add("craftguide",i);
|
||||
lists::add("creative",i);
|
||||
content_list_add("craftguide",i,1,0);
|
||||
content_list_add("creative",i,1,0);
|
||||
|
||||
i = CONTENT_SEEDS_WHEAT;
|
||||
f = &content_features(i);
|
||||
|
@ -102,7 +102,7 @@ void content_mapnode_farm(bool repeat)
|
|||
f->pressure_type = CST_CRUSHABLE;
|
||||
f->fuel_time = 2;
|
||||
f->suffocation_per_second = 0;
|
||||
lists::add("creative",i);
|
||||
content_list_add("creative",i,1,0);
|
||||
|
||||
i = CONTENT_SEEDS_MELON;
|
||||
f = &content_features(i);
|
||||
|
@ -123,8 +123,8 @@ void content_mapnode_farm(bool repeat)
|
|||
f->fuel_time = 2;
|
||||
f->suffocation_per_second = 0;
|
||||
crafting::set1To1Recipe(CONTENT_CRAFTITEM_MELONSLICE,CONTENT_SEEDS_MELON);
|
||||
lists::add("craftguide",i);
|
||||
lists::add("creative",i);
|
||||
content_list_add("craftguide",i,1,0);
|
||||
content_list_add("creative",i,1,0);
|
||||
|
||||
i = CONTENT_SEEDS_PUMPKIN;
|
||||
f = &content_features(i);
|
||||
|
@ -145,8 +145,8 @@ void content_mapnode_farm(bool repeat)
|
|||
f->fuel_time = 2;
|
||||
f->suffocation_per_second = 0;
|
||||
crafting::set1To1Recipe(CONTENT_CRAFTITEM_PUMPKINSLICE,CONTENT_SEEDS_PUMPKIN);
|
||||
lists::add("craftguide",i);
|
||||
lists::add("creative",i);
|
||||
content_list_add("craftguide",i,1,0);
|
||||
content_list_add("creative",i,1,0);
|
||||
|
||||
i = CONTENT_SEEDS_POTATO;
|
||||
f = &content_features(i);
|
||||
|
@ -167,8 +167,8 @@ void content_mapnode_farm(bool repeat)
|
|||
f->fuel_time = 2;
|
||||
f->suffocation_per_second = 0;
|
||||
crafting::set1To2Recipe(CONTENT_CRAFTITEM_POTATO,CONTENT_SEEDS_POTATO);
|
||||
lists::add("craftguide",i);
|
||||
lists::add("creative",i);
|
||||
content_list_add("craftguide",i,1,0);
|
||||
content_list_add("creative",i,1,0);
|
||||
|
||||
i = CONTENT_SEEDS_CARROT;
|
||||
f = &content_features(i);
|
||||
|
@ -189,8 +189,8 @@ void content_mapnode_farm(bool repeat)
|
|||
f->fuel_time = 2;
|
||||
f->suffocation_per_second = 0;
|
||||
crafting::set1To2Recipe(CONTENT_CRAFTITEM_CARROT,CONTENT_SEEDS_CARROT);
|
||||
lists::add("craftguide",i);
|
||||
lists::add("creative",i);
|
||||
content_list_add("craftguide",i,1,0);
|
||||
content_list_add("creative",i,1,0);
|
||||
|
||||
i = CONTENT_SEEDS_BEETROOT;
|
||||
f = &content_features(i);
|
||||
|
@ -211,8 +211,8 @@ void content_mapnode_farm(bool repeat)
|
|||
f->fuel_time = 2;
|
||||
f->suffocation_per_second = 0;
|
||||
crafting::set1To2Recipe(CONTENT_CRAFTITEM_BEETROOT,CONTENT_SEEDS_BEETROOT);
|
||||
lists::add("craftguide",i);
|
||||
lists::add("creative",i);
|
||||
content_list_add("craftguide",i,1,0);
|
||||
content_list_add("creative",i,1,0);
|
||||
|
||||
i = CONTENT_SEEDS_GRAPE;
|
||||
f = &content_features(i);
|
||||
|
@ -233,8 +233,8 @@ void content_mapnode_farm(bool repeat)
|
|||
f->fuel_time = 2;
|
||||
f->suffocation_per_second = 0;
|
||||
crafting::set1To2Recipe(CONTENT_CRAFTITEM_GRAPE,CONTENT_SEEDS_GRAPE);
|
||||
lists::add("craftguide",i);
|
||||
lists::add("creative",i);
|
||||
content_list_add("craftguide",i,1,0);
|
||||
content_list_add("creative",i,1,0);
|
||||
|
||||
i = CONTENT_SEEDS_COTTON;
|
||||
f = &content_features(i);
|
||||
|
@ -254,7 +254,7 @@ void content_mapnode_farm(bool repeat)
|
|||
f->pressure_type = CST_CRUSHABLE;
|
||||
f->fuel_time = 2;
|
||||
f->suffocation_per_second = 0;
|
||||
lists::add("creative",i);
|
||||
content_list_add("creative",i,1,0);
|
||||
|
||||
i = CONTENT_FARM_WHEAT;
|
||||
f = &content_features(i);
|
||||
|
@ -310,7 +310,7 @@ void content_mapnode_farm(bool repeat)
|
|||
f->plantgrowth_large_count = 1;
|
||||
f->type = CMT_PLANT;
|
||||
f->hardness = 0.4;
|
||||
lists::add("creative", i);
|
||||
content_list_add("creative",i,1,0);
|
||||
f->pressure_type = CST_CRUSHABLE;
|
||||
|
||||
i = CONTENT_FARM_PUMPKIN_JACK;
|
||||
|
@ -346,8 +346,8 @@ void content_mapnode_farm(bool repeat)
|
|||
f->hardness = 0.4;
|
||||
f->light_source = LIGHT_MAX-1;
|
||||
crafting::set1Any2Recipe(CONTENT_TORCH,CONTENT_FARM_PUMPKIN,CONTENT_FARM_PUMPKIN_JACK);
|
||||
lists::add("creative", i);
|
||||
lists::add("craftguide", i);
|
||||
content_list_add("creative",i,1,0);
|
||||
content_list_add("craftguide",i,1,0);
|
||||
f->pressure_type = CST_CRUSHABLE;
|
||||
|
||||
i = CONTENT_FARM_POTATO;
|
||||
|
|
|
@ -64,8 +64,8 @@ void content_mapnode_furniture(bool repeat)
|
|||
crafting::setRecipe(r,CONTENT_BOOKSHELF,1);
|
||||
}
|
||||
f->pressure_type = CST_SOLID;
|
||||
lists::add("craftguide",i);
|
||||
lists::add("creative",i);
|
||||
content_list_add("craftguide",i,1,0);
|
||||
content_list_add("creative",i,1,0);
|
||||
f->suffocation_per_second = 0;
|
||||
|
||||
i = CONTENT_BOOKSHELF_JUNGLE;
|
||||
|
@ -101,8 +101,8 @@ void content_mapnode_furniture(bool repeat)
|
|||
crafting::setRecipe(r,CONTENT_BOOKSHELF_JUNGLE,1);
|
||||
}
|
||||
f->pressure_type = CST_SOLID;
|
||||
lists::add("craftguide",i);
|
||||
lists::add("creative",i);
|
||||
content_list_add("craftguide",i,1,0);
|
||||
content_list_add("creative",i,1,0);
|
||||
f->suffocation_per_second = 0;
|
||||
|
||||
i = CONTENT_BOOKSHELF_PINE;
|
||||
|
@ -138,8 +138,8 @@ void content_mapnode_furniture(bool repeat)
|
|||
crafting::setRecipe(r,CONTENT_BOOKSHELF_PINE,1);
|
||||
}
|
||||
f->pressure_type = CST_SOLID;
|
||||
lists::add("craftguide",i);
|
||||
lists::add("creative",i);
|
||||
content_list_add("craftguide",i,1,0);
|
||||
content_list_add("creative",i,1,0);
|
||||
f->suffocation_per_second = 0;
|
||||
|
||||
i = CONTENT_COUCH_CENTRE;
|
||||
|
@ -262,8 +262,8 @@ void content_mapnode_furniture(bool repeat)
|
|||
crafting::set1Any2Recipe(CONTENT_COUCH_CHAIR_RED,CONTENT_CRAFTITEM_STARCH,CONTENT_COUCH_CHAIR);
|
||||
crafting::set1Any2Recipe(CONTENT_COUCH_CHAIR_YELLOW,CONTENT_CRAFTITEM_STARCH,CONTENT_COUCH_CHAIR);
|
||||
crafting::set1Any2Recipe(CONTENT_COUCH_CHAIR_BLACK,CONTENT_CRAFTITEM_STARCH,CONTENT_COUCH_CHAIR);
|
||||
lists::add("craftguide",i);
|
||||
lists::add("creative",i);
|
||||
content_list_add("craftguide",i,1,0);
|
||||
content_list_add("creative",i,1,0);
|
||||
f->suffocation_per_second = 0;
|
||||
|
||||
i = CONTENT_COUCH_CENTRE_BLUE;
|
||||
|
@ -380,8 +380,8 @@ void content_mapnode_furniture(bool repeat)
|
|||
f->setInventoryTextureNodeBox(i,"cotton_blue.png", "cotton_blue.png", "cotton_blue.png");
|
||||
crafting::setVRecipe(CONTENT_COTTON_BLUE,CONTENT_COUCH_CHAIR_BLUE,2);
|
||||
crafting::set1Any2Recipe(CONTENT_COUCH_CHAIR,CONTENT_CRAFTITEM_DYE_BLUE,CONTENT_COUCH_CHAIR_BLUE);
|
||||
lists::add("craftguide",i);
|
||||
lists::add("creative",i);
|
||||
content_list_add("craftguide",i,1,0);
|
||||
content_list_add("creative",i,1,0);
|
||||
f->suffocation_per_second = 0;
|
||||
|
||||
i = CONTENT_COUCH_CENTRE_GREEN;
|
||||
|
@ -498,8 +498,8 @@ void content_mapnode_furniture(bool repeat)
|
|||
f->setInventoryTextureNodeBox(i,"cotton_green.png", "cotton_green.png", "cotton_green.png");
|
||||
crafting::setVRecipe(CONTENT_COTTON_GREEN,CONTENT_COUCH_CHAIR_GREEN,2);
|
||||
crafting::set1Any2Recipe(CONTENT_COUCH_CHAIR,CONTENT_CRAFTITEM_DYE_GREEN,CONTENT_COUCH_CHAIR_GREEN);
|
||||
lists::add("craftguide",i);
|
||||
lists::add("creative",i);
|
||||
content_list_add("craftguide",i,1,0);
|
||||
content_list_add("creative",i,1,0);
|
||||
f->suffocation_per_second = 0;
|
||||
|
||||
i = CONTENT_COUCH_CENTRE_ORANGE;
|
||||
|
@ -616,8 +616,8 @@ void content_mapnode_furniture(bool repeat)
|
|||
f->setInventoryTextureNodeBox(i,"cotton_orange.png", "cotton_orange.png", "cotton_orange.png");
|
||||
crafting::setVRecipe(CONTENT_COTTON_ORANGE,CONTENT_COUCH_CHAIR_ORANGE,2);
|
||||
crafting::set1Any2Recipe(CONTENT_COUCH_CHAIR,CONTENT_CRAFTITEM_DYE_ORANGE,CONTENT_COUCH_CHAIR_ORANGE);
|
||||
lists::add("craftguide",i);
|
||||
lists::add("creative",i);
|
||||
content_list_add("craftguide",i,1,0);
|
||||
content_list_add("creative",i,1,0);
|
||||
f->suffocation_per_second = 0;
|
||||
|
||||
i = CONTENT_COUCH_CENTRE_PURPLE;
|
||||
|
@ -734,8 +734,8 @@ void content_mapnode_furniture(bool repeat)
|
|||
f->setInventoryTextureNodeBox(i,"cotton_purple.png", "cotton_purple.png", "cotton_purple.png");
|
||||
crafting::setVRecipe(CONTENT_COTTON_PURPLE,CONTENT_COUCH_CHAIR_PURPLE,2);
|
||||
crafting::set1Any2Recipe(CONTENT_COUCH_CHAIR,CONTENT_CRAFTITEM_DYE_PURPLE,CONTENT_COUCH_CHAIR_PURPLE);
|
||||
lists::add("craftguide",i);
|
||||
lists::add("creative",i);
|
||||
content_list_add("craftguide",i,1,0);
|
||||
content_list_add("creative",i,1,0);
|
||||
f->suffocation_per_second = 0;
|
||||
|
||||
i = CONTENT_COUCH_CENTRE_RED;
|
||||
|
@ -852,8 +852,8 @@ void content_mapnode_furniture(bool repeat)
|
|||
f->setInventoryTextureNodeBox(i,"cotton_red.png", "cotton_red.png", "cotton_red.png");
|
||||
crafting::setVRecipe(CONTENT_COTTON_RED,CONTENT_COUCH_CHAIR_RED,2);
|
||||
crafting::set1Any2Recipe(CONTENT_COUCH_CHAIR,CONTENT_CRAFTITEM_DYE_RED,CONTENT_COUCH_CHAIR_RED);
|
||||
lists::add("craftguide",i);
|
||||
lists::add("creative",i);
|
||||
content_list_add("craftguide",i,1,0);
|
||||
content_list_add("creative",i,1,0);
|
||||
f->suffocation_per_second = 0;
|
||||
|
||||
i = CONTENT_COUCH_CENTRE_YELLOW;
|
||||
|
@ -970,8 +970,8 @@ void content_mapnode_furniture(bool repeat)
|
|||
f->setInventoryTextureNodeBox(i,"cotton_yellow.png", "cotton_yellow.png", "cotton_yellow.png");
|
||||
crafting::setVRecipe(CONTENT_COTTON_YELLOW,CONTENT_COUCH_CHAIR_YELLOW,2);
|
||||
crafting::set1Any2Recipe(CONTENT_COUCH_CHAIR,CONTENT_CRAFTITEM_DYE_YELLOW,CONTENT_COUCH_CHAIR_YELLOW);
|
||||
lists::add("craftguide",i);
|
||||
lists::add("creative",i);
|
||||
content_list_add("craftguide",i,1,0);
|
||||
content_list_add("creative",i,1,0);
|
||||
f->suffocation_per_second = 0;
|
||||
|
||||
i = CONTENT_COUCH_CENTRE_BLACK;
|
||||
|
@ -1088,8 +1088,8 @@ void content_mapnode_furniture(bool repeat)
|
|||
f->setInventoryTextureNodeBox(i,"cotton_black.png", "cotton_black.png", "cotton_black.png");
|
||||
crafting::setVRecipe(CONTENT_COTTON_BLACK,CONTENT_COUCH_CHAIR_BLACK,2);
|
||||
crafting::set1Any2Recipe(CONTENT_COUCH_CHAIR,CONTENT_CRAFTITEM_DYE_BLACK,CONTENT_COUCH_CHAIR_BLACK);
|
||||
lists::add("craftguide",i);
|
||||
lists::add("creative",i);
|
||||
content_list_add("craftguide",i,1,0);
|
||||
content_list_add("creative",i,1,0);
|
||||
f->suffocation_per_second = 0;
|
||||
|
||||
i = CONTENT_CHAIR;
|
||||
|
@ -1121,8 +1121,8 @@ void content_mapnode_furniture(bool repeat)
|
|||
};
|
||||
crafting::setRecipe(r,CONTENT_CHAIR,2);
|
||||
}
|
||||
lists::add("craftguide",i);
|
||||
lists::add("creative",i);
|
||||
content_list_add("craftguide",i,1,0);
|
||||
content_list_add("creative",i,1,0);
|
||||
f->suffocation_per_second = 0;
|
||||
|
||||
i = CONTENT_CHAIR_CENTRE;
|
||||
|
@ -1266,8 +1266,8 @@ void content_mapnode_furniture(bool repeat)
|
|||
};
|
||||
crafting::setRecipe(r,CONTENT_TABLE,1);
|
||||
}
|
||||
lists::add("craftguide",i);
|
||||
lists::add("creative",i);
|
||||
content_list_add("craftguide",i,1,0);
|
||||
content_list_add("creative",i,1,0);
|
||||
f->suffocation_per_second = 0;
|
||||
|
||||
i = CONTENT_BED_HEAD;
|
||||
|
@ -1296,8 +1296,8 @@ void content_mapnode_furniture(bool repeat)
|
|||
f->hardness = 0.25;
|
||||
f->pressure_type = CST_SOLID;
|
||||
crafting::setBedRecipe(CONTENT_COTTON,CONTENT_BED_HEAD);
|
||||
lists::add("craftguide",i);
|
||||
lists::add("creative",i);
|
||||
content_list_add("craftguide",i,1,0);
|
||||
content_list_add("creative",i,1,0);
|
||||
f->suffocation_per_second = 0;
|
||||
if (f->initial_metadata == NULL)
|
||||
f->initial_metadata = new BedNodeMetadata();
|
||||
|
@ -1355,8 +1355,8 @@ void content_mapnode_furniture(bool repeat)
|
|||
f->hardness = 0.25;
|
||||
f->pressure_type = CST_SOLID;
|
||||
crafting::setBedRecipe(CONTENT_COTTON_BLUE,CONTENT_BED_BLUE_HEAD);
|
||||
lists::add("craftguide",i);
|
||||
lists::add("creative",i);
|
||||
content_list_add("craftguide",i,1,0);
|
||||
content_list_add("creative",i,1,0);
|
||||
f->suffocation_per_second = 0;
|
||||
if (f->initial_metadata == NULL)
|
||||
f->initial_metadata = new BedNodeMetadata();
|
||||
|
@ -1414,8 +1414,8 @@ void content_mapnode_furniture(bool repeat)
|
|||
f->hardness = 0.25;
|
||||
f->pressure_type = CST_SOLID;
|
||||
crafting::setBedRecipe(CONTENT_COTTON_GREEN,CONTENT_BED_GREEN_HEAD);
|
||||
lists::add("craftguide",i);
|
||||
lists::add("creative",i);
|
||||
content_list_add("craftguide",i,1,0);
|
||||
content_list_add("creative",i,1,0);
|
||||
f->suffocation_per_second = 0;
|
||||
if (f->initial_metadata == NULL)
|
||||
f->initial_metadata = new BedNodeMetadata();
|
||||
|
@ -1473,8 +1473,8 @@ void content_mapnode_furniture(bool repeat)
|
|||
f->hardness = 0.25;
|
||||
f->pressure_type = CST_SOLID;
|
||||
crafting::setBedRecipe(CONTENT_COTTON_ORANGE,CONTENT_BED_ORANGE_HEAD);
|
||||
lists::add("craftguide",i);
|
||||
lists::add("creative",i);
|
||||
content_list_add("craftguide",i,1,0);
|
||||
content_list_add("creative",i,1,0);
|
||||
f->suffocation_per_second = 0;
|
||||
if (f->initial_metadata == NULL)
|
||||
f->initial_metadata = new BedNodeMetadata();
|
||||
|
@ -1532,8 +1532,8 @@ void content_mapnode_furniture(bool repeat)
|
|||
f->hardness = 0.25;
|
||||
f->pressure_type = CST_SOLID;
|
||||
crafting::setBedRecipe(CONTENT_COTTON_PURPLE,CONTENT_BED_PURPLE_HEAD);
|
||||
lists::add("craftguide",i);
|
||||
lists::add("creative",i);
|
||||
content_list_add("craftguide",i,1,0);
|
||||
content_list_add("creative",i,1,0);
|
||||
f->suffocation_per_second = 0;
|
||||
if (f->initial_metadata == NULL)
|
||||
f->initial_metadata = new BedNodeMetadata();
|
||||
|
@ -1591,8 +1591,8 @@ void content_mapnode_furniture(bool repeat)
|
|||
f->hardness = 0.25;
|
||||
f->pressure_type = CST_SOLID;
|
||||
crafting::setBedRecipe(CONTENT_COTTON_RED,CONTENT_BED_RED_HEAD);
|
||||
lists::add("craftguide",i);
|
||||
lists::add("creative",i);
|
||||
content_list_add("craftguide",i,1,0);
|
||||
content_list_add("creative",i,1,0);
|
||||
f->suffocation_per_second = 0;
|
||||
if (f->initial_metadata == NULL)
|
||||
f->initial_metadata = new BedNodeMetadata();
|
||||
|
@ -1650,8 +1650,8 @@ void content_mapnode_furniture(bool repeat)
|
|||
f->hardness = 0.25;
|
||||
f->pressure_type = CST_SOLID;
|
||||
crafting::setBedRecipe(CONTENT_COTTON_YELLOW,CONTENT_BED_YELLOW_HEAD);
|
||||
lists::add("craftguide",i);
|
||||
lists::add("creative",i);
|
||||
content_list_add("craftguide",i,1,0);
|
||||
content_list_add("creative",i,1,0);
|
||||
f->suffocation_per_second = 0;
|
||||
if (f->initial_metadata == NULL)
|
||||
f->initial_metadata = new BedNodeMetadata();
|
||||
|
@ -1709,8 +1709,8 @@ void content_mapnode_furniture(bool repeat)
|
|||
f->hardness = 0.25;
|
||||
f->pressure_type = CST_SOLID;
|
||||
crafting::setBedRecipe(CONTENT_COTTON_BLACK,CONTENT_BED_BLACK_HEAD);
|
||||
lists::add("craftguide",i);
|
||||
lists::add("creative",i);
|
||||
content_list_add("craftguide",i,1,0);
|
||||
content_list_add("creative",i,1,0);
|
||||
f->suffocation_per_second = 0;
|
||||
if (f->initial_metadata == NULL)
|
||||
f->initial_metadata = new BedNodeMetadata();
|
||||
|
@ -1770,8 +1770,8 @@ void content_mapnode_furniture(bool repeat)
|
|||
};
|
||||
crafting::setRecipe(r,CONTENT_BED_CAMP_HEAD,1);
|
||||
}
|
||||
lists::add("craftguide",i);
|
||||
lists::add("creative",i);
|
||||
content_list_add("craftguide",i,1,0);
|
||||
content_list_add("creative",i,1,0);
|
||||
f->suffocation_per_second = 0;
|
||||
if (f->initial_metadata == NULL)
|
||||
f->initial_metadata = new CampBedNodeMetadata();
|
||||
|
@ -1829,8 +1829,8 @@ void content_mapnode_furniture(bool repeat)
|
|||
crafting::setRecipe(r,CONTENT_PAINTING_WHITE,1);
|
||||
}
|
||||
crafting::set1Any2Recipe(CONTENT_PAINTING_CANVAS,CONTENT_CRAFTITEM_DYE_WHITE,CONTENT_PAINTING_WHITE);
|
||||
lists::add("craftguide",i);
|
||||
lists::add("creative",i);
|
||||
content_list_add("craftguide",i,1,0);
|
||||
content_list_add("creative",i,1,0);
|
||||
f->suffocation_per_second = 0;
|
||||
|
||||
i = CONTENT_PAINTING_RED;
|
||||
|
@ -1863,8 +1863,8 @@ void content_mapnode_furniture(bool repeat)
|
|||
crafting::setRecipe(r,CONTENT_PAINTING_RED,1);
|
||||
}
|
||||
crafting::set1Any2Recipe(CONTENT_PAINTING_CANVAS,CONTENT_CRAFTITEM_DYE_RED,CONTENT_PAINTING_RED);
|
||||
lists::add("craftguide",i);
|
||||
lists::add("creative",i);
|
||||
content_list_add("craftguide",i,1,0);
|
||||
content_list_add("creative",i,1,0);
|
||||
f->suffocation_per_second = 0;
|
||||
|
||||
i = CONTENT_PAINTING_GREEN;
|
||||
|
@ -1897,8 +1897,8 @@ void content_mapnode_furniture(bool repeat)
|
|||
crafting::setRecipe(r,CONTENT_PAINTING_GREEN,1);
|
||||
}
|
||||
crafting::set1Any2Recipe(CONTENT_PAINTING_CANVAS,CONTENT_CRAFTITEM_DYE_GREEN,CONTENT_PAINTING_GREEN);
|
||||
lists::add("craftguide",i);
|
||||
lists::add("creative",i);
|
||||
content_list_add("craftguide",i,1,0);
|
||||
content_list_add("creative",i,1,0);
|
||||
f->suffocation_per_second = 0;
|
||||
|
||||
i = CONTENT_PAINTING_BLUE;
|
||||
|
@ -1931,8 +1931,8 @@ void content_mapnode_furniture(bool repeat)
|
|||
crafting::setRecipe(r,CONTENT_PAINTING_BLUE,1);
|
||||
}
|
||||
crafting::set1Any2Recipe(CONTENT_PAINTING_CANVAS,CONTENT_CRAFTITEM_DYE_BLUE,CONTENT_PAINTING_BLUE);
|
||||
lists::add("craftguide",i);
|
||||
lists::add("creative",i);
|
||||
content_list_add("craftguide",i,1,0);
|
||||
content_list_add("creative",i,1,0);
|
||||
f->suffocation_per_second = 0;
|
||||
|
||||
i = CONTENT_PAINTING_CANVAS;
|
||||
|
@ -1968,8 +1968,8 @@ void content_mapnode_furniture(bool repeat)
|
|||
};
|
||||
crafting::setRecipe(r,CONTENT_PAINTING_CANVAS,1);
|
||||
}
|
||||
lists::add("craftguide",i);
|
||||
lists::add("creative",i);
|
||||
content_list_add("craftguide",i,1,0);
|
||||
content_list_add("creative",i,1,0);
|
||||
f->suffocation_per_second = 0;
|
||||
|
||||
i = CONTENT_CLOCK;
|
||||
|
@ -2003,7 +2003,7 @@ void content_mapnode_furniture(bool repeat)
|
|||
};
|
||||
crafting::setRecipe(r,CONTENT_CLOCK,1);
|
||||
}
|
||||
lists::add("craftguide",i);
|
||||
lists::add("creative",i);
|
||||
content_list_add("craftguide",i,1,0);
|
||||
content_list_add("creative",i,1,0);
|
||||
f->suffocation_per_second = 0;
|
||||
}
|
||||
|
|
|
@ -54,8 +54,8 @@ void content_mapnode_plants(bool repeat)
|
|||
f->ondig_special_drop = CONTENT_WOOD;
|
||||
f->ondig_special_drop_count = 6;
|
||||
f->ondig_special_tool = TT_AXE;
|
||||
lists::add("creative",i);
|
||||
lists::add("cooking",i);
|
||||
content_list_add("creative",i,1,0);
|
||||
content_list_add("cooking",i,1,0);
|
||||
|
||||
i = CONTENT_APPLE_TREE;
|
||||
f = &content_features(i);
|
||||
|
@ -75,8 +75,8 @@ void content_mapnode_plants(bool repeat)
|
|||
f->ondig_special_drop = CONTENT_WOOD;
|
||||
f->ondig_special_drop_count = 6;
|
||||
f->ondig_special_tool = TT_AXE;
|
||||
lists::add("creative",i);
|
||||
lists::add("cooking",i);
|
||||
content_list_add("creative",i,1,0);
|
||||
content_list_add("cooking",i,1,0);
|
||||
|
||||
i = CONTENT_JUNGLETREE;
|
||||
f = &content_features(i);
|
||||
|
@ -96,7 +96,7 @@ void content_mapnode_plants(bool repeat)
|
|||
f->ondig_special_drop = CONTENT_JUNGLEWOOD;
|
||||
f->ondig_special_drop_count = 6;
|
||||
f->ondig_special_tool = TT_AXE;
|
||||
lists::add("creative",i);
|
||||
content_list_add("creative",i,1,0);
|
||||
|
||||
i = CONTENT_CONIFER_TREE;
|
||||
f = &content_features(i);
|
||||
|
@ -116,8 +116,8 @@ void content_mapnode_plants(bool repeat)
|
|||
f->ondig_special_drop = CONTENT_WOOD_PINE;
|
||||
f->ondig_special_drop_count = 6;
|
||||
f->ondig_special_tool = TT_AXE;
|
||||
lists::add("creative",i);
|
||||
lists::add("cooking",i);
|
||||
content_list_add("creative",i,1,0);
|
||||
content_list_add("cooking",i,1,0);
|
||||
|
||||
i = CONTENT_YOUNG_TREE;
|
||||
f = &content_features(i);
|
||||
|
@ -137,7 +137,7 @@ void content_mapnode_plants(bool repeat)
|
|||
f->type = CMT_TREE;
|
||||
f->hardness = 1.0;
|
||||
f->suffocation_per_second = 0;
|
||||
lists::add("creative",i);
|
||||
content_list_add("creative",i,1,0);
|
||||
|
||||
i = CONTENT_YOUNG_JUNGLETREE;
|
||||
f = &content_features(i);
|
||||
|
@ -157,7 +157,7 @@ void content_mapnode_plants(bool repeat)
|
|||
f->type = CMT_TREE;
|
||||
f->hardness = 1.0;
|
||||
f->suffocation_per_second = 0;
|
||||
lists::add("creative",i);
|
||||
content_list_add("creative",i,1,0);
|
||||
|
||||
i = CONTENT_YOUNG_APPLE_TREE;
|
||||
f = &content_features(i);
|
||||
|
@ -177,7 +177,7 @@ void content_mapnode_plants(bool repeat)
|
|||
f->type = CMT_TREE;
|
||||
f->hardness = 1.0;
|
||||
f->suffocation_per_second = 0;
|
||||
lists::add("creative",i);
|
||||
content_list_add("creative",i,1,0);
|
||||
|
||||
i = CONTENT_YOUNG_CONIFER_TREE;
|
||||
f = &content_features(i);
|
||||
|
@ -197,7 +197,7 @@ void content_mapnode_plants(bool repeat)
|
|||
f->type = CMT_TREE;
|
||||
f->hardness = 1.0;
|
||||
f->suffocation_per_second = 0;
|
||||
lists::add("creative",i);
|
||||
content_list_add("creative",i,1,0);
|
||||
|
||||
i = CONTENT_JUNGLEGRASS;
|
||||
f = &content_features(i);
|
||||
|
@ -218,7 +218,7 @@ void content_mapnode_plants(bool repeat)
|
|||
f->hardness = 0.20;
|
||||
f->pressure_type = CST_CRUSHABLE;
|
||||
f->suffocation_per_second = 0;
|
||||
lists::add("creative",i);
|
||||
content_list_add("creative",i,1,0);
|
||||
|
||||
i = CONTENT_JUNGLEFERN;
|
||||
f = &content_features(i);
|
||||
|
@ -239,7 +239,7 @@ void content_mapnode_plants(bool repeat)
|
|||
f->hardness = 0.20;
|
||||
f->pressure_type = CST_CRUSHABLE;
|
||||
f->suffocation_per_second = 0;
|
||||
lists::add("creative",i);
|
||||
content_list_add("creative",i,1,0);
|
||||
|
||||
i = CONTENT_LEAVES;
|
||||
f = &content_features(i);
|
||||
|
@ -270,8 +270,8 @@ void content_mapnode_plants(bool repeat)
|
|||
f->hardness = 0.15;
|
||||
f->pressure_type = CST_CRUSHABLE;
|
||||
f->suffocation_per_second = 0;
|
||||
lists::add("decrafting",i);
|
||||
lists::add("cooking",i);
|
||||
content_list_add("decrafting",i,1,0);
|
||||
content_list_add("cooking",i,1,0);
|
||||
|
||||
i = CONTENT_LEAVES_AUTUMN;
|
||||
f = &content_features(i);
|
||||
|
@ -302,8 +302,8 @@ void content_mapnode_plants(bool repeat)
|
|||
f->hardness = 0.15;
|
||||
f->pressure_type = CST_CRUSHABLE;
|
||||
f->suffocation_per_second = 0;
|
||||
lists::add("decrafting",i);
|
||||
lists::add("cooking",i);
|
||||
content_list_add("decrafting",i,1,0);
|
||||
content_list_add("cooking",i,1,0);
|
||||
|
||||
i = CONTENT_LEAVES_WINTER;
|
||||
f = &content_features(i);
|
||||
|
@ -334,8 +334,8 @@ void content_mapnode_plants(bool repeat)
|
|||
f->hardness = 0.15;
|
||||
f->pressure_type = CST_CRUSHABLE;
|
||||
f->suffocation_per_second = 0;
|
||||
lists::add("decrafting",i);
|
||||
lists::add("cooking",i);
|
||||
content_list_add("decrafting",i,1,0);
|
||||
content_list_add("cooking",i,1,0);
|
||||
|
||||
i = CONTENT_LEAVES_SNOWY;
|
||||
f = &content_features(i);
|
||||
|
@ -366,8 +366,8 @@ void content_mapnode_plants(bool repeat)
|
|||
f->hardness = 0.15;
|
||||
f->pressure_type = CST_CRUSHABLE;
|
||||
f->suffocation_per_second = 0;
|
||||
lists::add("decrafting",i);
|
||||
lists::add("cooking",i);
|
||||
content_list_add("decrafting",i,1,0);
|
||||
content_list_add("cooking",i,1,0);
|
||||
|
||||
i = CONTENT_APPLE_LEAVES;
|
||||
f = &content_features(i);
|
||||
|
@ -399,8 +399,8 @@ void content_mapnode_plants(bool repeat)
|
|||
f->hardness = 0.15;
|
||||
f->pressure_type = CST_CRUSHABLE;
|
||||
f->suffocation_per_second = 0;
|
||||
lists::add("decrafting",i);
|
||||
lists::add("cooking",i);
|
||||
content_list_add("decrafting",i,1,0);
|
||||
content_list_add("cooking",i,1,0);
|
||||
|
||||
i = CONTENT_JUNGLELEAVES;
|
||||
f = &content_features(i);
|
||||
|
@ -431,8 +431,8 @@ void content_mapnode_plants(bool repeat)
|
|||
f->hardness = 0.15;
|
||||
f->pressure_type = CST_CRUSHABLE;
|
||||
f->suffocation_per_second = 0;
|
||||
lists::add("decrafting",i);
|
||||
lists::add("cooking",i);
|
||||
content_list_add("decrafting",i,1,0);
|
||||
content_list_add("cooking",i,1,0);
|
||||
|
||||
i = CONTENT_CONIFER_LEAVES;
|
||||
f = &content_features(i);
|
||||
|
@ -463,8 +463,8 @@ void content_mapnode_plants(bool repeat)
|
|||
f->hardness = 0.15;
|
||||
f->pressure_type = CST_CRUSHABLE;
|
||||
f->suffocation_per_second = 0;
|
||||
lists::add("decrafting",i);
|
||||
lists::add("cooking",i);
|
||||
content_list_add("decrafting",i,1,0);
|
||||
content_list_add("cooking",i,1,0);
|
||||
|
||||
i = CONTENT_TRIMMED_LEAVES;
|
||||
f = &content_features(i);
|
||||
|
@ -488,8 +488,8 @@ void content_mapnode_plants(bool repeat)
|
|||
f->hardness = 0.15;
|
||||
f->pressure_type = CST_CRUSHABLE;
|
||||
f->suffocation_per_second = 0;
|
||||
lists::add("creative",i);
|
||||
lists::add("cooking",i);
|
||||
content_list_add("creative",i,1,0);
|
||||
content_list_add("cooking",i,1,0);
|
||||
|
||||
i = CONTENT_TRIMMED_LEAVES_AUTUMN;
|
||||
f = &content_features(i);
|
||||
|
@ -513,8 +513,8 @@ void content_mapnode_plants(bool repeat)
|
|||
f->hardness = 0.15;
|
||||
f->pressure_type = CST_CRUSHABLE;
|
||||
f->suffocation_per_second = 0;
|
||||
lists::add("creative",i);
|
||||
lists::add("cooking",i);
|
||||
content_list_add("creative",i,1,0);
|
||||
content_list_add("cooking",i,1,0);
|
||||
|
||||
i = CONTENT_TRIMMED_LEAVES_WINTER;
|
||||
f = &content_features(i);
|
||||
|
@ -538,8 +538,8 @@ void content_mapnode_plants(bool repeat)
|
|||
f->hardness = 0.15;
|
||||
f->pressure_type = CST_CRUSHABLE;
|
||||
f->suffocation_per_second = 0;
|
||||
lists::add("creative",i);
|
||||
lists::add("cooking",i);
|
||||
content_list_add("creative",i,1,0);
|
||||
content_list_add("cooking",i,1,0);
|
||||
|
||||
i = CONTENT_TRIMMED_APPLE_LEAVES;
|
||||
f = &content_features(i);
|
||||
|
@ -563,8 +563,8 @@ void content_mapnode_plants(bool repeat)
|
|||
f->hardness = 0.15;
|
||||
f->pressure_type = CST_CRUSHABLE;
|
||||
f->suffocation_per_second = 0;
|
||||
lists::add("creative",i);
|
||||
lists::add("cooking",i);
|
||||
content_list_add("creative",i,1,0);
|
||||
content_list_add("cooking",i,1,0);
|
||||
|
||||
i = CONTENT_TRIMMED_JUNGLE_LEAVES;
|
||||
f = &content_features(i);
|
||||
|
@ -588,8 +588,8 @@ void content_mapnode_plants(bool repeat)
|
|||
f->hardness = 0.15;
|
||||
f->pressure_type = CST_CRUSHABLE;
|
||||
f->suffocation_per_second = 0;
|
||||
lists::add("creative",i);
|
||||
lists::add("cooking",i);
|
||||
content_list_add("creative",i,1,0);
|
||||
content_list_add("cooking",i,1,0);
|
||||
|
||||
i = CONTENT_TRIMMED_CONIFER_LEAVES;
|
||||
f = &content_features(i);
|
||||
|
@ -613,8 +613,8 @@ void content_mapnode_plants(bool repeat)
|
|||
f->hardness = 0.15;
|
||||
f->pressure_type = CST_CRUSHABLE;
|
||||
f->suffocation_per_second = 0;
|
||||
lists::add("creative",i);
|
||||
lists::add("cooking",i);
|
||||
content_list_add("creative",i,1,0);
|
||||
content_list_add("cooking",i,1,0);
|
||||
|
||||
i = CONTENT_APPLE_BLOSSOM;
|
||||
f = &content_features(i);
|
||||
|
@ -639,7 +639,7 @@ void content_mapnode_plants(bool repeat)
|
|||
f->hardness = 0.15;
|
||||
f->pressure_type = CST_CRUSHABLE;
|
||||
f->suffocation_per_second = 0;
|
||||
lists::add("decrafting",i);
|
||||
content_list_add("decrafting",i,1,0);
|
||||
|
||||
i = CONTENT_TRIMMED_APPLE_BLOSSOM;
|
||||
f = &content_features(i);
|
||||
|
@ -661,7 +661,7 @@ void content_mapnode_plants(bool repeat)
|
|||
f->hardness = 0.15;
|
||||
f->pressure_type = CST_CRUSHABLE;
|
||||
f->suffocation_per_second = 0;
|
||||
lists::add("creative",i);
|
||||
content_list_add("creative",i,1,0);
|
||||
|
||||
i = CONTENT_CACTUS_BLOSSOM;
|
||||
f = &content_features(i);
|
||||
|
@ -681,7 +681,7 @@ void content_mapnode_plants(bool repeat)
|
|||
f->hardness = 0.20;
|
||||
f->pressure_type = CST_CRUSHABLE;
|
||||
f->suffocation_per_second = 0;
|
||||
lists::add("creative",i);
|
||||
content_list_add("creative",i,1,0);
|
||||
|
||||
i = CONTENT_CACTUS_FLOWER;
|
||||
f = &content_features(i);
|
||||
|
@ -701,8 +701,8 @@ void content_mapnode_plants(bool repeat)
|
|||
f->hardness = 0.20;
|
||||
f->pressure_type = CST_CRUSHABLE;
|
||||
f->suffocation_per_second = 0;
|
||||
lists::add("creative",i);
|
||||
lists::add("decrafting",i);
|
||||
content_list_add("creative",i,1,0);
|
||||
content_list_add("decrafting",i,1,0);
|
||||
|
||||
i = CONTENT_CACTUS_FRUIT;
|
||||
f = &content_features(i);
|
||||
|
@ -722,7 +722,7 @@ void content_mapnode_plants(bool repeat)
|
|||
f->hardness = 0.20;
|
||||
f->pressure_type = CST_CRUSHABLE;
|
||||
f->suffocation_per_second = 0;
|
||||
lists::add("creative",i);
|
||||
content_list_add("creative",i,1,0);
|
||||
|
||||
i = CONTENT_CACTUS;
|
||||
f = &content_features(i);
|
||||
|
@ -784,7 +784,7 @@ void content_mapnode_plants(bool repeat)
|
|||
f->type = CMT_WOOD;
|
||||
f->hardness = 0.75;
|
||||
f->pressure_type = CST_CRUSHABLE;
|
||||
lists::add("creative",i);
|
||||
content_list_add("creative",i,1,0);
|
||||
|
||||
i = CONTENT_PAPYRUS;
|
||||
f = &content_features(i);
|
||||
|
@ -807,7 +807,7 @@ void content_mapnode_plants(bool repeat)
|
|||
f->hardness = 0.25;
|
||||
f->pressure_type = CST_CRUSHABLE;
|
||||
f->suffocation_per_second = 0;
|
||||
lists::add("creative",i);
|
||||
content_list_add("creative",i,1,0);
|
||||
|
||||
i = CONTENT_SAPLING;
|
||||
f = &content_features(i);
|
||||
|
@ -828,7 +828,7 @@ void content_mapnode_plants(bool repeat)
|
|||
f->pressure_type = CST_CRUSHABLE;
|
||||
f->suffocation_per_second = 0;
|
||||
f->fertilizer_affects = true;
|
||||
lists::add("creative",i);
|
||||
content_list_add("creative",i,1,0);
|
||||
|
||||
i = CONTENT_APPLE_SAPLING;
|
||||
f = &content_features(i);
|
||||
|
@ -849,7 +849,7 @@ void content_mapnode_plants(bool repeat)
|
|||
f->pressure_type = CST_CRUSHABLE;
|
||||
f->suffocation_per_second = 0;
|
||||
f->fertilizer_affects = true;
|
||||
lists::add("creative",i);
|
||||
content_list_add("creative",i,1,0);
|
||||
|
||||
i = CONTENT_JUNGLESAPLING;
|
||||
f = &content_features(i);
|
||||
|
@ -870,7 +870,7 @@ void content_mapnode_plants(bool repeat)
|
|||
f->pressure_type = CST_CRUSHABLE;
|
||||
f->suffocation_per_second = 0;
|
||||
f->fertilizer_affects = true;
|
||||
lists::add("creative",i);
|
||||
content_list_add("creative",i,1,0);
|
||||
|
||||
i = CONTENT_CONIFER_SAPLING;
|
||||
f = &content_features(i);
|
||||
|
@ -891,7 +891,7 @@ void content_mapnode_plants(bool repeat)
|
|||
f->pressure_type = CST_CRUSHABLE;
|
||||
f->suffocation_per_second = 0;
|
||||
f->fertilizer_affects = true;
|
||||
lists::add("creative",i);
|
||||
content_list_add("creative",i,1,0);
|
||||
|
||||
i = CONTENT_APPLE;
|
||||
f = &content_features(i);
|
||||
|
@ -914,7 +914,7 @@ void content_mapnode_plants(bool repeat)
|
|||
f->hardness = 0.0;
|
||||
f->pressure_type = CST_CRUSHABLE;
|
||||
f->suffocation_per_second = 0;
|
||||
lists::add("creative",i);
|
||||
content_list_add("creative",i,1,0);
|
||||
|
||||
// plants
|
||||
i = CONTENT_WILDGRASS_SHORT;
|
||||
|
@ -1027,7 +1027,7 @@ void content_mapnode_plants(bool repeat)
|
|||
f->hardness = 0.10;
|
||||
f->pressure_type = CST_CRUSHABLE;
|
||||
f->suffocation_per_second = 0;
|
||||
lists::add("creative",i);
|
||||
content_list_add("creative",i,1,0);
|
||||
|
||||
i = CONTENT_FLOWER_DAFFODIL;
|
||||
f = &content_features(i);
|
||||
|
@ -1050,7 +1050,7 @@ void content_mapnode_plants(bool repeat)
|
|||
f->hardness = 0.10;
|
||||
f->pressure_type = CST_CRUSHABLE;
|
||||
f->suffocation_per_second = 0;
|
||||
lists::add("creative",i);
|
||||
content_list_add("creative",i,1,0);
|
||||
|
||||
i = CONTENT_FLOWER_TULIP;
|
||||
f = &content_features(i);
|
||||
|
@ -1073,7 +1073,7 @@ void content_mapnode_plants(bool repeat)
|
|||
f->hardness = 0.10;
|
||||
f->pressure_type = CST_CRUSHABLE;
|
||||
f->suffocation_per_second = 0;
|
||||
lists::add("creative",i);
|
||||
content_list_add("creative",i,1,0);
|
||||
|
||||
i = CONTENT_SEEDS_TEA;
|
||||
f = &content_features(i);
|
||||
|
@ -1092,7 +1092,7 @@ void content_mapnode_plants(bool repeat)
|
|||
f->hardness = 0.4;
|
||||
f->pressure_type = CST_CRUSHABLE;
|
||||
f->suffocation_per_second = 0;
|
||||
lists::add("creative",i);
|
||||
content_list_add("creative",i,1,0);
|
||||
|
||||
i = CONTENT_TEA;
|
||||
f = &content_features(i);
|
||||
|
@ -1115,7 +1115,7 @@ void content_mapnode_plants(bool repeat)
|
|||
f->hardness = 0.15;
|
||||
f->pressure_type = CST_CRUSHABLE;
|
||||
f->suffocation_per_second = 0;
|
||||
lists::add("creative",i);
|
||||
content_list_add("creative",i,1,0);
|
||||
|
||||
i = CONTENT_BEANS_COFFEE;
|
||||
f = &content_features(i);
|
||||
|
@ -1135,7 +1135,7 @@ void content_mapnode_plants(bool repeat)
|
|||
f->hardness = 0.4;
|
||||
f->pressure_type = CST_CRUSHABLE;
|
||||
f->suffocation_per_second = 0;
|
||||
lists::add("creative",i);
|
||||
content_list_add("creative",i,1,0);
|
||||
|
||||
i = CONTENT_COFFEE;
|
||||
f = &content_features(i);
|
||||
|
@ -1157,7 +1157,7 @@ void content_mapnode_plants(bool repeat)
|
|||
f->hardness = 0.15;
|
||||
f->pressure_type = CST_CRUSHABLE;
|
||||
f->suffocation_per_second = 0;
|
||||
lists::add("creative",i);
|
||||
content_list_add("creative",i,1,0);
|
||||
|
||||
i = CONTENT_BUSH_BLUEBERRY;
|
||||
f = &content_features(i);
|
||||
|
@ -1187,7 +1187,7 @@ void content_mapnode_plants(bool repeat)
|
|||
f->special_alternate_node = CONTENT_CRAFTITEM_BLUEBERRY;
|
||||
if(f->initial_metadata == NULL)
|
||||
f->initial_metadata = new BushNodeMetadata();
|
||||
lists::add("creative",i);
|
||||
content_list_add("creative",i,1,0);
|
||||
|
||||
i = CONTENT_BUSH_RASPBERRY;
|
||||
f = &content_features(i);
|
||||
|
@ -1217,5 +1217,5 @@ void content_mapnode_plants(bool repeat)
|
|||
f->special_alternate_node = CONTENT_CRAFTITEM_RASPBERRY;
|
||||
if(f->initial_metadata == NULL)
|
||||
f->initial_metadata = new BushNodeMetadata();
|
||||
lists::add("creative",i);
|
||||
content_list_add("creative",i,1,0);
|
||||
}
|
||||
|
|
|
@ -47,8 +47,8 @@ void content_mapnode_slab(bool repeat)
|
|||
f->hardness = 0.9;
|
||||
f->suffocation_per_second = 0;
|
||||
crafting::setRow3Recipe(CONTENT_ROUGHSTONE,CONTENT_ROUGHSTONE_SLAB);
|
||||
lists::add("craftguide",i);
|
||||
lists::add("creative",i);
|
||||
content_list_add("craftguide",i,1,0);
|
||||
content_list_add("creative",i,1,0);
|
||||
|
||||
i = CONTENT_COBBLE_SLAB;
|
||||
f = &content_features(i);
|
||||
|
@ -65,8 +65,8 @@ void content_mapnode_slab(bool repeat)
|
|||
f->hardness = 0.9;
|
||||
f->suffocation_per_second = 0;
|
||||
crafting::setRow3Recipe(CONTENT_COBBLE,CONTENT_COBBLE_SLAB);
|
||||
lists::add("craftguide",i);
|
||||
lists::add("creative",i);
|
||||
content_list_add("craftguide",i,1,0);
|
||||
content_list_add("creative",i,1,0);
|
||||
|
||||
i = CONTENT_MOSSYCOBBLE_SLAB;
|
||||
f = &content_features(i);
|
||||
|
@ -83,8 +83,8 @@ void content_mapnode_slab(bool repeat)
|
|||
f->hardness = 0.8;
|
||||
f->suffocation_per_second = 0;
|
||||
crafting::setRow3Recipe(CONTENT_MOSSYCOBBLE,CONTENT_MOSSYCOBBLE_SLAB);
|
||||
lists::add("craftguide",i);
|
||||
lists::add("creative",i);
|
||||
content_list_add("craftguide",i,1,0);
|
||||
content_list_add("creative",i,1,0);
|
||||
|
||||
i = CONTENT_STONE_SLAB;
|
||||
f = &content_features(i);
|
||||
|
@ -100,8 +100,8 @@ void content_mapnode_slab(bool repeat)
|
|||
f->hardness = 1.0;
|
||||
f->suffocation_per_second = 0;
|
||||
crafting::setRow3Recipe(CONTENT_STONE,CONTENT_STONE_SLAB);
|
||||
lists::add("craftguide",i);
|
||||
lists::add("creative",i);
|
||||
content_list_add("craftguide",i,1,0);
|
||||
content_list_add("creative",i,1,0);
|
||||
|
||||
i = CONTENT_WOOD_SLAB;
|
||||
f = &content_features(i);
|
||||
|
@ -119,8 +119,8 @@ void content_mapnode_slab(bool repeat)
|
|||
f->hardness = 0.75;
|
||||
f->suffocation_per_second = 0;
|
||||
crafting::setRow3Recipe(CONTENT_WOOD,CONTENT_WOOD_SLAB);
|
||||
lists::add("craftguide",i);
|
||||
lists::add("creative",i);
|
||||
content_list_add("craftguide",i,1,0);
|
||||
content_list_add("creative",i,1,0);
|
||||
|
||||
i = CONTENT_JUNGLE_SLAB;
|
||||
f = &content_features(i);
|
||||
|
@ -138,8 +138,8 @@ void content_mapnode_slab(bool repeat)
|
|||
f->hardness = 1.0;
|
||||
f->suffocation_per_second = 0;
|
||||
crafting::setRow3Recipe(CONTENT_JUNGLEWOOD,CONTENT_JUNGLE_SLAB);
|
||||
lists::add("craftguide",i);
|
||||
lists::add("creative",i);
|
||||
content_list_add("craftguide",i,1,0);
|
||||
content_list_add("creative",i,1,0);
|
||||
|
||||
i = CONTENT_BRICK_SLAB;
|
||||
f = &content_features(i);
|
||||
|
@ -159,8 +159,8 @@ void content_mapnode_slab(bool repeat)
|
|||
f->hardness = 1.0;
|
||||
f->suffocation_per_second = 0;
|
||||
crafting::setRow3Recipe(CONTENT_BRICK,CONTENT_BRICK_SLAB);
|
||||
lists::add("craftguide",i);
|
||||
lists::add("creative",i);
|
||||
content_list_add("craftguide",i,1,0);
|
||||
content_list_add("creative",i,1,0);
|
||||
|
||||
i = CONTENT_SANDSTONE_SLAB;
|
||||
f = &content_features(i);
|
||||
|
@ -176,8 +176,8 @@ void content_mapnode_slab(bool repeat)
|
|||
f->hardness = 1.0;
|
||||
f->suffocation_per_second = 0;
|
||||
crafting::setRow3Recipe(CONTENT_SANDSTONE,CONTENT_SANDSTONE_SLAB);
|
||||
lists::add("craftguide",i);
|
||||
lists::add("creative",i);
|
||||
content_list_add("craftguide",i,1,0);
|
||||
content_list_add("creative",i,1,0);
|
||||
|
||||
i = CONTENT_GLASS_SLAB;
|
||||
f = &content_features(i);
|
||||
|
@ -201,8 +201,8 @@ void content_mapnode_slab(bool repeat)
|
|||
f->hardness = 0.15;
|
||||
f->suffocation_per_second = 0;
|
||||
crafting::setRow3Recipe(CONTENT_GLASS,CONTENT_GLASS_SLAB);
|
||||
lists::add("craftguide",i);
|
||||
lists::add("creative",i);
|
||||
content_list_add("craftguide",i,1,0);
|
||||
content_list_add("creative",i,1,0);
|
||||
|
||||
i = CONTENT_GLASS_BLUE_SLAB;
|
||||
f = &content_features(i);
|
||||
|
@ -227,8 +227,8 @@ void content_mapnode_slab(bool repeat)
|
|||
f->suffocation_per_second = 0;
|
||||
crafting::setRow3Recipe(CONTENT_GLASS,CONTENT_GLASS_BLUE_SLAB);
|
||||
crafting::set1Any2Recipe(CONTENT_GLASS_SLAB,CONTENT_CRAFTITEM_DYE_BLUE,CONTENT_GLASS_BLUE_SLAB);
|
||||
lists::add("craftguide",i);
|
||||
lists::add("creative",i);
|
||||
content_list_add("craftguide",i,1,0);
|
||||
content_list_add("creative",i,1,0);
|
||||
|
||||
i = CONTENT_GLASS_GREEN_SLAB;
|
||||
f = &content_features(i);
|
||||
|
@ -253,8 +253,8 @@ void content_mapnode_slab(bool repeat)
|
|||
f->suffocation_per_second = 0;
|
||||
crafting::setRow3Recipe(CONTENT_GLASS,CONTENT_GLASS_GREEN_SLAB);
|
||||
crafting::set1Any2Recipe(CONTENT_GLASS_SLAB,CONTENT_CRAFTITEM_DYE_GREEN,CONTENT_GLASS_GREEN_SLAB);
|
||||
lists::add("craftguide",i);
|
||||
lists::add("creative",i);
|
||||
content_list_add("craftguide",i,1,0);
|
||||
content_list_add("creative",i,1,0);
|
||||
|
||||
i = CONTENT_GLASS_ORANGE_SLAB;
|
||||
f = &content_features(i);
|
||||
|
@ -279,8 +279,8 @@ void content_mapnode_slab(bool repeat)
|
|||
f->suffocation_per_second = 0;
|
||||
crafting::setRow3Recipe(CONTENT_GLASS,CONTENT_GLASS_ORANGE_SLAB);
|
||||
crafting::set1Any2Recipe(CONTENT_GLASS_SLAB,CONTENT_CRAFTITEM_DYE_ORANGE,CONTENT_GLASS_ORANGE_SLAB);
|
||||
lists::add("craftguide",i);
|
||||
lists::add("creative",i);
|
||||
content_list_add("craftguide",i,1,0);
|
||||
content_list_add("creative",i,1,0);
|
||||
|
||||
i = CONTENT_GLASS_PURPLE_SLAB;
|
||||
f = &content_features(i);
|
||||
|
@ -305,8 +305,8 @@ void content_mapnode_slab(bool repeat)
|
|||
f->suffocation_per_second = 0;
|
||||
crafting::setRow3Recipe(CONTENT_GLASS,CONTENT_GLASS_PURPLE_SLAB);
|
||||
crafting::set1Any2Recipe(CONTENT_GLASS_SLAB,CONTENT_CRAFTITEM_DYE_PURPLE,CONTENT_GLASS_PURPLE_SLAB);
|
||||
lists::add("craftguide",i);
|
||||
lists::add("creative",i);
|
||||
content_list_add("craftguide",i,1,0);
|
||||
content_list_add("creative",i,1,0);
|
||||
|
||||
i = CONTENT_GLASS_RED_SLAB;
|
||||
f = &content_features(i);
|
||||
|
@ -331,8 +331,8 @@ void content_mapnode_slab(bool repeat)
|
|||
f->suffocation_per_second = 0;
|
||||
crafting::setRow3Recipe(CONTENT_GLASS,CONTENT_GLASS_RED_SLAB);
|
||||
crafting::set1Any2Recipe(CONTENT_GLASS_SLAB,CONTENT_CRAFTITEM_DYE_RED,CONTENT_GLASS_RED_SLAB);
|
||||
lists::add("craftguide",i);
|
||||
lists::add("creative",i);
|
||||
content_list_add("craftguide",i,1,0);
|
||||
content_list_add("creative",i,1,0);
|
||||
|
||||
i = CONTENT_GLASS_YELLOW_SLAB;
|
||||
f = &content_features(i);
|
||||
|
@ -357,8 +357,8 @@ void content_mapnode_slab(bool repeat)
|
|||
f->suffocation_per_second = 0;
|
||||
crafting::setRow3Recipe(CONTENT_GLASS,CONTENT_GLASS_YELLOW_SLAB);
|
||||
crafting::set1Any2Recipe(CONTENT_GLASS_SLAB,CONTENT_CRAFTITEM_DYE_YELLOW,CONTENT_GLASS_YELLOW_SLAB);
|
||||
lists::add("craftguide",i);
|
||||
lists::add("creative",i);
|
||||
content_list_add("craftguide",i,1,0);
|
||||
content_list_add("creative",i,1,0);
|
||||
|
||||
i = CONTENT_GLASS_BLACK_SLAB;
|
||||
f = &content_features(i);
|
||||
|
@ -383,8 +383,8 @@ void content_mapnode_slab(bool repeat)
|
|||
f->suffocation_per_second = 0;
|
||||
crafting::setRow3Recipe(CONTENT_GLASS,CONTENT_GLASS_BLACK_SLAB);
|
||||
crafting::set1Any2Recipe(CONTENT_GLASS_SLAB,CONTENT_CRAFTITEM_DYE_BLACK,CONTENT_GLASS_BLACK_SLAB);
|
||||
lists::add("craftguide",i);
|
||||
lists::add("creative",i);
|
||||
content_list_add("craftguide",i,1,0);
|
||||
content_list_add("creative",i,1,0);
|
||||
|
||||
i = CONTENT_LIMESTONE_SLAB;
|
||||
f = &content_features(i);
|
||||
|
@ -401,8 +401,8 @@ void content_mapnode_slab(bool repeat)
|
|||
f->hardness = 0.9;
|
||||
f->suffocation_per_second = 0;
|
||||
crafting::setRow3Recipe(CONTENT_LIMESTONE,CONTENT_LIMESTONE_SLAB);
|
||||
lists::add("craftguide",i);
|
||||
lists::add("creative",i);
|
||||
content_list_add("craftguide",i,1,0);
|
||||
content_list_add("creative",i,1,0);
|
||||
|
||||
// upside down slabs
|
||||
i = CONTENT_ROUGHSTONE_SLAB_UD;
|
||||
|
|
|
@ -57,8 +57,8 @@ void content_mapnode_special(bool repeat)
|
|||
content_nodebox_fence(f);
|
||||
f->setInventoryTextureNodeBox(i,"fence.png","fence_top.png","fence.png");
|
||||
crafting::setWallRecipe(CONTENT_CRAFTITEM_WOOD_PLANK,CONTENT_FENCE);
|
||||
lists::add("craftguide",i);
|
||||
lists::add("creative",i);
|
||||
content_list_add("craftguide",i,1,0);
|
||||
content_list_add("creative",i,1,0);
|
||||
|
||||
i = CONTENT_STEEL_FENCE;
|
||||
f = &content_features(i);
|
||||
|
@ -84,8 +84,8 @@ void content_mapnode_special(bool repeat)
|
|||
content_nodebox_fence(f);
|
||||
f->setInventoryTextureNodeBox(i,"fence_steel.png","fence_steel_top.png","fence_steel.png");
|
||||
crafting::setWallRecipe(CONTENT_CRAFTITEM_STEEL_INGOT,CONTENT_STEEL_FENCE);
|
||||
lists::add("craftguide",i);
|
||||
lists::add("creative",i);
|
||||
content_list_add("craftguide",i,1,0);
|
||||
content_list_add("creative",i,1,0);
|
||||
|
||||
i = CONTENT_JUNGLE_FENCE;
|
||||
f = &content_features(i);
|
||||
|
@ -112,8 +112,8 @@ void content_mapnode_special(bool repeat)
|
|||
content_nodebox_fence(f);
|
||||
f->setInventoryTextureNodeBox(i,"fence_jungle.png","fence_jungle_top.png","fence_jungle.png");
|
||||
crafting::setWallRecipe(CONTENT_CRAFTITEM_JUNGLE_PLANK,CONTENT_JUNGLE_FENCE);
|
||||
lists::add("craftguide",i);
|
||||
lists::add("creative",i);
|
||||
content_list_add("craftguide",i,1,0);
|
||||
content_list_add("creative",i,1,0);
|
||||
|
||||
i = CONTENT_PINE_FENCE;
|
||||
f = &content_features(i);
|
||||
|
@ -140,8 +140,8 @@ void content_mapnode_special(bool repeat)
|
|||
content_nodebox_fence(f);
|
||||
f->setInventoryTextureNodeBox(i,"fence_pine.png","fence_pine_top.png","fence_pine.png");
|
||||
crafting::setWallRecipe(CONTENT_CRAFTITEM_PINE_PLANK,CONTENT_PINE_FENCE);
|
||||
lists::add("craftguide",i);
|
||||
lists::add("creative",i);
|
||||
content_list_add("craftguide",i,1,0);
|
||||
content_list_add("creative",i,1,0);
|
||||
|
||||
i = CONTENT_STEEL_BARS;
|
||||
f = &content_features(i);
|
||||
|
@ -168,8 +168,8 @@ void content_mapnode_special(bool repeat)
|
|||
};
|
||||
crafting::setRecipe(r,CONTENT_STEEL_BARS,6);
|
||||
}
|
||||
lists::add("craftguide",i);
|
||||
lists::add("creative",i);
|
||||
content_list_add("craftguide",i,1,0);
|
||||
content_list_add("creative",i,1,0);
|
||||
|
||||
i = CONTENT_RAIL;
|
||||
f = &content_features(i);
|
||||
|
@ -200,8 +200,8 @@ void content_mapnode_special(bool repeat)
|
|||
f->setNodeBox(core::aabbox3d<f32>(
|
||||
-0.5*BS,-0.5*BS,-0.5*BS,0.5*BS,-0.375*BS,0.5*BS
|
||||
));
|
||||
lists::add("craftguide",i);
|
||||
lists::add("creative",i);
|
||||
content_list_add("craftguide",i,1,0);
|
||||
content_list_add("creative",i,1,0);
|
||||
|
||||
i = CONTENT_ROOFTILE_TERRACOTTA;
|
||||
f = &content_features(i);
|
||||
|
@ -216,8 +216,8 @@ void content_mapnode_special(bool repeat)
|
|||
f->suffocation_per_second = 0;
|
||||
content_nodebox_roofcollide(f);
|
||||
crafting::set1over4Recipe(CONTENT_TERRACOTTA,CONTENT_TERRACOTTA,CONTENT_ROOFTILE_TERRACOTTA);
|
||||
lists::add("craftguide",i);
|
||||
lists::add("creative",i);
|
||||
content_list_add("craftguide",i,1,0);
|
||||
content_list_add("creative",i,1,0);
|
||||
|
||||
i = CONTENT_ROOFTILE_WOOD;
|
||||
f = &content_features(i);
|
||||
|
@ -233,8 +233,8 @@ void content_mapnode_special(bool repeat)
|
|||
content_nodebox_roofcollide(f);
|
||||
crafting::set1over4Recipe(CONTENT_WOOD,CONTENT_WOOD,CONTENT_ROOFTILE_WOOD);
|
||||
crafting::set1over4Recipe(CONTENT_JUNGLEWOOD,CONTENT_JUNGLEWOOD,CONTENT_ROOFTILE_WOOD);
|
||||
lists::add("craftguide",i);
|
||||
lists::add("creative",i);
|
||||
content_list_add("craftguide",i,1,0);
|
||||
content_list_add("creative",i,1,0);
|
||||
|
||||
i = CONTENT_ROOFTILE_ASPHALT;
|
||||
f = &content_features(i);
|
||||
|
@ -256,8 +256,8 @@ void content_mapnode_special(bool repeat)
|
|||
};
|
||||
crafting::setRecipe(r,CONTENT_ROOFTILE_ASPHALT,4);
|
||||
}
|
||||
lists::add("craftguide",i);
|
||||
lists::add("creative",i);
|
||||
content_list_add("craftguide",i,1,0);
|
||||
content_list_add("creative",i,1,0);
|
||||
|
||||
i = CONTENT_ROOFTILE_STONE;
|
||||
f = &content_features(i);
|
||||
|
@ -272,8 +272,8 @@ void content_mapnode_special(bool repeat)
|
|||
f->suffocation_per_second = 0;
|
||||
content_nodebox_roofcollide(f);
|
||||
crafting::set1over4Recipe(CONTENT_ROUGHSTONE,CONTENT_ROUGHSTONE,CONTENT_ROOFTILE_STONE);
|
||||
lists::add("craftguide",i);
|
||||
lists::add("creative",i);
|
||||
content_list_add("craftguide",i,1,0);
|
||||
content_list_add("creative",i,1,0);
|
||||
|
||||
i = CONTENT_ROOFTILE_GLASS;
|
||||
f = &content_features(i);
|
||||
|
@ -294,8 +294,8 @@ void content_mapnode_special(bool repeat)
|
|||
f->suffocation_per_second = 0;
|
||||
content_nodebox_roofcollide(f);
|
||||
crafting::set1over4Recipe(CONTENT_GLASS,CONTENT_GLASS,CONTENT_ROOFTILE_GLASS);
|
||||
lists::add("craftguide",i);
|
||||
lists::add("creative",i);
|
||||
content_list_add("craftguide",i,1,0);
|
||||
content_list_add("creative",i,1,0);
|
||||
|
||||
i = CONTENT_ROOFTILE_GLASS_BLUE;
|
||||
f = &content_features(i);
|
||||
|
@ -317,8 +317,8 @@ void content_mapnode_special(bool repeat)
|
|||
content_nodebox_roofcollide(f);
|
||||
crafting::set1over4Recipe(CONTENT_GLASS_BLUE,CONTENT_GLASS_BLUE,CONTENT_ROOFTILE_GLASS_BLUE);
|
||||
crafting::set1Any2Recipe(CONTENT_ROOFTILE_GLASS,CONTENT_CRAFTITEM_DYE_BLUE,CONTENT_ROOFTILE_GLASS_BLUE);
|
||||
lists::add("craftguide",i);
|
||||
lists::add("creative",i);
|
||||
content_list_add("craftguide",i,1,0);
|
||||
content_list_add("creative",i,1,0);
|
||||
|
||||
i = CONTENT_ROOFTILE_GLASS_GREEN;
|
||||
f = &content_features(i);
|
||||
|
@ -340,8 +340,8 @@ void content_mapnode_special(bool repeat)
|
|||
content_nodebox_roofcollide(f);
|
||||
crafting::set1over4Recipe(CONTENT_GLASS_GREEN,CONTENT_GLASS_GREEN,CONTENT_ROOFTILE_GLASS_GREEN);
|
||||
crafting::set1Any2Recipe(CONTENT_ROOFTILE_GLASS,CONTENT_CRAFTITEM_DYE_GREEN,CONTENT_ROOFTILE_GLASS_GREEN);
|
||||
lists::add("craftguide",i);
|
||||
lists::add("creative",i);
|
||||
content_list_add("craftguide",i,1,0);
|
||||
content_list_add("creative",i,1,0);
|
||||
|
||||
i = CONTENT_ROOFTILE_GLASS_ORANGE;
|
||||
f = &content_features(i);
|
||||
|
@ -363,8 +363,8 @@ void content_mapnode_special(bool repeat)
|
|||
content_nodebox_roofcollide(f);
|
||||
crafting::set1over4Recipe(CONTENT_GLASS_ORANGE,CONTENT_GLASS_ORANGE,CONTENT_ROOFTILE_GLASS_ORANGE);
|
||||
crafting::set1Any2Recipe(CONTENT_ROOFTILE_GLASS,CONTENT_CRAFTITEM_DYE_ORANGE,CONTENT_ROOFTILE_GLASS_ORANGE);
|
||||
lists::add("craftguide",i);
|
||||
lists::add("creative",i);
|
||||
content_list_add("craftguide",i,1,0);
|
||||
content_list_add("creative",i,1,0);
|
||||
|
||||
i = CONTENT_ROOFTILE_GLASS_PURPLE;
|
||||
f = &content_features(i);
|
||||
|
@ -386,8 +386,8 @@ void content_mapnode_special(bool repeat)
|
|||
content_nodebox_roofcollide(f);
|
||||
crafting::set1over4Recipe(CONTENT_GLASS_PURPLE,CONTENT_GLASS_PURPLE,CONTENT_ROOFTILE_GLASS_PURPLE);
|
||||
crafting::set1Any2Recipe(CONTENT_ROOFTILE_GLASS,CONTENT_CRAFTITEM_DYE_PURPLE,CONTENT_ROOFTILE_GLASS_PURPLE);
|
||||
lists::add("craftguide",i);
|
||||
lists::add("creative",i);
|
||||
content_list_add("craftguide",i,1,0);
|
||||
content_list_add("creative",i,1,0);
|
||||
|
||||
i = CONTENT_ROOFTILE_GLASS_RED;
|
||||
f = &content_features(i);
|
||||
|
@ -409,8 +409,8 @@ void content_mapnode_special(bool repeat)
|
|||
content_nodebox_roofcollide(f);
|
||||
crafting::set1over4Recipe(CONTENT_GLASS_RED,CONTENT_GLASS_RED,CONTENT_ROOFTILE_GLASS_RED);
|
||||
crafting::set1Any2Recipe(CONTENT_ROOFTILE_GLASS,CONTENT_CRAFTITEM_DYE_RED,CONTENT_ROOFTILE_GLASS_RED);
|
||||
lists::add("craftguide",i);
|
||||
lists::add("creative",i);
|
||||
content_list_add("craftguide",i,1,0);
|
||||
content_list_add("creative",i,1,0);
|
||||
|
||||
i = CONTENT_ROOFTILE_GLASS_YELLOW;
|
||||
f = &content_features(i);
|
||||
|
@ -432,8 +432,8 @@ void content_mapnode_special(bool repeat)
|
|||
content_nodebox_roofcollide(f);
|
||||
crafting::set1over4Recipe(CONTENT_GLASS_YELLOW,CONTENT_GLASS_YELLOW,CONTENT_ROOFTILE_GLASS_YELLOW);
|
||||
crafting::set1Any2Recipe(CONTENT_ROOFTILE_GLASS,CONTENT_CRAFTITEM_DYE_YELLOW,CONTENT_ROOFTILE_GLASS_YELLOW);
|
||||
lists::add("craftguide",i);
|
||||
lists::add("creative",i);
|
||||
content_list_add("craftguide",i,1,0);
|
||||
content_list_add("creative",i,1,0);
|
||||
|
||||
i = CONTENT_ROOFTILE_GLASS_BLACK;
|
||||
f = &content_features(i);
|
||||
|
@ -455,8 +455,8 @@ void content_mapnode_special(bool repeat)
|
|||
content_nodebox_roofcollide(f);
|
||||
crafting::set1over4Recipe(CONTENT_GLASS_BLACK,CONTENT_GLASS_BLACK,CONTENT_ROOFTILE_GLASS_BLACK);
|
||||
crafting::set1Any2Recipe(CONTENT_ROOFTILE_GLASS,CONTENT_CRAFTITEM_DYE_BLACK,CONTENT_ROOFTILE_GLASS_BLACK);
|
||||
lists::add("craftguide",i);
|
||||
lists::add("creative",i);
|
||||
content_list_add("craftguide",i,1,0);
|
||||
content_list_add("creative",i,1,0);
|
||||
|
||||
i = CONTENT_ROOFTILE_THATCH;
|
||||
f = &content_features(i);
|
||||
|
@ -473,8 +473,8 @@ void content_mapnode_special(bool repeat)
|
|||
crafting::set1over4Recipe(CONTENT_DEADGRASS,CONTENT_DEADGRASS,CONTENT_ROOFTILE_THATCH);
|
||||
crafting::set1over4Recipe(CONTENT_WILDGRASS_SHORT,CONTENT_WILDGRASS_SHORT,CONTENT_ROOFTILE_THATCH);
|
||||
crafting::set1over4Recipe(CONTENT_JUNGLEGRASS,CONTENT_JUNGLEGRASS,CONTENT_ROOFTILE_THATCH);
|
||||
lists::add("craftguide",i);
|
||||
lists::add("creative",i);
|
||||
content_list_add("craftguide",i,1,0);
|
||||
content_list_add("creative",i,1,0);
|
||||
|
||||
i = CONTENT_LADDER_WALL;
|
||||
f = &content_features(i);
|
||||
|
@ -532,8 +532,8 @@ void content_mapnode_special(bool repeat)
|
|||
r[8] = CONTENT_CRAFTITEM_JUNGLE_PLANK;
|
||||
crafting::setRecipe(r,CONTENT_LADDER_WALL,4);
|
||||
}
|
||||
lists::add("craftguide",i);
|
||||
lists::add("creative",i);
|
||||
content_list_add("craftguide",i,1,0);
|
||||
content_list_add("creative",i,1,0);
|
||||
|
||||
i = CONTENT_LADDER_FLOOR;
|
||||
f = &content_features(i);
|
||||
|
@ -626,9 +626,9 @@ void content_mapnode_special(bool repeat)
|
|||
};
|
||||
crafting::setRecipe(r,CONTENT_BORDERSTONE,1);
|
||||
}
|
||||
lists::add("craftguide",i);
|
||||
lists::add("player-creative",i);
|
||||
lists::add("creative",i);
|
||||
content_list_add("craftguide",i,1,0);
|
||||
content_list_add("player-creative",i,1,0);
|
||||
content_list_add("creative",i,1,0);
|
||||
|
||||
i = CONTENT_BOOK;
|
||||
f = &content_features(i);
|
||||
|
@ -656,8 +656,8 @@ void content_mapnode_special(bool repeat)
|
|||
f->pressure_type = CST_CRUSHABLE;
|
||||
f->suffocation_per_second = 0;
|
||||
crafting::setCol1Recipe(CONTENT_CRAFTITEM_PAPER,i);
|
||||
lists::add("craftguide",i);
|
||||
lists::add("creative",i);
|
||||
content_list_add("craftguide",i,1,0);
|
||||
content_list_add("creative",i,1,0);
|
||||
if (f->initial_metadata == NULL)
|
||||
f->initial_metadata = new ClosedBookNodeMetadata();
|
||||
|
||||
|
@ -687,8 +687,8 @@ void content_mapnode_special(bool repeat)
|
|||
f->suffocation_per_second = 0;
|
||||
crafting::set1Any2Recipe(CONTENT_BOOK,CONTENT_CRAFTITEM_COAL,i);
|
||||
crafting::set1Any2Recipe(CONTENT_BOOK,CONTENT_CRAFTITEM_CHARCOAL,i);
|
||||
lists::add("craftguide",i);
|
||||
lists::add("creative",i);
|
||||
content_list_add("craftguide",i,1,0);
|
||||
content_list_add("creative",i,1,0);
|
||||
if (f->initial_metadata == NULL)
|
||||
f->initial_metadata = new ClosedBookNodeMetadata();
|
||||
|
||||
|
@ -717,8 +717,8 @@ void content_mapnode_special(bool repeat)
|
|||
f->pressure_type = CST_CRUSHABLE;
|
||||
f->suffocation_per_second = 0;
|
||||
crafting::set1Any2Recipe(CONTENT_BOOK,CONTENT_CRAFTITEM_GUNPOWDER,i);
|
||||
lists::add("craftguide",i);
|
||||
lists::add("creative",i);
|
||||
content_list_add("craftguide",i,1,0);
|
||||
content_list_add("creative",i,1,0);
|
||||
if (f->initial_metadata == NULL)
|
||||
f->initial_metadata = new ClosedBookNodeMetadata();
|
||||
|
||||
|
@ -750,8 +750,8 @@ void content_mapnode_special(bool repeat)
|
|||
crafting::set1Any2Recipe(CONTENT_BOOK,CONTENT_CRAFTITEM_STEEL_INGOT,i);
|
||||
if (f->initial_metadata == NULL)
|
||||
f->initial_metadata = new ClosedBookNodeMetadata();
|
||||
lists::add("craftguide",i);
|
||||
lists::add("creative",i);
|
||||
content_list_add("craftguide",i,1,0);
|
||||
content_list_add("creative",i,1,0);
|
||||
|
||||
i = CONTENT_CRAFT_BOOK;
|
||||
f = &content_features(i);
|
||||
|
@ -789,8 +789,8 @@ void content_mapnode_special(bool repeat)
|
|||
}
|
||||
if (f->initial_metadata == NULL)
|
||||
f->initial_metadata = new ClosedBookNodeMetadata();
|
||||
lists::add("craftguide",i);
|
||||
lists::add("creative",i);
|
||||
content_list_add("craftguide",i,1,0);
|
||||
content_list_add("creative",i,1,0);
|
||||
|
||||
i = CONTENT_RCRAFT_BOOK;
|
||||
f = &content_features(i);
|
||||
|
@ -826,8 +826,8 @@ void content_mapnode_special(bool repeat)
|
|||
}
|
||||
if (f->initial_metadata == NULL)
|
||||
f->initial_metadata = new ClosedBookNodeMetadata();
|
||||
lists::add("craftguide",i);
|
||||
lists::add("creative",i);
|
||||
content_list_add("craftguide",i,1,0);
|
||||
content_list_add("creative",i,1,0);
|
||||
|
||||
i = CONTENT_BOOK_OPEN;
|
||||
f = &content_features(i);
|
||||
|
@ -1055,9 +1055,9 @@ void content_mapnode_special(bool repeat)
|
|||
f->suffocation_per_second = 0;
|
||||
crafting::set1over4Recipe(CONTENT_CRAFTITEM_COAL,CONTENT_CRAFTITEM_STICK,CONTENT_TORCH);
|
||||
crafting::set1over4Recipe(CONTENT_CRAFTITEM_CHARCOAL,CONTENT_CRAFTITEM_STICK,CONTENT_TORCH);
|
||||
lists::add("craftguide",i);
|
||||
lists::add("player-creative",i);
|
||||
lists::add("creative",i);
|
||||
content_list_add("craftguide",i,1,0);
|
||||
content_list_add("player-creative",i,1,0);
|
||||
content_list_add("creative",i,1,0);
|
||||
|
||||
i = CONTENT_SIGN_WALL;
|
||||
f = &content_features(i);
|
||||
|
@ -1115,8 +1115,8 @@ void content_mapnode_special(bool repeat)
|
|||
crafting::setSignRecipe(CONTENT_CRAFTITEM_WOOD_PLANK,CONTENT_SIGN);
|
||||
crafting::setSignRecipe(CONTENT_CRAFTITEM_PINE_PLANK,CONTENT_SIGN);
|
||||
crafting::setSignRecipe(CONTENT_CRAFTITEM_JUNGLE_PLANK,CONTENT_SIGN);
|
||||
lists::add("craftguide",i);
|
||||
lists::add("creative",i);
|
||||
content_list_add("craftguide",i,1,0);
|
||||
content_list_add("creative",i,1,0);
|
||||
|
||||
i = CONTENT_SIGN_UD;
|
||||
f = &content_features(i);
|
||||
|
@ -1205,8 +1205,8 @@ void content_mapnode_special(bool repeat)
|
|||
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);
|
||||
lists::add("craftguide",i);
|
||||
lists::add("creative",i);
|
||||
content_list_add("craftguide",i,1,0);
|
||||
content_list_add("creative",i,1,0);
|
||||
|
||||
i = CONTENT_LOCKABLE_SIGN_UD;
|
||||
f = &content_features(i);
|
||||
|
@ -1258,8 +1258,8 @@ void content_mapnode_special(bool repeat)
|
|||
f->alternate_lockstate_node = CONTENT_LOCKABLE_CHEST;
|
||||
crafting::setRoundRecipe(CONTENT_WOOD,CONTENT_CHEST);
|
||||
crafting::setRoundRecipe(CONTENT_JUNGLEWOOD,CONTENT_CHEST);
|
||||
lists::add("craftguide",i);
|
||||
lists::add("creative",i);
|
||||
content_list_add("craftguide",i,1,0);
|
||||
content_list_add("creative",i,1,0);
|
||||
|
||||
i = CONTENT_CREATIVE_CHEST;
|
||||
f = &content_features(i);
|
||||
|
@ -1279,8 +1279,8 @@ void content_mapnode_special(bool repeat)
|
|||
f->type = CMT_WOOD;
|
||||
f->hardness = 1.0;
|
||||
f->pressure_type = CST_SOLID;
|
||||
lists::add("player-creative",i);
|
||||
lists::add("creative",i);
|
||||
content_list_add("player-creative",i,1,0);
|
||||
content_list_add("creative",i,1,0);
|
||||
|
||||
i = CONTENT_LOCKABLE_CHEST;
|
||||
f = &content_features(i);
|
||||
|
@ -1310,8 +1310,8 @@ void content_mapnode_special(bool repeat)
|
|||
crafting::setFilledRoundRecipe(CONTENT_WOOD,CONTENT_CRAFTITEM_SILVER_INGOT,CONTENT_LOCKABLE_CHEST);
|
||||
crafting::setFilledRoundRecipe(CONTENT_JUNGLEWOOD,CONTENT_CRAFTITEM_SILVER_INGOT,CONTENT_LOCKABLE_CHEST);
|
||||
crafting::set1Any2Recipe(CONTENT_CHEST,CONTENT_CRAFTITEM_SILVER_INGOT,CONTENT_LOCKABLE_CHEST);
|
||||
lists::add("craftguide",i);
|
||||
lists::add("creative",i);
|
||||
content_list_add("craftguide",i,1,0);
|
||||
content_list_add("creative",i,1,0);
|
||||
|
||||
i = CONTENT_SAFE;
|
||||
f = &content_features(i);
|
||||
|
@ -1332,8 +1332,8 @@ void content_mapnode_special(bool repeat)
|
|||
f->pressure_type = CST_SOLID;
|
||||
f->destructive_mob_safe = true;
|
||||
crafting::setFilledRoundRecipe(CONTENT_CRAFTITEM_STEEL_INGOT,CONTENT_CRAFTITEM_COPPER_INGOT,CONTENT_SAFE);
|
||||
lists::add("craftguide",i);
|
||||
lists::add("creative",i);
|
||||
content_list_add("craftguide",i,1,0);
|
||||
content_list_add("creative",i,1,0);
|
||||
|
||||
i = CONTENT_FURNACE;
|
||||
f = &content_features(i);
|
||||
|
@ -1358,8 +1358,8 @@ void content_mapnode_special(bool repeat)
|
|||
f->pressure_type = CST_SOLID;
|
||||
f->alternate_lockstate_node = CONTENT_LOCKABLE_FURNACE;
|
||||
crafting::setRoundRecipe(CONTENT_ROUGHSTONE,CONTENT_FURNACE);
|
||||
lists::add("craftguide",i);
|
||||
lists::add("creative",i);
|
||||
content_list_add("craftguide",i,1,0);
|
||||
content_list_add("creative",i,1,0);
|
||||
|
||||
i = CONTENT_FURNACE_ACTIVE;
|
||||
f = &content_features(i);
|
||||
|
@ -1403,8 +1403,8 @@ void content_mapnode_special(bool repeat)
|
|||
f->alternate_lockstate_node = CONTENT_FURNACE;
|
||||
crafting::setFilledRoundRecipe(CONTENT_ROUGHSTONE,CONTENT_CRAFTITEM_STEEL_INGOT,CONTENT_LOCKABLE_FURNACE);
|
||||
crafting::set1Any2Recipe(CONTENT_FURNACE,CONTENT_CRAFTITEM_STEEL_INGOT,CONTENT_LOCKABLE_FURNACE);
|
||||
lists::add("craftguide",i);
|
||||
lists::add("creative",i);
|
||||
content_list_add("craftguide",i,1,0);
|
||||
content_list_add("creative",i,1,0);
|
||||
|
||||
i = CONTENT_LOCKABLE_FURNACE_ACTIVE;
|
||||
f = &content_features(i);
|
||||
|
@ -1446,8 +1446,8 @@ void content_mapnode_special(bool repeat)
|
|||
f->hardness = 0.4;
|
||||
f->pressure_type = CST_SOLID;
|
||||
crafting::setFilledRoundRecipe(CONTENT_ROUGHSTONE,CONTENT_CRAFTITEM_MITHRIL_UNBOUND,CONTENT_INCINERATOR);
|
||||
lists::add("craftguide",i);
|
||||
lists::add("creative",i);
|
||||
content_list_add("craftguide",i,1,0);
|
||||
content_list_add("creative",i,1,0);
|
||||
|
||||
i = CONTENT_INCINERATOR_ACTIVE;
|
||||
f = &content_features(i);
|
||||
|
@ -1506,8 +1506,8 @@ void content_mapnode_special(bool repeat)
|
|||
};
|
||||
crafting::setRecipe(r,CONTENT_CAMPFIRE,1);
|
||||
}
|
||||
lists::add("craftguide",i);
|
||||
lists::add("creative",i);
|
||||
content_list_add("craftguide",i,1,0);
|
||||
content_list_add("creative",i,1,0);
|
||||
|
||||
|
||||
|
||||
|
@ -1523,7 +1523,7 @@ void content_mapnode_special(bool repeat)
|
|||
f->dug_item = std::string("MaterialItem2 ")+itos(i)+" 1";
|
||||
f->type = CMT_STONE;
|
||||
f->hardness = 3.0;
|
||||
lists::add("creative",i);
|
||||
content_list_add("creative",i,1,0);
|
||||
|
||||
i = CONTENT_NC_RB;
|
||||
f = &content_features(i);
|
||||
|
@ -1534,7 +1534,7 @@ void content_mapnode_special(bool repeat)
|
|||
f->dug_item = std::string("MaterialItem2 ")+itos(i)+" 1";
|
||||
f->type = CMT_STONE;
|
||||
f->hardness = 3.0;
|
||||
lists::add("creative",i);
|
||||
content_list_add("creative",i,1,0);
|
||||
|
||||
i = CONTENT_FLOWER_POT_RAW;
|
||||
f = &content_features(i);
|
||||
|
@ -1554,8 +1554,8 @@ void content_mapnode_special(bool repeat)
|
|||
content_nodebox_flower_pot(f);
|
||||
f->setInventoryTextureNodeBox(i,"flower_pot_raw_top.png","flower_pot_raw.png","flower_pot_raw.png");
|
||||
crafting::setVRecipe(CONTENT_CRAFTITEM_CLAY,CONTENT_FLOWER_POT_RAW);
|
||||
lists::add("craftguide",i);
|
||||
lists::add("cooking",i);
|
||||
content_list_add("craftguide",i,1,0);
|
||||
content_list_add("cooking",i,1,0);
|
||||
|
||||
i = CONTENT_FLOWER_POT;
|
||||
f = &content_features(i);
|
||||
|
@ -1572,7 +1572,7 @@ void content_mapnode_special(bool repeat)
|
|||
f->hardness = 0.75;
|
||||
content_nodebox_flower_pot(f);
|
||||
f->setInventoryTextureNodeBox(i,"flower_pot_top.png","flower_pot.png","flower_pot.png");
|
||||
lists::add("creative",i);
|
||||
content_list_add("creative",i,1,0);
|
||||
|
||||
// walls
|
||||
i = CONTENT_COBBLE_WALL;
|
||||
|
@ -1595,8 +1595,8 @@ void content_mapnode_special(bool repeat)
|
|||
f->hardness = 0.9;
|
||||
f->suffocation_per_second = 0;
|
||||
crafting::setWallRecipe(CONTENT_COBBLE,CONTENT_COBBLE_WALL);
|
||||
lists::add("craftguide",i);
|
||||
lists::add("creative",i);
|
||||
content_list_add("craftguide",i,1,0);
|
||||
content_list_add("creative",i,1,0);
|
||||
|
||||
i = CONTENT_ROUGHSTONE_WALL;
|
||||
f = &content_features(i);
|
||||
|
@ -1618,8 +1618,8 @@ void content_mapnode_special(bool repeat)
|
|||
f->hardness = 0.9;
|
||||
f->suffocation_per_second = 0;
|
||||
crafting::setWallRecipe(CONTENT_ROUGHSTONE,CONTENT_ROUGHSTONE_WALL);
|
||||
lists::add("craftguide",i);
|
||||
lists::add("creative",i);
|
||||
content_list_add("craftguide",i,1,0);
|
||||
content_list_add("creative",i,1,0);
|
||||
|
||||
i = CONTENT_MOSSYCOBBLE_WALL;
|
||||
f = &content_features(i);
|
||||
|
@ -1641,8 +1641,8 @@ void content_mapnode_special(bool repeat)
|
|||
f->hardness = 0.8;
|
||||
f->suffocation_per_second = 0;
|
||||
crafting::setWallRecipe(CONTENT_MOSSYCOBBLE,CONTENT_MOSSYCOBBLE_WALL);
|
||||
lists::add("craftguide",i);
|
||||
lists::add("creative",i);
|
||||
content_list_add("craftguide",i,1,0);
|
||||
content_list_add("creative",i,1,0);
|
||||
|
||||
i = CONTENT_STONE_WALL;
|
||||
f = &content_features(i);
|
||||
|
@ -1664,8 +1664,8 @@ void content_mapnode_special(bool repeat)
|
|||
f->hardness = 1.0;
|
||||
f->suffocation_per_second = 0;
|
||||
crafting::setWallRecipe(CONTENT_STONE,CONTENT_STONE_WALL);
|
||||
lists::add("craftguide",i);
|
||||
lists::add("creative",i);
|
||||
content_list_add("craftguide",i,1,0);
|
||||
content_list_add("creative",i,1,0);
|
||||
|
||||
i = CONTENT_SANDSTONE_WALL;
|
||||
f = &content_features(i);
|
||||
|
@ -1687,8 +1687,8 @@ void content_mapnode_special(bool repeat)
|
|||
f->hardness = 1.0;
|
||||
f->suffocation_per_second = 0;
|
||||
crafting::setWallRecipe(CONTENT_SANDSTONE,CONTENT_SANDSTONE_WALL);
|
||||
lists::add("craftguide",i);
|
||||
lists::add("creative",i);
|
||||
content_list_add("craftguide",i,1,0);
|
||||
content_list_add("creative",i,1,0);
|
||||
|
||||
i = CONTENT_LIMESTONE_WALL;
|
||||
f = &content_features(i);
|
||||
|
@ -1710,8 +1710,8 @@ void content_mapnode_special(bool repeat)
|
|||
f->hardness = 0.9;
|
||||
f->suffocation_per_second = 0;
|
||||
crafting::setWallRecipe(CONTENT_LIMESTONE,CONTENT_LIMESTONE_WALL);
|
||||
lists::add("craftguide",i);
|
||||
lists::add("creative",i);
|
||||
content_list_add("craftguide",i,1,0);
|
||||
content_list_add("creative",i,1,0);
|
||||
|
||||
i = CONTENT_MARBLE_WALL;
|
||||
f = &content_features(i);
|
||||
|
@ -1733,8 +1733,8 @@ void content_mapnode_special(bool repeat)
|
|||
f->hardness = 1.0;
|
||||
f->suffocation_per_second = 0;
|
||||
crafting::setWallRecipe(CONTENT_MARBLE,CONTENT_MARBLE_WALL);
|
||||
lists::add("craftguide",i);
|
||||
lists::add("creative",i);
|
||||
content_list_add("craftguide",i,1,0);
|
||||
content_list_add("creative",i,1,0);
|
||||
|
||||
i = CONTENT_TNT;
|
||||
f = &content_features(i);
|
||||
|
@ -1753,8 +1753,8 @@ void content_mapnode_special(bool repeat)
|
|||
f->hardness = 1.0;
|
||||
f->suffocation_per_second = 0;
|
||||
crafting::setSoftBlockRecipe(CONTENT_CRAFTITEM_TNT,CONTENT_TNT);
|
||||
lists::add("craftguide",i);
|
||||
lists::add("creative",i);
|
||||
content_list_add("craftguide",i,1,0);
|
||||
content_list_add("creative",i,1,0);
|
||||
|
||||
i = CONTENT_FLASH;
|
||||
f = &content_features(i);
|
||||
|
@ -1837,8 +1837,8 @@ void content_mapnode_special(bool repeat)
|
|||
crafting::set1Any2Recipe(CONTENT_FLAG_BLACK,CONTENT_CRAFTITEM_STARCH,CONTENT_FLAG);
|
||||
if(f->initial_metadata == NULL)
|
||||
f->initial_metadata = new FlagNodeMetadata();
|
||||
lists::add("craftguide",i);
|
||||
lists::add("creative",i);
|
||||
content_list_add("craftguide",i,1,0);
|
||||
content_list_add("creative",i,1,0);
|
||||
|
||||
i = CONTENT_FLAG_BLUE;
|
||||
f = &content_features(i);
|
||||
|
@ -1861,8 +1861,8 @@ void content_mapnode_special(bool repeat)
|
|||
crafting::set1Any2Recipe(CONTENT_FLAG,CONTENT_CRAFTITEM_DYE_BLUE,CONTENT_FLAG_BLUE);
|
||||
if(f->initial_metadata == NULL)
|
||||
f->initial_metadata = new FlagNodeMetadata();
|
||||
lists::add("craftguide",i);
|
||||
lists::add("creative",i);
|
||||
content_list_add("craftguide",i,1,0);
|
||||
content_list_add("creative",i,1,0);
|
||||
|
||||
i = CONTENT_FLAG_GREEN;
|
||||
f = &content_features(i);
|
||||
|
@ -1885,8 +1885,8 @@ void content_mapnode_special(bool repeat)
|
|||
crafting::set1Any2Recipe(CONTENT_FLAG,CONTENT_CRAFTITEM_DYE_GREEN,CONTENT_FLAG_GREEN);
|
||||
if(f->initial_metadata == NULL)
|
||||
f->initial_metadata = new FlagNodeMetadata();
|
||||
lists::add("craftguide",i);
|
||||
lists::add("creative",i);
|
||||
content_list_add("craftguide",i,1,0);
|
||||
content_list_add("creative",i,1,0);
|
||||
|
||||
i = CONTENT_FLAG_ORANGE;
|
||||
f = &content_features(i);
|
||||
|
@ -1909,8 +1909,8 @@ void content_mapnode_special(bool repeat)
|
|||
crafting::set1Any2Recipe(CONTENT_FLAG,CONTENT_CRAFTITEM_DYE_ORANGE,CONTENT_FLAG_ORANGE);
|
||||
if(f->initial_metadata == NULL)
|
||||
f->initial_metadata = new FlagNodeMetadata();
|
||||
lists::add("craftguide",i);
|
||||
lists::add("creative",i);
|
||||
content_list_add("craftguide",i,1,0);
|
||||
content_list_add("creative",i,1,0);
|
||||
|
||||
i = CONTENT_FLAG_PURPLE;
|
||||
f = &content_features(i);
|
||||
|
@ -1933,8 +1933,8 @@ void content_mapnode_special(bool repeat)
|
|||
crafting::set1Any2Recipe(CONTENT_FLAG,CONTENT_CRAFTITEM_DYE_PURPLE,CONTENT_FLAG_PURPLE);
|
||||
if(f->initial_metadata == NULL)
|
||||
f->initial_metadata = new FlagNodeMetadata();
|
||||
lists::add("craftguide",i);
|
||||
lists::add("creative",i);
|
||||
content_list_add("craftguide",i,1,0);
|
||||
content_list_add("creative",i,1,0);
|
||||
|
||||
i = CONTENT_FLAG_RED;
|
||||
f = &content_features(i);
|
||||
|
@ -1957,8 +1957,8 @@ void content_mapnode_special(bool repeat)
|
|||
crafting::set1Any2Recipe(CONTENT_FLAG,CONTENT_CRAFTITEM_DYE_RED,CONTENT_FLAG_RED);
|
||||
if(f->initial_metadata == NULL)
|
||||
f->initial_metadata = new FlagNodeMetadata();
|
||||
lists::add("craftguide",i);
|
||||
lists::add("creative",i);
|
||||
content_list_add("craftguide",i,1,0);
|
||||
content_list_add("creative",i,1,0);
|
||||
|
||||
i = CONTENT_FLAG_YELLOW;
|
||||
f = &content_features(i);
|
||||
|
@ -1981,8 +1981,8 @@ void content_mapnode_special(bool repeat)
|
|||
crafting::set1Any2Recipe(CONTENT_FLAG,CONTENT_CRAFTITEM_DYE_YELLOW,CONTENT_FLAG_YELLOW);
|
||||
if(f->initial_metadata == NULL)
|
||||
f->initial_metadata = new FlagNodeMetadata();
|
||||
lists::add("craftguide",i);
|
||||
lists::add("creative",i);
|
||||
content_list_add("craftguide",i,1,0);
|
||||
content_list_add("creative",i,1,0);
|
||||
|
||||
i = CONTENT_FLAG_BLACK;
|
||||
f = &content_features(i);
|
||||
|
@ -2005,8 +2005,8 @@ void content_mapnode_special(bool repeat)
|
|||
crafting::set1Any2Recipe(CONTENT_FLAG,CONTENT_CRAFTITEM_DYE_BLACK,CONTENT_FLAG_BLACK);
|
||||
if(f->initial_metadata == NULL)
|
||||
f->initial_metadata = new FlagNodeMetadata();
|
||||
lists::add("craftguide",i);
|
||||
lists::add("creative",i);
|
||||
content_list_add("craftguide",i,1,0);
|
||||
content_list_add("creative",i,1,0);
|
||||
|
||||
i = CONTENT_LIFE_SUPPORT;
|
||||
f = &content_features(i);
|
||||
|
@ -2029,8 +2029,8 @@ void content_mapnode_special(bool repeat)
|
|||
};
|
||||
crafting::setRecipe(r,CONTENT_LIFE_SUPPORT,1);
|
||||
}
|
||||
lists::add("craftguide",i);
|
||||
lists::add("creative",i);
|
||||
content_list_add("craftguide",i,1,0);
|
||||
content_list_add("creative",i,1,0);
|
||||
|
||||
i = CONTENT_PARCEL;
|
||||
f = &content_features(i);
|
||||
|
@ -2073,8 +2073,8 @@ void content_mapnode_special(bool repeat)
|
|||
f->initial_metadata = new CauldronNodeMetadata();
|
||||
crafting::setDeepURecipe(CONTENT_CRAFTITEM_STEEL_INGOT,CONTENT_CAULDRON);
|
||||
f->pressure_type = CST_SOLID;
|
||||
lists::add("craftguide",i);
|
||||
lists::add("creative",i);
|
||||
content_list_add("craftguide",i,1,0);
|
||||
content_list_add("creative",i,1,0);
|
||||
f->suffocation_per_second = 0;
|
||||
|
||||
i = CONTENT_FORGE;
|
||||
|
@ -2100,8 +2100,8 @@ void content_mapnode_special(bool repeat)
|
|||
crafting::setRecipe(r,CONTENT_FORGE,1);
|
||||
}
|
||||
f->pressure_type = CST_SOLID;
|
||||
lists::add("craftguide",i);
|
||||
lists::add("creative",i);
|
||||
content_list_add("craftguide",i,1,0);
|
||||
content_list_add("creative",i,1,0);
|
||||
f->suffocation_per_second = 0;
|
||||
|
||||
i = CONTENT_FORGE_FIRE;
|
||||
|
@ -2153,7 +2153,7 @@ void content_mapnode_special(bool repeat)
|
|||
};
|
||||
crafting::setRecipe(r,CONTENT_SCAFFOLDING,1);
|
||||
}
|
||||
lists::add("cooking",i);
|
||||
lists::add("craftguide",i);
|
||||
lists::add("creative",i);
|
||||
content_list_add("cooking",i,1,0);
|
||||
content_list_add("craftguide",i,1,0);
|
||||
content_list_add("creative",i,1,0);
|
||||
}
|
||||
|
|
|
@ -47,8 +47,8 @@ void content_mapnode_stair(bool repeat)
|
|||
f->onpunch_replace_node = CONTENT_ROUGHSTONE_STAIR_CORNER;
|
||||
f->onpunch_replace_respects_borderstone = true;
|
||||
crafting::setStairRecipe(CONTENT_ROUGHSTONE,CONTENT_ROUGHSTONE_STAIR);
|
||||
lists::add("craftguide",i);
|
||||
lists::add("creative",i);
|
||||
content_list_add("craftguide",i,1,0);
|
||||
content_list_add("creative",i,1,0);
|
||||
|
||||
i = CONTENT_COBBLE_STAIR;
|
||||
f = &content_features(i);
|
||||
|
@ -65,8 +65,8 @@ void content_mapnode_stair(bool repeat)
|
|||
f->onpunch_replace_node = CONTENT_COBBLE_STAIR_CORNER;
|
||||
f->onpunch_replace_respects_borderstone = true;
|
||||
crafting::setStairRecipe(CONTENT_COBBLE,CONTENT_COBBLE_STAIR);
|
||||
lists::add("craftguide",i);
|
||||
lists::add("creative",i);
|
||||
content_list_add("craftguide",i,1,0);
|
||||
content_list_add("creative",i,1,0);
|
||||
|
||||
i = CONTENT_MOSSYCOBBLE_STAIR;
|
||||
f = &content_features(i);
|
||||
|
@ -83,8 +83,8 @@ void content_mapnode_stair(bool repeat)
|
|||
f->onpunch_replace_node = CONTENT_MOSSYCOBBLE_STAIR_CORNER;
|
||||
f->onpunch_replace_respects_borderstone = true;
|
||||
crafting::setStairRecipe(CONTENT_MOSSYCOBBLE,CONTENT_MOSSYCOBBLE_STAIR);
|
||||
lists::add("craftguide",i);
|
||||
lists::add("creative",i);
|
||||
content_list_add("craftguide",i,1,0);
|
||||
content_list_add("creative",i,1,0);
|
||||
|
||||
i = CONTENT_STONE_STAIR;
|
||||
f = &content_features(i);
|
||||
|
@ -102,8 +102,8 @@ void content_mapnode_stair(bool repeat)
|
|||
f->onpunch_replace_node = CONTENT_STONE_STAIR_CORNER;
|
||||
f->onpunch_replace_respects_borderstone = true;
|
||||
crafting::setStairRecipe(CONTENT_STONE,CONTENT_STONE_STAIR);
|
||||
lists::add("craftguide",i);
|
||||
lists::add("creative",i);
|
||||
content_list_add("craftguide",i,1,0);
|
||||
content_list_add("creative",i,1,0);
|
||||
|
||||
i = CONTENT_WOOD_STAIR;
|
||||
f = &content_features(i);
|
||||
|
@ -122,8 +122,8 @@ void content_mapnode_stair(bool repeat)
|
|||
f->onpunch_replace_node = CONTENT_WOOD_STAIR_CORNER;
|
||||
f->onpunch_replace_respects_borderstone = true;
|
||||
crafting::setStairRecipe(CONTENT_WOOD,CONTENT_WOOD_STAIR);
|
||||
lists::add("craftguide",i);
|
||||
lists::add("creative",i);
|
||||
content_list_add("craftguide",i,1,0);
|
||||
content_list_add("creative",i,1,0);
|
||||
|
||||
i = CONTENT_JUNGLE_STAIR;
|
||||
f = &content_features(i);
|
||||
|
@ -142,8 +142,8 @@ void content_mapnode_stair(bool repeat)
|
|||
f->onpunch_replace_node = CONTENT_JUNGLE_STAIR_CORNER;
|
||||
f->onpunch_replace_respects_borderstone = true;
|
||||
crafting::setStairRecipe(CONTENT_JUNGLEWOOD,CONTENT_JUNGLE_STAIR);
|
||||
lists::add("craftguide",i);
|
||||
lists::add("creative",i);
|
||||
content_list_add("craftguide",i,1,0);
|
||||
content_list_add("creative",i,1,0);
|
||||
|
||||
i = CONTENT_BRICK_STAIR;
|
||||
f = &content_features(i);
|
||||
|
@ -165,8 +165,8 @@ void content_mapnode_stair(bool repeat)
|
|||
f->onpunch_replace_node = CONTENT_BRICK_STAIR_CORNER;
|
||||
f->onpunch_replace_respects_borderstone = true;
|
||||
crafting::setStairRecipe(CONTENT_BRICK,CONTENT_BRICK_STAIR);
|
||||
lists::add("craftguide",i);
|
||||
lists::add("creative",i);
|
||||
content_list_add("craftguide",i,1,0);
|
||||
content_list_add("creative",i,1,0);
|
||||
|
||||
i = CONTENT_SANDSTONE_STAIR;
|
||||
f = &content_features(i);
|
||||
|
@ -183,8 +183,8 @@ void content_mapnode_stair(bool repeat)
|
|||
f->onpunch_replace_node = CONTENT_SANDSTONE_STAIR_CORNER;
|
||||
f->onpunch_replace_respects_borderstone = true;
|
||||
crafting::setStairRecipe(CONTENT_SANDSTONE,CONTENT_SANDSTONE_STAIR);
|
||||
lists::add("craftguide",i);
|
||||
lists::add("creative",i);
|
||||
content_list_add("craftguide",i,1,0);
|
||||
content_list_add("creative",i,1,0);
|
||||
|
||||
i = CONTENT_LIMESTONE_STAIR;
|
||||
f = &content_features(i);
|
||||
|
@ -201,8 +201,8 @@ void content_mapnode_stair(bool repeat)
|
|||
f->onpunch_replace_node = CONTENT_LIMESTONE_STAIR_CORNER;
|
||||
f->onpunch_replace_respects_borderstone = true;
|
||||
crafting::setStairRecipe(CONTENT_LIMESTONE,CONTENT_LIMESTONE_STAIR);
|
||||
lists::add("craftguide",i);
|
||||
lists::add("creative",i);
|
||||
content_list_add("craftguide",i,1,0);
|
||||
content_list_add("creative",i,1,0);
|
||||
|
||||
// upside down stairs
|
||||
i = CONTENT_ROUGHSTONE_STAIR_UD;
|
||||
|
@ -348,9 +348,9 @@ void content_mapnode_stair(bool repeat)
|
|||
f->onpunch_replace_node = CONTENT_LIMESTONE_STAIR_CORNER_UD;
|
||||
f->onpunch_replace_respects_borderstone = true;
|
||||
f->suffocation_per_second = 0;
|
||||
|
||||
|
||||
// Stairs' corners
|
||||
|
||||
|
||||
i = CONTENT_ROUGHSTONE_STAIR_CORNER;
|
||||
f = &content_features(i);
|
||||
f->param_type = CPT_FACEDIR_SIMPLE;
|
||||
|
@ -367,8 +367,8 @@ void content_mapnode_stair(bool repeat)
|
|||
f->hardness = 0.9;
|
||||
f->onpunch_replace_node = CONTENT_ROUGHSTONE_INNER_STAIR_CORNER;
|
||||
f->onpunch_replace_respects_borderstone = true;
|
||||
|
||||
|
||||
|
||||
|
||||
i = CONTENT_COBBLE_STAIR_CORNER;
|
||||
f = &content_features(i);
|
||||
f->param_type = CPT_FACEDIR_SIMPLE;
|
||||
|
@ -385,8 +385,8 @@ void content_mapnode_stair(bool repeat)
|
|||
f->hardness = 0.9;
|
||||
f->onpunch_replace_node = CONTENT_COBBLE_INNER_STAIR_CORNER;
|
||||
f->onpunch_replace_respects_borderstone = true;
|
||||
|
||||
|
||||
|
||||
|
||||
i = CONTENT_MOSSYCOBBLE_STAIR_CORNER;
|
||||
f = &content_features(i);
|
||||
f->param_type = CPT_FACEDIR_SIMPLE;
|
||||
|
@ -403,8 +403,8 @@ void content_mapnode_stair(bool repeat)
|
|||
f->hardness = 0.8;
|
||||
f->onpunch_replace_node = CONTENT_MOSSYCOBBLE_INNER_STAIR_CORNER;
|
||||
f->onpunch_replace_respects_borderstone = true;
|
||||
|
||||
|
||||
|
||||
|
||||
i = CONTENT_STONE_STAIR_CORNER;
|
||||
f = &content_features(i);
|
||||
f->param_type = CPT_FACEDIR_SIMPLE;
|
||||
|
@ -517,9 +517,9 @@ void content_mapnode_stair(bool repeat)
|
|||
f->hardness = 0.9;
|
||||
f->onpunch_replace_node = CONTENT_LIMESTONE_INNER_STAIR_CORNER;
|
||||
f->onpunch_replace_respects_borderstone = true;
|
||||
|
||||
|
||||
// Upside down stairs' corners
|
||||
|
||||
|
||||
i = CONTENT_ROUGHSTONE_STAIR_CORNER_UD;
|
||||
f = &content_features(i);
|
||||
f->param_type = CPT_FACEDIR_SIMPLE;
|
||||
|
@ -536,8 +536,8 @@ void content_mapnode_stair(bool repeat)
|
|||
f->hardness = 0.9;
|
||||
f->onpunch_replace_node = CONTENT_ROUGHSTONE_INNER_STAIR_CORNER_UD;
|
||||
f->onpunch_replace_respects_borderstone = true;
|
||||
|
||||
|
||||
|
||||
|
||||
i = CONTENT_COBBLE_STAIR_CORNER_UD;
|
||||
f = &content_features(i);
|
||||
f->param_type = CPT_FACEDIR_SIMPLE;
|
||||
|
@ -553,8 +553,8 @@ void content_mapnode_stair(bool repeat)
|
|||
f->type = CMT_STONE;
|
||||
f->hardness = 0.9;
|
||||
f->onpunch_replace_node = CONTENT_COBBLE_INNER_STAIR_CORNER_UD;
|
||||
f->onpunch_replace_respects_borderstone = true;
|
||||
|
||||
f->onpunch_replace_respects_borderstone = true;
|
||||
|
||||
i = CONTENT_MOSSYCOBBLE_STAIR_CORNER_UD;
|
||||
f = &content_features(i);
|
||||
f->param_type = CPT_FACEDIR_SIMPLE;
|
||||
|
@ -571,7 +571,7 @@ void content_mapnode_stair(bool repeat)
|
|||
f->hardness = 0.8;
|
||||
f->onpunch_replace_node = CONTENT_MOSSYCOBBLE_INNER_STAIR_CORNER_UD;
|
||||
f->onpunch_replace_respects_borderstone = true;
|
||||
|
||||
|
||||
i = CONTENT_STONE_STAIR_CORNER_UD;
|
||||
f = &content_features(i);
|
||||
f->param_type = CPT_FACEDIR_SIMPLE;
|
||||
|
@ -683,7 +683,7 @@ void content_mapnode_stair(bool repeat)
|
|||
f->onpunch_replace_respects_borderstone = true;
|
||||
|
||||
// Inner stairs' corners
|
||||
|
||||
|
||||
i = CONTENT_ROUGHSTONE_INNER_STAIR_CORNER;
|
||||
f = &content_features(i);
|
||||
f->param_type = CPT_FACEDIR_SIMPLE;
|
||||
|
@ -700,7 +700,7 @@ void content_mapnode_stair(bool repeat)
|
|||
f->hardness = 0.9;
|
||||
f->onpunch_replace_node = CONTENT_ROUGHSTONE_STAIR;
|
||||
f->onpunch_replace_respects_borderstone = true;
|
||||
|
||||
|
||||
i = CONTENT_COBBLE_INNER_STAIR_CORNER;
|
||||
f = &content_features(i);
|
||||
f->param_type = CPT_FACEDIR_SIMPLE;
|
||||
|
@ -717,8 +717,8 @@ void content_mapnode_stair(bool repeat)
|
|||
f->hardness = 0.9;
|
||||
f->onpunch_replace_node = CONTENT_COBBLE_STAIR;
|
||||
f->onpunch_replace_respects_borderstone = true;
|
||||
|
||||
|
||||
|
||||
|
||||
i = CONTENT_MOSSYCOBBLE_INNER_STAIR_CORNER;
|
||||
f = &content_features(i);
|
||||
f->param_type = CPT_FACEDIR_SIMPLE;
|
||||
|
@ -735,7 +735,7 @@ void content_mapnode_stair(bool repeat)
|
|||
f->hardness = 0.8;
|
||||
f->onpunch_replace_node = CONTENT_MOSSYCOBBLE_STAIR;
|
||||
f->onpunch_replace_respects_borderstone = true;
|
||||
|
||||
|
||||
i = CONTENT_STONE_INNER_STAIR_CORNER;
|
||||
f = &content_features(i);
|
||||
f->param_type = CPT_FACEDIR_SIMPLE;
|
||||
|
@ -847,9 +847,9 @@ void content_mapnode_stair(bool repeat)
|
|||
f->hardness = 0.9;
|
||||
f->onpunch_replace_node = CONTENT_LIMESTONE_STAIR;
|
||||
f->onpunch_replace_respects_borderstone = true;
|
||||
|
||||
|
||||
// Upside down inner stairs' corners
|
||||
|
||||
|
||||
i = CONTENT_ROUGHSTONE_INNER_STAIR_CORNER_UD;
|
||||
f = &content_features(i);
|
||||
f->param_type = CPT_FACEDIR_SIMPLE;
|
||||
|
@ -866,8 +866,8 @@ void content_mapnode_stair(bool repeat)
|
|||
f->hardness = 0.9;
|
||||
f->onpunch_replace_node = CONTENT_ROUGHSTONE_STAIR_UD;
|
||||
f->onpunch_replace_respects_borderstone = true;
|
||||
|
||||
|
||||
|
||||
|
||||
i = CONTENT_COBBLE_INNER_STAIR_CORNER_UD;
|
||||
f = &content_features(i);
|
||||
f->param_type = CPT_FACEDIR_SIMPLE;
|
||||
|
@ -884,8 +884,8 @@ void content_mapnode_stair(bool repeat)
|
|||
f->hardness = 0.9;
|
||||
f->onpunch_replace_node = CONTENT_COBBLE_STAIR_UD;
|
||||
f->onpunch_replace_respects_borderstone = true;
|
||||
|
||||
|
||||
|
||||
|
||||
i = CONTENT_MOSSYCOBBLE_INNER_STAIR_CORNER_UD;
|
||||
f = &content_features(i);
|
||||
f->param_type = CPT_FACEDIR_SIMPLE;
|
||||
|
@ -902,8 +902,8 @@ void content_mapnode_stair(bool repeat)
|
|||
f->hardness = 0.8;
|
||||
f->onpunch_replace_node = CONTENT_MOSSYCOBBLE_STAIR_UD;
|
||||
f->onpunch_replace_respects_borderstone = true;
|
||||
|
||||
|
||||
|
||||
|
||||
i = CONTENT_STONE_INNER_STAIR_CORNER_UD;
|
||||
f = &content_features(i);
|
||||
f->param_type = CPT_FACEDIR_SIMPLE;
|
||||
|
|
|
@ -47,7 +47,7 @@ void content_nodedef_knob(content_t nodeid, content_t source_node, ContentMateri
|
|||
}
|
||||
content_nodebox_knob(features);
|
||||
features->setInventoryTextureNodeBox(nodeid,texture,texture,texture);
|
||||
lists::add("craftguide",nodeid);
|
||||
lists::add("creative",nodeid);
|
||||
content_list_add("craftguide",nodeid,1,0);
|
||||
content_list_add("creative",nodeid,1,0);
|
||||
}
|
||||
|
||||
|
|
|
@ -374,7 +374,7 @@ void content_mob_init()
|
|||
f->spawn_group = 3;
|
||||
f->spawn_naturally = true;
|
||||
f->setCollisionBox(aabb3f(-BS/3.,0.0,-BS/3., BS/3.,BS/2.,BS/3.));
|
||||
lists::add("creative",CONTENT_TOOLITEM_MOB_SPAWNER,1,i);
|
||||
content_list_add("creative",CONTENT_TOOLITEM_MOB_SPAWNER,1,i);
|
||||
|
||||
i = CONTENT_MOB_FIREFLY;
|
||||
f = &g_content_mob_features[i&~CONTENT_MOB_MASK];
|
||||
|
@ -393,7 +393,7 @@ void content_mob_init()
|
|||
f->spawn_max_height = 50;
|
||||
f->spawn_naturally = false;
|
||||
f->setCollisionBox(aabb3f(-BS/4.,-BS/6.,-BS/4., BS/4.,BS/6.,BS/4.));
|
||||
lists::add("creative",CONTENT_TOOLITEM_MOB_SPAWNER,1,i);
|
||||
content_list_add("creative",CONTENT_TOOLITEM_MOB_SPAWNER,1,i);
|
||||
|
||||
i = CONTENT_MOB_OERKKI;
|
||||
f = &g_content_mob_features[i&~CONTENT_MOB_MASK];
|
||||
|
@ -414,7 +414,7 @@ void content_mob_init()
|
|||
f->attack_player_damage = 15;
|
||||
f->attack_player_range = v3f(1,1,1);
|
||||
f->setCollisionBox(aabb3f(-BS/3.,0.0,-BS/3., BS/3.,BS*2.,BS/3.));
|
||||
lists::add("creative",CONTENT_TOOLITEM_MOB_SPAWNER,1,i);
|
||||
content_list_add("creative",CONTENT_TOOLITEM_MOB_SPAWNER,1,i);
|
||||
|
||||
i = CONTENT_MOB_DUNGEON_MASTER;
|
||||
f = &g_content_mob_features[i&~CONTENT_MOB_MASK];
|
||||
|
@ -435,7 +435,7 @@ void content_mob_init()
|
|||
f->attack_glow_light = LIGHT_MAX-1;
|
||||
f->attack_throw_offset = v3f(0,1.4,-1.0);
|
||||
f->setCollisionBox(aabb3f(-0.75*BS, 0.*BS, -0.75*BS, 0.75*BS, 2.0*BS, 0.75*BS));
|
||||
lists::add("creative",CONTENT_TOOLITEM_MOB_SPAWNER,1,i);
|
||||
content_list_add("creative",CONTENT_TOOLITEM_MOB_SPAWNER,1,i);
|
||||
|
||||
i = CONTENT_MOB_FIREBALL;
|
||||
f = &g_content_mob_features[i&~CONTENT_MOB_MASK];
|
||||
|
@ -479,7 +479,7 @@ void content_mob_init()
|
|||
f->spawn_max_height = 40;
|
||||
f->spawn_group = 3;
|
||||
f->setCollisionBox(aabb3f(-0.6*BS, 0., -0.6*BS, 0.6*BS, 1.25*BS, 0.6*BS));
|
||||
lists::add("creative",CONTENT_TOOLITEM_MOB_SPAWNER,1,i);
|
||||
content_list_add("creative",CONTENT_TOOLITEM_MOB_SPAWNER,1,i);
|
||||
|
||||
i = CONTENT_MOB_STAG;
|
||||
f = &g_content_mob_features[i&~CONTENT_MOB_MASK];
|
||||
|
@ -508,7 +508,7 @@ void content_mob_init()
|
|||
f->attack_player_damage = 15;
|
||||
f->attack_player_range = v3f(1,1,1);
|
||||
f->setCollisionBox(aabb3f(-0.7*BS, 0., -0.7*BS, 0.7*BS, 1.5*BS, 0.7*BS));
|
||||
lists::add("creative",CONTENT_TOOLITEM_MOB_SPAWNER,1,i);
|
||||
content_list_add("creative",CONTENT_TOOLITEM_MOB_SPAWNER,1,i);
|
||||
|
||||
i = CONTENT_MOB_TAMESTAG;
|
||||
f = &g_content_mob_features[i&~CONTENT_MOB_MASK];
|
||||
|
@ -557,7 +557,7 @@ void content_mob_init()
|
|||
f->spawn_water = true;
|
||||
f->hp = 5;
|
||||
f->setCollisionBox(aabb3f(-0.25*BS, 0.25*BS, -0.25*BS, 0.25*BS, 0.75*BS, 0.25*BS));
|
||||
lists::add("creative",CONTENT_TOOLITEM_MOB_SPAWNER,1,i);
|
||||
content_list_add("creative",CONTENT_TOOLITEM_MOB_SPAWNER,1,i);
|
||||
|
||||
i = CONTENT_MOB_SHARK;
|
||||
f = &g_content_mob_features[i&~CONTENT_MOB_MASK];
|
||||
|
@ -582,7 +582,7 @@ void content_mob_init()
|
|||
f->attack_player_damage = 15;
|
||||
f->attack_player_range = v3f(1,1,1);
|
||||
f->setCollisionBox(aabb3f(-0.75*BS, 0., -0.75*BS, 0.75*BS, 1.*BS, 0.75*BS));
|
||||
lists::add("creative",CONTENT_TOOLITEM_MOB_SPAWNER,1,i);
|
||||
content_list_add("creative",CONTENT_TOOLITEM_MOB_SPAWNER,1,i);
|
||||
|
||||
i = CONTENT_MOB_WOLF;
|
||||
f = &g_content_mob_features[i&~CONTENT_MOB_MASK];
|
||||
|
@ -610,7 +610,7 @@ void content_mob_init()
|
|||
f->attack_player_damage = 15;
|
||||
f->attack_player_range = v3f(1,1,1);
|
||||
f->setCollisionBox(aabb3f(-0.5*BS, 0., -0.5*BS, 0.5*BS, 1.*BS, 0.5*BS));
|
||||
lists::add("creative",CONTENT_TOOLITEM_MOB_SPAWNER,1,i);
|
||||
content_list_add("creative",CONTENT_TOOLITEM_MOB_SPAWNER,1,i);
|
||||
|
||||
i = CONTENT_MOB_TAMEWOLF;
|
||||
f = &g_content_mob_features[i&~CONTENT_MOB_MASK];
|
||||
|
@ -636,7 +636,7 @@ void content_mob_init()
|
|||
f->attack_mob_range = v3f(1,1,1);
|
||||
f->spawn_naturally = false;
|
||||
f->setCollisionBox(aabb3f(-0.5*BS, 0., -0.5*BS, 0.5*BS, 1.*BS, 0.5*BS));
|
||||
lists::add("creative",CONTENT_TOOLITEM_MOB_SPAWNER,1,i);
|
||||
content_list_add("creative",CONTENT_TOOLITEM_MOB_SPAWNER,1,i);
|
||||
|
||||
i = CONTENT_MOB_SHEEP;
|
||||
f = &g_content_mob_features[i&~CONTENT_MOB_MASK];
|
||||
|
@ -668,7 +668,7 @@ void content_mob_init()
|
|||
f->spawn_max_height = 50;
|
||||
f->spawn_group = 4;
|
||||
f->setCollisionBox(aabb3f(-0.4*BS, 0., -0.4*BS, 0.4*BS, 1.*BS, 0.4*BS));
|
||||
lists::add("creative",CONTENT_TOOLITEM_MOB_SPAWNER,1,i);
|
||||
content_list_add("creative",CONTENT_TOOLITEM_MOB_SPAWNER,1,i);
|
||||
|
||||
i = CONTENT_MOB_SHEARED_SHEEP;
|
||||
f = &g_content_mob_features[i&~CONTENT_MOB_MASK];
|
||||
|
@ -693,7 +693,7 @@ void content_mob_init()
|
|||
f->sound_random_extra = "mob-ducksheep-env";
|
||||
f->spawn_naturally = false;
|
||||
f->setCollisionBox(aabb3f(-0.4*BS, 0., -0.4*BS, 0.4*BS, 1.*BS, 0.4*BS));
|
||||
lists::add("creative",CONTENT_TOOLITEM_MOB_SPAWNER,1,i);
|
||||
content_list_add("creative",CONTENT_TOOLITEM_MOB_SPAWNER,1,i);
|
||||
|
||||
i = CONTENT_MOB_SNOWBALL;
|
||||
f = &g_content_mob_features[i&~CONTENT_MOB_MASK];
|
||||
|
@ -756,7 +756,7 @@ void content_mob_init()
|
|||
f->attack_player_damage = 1;
|
||||
f->attack_player_range = v3f(1,1,1);
|
||||
f->setCollisionBox(aabb3f(-0.6*BS, 0., -0.6*BS, 0.6*BS, 1.25*BS, 0.6*BS));
|
||||
lists::add("creative",CONTENT_TOOLITEM_MOB_SPAWNER,1,i);
|
||||
content_list_add("creative",CONTENT_TOOLITEM_MOB_SPAWNER,1,i);
|
||||
|
||||
i = CONTENT_MOB_WHITE_KITTY;
|
||||
f = &g_content_mob_features[i&~CONTENT_MOB_MASK];
|
||||
|
@ -783,7 +783,7 @@ void content_mob_init()
|
|||
f->attack_player_damage = 1;
|
||||
f->attack_player_range = v3f(1,1,1);
|
||||
f->setCollisionBox(aabb3f(-0.6*BS, 0., -0.6*BS, 0.6*BS, 1.25*BS, 0.6*BS));
|
||||
lists::add("creative",CONTENT_TOOLITEM_MOB_SPAWNER,1,i);
|
||||
content_list_add("creative",CONTENT_TOOLITEM_MOB_SPAWNER,1,i);
|
||||
|
||||
i = CONTENT_MOB_SIAMESE_KITTY;
|
||||
f = &g_content_mob_features[i&~CONTENT_MOB_MASK];
|
||||
|
@ -810,7 +810,7 @@ void content_mob_init()
|
|||
f->attack_player_damage = 1;
|
||||
f->attack_player_range = v3f(1,1,1);
|
||||
f->setCollisionBox(aabb3f(-0.6*BS, 0., -0.6*BS, 0.6*BS, 1.25*BS, 0.6*BS));
|
||||
lists::add("creative",CONTENT_TOOLITEM_MOB_SPAWNER,1,i);
|
||||
content_list_add("creative",CONTENT_TOOLITEM_MOB_SPAWNER,1,i);
|
||||
|
||||
i = CONTENT_MOB_GINGER_KITTY;
|
||||
f = &g_content_mob_features[i&~CONTENT_MOB_MASK];
|
||||
|
@ -837,5 +837,5 @@ void content_mob_init()
|
|||
f->attack_player_damage = 1;
|
||||
f->attack_player_range = v3f(1,1,1);
|
||||
f->setCollisionBox(aabb3f(-0.6*BS, 0., -0.6*BS, 0.6*BS, 1.25*BS, 0.6*BS));
|
||||
lists::add("creative",CONTENT_TOOLITEM_MOB_SPAWNER,1,i);
|
||||
content_list_add("creative",CONTENT_TOOLITEM_MOB_SPAWNER,1,i);
|
||||
}
|
||||
|
|
|
@ -37,6 +37,8 @@
|
|||
#include "enchantment.h"
|
||||
#include <algorithm>
|
||||
|
||||
#include "list.h"
|
||||
|
||||
/*
|
||||
SignNodeMetadata
|
||||
*/
|
||||
|
@ -738,16 +740,26 @@ NodeMetadata* CreativeChestNodeMetadata::create(std::istream &is)
|
|||
}
|
||||
NodeMetadata* CreativeChestNodeMetadata::clone()
|
||||
{
|
||||
contentlist_t *cl;
|
||||
listdata_t *ld;
|
||||
CreativeChestNodeMetadata *d = new CreativeChestNodeMetadata();
|
||||
|
||||
*d->m_inventory = *m_inventory;
|
||||
InventoryList *l = d->m_inventory->getList("0");
|
||||
InventoryItem *t;
|
||||
l->clearItems();
|
||||
std::vector<lists::ListData> &list = lists::get("creative");
|
||||
for (u16 i=0; i<list.size() && i < 32; i++) {
|
||||
t = InventoryItem::create(list[i].content,list[i].count,0,list[i].data);
|
||||
|
||||
cl = content_list_get("creative");
|
||||
if (!cl)
|
||||
return d;
|
||||
|
||||
ld = cl->data;
|
||||
while (ld) {
|
||||
t = InventoryItem::create(ld->content,ld->count,0,ld->data);
|
||||
l->addItem(t);
|
||||
ld = ld->next;
|
||||
}
|
||||
|
||||
return d;
|
||||
}
|
||||
void CreativeChestNodeMetadata::serializeBody(std::ostream &os)
|
||||
|
@ -765,47 +777,74 @@ bool CreativeChestNodeMetadata::nodeRemovalDisabled()
|
|||
}
|
||||
bool CreativeChestNodeMetadata::receiveFields(std::string formname, std::map<std::string, std::string> fields, Player *player)
|
||||
{
|
||||
contentlist_t *cl;
|
||||
listdata_t *ld;
|
||||
uint32_t list_size = 0;
|
||||
uint32_t start;
|
||||
uint32_t end;
|
||||
uint32_t i;
|
||||
|
||||
if (fields["prev"] == "" && fields["next"] == "")
|
||||
return false;
|
||||
std::vector<lists::ListData> &list = lists::get("creative");
|
||||
|
||||
cl = content_list_get("creative");
|
||||
if (!cl)
|
||||
return false;
|
||||
|
||||
list_size = list_count(&cl->data);
|
||||
|
||||
if (fields["prev"] != "") {
|
||||
if (m_page > 0) {
|
||||
m_page--;
|
||||
}else{
|
||||
m_page = list.size()/32;
|
||||
m_page = list_size/32;
|
||||
}
|
||||
}
|
||||
if (fields["next"] != "")
|
||||
m_page++;
|
||||
if (m_page < 0)
|
||||
m_page = 0;
|
||||
if (m_page > (list.size()/32))
|
||||
if (m_page > (list_size/32))
|
||||
m_page = 0;
|
||||
InventoryList *l = m_inventory->getList("0");
|
||||
InventoryItem *t;
|
||||
l->clearItems();
|
||||
u16 start = m_page*32;
|
||||
u16 end = start+32;
|
||||
if (end > list.size())
|
||||
end = list.size();
|
||||
for (u16 i=start; i<end; i++) {
|
||||
t = InventoryItem::create(list[i].content,list[i].count,0,list[i].data);
|
||||
l->addItem(t);
|
||||
|
||||
start = m_page*32;
|
||||
end = start+32;
|
||||
|
||||
if (end > list_size)
|
||||
end = list_size;
|
||||
|
||||
ld = cl->data;
|
||||
for (i=0; ld && i<end; i++) {
|
||||
if (i >= start) {
|
||||
t = InventoryItem::create(ld->content,ld->count,0,ld->data);
|
||||
l->addItem(t);
|
||||
}
|
||||
ld = ld->next;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
std::string CreativeChestNodeMetadata::getDrawSpecString(Player *player)
|
||||
{
|
||||
wchar_t buff[256];
|
||||
std::vector<lists::ListData> &list = lists::get("creative");
|
||||
swprintf(buff, 256, wgettext("Page %d of %d"),(int)(m_page+1),(int)((list.size()/32)+1));
|
||||
char buff[256];
|
||||
contentlist_t *cl;
|
||||
uint32_t list_size = 0;
|
||||
|
||||
cl = content_list_get("creative");
|
||||
if (cl)
|
||||
list_size = list_count(&cl->data);
|
||||
|
||||
snprintf(buff,256,gettext("Page %d of %d"),(int)(m_page+1),(int)((list_size/32)+1));
|
||||
std::string spec("size[8,10]");
|
||||
spec += "list[current_name;0;0,0.5;8,4;]";
|
||||
spec += "button[0.25,5;2.5,0.75;prev;";
|
||||
spec += wide_to_narrow(wgettext("<< Previous Page"));
|
||||
spec += "]";
|
||||
spec += "label[3.5,5;";
|
||||
spec += wide_to_narrow(buff);
|
||||
spec += buff;
|
||||
spec += "]";
|
||||
spec += "button[6,5;2.5,0.75;next;";
|
||||
spec += wide_to_narrow(wgettext("Next Page >>"));
|
||||
|
@ -1932,27 +1971,51 @@ u16 CraftGuideNodeMetadata::typeId() const
|
|||
}
|
||||
NodeMetadata* CraftGuideNodeMetadata::clone()
|
||||
{
|
||||
CraftGuideNodeMetadata *d = new CraftGuideNodeMetadata();
|
||||
*d->m_inventory = *m_inventory;
|
||||
d->m_page = m_page;
|
||||
InventoryList *l = d->m_inventory->getList("list");
|
||||
contentlist_t *cl;
|
||||
listdata_t *ld;
|
||||
InventoryList *l;
|
||||
InventoryItem *t;
|
||||
content_t *r;
|
||||
uint32_t list_size = 0;
|
||||
uint32_t start;
|
||||
uint32_t end;
|
||||
uint32_t i;
|
||||
CraftGuideNodeMetadata *d = new CraftGuideNodeMetadata();
|
||||
|
||||
*d->m_inventory = *m_inventory;
|
||||
d->m_page = m_page;
|
||||
|
||||
l = d->m_inventory->getList("list");
|
||||
l->clearItems();
|
||||
std::vector<lists::ListData> &list = lists::get("craftguide");
|
||||
u16 start = m_page*40;
|
||||
u16 end = start+40;
|
||||
if (end > list.size())
|
||||
end = list.size();
|
||||
for (int i=start; i<end; i++) {
|
||||
t = InventoryItem::create(list[i].content,list[i].count,0,list[i].data);
|
||||
r = crafting::getRecipe(t);
|
||||
if (!r) {
|
||||
delete t;
|
||||
continue;
|
||||
|
||||
cl = content_list_get("craftguide");
|
||||
|
||||
if (!cl)
|
||||
return d;
|
||||
|
||||
list_size = list_count(&cl->data);
|
||||
|
||||
start = m_page*40;
|
||||
end = start+40;
|
||||
|
||||
if (end > list_size)
|
||||
end = list_size;
|
||||
|
||||
ld = cl->data;
|
||||
for (i=0; ld && i<end; i++) {
|
||||
if (i >= start) {
|
||||
t = InventoryItem::create(ld->content,ld->count,0,ld->data);
|
||||
r = crafting::getRecipe(t);
|
||||
if (!r) {
|
||||
delete t;
|
||||
ld = ld->next;
|
||||
continue;
|
||||
}
|
||||
l->addItem(t);
|
||||
}
|
||||
l->addItem(t);
|
||||
ld = ld->next;
|
||||
}
|
||||
|
||||
return d;
|
||||
}
|
||||
NodeMetadata* CraftGuideNodeMetadata::create(std::istream &is)
|
||||
|
@ -2010,37 +2073,71 @@ bool CraftGuideNodeMetadata::step(float dtime, v3s16 pos, ServerEnvironment *env
|
|||
}
|
||||
bool CraftGuideNodeMetadata::import(NodeMetadata *meta)
|
||||
{
|
||||
contentlist_t *cl;
|
||||
listdata_t *ld;
|
||||
InventoryList *l;
|
||||
InventoryItem *t;
|
||||
content_t *r;
|
||||
uint32_t list_size = 0;
|
||||
uint32_t start;
|
||||
uint32_t end;
|
||||
uint32_t i;
|
||||
|
||||
if (meta->typeId() == CONTENT_BOOK)
|
||||
m_page = ((ClosedBookNodeMetadata*)meta)->getPage();
|
||||
|
||||
if (m_page < 0)
|
||||
m_page = 0;
|
||||
std::vector<lists::ListData> &list = lists::get("craftguide");
|
||||
if (m_page > (list.size()/40))
|
||||
m_page = list.size()/40;
|
||||
InventoryList *l = m_inventory->getList("list");
|
||||
InventoryItem *t;
|
||||
content_t *r;
|
||||
|
||||
cl = content_list_get("craftguide");
|
||||
|
||||
if (!cl)
|
||||
return false;
|
||||
|
||||
list_size = list_count(&cl->data);
|
||||
|
||||
if (m_page > (list_size/40))
|
||||
m_page = list_size/40;
|
||||
|
||||
start = m_page*40;
|
||||
end = start+40;
|
||||
|
||||
l = m_inventory->getList("list");
|
||||
l->clearItems();
|
||||
u16 start = m_page*40;
|
||||
u16 end = start+40;
|
||||
if (end > list.size())
|
||||
end = list.size();
|
||||
for (int i=start; i<end; i++) {
|
||||
t = InventoryItem::create(list[i].content,list[i].count,0,list[i].data);
|
||||
r = crafting::getRecipe(t);
|
||||
if (!r) {
|
||||
delete t;
|
||||
continue;
|
||||
|
||||
if (end > list_size)
|
||||
end = list_size;
|
||||
|
||||
ld = cl->data;
|
||||
for (i=0; ld && i<end; i++) {
|
||||
if (i >= start) {
|
||||
t = InventoryItem::create(ld->content,ld->count,0,ld->data);
|
||||
r = crafting::getRecipe(t);
|
||||
if (!r) {
|
||||
delete t;
|
||||
ld = ld->next;
|
||||
continue;
|
||||
}
|
||||
l->addItem(t);
|
||||
}
|
||||
l->addItem(t);
|
||||
ld = ld->next;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
bool CraftGuideNodeMetadata::receiveFields(std::string formname, std::map<std::string, std::string> fields, Player *player)
|
||||
{
|
||||
InventoryList *l = m_inventory->getList("list");
|
||||
InventoryList *l;
|
||||
InventoryItem *t;
|
||||
contentlist_t *cl;
|
||||
listdata_t *ld;
|
||||
content_t *r;
|
||||
uint32_t list_size;
|
||||
uint32_t start;
|
||||
uint32_t end;
|
||||
uint32_t i;
|
||||
|
||||
l = m_inventory->getList("list");
|
||||
if (fields["rprev"] != "" || fields["rnext"] != "") {
|
||||
l = m_inventory->getList("result");
|
||||
t = l->getItem(0);
|
||||
|
@ -2060,33 +2157,48 @@ bool CraftGuideNodeMetadata::receiveFields(std::string formname, std::map<std::s
|
|||
}
|
||||
if (fields["prev"] == "" && fields["next"] == "")
|
||||
return false;
|
||||
std::vector<lists::ListData> &list = lists::get("craftguide");
|
||||
|
||||
cl = content_list_get("craftguide");
|
||||
|
||||
if (!cl)
|
||||
return false;
|
||||
|
||||
list_size = list_count(&cl->data);
|
||||
|
||||
if (fields["prev"] != "") {
|
||||
if (m_page > 0) {
|
||||
m_page--;
|
||||
}else{
|
||||
m_page = list.size()/40;
|
||||
m_page = list_size/40;
|
||||
}
|
||||
}
|
||||
if (fields["next"] != "")
|
||||
m_page++;
|
||||
if (m_page > (list.size()/40))
|
||||
if (m_page > (list_size/40))
|
||||
m_page = 0;
|
||||
content_t *r;
|
||||
|
||||
l->clearItems();
|
||||
u16 start = m_page*40;
|
||||
u16 end = start+40;
|
||||
if (end > list.size())
|
||||
end = list.size();
|
||||
for (int i=start; i<end; i++) {
|
||||
t = InventoryItem::create(list[i].content,list[i].count,0,list[i].data);
|
||||
r = crafting::getRecipe(t);
|
||||
if (!r) {
|
||||
delete t;
|
||||
continue;
|
||||
|
||||
start = m_page*40;
|
||||
end = start+40;
|
||||
if (end > list_size)
|
||||
end = list_size;
|
||||
|
||||
ld = cl->data;
|
||||
for (i=0; ld && i<end; i++) {
|
||||
if (i >= start) {
|
||||
t = InventoryItem::create(ld->content,ld->count,0,ld->data);
|
||||
r = crafting::getRecipe(t);
|
||||
if (!r) {
|
||||
delete t;
|
||||
ld = ld->next;
|
||||
continue;
|
||||
}
|
||||
l->addItem(t);
|
||||
}
|
||||
l->addItem(t);
|
||||
ld = ld->next;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
std::string CraftGuideNodeMetadata::getDrawSpecString(Player *player)
|
||||
|
@ -2095,14 +2207,20 @@ std::string CraftGuideNodeMetadata::getDrawSpecString(Player *player)
|
|||
InventoryItem *q = l->getItem(0);
|
||||
int tr = 0;
|
||||
int rc = 0;
|
||||
std::vector<lists::ListData> &list = lists::get("craftguide");
|
||||
char buff[256];
|
||||
uint32_t list_size = 0;
|
||||
contentlist_t *cl;
|
||||
|
||||
cl = content_list_get("craftguide");
|
||||
if (cl)
|
||||
list_size = list_count(&cl->data);
|
||||
|
||||
if (q && q->getContent() != CONTENT_IGNORE) {
|
||||
tr = crafting::getResultCount(q);
|
||||
rc = crafting::getRecipeCount(q);
|
||||
}
|
||||
|
||||
wchar_t buff[256];
|
||||
swprintf(buff, 256, wgettext("Page %d of %d"), (int)(m_page+1), (int)((list.size()/40)+1));
|
||||
snprintf(buff,256,gettext("Page %d of %d"),(int)(m_page+1),(int)((list_size/40)+1));
|
||||
|
||||
std::string spec("size[8,10]");
|
||||
spec += "label[0.5,0.75;";
|
||||
|
@ -2133,7 +2251,7 @@ std::string CraftGuideNodeMetadata::getDrawSpecString(Player *player)
|
|||
spec += wide_to_narrow(wgettext("<< Previous Page"));
|
||||
spec += "]";
|
||||
spec += "label[3.5,4.5;";
|
||||
spec += wide_to_narrow(buff);
|
||||
spec += buff;
|
||||
spec += "]";
|
||||
spec += "button[6,4.5;2.5,0.75;next;";
|
||||
spec += wide_to_narrow(wgettext("Next Page >>"));
|
||||
|
@ -2449,28 +2567,52 @@ u16 CookBookNodeMetadata::typeId() const
|
|||
}
|
||||
NodeMetadata* CookBookNodeMetadata::clone()
|
||||
{
|
||||
InventoryList *l;
|
||||
InventoryItem *t;
|
||||
InventoryItem *r;
|
||||
contentlist_t *cl;
|
||||
listdata_t *ld;
|
||||
uint32_t list_size;
|
||||
uint32_t start;
|
||||
uint32_t end;
|
||||
uint32_t i;
|
||||
|
||||
CookBookNodeMetadata *d = new CookBookNodeMetadata();
|
||||
*d->m_inventory = *m_inventory;
|
||||
d->m_page = m_page;
|
||||
InventoryList *l = d->m_inventory->getList("list");
|
||||
InventoryItem *t;
|
||||
|
||||
l = d->m_inventory->getList("list");
|
||||
l->clearItems();
|
||||
std::vector<lists::ListData> &list = lists::get("cooking");
|
||||
u16 start = m_page*40;
|
||||
u16 end = start+40;
|
||||
if (end > list.size())
|
||||
end = list.size();
|
||||
for (int i=start; i<end; i++) {
|
||||
t = InventoryItem::create(list[i].content,list[i].count,0,list[i].data);
|
||||
InventoryItem *cookresult = t->createCookResult();
|
||||
if (!cookresult || cookresult->getContent() == CONTENT_IGNORE) {
|
||||
delete t;
|
||||
delete cookresult;
|
||||
continue;
|
||||
|
||||
cl = content_list_get("cooking");
|
||||
if (!cl)
|
||||
return d;
|
||||
|
||||
list_size = list_count(&cl->data);
|
||||
|
||||
start = m_page*40;
|
||||
end = start+40;
|
||||
|
||||
if (end > list_size)
|
||||
end = list_size;
|
||||
|
||||
ld = cl->data;
|
||||
for (i=0; ld && i<end; i++) {
|
||||
if (i >= start) {
|
||||
t = InventoryItem::create(ld->content,ld->count,0,ld->data);
|
||||
r = t->createCookResult();
|
||||
if (!r || r->getContent() == CONTENT_IGNORE) {
|
||||
delete t;
|
||||
delete r;
|
||||
ld = ld->next;
|
||||
continue;
|
||||
}
|
||||
delete r;
|
||||
l->addItem(t);
|
||||
}
|
||||
delete cookresult;
|
||||
l->addItem(t);
|
||||
ld = ld->next;
|
||||
}
|
||||
|
||||
return d;
|
||||
}
|
||||
NodeMetadata* CookBookNodeMetadata::create(std::istream &is)
|
||||
|
@ -2512,76 +2654,130 @@ bool CookBookNodeMetadata::step(float dtime, v3s16 pos, ServerEnvironment *env)
|
|||
}
|
||||
bool CookBookNodeMetadata::import(NodeMetadata *meta)
|
||||
{
|
||||
InventoryList *l;
|
||||
InventoryItem *t;
|
||||
InventoryItem *r;
|
||||
contentlist_t *cl;
|
||||
listdata_t *ld;
|
||||
uint32_t list_size;
|
||||
uint32_t start;
|
||||
uint32_t end;
|
||||
uint32_t i;
|
||||
|
||||
if (meta->typeId() == CONTENT_BOOK)
|
||||
m_page = ((ClosedBookNodeMetadata*)meta)->getPage();
|
||||
|
||||
if (m_page < 0)
|
||||
m_page = 0;
|
||||
std::vector<lists::ListData> &list = lists::get("cooking");
|
||||
if (m_page > (list.size()/40))
|
||||
m_page = list.size()/40;
|
||||
InventoryList *l = m_inventory->getList("list");
|
||||
InventoryItem *t;
|
||||
|
||||
cl = content_list_get("cooking");
|
||||
if (!cl)
|
||||
return true;
|
||||
|
||||
list_size = list_count(&cl->data);
|
||||
|
||||
if (m_page > (list_size/40))
|
||||
m_page = list_size/40;
|
||||
|
||||
l = m_inventory->getList("list");
|
||||
l->clearItems();
|
||||
u16 start = m_page*40;
|
||||
u16 end = start+40;
|
||||
if (end > list.size())
|
||||
end = list.size();
|
||||
for (int i=start; i<end; i++) {
|
||||
t = InventoryItem::create(list[i].content,list[i].count,0,list[i].data);
|
||||
InventoryItem *cookresult = t->createCookResult();
|
||||
if (!cookresult || cookresult->getContent() == CONTENT_IGNORE) {
|
||||
delete t;
|
||||
delete cookresult;
|
||||
continue;
|
||||
|
||||
start = m_page*40;
|
||||
end = start+40;
|
||||
|
||||
if (end > list_size)
|
||||
end = list_size;
|
||||
|
||||
ld = cl->data;
|
||||
for (i=0; ld && i<end; i++) {
|
||||
if (i >= start) {
|
||||
t = InventoryItem::create(ld->content,ld->count,0,ld->data);
|
||||
r = t->createCookResult();
|
||||
if (!r || r->getContent() == CONTENT_IGNORE) {
|
||||
delete t;
|
||||
delete r;
|
||||
ld = ld->next;
|
||||
continue;
|
||||
}
|
||||
delete r;
|
||||
l->addItem(t);
|
||||
}
|
||||
delete cookresult;
|
||||
l->addItem(t);
|
||||
ld = ld->next;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
bool CookBookNodeMetadata::receiveFields(std::string formname, std::map<std::string, std::string> fields, Player *player)
|
||||
{
|
||||
InventoryList *l;
|
||||
InventoryItem *t;
|
||||
InventoryItem *r;
|
||||
contentlist_t *cl;
|
||||
listdata_t *ld;
|
||||
uint32_t list_size;
|
||||
uint32_t start;
|
||||
uint32_t end;
|
||||
uint32_t i;
|
||||
|
||||
if (fields["prev"] == "" && fields["next"] == "")
|
||||
return false;
|
||||
std::vector<lists::ListData> &list = lists::get("cooking");
|
||||
|
||||
cl = content_list_get("cooking");
|
||||
if (!cl)
|
||||
return false;
|
||||
|
||||
list_size = list_count(&cl->data);
|
||||
|
||||
if (fields["prev"] != "") {
|
||||
if (m_page > 0) {
|
||||
m_page--;
|
||||
}else{
|
||||
m_page = list.size()/40;
|
||||
m_page = list_size/40;
|
||||
}
|
||||
}
|
||||
if (fields["next"] != "")
|
||||
m_page++;
|
||||
if (m_page > (list.size()/40))
|
||||
if (m_page > (list_size/40))
|
||||
m_page = 0;
|
||||
InventoryList *l = m_inventory->getList("list");
|
||||
InventoryItem *t;
|
||||
|
||||
l = m_inventory->getList("list");
|
||||
l->clearItems();
|
||||
u16 start = m_page*40;
|
||||
u16 end = start+40;
|
||||
if (end > list.size())
|
||||
end = list.size();
|
||||
for (int i=start; i<end; i++) {
|
||||
t = InventoryItem::create(list[i].content,list[i].count,0,list[i].data);
|
||||
InventoryItem *cookresult = t->createCookResult();
|
||||
if (!cookresult || cookresult->getContent() == CONTENT_IGNORE) {
|
||||
delete t;
|
||||
delete cookresult;
|
||||
continue;
|
||||
|
||||
start = m_page*40;
|
||||
end = start+40;
|
||||
if (end > list_size)
|
||||
end = list_size;
|
||||
|
||||
ld = cl->data;
|
||||
for (i=0; ld && i<end; i++) {
|
||||
if (i >= start) {
|
||||
t = InventoryItem::create(ld->content,ld->count,0,ld->data);
|
||||
r = t->createCookResult();
|
||||
if (!r || r->getContent() == CONTENT_IGNORE) {
|
||||
delete t;
|
||||
delete r;
|
||||
ld = ld->next;
|
||||
continue;
|
||||
}
|
||||
delete r;
|
||||
l->addItem(t);
|
||||
}
|
||||
delete cookresult;
|
||||
l->addItem(t);
|
||||
ld = ld->next;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
std::string CookBookNodeMetadata::getDrawSpecString(Player *player)
|
||||
{
|
||||
std::vector<lists::ListData> &list = lists::get("cooking");
|
||||
char buff[256];
|
||||
contentlist_t *cl;
|
||||
uint32_t list_size = 0;
|
||||
|
||||
wchar_t buff[256];
|
||||
swprintf(buff, 256, wgettext("Page %d of %d"), (int)(m_page+1), (int)((list.size()/40)+1));
|
||||
cl = content_list_get("cooking");
|
||||
if (cl)
|
||||
list_size = list_count(&cl->data);
|
||||
|
||||
snprintf(buff,256,gettext("Page %d of %d"),(int)(m_page+1),(int)((list_size/40)+1));
|
||||
|
||||
std::string spec("size[8,9]");
|
||||
spec += "label[0.5,0.75;";
|
||||
|
@ -2593,7 +2789,7 @@ std::string CookBookNodeMetadata::getDrawSpecString(Player *player)
|
|||
spec += wide_to_narrow(wgettext("<< Previous Page"));
|
||||
spec += "]";
|
||||
spec += "label[3.5,3.5;";
|
||||
spec += wide_to_narrow(buff);
|
||||
spec += buff;
|
||||
spec += "]";
|
||||
spec += "button[6,3.5;2.5,0.75;next;";
|
||||
spec += wide_to_narrow(wgettext("Next Page >>"));
|
||||
|
@ -2631,30 +2827,53 @@ u16 DeCraftNodeMetadata::typeId() const
|
|||
}
|
||||
NodeMetadata* DeCraftNodeMetadata::clone()
|
||||
{
|
||||
InventoryList *l;
|
||||
InventoryItem *t;
|
||||
contentlist_t *cl;
|
||||
listdata_t *ld;
|
||||
uint32_t list_size;
|
||||
uint32_t start;
|
||||
uint32_t end;
|
||||
uint32_t i;
|
||||
ContentFeatures *f;
|
||||
|
||||
DeCraftNodeMetadata *d = new DeCraftNodeMetadata();
|
||||
*d->m_inventory = *m_inventory;
|
||||
d->m_page = m_page;
|
||||
InventoryList *l = d->m_inventory->getList("list");
|
||||
InventoryItem *t;
|
||||
l->clearItems();
|
||||
std::vector<lists::ListData> &list = lists::get("decrafting");
|
||||
u16 start = m_page*40;
|
||||
u16 end = start+40;
|
||||
if (end > list.size())
|
||||
end = list.size();
|
||||
for (int i=start; i<end; i++) {
|
||||
if ((list[i].content&CONTENT_CRAFTITEM_MASK) == CONTENT_CRAFTITEM_MASK)
|
||||
continue;
|
||||
if ((list[i].content&CONTENT_TOOLITEM_MASK) == CONTENT_TOOLITEM_MASK)
|
||||
continue;
|
||||
if ((list[i].content&CONTENT_CLOTHESITEM_MASK) == CONTENT_CLOTHESITEM_MASK)
|
||||
continue;
|
||||
if (content_features(list[i].content).dug_item == "" && content_features(list[i].content).extra_dug_item == "")
|
||||
continue;
|
||||
|
||||
t = new MaterialItem(list[i].content,1,list[i].data);
|
||||
l->addItem(t);
|
||||
l = d->m_inventory->getList("list");
|
||||
l->clearItems();
|
||||
|
||||
cl = content_list_get("decrafting");
|
||||
if (!cl)
|
||||
return d;
|
||||
|
||||
list_size = list_count(&cl->data);
|
||||
|
||||
start = m_page*40;
|
||||
end = start+40;
|
||||
if (end > list_size)
|
||||
end = list_size;
|
||||
|
||||
ld = cl->data;
|
||||
for (i=0; ld && i<end; i++) {
|
||||
if (i >= start) {
|
||||
if ((ld->content&CONTENT_CRAFTITEM_MASK) == CONTENT_CRAFTITEM_MASK)
|
||||
continue;
|
||||
if ((ld->content&CONTENT_TOOLITEM_MASK) == CONTENT_TOOLITEM_MASK)
|
||||
continue;
|
||||
if ((ld->content&CONTENT_CLOTHESITEM_MASK) == CONTENT_CLOTHESITEM_MASK)
|
||||
continue;
|
||||
f = &content_features(ld->content);
|
||||
if (!f || (f->dug_item == "" && f->extra_dug_item == ""))
|
||||
continue;
|
||||
|
||||
t = InventoryItem::create(ld->content,ld->count,0,ld->data);
|
||||
l->addItem(t);
|
||||
}
|
||||
ld = ld->next;
|
||||
}
|
||||
|
||||
return d;
|
||||
}
|
||||
NodeMetadata* DeCraftNodeMetadata::create(std::istream &is)
|
||||
|
@ -2723,79 +2942,133 @@ bool DeCraftNodeMetadata::step(float dtime, v3s16 pos, ServerEnvironment *env)
|
|||
}
|
||||
bool DeCraftNodeMetadata::import(NodeMetadata *meta)
|
||||
{
|
||||
InventoryList *l;
|
||||
InventoryItem *t;
|
||||
contentlist_t *cl;
|
||||
listdata_t *ld;
|
||||
uint32_t list_size;
|
||||
uint32_t start;
|
||||
uint32_t end;
|
||||
uint32_t i;
|
||||
ContentFeatures *f;
|
||||
|
||||
if (meta->typeId() == CONTENT_BOOK)
|
||||
m_page = ((ClosedBookNodeMetadata*)meta)->getPage();
|
||||
|
||||
if (m_page < 0)
|
||||
m_page = 0;
|
||||
std::vector<lists::ListData> &list = lists::get("decrafting");
|
||||
if (m_page > (list.size()/40))
|
||||
m_page = list.size()/40;
|
||||
InventoryList *l = m_inventory->getList("list");
|
||||
InventoryItem *t;
|
||||
l->clearItems();
|
||||
u16 start = m_page*40;
|
||||
u16 end = start+40;
|
||||
if (end > list.size())
|
||||
end = list.size();
|
||||
for (int i=start; i<end; i++) {
|
||||
if ((list[i].content&CONTENT_CRAFTITEM_MASK) == CONTENT_CRAFTITEM_MASK)
|
||||
continue;
|
||||
if ((list[i].content&CONTENT_TOOLITEM_MASK) == CONTENT_TOOLITEM_MASK)
|
||||
continue;
|
||||
if ((list[i].content&CONTENT_CLOTHESITEM_MASK) == CONTENT_CLOTHESITEM_MASK)
|
||||
continue;
|
||||
if (content_features(list[i].content).dug_item == "" && content_features(list[i].content).extra_dug_item == "")
|
||||
continue;
|
||||
|
||||
t = new MaterialItem(list[i].content,1,list[i].data);
|
||||
l->addItem(t);
|
||||
l = m_inventory->getList("list");
|
||||
l->clearItems();
|
||||
|
||||
cl = content_list_get("decrafting");
|
||||
if (!cl)
|
||||
return true;
|
||||
|
||||
list_size = list_count(&cl->data);
|
||||
|
||||
if (m_page > (list_size/40))
|
||||
m_page = list_size/40;
|
||||
|
||||
start = m_page*40;
|
||||
end = start+40;
|
||||
if (end > list_size)
|
||||
end = list_size;
|
||||
|
||||
ld = cl->data;
|
||||
for (i=0; ld && i<end; i++) {
|
||||
if (i >= start) {
|
||||
if ((ld->content&CONTENT_CRAFTITEM_MASK) == CONTENT_CRAFTITEM_MASK)
|
||||
continue;
|
||||
if ((ld->content&CONTENT_TOOLITEM_MASK) == CONTENT_TOOLITEM_MASK)
|
||||
continue;
|
||||
if ((ld->content&CONTENT_CLOTHESITEM_MASK) == CONTENT_CLOTHESITEM_MASK)
|
||||
continue;
|
||||
f = &content_features(ld->content);
|
||||
if (!f || (f->dug_item == "" && f->extra_dug_item == ""))
|
||||
continue;
|
||||
|
||||
t = InventoryItem::create(ld->content,ld->count,0,ld->data);
|
||||
l->addItem(t);
|
||||
}
|
||||
ld = ld->next;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
bool DeCraftNodeMetadata::receiveFields(std::string formname, std::map<std::string, std::string> fields, Player *player)
|
||||
{
|
||||
InventoryList *l;
|
||||
InventoryItem *t;
|
||||
contentlist_t *cl;
|
||||
listdata_t *ld;
|
||||
uint32_t list_size;
|
||||
uint32_t start;
|
||||
uint32_t end;
|
||||
uint32_t i;
|
||||
ContentFeatures *f;
|
||||
|
||||
if (fields["prev"] == "" && fields["next"] == "")
|
||||
return false;
|
||||
std::vector<lists::ListData> &list = lists::get("decrafting");
|
||||
|
||||
cl = content_list_get("decrafting");
|
||||
if (!cl)
|
||||
return false;
|
||||
|
||||
list_size = list_count(&cl->data);
|
||||
|
||||
if (fields["prev"] != "") {
|
||||
if (m_page > 0) {
|
||||
m_page--;
|
||||
}else{
|
||||
m_page = list.size()/40;
|
||||
m_page = list_size/40;
|
||||
}
|
||||
}
|
||||
if (fields["next"] != "")
|
||||
m_page++;
|
||||
if (m_page > (list.size()/40))
|
||||
if (m_page > (list_size/40))
|
||||
m_page = 0;
|
||||
InventoryList *l = m_inventory->getList("list");
|
||||
InventoryItem *t;
|
||||
l->clearItems();
|
||||
u16 start = m_page*40;
|
||||
u16 end = start+40;
|
||||
if (end > list.size())
|
||||
end = list.size();
|
||||
for (int i=start; i<end; i++) {
|
||||
if ((list[i].content&CONTENT_CRAFTITEM_MASK) == CONTENT_CRAFTITEM_MASK)
|
||||
continue;
|
||||
if ((list[i].content&CONTENT_TOOLITEM_MASK) == CONTENT_TOOLITEM_MASK)
|
||||
continue;
|
||||
if ((list[i].content&CONTENT_CLOTHESITEM_MASK) == CONTENT_CLOTHESITEM_MASK)
|
||||
continue;
|
||||
if (content_features(list[i].content).dug_item == "" && content_features(list[i].content).extra_dug_item == "")
|
||||
continue;
|
||||
|
||||
t = new MaterialItem(list[i].content,1,list[i].data);
|
||||
l->addItem(t);
|
||||
l = m_inventory->getList("list");
|
||||
l->clearItems();
|
||||
|
||||
start = m_page*40;
|
||||
end = start+40;
|
||||
if (end > list_size)
|
||||
end = list_size;
|
||||
|
||||
ld = cl->data;
|
||||
for (i=0; ld && i<end; i++) {
|
||||
if (i >= start) {
|
||||
if ((ld->content&CONTENT_CRAFTITEM_MASK) == CONTENT_CRAFTITEM_MASK)
|
||||
continue;
|
||||
if ((ld->content&CONTENT_TOOLITEM_MASK) == CONTENT_TOOLITEM_MASK)
|
||||
continue;
|
||||
if ((ld->content&CONTENT_CLOTHESITEM_MASK) == CONTENT_CLOTHESITEM_MASK)
|
||||
continue;
|
||||
f = &content_features(ld->content);
|
||||
if (!f || (f->dug_item == "" && f->extra_dug_item == ""))
|
||||
continue;
|
||||
|
||||
t = InventoryItem::create(ld->content,ld->count,0,ld->data);
|
||||
l->addItem(t);
|
||||
}
|
||||
ld = ld->next;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
std::string DeCraftNodeMetadata::getDrawSpecString(Player *player)
|
||||
{
|
||||
std::vector<lists::ListData> &list = lists::get("decrafting");
|
||||
wchar_t buff[256];
|
||||
swprintf(buff, 256, wgettext("Page %d of %d"), (int)(m_page+1), (int)((list.size()/40)+1));
|
||||
char buff[256];
|
||||
contentlist_t *cl;
|
||||
uint32_t list_size = 0;
|
||||
|
||||
cl = content_list_get("decrafting");
|
||||
if (cl)
|
||||
list_size = list_count(&cl->data);
|
||||
|
||||
snprintf(buff,256,gettext("Page %d of %d"),(int)(m_page+1),(int)((list_size/40)+1));
|
||||
|
||||
std::string spec("size[8,9]");
|
||||
spec += "label[0.5,0.75;";
|
||||
|
@ -2814,7 +3087,7 @@ std::string DeCraftNodeMetadata::getDrawSpecString(Player *player)
|
|||
spec += wide_to_narrow(wgettext("<< Previous Page"));
|
||||
spec += "]";
|
||||
spec += "label[3.5,3.5;";
|
||||
spec += wide_to_narrow(buff);
|
||||
spec += buff;
|
||||
spec += "]";
|
||||
spec += "button[6,3.5;2.5,0.75;next;";
|
||||
spec += wide_to_narrow(wgettext("Next Page >>"));
|
||||
|
|
|
@ -1445,11 +1445,11 @@ bool MobSAO::rightClick(Player *player)
|
|||
content_t c = item->getContent();
|
||||
if ((c&CONTENT_CRAFTITEM_MASK) != CONTENT_CRAFTITEM_MASK)
|
||||
return false;
|
||||
CraftItemFeatures f = content_craftitem_features(c);
|
||||
if (f.content != c)
|
||||
CraftItemFeatures *f = content_craftitem_features(c);
|
||||
if (f->content != c)
|
||||
return false;
|
||||
// and edible
|
||||
if (!f.consumable || !f.hunger_effect)
|
||||
if (!f->consumable || !f->hunger_effect)
|
||||
return false;
|
||||
// feed the mob
|
||||
// after this always return true as inventory has been modified
|
||||
|
|
|
@ -292,8 +292,8 @@ void content_toolitem_init()
|
|||
r[4] = CONTENT_CRAFTITEM_JUNGLE_PLANK;
|
||||
crafting::setRecipe(r,i,1);
|
||||
}
|
||||
lists::add("craftguide",i);
|
||||
lists::add("creative",i);
|
||||
content_list_add("craftguide",i,1,0);
|
||||
content_list_add("creative",i,1,0);
|
||||
|
||||
i = CONTENT_TOOLITEM_STONEPICK;
|
||||
f = &g_content_toolitem_features[i];
|
||||
|
@ -306,8 +306,8 @@ void content_toolitem_init()
|
|||
f->diginfo.time = 1.5;
|
||||
f->diginfo.level = 2;
|
||||
crafting::setPickRecipe(CONTENT_ROUGHSTONE,CONTENT_TOOLITEM_STONEPICK);
|
||||
lists::add("craftguide",i);
|
||||
lists::add("creative",i);
|
||||
content_list_add("craftguide",i,1,0);
|
||||
content_list_add("creative",i,1,0);
|
||||
|
||||
i = CONTENT_TOOLITEM_FLINTPICK;
|
||||
f = &g_content_toolitem_features[i];
|
||||
|
@ -320,8 +320,8 @@ void content_toolitem_init()
|
|||
f->diginfo.time = 1.75;
|
||||
f->diginfo.level = 2;
|
||||
crafting::setPickRecipe(CONTENT_CRAFTITEM_FLINT,CONTENT_TOOLITEM_FLINTPICK);
|
||||
lists::add("craftguide",i);
|
||||
lists::add("creative",i);
|
||||
content_list_add("craftguide",i,1,0);
|
||||
content_list_add("creative",i,1,0);
|
||||
|
||||
i = CONTENT_TOOLITEM_STEELPICK;
|
||||
f = &g_content_toolitem_features[i];
|
||||
|
@ -334,8 +334,8 @@ void content_toolitem_init()
|
|||
f->diginfo.time = 1.0;
|
||||
f->diginfo.level = 3;
|
||||
crafting::setPickRecipe(CONTENT_CRAFTITEM_STEEL_INGOT,CONTENT_TOOLITEM_STEELPICK);
|
||||
lists::add("craftguide",i);
|
||||
lists::add("creative",i);
|
||||
content_list_add("craftguide",i,1,0);
|
||||
content_list_add("creative",i,1,0);
|
||||
|
||||
i = CONTENT_TOOLITEM_MITHRIL_RAW_PICK;
|
||||
f = &g_content_toolitem_features[i];
|
||||
|
@ -348,8 +348,8 @@ void content_toolitem_init()
|
|||
f->diginfo.time = 0.75;
|
||||
f->diginfo.level = 4;
|
||||
crafting::setPickRecipe(CONTENT_CRAFTITEM_MITHRIL_RAW,CONTENT_TOOLITEM_MITHRIL_RAW_PICK);
|
||||
lists::add("craftguide",i);
|
||||
lists::add("creative",i);
|
||||
content_list_add("craftguide",i,1,0);
|
||||
content_list_add("creative",i,1,0);
|
||||
|
||||
i = CONTENT_TOOLITEM_MITHRIL_UNBOUND_PICK;
|
||||
f = &g_content_toolitem_features[i];
|
||||
|
@ -362,8 +362,8 @@ void content_toolitem_init()
|
|||
f->diginfo.time = 0.6;
|
||||
f->diginfo.level = 5;
|
||||
crafting::setPickRecipe(CONTENT_CRAFTITEM_MITHRIL_UNBOUND,CONTENT_TOOLITEM_MITHRIL_UNBOUND_PICK);
|
||||
lists::add("craftguide",i);
|
||||
lists::add("creative",i);
|
||||
content_list_add("craftguide",i,1,0);
|
||||
content_list_add("creative",i,1,0);
|
||||
|
||||
i = CONTENT_TOOLITEM_MITHRIL_PICK;
|
||||
f = &g_content_toolitem_features[i];
|
||||
|
@ -378,7 +378,7 @@ void content_toolitem_init()
|
|||
f->diginfo.level = 5;
|
||||
f->has_punch_effect = false;
|
||||
crafting::setPickRecipe(CONTENT_CRAFTITEM_MITHRIL,CONTENT_TOOLITEM_MITHRIL_PICK);
|
||||
lists::add("craftguide",i);
|
||||
content_list_add("craftguide",i,1,0);
|
||||
|
||||
i = CONTENT_TOOLITEM_CREATIVEPICK;
|
||||
f = &g_content_toolitem_features[i];
|
||||
|
@ -391,8 +391,8 @@ void content_toolitem_init()
|
|||
f->diginfo.time = 0.1;
|
||||
f->diginfo.level = 4;
|
||||
f->has_punch_effect = false;
|
||||
lists::add("player-creative",i);
|
||||
lists::add("creative",i);
|
||||
content_list_add("player-creative",i,1,0);
|
||||
content_list_add("creative",i,1,0);
|
||||
|
||||
/* SHOVELS */
|
||||
|
||||
|
@ -407,8 +407,8 @@ void content_toolitem_init()
|
|||
f->diginfo.time = 3.0;
|
||||
f->diginfo.level = 1;
|
||||
crafting::set1over1Recipe(CONTENT_ROCK,CONTENT_CRAFTITEM_STICK,i);
|
||||
lists::add("craftguide",i);
|
||||
lists::add("creative",i);
|
||||
content_list_add("craftguide",i,1,0);
|
||||
content_list_add("creative",i,1,0);
|
||||
|
||||
i = CONTENT_TOOLITEM_STONESHOVEL;
|
||||
f = &g_content_toolitem_features[i];
|
||||
|
@ -421,8 +421,8 @@ void content_toolitem_init()
|
|||
f->diginfo.time = 1.5;
|
||||
f->diginfo.level = 1;
|
||||
crafting::setShovelRecipe(CONTENT_ROUGHSTONE,CONTENT_TOOLITEM_STONESHOVEL);
|
||||
lists::add("craftguide",i);
|
||||
lists::add("creative",i);
|
||||
content_list_add("craftguide",i,1,0);
|
||||
content_list_add("creative",i,1,0);
|
||||
|
||||
i = CONTENT_TOOLITEM_FLINTSHOVEL;
|
||||
f = &g_content_toolitem_features[i];
|
||||
|
@ -435,8 +435,8 @@ void content_toolitem_init()
|
|||
f->diginfo.time = 1.75;
|
||||
f->diginfo.level = 2;
|
||||
crafting::setShovelRecipe(CONTENT_CRAFTITEM_FLINT,CONTENT_TOOLITEM_FLINTSHOVEL);
|
||||
lists::add("craftguide",i);
|
||||
lists::add("creative",i);
|
||||
content_list_add("craftguide",i,1,0);
|
||||
content_list_add("creative",i,1,0);
|
||||
|
||||
i = CONTENT_TOOLITEM_STEELSHOVEL;
|
||||
f = &g_content_toolitem_features[i];
|
||||
|
@ -449,8 +449,8 @@ void content_toolitem_init()
|
|||
f->diginfo.time = 1.0;
|
||||
f->diginfo.level = 3;
|
||||
crafting::setShovelRecipe(CONTENT_CRAFTITEM_STEEL_INGOT,CONTENT_TOOLITEM_STEELSHOVEL);
|
||||
lists::add("craftguide",i);
|
||||
lists::add("creative",i);
|
||||
content_list_add("craftguide",i,1,0);
|
||||
content_list_add("creative",i,1,0);
|
||||
|
||||
i = CONTENT_TOOLITEM_MITHRIL_RAW_SHOVEL;
|
||||
f = &g_content_toolitem_features[i];
|
||||
|
@ -463,8 +463,8 @@ void content_toolitem_init()
|
|||
f->diginfo.time = 0.75;
|
||||
f->diginfo.level = 4;
|
||||
crafting::setShovelRecipe(CONTENT_CRAFTITEM_MITHRIL_RAW,CONTENT_TOOLITEM_MITHRIL_RAW_SHOVEL);
|
||||
lists::add("craftguide",i);
|
||||
lists::add("creative",i);
|
||||
content_list_add("craftguide",i,1,0);
|
||||
content_list_add("creative",i,1,0);
|
||||
|
||||
i = CONTENT_TOOLITEM_MITHRIL_UNBOUND_SHOVEL;
|
||||
f = &g_content_toolitem_features[i];
|
||||
|
@ -477,8 +477,8 @@ void content_toolitem_init()
|
|||
f->diginfo.time = 0.6;
|
||||
f->diginfo.level = 5;
|
||||
crafting::setShovelRecipe(CONTENT_CRAFTITEM_MITHRIL_UNBOUND,CONTENT_TOOLITEM_MITHRIL_UNBOUND_SHOVEL);
|
||||
lists::add("craftguide",i);
|
||||
lists::add("creative",i);
|
||||
content_list_add("craftguide",i,1,0);
|
||||
content_list_add("creative",i,1,0);
|
||||
|
||||
i = CONTENT_TOOLITEM_MITHRIL_SHOVEL;
|
||||
f = &g_content_toolitem_features[i];
|
||||
|
@ -492,7 +492,7 @@ void content_toolitem_init()
|
|||
f->diginfo.time = 0.4;
|
||||
f->diginfo.level = 5;
|
||||
crafting::setShovelRecipe(CONTENT_CRAFTITEM_MITHRIL,CONTENT_TOOLITEM_MITHRIL_SHOVEL);
|
||||
lists::add("craftguide",i);
|
||||
content_list_add("craftguide",i,1,0);
|
||||
|
||||
/* AXES */
|
||||
|
||||
|
@ -517,8 +517,8 @@ void content_toolitem_init()
|
|||
r[0] = CONTENT_IGNORE; r[2] = CONTENT_ROCK;
|
||||
crafting::setRecipe(r,i,1);
|
||||
}
|
||||
lists::add("craftguide",i);
|
||||
lists::add("creative",i);
|
||||
content_list_add("craftguide",i,1,0);
|
||||
content_list_add("creative",i,1,0);
|
||||
|
||||
i = CONTENT_TOOLITEM_STONEAXE;
|
||||
f = &g_content_toolitem_features[i];
|
||||
|
@ -531,8 +531,8 @@ void content_toolitem_init()
|
|||
f->diginfo.time = 1.5;
|
||||
f->diginfo.level = 1;
|
||||
crafting::setAxeRecipe(CONTENT_ROUGHSTONE,CONTENT_TOOLITEM_STONEAXE);
|
||||
lists::add("craftguide",i);
|
||||
lists::add("creative",i);
|
||||
content_list_add("craftguide",i,1,0);
|
||||
content_list_add("creative",i,1,0);
|
||||
|
||||
i = CONTENT_TOOLITEM_FLINTAXE;
|
||||
f = &g_content_toolitem_features[i];
|
||||
|
@ -545,8 +545,8 @@ void content_toolitem_init()
|
|||
f->diginfo.time = 1.75;
|
||||
f->diginfo.level = 2;
|
||||
crafting::setAxeRecipe(CONTENT_CRAFTITEM_FLINT,CONTENT_TOOLITEM_FLINTAXE);
|
||||
lists::add("craftguide",i);
|
||||
lists::add("creative",i);
|
||||
content_list_add("craftguide",i,1,0);
|
||||
content_list_add("creative",i,1,0);
|
||||
|
||||
i = CONTENT_TOOLITEM_STEELAXE;
|
||||
f = &g_content_toolitem_features[i];
|
||||
|
@ -559,8 +559,8 @@ void content_toolitem_init()
|
|||
f->diginfo.time = 1.0;
|
||||
f->diginfo.level = 3;
|
||||
crafting::setAxeRecipe(CONTENT_CRAFTITEM_STEEL_INGOT,CONTENT_TOOLITEM_STEELAXE);
|
||||
lists::add("craftguide",i);
|
||||
lists::add("creative",i);
|
||||
content_list_add("craftguide",i,1,0);
|
||||
content_list_add("creative",i,1,0);
|
||||
|
||||
i = CONTENT_TOOLITEM_MITHRIL_RAW_AXE;
|
||||
f = &g_content_toolitem_features[i];
|
||||
|
@ -573,8 +573,8 @@ void content_toolitem_init()
|
|||
f->diginfo.time = 0.75;
|
||||
f->diginfo.level = 4;
|
||||
crafting::setAxeRecipe(CONTENT_CRAFTITEM_MITHRIL_RAW,CONTENT_TOOLITEM_MITHRIL_RAW_AXE);
|
||||
lists::add("craftguide",i);
|
||||
lists::add("creative",i);
|
||||
content_list_add("craftguide",i,1,0);
|
||||
content_list_add("creative",i,1,0);
|
||||
|
||||
i = CONTENT_TOOLITEM_MITHRIL_UNBOUND_AXE;
|
||||
f = &g_content_toolitem_features[i];
|
||||
|
@ -587,8 +587,8 @@ void content_toolitem_init()
|
|||
f->diginfo.time = 0.6;
|
||||
f->diginfo.level = 5;
|
||||
crafting::setAxeRecipe(CONTENT_CRAFTITEM_MITHRIL_UNBOUND,CONTENT_TOOLITEM_MITHRIL_UNBOUND_AXE);
|
||||
lists::add("craftguide",i);
|
||||
lists::add("creative",i);
|
||||
content_list_add("craftguide",i,1,0);
|
||||
content_list_add("creative",i,1,0);
|
||||
|
||||
i = CONTENT_TOOLITEM_MITHRIL_AXE;
|
||||
f = &g_content_toolitem_features[i];
|
||||
|
@ -602,7 +602,7 @@ void content_toolitem_init()
|
|||
f->diginfo.time = 0.4;
|
||||
f->diginfo.level = 5;
|
||||
crafting::setAxeRecipe(CONTENT_CRAFTITEM_MITHRIL,CONTENT_TOOLITEM_MITHRIL_AXE);
|
||||
lists::add("craftguide",i);
|
||||
content_list_add("craftguide",i,1,0);
|
||||
|
||||
/* WEAPONS - CLUBS, BOWS */
|
||||
|
||||
|
@ -618,8 +618,8 @@ void content_toolitem_init()
|
|||
f->diginfo.level = 1;
|
||||
crafting::setCol1Recipe(CONTENT_CRAFTITEM_WOOD_PLANK,i);
|
||||
crafting::setCol1Recipe(CONTENT_CRAFTITEM_JUNGLE_PLANK,i);
|
||||
lists::add("craftguide",i);
|
||||
lists::add("creative",i);
|
||||
content_list_add("craftguide",i,1,0);
|
||||
content_list_add("creative",i,1,0);
|
||||
|
||||
i = CONTENT_TOOLITEM_BOW;
|
||||
f = &g_content_toolitem_features[i];
|
||||
|
@ -640,8 +640,8 @@ void content_toolitem_init()
|
|||
};
|
||||
crafting::setRecipe(r,i,1);
|
||||
}
|
||||
lists::add("craftguide",i);
|
||||
lists::add("creative",i);
|
||||
content_list_add("craftguide",i,1,0);
|
||||
content_list_add("creative",i,1,0);
|
||||
|
||||
/* SPEARS */
|
||||
|
||||
|
@ -656,8 +656,8 @@ void content_toolitem_init()
|
|||
f->diginfo.time = 1.5;
|
||||
f->diginfo.level = 1;
|
||||
crafting::setSpearRecipe(CONTENT_ROUGHSTONE,CONTENT_TOOLITEM_STONESPEAR);
|
||||
lists::add("craftguide",i);
|
||||
lists::add("creative",i);
|
||||
content_list_add("craftguide",i,1,0);
|
||||
content_list_add("creative",i,1,0);
|
||||
|
||||
i = CONTENT_TOOLITEM_FLINTSPEAR;
|
||||
f = &g_content_toolitem_features[i];
|
||||
|
@ -670,8 +670,8 @@ void content_toolitem_init()
|
|||
f->diginfo.time = 1.75;
|
||||
f->diginfo.level = 2;
|
||||
crafting::setSpearRecipe(CONTENT_CRAFTITEM_FLINT,CONTENT_TOOLITEM_FLINTSPEAR);
|
||||
lists::add("craftguide",i);
|
||||
lists::add("creative",i);
|
||||
content_list_add("craftguide",i,1,0);
|
||||
content_list_add("creative",i,1,0);
|
||||
|
||||
i = CONTENT_TOOLITEM_STEELSPEAR;
|
||||
f = &g_content_toolitem_features[i];
|
||||
|
@ -684,8 +684,8 @@ void content_toolitem_init()
|
|||
f->diginfo.time = 1.0;
|
||||
f->diginfo.level = 3;
|
||||
crafting::setSpearRecipe(CONTENT_CRAFTITEM_STEEL_INGOT,CONTENT_TOOLITEM_STEELSPEAR);
|
||||
lists::add("craftguide",i);
|
||||
lists::add("creative",i);
|
||||
content_list_add("craftguide",i,1,0);
|
||||
content_list_add("creative",i,1,0);
|
||||
|
||||
i = CONTENT_TOOLITEM_MITHRIL_RAW_SPEAR;
|
||||
f = &g_content_toolitem_features[i];
|
||||
|
@ -698,8 +698,8 @@ void content_toolitem_init()
|
|||
f->diginfo.time = 0.75;
|
||||
f->diginfo.level = 4;
|
||||
crafting::setSpearRecipe(CONTENT_CRAFTITEM_MITHRIL_RAW,CONTENT_TOOLITEM_MITHRIL_RAW_SPEAR);
|
||||
lists::add("craftguide",i);
|
||||
lists::add("creative",i);
|
||||
content_list_add("craftguide",i,1,0);
|
||||
content_list_add("creative",i,1,0);
|
||||
|
||||
i = CONTENT_TOOLITEM_MITHRIL_UNBOUND_SPEAR;
|
||||
f = &g_content_toolitem_features[i];
|
||||
|
@ -712,8 +712,8 @@ void content_toolitem_init()
|
|||
f->diginfo.time = 0.6;
|
||||
f->diginfo.level = 5;
|
||||
crafting::setSpearRecipe(CONTENT_CRAFTITEM_MITHRIL_UNBOUND,CONTENT_TOOLITEM_MITHRIL_UNBOUND_SPEAR);
|
||||
lists::add("craftguide",i);
|
||||
lists::add("creative",i);
|
||||
content_list_add("craftguide",i,1,0);
|
||||
content_list_add("creative",i,1,0);
|
||||
|
||||
i = CONTENT_TOOLITEM_MITHRIL_SPEAR;
|
||||
f = &g_content_toolitem_features[i];
|
||||
|
@ -727,7 +727,7 @@ void content_toolitem_init()
|
|||
f->diginfo.time = 0.4;
|
||||
f->diginfo.level = 5;
|
||||
crafting::setSpearRecipe(CONTENT_CRAFTITEM_MITHRIL,CONTENT_TOOLITEM_MITHRIL_SPEAR);
|
||||
lists::add("craftguide",i);
|
||||
content_list_add("craftguide",i,1,0);
|
||||
|
||||
/* SWORDS */
|
||||
|
||||
|
@ -742,8 +742,8 @@ void content_toolitem_init()
|
|||
f->diginfo.time = 1.5;
|
||||
f->diginfo.level = 1;
|
||||
crafting::setSwordRecipe(CONTENT_ROUGHSTONE,CONTENT_TOOLITEM_STONESWORD);
|
||||
lists::add("craftguide",i);
|
||||
lists::add("creative",i);
|
||||
content_list_add("craftguide",i,1,0);
|
||||
content_list_add("creative",i,1,0);
|
||||
|
||||
i = CONTENT_TOOLITEM_STEELSWORD;
|
||||
f = &g_content_toolitem_features[i];
|
||||
|
@ -756,8 +756,8 @@ void content_toolitem_init()
|
|||
f->diginfo.time = 1.0;
|
||||
f->diginfo.level = 3;
|
||||
crafting::setSwordRecipe(CONTENT_CRAFTITEM_STEEL_INGOT,CONTENT_TOOLITEM_STEELSWORD);
|
||||
lists::add("craftguide",i);
|
||||
lists::add("creative",i);
|
||||
content_list_add("craftguide",i,1,0);
|
||||
content_list_add("creative",i,1,0);
|
||||
|
||||
i = CONTENT_TOOLITEM_MITHRIL_RAW_SWORD;
|
||||
f = &g_content_toolitem_features[i];
|
||||
|
@ -770,8 +770,8 @@ void content_toolitem_init()
|
|||
f->diginfo.time = 0.75;
|
||||
f->diginfo.level = 4;
|
||||
crafting::setSwordRecipe(CONTENT_CRAFTITEM_MITHRIL_RAW,CONTENT_TOOLITEM_MITHRIL_RAW_SWORD);
|
||||
lists::add("craftguide",i);
|
||||
lists::add("creative",i);
|
||||
content_list_add("craftguide",i,1,0);
|
||||
content_list_add("creative",i,1,0);
|
||||
|
||||
i = CONTENT_TOOLITEM_MITHRIL_UNBOUND_SWORD;
|
||||
f = &g_content_toolitem_features[i];
|
||||
|
@ -784,8 +784,8 @@ void content_toolitem_init()
|
|||
f->diginfo.time = 0.6;
|
||||
f->diginfo.level = 5;
|
||||
crafting::setSwordRecipe(CONTENT_CRAFTITEM_MITHRIL_UNBOUND,CONTENT_TOOLITEM_MITHRIL_UNBOUND_SWORD);
|
||||
lists::add("craftguide",i);
|
||||
lists::add("creative",i);
|
||||
content_list_add("craftguide",i,1,0);
|
||||
content_list_add("creative",i,1,0);
|
||||
|
||||
i = CONTENT_TOOLITEM_MITHRIL_SWORD;
|
||||
f = &g_content_toolitem_features[i];
|
||||
|
@ -799,7 +799,7 @@ void content_toolitem_init()
|
|||
f->diginfo.time = 0.4;
|
||||
f->diginfo.level = 5;
|
||||
crafting::setSwordRecipe(CONTENT_CRAFTITEM_MITHRIL,CONTENT_TOOLITEM_MITHRIL_SWORD);
|
||||
lists::add("craftguide",i);
|
||||
content_list_add("craftguide",i,1,0);
|
||||
|
||||
/* SHEARS */
|
||||
|
||||
|
@ -814,8 +814,8 @@ void content_toolitem_init()
|
|||
f->diginfo.time = 1.5;
|
||||
f->diginfo.level = 2;
|
||||
crafting::setShearsRecipe(CONTENT_CRAFTITEM_FLINT,CONTENT_TOOLITEM_FLINTSHEARS);
|
||||
lists::add("craftguide",i);
|
||||
lists::add("creative",i);
|
||||
content_list_add("craftguide",i,1,0);
|
||||
content_list_add("creative",i,1,0);
|
||||
|
||||
i = CONTENT_TOOLITEM_STEELSHEARS;
|
||||
f = &g_content_toolitem_features[i];
|
||||
|
@ -828,8 +828,8 @@ void content_toolitem_init()
|
|||
f->diginfo.time = 1.0;
|
||||
f->diginfo.level = 2;
|
||||
crafting::setShearsRecipe(CONTENT_CRAFTITEM_STEEL_INGOT,CONTENT_TOOLITEM_STEELSHEARS);
|
||||
lists::add("craftguide",i);
|
||||
lists::add("creative",i);
|
||||
content_list_add("craftguide",i,1,0);
|
||||
content_list_add("creative",i,1,0);
|
||||
|
||||
/* BUCKETS */
|
||||
|
||||
|
@ -847,8 +847,8 @@ void content_toolitem_init()
|
|||
f->damaging_nodes_diggable = false;
|
||||
crafting::setURecipe(CONTENT_CRAFTITEM_JUNGLE_PLANK,CONTENT_TOOLITEM_WBUCKET);
|
||||
crafting::setURecipe(CONTENT_CRAFTITEM_WOOD_PLANK,CONTENT_TOOLITEM_WBUCKET);
|
||||
lists::add("craftguide",i);
|
||||
lists::add("creative",i);
|
||||
content_list_add("craftguide",i,1,0);
|
||||
content_list_add("creative",i,1,0);
|
||||
|
||||
i = CONTENT_TOOLITEM_TINBUCKET;
|
||||
f = &g_content_toolitem_features[i];
|
||||
|
@ -863,8 +863,8 @@ void content_toolitem_init()
|
|||
f->diginfo.level = 2;
|
||||
f->damaging_nodes_diggable = false;
|
||||
crafting::setURecipe(CONTENT_CRAFTITEM_TIN_INGOT,CONTENT_TOOLITEM_TINBUCKET);
|
||||
lists::add("craftguide",i);
|
||||
lists::add("creative",i);
|
||||
content_list_add("craftguide",i,1,0);
|
||||
content_list_add("creative",i,1,0);
|
||||
|
||||
i = CONTENT_TOOLITEM_STEELBUCKET;
|
||||
f = &g_content_toolitem_features[i];
|
||||
|
@ -878,8 +878,8 @@ void content_toolitem_init()
|
|||
f->diginfo.time = 1.0;
|
||||
f->diginfo.level = 3;
|
||||
crafting::setURecipe(CONTENT_CRAFTITEM_STEEL_INGOT,CONTENT_TOOLITEM_STEELBUCKET);
|
||||
lists::add("craftguide",i);
|
||||
lists::add("creative",i);
|
||||
content_list_add("craftguide",i,1,0);
|
||||
content_list_add("creative",i,1,0);
|
||||
|
||||
i = CONTENT_TOOLITEM_WBUCKET_WATER;
|
||||
f = &g_content_toolitem_features[i];
|
||||
|
@ -890,7 +890,7 @@ void content_toolitem_init()
|
|||
f->type = TT_SPECIAL;
|
||||
f->onplace_node = CONTENT_WATERSOURCE;
|
||||
f->onplace_replace_item = CONTENT_TOOLITEM_WBUCKET;
|
||||
lists::add("creative",i);
|
||||
content_list_add("creative",i,1,0);
|
||||
|
||||
i = CONTENT_TOOLITEM_TINBUCKET_WATER;
|
||||
f = &g_content_toolitem_features[i];
|
||||
|
@ -901,7 +901,7 @@ void content_toolitem_init()
|
|||
f->type = TT_SPECIAL;
|
||||
f->onplace_node = CONTENT_WATERSOURCE;
|
||||
f->onplace_replace_item = CONTENT_TOOLITEM_TINBUCKET;
|
||||
lists::add("creative",i);
|
||||
content_list_add("creative",i,1,0);
|
||||
|
||||
i = CONTENT_TOOLITEM_STEELBUCKET_WATER;
|
||||
f = &g_content_toolitem_features[i];
|
||||
|
@ -912,7 +912,7 @@ void content_toolitem_init()
|
|||
f->type = TT_SPECIAL;
|
||||
f->onplace_node = CONTENT_WATERSOURCE;
|
||||
f->onplace_replace_item = CONTENT_TOOLITEM_STEELBUCKET;
|
||||
lists::add("creative",i);
|
||||
content_list_add("creative",i,1,0);
|
||||
|
||||
i = CONTENT_TOOLITEM_STEELBUCKET_LAVA;
|
||||
f = &g_content_toolitem_features[i];
|
||||
|
@ -924,7 +924,7 @@ void content_toolitem_init()
|
|||
f->onplace_replace_item = CONTENT_TOOLITEM_STEELBUCKET;
|
||||
f->fuel_time = 80;
|
||||
f->type = TT_SPECIAL;
|
||||
lists::add("creative",i);
|
||||
content_list_add("creative",i,1,0);
|
||||
|
||||
/* SPECIAL TOOLS */
|
||||
|
||||
|
@ -939,8 +939,8 @@ void content_toolitem_init()
|
|||
f->diginfo.level = 3;
|
||||
f->has_fire_effect = true;
|
||||
crafting::set1Any2Recipe(CONTENT_CRAFTITEM_FLINT,CONTENT_CRAFTITEM_STEEL_INGOT,CONTENT_TOOLITEM_FIRESTARTER);
|
||||
lists::add("craftguide",i);
|
||||
lists::add("creative",i);
|
||||
content_list_add("craftguide",i,1,0);
|
||||
content_list_add("creative",i,1,0);
|
||||
|
||||
i = CONTENT_TOOLITEM_CROWBAR;
|
||||
f = &g_content_toolitem_features[i];
|
||||
|
@ -952,8 +952,8 @@ void content_toolitem_init()
|
|||
f->diginfo.level = 3;
|
||||
f->has_rotate_effect = true;
|
||||
crafting::set1over1Recipe(CONTENT_CRAFTITEM_STEEL_INGOT,CONTENT_CRAFTITEM_STEEL_INGOT,CONTENT_TOOLITEM_CROWBAR);
|
||||
lists::add("craftguide",i);
|
||||
lists::add("creative",i);
|
||||
content_list_add("craftguide",i,1,0);
|
||||
content_list_add("creative",i,1,0);
|
||||
|
||||
i = CONTENT_TOOLITEM_KEY;
|
||||
f = &g_content_toolitem_features[i];
|
||||
|
@ -965,7 +965,7 @@ void content_toolitem_init()
|
|||
f->diginfo.level = 4;
|
||||
f->has_unlock_effect = true;
|
||||
crafting::set1To1Recipe(CONTENT_CRAFTITEM_GOLD_INGOT,CONTENT_TOOLITEM_KEY);
|
||||
lists::add("craftguide",i);
|
||||
content_list_add("craftguide",i,1,0);
|
||||
|
||||
i = CONTENT_TOOLITEM_MITHRIL_KEY;
|
||||
f = &g_content_toolitem_features[i];
|
||||
|
@ -1004,5 +1004,5 @@ void content_toolitem_init()
|
|||
};
|
||||
crafting::setRecipe(r,i,1);
|
||||
}
|
||||
lists::add("craftguide",i);
|
||||
content_list_add("craftguide",i,1,0);
|
||||
}
|
||||
|
|
10
src/crypto.c
10
src/crypto.c
|
@ -23,10 +23,10 @@
|
|||
#include <string.h>
|
||||
|
||||
/* defined in base64.c */
|
||||
int base64_lencode(char *source, size_t sourcelen, char *target, size_t targetlen);
|
||||
size_t base64_ldecode(char *source, char *target, size_t targetlen);
|
||||
int base64_lencode(const char* source, size_t sourcelen, char *target, size_t targetlen);
|
||||
size_t base64_ldecode(const char* source, char *target, size_t targetlen);
|
||||
|
||||
uint32_t hash(char *str_param)
|
||||
uint32_t hash(const char *str_param)
|
||||
{
|
||||
uint32_t hval = 0;
|
||||
uint32_t g;
|
||||
|
@ -46,7 +46,7 @@ uint32_t hash(char *str_param)
|
|||
}
|
||||
|
||||
/* base64 encode a string */
|
||||
char* base64_encode(char* str)
|
||||
char* base64_encode(const char* str)
|
||||
{
|
||||
int sl;
|
||||
int tl;
|
||||
|
@ -72,7 +72,7 @@ char* base64_encode(char* str)
|
|||
}
|
||||
|
||||
/* decode a base64 string */
|
||||
char* base64_decode(char* str)
|
||||
char* base64_decode(const char* str)
|
||||
{
|
||||
int sl;
|
||||
int tl;
|
||||
|
|
|
@ -7,9 +7,9 @@ extern "C" {
|
|||
|
||||
#include <stdint.h>
|
||||
|
||||
uint32_t hash(char* str);
|
||||
char* base64_encode(char* str);
|
||||
char* base64_decode(char* str);
|
||||
uint32_t hash(const char* str);
|
||||
char* base64_encode(const char* str);
|
||||
char* base64_decode(const char* str);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
|
|
@ -121,7 +121,7 @@ static int s_base64_decode_triple(unsigned char quadruple[4], unsigned char *res
|
|||
}
|
||||
|
||||
/* encode an array of bytes using base64 */
|
||||
int base64_lencode(char *source, size_t sourcelen, char *target, size_t targetlen)
|
||||
int base64_lencode(const char* source, size_t sourcelen, char *target, size_t targetlen)
|
||||
{
|
||||
/* check if the result will fit in the target buffer */
|
||||
if ((sourcelen+2)/3*4 > targetlen-1)
|
||||
|
@ -155,7 +155,7 @@ int base64_lencode(char *source, size_t sourcelen, char *target, size_t targetle
|
|||
}
|
||||
|
||||
/* decode base64 encoded data */
|
||||
size_t base64_ldecode(char *source, char *target, size_t targetlen)
|
||||
size_t base64_ldecode(const char* source, char *target, size_t targetlen)
|
||||
{
|
||||
char *src, *tmpptr;
|
||||
char quadruple[4], tmpresult[3];
|
||||
|
|
|
@ -1550,7 +1550,7 @@ void the_game(
|
|||
}else if (
|
||||
wield
|
||||
&& (
|
||||
content_craftitem_features(wield->getContent()).thrown_item != CONTENT_IGNORE
|
||||
content_craftitem_features(wield->getContent())->thrown_item != CONTENT_IGNORE
|
||||
|| (
|
||||
content_toolitem_features(wield->getContent()).thrown_item != CONTENT_IGNORE
|
||||
&& (ilist = client.getLocalPlayer()->inventory.getList("main")) != NULL
|
||||
|
|
|
@ -94,12 +94,10 @@ content_t InventoryItem::info(std::istream &is, u16 *count, u16 *wear, u16 *data
|
|||
if (material > MAX_CONTENT)
|
||||
throw SerializationError("Too large material number");
|
||||
c = material;
|
||||
}else if(name == "CraftItem") {
|
||||
}else if(name == "CraftItem") { /* deprecated */
|
||||
std::string subname;
|
||||
std::getline(is, subname, ' ');
|
||||
is>>(*count);
|
||||
CraftItem itm(subname, *count, 0);
|
||||
c = itm.getContent();
|
||||
}else if(name == "CraftItem2") {
|
||||
u16 material;
|
||||
is>>material;
|
||||
|
@ -309,14 +307,14 @@ video::ITexture * CraftItem::getImage() const
|
|||
if(g_texturesource == NULL)
|
||||
return NULL;
|
||||
|
||||
std::string name = content_craftitem_features(m_content).texture;
|
||||
std::string base = content_craftitem_features(m_content).overlay_base;
|
||||
std::string name = content_craftitem_features(m_content)->texture;
|
||||
std::string base = content_craftitem_features(m_content)->overlay_base;
|
||||
|
||||
std::ostringstream os;
|
||||
os<<name;
|
||||
|
||||
if (base != "") {
|
||||
if (content_craftitem_features(m_content).param_type == CPT_ENCHANTMENT) {
|
||||
if (content_craftitem_features(m_content)->param_type == CPT_ENCHANTMENT) {
|
||||
EnchantmentInfo info;
|
||||
u16 data = m_data;
|
||||
// TODO: adding more than 2 overlays messes up alpha
|
||||
|
@ -333,12 +331,12 @@ video::ITexture * CraftItem::getImage() const
|
|||
#endif
|
||||
std::wstring CraftItem::getGuiName()
|
||||
{
|
||||
return content_craftitem_features(m_content).description;
|
||||
return content_craftitem_features(m_content)->description;
|
||||
}
|
||||
std::wstring CraftItem::getGuiText()
|
||||
{
|
||||
std::wstring txt(L" ");
|
||||
CraftItemFeatures *f = &content_craftitem_features(m_content);
|
||||
CraftItemFeatures *f = content_craftitem_features(m_content);
|
||||
txt += f->description;
|
||||
if (f->consumable || f->cook_result != CONTENT_IGNORE || f->fuel_time != 0.0)
|
||||
txt += L"\n";
|
||||
|
@ -388,7 +386,7 @@ std::wstring CraftItem::getGuiText()
|
|||
txt += narrow_to_wide(buff);
|
||||
}
|
||||
if (m_data > 0) {
|
||||
if (content_craftitem_features(m_content).param_type == CPT_ENCHANTMENT) {
|
||||
if (content_craftitem_features(m_content)->param_type == CPT_ENCHANTMENT) {
|
||||
EnchantmentInfo info;
|
||||
u16 data = m_data;
|
||||
txt += L"\n";
|
||||
|
@ -406,8 +404,8 @@ std::wstring CraftItem::getGuiText()
|
|||
|
||||
ServerActiveObject* CraftItem::createSAO(ServerEnvironment *env, u16 id, v3f pos)
|
||||
{
|
||||
content_t drop = content_craftitem_features(m_content).drop_item;
|
||||
if (content_craftitem_features(m_content).param_type == CPT_DROP && m_data != 0)
|
||||
content_t drop = content_craftitem_features(m_content)->drop_item;
|
||||
if (content_craftitem_features(m_content)->param_type == CPT_DROP && m_data != 0)
|
||||
drop = m_data;
|
||||
// Special cases
|
||||
if ((drop&CONTENT_MOB_MASK) == CONTENT_MOB_MASK) {
|
||||
|
@ -424,7 +422,7 @@ ServerActiveObject* CraftItem::createSAO(ServerEnvironment *env, u16 id, v3f pos
|
|||
u16 CraftItem::getDropCount() const
|
||||
{
|
||||
// Special cases
|
||||
s16 dc = content_craftitem_features(m_content).drop_count;
|
||||
s16 dc = content_craftitem_features(m_content)->drop_count;
|
||||
if(dc != -1)
|
||||
return dc;
|
||||
// Default
|
||||
|
@ -433,7 +431,7 @@ u16 CraftItem::getDropCount() const
|
|||
|
||||
bool CraftItem::isCookable(CookType type) const
|
||||
{
|
||||
CraftItemFeatures *f = &content_craftitem_features(m_content);
|
||||
CraftItemFeatures *f = content_craftitem_features(m_content);
|
||||
if (!f)
|
||||
return false;
|
||||
if (type != f->cook_type && f->cook_type != COOK_ANY)
|
||||
|
@ -445,48 +443,48 @@ bool CraftItem::isCookable(CookType type) const
|
|||
|
||||
InventoryItem *CraftItem::createCookResult() const
|
||||
{
|
||||
return InventoryItem::create(content_craftitem_features(m_content).cook_result,1,1,0);
|
||||
return InventoryItem::create(content_craftitem_features(m_content)->cook_result,1,1,0);
|
||||
}
|
||||
|
||||
bool CraftItem::isFuel() const
|
||||
{
|
||||
return (content_craftitem_features(m_content).fuel_time != 0.0);
|
||||
return (content_craftitem_features(m_content)->fuel_time != 0.0);
|
||||
}
|
||||
|
||||
float CraftItem::getFuelTime() const
|
||||
{
|
||||
return content_craftitem_features(m_content).fuel_time;
|
||||
return content_craftitem_features(m_content)->fuel_time;
|
||||
}
|
||||
|
||||
bool CraftItem::use(ServerEnvironment *env, Player *player)
|
||||
{
|
||||
u16 count = getCount();
|
||||
bool used = false;
|
||||
CraftItemFeatures f = content_craftitem_features(m_content);
|
||||
if (f.consumable) {
|
||||
if (f.hunger_effect && (f.health_effect < 1 || player->hunger < 100)) {
|
||||
if (player->hunger + f.hunger_effect > 100) {
|
||||
CraftItemFeatures *f = content_craftitem_features(m_content);
|
||||
if (f->consumable) {
|
||||
if (f->hunger_effect && (f->health_effect < 1 || player->hunger < 100)) {
|
||||
if (player->hunger + f->hunger_effect > 100) {
|
||||
player->hunger = 100;
|
||||
}else{
|
||||
player->hunger += f.hunger_effect;
|
||||
player->hunger += f->hunger_effect;
|
||||
}
|
||||
used = true;
|
||||
}
|
||||
if (f.health_effect < 0 || (!used && f.health_effect > 0)) {
|
||||
player->addHealth(f.health_effect);
|
||||
if (f->health_effect < 0 || (!used && f->health_effect > 0)) {
|
||||
player->addHealth(f->health_effect);
|
||||
used = true;
|
||||
}
|
||||
if (f.cold_effect) {
|
||||
player->cold_effect = f.cold_effect;
|
||||
if (f->cold_effect) {
|
||||
player->cold_effect = f->cold_effect;
|
||||
used = true;
|
||||
}
|
||||
if (f.energy_effect) {
|
||||
player->energy_effect = f.energy_effect;
|
||||
if (f->energy_effect) {
|
||||
player->energy_effect = f->energy_effect;
|
||||
used = true;
|
||||
}
|
||||
}
|
||||
if (f.onuse_replace_item != CONTENT_IGNORE) {
|
||||
m_content = f.onuse_replace_item;
|
||||
if (f->onuse_replace_item != CONTENT_IGNORE) {
|
||||
m_content = f->onuse_replace_item;
|
||||
}else if (used) {
|
||||
count--;
|
||||
if (count < 1)
|
||||
|
@ -670,7 +668,7 @@ video::ITexture *ClothesItem::getImage() const
|
|||
std::wstring ClothesItem::getGuiText()
|
||||
{
|
||||
std::wstring txt(L" ");
|
||||
ClothesItemFeatures *f = &content_clothesitem_features(m_content);
|
||||
ClothesItemFeatures *f = content_clothesitem_features(m_content);
|
||||
txt += f->description;
|
||||
if (f->armour > 0.0 || f->warmth > 0.0 || f->vacuum > 0.0 || f->suffocate > 0.0 || f->durability > 0.0 || f->effect > 1.0)
|
||||
txt += L"\n";
|
||||
|
|
|
@ -246,17 +246,10 @@ private:
|
|||
class CraftItem : public InventoryItem
|
||||
{
|
||||
public:
|
||||
CraftItem(std::string subname, u16 count, u16 data):
|
||||
InventoryItem(count,data)
|
||||
{
|
||||
m_subname = content_craftitem_features(subname).name;
|
||||
m_content = content_craftitem_features(subname).content;
|
||||
}
|
||||
CraftItem(content_t content, u16 count, u16 data):
|
||||
InventoryItem(count,data)
|
||||
{
|
||||
m_subname = content_craftitem_features(content).name;
|
||||
m_content = content_craftitem_features(content).content;
|
||||
m_content = content_craftitem_features(content)->content;
|
||||
}
|
||||
/*
|
||||
Implementation interface
|
||||
|
@ -308,7 +301,7 @@ public:
|
|||
}
|
||||
u16 freeSpace() const
|
||||
{
|
||||
if (!content_craftitem_features(m_content).stackable)
|
||||
if (!content_craftitem_features(m_content)->stackable)
|
||||
return 0;
|
||||
if (m_count > QUANTITY_ITEM_MAX_COUNT)
|
||||
return 0;
|
||||
|
@ -325,16 +318,6 @@ public:
|
|||
float getFuelTime() const;
|
||||
|
||||
bool use(ServerEnvironment *env, Player *player);
|
||||
|
||||
/*
|
||||
Special methods
|
||||
*/
|
||||
std::string getSubName()
|
||||
{
|
||||
return m_subname;
|
||||
}
|
||||
private:
|
||||
std::string m_subname;
|
||||
};
|
||||
|
||||
class ToolItem : public InventoryItem
|
||||
|
@ -439,7 +422,7 @@ public:
|
|||
InventoryItem(1,data)
|
||||
{
|
||||
m_wear = wear;
|
||||
m_content = content_clothesitem_features(content).content;
|
||||
m_content = content_clothesitem_features(content)->content;
|
||||
}
|
||||
/*
|
||||
Implementation interface
|
||||
|
@ -464,7 +447,7 @@ public:
|
|||
}
|
||||
#ifndef SERVER
|
||||
std::string getBasename() const {
|
||||
return content_clothesitem_features(m_content).texture;
|
||||
return content_clothesitem_features(m_content)->texture;
|
||||
}
|
||||
|
||||
video::ITexture * getImage() const;
|
||||
|
@ -479,7 +462,7 @@ public:
|
|||
#endif
|
||||
std::wstring getGuiName()
|
||||
{
|
||||
return content_clothesitem_features(m_content).description;
|
||||
return content_clothesitem_features(m_content)->description;
|
||||
}
|
||||
std::wstring getGuiText();
|
||||
std::string getText()
|
||||
|
|
|
@ -38,6 +38,7 @@ int list_count(void *list)
|
|||
ref_t *l = *((ref_t**)list);
|
||||
|
||||
while (l) {
|
||||
c++;
|
||||
l = l->next;
|
||||
}
|
||||
|
||||
|
|
|
@ -45,7 +45,10 @@
|
|||
0x000...0x07f: param2 is fully usable
|
||||
0x800...0xfff: param2 lower 4 bytes are free
|
||||
*/
|
||||
#ifndef _HAVE_CONTENT_TYPE
|
||||
#define _HAVE_CONTENT_TYPE
|
||||
typedef u16 content_t;
|
||||
#endif
|
||||
#define MAX_CONTENT 0xfff
|
||||
|
||||
/*
|
||||
|
|
|
@ -40,7 +40,7 @@ CraftItem *getDiggedMineralItem(u8 mineral, Player *player, InventoryItem *tool)
|
|||
if (m.dug_item == CONTENT_IGNORE)
|
||||
return NULL;
|
||||
|
||||
if (content_craftitem_features(m.dug_item).content == CONTENT_IGNORE)
|
||||
if (content_craftitem_features(m.dug_item)->content == CONTENT_IGNORE)
|
||||
return NULL;
|
||||
|
||||
if (!tool && m.min_level > 0)
|
||||
|
|
|
@ -129,6 +129,7 @@ void Player::checkInventory()
|
|||
// this allows only the correct clothing type in a player's
|
||||
// relevant clothing slot
|
||||
{
|
||||
int i;
|
||||
InventoryList *h = inventory.getList("hat");
|
||||
InventoryList *j = inventory.getList("jacket");
|
||||
InventoryList *s = inventory.getList("shirt");
|
||||
|
@ -150,34 +151,30 @@ void Player::checkInventory()
|
|||
p->clearAllowed();
|
||||
b->setStackable(false);
|
||||
b->clearAllowed();
|
||||
for (
|
||||
std::map<content_t,struct ClothesItemFeatures>::iterator i = g_content_clothesitem_features.begin();
|
||||
i != g_content_clothesitem_features.end();
|
||||
i++
|
||||
) {
|
||||
ClothesItemFeatures c = i->second;
|
||||
switch (c.type) {
|
||||
for (i=0; i<4096; i++) {
|
||||
ClothesItemFeatures *c = content_clothesitem_features(i|CONTENT_CLOTHESITEM_MASK);
|
||||
switch (c->type) {
|
||||
case CT_HAT:
|
||||
h->addAllowed(c.content);
|
||||
h->addAllowed(c->content);
|
||||
break;
|
||||
case CT_JACKET:
|
||||
j->addAllowed(c.content);
|
||||
j->addAllowed(c->content);
|
||||
break;
|
||||
case CT_SHIRT:
|
||||
s->addAllowed(c.content);
|
||||
s->addAllowed(c->content);
|
||||
break;
|
||||
case CT_DECORATIVE:
|
||||
case CT_MEDALLION:
|
||||
d->addAllowed(c.content);
|
||||
d->addAllowed(c->content);
|
||||
break;
|
||||
case CT_BELT:
|
||||
t->addAllowed(c.content);
|
||||
t->addAllowed(c->content);
|
||||
break;
|
||||
case CT_PANTS:
|
||||
p->addAllowed(c.content);
|
||||
p->addAllowed(c->content);
|
||||
break;
|
||||
case CT_BOOTS:
|
||||
b->addAllowed(c.content);
|
||||
b->addAllowed(c->content);
|
||||
break;
|
||||
default:;
|
||||
}
|
||||
|
@ -752,7 +749,7 @@ video::ITexture* RemotePlayer::getTexture()
|
|||
InventoryItem *i = l->getItem(0);
|
||||
if (i == NULL)
|
||||
continue;
|
||||
clothes[j] = content_clothesitem_features(i->getContent()).overlay_texture;
|
||||
clothes[j] = content_clothesitem_features(i->getContent())->overlay_texture;
|
||||
}
|
||||
|
||||
std::string tex = "";
|
||||
|
@ -1210,7 +1207,7 @@ video::ITexture* LocalPlayer::getTexture()
|
|||
InventoryItem *i = l->getItem(0);
|
||||
if (i == NULL)
|
||||
continue;
|
||||
clothes[j] = content_clothesitem_features(i->getContent()).overlay_texture;
|
||||
clothes[j] = content_clothesitem_features(i->getContent())->overlay_texture;
|
||||
}
|
||||
|
||||
std::string tex = "";
|
||||
|
|
10
src/player.h
10
src/player.h
|
@ -306,7 +306,7 @@ public:
|
|||
i = l->getItem(0);
|
||||
if (i == NULL)
|
||||
return 0;
|
||||
return content_clothesitem_features(i->getContent()).armour;
|
||||
return content_clothesitem_features(i->getContent())->armour;
|
||||
break;
|
||||
case DAMAGE_AIR:
|
||||
l = inventory.getList("hat");
|
||||
|
@ -315,7 +315,7 @@ public:
|
|||
i = l->getItem(0);
|
||||
if (i == NULL)
|
||||
return 0;
|
||||
return content_clothesitem_features(i->getContent()).suffocate;
|
||||
return content_clothesitem_features(i->getContent())->suffocate;
|
||||
break;
|
||||
default:;
|
||||
}
|
||||
|
@ -362,13 +362,13 @@ public:
|
|||
case DAMAGE_FIRE:
|
||||
case DAMAGE_ATTACK:
|
||||
case DAMAGE_CACTUS:
|
||||
v += content_clothesitem_features(i->getContent()).armour;
|
||||
v += content_clothesitem_features(i->getContent())->armour;
|
||||
break;
|
||||
case DAMAGE_COLD:
|
||||
v += content_clothesitem_features(i->getContent()).warmth;
|
||||
v += content_clothesitem_features(i->getContent())->warmth;
|
||||
break;
|
||||
case DAMAGE_SPACE:
|
||||
v += content_clothesitem_features(i->getContent()).vacuum;
|
||||
v += content_clothesitem_features(i->getContent())->vacuum;
|
||||
break;
|
||||
default:;
|
||||
}
|
||||
|
|
|
@ -2084,7 +2084,7 @@ void Server::ProcessData(u8 *data, u32 datasize, u16 peer_id)
|
|||
if (item == NULL)
|
||||
return;
|
||||
|
||||
content_t thrown = content_craftitem_features(item->getContent()).thrown_item;
|
||||
content_t thrown = content_craftitem_features(item->getContent())->thrown_item;
|
||||
// We can throw it, right?
|
||||
if (thrown == CONTENT_IGNORE) {
|
||||
// it may be a tool that throws something else
|
||||
|
@ -2097,7 +2097,7 @@ void Server::ProcessData(u8 *data, u32 datasize, u16 peer_id)
|
|||
if (!item)
|
||||
return;
|
||||
// We can throw it, right?
|
||||
thrown = content_craftitem_features(item->getContent()).shot_item;
|
||||
thrown = content_craftitem_features(item->getContent())->shot_item;
|
||||
if (thrown == CONTENT_IGNORE)
|
||||
return;
|
||||
if (g_settings->getBool("tool_wear")) {
|
||||
|
@ -2506,7 +2506,7 @@ void Server::ProcessData(u8 *data, u32 datasize, u16 peer_id)
|
|||
if (wielditem)
|
||||
wieldcontent = wielditem->getContent();
|
||||
ToolItemFeatures wielded_tool_features = content_toolitem_features(wieldcontent);
|
||||
CraftItemFeatures wielded_craft_features = content_craftitem_features(wieldcontent);
|
||||
CraftItemFeatures *wielded_craft_features = content_craftitem_features(wieldcontent);
|
||||
ContentFeatures &wielded_material_features = content_features(wieldcontent);
|
||||
|
||||
bool selected_node_exists = false;
|
||||
|
@ -3953,8 +3953,8 @@ void Server::ProcessData(u8 *data, u32 datasize, u16 peer_id)
|
|||
client->SetBlocksNotSent(modified_blocks);
|
||||
}
|
||||
}else if (
|
||||
wielded_craft_features.drop_item != CONTENT_IGNORE
|
||||
&& (wielded_craft_features.drop_item&CONTENT_MOB_MASK) != CONTENT_MOB_MASK
|
||||
wielded_craft_features->drop_item != CONTENT_IGNORE
|
||||
&& (wielded_craft_features->drop_item&CONTENT_MOB_MASK) != CONTENT_MOB_MASK
|
||||
) {
|
||||
if ((getPlayerPrivs(player) & PRIV_BUILD) == 0) {
|
||||
infostream<<"Not allowing player to drop item: "
|
||||
|
@ -3964,7 +3964,7 @@ void Server::ProcessData(u8 *data, u32 datasize, u16 peer_id)
|
|||
MapNode n = m_env.getMap().getNodeNoEx(p_over);
|
||||
if (n.getContent() != CONTENT_AIR)
|
||||
return;
|
||||
n.setContent(content_craftitem_features(item->getContent()).drop_item);
|
||||
n.setContent(content_craftitem_features(item->getContent())->drop_item);
|
||||
core::list<u16> far_players;
|
||||
sendAddNode(p_over, n, 0, &far_players, 30);
|
||||
if (g_settings->getBool("infinite_inventory") == false) {
|
||||
|
@ -4015,7 +4015,7 @@ void Server::ProcessData(u8 *data, u32 datasize, u16 peer_id)
|
|||
}else if (
|
||||
(
|
||||
wielded_tool_features.param_type == CPT_DROP
|
||||
|| wielded_craft_features.param_type == CPT_DROP
|
||||
|| wielded_craft_features->param_type == CPT_DROP
|
||||
)
|
||||
&& wielditem->getData() != 0
|
||||
) {
|
||||
|
@ -4089,8 +4089,8 @@ void Server::ProcessData(u8 *data, u32 datasize, u16 peer_id)
|
|||
SendInventory(peer_id);
|
||||
}
|
||||
}
|
||||
}else if (wielded_craft_features.teleports > -2) {
|
||||
s8 dest = wielded_craft_features.teleports;
|
||||
}else if (wielded_craft_features->teleports > -2) {
|
||||
s8 dest = wielded_craft_features->teleports;
|
||||
/*
|
||||
If in creative mode, item dropping is disabled unless
|
||||
player has build privileges
|
||||
|
@ -4170,8 +4170,8 @@ void Server::ProcessData(u8 *data, u32 datasize, u16 peer_id)
|
|||
ServerActiveObject *obj = NULL;
|
||||
/* createSAO will drop all craft items, we may not want that */
|
||||
if (
|
||||
wielded_craft_features.content == wieldcontent
|
||||
&& wielded_craft_features.drop_item == CONTENT_IGNORE
|
||||
wielded_craft_features->content == wieldcontent
|
||||
&& wielded_craft_features->drop_item == CONTENT_IGNORE
|
||||
) {
|
||||
InventoryItem *ditem = InventoryItem::create(wieldcontent,item->getDropCount());
|
||||
obj = ditem->createSAO(&m_env, 0, pos);
|
||||
|
@ -4296,7 +4296,7 @@ void Server::ProcessData(u8 *data, u32 datasize, u16 peer_id)
|
|||
if (l) {
|
||||
ClothesItem *i = (ClothesItem*)l->getItem(0);
|
||||
if (i) {
|
||||
bonus = content_clothesitem_features(i->getContent()).effect;
|
||||
bonus = content_clothesitem_features(i->getContent())->effect;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -4310,8 +4310,8 @@ void Server::ProcessData(u8 *data, u32 datasize, u16 peer_id)
|
|||
if (i == NULL)
|
||||
continue;
|
||||
u16 w = wear;
|
||||
if (content_clothesitem_features(i->getContent()).durability > 1)
|
||||
w /= content_clothesitem_features(i->getContent()).durability;
|
||||
if (content_clothesitem_features(i->getContent())->durability > 1)
|
||||
w /= content_clothesitem_features(i->getContent())->durability;
|
||||
if (w < 15)
|
||||
w = 15;
|
||||
if (bonus > 0.0) {
|
||||
|
|
Loading…
Reference in New Issue