summaryrefslogtreecommitdiff
path: root/src/map.h
diff options
context:
space:
mode:
authorkwolekr <kwolekr@minetest.net>2015-01-15 16:20:05 -0500
committerkwolekr <kwolekr@minetest.net>2015-01-15 16:48:56 -0500
commit9736548720a96c9c7f739edb0435d9ba4ad80652 (patch)
tree3f92b63d017e9baac042ed3837bbdf040d40c73f /src/map.h
parent0330cec7ec55126c9cc441373cde1253bed895ee (diff)
downloadminetest-9736548720a96c9c7f739edb0435d9ba4ad80652.tar.gz
minetest-9736548720a96c9c7f739edb0435d9ba4ad80652.tar.bz2
minetest-9736548720a96c9c7f739edb0435d9ba4ad80652.zip
Add ability to delete MapBlocks from map
Also add a Lua API and chatcommand for this
Diffstat (limited to 'src/map.h')
-rw-r--r--src/map.h9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/map.h b/src/map.h
index 4e3f09a21..3335d9026 100644
--- a/src/map.h
+++ b/src/map.h
@@ -267,9 +267,10 @@ public:
virtual void save(ModifiedState save_level){assert(0);};
- // Server implements this.
- // Client leaves it as no-op.
+ // Server implements these.
+ // Client leaves them as no-op.
virtual bool saveBlock(MapBlock *block) { return false; };
+ virtual bool deleteBlock(v3s16 blockpos) { return false; };
/*
Updates usage timers and unloads unused blocks and sectors.
@@ -423,7 +424,7 @@ public:
- Create blank filled with CONTENT_IGNORE
*/
- MapBlock * emergeBlock(v3s16 p, bool create_blank=true);
+ MapBlock *emergeBlock(v3s16 p, bool create_blank=true);
/*
Try to get a block.
@@ -498,6 +499,8 @@ public:
// Database version
void loadBlock(std::string *blob, v3s16 p3d, MapSector *sector, bool save_after_load=false);
+ bool deleteBlock(v3s16 blockpos);
+
void updateVManip(v3s16 pos);
// For debug printing