add remarks for world editing

isolation_bkp/dynres
Dominik Madarász 2021-11-03 16:33:25 +01:00
parent 9d6993d7b1
commit 2695bbf32d
1 changed files with 6 additions and 0 deletions

View File

@ -90,11 +90,17 @@ world_block_lookup world_block_from_index(int64_t id, uint16_t block_idx);
int64_t world_chunk_from_realpos(float x, float y); int64_t world_chunk_from_realpos(float x, float y);
int64_t world_chunk_from_entity(ecs_entity_t id); int64_t world_chunk_from_entity(ecs_entity_t id);
// NOTE(zaklaus): This changes the inner chunk layer, it should only be used for terraforming!
void world_chunk_replace_worldgen_block(int64_t id, uint16_t block_idx, uint8_t block_id); void world_chunk_replace_worldgen_block(int64_t id, uint16_t block_idx, uint8_t block_id);
// NOTE(zaklaus): Replaces a block unconditionally
void world_chunk_replace_block(int64_t id, uint16_t block_idx, uint8_t block_id); void world_chunk_replace_block(int64_t id, uint16_t block_idx, uint8_t block_id);
// NOTE(zaklaus): Places a block only if the outer layer's chunk slot is empty,
// it also allows us to remove a block from outer layer unconditionally
bool world_chunk_place_block(int64_t id, uint16_t block_idx, uint8_t block_id); bool world_chunk_place_block(int64_t id, uint16_t block_idx, uint8_t block_id);
// NOTE(zaklaus): Convenience method to replace block with air and drop item optionally
void world_chunk_destroy_block(float x, float y, bool drop_item); void world_chunk_destroy_block(float x, float y, bool drop_item);
uint8_t *world_chunk_get_blocks(int64_t id); uint8_t *world_chunk_get_blocks(int64_t id);