diff --git a/dev/apiculture/alveary/misc/tile.js b/dev/apiculture/alveary/misc/tile.js index 0dac422..59d666f 100644 --- a/dev/apiculture/alveary/misc/tile.js +++ b/dev/apiculture/alveary/misc/tile.js @@ -47,6 +47,10 @@ TileEntity.registerPrototype(BlockID.alveary_misc_center, { this.house.getClimate = function () { return self.climate; }; + + this.house.canSeeSky = function () { + return GenerationUtils.canSeeSky(self.x, self.y + 2, self.z); + }; } var Modifiers = new ModifierList([]); diff --git a/dev/apiculture/api/BeeHouse.js b/dev/apiculture/api/BeeHouse.js index 73eecb7..d35c09e 100644 --- a/dev/apiculture/api/BeeHouse.js +++ b/dev/apiculture/api/BeeHouse.js @@ -91,7 +91,7 @@ function BeeHouse(tile, slots, houseModifierList) { this.error = Translation.translate("apiary.error.climate"); } else if (!this.queen.isValidHumidity(this.getHumidity())) { this.error = Translation.translate("apiary.error.humidity"); - } else if (!GenerationUtils.canSeeSky(this.tile.x, this.tile.y + 1, this.tile.z) && !modifiersList.isSelfLighted() && !this.houseModifierList.isSelfLighted() && !this.queen.getActiveChromosome("CAVE_DWELLING")) { + } else if (!this.canSeeSky() && !modifiersList.isSelfLighted() && !this.houseModifierList.isSelfLighted() && !this.queen.getActiveChromosome("CAVE_DWELLING")) { this.error = Translation.translate("apiary.error.sky"); } else if (World.getWeather().rain > 0 && !modifiersList.isSealed() && !houseModifierList.isSealed() && !this.queen.getActiveChromosome("TOLERATES_RAIN")) { this.error = Translation.translate("apiary.error.rain"); @@ -131,6 +131,10 @@ function BeeHouse(tile, slots, houseModifierList) { //Функции для перегрузки + this.canSeeSky = function () { + return GenerationUtils.canSeeSky(this.tile.x, this.tile.y + 1, this.tile.z); + }; + this.getPrincessSlot = function (slotname) { return this.getContainer().getSlot(slotname); };