forked from Mirrors/openclonk
Loam production: substitute sand for earth (#1148).
parent
808e7fa866
commit
fceda32505
|
@ -4,6 +4,8 @@ Shape=Smooth
|
|||
Density=60
|
||||
Friction=80
|
||||
DigFree=1
|
||||
Dig2Object=Sand
|
||||
Dig2ObjectRatio=140
|
||||
BlastFree=1
|
||||
Blast2PXSRatio=10
|
||||
MaxAirSpeed=100
|
||||
|
|
|
@ -4,6 +4,8 @@ Shape=Smooth
|
|||
Density=50
|
||||
Friction=30
|
||||
DigFree=1
|
||||
Dig2Object=Sand
|
||||
Dig2ObjectRatio=140
|
||||
BlastFree=1
|
||||
Blast2PXSRatio=10
|
||||
Instable=1
|
||||
|
|
|
@ -250,6 +250,11 @@ public func GetInventoryIconOverlay()
|
|||
}
|
||||
|
||||
public func IsFoundryProduct() { return true; }
|
||||
public func GetSubstituteComponent(id component) // Can be made from earth or sand
|
||||
{
|
||||
if (component == Earth)
|
||||
return Sand;
|
||||
}
|
||||
|
||||
local Collectible = 1;
|
||||
local Name = "$Name$";
|
||||
|
|
|
@ -1,2 +1,2 @@
|
|||
Name=Lehm
|
||||
Description=Mit Lehm können kleine Lehmbrücken gebaut werden.|Benötigt ein Fass mit Wasser und einen Eimer Erde zur Produktion. Halte [Benutzen] gedrückt um eine Lehmbrücke in die gezeigte Richtung zu bauen.
|
||||
Description=Mit Lehm können kleine Lehmbrücken gebaut werden. Halte [Benutzen] gedrückt um eine Lehmbrücke in die gezeigte Richtung zu bauen. Kann aus Erde oder Sand hergestellt werden.
|
|
@ -1,2 +1,2 @@
|
|||
Name=Loam
|
||||
Description=With loam one can build small loam bridges.|Needs a barrel of water and a bucket of earth to produce. Hold down the [Use] key to build a bridge, move the mouse to control where it is created.
|
||||
Description=With loam one can build small loam bridges. Hold down the [Use] key to build a bridge, move the mouse to control where it is created. Can be made from earth or sand, collected in a bucket.
|
|
@ -0,0 +1,14 @@
|
|||
[DefCore]
|
||||
id=Sand
|
||||
Version=8,0
|
||||
Category=C4D_Object
|
||||
Width=8
|
||||
Height=8
|
||||
Offset=-4,-4
|
||||
Vertices=3
|
||||
VertexX=0,3,-3
|
||||
VertexY=3,-2,-2
|
||||
VertexFriction=100
|
||||
Mass=12
|
||||
Fragile=1
|
||||
Rotate=1
|
Binary file not shown.
After Width: | Height: | Size: 8.5 KiB |
Binary file not shown.
After Width: | Height: | Size: 3.4 KiB |
|
@ -0,0 +1,44 @@
|
|||
/*--- Sand ---*/
|
||||
|
||||
// The bucket uses stacked earth-objects.
|
||||
#include Library_Stackable
|
||||
|
||||
func Hit()
|
||||
{
|
||||
CastPXS("SandDry", GetMaterialAmount() * GetStackCount(), 18);
|
||||
Sound("Hits::GeneralHit?");
|
||||
RemoveObject();
|
||||
}
|
||||
|
||||
func Entrance(object into)
|
||||
{
|
||||
// The stackable library has cared stacking into existing stacks.
|
||||
// Look for new ones..
|
||||
// If we reach this point, no existing sand-bucket is carried by the Clonk.
|
||||
var empty_bucket = FindObject(Find_Container(into), Find_Func("IsBucket"), Find_Func("IsBucketEmpty"));
|
||||
if (empty_bucket) Enter(empty_bucket);
|
||||
return _inherited(into, ...);
|
||||
}
|
||||
|
||||
func RejectEntrance(object into)
|
||||
{
|
||||
// The stackable library will care about stacking into existing slots.
|
||||
var handled = _inherited(into, ...);
|
||||
if (handled) return true;
|
||||
// Otherwise the container has to care about this.
|
||||
return false;
|
||||
}
|
||||
|
||||
// Only X earth objects fit in one bucket.
|
||||
public func MaxStackCount() { return 5; }
|
||||
public func InitialStackCount() { return 1;}
|
||||
// Can only be collected with a bucket! The Clonk will put this into a bucket or directly remove it when digging.
|
||||
public func IsBucketMaterial() { return true; }
|
||||
// When using the bucket, you will create this material.
|
||||
public func GetMaterialName() { return "Sand"; }
|
||||
public func GetMaterialAmount() { return GetMaterialVal("Dig2ObjectRatio", "Material", Material(GetMaterialName()));}
|
||||
|
||||
local Collectible = 1;
|
||||
local Name = "$Name$";
|
||||
local Description = "$Description$";
|
||||
local Plane = 450;
|
|
@ -0,0 +1,2 @@
|
|||
Name=Sandklumpen
|
||||
Description=Kann nur in einem Eimer transportiert werden.|Kann ausgegraben werden und zerbröckelt bei Aufprall zu Sand.
|
|
@ -0,0 +1,2 @@
|
|||
Name=Chunk of sand
|
||||
Description=Can only be transported with a bucket.|Can be dug out of the ground. Will crumble to powder on impact.
|
Loading…
Reference in New Issue