Fixed worldgen to only use tiles without collision in filling rooms, then a couple more changes to lighting so that if the light is <= 1 it just assumes the base light strength which ends up looking nicer and more like the kind of light I want.
This commit is contained in:
parent
59bbae0af0
commit
28d19d80a2
8 changed files with 36 additions and 29 deletions
14
tilemap.cpp
14
tilemap.cpp
|
@ -57,8 +57,18 @@ const TileCell &TileMap::at(size_t x, size_t y) {
|
|||
return $display[y][x];
|
||||
}
|
||||
|
||||
std::vector<std::string> TileMap::tile_names() {
|
||||
return $config.keys();
|
||||
std::vector<std::string> TileMap::tile_names(bool collision) {
|
||||
const auto &json = $config.json();
|
||||
std::vector<std::string> keys;
|
||||
|
||||
for(const auto& el : json.items()) {
|
||||
const auto &val = el.value();
|
||||
if(val["collision"] == collision) {
|
||||
keys.push_back(el.key());
|
||||
}
|
||||
}
|
||||
|
||||
return keys;
|
||||
}
|
||||
|
||||
bool TileMap::INVARIANT() {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue