make fire drop ash, add ash block
This commit is contained in:
parent
5cc36003b4
commit
d07aed423d
Binary file not shown.
After Width: | Height: | Size: 562 B |
Binary file not shown.
After Width: | Height: | Size: 374 B |
|
@ -395,4 +395,11 @@ void content_craftitem_init()
|
||||||
crafting::setRecipe(recipe,CONTENT_CRAFTITEM_TNT,1);
|
crafting::setRecipe(recipe,CONTENT_CRAFTITEM_TNT,1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
i = CONTENT_CRAFTITEM_ASH;
|
||||||
|
f = &g_content_craftitem_features[i];
|
||||||
|
f->content = CONTENT_CRAFTITEM_ASH;
|
||||||
|
f->texture = "lump_of_ash.png";
|
||||||
|
f->name = "lump_of_ash";
|
||||||
|
f->gui_name = "Ash";
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -78,5 +78,6 @@ CraftItemFeatures & content_craftitem_features(std::string subname);
|
||||||
#define CONTENT_CRAFTITEM_WOOD_PLANK (CONTENT_CRAFTITEM_MASK | 0x27)
|
#define CONTENT_CRAFTITEM_WOOD_PLANK (CONTENT_CRAFTITEM_MASK | 0x27)
|
||||||
#define CONTENT_CRAFTITEM_JUNGLE_PLANK (CONTENT_CRAFTITEM_MASK | 0x28)
|
#define CONTENT_CRAFTITEM_JUNGLE_PLANK (CONTENT_CRAFTITEM_MASK | 0x28)
|
||||||
#define CONTENT_CRAFTITEM_TNT (CONTENT_CRAFTITEM_MASK | 0x29)
|
#define CONTENT_CRAFTITEM_TNT (CONTENT_CRAFTITEM_MASK | 0x29)
|
||||||
|
#define CONTENT_CRAFTITEM_ASH (CONTENT_CRAFTITEM_MASK | 0x2A)
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -1108,6 +1108,17 @@ void content_mapnode_init()
|
||||||
f->dug_item = std::string("MaterialItem2 ")+itos(i)+" 1";
|
f->dug_item = std::string("MaterialItem2 ")+itos(i)+" 1";
|
||||||
setDirtLikeDiggingProperties(f->digging_properties, 1.0);
|
setDirtLikeDiggingProperties(f->digging_properties, 1.0);
|
||||||
|
|
||||||
|
i = CONTENT_ASH;
|
||||||
|
f = &content_features(i);
|
||||||
|
f->description = std::string("Ash Block");
|
||||||
|
f->setAllTextures("ash.png");
|
||||||
|
f->setInventoryTextureCube("ash.png", "ash.png", "ash.png");
|
||||||
|
f->draw_type = CDT_CUBELIKE;
|
||||||
|
f->is_ground_content = true;
|
||||||
|
f->dug_item = std::string("CraftItem lump_of_ash 9");
|
||||||
|
setDirtLikeDiggingProperties(f->digging_properties, 0.5);
|
||||||
|
crafting::setHardBlockRecipe(CONTENT_CRAFTITEM_ASH,CONTENT_ASH);
|
||||||
|
|
||||||
i = CONTENT_SAND;
|
i = CONTENT_SAND;
|
||||||
f = &content_features(i);
|
f = &content_features(i);
|
||||||
f->description = std::string("Sand");
|
f->description = std::string("Sand");
|
||||||
|
|
|
@ -178,7 +178,8 @@ MapNode mapnode_translate_to_internal(MapNode n_from, u8 version);
|
||||||
#define CONTENT_ROUGHSTONEBLOCK 0x8CD
|
#define CONTENT_ROUGHSTONEBLOCK 0x8CD
|
||||||
#define CONTENT_STEAM 0x8CE
|
#define CONTENT_STEAM 0x8CE
|
||||||
#define CONTENT_INCINERATOR 0x8CF
|
#define CONTENT_INCINERATOR 0x8CF
|
||||||
// FREE 8D0-8FF
|
#define CONTENT_ASH 0x8D0
|
||||||
|
// FREE 8D1-8FF
|
||||||
// glass pane
|
// glass pane
|
||||||
#define CONTENT_GLASS_PANE 0x900
|
#define CONTENT_GLASS_PANE 0x900
|
||||||
#define CONTENT_GLASS_PANE_BLUE 0x901
|
#define CONTENT_GLASS_PANE_BLUE 0x901
|
||||||
|
|
|
@ -1362,14 +1362,22 @@ void ServerEnvironment::step(float dtime)
|
||||||
fire that goes out
|
fire that goes out
|
||||||
*/
|
*/
|
||||||
if (n.getContent() == CONTENT_FIRE_SHORTTERM) {
|
if (n.getContent() == CONTENT_FIRE_SHORTTERM) {
|
||||||
if (myrand()%10 == 0)
|
if (myrand()%10 == 0) {
|
||||||
m_map->removeNodeWithEvent(p);
|
m_map->removeNodeWithEvent(p);
|
||||||
|
v3f ash_pos = intToFloat(p, BS);
|
||||||
|
ash_pos += v3f(myrand_range(-1500,1500)*1.0/1000, 0, myrand_range(-1500,1500)*1.0/1000);
|
||||||
|
ServerActiveObject *obj = new ItemSAO(this, 0, ash_pos, "CraftItem lump_of_ash 1");
|
||||||
|
addActiveObject(obj);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
/*
|
/*
|
||||||
fire that spreads just a little
|
fire that spreads just a little
|
||||||
*/
|
*/
|
||||||
if (n.getContent() == CONTENT_FIRE) {
|
if (n.getContent() == CONTENT_FIRE) {
|
||||||
if (myrand()%10) {
|
MapNode n_below = m_map->getNodeNoEx(p+v3s16(0,-1,0));
|
||||||
|
if (!content_features(n_below).flammable) {
|
||||||
|
m_map->removeNodeWithEvent(p);
|
||||||
|
}else if (myrand()%10) {
|
||||||
bool can_spread = true;
|
bool can_spread = true;
|
||||||
s16 bs_rad = g_settings->getS16("borderstone_radius");
|
s16 bs_rad = g_settings->getS16("borderstone_radius");
|
||||||
bs_rad += 2;
|
bs_rad += 2;
|
||||||
|
|
Loading…
Reference in New Issue