forked from Mirrors/openclonk
rename NoComponentMass to NoMassFromContents
This had nothing to with components, and risk of backwards compatibility is minor.qteditor
parent
00d5a06ec0
commit
accd897b91
|
@ -211,7 +211,7 @@
|
|||
<col>1 - 10. Determines search depth of the pathfinder algorithm (default 1). Warning: higher values may slow down the game. By setting this value you can also enable non-CrewMember objects to use pathfinding when executing commands.</col>
|
||||
</row>
|
||||
<row>
|
||||
<literal_col>NoComponentMass</literal_col>
|
||||
<literal_col>NoMassFromContents</literal_col>
|
||||
<col>Integer</col>
|
||||
<col>0 or 1. If 1, the object's contents is not added to the object's total mass. This can be used to prevent small container objects from turning into killer throwing items.</col>
|
||||
</row>
|
||||
|
|
|
@ -12,5 +12,5 @@ VertexFriction=60,60,60,60,60,60
|
|||
Value=20
|
||||
Mass=20
|
||||
Components=Barrel=1;Coal=1;
|
||||
NoComponentMass=1
|
||||
NoMassFromContents=1
|
||||
Rotate=1
|
||||
|
|
|
@ -46,7 +46,7 @@ global func GetDefFragile() { return GetDefCoreVal("Fragile", "DefCore"); }
|
|||
global func GetDefProjectile() { return GetDefCoreVal("Projectile", "DefCore"); }
|
||||
global func GetDefNoPushEnter() { return GetDefCoreVal("NoPushEnter", "DefCore"); }
|
||||
global func GetDefVehicleControl() { return GetDefCoreVal("VehicleControl", "DefCore"); }
|
||||
global func GetDefNoComponentMass() { return GetDefCoreVal("NoComponentMass", "DefCore"); }
|
||||
global func GetDefNoMassFromContents() { return GetDefCoreVal("NoMassFromContents", "DefCore"); }
|
||||
global func GetDefClosedContainer() { return GetDefCoreVal("ClosedContainer", "DefCore"); }
|
||||
global func GetDefSilentCommands() { return GetDefCoreVal("SilentCommands", "DefCore"); }
|
||||
global func GetDefTemporaryCrew() { return GetDefCoreVal("TemporaryCrew", "DefCore"); }
|
||||
|
|
|
@ -122,7 +122,7 @@ void C4Def::DefaultDefCore()
|
|||
Projectile=0;
|
||||
VehicleControl=0;
|
||||
Pathfinder=0;
|
||||
NoComponentMass=0;
|
||||
NoMassFromContents=0;
|
||||
MoveToRange=0;
|
||||
NoStabilize=0;
|
||||
ClosedContainer=0;
|
||||
|
@ -258,7 +258,7 @@ void C4Def::CompileFunc(StdCompiler *pComp)
|
|||
pComp->Value(mkNamingAdapt(VehicleControl, "VehicleControl", 0 ));
|
||||
pComp->Value(mkNamingAdapt(Pathfinder, "Pathfinder", 0 ));
|
||||
pComp->Value(mkNamingAdapt(MoveToRange, "MoveToRange", 0 ));
|
||||
pComp->Value(mkNamingAdapt(NoComponentMass, "NoComponentMass", 0 ));
|
||||
pComp->Value(mkNamingAdapt(NoMassFromContents, "NoMassFromContents", 0 ));
|
||||
pComp->Value(mkNamingAdapt(NoStabilize, "NoStabilize", 0 ));
|
||||
pComp->Value(mkNamingAdapt(ClosedContainer, "ClosedContainer", 0 ));
|
||||
pComp->Value(mkNamingAdapt(SilentCommands, "SilentCommands", 0 ));
|
||||
|
|
|
@ -138,7 +138,7 @@ public:
|
|||
int32_t VehicleControl;
|
||||
int32_t Pathfinder;
|
||||
int32_t MoveToRange;
|
||||
int32_t NoComponentMass;
|
||||
int32_t NoMassFromContents;
|
||||
int32_t NoStabilize;
|
||||
int32_t ClosedContainer; // if set, contained objects are not damaged by lava/acid etc. 1: Contained objects can't view out; 2: They can
|
||||
int32_t SilentCommands; // if set, no command failure messages are printed
|
||||
|
|
|
@ -721,7 +721,7 @@ void C4Object::DrawActionFace(C4TargetFacet &cgo, float offX, float offY) const
|
|||
void C4Object::UpdateMass()
|
||||
{
|
||||
Mass=std::max<int32_t>((Def->Mass+OwnMass)*Con/FullCon,1);
|
||||
if (!Def->NoComponentMass) Mass+=Contents.Mass;
|
||||
if (!Def->NoMassFromContents) Mass+=Contents.Mass;
|
||||
if (Contained)
|
||||
{
|
||||
Contained->Contents.MassCount();
|
||||
|
|
Loading…
Reference in New Issue