Various objects: include library flammable

Increased burn time (140 frames) for: axe, bucket, grapple bow, hammer, pickaxe, shovel, sickle. So useful items will burn a little bit longer.
Coal will burn for 245 frames and then just burst into ashes and not change into a Burned Object.
install-platforms
Clonkonaut 2017-11-01 00:54:24 +01:00
parent cc163b21b0
commit 6acea8930b
15 changed files with 92 additions and 12 deletions

View File

@ -1,15 +1,45 @@
/*-- Coal --*/
protected func Construction()
#include Library_Flammable
func Construction()
{
var graphic = Random(5);
if(graphic)
SetGraphics(Format("%d",graphic));
}
protected func Hit(x, y)
func Hit(x, y)
{
StonyObjectHit(x,y);
}
func OnBurnDown()
{
// Burst into ashes
var particles =
{
Prototype = Particles_Dust(),
R = 50, G = 50, B = 50,
Size = PV_KeyFrames(0, 0, 0, 200, PV_Random(2, 10), 1000, 0),
};
var r = GetR();
var size = GetCon() * 110 / 100;
for(var cnt = 0; cnt < 5; ++cnt)
{
var distance = 3;
var x = Sin(r, distance);
var y = -Cos(r, distance);
for(var mirror = -1; mirror <= 1; mirror += 2)
{
CreateParticle("Dust", x * mirror, y * mirror, PV_Random(-3, 3), PV_Random(-3, -3), PV_Random(18, 1 * 36), particles, 2);
CastPXS("Ashes", 1, 30, x * mirror, y * mirror);
}
}
RemoveObject();
return true;
}
@ -26,4 +56,6 @@ local Name = "$Name$";
local Description = "$Description$";
local BlastIncinerate = 5;
local ContactIncinerate = 1;
local Plane = 460;
local Plane = 460;
// Coal burns for about 7 seconds
local BurnDownTime = 245;

View File

@ -6,6 +6,7 @@
*/
#include Library_Seed
#include Library_Flammable
local lib_seed_plant = Cotton;

View File

@ -3,6 +3,8 @@
Authors: Mimmo, Clonkonaut
--*/
#include Library_Flammable
static const MOSS_MAXWETNESS = 30; // Moisture the moss can achieve. Dries out within 36*MOSS_MAXWETNESS frames
static const MOSS_MAXDIST = 50; // Used for various distance checks
local wetness;

View File

