Fix TextBlock.Text=null, most new blocks and others
This commit is contained in:
parent
53bdd27166
commit
1e9d1c8f81
3 changed files with 55 additions and 1 deletions
|
@ -439,7 +439,12 @@ namespace GamecraftModdingAPI
|
|||
|
||||
//Lets improve that using delegates
|
||||
var block = New<T>(Id.entityID, Id.groupID);
|
||||
if (this.InitData.Group != null)
|
||||
{
|
||||
block.InitData = this.InitData;
|
||||
Placed += block.OnPlacedInit; //Reset InitData of new object
|
||||
}
|
||||
|
||||
return block;
|
||||
}
|
||||
|
||||
|
|
|
@ -248,6 +248,54 @@ namespace GamecraftModdingAPI.Blocks
|
|||
PlasmaCannonBlock,
|
||||
QuantumRiflePickup = 300,
|
||||
QuantumRifleAmmoPickup,
|
||||
AluminiumSlicedFraction,
|
||||
AluminiumSlicedSlope,
|
||||
AluminiumHalfPyramidLeft = 305,
|
||||
AluminiumHalfPyramidRight,
|
||||
AluminiumPyramidSliced,
|
||||
AluminiumTubeCross,
|
||||
AluminiumTubeT,
|
||||
AluminiumPlateSquare,
|
||||
AluminiumPlateCircle,
|
||||
AluminiumPlateTriangle, //312
|
||||
OiledSlicedFraction = 314,
|
||||
OiledSlicedSlope,
|
||||
OiledHalfPyramidLeft,
|
||||
OiledHalfPyramidRight,
|
||||
OiledPyramidSliced,
|
||||
GlassSlicedFraction,
|
||||
GlassSlicedSlope,
|
||||
GlassHalfPyramidLeft,
|
||||
GlassHalfPyramidRight,
|
||||
GlassPyramidSliced,
|
||||
RubberSlicedFraction,
|
||||
RubberSlicedSlope,
|
||||
RubberHalfPyramidLeft,
|
||||
RubberHalfPyramidRight,
|
||||
RubberPyramidSliced,
|
||||
WoodSlicedFraction,
|
||||
WoodSlicedSlope, //330
|
||||
WoodHalfPyramidLeft,
|
||||
WoodHalfPyramidRight,
|
||||
WoodPyramidSliced,
|
||||
OiledTubeCross = 339,
|
||||
OiledTubeT,
|
||||
GlassTubeT,
|
||||
RubberTubeCross = 343,
|
||||
RubberTubeT,
|
||||
WoodTubeCross,
|
||||
WoodTubeT,
|
||||
OiledTubeCorner = 353,
|
||||
GlassTubeCorner,
|
||||
RubberTubeCorner,
|
||||
WoodTubeCorner,
|
||||
IronSlicedFraction = 366,
|
||||
IronSlicedSlope,
|
||||
IronHalfPyramidLeft,
|
||||
IronHalfPyramidRight,
|
||||
IronPyramidSliced,
|
||||
IronTubeCross,
|
||||
IronTubeT,
|
||||
MagmaRockCube=777,
|
||||
MagmaRockCubeSliced,
|
||||
MagmaRockSlope,
|
||||
|
|
|
@ -33,6 +33,7 @@ namespace GamecraftModdingAPI.Blocks
|
|||
{
|
||||
BlockEngine.SetBlockInfo(this, (ref TextBlockDataStruct tbds, string val) =>
|
||||
{
|
||||
if (val == null) val = "";
|
||||
tbds.textCurrent.Set(val);
|
||||
tbds.textStored.Set(val);
|
||||
}, value);
|
||||
|
|
Loading…
Reference in a new issue