AcidDrilling: Power crystals block building construction (#1009)

stable-5.4
Sven Eberhardt 2014-01-26 14:26:04 +01:00
parent acba8cad36
commit 94a17c534c
3 changed files with 10 additions and 0 deletions

View File

@ -2,6 +2,8 @@
#include Library_Flag
local DefaultFlagRadius = 250;
protected func Initialize()
{
SetCategory(C4D_StaticBack);
@ -13,3 +15,11 @@ protected func Initialize()
local Name = "$Name$";
local Description = "$Description$";
global func CheckConstructionSite(structure_id, x,y)
{
// Construction check: May not construct in power crystal range
if (!inherited(structure_id, x,y, ...)) return false;
if (FindObject(Find_ID(PowerCrystals), Find_Distance(PowerCrystals.DefaultFlagRadius, x,y))) return false;
return true;
}