mirror of
https://github.com/curioustorvald/Terrarum.git
synced 2026-06-14 04:24:05 +09:00
Ingame's Player is now mandatory; player spawn on right position
This commit is contained in:
@@ -59,7 +59,7 @@ class ActorInventory(val actor: Pocketed, var maxCapacity: Int, var capacityMode
|
||||
"These commands are NOT INTERCHANGEABLE; they handle things differently according to the context.")
|
||||
if (item.originalID == Player.PLAYER_REF_ID || item.originalID == 0x51621D) // do not delete this magic
|
||||
throw IllegalArgumentException("Attempted to put human player into the inventory.")
|
||||
if (Terrarum.ingame != null &&
|
||||
if ((Terrarum.ingame?.gameFullyLoaded ?: false) &&
|
||||
(item.originalID == Terrarum.ingame?.player?.referenceID))
|
||||
throw IllegalArgumentException("Attempted to put active player into the inventory.")
|
||||
if ((!item.stackable || item.dynamicID in ITEM_DYNAMIC) && count > 1)
|
||||
|
||||
@@ -65,8 +65,6 @@ object PlayerBuilderSigrid {
|
||||
|
||||
p.inventory = ActorInventory(p, 0, ActorInventory.CAPACITY_MODE_NO_ENCUMBER)
|
||||
|
||||
p.setPosition((4096 * FeaturesDrawer.TILE_SIZE).toDouble(), (300 * 16).toDouble())
|
||||
|
||||
p.faction.add(FactionFactory.create("basegame", "factions/FactionSigrid.json"))
|
||||
|
||||
|
||||
@@ -78,7 +76,10 @@ object PlayerBuilderSigrid {
|
||||
Block.PLANK_BIRCH, Block.PLANK_BLOODROSE, Block.PLANK_EBONY, Block.PLANK_NORMAL,
|
||||
Block.SANDSTONE, Block.SANDSTONE_BLACK, Block.SANDSTONE_GREEN,
|
||||
Block.SANDSTONE_RED, Block.STONE, Block.STONE_BRICKS,
|
||||
Block.STONE_QUARRIED, Block.STONE_TILE_WHITE, Block.TORCH
|
||||
Block.STONE_QUARRIED, Block.STONE_TILE_WHITE, Block.TORCH,
|
||||
Block.DAYLIGHT_CAPACITOR, Block.ICE_FRAGILE,
|
||||
Block.ILLUMINATOR_WHITE, Block.ILLUMINATOR_BLACK, Block.ILLUMINATOR_ORANGE,
|
||||
Block.ILLUMINATOR_GREEN
|
||||
)
|
||||
val walls = arrayOf(
|
||||
Block.AIR, Block.DIRT, Block.GLASS_CRUDE,
|
||||
|
||||
Reference in New Issue
Block a user