@ -21,6 +21,7 @@
#include "df/world.h"
#include "df/building.h"
#include "df/building_doorst.h"
#include "df/building_floodgatest.h"
#include "df/plant.h"
#include "df/plant_raw.h"
@ -903,6 +904,12 @@ void lightingEngineViewscreen::doOcupancyAndLights()
if(!door->door_flags.bits.closed)
continue;
}
else if(type==df::enums::building_type::Floodgate)
{
df::building_floodgatest* gate=static_cast<df::building_floodgatest*>(bld);
if(!gate->gate_flags.bits.closed)
if(def->useMaterial)
@ -127,6 +127,7 @@ struct buildingLightDef
bool useMaterial;
float thickness;
float size;
buildingLightDef():poweredOnly(false),useMaterial(true),thickness(1.0f),size(1.0f){}
};
class lightingEngineViewscreen:public lightingEngine
@ -146,3 +146,4 @@ addBuilding("Bed",{1,1,1},{0.3,0.2,0.0},2)
addBuilding("WindowGlass",nil,nil,0,{"useMaterial"})
addBuilding("WindowGem",nil,nil,0,{"useMaterial"})
addBuilding("Door",nil,nil,0,{"useMaterial"}) -- special case, only closed door obstruct/emit light
addBuilding("Floodgate",nil,nil,0,{"useMaterial"}) -- special case, only closed door obstruct/emit light