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));
|
||||
}
|
||||
|
||||
public func DeattachFromTree()
|
||||
public func DeattachFromTree(bool no_bounce)
|
||||
{
|
||||
ClearScheduleCall(this, "DeattachFromTree");
|
||||
SetCategory(GetCategory() ^ C4D_StaticBack);
|
||||
if (mother) mother->LostCoconut();
|
||||
var effect = AddEffect("IntSeed", this, 100, 18, this);
|
||||
effect.SeedTime = GetSeedTime();
|
||||
mother = nil;
|
||||
|
||||
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
|
||||
*/
|
||||
public func SetConfinement(conf)
|
||||
|
|
Loading…
Reference in New Issue