forked from Mirrors/openclonk
Materials: Fix misspelling of "Incendiary" (#1680)
The wrong spelling will still be accepted as a material value, as long as no value with the correct spelling exists.liquid_container
parent
6f669e7b49
commit
5f895c14fc
|
@ -106,9 +106,12 @@
|
||||||
<col>Inflammability.</col>
|
<col>Inflammability.</col>
|
||||||
</row>
|
</row>
|
||||||
<row>
|
<row>
|
||||||
<col>Incindiary</col>
|
<col>Incendiary</col>
|
||||||
<col>Integer</col>
|
<col>Integer</col>
|
||||||
<col>This material incinerates objects.</col>
|
<col>
|
||||||
|
This material incinerates objects.
|
||||||
|
<em>Note: For compatibility reasons, the misspelling "Incindiary" is also accepted if (and only if) no value with the correct spelling is set.</em>
|
||||||
|
</col>
|
||||||
</row>
|
</row>
|
||||||
<row>
|
<row>
|
||||||
<col>Corrode</col>
|
<col>Corrode</col>
|
||||||
|
@ -372,8 +375,11 @@
|
||||||
<col>The background material.</col>
|
<col>The background material.</col>
|
||||||
</row>
|
</row>
|
||||||
<row>
|
<row>
|
||||||
<col>Incindiary</col>
|
<col>Incendiary</col>
|
||||||
<col>All materials to be incinerated.</col>
|
<col>
|
||||||
|
All materials that can incinerate objects.
|
||||||
|
<em>Note: For compatibility reasons, the misspelling "Incindiary" is also accepted.</em>
|
||||||
|
</col>
|
||||||
</row>
|
</row>
|
||||||
<row>
|
<row>
|
||||||
<col>Extinguisher</col>
|
<col>Extinguisher</col>
|
||||||
|
|
|
@ -25,5 +25,5 @@ InMatConvertDepth=1
|
||||||
|
|
||||||
[Reaction]
|
[Reaction]
|
||||||
Type=Convert
|
Type=Convert
|
||||||
TargetSpec=Incindiary
|
TargetSpec=Incendiary
|
||||||
ConvertMat=Water
|
ConvertMat=Water
|
||||||
|
|
|
@ -5,7 +5,7 @@ Instable=1
|
||||||
MaxAirSpeed=50
|
MaxAirSpeed=50
|
||||||
MaxSlide=10000
|
MaxSlide=10000
|
||||||
WindDrift=40
|
WindDrift=40
|
||||||
Incindiary=1
|
Incendiary=1
|
||||||
Placement=10
|
Placement=10
|
||||||
Light=1
|
Light=1
|
||||||
TextureOverlay=lava_red
|
TextureOverlay=lava_red
|
||||||
|
|
|
@ -5,7 +5,7 @@ Instable=1
|
||||||
MaxAirSpeed=50
|
MaxAirSpeed=50
|
||||||
MaxSlide=10000
|
MaxSlide=10000
|
||||||
WindDrift=40
|
WindDrift=40
|
||||||
Incindiary=1
|
Incendiary=1
|
||||||
TempConvStrength=12
|
TempConvStrength=12
|
||||||
BelowTempConvert=100
|
BelowTempConvert=100
|
||||||
BelowTempConvertTo=Rock
|
BelowTempConvertTo=Rock
|
||||||
|
|
|
@ -27,5 +27,5 @@ Dig2ObjectRatio=400
|
||||||
|
|
||||||
[Reaction]
|
[Reaction]
|
||||||
Type=Poof
|
Type=Poof
|
||||||
TargetSpec=Incindiary
|
TargetSpec=Incendiary
|
||||||
|
|
||||||
|
|
|
@ -5,7 +5,7 @@ Instable=0
|
||||||
MaxAirSpeed=50
|
MaxAirSpeed=50
|
||||||
MaxSlide=10000
|
MaxSlide=10000
|
||||||
WindDrift=40
|
WindDrift=40
|
||||||
Incindiary=1
|
Incendiary=1
|
||||||
Placement=10
|
Placement=10
|
||||||
TextureOverlay=lava_red
|
TextureOverlay=lava_red
|
||||||
PXSGfxSize=6
|
PXSGfxSize=6
|
||||||
|
|
|
@ -123,7 +123,7 @@ void C4MaterialCore::Clear()
|
||||||
MaxSlide = 0;
|
MaxSlide = 0;
|
||||||
WindDrift = 0;
|
WindDrift = 0;
|
||||||
Inflammable = 0;
|
Inflammable = 0;
|
||||||
Incindiary = 0;
|
Incendiary = 0;
|
||||||
Extinguisher = 0;
|
Extinguisher = 0;
|
||||||
Corrosive = 0;
|
Corrosive = 0;
|
||||||
Corrode = 0;
|
Corrode = 0;
|
||||||
|
@ -183,6 +183,7 @@ bool C4MaterialCore::Load(C4Group &hGroup,
|
||||||
|
|
||||||
void C4MaterialCore::CompileFunc(StdCompiler *pComp)
|
void C4MaterialCore::CompileFunc(StdCompiler *pComp)
|
||||||
{
|
{
|
||||||
|
assert(pComp->hasNaming());
|
||||||
if (pComp->isCompiler()) Clear();
|
if (pComp->isCompiler()) Clear();
|
||||||
pComp->Name("Material");
|
pComp->Name("Material");
|
||||||
pComp->Value(mkNamingAdapt(toC4CStr(Name), "Name", ""));
|
pComp->Value(mkNamingAdapt(toC4CStr(Name), "Name", ""));
|
||||||
|
@ -214,7 +215,27 @@ void C4MaterialCore::CompileFunc(StdCompiler *pComp)
|
||||||
pComp->Value(mkNamingAdapt(MaxSlide, "MaxSlide", 0));
|
pComp->Value(mkNamingAdapt(MaxSlide, "MaxSlide", 0));
|
||||||
pComp->Value(mkNamingAdapt(WindDrift, "WindDrift", 0));
|
pComp->Value(mkNamingAdapt(WindDrift, "WindDrift", 0));
|
||||||
pComp->Value(mkNamingAdapt(Inflammable, "Inflammable", 0));
|
pComp->Value(mkNamingAdapt(Inflammable, "Inflammable", 0));
|
||||||
pComp->Value(mkNamingAdapt(Incindiary, "Incindiary", 0));
|
if (pComp->isCompiler())
|
||||||
|
{
|
||||||
|
// The value used to have a wrong spelling ("Incindiary"). If there's
|
||||||
|
// no "Incendiary" value, use the wrong spelling instead
|
||||||
|
try
|
||||||
|
{
|
||||||
|
pComp->Value(mkNamingAdapt(Incendiary, "Incendiary"));
|
||||||
|
}
|
||||||
|
catch (StdCompiler::NotFoundException *ex)
|
||||||
|
{
|
||||||
|
delete ex;
|
||||||
|
pComp->Value(mkNamingAdapt(Incendiary, "Incindiary", 0));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
// When serializing, write both spellings because some script might be
|
||||||
|
// calling GetMaterialVal with the wrong one
|
||||||
|
pComp->Value(mkNamingAdapt(Incendiary, "Incendiary"));
|
||||||
|
pComp->Value(mkNamingAdapt(Incendiary, "Incindiary"));
|
||||||
|
}
|
||||||
pComp->Value(mkNamingAdapt(Corrode, "Corrode", 0));
|
pComp->Value(mkNamingAdapt(Corrode, "Corrode", 0));
|
||||||
pComp->Value(mkNamingAdapt(Corrosive, "Corrosive", 0));
|
pComp->Value(mkNamingAdapt(Corrosive, "Corrosive", 0));
|
||||||
pComp->Value(mkNamingAdapt(Extinguisher, "Extinguisher", 0));
|
pComp->Value(mkNamingAdapt(Extinguisher, "Extinguisher", 0));
|
||||||
|
@ -371,10 +392,10 @@ bool C4MaterialMap::CrossMapMaterials(const char* szEarthMaterial) // Called aft
|
||||||
else if (pMatPXS && pMatLS)
|
else if (pMatPXS && pMatLS)
|
||||||
{
|
{
|
||||||
// incindiary vs extinguisher
|
// incindiary vs extinguisher
|
||||||
if ((pMatPXS->Incindiary && pMatLS->Extinguisher) || (pMatPXS->Extinguisher && pMatLS->Incindiary))
|
if ((pMatPXS->Incendiary && pMatLS->Extinguisher) || (pMatPXS->Extinguisher && pMatLS->Incendiary))
|
||||||
pReaction = &DefReactPoof;
|
pReaction = &DefReactPoof;
|
||||||
// incindiary vs inflammable
|
// incindiary vs inflammable
|
||||||
else if ((pMatPXS->Incindiary && pMatLS->Inflammable) || (pMatPXS->Inflammable && pMatLS->Incindiary))
|
else if ((pMatPXS->Incendiary && pMatLS->Inflammable) || (pMatPXS->Inflammable && pMatLS->Incendiary))
|
||||||
pReaction = &DefReactIncinerate;
|
pReaction = &DefReactIncinerate;
|
||||||
// corrosive vs corrode
|
// corrosive vs corrode
|
||||||
else if (pMatPXS->Corrosive && pMatLS->Corrode)
|
else if (pMatPXS->Corrosive && pMatLS->Corrode)
|
||||||
|
@ -476,11 +497,11 @@ bool C4MaterialMap::CrossMapMaterials(const char* szEarthMaterial) // Called aft
|
||||||
else
|
else
|
||||||
for (int32_t cnt2=0; cnt2<Num; cnt2++) SetMatReaction(cnt, cnt2, pReact);
|
for (int32_t cnt2=0; cnt2<Num; cnt2++) SetMatReaction(cnt, cnt2, pReact);
|
||||||
}
|
}
|
||||||
else if (SEqualNoCase(pReact->TargetSpec.getData(), "Incindiary"))
|
else if (SEqualNoCase(pReact->TargetSpec.getData(), "Incendiary") || SEqualNoCase(pReact->TargetSpec.getData(), "Incindiary"))
|
||||||
{
|
{
|
||||||
// add to all incendiary materials
|
// add to all incendiary materials
|
||||||
if (pReact->fInverseSpec) SetMatReaction(cnt, -1, pReact);
|
if (pReact->fInverseSpec) SetMatReaction(cnt, -1, pReact);
|
||||||
for (int32_t cnt2=0; cnt2<Num; cnt2++) if (!Map[cnt2].Incindiary == pReact->fInverseSpec) SetMatReaction(cnt, cnt2, pReact);
|
for (int32_t cnt2=0; cnt2<Num; cnt2++) if (!Map[cnt2].Incendiary == pReact->fInverseSpec) SetMatReaction(cnt, cnt2, pReact);
|
||||||
}
|
}
|
||||||
else if (SEqualNoCase(pReact->TargetSpec.getData(), "Extinguisher"))
|
else if (SEqualNoCase(pReact->TargetSpec.getData(), "Extinguisher"))
|
||||||
{
|
{
|
||||||
|
@ -667,8 +688,8 @@ bool mrfInsertCheck(int32_t &iX, int32_t &iY, C4Real &fXDir, C4Real &fYDir, int3
|
||||||
// Contact: Stop
|
// Contact: Stop
|
||||||
fYDir = -GravAccel;
|
fYDir = -GravAccel;
|
||||||
|
|
||||||
// Incindiary mats smoke on contact even before doing their slide
|
// Incendiary mats smoke on contact even before doing their slide
|
||||||
if (::MaterialMap.Map[iPxsMat].Incindiary)
|
if (::MaterialMap.Map[iPxsMat].Incendiary)
|
||||||
if (!Random(25))
|
if (!Random(25))
|
||||||
{
|
{
|
||||||
Smoke(iX, iY, 4 + Random(3));
|
Smoke(iX, iY, 4 + Random(3));
|
||||||
|
|
|
@ -106,7 +106,7 @@ public:
|
||||||
int32_t MaxSlide;
|
int32_t MaxSlide;
|
||||||
int32_t WindDrift;
|
int32_t WindDrift;
|
||||||
int32_t Inflammable;
|
int32_t Inflammable;
|
||||||
int32_t Incindiary;
|
int32_t Incendiary;
|
||||||
int32_t Extinguisher;
|
int32_t Extinguisher;
|
||||||
int32_t Corrosive;
|
int32_t Corrosive;
|
||||||
int32_t Corrode;
|
int32_t Corrode;
|
||||||
|
|
|
@ -995,7 +995,7 @@ bool C4Object::ExecLife()
|
||||||
// InMat incineration
|
// InMat incineration
|
||||||
if (!::Game.iTick10)
|
if (!::Game.iTick10)
|
||||||
if (InMat!=MNone)
|
if (InMat!=MNone)
|
||||||
if (::MaterialMap.Map[InMat].Incindiary)
|
if (::MaterialMap.Map[InMat].Incendiary)
|
||||||
if (GetPropertyInt(P_ContactIncinerate) > 0)
|
if (GetPropertyInt(P_ContactIncinerate) > 0)
|
||||||
{
|
{
|
||||||
Call(PSF_OnInIncendiaryMaterial, &C4AulParSet());
|
Call(PSF_OnInIncendiaryMaterial, &C4AulParSet());
|
||||||
|
|
Loading…
Reference in New Issue