1
0

Changing pickup lifetime and combining semantics, making these adjustable in the lua api. (#3843)

This commit is contained in:
Lane Kolbly
2017-07-12 05:13:27 -05:00
committed by Lukas Pioch
parent 647d9082b8
commit 793acd267f
7 changed files with 151 additions and 6 deletions

View File

@@ -3009,6 +3009,66 @@ function OnAllChunksAvailable()</pre> All return values from the callbacks are i
},
Notes = "Spawns a {{cFallingBlock|Falling Block}} entity at the specified coords with the given block type/meta. Returns the EntityID of the new falling block, or {{cEntity#INVALID_ID|cEntity#INVALID_ID}} if no falling block was created.",
},
SpawnItemPickup =
{
Params =
{
{
Name = "PosX",
Type = "number",
},
{
Name = "PosY",
Type = "number",
},
{
Name = "PosZ",
Type = "number",
},
{
Name = "Item",
Type = "cItem",
},
{
Name = "SpeedX",
Type = "number",
IsOptional = true,
Notes = "Speed along X coordinate to spawn with. Default is 0.",
},
{
Name = "SpeedY",
Type = "number",
IsOptional = true,
Notes = "Speed along Y coordinate to spawn with. Default is 0.",
},
{
Name = "SpeedZ",
Type = "number",
IsOptional = true,
Notes = "Speed along Z coordinate to spawn with. Default is 0.",
},
{
Name = "LifetimeTicks",
Type = "number",
IsOptional = true,
Notes = "Length of the pickups lifetime, in ticks. Default 5 minutes (6000 ticks)",
},
{
Name = "CanCombine",
Type = "boolean",
IsOptional = true,
Notes = "Whether this pickup is allowed to combine with other similar pickups.",
},
},
Returns =
{
{
Name = "EntityID",
Type = "number",
}
},
Notes = "Creates a single pickup entity of the given item at the given position with the given speed, and returns the entities unique ID."
},
SpawnItemPickups =
{
{