Rework of the plants, to work with the new lib

Felix Wagner 2011-10-05 04:55:40 +01:00
parent 67a9708720
commit 2d2cab8227
8 changed files with 32 additions and 31 deletions

View File

@ -10,11 +10,10 @@ Offset=-14,-5
Vertices=2
VertexX=0,0
VertexY=0,3
VertexCNAT=3,4
VertexCNAT=16,8
Mass=1
StretchGrowth=1
Oversize=1
ContactIncinerate=3
BlastIncinerate=1
Float=1
Float=1

View File

@ -2,13 +2,10 @@
#include Library_Plant
private func SeedChance() { return 400; }
private func SeedAreaSize() { return 200; }
private func SeedAmount() { return 6; }
func Construction()
{
StartGrowth(1);
inherited(...);
}
private func Initialize()
@ -22,4 +19,4 @@ public func Incineration()
RemoveObject();
}
local Name = "$Name$";
local Name = "$Name$";

View File

@ -5,13 +5,14 @@ Category=C4D_Object
Timer=350
TimerCall=Seed
Width=12
Height=12
Offset=-6,-6
Height=20
Offset=-6,-10
Vertices=2
VertexX=0,0
VertexY=0,3
VertexCNAT=4,3
VertexY=1,4
VertexCNAT=16,8
VertexFriction=10,100
Mass=6
StretchGrowth=4
Oversize=1
Placement=4

View File

@ -3,12 +3,15 @@
#include Library_Plant
private func SeedChance() { return 250; }
private func SeedAreaSize() { return 100; }
private func SeedAmount() { return 6; }
private func SeedAreaSize() { return 150; }
private func SeedAmount() { return 5; }
/* Initialisation */
func Construction()
{
StartGrowth(3);
_inherited(...);
}
private func Initialize()
@ -16,18 +19,20 @@ private func Initialize()
SetProperty("MeshTransformation", Trans_Rotate(RandomX(0,359),0,1,0));
}
public func Interact(object clonk)
/* Harvesting */
private func CanBeHarvested() { return true; }
public func Harvest(object clonk)
{
//Pick mushroom
this.Collectible = 1;
if(clonk->ContentsCount() < clonk->MaxContentsCount())
Enter(clonk);
clonk->Collect(this);
return true;
}
public func IsInteractable(object clonk)
{
return clonk->GetProcedure() == "WALK" && GetProperty("Collectible") != 1;
return GetProperty("Collectible") != 1 && inherited(clonk);
}
public func GetInteractionMetaInfo(object clonk)
@ -35,6 +40,8 @@ public func GetInteractionMetaInfo(object clonk)
return { Description = "$PickMushroom$" };
}
/* Eating */
protected func ControlUse(object clonk, int iX, int iY)
{
clonk->DoEnergy(10);
@ -42,4 +49,4 @@ protected func ControlUse(object clonk, int iX, int iY)
}
local Name = "$Name$";
local Collectible = 0;
local Collectible = 0;

View File

@ -10,11 +10,10 @@ Offset=-30,-55
Vertices=9
VertexX=0,0,0,0,0,0,0,0,0
VertexY=45,30,20,10,0,-10,-20,-30,-45
VertexCNAT=3,4,4,4,4,4,4,4,2
VertexCNAT=8,16,16,16,16,16,16,16,4
Mass=150
StretchGrowth=1
Oversize=1
ContactIncinerate=3
BlastIncinerate=1
Float=1
Float=1

View File

@ -2,12 +2,12 @@
#include Library_Plant
private func SeedAreaSize() { return 500; }
private func SeedAmount() { return 10; }
private func SeedAreaSize() { return 400; }
func Construction()
{
StartGrowth(1);
inherited(...);
}
private func Initialize()
@ -15,4 +15,4 @@ private func Initialize()
SetProperty("MeshTransformation", Trans_Rotate(RandomX(0,359),0,1,0));
}
local Name = "$Name$";
local Name = "$Name$";

View File

@ -8,13 +8,11 @@ Offset=-10,-30
Vertices=2
VertexX=0,0
VertexY=-25,25
VertexCNAT=3,4
VertexCNAT=4,8
Mass=40
StretchGrowth=1
Oversize=1
ContactIncinerate=3
BlastIncinerate=1
Float=1
Rotate=1
Rotate=1

View File

@ -5,4 +5,4 @@ private func Initialize()
SetProperty("MeshTransformation", Trans_Rotate(RandomX(0,359),0,1,0));
}
local Name = "$Name$";
local Name = "$Name$";