mirror of
https://github.com/luanti-org/luanti.git
synced 2025-06-27 16:36:03 +00:00
Add ability to delete MapBlocks from map
Also add a Lua API and chatcommand for this
This commit is contained in:
parent
0330cec7ec
commit
9736548720
15 changed files with 187 additions and 19 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue