Class BuildingSpawner
Functions for spawning buildings and objects contained in them.
Inheritance
System.Object
BuildingSpawner
Assembly: Eco.Gameplay.dll
Syntax
public static class BuildingSpawner : Object
Methods
SpawnBuilding(User, Vector3i, RoomSpecification, Boolean)
Spawn building for given roomSpecification at given position.
Declaration
public static WorldRange SpawnBuilding(User user, Vector3i position, RoomSpecification roomSpecification, bool levelGround = true)
Parameters
Returns
SpawnBuilding(User, Int32, Vector3i, Vector3i, RoofType, Boolean, Boolean)
Spawns building with given tier, size and options.
Declaration
public static WorldRange SpawnBuilding(User user, int tier, Vector3i interiorSize, Vector3i position, RoofType roofVal, bool windows = true, bool levelGround = true)
Parameters
| Type |
Name |
Description |
| User |
user |
|
| System.Int32 |
tier |
|
| Vector3i |
interiorSize |
|
| Vector3i |
position |
|
| RoofType |
roofVal |
|
| System.Boolean |
windows |
|
| System.Boolean |
levelGround |
|
Returns
SpawnBuilding(User, String, Vector3i, Vector3i, RoofType, Boolean, Boolean)
Declaration
public static void SpawnBuilding(User user, string materialName, Vector3i interiorSize, Vector3i position, RoofType roofVal, bool windows = true, bool levelGround = true)
Parameters
| Type |
Name |
Description |
| User |
user |
|
| System.String |
materialName |
|
| Vector3i |
interiorSize |
|
| Vector3i |
position |
|
| RoofType |
roofVal |
|
| System.Boolean |
windows |
|
| System.Boolean |
levelGround |
|
SpawnBuildingWithObject(String, User, Vector3i, Boolean)
Declaration
public static (WorldObject, WorldRange) SpawnBuildingWithObject(string name, User user, Vector3i pos, bool levelGround = true)
Parameters
| Type |
Name |
Description |
| System.String |
name |
|
| User |
user |
|
| Vector3i |
pos |
|
| System.Boolean |
levelGround |
|
Returns
SpawnBuildingWithObject(Type, User, Vector2i, Boolean)
Declaration
public static (WorldObject, WorldRange) SpawnBuildingWithObject(Type objType, User user, Vector2i pos, bool levelGround = true)
Parameters
| Type |
Name |
Description |
| System.Type |
objType |
|
| User |
user |
|
| Vector2i |
pos |
|
| System.Boolean |
levelGround |
|
Returns
SpawnBuildingWithObject(Type, User, Vector3i, Boolean)
Declaration
public static (WorldObject, WorldRange) SpawnBuildingWithObject(Type objType, User user, Vector3i pos, bool levelGround = true)
Parameters
| Type |
Name |
Description |
| System.Type |
objType |
|
| User |
user |
|
| Vector3i |
pos |
|
| System.Boolean |
levelGround |
|
Returns
SpawnBuildingWithObject(Type, User, PlotPos, Boolean)
Declaration
public static (WorldObject, WorldRange) SpawnBuildingWithObject(Type objType, User user, PlotPos pos, bool levelGround = true)
Parameters
| Type |
Name |
Description |
| System.Type |
objType |
|
| User |
user |
|
| PlotPos |
pos |
|
| System.Boolean |
levelGround |
|
Returns
SpawnBuildingWithObjectAndClaim(Deed, String, User, Vector2i, Boolean)
Declaration
public static (WorldObject, WorldRange) SpawnBuildingWithObjectAndClaim(Deed deed, string name, User user, Vector2i worldPos, bool levelGround = true)
Parameters
| Type |
Name |
Description |
| Deed |
deed |
|
| System.String |
name |
|
| User |
user |
|
| Vector2i |
worldPos |
|
| System.Boolean |
levelGround |
|
Returns
SpawnBuildingWithObjectAndClaim(Deed, String, User, Vector3i, Boolean)
Declaration
public static (WorldObject, WorldRange) SpawnBuildingWithObjectAndClaim(Deed deed, string name, User user, Vector3i worldPos, bool levelGround = true)
Parameters
| Type |
Name |
Description |
| Deed |
deed |
|
| System.String |
name |
|
| User |
user |
|
| Vector3i |
worldPos |
|
| System.Boolean |
levelGround |
|
Returns
SpawnBuildingWithObjectAndClaim(String, User, Vector3i, Boolean)
Spawn a building for the given object, creating a new deed and claiming on it.
Declaration
public static (WorldObject, WorldRange) SpawnBuildingWithObjectAndClaim(string name, User creator, Vector3i position, bool levelGround = true)
Parameters
| Type |
Name |
Description |
| System.String |
name |
|
| User |
creator |
|
| Vector3i |
position |
|
| System.Boolean |
levelGround |
|
Returns