forked from Mirrors/openclonk
parent
a5b8caab9d
commit
25d85e8fb6
|
@ -0,0 +1,17 @@
|
||||||
|
[DefCore]
|
||||||
|
id=Chunk_Wood
|
||||||
|
Version=4,10,0,0
|
||||||
|
Category=C4D_Object
|
||||||
|
Width=12
|
||||||
|
Height=12
|
||||||
|
Offset=-6,-6
|
||||||
|
Vertices=3
|
||||||
|
VertexX=0,4,-4
|
||||||
|
VertexY=3,-3,-3
|
||||||
|
VertexFriction=40,40,40
|
||||||
|
Value=6
|
||||||
|
Mass=16
|
||||||
|
Components=Wood=3
|
||||||
|
Rotate=1
|
||||||
|
Float=1
|
||||||
|
StretchGrowth=1
|
Binary file not shown.
After Width: | Height: | Size: 3.1 KiB |
|
@ -0,0 +1,31 @@
|
||||||
|
/*--- Wood Chunk ---*/
|
||||||
|
|
||||||
|
/*
|
||||||
|
What rolls down stairs alone or in pairs
|
||||||
|
Rolls over your neighbor's dog?
|
||||||
|
What's great for a snack and fits on your back?
|
||||||
|
It's Log, Log, Log!
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include Library_CarryHeavy
|
||||||
|
|
||||||
|
public func GetCarryMode(clonk) { return CARRY_BothHands; }
|
||||||
|
public func GetCarryPhase() { return 800; }
|
||||||
|
|
||||||
|
protected func Hit()
|
||||||
|
{
|
||||||
|
Sound("WoodHit?");
|
||||||
|
}
|
||||||
|
|
||||||
|
public func IsFuel() { return true; }
|
||||||
|
public func GetFuelAmount() { return 150; }
|
||||||
|
public func IsChunk() { return true; }
|
||||||
|
public func IsSawmillProduct() { return true; }
|
||||||
|
|
||||||
|
local Name = "$Name$";
|
||||||
|
local Description = "$Description$";
|
||||||
|
local Rebuy = true;
|
||||||
|
local BlastIncinerate = 5;
|
||||||
|
local ContactIncinerate = 1;
|
||||||
|
local Touchable = 2;
|
||||||
|
local Plane = 470;
|
|
@ -0,0 +1,2 @@
|
||||||
|
Name=Holz
|
||||||
|
Description=Geeignet als Bau- oder Brennmaterial.
|
|
@ -0,0 +1,2 @@
|
||||||
|
Name=Log
|
||||||
|
Description=Needed for construction or as fuel.
|
|
@ -10,7 +10,7 @@ VertexX=0,0,0,0,0,0,0,0,0
|
||||||
VertexY=30,15,5,2,0,-2,-5,-15,-25
|
VertexY=30,15,5,2,0,-2,-5,-15,-25
|
||||||
VertexCNAT=8,16,16,16,16,16,16,16,4
|
VertexCNAT=8,16,16,16,16,16,16,16,4
|
||||||
VertexFriction=50,50,25,25,25,25,50,50,50
|
VertexFriction=50,50,25,25,25,25,50,50,50
|
||||||
Components=Wood=4
|
Components=Chunk_Wood=3
|
||||||
Mass=100
|
Mass=100
|
||||||
StretchGrowth=1
|
StretchGrowth=1
|
||||||
Oversize=1
|
Oversize=1
|
||||||
|
|
|
@ -127,6 +127,17 @@ public func ChopDown()
|
||||||
_inherited(...);
|
_inherited(...);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func SplitDown()
|
||||||
|
{
|
||||||
|
for (var i = 0 ; i < GetComponent(Chunk_Wood) ; i++)
|
||||||
|
{
|
||||||
|
var x = Sin(GetR(), 15 * ( i - GetComponent(Chunk_Wood,nil,nil, GetID())/2 )); // Chunk_Wood is 12 in size, 15 seems about good
|
||||||
|
var y = Cos(GetR(), 15 * ( i - GetComponent(Chunk_Wood,nil,nil, GetID())/2 ));
|
||||||
|
CreateObject(Chunk_Wood, x,y)->SetR(GetR());
|
||||||
|
}
|
||||||
|
RemoveObject();
|
||||||
|
}
|
||||||
|
|
||||||
func Damage()
|
func Damage()
|
||||||
{
|
{
|
||||||
_inherited();
|
_inherited();
|
||||||
|
|
|
@ -10,7 +10,7 @@ VertexX=0,0,0,0,0
|
||||||
VertexY=40,20,0,-20,-40
|
VertexY=40,20,0,-20,-40
|
||||||
VertexCNAT=8,16,16,16,4
|
VertexCNAT=8,16,16,16,4
|
||||||
VertexFriction=50,25,25,25,50
|
VertexFriction=50,25,25,25,50
|
||||||
Components=Wood=4
|
Components=Chunk_Wood=3
|
||||||
Mass=110
|
Mass=110
|
||||||
StretchGrowth=1
|
StretchGrowth=1
|
||||||
Oversize=1
|
Oversize=1
|
||||||
|
|
|
@ -59,6 +59,17 @@ public func ChopDown()
|
||||||
_inherited(...);
|
_inherited(...);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func SplitDown()
|
||||||
|
{
|
||||||
|
for (var i = 0 ; i < GetComponent(Chunk_Wood) ; i++)
|
||||||
|
{
|
||||||
|
var x = Sin(GetR(), 15 * ( i - GetComponent(Chunk_Wood,nil,nil, GetID())/2 )); // Chunk_Wood is 12 in size, 15 seems about good
|
||||||
|
var y = Cos(GetR(), 15 * ( i - GetComponent(Chunk_Wood,nil,nil, GetID())/2 ));
|
||||||
|
CreateObject(Chunk_Wood, x,y)->SetR(GetR());
|
||||||
|
}
|
||||||
|
RemoveObject();
|
||||||
|
}
|
||||||
|
|
||||||
local Name = "$Name$";
|
local Name = "$Name$";
|
||||||
local Touchable = 0;
|
local Touchable = 0;
|
||||||
local BlastIncinerate = 1;
|
local BlastIncinerate = 1;
|
||||||
|
|
|
@ -10,7 +10,7 @@ VertexX=0,0,0,0,0,0,0,0,0
|
||||||
VertexY=45,30,20,10,0,-10,-20,-30,-45
|
VertexY=45,30,20,10,0,-10,-20,-30,-45
|
||||||
VertexCNAT=8,16,16,16,16,16,16,16,4
|
VertexCNAT=8,16,16,16,16,16,16,16,4
|
||||||
VertexFriction=50,50,25,25,25,25,50,50,50
|
VertexFriction=50,50,25,25,25,25,50,50,50
|
||||||
Components=Wood=5
|
Components=Chunk_Wood=3
|
||||||
Mass=120
|
Mass=120
|
||||||
StretchGrowth=1
|
StretchGrowth=1
|
||||||
Oversize=1
|
Oversize=1
|
||||||
|
|
|
@ -64,7 +64,6 @@ protected func Damage()
|
||||||
_inherited(...);
|
_inherited(...);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public func ChopDown()
|
public func ChopDown()
|
||||||
{
|
{
|
||||||
// Use Special Vertex Mode 1 (see documentation) so the removed vertex won't come back when rotating the tree.
|
// Use Special Vertex Mode 1 (see documentation) so the removed vertex won't come back when rotating the tree.
|
||||||
|
@ -115,6 +114,34 @@ func BurstIntoAshes()
|
||||||
RemoveObject();
|
RemoveObject();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Splitting */
|
||||||
|
|
||||||
|
// Copied from the plant library
|
||||||
|
|
||||||
|
local split;
|
||||||
|
|
||||||
|
func Toughness()
|
||||||
|
{
|
||||||
|
return 4;
|
||||||
|
}
|
||||||
|
|
||||||
|
func Split()
|
||||||
|
{
|
||||||
|
split++;
|
||||||
|
if (split > Toughness()) Split();
|
||||||
|
}
|
||||||
|
|
||||||
|
func SplitDown()
|
||||||
|
{
|
||||||
|
for (var i = 0 ; i < GetComponent(Chunk_Wood) ; i++)
|
||||||
|
{
|
||||||
|
var x = Sin(GetR(), 15 * ( i - GetComponent(Chunk_Wood,nil,nil, GetID())/2 )); // Chunk_Wood is 12 in size, 15 seems about good
|
||||||
|
var y = Cos(GetR(), 15 * ( i - GetComponent(Chunk_Wood,nil,nil, GetID())/2 ));
|
||||||
|
CreateObject(Chunk_Wood, x,y)->SetR(GetR());
|
||||||
|
}
|
||||||
|
RemoveObject();
|
||||||
|
}
|
||||||
|
|
||||||
local Name = "$Name$";
|
local Name = "$Name$";
|
||||||
local Touchable = 0;
|
local Touchable = 0;
|
||||||
local BlastIncinerate = 1;
|
local BlastIncinerate = 1;
|
||||||
|
|
|
@ -10,7 +10,7 @@ VertexX=0,0,0,0,0,0,0,0,0
|
||||||
VertexY=45,30,20,10,0,-10,-20,-30,-45
|
VertexY=45,30,20,10,0,-10,-20,-30,-45
|
||||||
VertexCNAT=8,16,16,16,16,16,16,16,4
|
VertexCNAT=8,16,16,16,16,16,16,16,4
|
||||||
VertexFriction=50,50,25,25,25,25,50,50,50
|
VertexFriction=50,50,25,25,25,25,50,50,50
|
||||||
Components=Wood=5
|
Components=Chunk_Wood=4
|
||||||
Mass=150
|
Mass=150
|
||||||
StretchGrowth=1
|
StretchGrowth=1
|
||||||
Oversize=1
|
Oversize=1
|
||||||
|
|
|
@ -38,6 +38,17 @@ public func ChopDown()
|
||||||
_inherited(...);
|
_inherited(...);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func SplitDown()
|
||||||
|
{
|
||||||
|
for (var i = 0 ; i < GetComponent(Chunk_Wood) ; i++)
|
||||||
|
{
|
||||||
|
var x = Sin(GetR(), 15 * ( i - GetComponent(Chunk_Wood,nil,nil, GetID())/2 )); // Chunk_Wood is 12 in size, 15 seems about good
|
||||||
|
var y = Cos(GetR(), 15 * ( i - GetComponent(Chunk_Wood,nil,nil, GetID())/2 ));
|
||||||
|
CreateObject(Chunk_Wood, x,y)->SetR(GetR());
|
||||||
|
}
|
||||||
|
RemoveObject();
|
||||||
|
}
|
||||||
|
|
||||||
func Damage()
|
func Damage()
|
||||||
{
|
{
|
||||||
_inherited();
|
_inherited();
|
||||||
|
|
|
@ -14,4 +14,4 @@ StretchGrowth=1
|
||||||
Oversize=1
|
Oversize=1
|
||||||
Float=1
|
Float=1
|
||||||
Rotate=1
|
Rotate=1
|
||||||
Components=Wood=3
|
Components=Chunk_Wood=2
|
Loading…
Reference in New Issue