1
0
mirror of https://github.com/zenorogue/hyperrogue.git synced 2025-10-31 22:12:59 +00:00

product:: big stuff

This commit is contained in:
Zeno Rogue
2019-08-18 15:32:46 +02:00
parent fb0f5872c8
commit f40072511b
6 changed files with 44 additions and 6 deletions

View File

@@ -31,12 +31,13 @@ EX bool checkBarriersFront(cellwalker bb, int q IS(5), bool cross IS(false)) {
return checkBarriersBack(bb, q);
}
/** return true if the cell c is not allowed to generate barriers because of other large things already existing nearby. */
EX bool hasbardir(cell *c) {
return c->bardir != NODIR && c->bardir != NOBARRIERS;
}
/** return true if the cell c is not allowed to generate barriers because of other large things already existing nearby. */
EX void preventbarriers(cell *c) {
if(prod) c = product::get_where(c).first;
if(c && c->bardir == NODIR) c->bardir = NOBARRIERS;
}