forked from Mirrors/openclonk
Added planks- Get some them from the sawmill.
Reworked quite a lot of production costs to either planks or chunk_wood. Haven't done a thourough search. I expact that soon Chunk_Wood is renamed into Wood anyway, so any errors will solve themselves.heavy-resources
parent
8d1120b9e7
commit
59ee596d35
|
@ -0,0 +1,17 @@
|
|||
[DefCore]
|
||||
id=Planks
|
||||
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=Chunk_Wood=1
|
||||
Rotate=1
|
||||
Float=1
|
||||
StretchGrowth=1
|
Binary file not shown.
After Width: | Height: | Size: 3.1 KiB |
|
@ -0,0 +1,24 @@
|
|||
/*--- Planks ---*/
|
||||
|
||||
#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.
|
|
@ -11,7 +11,7 @@ VertexY=3,-3,-3
|
|||
VertexFriction=40,40,40
|
||||
Value=6
|
||||
Mass=16
|
||||
Components=Wood=3
|
||||
Components=Chunk_Wood=1
|
||||
Rotate=1
|
||||
Float=1
|
||||
StretchGrowth=1
|
|
@ -20,7 +20,7 @@ protected func Hit()
|
|||
public func IsFuel() { return true; }
|
||||
public func GetFuelAmount() { return 150; }
|
||||
public func IsChunk() { return true; }
|
||||
public func IsSawmillProduct() { return true; }
|
||||
public func IsSawmillIngredient() { return true; }
|
||||
|
||||
local Name = "$Name$";
|
||||
local Description = "$Description$";
|
||||
|
|
|
@ -13,7 +13,7 @@ func Incineration()
|
|||
|
||||
public func IsFuel() { return true; }
|
||||
public func GetFuelAmount() { return 50; }
|
||||
public func IsSawmillProduct() { return true; }
|
||||
//public func IsSawmillProduct() { return true; }
|
||||
|
||||
local Collectible = 1;
|
||||
local Name = "$Name$";
|
||||
|
|
|
@ -11,6 +11,6 @@ VertexY=0,3,-3
|
|||
VertexFriction=50,50,50
|
||||
Value=15
|
||||
Mass=12
|
||||
Components=Wood=1;Metal=1;
|
||||
Components=Chunk_Wood=1;Metal=1;
|
||||
Rotate=1
|
||||
|
||||
|
|
|
@ -11,6 +11,6 @@ VertexY=-6,-6,6,6,0,0
|
|||
VertexFriction=60,60,60,60,60,60
|
||||
Value=12
|
||||
Mass=20
|
||||
Components=Wood=2;Metal=1;
|
||||
Components=Chunk_Wood=2;Metal=1;
|
||||
Rotate=1
|
||||
Float=1
|
||||
|
|
|
@ -11,6 +11,6 @@ VertexY=3,-6,10,10
|
|||
VertexFriction=80,60,60
|
||||
Value=12
|
||||
Mass=20
|
||||
Components=PowderKeg=1;Firestone=1;Wood=1;
|
||||
Components=PowderKeg=1;Firestone=1;Planks=1;
|
||||
Rotate=1
|
||||
ColorByOwner=1
|
||||
|
|
|
@ -10,7 +10,7 @@ VertexX=-4,-4,5,5
|
|||
VertexY=-2,5,-2,5
|
||||
VertexCNAT=5,9,6,10
|
||||
VertexFriction=25,25,25,25
|
||||
Components=Wood=3;
|
||||
Components=Chunk_Wood=3;
|
||||
Construction=1
|
||||
Value=6
|
||||
Mass=12
|
||||
|
|
|
@ -12,5 +12,5 @@ VertexFriction=50,50,50,50
|
|||
Picture=0,0,64,64
|
||||
Value=16
|
||||
Mass=30
|
||||
Components=Wood=1;Coal=2;Firestone=2
|
||||
Components=Planks=1;Coal=2;Firestone=2
|
||||
Rotate=1
|
||||
|
|
|
@ -11,6 +11,6 @@ VertexY=0,0
|
|||
VertexFriction=80,80
|
||||
Value=12
|
||||
Mass=10
|
||||
Components=Wood=2;Metal=1;Rope=1;
|
||||
Components=Planks=2;Metal=1;Rope=1;
|
||||
Rotate=1
|
||||
Float=2
|
||||
|
|
|
@ -11,6 +11,6 @@ VertexY=1,5,-2,-2
|
|||
VertexFriction=80,80,80,80
|
||||
Value=3
|
||||
Mass=15
|
||||
Components=Wood=1;Rock=1;
|
||||
Components=Chunk_Wood=1;Rock=1;
|
||||
Rotate=1
|
||||
|
||||
|
|
|
@ -11,6 +11,6 @@ VertexY=-6,-5,-5,4
|
|||
VertexFriction=50,100,100,40
|
||||
Value=10
|
||||
Mass=20
|
||||
Components=Wood=1;Metal=1;
|
||||
Components=Chunk_Wood=1;Metal=1;
|
||||
Rotate=1
|
||||
|
||||
|
|
|
@ -11,6 +11,6 @@ VertexY=4,-3,-3
|
|||
VertexFriction=100,100,100
|
||||
Value=8
|
||||
Mass=10
|
||||
Components=Wood=2;Rope=2;
|
||||
Components=Chunk_Wood=2;Rope=2;
|
||||
Rotate=1
|
||||
NoStabilize=1
|
||||
|
|
|
@ -11,6 +11,6 @@ VertexY=4,-3,-3
|
|||
VertexFriction=100,100,100
|
||||
Value=8
|
||||
Mass=10
|
||||
Components=Wood=2;Rope=1;
|
||||
Components=Chunk_Wood=2;Rope=1;
|
||||
Rotate=1
|
||||
NoStabilize=1
|
||||
|
|
|
@ -11,5 +11,5 @@ VertexY=-7,9,0
|
|||
VertexFriction=50,50,50
|
||||
Value=10
|
||||
Mass=20
|
||||
Components=Wood=1;Metal=1;
|
||||
Components=Chunk_Wood=1;Metal=1;
|
||||
Rotate=1
|
||||
|
|
|
@ -11,5 +11,5 @@ VertexY=0,0,0
|
|||
VertexFriction=50,50,100
|
||||
Value=10
|
||||
Mass=10
|
||||
Components=Wood=1;Metal=1;
|
||||
Components=Chunk_Wood=1;Metal=1;
|
||||
Rotate=1
|
|
@ -11,6 +11,6 @@ VertexY=-10,-10,10,10
|
|||
VertexFriction=100,100,100,100,100
|
||||
Value=8
|
||||
Mass=10
|
||||
Components=Wood=3;
|
||||
Components=Chunk_Wood=3;
|
||||
Rotate=1
|
||||
Float=2
|
||||
|
|
|
@ -11,6 +11,6 @@ VertexY=-7,7
|
|||
VertexFriction=50,50
|
||||
Value=10
|
||||
Mass=20
|
||||
Components=Wood=1;Metal=1;
|
||||
Components=Chunk_Wood=1;Metal=1;
|
||||
Rotate=1
|
||||
|
||||
|
|
|
@ -11,5 +11,5 @@ VertexY=0,0,2,0
|
|||
VertexFriction=50,50,70
|
||||
Value=25
|
||||
Mass=15
|
||||
Components=Metal=3;Wood=1;
|
||||
Components=Metal=3;Planks=1;
|
||||
Rotate=1
|
|
@ -11,6 +11,6 @@ VertexY=-12,13
|
|||
VertexFriction=100,50
|
||||
Value=12
|
||||
Mass=9
|
||||
Components=Wood=2;Metal=1;
|
||||
Components=Chunk_Wood=2;Metal=1;
|
||||
Rotate=1
|
||||
|
||||
|
|
|
@ -11,5 +11,5 @@ VertexY=0,0,2,0
|
|||
VertexFriction=50,50,70
|
||||
Value=18
|
||||
Mass=15
|
||||
Components=Metal=2;Wood=1;
|
||||
Components=Metal=2;Chunk_Wood=1;
|
||||
Rotate=1
|
||||
|
|
|
@ -11,5 +11,5 @@ VertexY=-4,5,-2,-2
|
|||
VertexFriction=50,50
|
||||
Value=10
|
||||
Mass=20
|
||||
Components=Wood=1;Metal=1;
|
||||
Components=Chunk_Wood=1;Metal=1;
|
||||
Rotate=1
|
||||
|
|
|
@ -11,6 +11,6 @@ VertexY=-7,7
|
|||
VertexFriction=50,50
|
||||
Value=10
|
||||
Mass=20
|
||||
Components=Wood=1;Metal=1;
|
||||
Components=Chunk_Wood=1;Metal=1;
|
||||
Rotate=1
|
||||
|
||||
|
|
|
@ -11,7 +11,7 @@ VertexY=-13,-15,-14,24,24,24
|
|||
VertexFriction=50,50,50,100,100,100
|
||||
Value=200
|
||||
Mass=4500
|
||||
Components=Wood=3;Metal=2;Loam=2
|
||||
Components=Planks=3;Metal=2;Loam=2
|
||||
Exclusive=1
|
||||
Construction=1
|
||||
ContainBlast=1
|
||||
|
|
|
@ -11,7 +11,7 @@ VertexY=-17,-25,-14,25,25,25
|
|||
VertexFriction=50,50,50,100,100,100
|
||||
Value=200
|
||||
Mass=4500
|
||||
Components=Wood=3;Metal=3
|
||||
Components=Chunk_Wood=3;Metal=3
|
||||
Exclusive=1
|
||||
Construction=1
|
||||
ContainBlast=1
|
||||
|
|
|
@ -10,7 +10,7 @@ VertexX=-8,-8,8,8
|
|||
VertexY=-2,11,-2,11
|
||||
VertexCNAT=5,9,6,10
|
||||
VertexFriction=50,50,100,100
|
||||
Components=Wood=3;
|
||||
Components=Chunk_Wood=3;
|
||||
Construction=1
|
||||
Value=15
|
||||
Mass=10
|
||||
|
|
|
@ -11,7 +11,7 @@ VertexY=-27,-27,32,32,32
|
|||
VertexFriction=50,50,100,100,100
|
||||
Value=50
|
||||
Mass=1500
|
||||
Components=Wood=3;Metal=1
|
||||
Components=Planks=3;Metal=1
|
||||
Exclusive=1
|
||||
Construction=1
|
||||
ContainBlast=1
|
||||
|
|
|
@ -11,7 +11,7 @@ VertexY=41,-41, 41,41,41,11,2
|
|||
VertexFriction=100,10,100,100,100,10,10
|
||||
Value=200
|
||||
Mass=4500
|
||||
Components=Wood=3;Metal=3
|
||||
Components=Planks=3;Metal=3
|
||||
Exclusive=1
|
||||
Construction=1
|
||||
ContainBlast=1
|
||||
|
|
|
@ -11,7 +11,7 @@ VertexY=-17,-25,-14,25,25,25
|
|||
VertexFriction=50,50,50,100,100,100
|
||||
Value=200
|
||||
Mass=4500
|
||||
Components=Wood=3;Chunk_Rock=1;Metal=1
|
||||
Components=Planks=3;Chunk_Rock=1;Metal=1
|
||||
Exclusive=1
|
||||
Construction=1
|
||||
ContainBlast=1
|
||||
|
|
|
@ -11,7 +11,7 @@ VertexY=-4,-3,14,14
|
|||
VertexFriction=50,50,100,100
|
||||
Value=100
|
||||
Mass=1000
|
||||
Components=Wood=3;Metal=1;Chunk_Rock=1
|
||||
Components=Planks=3;Metal=1;Chunk_Rock=1
|
||||
Exclusive=1
|
||||
Construction=1
|
||||
ContainBlast=1
|
||||
|
|
|
@ -11,7 +11,7 @@ VertexY=-3,15,15
|
|||
VertexFriction=50,100,100
|
||||
Value=40
|
||||
Mass=400
|
||||
Components=Wood=1;Metal=3;
|
||||
Components=Planks=1;Metal=3;
|
||||
Picture=3360,0,112,128,0,0
|
||||
Exclusive=1
|
||||
Construction=1
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
Sawmill
|
||||
Authors: Ringwaul, Clonkonaut
|
||||
|
||||
Cuts trees or other objects into wood. Accepts only objects purely made from wood.
|
||||
Cuts trees or other objects into planks. Accepts only objects purely made from planks.
|
||||
--*/
|
||||
|
||||
#include Library_Structure
|
||||
|
@ -19,31 +19,14 @@ public func Construction(object creator)
|
|||
public func Initialize()
|
||||
{
|
||||
this.SpinAnimation = PlayAnimation("work", 10, Anim_Const(0), Anim_Const(1000));
|
||||
AddTimer("CollectionZone", 1);
|
||||
return _inherited(...);
|
||||
}
|
||||
|
||||
/*-- Interaction --*/
|
||||
|
||||
// Sawmill can't be accessed as a container.
|
||||
public func IsContainer() { return false; }
|
||||
|
||||
// Sawmill can't be interacted with.
|
||||
public func IsInteractable() { return false; }
|
||||
|
||||
// Automatically search for trees in front of sawmill
|
||||
// Temporary solution?
|
||||
protected func FindTrees()
|
||||
{
|
||||
var tree = FindObject(Find_AtPoint(), Find_Func("IsTree"), Find_Not(Find_Func("IsStanding")), Find_Func("GetComponent", Wood));
|
||||
if (!tree) return;
|
||||
|
||||
Saw(tree);
|
||||
}
|
||||
|
||||
private func CheckWoodObject(object target)
|
||||
{
|
||||
if (target->GetComponent(nil, 0) != Wood) return false;
|
||||
if (target->GetComponent(nil, 0) != Planks) return false;
|
||||
if (target->GetComponent(nil, 1)) return false;
|
||||
return true;
|
||||
}
|
||||
|
@ -52,20 +35,11 @@ private func CheckWoodObject(object target)
|
|||
|
||||
private func IgnoreKnowledge() { return true; }
|
||||
|
||||
public func Saw(object target)
|
||||
{
|
||||
target->Enter(this);
|
||||
var output = target->GetComponent(Wood);
|
||||
target->Split2Components();
|
||||
AddToQueue(Wood, output);
|
||||
return true;
|
||||
}
|
||||
|
||||
private func IsProduct(id product_id)
|
||||
{
|
||||
return product_id->~IsSawmillProduct();
|
||||
}
|
||||
private func ProductionTime(id toProduce) { return 100; }
|
||||
private func ProductionTime(id toProduce) { return 400; }
|
||||
private func PowerNeed() { return 50; }
|
||||
|
||||
public func NeedRawMaterial(id rawmat_id)
|
||||
|
@ -108,23 +82,17 @@ public func OnProductionFinish(id product)
|
|||
}
|
||||
}
|
||||
|
||||
// Timer, check for objects to collect in the designated collection zone
|
||||
func CollectionZone()
|
||||
{
|
||||
if (GetCon() < 100) return;
|
||||
|
||||
// Only take one tree at a time
|
||||
if (!(FrameCounter() % 35))
|
||||
if (GetLength(queue) == 0)
|
||||
FindTrees();
|
||||
}
|
||||
|
||||
protected func Collection()
|
||||
func Collection()
|
||||
{
|
||||
Sound("Clonk");
|
||||
return _inherited(...);
|
||||
}
|
||||
|
||||
func Collection2()
|
||||
{
|
||||
if (!GetQueue()[0]) AddToQueue(Planks, 1);
|
||||
}
|
||||
|
||||
public func FxSawingTimer(object target, proplist effect, int time)
|
||||
{
|
||||
var dir = GetCalcDir();
|
||||
|
@ -145,8 +113,8 @@ public func OnProductEjection(object product)
|
|||
|
||||
protected func RejectCollect(id id_def, object collect)
|
||||
{
|
||||
// Don't collect wood
|
||||
if (id_def == Wood)
|
||||
// Don't collect planks
|
||||
if (id_def == Planks)
|
||||
return true;
|
||||
if (collect->~IsSawmillIngredient() || CheckWoodObject(collect))
|
||||
return false;
|
||||
|
|
|
@ -11,7 +11,7 @@ VertexY=53,53,53, 3, 3,-17
|
|||
VertexFriction=100,100,100,50,50,50
|
||||
Value=200
|
||||
Mass=4500
|
||||
Components=Wood=12;Metal=6
|
||||
Components=Planks=12;Metal=6
|
||||
Exclusive=1
|
||||
Construction=1
|
||||
ContainBlast=1
|
||||
|
|
|
@ -11,7 +11,7 @@ VertexY=-10,-20,47,47,-20
|
|||
VertexFriction=50,50,100,100,50
|
||||
Value=150
|
||||
Mass=2500
|
||||
Components=Chunk_Rock=1;Wood=2;
|
||||
Components=Chunk_Rock=1;Planks=2;
|
||||
Exclusive=1
|
||||
Construction=1
|
||||
ContainBlast=1
|
||||
|
|
|
@ -11,7 +11,7 @@ VertexY=-7,-6,19,19,4,19,-4,19
|
|||
VertexFriction=50,50,100,100
|
||||
Value=200
|
||||
Mass=4000
|
||||
Components=Wood=5;Chunk_Rock=1
|
||||
Components=Chunk_Wood=5;Chunk_Rock=1
|
||||
Entrance=-12,0,13,20
|
||||
Exclusive=1
|
||||
Construction=1
|
||||
|
|
|
@ -13,7 +13,7 @@ VertexFriction=50,50,50,15,5,5,15,5,5
|
|||
Value=60
|
||||
Mass=300
|
||||
ColorByOwner=1
|
||||
Components=Metal=6;Wood=4;
|
||||
Components=Metal=6;Planks=4;
|
||||
Rotate=1
|
||||
Entrance=-12,-12,24,24
|
||||
Exclusive=1
|
||||
|
|
|
@ -12,7 +12,7 @@ VertexCNAT=0,4,5,6,1,2,1,2,9,10,8
|
|||
VertexFriction=0,20,20,20,20,20,20,20,80,80,80
|
||||
Value=50
|
||||
Mass=5000
|
||||
Components=Metal=4;Wood=4;Rope=2;
|
||||
Components=Metal=4;Planks=4;Rope=2;
|
||||
Float=-27;
|
||||
SolidMask=0,0,36,4,11,49
|
||||
Picture=128,0,128,128,0,0
|
||||
|
|
|
@ -13,7 +13,7 @@ VertexCNAT=5,6,9,10
|
|||
VertexFriction=80,80,10,10
|
||||
Value=50
|
||||
Mass=125
|
||||
Components=Metal=4;Wood=2;
|
||||
Components=Metal=4;Planks=2;
|
||||
GrabPutGet=C4D_GrabGet|C4D_GrabPut
|
||||
Rotate=30
|
||||
UprightAttach=8
|
||||
|
|
|
@ -13,7 +13,7 @@ VertexCNAT=5,6,9,10
|
|||
VertexFriction=80,80,10,10
|
||||
Value=50
|
||||
Mass=125
|
||||
Components=Metal=1;Wood=6;
|
||||
Components=Metal=1;Chunk_Wood=6;
|
||||
Entrance=-12,-12,24,24
|
||||
RotatedEntrance=1
|
||||
GrabPutGet=C4D_GrabGet|C4D_GrabPut
|
||||
|
|
|
@ -13,7 +13,7 @@ VertexCNAT=5,6,9,10
|
|||
VertexFriction=80,80,10,10
|
||||
Value=20
|
||||
Mass=75
|
||||
Components=Metal=2;Wood=1;
|
||||
Components=Metal=2;Chunk_Wood=1;
|
||||
Collection=-12,-8,24,10
|
||||
GrabPutGet=C4D_GrabGet|C4D_GrabPut
|
||||
Rotate=30
|
||||
|
|
Loading…
Reference in New Issue