forked from Mirrors/openclonk
make ContainBlast a property instead of DefCore entry
parent
aa6b1384a7
commit
4ea0cb0ca6
|
@ -165,11 +165,6 @@
|
|||
<col>Integer</col>
|
||||
<col>Floatation in liquids: 0 no floatation, otherwise floatation height above the object center.</col>
|
||||
</row>
|
||||
<row>
|
||||
<literal_col>ContainBlast</literal_col>
|
||||
<col>Integer</col>
|
||||
<col>0 or 1. Determines whether explosions in the object's contents affect other objects outside.</col>
|
||||
</row>
|
||||
<row>
|
||||
<literal_col>ColorByOwner</literal_col>
|
||||
<col>Integer</col>
|
||||
|
|
|
@ -144,6 +144,11 @@ Stand = {
|
|||
<literal_col>Placement</literal_col>
|
||||
<col>Integer</col>
|
||||
<col>Placement: 0 land surface, 1 in liquid, 2 in mid-air, 3 underground, 4 land surface and underground.</col>
|
||||
</row>
|
||||
<row>
|
||||
<literal_col>ContainBlast</literal_col>
|
||||
<col>bool</col>
|
||||
<col>True or false. Determines whether explosions in the object's contents affect other objects outside.</col>
|
||||
</row>
|
||||
<row>
|
||||
<literal_col>BlastIncinerate</literal_col>
|
||||
|
|
|
@ -32,7 +32,7 @@ global func DoBlueExplosion(int x, int y, int level, object inobj, int cause_plr
|
|||
var container = inobj;
|
||||
while (container)
|
||||
{
|
||||
if (container->GetID()->GetDefContainBlast())
|
||||
if (container.ContainBlast)
|
||||
break;
|
||||
else
|
||||
container = container->Contained();
|
||||
|
@ -54,7 +54,7 @@ global func DoBlueExplosion(int x, int y, int level, object inobj, int cause_plr
|
|||
if (inobj != container)
|
||||
BlastObjectsBlue(x + GetX(), y + GetY(), level, container, cause_plr, layer);
|
||||
|
||||
// Landschaft zerstören. Nach BlastObjects, damit neu freigesprengte Materialien nicht betroffen sind
|
||||
// Landschaft zerst<EFBFBD>ren. Nach BlastObjects, damit neu freigesprengte Materialien nicht betroffen sind
|
||||
if (!container)
|
||||
BlastFree(x, y, level, cause_plr);
|
||||
|
||||
|
|
|
@ -12,5 +12,4 @@ VertexFriction=50,50,100,100
|
|||
Mass=4500
|
||||
Components=Metal=2;Wood=4;
|
||||
Exclusive=1
|
||||
Construction=1
|
||||
ContainBlast=1
|
||||
Construction=1
|
|
@ -167,4 +167,5 @@ func Definition(def) {
|
|||
local Name = "$Name$";
|
||||
local Description = "$Description$";
|
||||
local Touchable = 2;
|
||||
local ContainBlast = true;
|
||||
local BlastIncinerate = 100;
|
||||
|
|
|
@ -13,5 +13,4 @@ Mass=1000
|
|||
Components=Wood=1
|
||||
Exclusive=1
|
||||
Construction=1
|
||||
ContainBlast=1
|
||||
IncompleteActivity=1
|
|
@ -111,6 +111,7 @@ func Definition(def) {
|
|||
|
||||
local Name = "$Name$";
|
||||
local Description = "$Description$";
|
||||
local ContainBlast = true;
|
||||
local BlastIncinerate = 100;
|
||||
local HitPoints = 30;
|
||||
local Plane = 120;
|
||||
|
|
|
@ -15,4 +15,3 @@ Construction=1
|
|||
Value=6
|
||||
Mass=12
|
||||
Float=1
|
||||
ContainBlast=1
|
||||
|
|
|
@ -72,4 +72,5 @@ func Hit()
|
|||
|
||||
local Name = "$Name$";
|
||||
local Collectible = false;
|
||||
local ContainBlast = true;
|
||||
local Touchable = 2;
|
|
@ -13,5 +13,4 @@ Mass=4500
|
|||
Components=Wood=3;Metal=2;Loam=2
|
||||
Exclusive=1
|
||||
Construction=1
|
||||
ContainBlast=1
|
||||
IncompleteActivity=1
|
||||
|
|
|
@ -76,5 +76,6 @@ local ActMap = {
|
|||
|
||||
local Name = "$Name$";
|
||||
local Description ="$Description$";
|
||||
local ContainBlast = true;
|
||||
local BlastIncinerate = 100;
|
||||
local HitPoints = 70;
|
||||
|
|
|
@ -13,5 +13,4 @@ Mass=4500
|
|||
Components=Wood=3;Metal=2
|
||||
Exclusive=1
|
||||
Construction=1
|
||||
ContainBlast=1
|
||||
IncompleteActivity=1
|
|
@ -80,5 +80,6 @@ local ActMap = {
|
|||
|
||||
local Name = "$Name$";
|
||||
local Description ="$Description$";
|
||||
local ContainBlast = true;
|
||||
local BlastIncinerate = 100;
|
||||
local HitPoints = 70;
|
||||
|
|
|
@ -13,4 +13,3 @@ VertexFriction=50,50,100,100
|
|||
Components=Wood=2;
|
||||
Construction=1
|
||||
Mass=10
|
||||
ContainBlast=1
|
||||
|
|
|
@ -80,4 +80,5 @@ protected func Definition(def)
|
|||
}
|
||||
|
||||
local Name = "$Name$";
|
||||
local ContainBlast = true;
|
||||
local HitPoints = 50;
|
||||
|
|
|
@ -13,5 +13,4 @@ Mass=1500
|
|||
Components=Wood=3;Metal=1
|
||||
Exclusive=1
|
||||
Construction=1
|
||||
ContainBlast=1
|
||||
IncompleteActivity=1
|
|
@ -13,5 +13,4 @@ Mass=4500
|
|||
Components=Rock=4;Wood=2;
|
||||
Exclusive=1
|
||||
Construction=1
|
||||
ContainBlast=1
|
||||
IncompleteActivity=1
|
|
@ -136,5 +136,6 @@ func Definition(def) {
|
|||
}
|
||||
local Name = "$Name$";
|
||||
local Description = "$Description$";
|
||||
local ContainBlast = true;
|
||||
local BlastIncinerate = 100;
|
||||
local HitPoints = 100;
|
||||
|
|
|
@ -13,5 +13,4 @@ Mass=4500
|
|||
Components=Wood=4;Metal=3
|
||||
Exclusive=1
|
||||
Construction=1
|
||||
ContainBlast=1
|
||||
IncompleteActivity=1
|
|
@ -71,5 +71,6 @@ local ActMap = {
|
|||
|
||||
local Name = "$Name$";
|
||||
local Description ="$Description$";
|
||||
local ContainBlast = true;
|
||||
local BlastIncinerate = 100;
|
||||
local HitPoints = 70;
|
|
@ -13,5 +13,4 @@ Mass=4500
|
|||
Components=Wood=3;Rock=2;Metal=1
|
||||
Exclusive=1
|
||||
Construction=1
|
||||
ContainBlast=1
|
||||
IncompleteActivity=1
|
|
@ -81,5 +81,6 @@ local ActMap = {
|
|||
|
||||
local Name = "$Name$";
|
||||
local Description ="$Description$";
|
||||
local ContainBlast = true;
|
||||
local BlastIncinerate = 100;
|
||||
local HitPoints = 70;
|
|
@ -13,5 +13,4 @@ Mass=1000
|
|||
Components=Wood=3;Metal=1;Rock=1
|
||||
Exclusive=1
|
||||
Construction=1
|
||||
ContainBlast=1
|
||||
IncompleteActivity=1
|
||||
|
|
|
@ -99,5 +99,6 @@ local ActMap = {
|
|||
|
||||
local Name = "$Name$";
|
||||
local Description ="$Description$";
|
||||
local ContainBlast = true;
|
||||
local BlastIncinerate = 100;
|
||||
local HitPoints = 70;
|
|
@ -13,5 +13,4 @@ Mass=1500
|
|||
Components=Rock=4;Wood=1;
|
||||
Exclusive=1
|
||||
Construction=1
|
||||
ContainBlast=1
|
||||
IncompleteActivity=1
|
|
@ -208,5 +208,6 @@ func Definition(def) {
|
|||
local Name = "$Name$";
|
||||
local Description = "$Description$";
|
||||
local SpinStep = 30;
|
||||
local ContainBlast = true;
|
||||
local BlastIncinerate = 100;
|
||||
local HitPoints = 70;
|
||||
|
|
|
@ -13,5 +13,4 @@ Mass=4500
|
|||
Components=Wood=4;Metal=3
|
||||
Exclusive=1
|
||||
Construction=1
|
||||
ContainBlast=1
|
||||
IncompleteActivity=1
|
|
@ -101,5 +101,6 @@ local ActMap = {
|
|||
|
||||
local Name = "$Name$";
|
||||
local Description ="$Description$";
|
||||
local ContainBlast = true;
|
||||
local BlastIncinerate = 100;
|
||||
local HitPoints = 70;
|
||||
|
|
|
@ -14,5 +14,4 @@ Components=Rock=6;Metal=3
|
|||
Collection=-33,7,12,12
|
||||
Exclusive=1
|
||||
Construction=1
|
||||
ContainBlast=1
|
||||
IncompleteActivity=1
|
|
@ -156,6 +156,7 @@ local ActMap = {
|
|||
func Definition(def) {
|
||||
SetProperty("MeshTransformation", Trans_Mul(Trans_Rotate(25,0,1,0), Trans_Scale(625)), def);
|
||||
}
|
||||
local ContainBlast = true;
|
||||
local BlastIncinerate = 130;
|
||||
local HitPoints = 100;
|
||||
local Name = "$Name$";
|
||||
|
|
|
@ -13,5 +13,4 @@ Mass=4500
|
|||
Components=Wood=3;Metal=2
|
||||
Exclusive=1
|
||||
Construction=1
|
||||
ContainBlast=1
|
||||
IncompleteActivity=1
|
|
@ -101,5 +101,6 @@ func Definition(def) {
|
|||
}
|
||||
local Name = "$Name$";
|
||||
local Description ="$Description$";
|
||||
local ContainBlast = true;
|
||||
local BlastIncinerate = 100;
|
||||
local HitPoints = 70;
|
||||
|
|
|
@ -13,5 +13,4 @@ Mass=2500
|
|||
Components=Rock=6;Wood=2;
|
||||
Exclusive=1
|
||||
Construction=1
|
||||
ContainBlast=1
|
||||
IncompleteActivity=1
|
|
@ -160,6 +160,7 @@ local ActMap = {
|
|||
func Definition(def) {
|
||||
SetProperty("PictureTransformation", Trans_Mul(Trans_Translate(2000,0,7000),Trans_Rotate(-20,1,0,0),Trans_Rotate(30,0,1,0)), def);
|
||||
}
|
||||
local ContainBlast = true;
|
||||
local BlastIncinerate = 100;
|
||||
local HitPoints = 70;
|
||||
local Name = "$Name$";
|
||||
|
|
|
@ -15,5 +15,4 @@ Entrance=-12,0,13,20
|
|||
Exclusive=1
|
||||
Construction=1
|
||||
Rotate=1
|
||||
ContainBlast=1
|
||||
RotatedEntrance=1
|
||||
|
|
|
@ -67,6 +67,7 @@ func Definition(def) {
|
|||
SetProperty("PictureTransformation", Trans_Mul(Trans_Translate(2000,0,7000),Trans_Rotate(-20,1,0,0),Trans_Rotate(30,0,1,0)), def);
|
||||
SetProperty("MeshTransformation", Trans_Rotate(-8,0,1,0));
|
||||
}
|
||||
local ContainBlast = true;
|
||||
local BlastIncinerate = 100;
|
||||
local HitPoints = 70;
|
||||
local Name = "$Name$";
|
||||
|
|
|
@ -153,7 +153,7 @@ global func DoExplosion(int x, int y, int level, object inobj, int cause_plr, ob
|
|||
var container = inobj;
|
||||
while (container)
|
||||
{
|
||||
if (container->GetID()->GetDefContainBlast())
|
||||
if (container.ContainBlast)
|
||||
break;
|
||||
else
|
||||
container = container->Contained();
|
||||
|
|
|
@ -36,7 +36,6 @@ global func GetDefGrab() { return GetDefCoreVal("Grab", "DefCore"); }
|
|||
global func GetDefGrabPutGet() { return GetDefCoreVal("GrabPutGet", "DefCore"); }
|
||||
global func GetDefRotate() { return GetDefCoreVal("Rotate", "DefCore"); }
|
||||
global func GetDefFloat() { return GetDefCoreVal("Float", "DefCore"); }
|
||||
global func GetDefContainBlast(){ return GetDefCoreVal("ContainBlast", "DefCore"); }
|
||||
global func GetDefHorizontalFix() { return GetDefCoreVal("HorizontalFix", "DefCore"); }
|
||||
global func GetDefBorderBound() { return GetDefCoreVal("BorderBound", "DefCore"); }
|
||||
global func GetDefLiftTop() { return GetDefCoreVal("LiftTop", "DefCore"); }
|
||||
|
|
|
@ -116,7 +116,6 @@ void C4Def::DefaultDefCore()
|
|||
BorderBound=0;
|
||||
LiftTop=0;
|
||||
GrabPutGet=0;
|
||||
ContainBlast=0;
|
||||
UprightAttach=0;
|
||||
ContactFunctionCalls=0;
|
||||
Line=0;
|
||||
|
@ -254,7 +253,6 @@ void C4Def::CompileFunc(StdCompiler *pComp)
|
|||
pComp->Value(mkNamingAdapt(Rotateable, "Rotate", 0 ));
|
||||
pComp->Value(mkNamingAdapt(RotatedEntrance, "RotatedEntrance", 0 ));
|
||||
pComp->Value(mkNamingAdapt(Float, "Float", 0 ));
|
||||
pComp->Value(mkNamingAdapt(ContainBlast, "ContainBlast", 0 ));
|
||||
pComp->Value(mkNamingAdapt(ColorByOwner, "ColorByOwner", 0 ));
|
||||
pComp->Value(mkNamingAdapt(NoHorizontalMove, "HorizontalFix", 0 ));
|
||||
pComp->Value(mkNamingAdapt(BorderBound, "BorderBound", 0 ));
|
||||
|
|
|
@ -127,7 +127,6 @@ public:
|
|||
int32_t BorderBound;
|
||||
int32_t LiftTop;
|
||||
int32_t GrabPutGet;
|
||||
int32_t ContainBlast;
|
||||
int32_t UprightAttach;
|
||||
int32_t ContactFunctionCalls;
|
||||
int32_t Line;
|
||||
|
|
|
@ -145,6 +145,7 @@ C4StringTable::C4StringTable()
|
|||
P[P_SolidMaskPlane] = "SolidMaskPlane";
|
||||
P[P_Tooltip] = "Tooltip";
|
||||
P[P_Placement] = "Placement";
|
||||
P[P_ContainBlast] = "ContainBlast";
|
||||
P[P_BlastIncinerate] = "BlastIncinerate";
|
||||
P[P_ContactIncinerate] = "ContactIncinerate";
|
||||
P[P_Global] = "Global";
|
||||
|
|
|
@ -351,6 +351,7 @@ enum C4PropertyName
|
|||
P_SolidMaskPlane,
|
||||
P_Tooltip,
|
||||
P_Placement,
|
||||
P_ContainBlast,
|
||||
P_BlastIncinerate,
|
||||
P_ContactIncinerate,
|
||||
P_Global,
|
||||
|
|
Loading…
Reference in New Issue