mirror of
https://github.com/curioustorvald/Terrarum.git
synced 2026-06-09 10:04:05 +09:00
still working on the new savegame scheme
main game works fine, saving/loading will not be possible
This commit is contained in:
@@ -65,7 +65,7 @@ class BuildingMaker(batch: SpriteBatch) : IngameInstance(batch) {
|
||||
|
||||
private val timeNow = System.currentTimeMillis() / 1000
|
||||
|
||||
val gameWorld = GameWorld(1, 1024, 256, timeNow, timeNow)
|
||||
val gameWorld = GameWorld(90*12, 90*4, timeNow, timeNow)
|
||||
|
||||
init {
|
||||
// ghetto world for building
|
||||
|
||||
@@ -348,9 +348,9 @@ open class TerrarumIngame(batch: SpriteBatch) : IngameInstance(batch) {
|
||||
|
||||
// init map as chosen size
|
||||
val timeNow = App.getTIME_T()
|
||||
world = GameWorld(1, worldParams.width, worldParams.height, timeNow, timeNow) // new game, so the creation time is right now
|
||||
world = GameWorld(worldParams.width, worldParams.height, timeNow, timeNow) // new game, so the creation time is right now
|
||||
world.generatorSeed = worldParams.worldGenSeed
|
||||
gameworldIndices.add(world.worldIndex)
|
||||
//gameworldIndices.add(world.worldIndex)
|
||||
world.extraFields["basegame.economy"] = GameEconomy()
|
||||
|
||||
// generate terrain for the map
|
||||
|
||||
@@ -5,6 +5,7 @@ import net.torvald.spriteanimation.HasAssembledSprite
|
||||
import net.torvald.spriteassembler.ADProperties
|
||||
import net.torvald.terrarum.Terrarum
|
||||
import net.torvald.terrarum.gameactors.AVKey
|
||||
import java.util.*
|
||||
|
||||
|
||||
/**
|
||||
@@ -15,9 +16,10 @@ import net.torvald.terrarum.gameactors.AVKey
|
||||
|
||||
class IngamePlayer : ActorHumanoid, HasAssembledSprite {
|
||||
|
||||
var UUID = UUID(0L,0L); private set
|
||||
internal var worldCurrentlyPlaying: UUID = UUID(0L,0L) // only filled up on save and load; DO NOT USE THIS
|
||||
override var animDesc: ADProperties? = null
|
||||
override var animDescGlow: ADProperties? = null
|
||||
internal var worldCurrentlyPlaying = 0 // only filled up on save and load; DO NOT USE THIS
|
||||
|
||||
private constructor()
|
||||
|
||||
@@ -33,10 +35,10 @@ class IngamePlayer : ActorHumanoid, HasAssembledSprite {
|
||||
* **Use PlayerFactory to build player!**
|
||||
*/
|
||||
init {
|
||||
referenceID = Terrarum.PLAYER_REF_ID // forcibly set ID
|
||||
referenceID = Terrarum.PLAYER_REF_ID // TODO assign random ID
|
||||
density = BASE_DENSITY
|
||||
collisionType = COLLISION_KINEMATIC
|
||||
worldCurrentlyPlaying = Terrarum.ingame?.world?.worldIndex ?: 0
|
||||
worldCurrentlyPlaying = Terrarum.ingame?.world?.worldIndex ?: UUID(0L,0L)
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user