mirror of
https://github.com/Noratrieb/game-wip-dontplay.git
synced 2026-01-14 19:55:02 +01:00
Add unbreakanium layer at bottom
This commit is contained in:
parent
312e9959ab
commit
6ca737f36c
2 changed files with 7 additions and 0 deletions
BIN
res/tiles.png
BIN
res/tiles.png
Binary file not shown.
|
Before Width: | Height: | Size: 4.4 KiB After Width: | Height: | Size: 4.6 KiB |
|
|
@ -115,6 +115,12 @@ impl Chunk {
|
|||
b.id = rng.gen_range(1..5);
|
||||
}
|
||||
}
|
||||
// Unbreakable layer at bottom
|
||||
if pos.y > 510 {
|
||||
for b in &mut tiles {
|
||||
b.id = Tile::UNBREAKANIUM;
|
||||
}
|
||||
}
|
||||
Self { tiles }
|
||||
}
|
||||
|
||||
|
|
@ -132,4 +138,5 @@ pub struct Tile {
|
|||
|
||||
impl Tile {
|
||||
pub const AIR: TileId = 0;
|
||||
pub const UNBREAKANIUM: TileId = 5;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue