Merge branch 'master' of git://github.com/JapaMala/dfhack

develop
Warmist 2013-06-28 23:52:51 +03:00
commit 34e5716cc0
3 changed files with 10 additions and 1 deletions

@ -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"
@ -901,6 +902,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)
continue;
}
if(def->useMaterial)

@ -128,6 +128,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