Tired of being wet indoors? Tired of rain going straight through your roof and onto your head? Download this mod.

It works by creating a physics zone inside of every single brick.
There is an impact to brick loading time and ghosting time.
It does not work well with large ramp bricks as it can only create rectangular/cubular shaped zones.
If you want to make rain go through a brick, turn raycasting off on that brick.
Source & Downloadsfunction fxDTSBrick::createRainBlock(%brick)
{
if(!(%brick.isRaycasting())||isObject(%brick.rainblock))
{
return;
}
%pz = new PhysicalZone()
{
polyhedron = "0 0 0 1 0 0 0 -1 0 0 0 1";
};
if(!isObject(%pz))
{
error("ERROR: Could not create physical zone for " @ %brick.getDatablock().getName() @ "brick!");
return;
}
missionCleanup.add(%pz);
%brick.rainblock = %pz;
//set size
%boxMin = getWords(%brick.getWorldBox(), 0, 2);
%boxMax = getWords(%brick.getWorldBox(), 3, 5);
%boxDiff = vectorSub(%boxMax, %boxMin);
%pz.setScale(%boxDiff);
//set position - this looks wierd because the the physical zone isn't positioned from it's center
%posA = %brick.getWorldBoxCenter();
%posB = %pz.getWorldBoxCenter();
%posDiff = vectorSub(%posA, %posB);
%pz.setTransform(%posDiff);
}
if(isPackage(BrickUmbrellas))
{
deactivatepackage(BrickUmbrellas);
}
package BrickUmbrellas
{
function fxDTSBrick::onPlant(%brick)
{
%brick.schedule(150,"createRainBlock");
Parent::onPlant(%brick);
}
function fxDTSBrick::onLoadPlant(%brick)
{
%brick.schedule(150,"createRainBlock");
Parent::onLoadPlant(%brick);
}
function fxDTSBrick::onRemove(%brick)
{
if(isObject(%brick.rainblock))
{
%brick.rainblock.delete();
}
Parent::onRemove(%brick);
}
function fxDTSBrick::setRaycasting(%brick, %value)
{
if(%value==1)
{
if(isObject(%brick.rainblock))
{
%pz = %brick.rainblock;
%posA = %brick.getWorldBoxCenter();
%posB = vectorSub(%pz.getWorldBoxCenter(),%pz.position);
%posDiff = vectorSub(%posA, %posB);
%pz.setTransform(%posDiff);
}
else
{
%brick.createRainBlock();
}
}
else
{
if(isObject(%brick.rainblock))
{
%brick.rainblock.setTransform("0 0 -500" SPC %brick.rainblock.rotation);
}
}
Parent::setRaycasting(%brick, %value);
}
};
activatepackage(BrickUmbrellas);
Mediafire:
http://www.mediafire.com/file/nn0v8tb5ny4qwz4/Script_BrickUmbrellas.zipDropbox:
https://www.dropbox.com/s/4ph66knjav7k5oz/Script_BrickUmbrellas.zip?dl=0Leopard(
Pecon's Filehosting):
http://leopard.hosting/download.php?f=idwic&name=Script_BrickUmbrellas.zipBlockland Glass: [waiting for approval]