forked from Mirrors/openclonk
AcidDrilling: Power crystals block building construction (#1009)
parent
acba8cad36
commit
94a17c534c
Binary file not shown.
Binary file not shown.
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue