forked from Mirrors/openclonk
Fixing my own stupid crap (coconut).
parent
f9f7d17208
commit
461d147859
|
@ -12,17 +12,28 @@ public func AttachToTree(object tree)
|
||||||
ScheduleCall(this, "DeattachFromTree", 4200 + Random(500));
|
ScheduleCall(this, "DeattachFromTree", 4200 + Random(500));
|
||||||
}
|
}
|
||||||
|
|
||||||
public func DeattachFromTree()
|
public func DeattachFromTree(bool no_bounce)
|
||||||
{
|
{
|
||||||
ClearScheduleCall(this, "DeattachFromTree");
|
ClearScheduleCall(this, "DeattachFromTree");
|
||||||
SetCategory(GetCategory() ^ C4D_StaticBack);
|
SetCategory(GetCategory() ^ C4D_StaticBack);
|
||||||
if (mother) mother->LostCoconut();
|
if (mother) mother->LostCoconut();
|
||||||
var effect = AddEffect("IntSeed", this, 100, 18, this);
|
var effect = AddEffect("IntSeed", this, 100, 18, this);
|
||||||
effect.SeedTime = GetSeedTime();
|
effect.SeedTime = GetSeedTime();
|
||||||
|
mother = nil;
|
||||||
|
|
||||||
AddEffect("Bouncy", this, 1, 175);
|
AddEffect("Bouncy", this, 1, 175);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private func Entrance()
|
||||||
|
{
|
||||||
|
if (mother) DeattachFromTree(true);
|
||||||
|
}
|
||||||
|
|
||||||
|
private func Destruction()
|
||||||
|
{
|
||||||
|
if (mother) DeattachFromTree(true);
|
||||||
|
}
|
||||||
|
|
||||||
/** Destroy coconut instead of seeding if it tries to seed outside given area
|
/** Destroy coconut instead of seeding if it tries to seed outside given area
|
||||||
*/
|
*/
|
||||||
public func SetConfinement(conf)
|
public func SetConfinement(conf)
|
||||||
|
|
Loading…
Reference in New Issue