Stone can be placed back down
This commit is contained in:
parent
f2dbfe6217
commit
78a64485b2
2 changed files with 15 additions and 3 deletions
2
Makefile
2
Makefile
|
@ -28,7 +28,7 @@ include $(DEVKITARM)/3ds_rules
|
||||||
#---------------------------------------------------------------------------------
|
#---------------------------------------------------------------------------------
|
||||||
TARGET := Minicraft3DS
|
TARGET := Minicraft3DS
|
||||||
BUILD := build
|
BUILD := build
|
||||||
SOURCES := source
|
SOURCES := source source/minizip
|
||||||
DATA := data
|
DATA := data
|
||||||
INCLUDES := include
|
INCLUDES := include
|
||||||
|
|
||||||
|
|
|
@ -473,6 +473,10 @@ s8 itemTileInteract(int tile, Item* item, int x, int y, int px, int py, int dir)
|
||||||
if(rand()%5==0)addEntityToList(newItemEntity(newItem(ITEM_SEEDS,1),(x<<4)+8, (y<<4)+8,currentLevel),&eManager);
|
if(rand()%5==0)addEntityToList(newItemEntity(newItem(ITEM_SEEDS,1),(x<<4)+8, (y<<4)+8,currentLevel),&eManager);
|
||||||
setTile(TILE_DIRT,x,y);
|
setTile(TILE_DIRT,x,y);
|
||||||
return 1;
|
return 1;
|
||||||
|
}
|
||||||
|
else if(item->id == ITEM_STONE){
|
||||||
|
setTile(TILE_ROCK,x,y);
|
||||||
|
--item->countLevel;
|
||||||
}break;
|
}break;
|
||||||
case TILE_SAND:
|
case TILE_SAND:
|
||||||
if(item->id == ITEM_CACTUS){
|
if(item->id == ITEM_CACTUS){
|
||||||
|
@ -484,7 +488,12 @@ s8 itemTileInteract(int tile, Item* item, int x, int y, int px, int py, int dir)
|
||||||
addEntityToList(newItemEntity(newItem(ITEM_SAND,1), (x<<4)+8, (y<<4)+8, currentLevel), &eManager);
|
addEntityToList(newItemEntity(newItem(ITEM_SAND,1), (x<<4)+8, (y<<4)+8, currentLevel), &eManager);
|
||||||
setTile(TILE_DIRT,x,y);
|
setTile(TILE_DIRT,x,y);
|
||||||
return 1;
|
return 1;
|
||||||
} break;
|
}
|
||||||
|
else if(item->id == ITEM_STONE){
|
||||||
|
setTile(TILE_ROCK,x,y);
|
||||||
|
--item->countLevel;
|
||||||
|
}
|
||||||
|
break;
|
||||||
case TILE_DIRT:
|
case TILE_DIRT:
|
||||||
if(item->id == TOOL_HOE && playerUseEnergy(4-item->countLevel)){
|
if(item->id == TOOL_HOE && playerUseEnergy(4-item->countLevel)){
|
||||||
setTile(TILE_FARM,x,y);
|
setTile(TILE_FARM,x,y);
|
||||||
|
@ -494,6 +503,9 @@ s8 itemTileInteract(int tile, Item* item, int x, int y, int px, int py, int dir)
|
||||||
addEntityToList(newItemEntity(newItem(ITEM_DIRT,1), (x<<4)+8, (y<<4)+8, currentLevel), &eManager);
|
addEntityToList(newItemEntity(newItem(ITEM_DIRT,1), (x<<4)+8, (y<<4)+8, currentLevel), &eManager);
|
||||||
setTile(TILE_HOLE,x,y);
|
setTile(TILE_HOLE,x,y);
|
||||||
return 1;
|
return 1;
|
||||||
|
}else if(item->id == ITEM_STONE){
|
||||||
|
setTile(TILE_ROCK,x,y);
|
||||||
|
--item->countLevel;
|
||||||
} break;
|
} break;
|
||||||
case TILE_HOLE:
|
case TILE_HOLE:
|
||||||
case TILE_WATER:
|
case TILE_WATER:
|
||||||
|
|
Loading…
Add table
Reference in a new issue