Some minor corrections

develop
Quietust 2014-07-21 13:26:34 -05:00
parent 97de21357c
commit e711605413
4 changed files with 14 additions and 3 deletions

@ -1158,6 +1158,7 @@ int Items::getItemBaseValue(int16_t item_type, int16_t item_subtype, int16_t mat
case item_type::MEAT: case item_type::MEAT:
case item_type::PLANT: case item_type::PLANT:
case item_type::PLANT_GROWTH:
case item_type::CHEESE: case item_type::CHEESE:
value = 2; value = 2;
break; break;

@ -845,6 +845,15 @@ t_matpair MapExtras::BlockInfo::getBaseMaterial(df::tiletype tt, df::coord2d pos
case ROOT: case ROOT:
case TREE: case TREE:
case PLANT: case PLANT:
rv.mat_type = MaterialInfo::PLANT_BASE;
if (auto plant = plants[block->map_pos + df::coord(x,y,0)])
{
if (auto raw = df::plant_raw::find(plant->material))
{
rv.mat_type = raw->material_defs.type_basic_mat;
rv.mat_index = raw->material_defs.idx_basic_mat;
}
}
break; break;
case GRASS_LIGHT: case GRASS_LIGHT:

@ -46,6 +46,7 @@ using namespace df::enums;
using df::global::world; using df::global::world;
using df::global::d_init; using df::global::d_init;
using df::global::gametype;
bool Translation::IsValid () bool Translation::IsValid ()
{ {
@ -153,7 +154,7 @@ string Translation::TranslateName(const df::language_name * name, bool inEnglish
if (!name->nickname.empty()) if (!name->nickname.empty())
{ {
word = "`" + name->nickname + "'"; word = "`" + name->nickname + "'";
switch (d_init ? d_init->nickname[*df::global::gametype] : d_init_nickname::CENTRALIZE) switch ((d_init && gametype) ? d_init->nickname[*gametype] : d_init_nickname::CENTRALIZE)
{ {
case d_init_nickname::REPLACE_ALL: case d_init_nickname::REPLACE_ALL:
out = word; out = word;

@ -147,8 +147,8 @@ void revealAdventure(color_ostream &out)
{ {
df::map_block *block = world->map.map_blocks[i]; df::map_block *block = world->map.map_blocks[i];
// in 'no-hell'/'safe' mode, don't reveal blocks with hell and adamantine // in 'no-hell'/'safe' mode, don't reveal blocks with hell and adamantine
// if (!isSafe(block->map_pos)) if (!isSafe(block->map_pos))
// continue; continue;
designations40d & designations = block->designation; designations40d & designations = block->designation;
// for each tile in block // for each tile in block
for (uint32_t x = 0; x < 16; x++) for (uint32_t y = 0; y < 16; y++) for (uint32_t x = 0; x < 16; x++) for (uint32_t y = 0; y < 16; y++)