@ -1,5 +1,7 @@
/*--- The Log ---*/
#include Library_Flammable
protected func Hit()
{
Sound("Hits::Materials::Wood::WoodHit?");
@ -9,6 +11,7 @@ protected func Hit()
func Incineration()
{
SetClrModulation(RGB(48, 32, 32));
_inherited(...);
}
public func IsFuel() { return true; }

View File

@ -8,6 +8,8 @@
#include Library_MeleeWeapon
#include Library_Flammable
local swing_anim;
local using;
local carry_bone;
@ -423,6 +425,9 @@ local Collectible = true;
local Name = "$Name$";
local Description = "$Description$";
local Components = {Wood = 1, Metal = 1};
local BlastIncinerate = 30;
local MaterialIncinerate = true;
local BurnDownTime = 140;
// Damage dealt to trees when chopping.
local ChopStrength = 10;
// Damage dealt to living beings when hit with an axe.

View File

@ -8,6 +8,7 @@
#include Library_CarryHeavy
#include Library_LiquidContainer
#include Library_HasExtraSlot
#include Library_Flammable
/*-- Engine Callbacks --*/

View File

@ -9,6 +9,8 @@
// Uses an extra-slot to store and display material.
#include Library_HasExtraSlot
#include Library_Flammable
/*-- Engine Callbacks --*/
protected func Hit()
@ -170,3 +172,6 @@ local Collectible = true;
local ForceFreeHands = true;
local Components = {Wood = 1, Metal = 1};
local ExtraSlotFilter = "IsBucketMaterial";
local BlastIncinerate = 30;
local MaterialIncinerate = true;
local BurnDownTime = 140;

View File

@ -10,6 +10,8 @@
// Do mind that IsContainer is set to false, so the hook can't be taken out via the interaction menu (very important)
// See below in Callbacks for IsContainer
#include Library_Flammable
local is_aiming;
local animation_set;
local hook;
@ -281,6 +283,7 @@ func Definition(proplist def)
local Name = "$Name$";
local Description = "$Description$";
local Collectible = 1;
local Components = {Wood = 2, Metal = 1/*, Rope = 1*/};
local BlastIncinerate = 30;
local ContactIncinerate = 0;
local Components = {Wood = 2, Metal = 1/*, Rope = 1*/};
local MaterialIncinerate = true;
local BurnDownTime = 140;

View File

@ -6,6 +6,8 @@
// Usage is handled by this library
#include Library_Constructor
#include Library_Flammable
/*-- Engine Callbacks --*/
func Hit(int x, int y)
@ -54,4 +56,7 @@ func Definition(def)
local Collectible = true;
local Name = "$Name$";
local Description = "$Description$";
local Components = {Wood = 1, Rock = 1};
local Components = {Wood = 1, Rock = 1};
local BlastIncinerate = 30;
local MaterialIncinerate = true;
local BurnDownTime = 140;

View File

@ -5,6 +5,8 @@
@author: Randrian/Ringwaul
*/
#include Library_Flammable
local swingtime = 0;
local using;
@ -235,4 +237,7 @@ local Collectible = true;
local MaxReach = 12;
local MaxPickDensity = 70; // can't pick granite
local ForceFreeHands = true;
local Components = {Wood = 1, Metal = 1};
local Components = {Wood = 1, Metal = 1};
local BlastIncinerate = 30;
local MaterialIncinerate = true;
local BurnDownTime = 140;

View File

@ -5,6 +5,8 @@
@author: Newton, Sven2, Zapper, Maikel
*/
#include Library_Flammable
local is_digging;
/*-- Engine Callbacks --*/
@ -246,4 +248,7 @@ func Definition(proplist def)
local Collectible = true;
local Name = "$Name$";
local Description = "$Description$";
local Components = {Wood = 1, Metal = 1};
local Components = {Wood = 1, Metal = 1};
local BlastIncinerate = 30;
local MaterialIncinerate = true;
local BurnDownTime = 140;

View File

@ -5,6 +5,8 @@
@author: Clonkonaut
*/
#include Library_Flammable
/*-- Engine Callbacks --*/
private func Hit()
@ -84,4 +86,7 @@ func Definition(def)
local Name = "$Name$";
local Description = "$Description$";
local Collectible = true;
local Components = {Wood = 1, Metal = 1};
local Components = {Wood = 1, Metal = 1};
local BlastIncinerate = 30;
local MaterialIncinerate = true;
local BurnDownTime = 140;

View File

@ -7,6 +7,7 @@
#include Library_HasExtraSlot
#include Library_RangedWeapon
#include Library_Flammable
local fAiming;
local iArrowMesh;
@ -249,10 +250,10 @@ func Definition(def)
local Name = "$Name$";
local Description = "$Description$";
local Collectible = true;
local BlastIncinerate = 30;
local ContactIncinerate = 5;
local ForceFreeHands = true;
local Components = {Wood = 3};
local BlastIncinerate = 30;
local MaterialIncinerate = true;
// Initial velocity of the arrow
local shooting_strength = 100;

View File

@ -5,6 +5,8 @@
#include Library_MeleeWeapon
#include Library_Flammable
local animation_set;
local fAiming;
@ -283,4 +285,6 @@ local Name = "$Name$";
local Description = "$Description$";
local Collectible = true;
local ForceFreeHands = true;
local Components = {Wood = 1, Metal = 1};
local Components = {Wood = 1, Metal = 1};
local BlastIncinerate = 30;
local MaterialIncinerate = true;

View File

@ -7,6 +7,7 @@
#include Library_Stackable
#include Library_RangedWeapon
#include Library_Flammable
// Default timing values for animation set
// (Adjusted for speeed multiplier and stored in animation set by Library_RangedWeapon)
@ -278,5 +279,7 @@ local Description = "$Description$";
local Collectible = true;
local ForceFreeHands = true;
local Components = {Wood = 2, Metal = 1};
local BlastIncinerate = 30;
local MaterialIncinerate = true;
// Multiplication factor to clonk.ThrowSpeed
local shooting_strength = 21;