mirror of
https://github.com/curioustorvald/Terrarum.git
synced 2026-03-07 12:21:52 +09:00
65536 Blocks!!!
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
*Terrarum*
|
||||
|
||||
Copyright (C) 2013-2020 Minjaesong (Torvald)
|
||||
Copyright (C) 2013-2021 Minjae Song ("CuriousTorvald")
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
@@ -19,7 +19,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
*Terrarum Sans Bitmap*
|
||||
|
||||
Copyright (c) 2017-2019 Minjae Song (Torvald) and the contributors
|
||||
Copyright (c) 2017-2020 Minjae Song ("CuriousTorvald") and the contributors
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
@@ -113,7 +113,7 @@ DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
|
||||
IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
|
||||
OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
Kotlin translated and modified code Copyright (C) 2016 Minjaesong (Torvald)
|
||||
Kotlin translated and modified code Copyright (C) 2016 Minjae Song ("CuriousTorvald")
|
||||
|
||||
----
|
||||
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
|Range|Description|
|
||||
|-----|-----------|
|
||||
|0..4095|Tiles (4096 possible)|
|
||||
|4096..8191|Walls (4096 possible)|
|
||||
|8192..8447|Wires (256 possible)|
|
||||
|8448..0x0F_FFFF|Items (static) (1M possible)|
|
||||
|0..65535|Tiles (65536 possible)|
|
||||
|65536..131071|Walls (65536 possible)|
|
||||
|131072..135167|Wires (4096 possible)|
|
||||
|135168..0x0F_FFFF|Items (static) (1M possible)|
|
||||
|0x10_0000..0x0FFF_FFFF|Items (dynamic\*) (267M possible)|
|
||||
|0x1000_0000..0x7FFF_FFFF|Actors (1879M possible)|
|
||||
|-2..-1048576|Virtual Tiles|
|
||||
|
||||
@@ -107,8 +107,8 @@
|
||||
"4093";"0";"ACTORBLOCK_ALLOW_MOVE_DOWN";"0.0312";"0.0312";"0.0312";"0.0312";"1";"1";"NULL";"0";"1";"0";"N/A";"0";"0";"0";"0.0";"0.0";"0.0";"0.0";"N/A";"N/A"
|
||||
"4094";"0";"ACTORBLOCK_NO_PASS_RIGHT";"0.0312";"0.0312";"0.0312";"0.0312";"1";"1";"NULL";"0";"0";"0";"N/A";"0";"0";"0";"0.0";"0.0";"0.0";"0.0";"N/A";"N/A"
|
||||
"4095";"0";"ACTORBLOCK_NO_PASS_LEFT";"0.0312";"0.0312";"0.0312";"0.0312";"1";"1";"NULL";"0";"0";"0";"N/A";"0";"0";"0";"0.0";"0.0";"0.0";"0.0";"N/A";"N/A"
|
||||
"4096";"0";"BLOCK_WATER";"0.1016";"0.0744";"0.0508";"0.0826";"100";"1000";"WATR";"0";"0";"0";"0";"0";"0";"16";"0.0000";"0.0000";"0.0000";"0.0000";"005599A6";"16"
|
||||
"4097";"0";"BLOCK_LAVA";"0.9696";"0.9696";"0.9696";"0.9696";"100";"2600";"ROCK";"0";"0";"0";"0";"0";"0";"16";"0.7664";"0.2032";"0.0000";"0.0000";"FF4600E6";"32"
|
||||
"65536";"0";"BLOCK_WATER";"0.1016";"0.0744";"0.0508";"0.0826";"100";"1000";"WATR";"0";"0";"0";"0";"0";"0";"16";"0.0000";"0.0000";"0.0000";"0.0000";"005599A6";"16"
|
||||
"65537";"0";"BLOCK_LAVA";"0.9696";"0.9696";"0.9696";"0.9696";"100";"2600";"ROCK";"0";"0";"0";"0";"0";"0";"16";"0.7664";"0.2032";"0.0000";"0.0000";"FF4600E6";"32"
|
||||
"-1";"0";"BLOCK_NULL";"4.0000";"4.0000";"4.0000";"4.0000";"-1";"2600";"NULL";"0";"0";"1";"N/A";"0";"0";"16";"0.0000";"0.0000";"0.0000";"0.0000";"N/A";"N/A"
|
||||
|
||||
|
||||
|
||||
|
@@ -1,7 +1,7 @@
|
||||
"id";"classname"
|
||||
"8448";"net.torvald.terrarum.modulebasegame.gameitems.PickaxeCopper"
|
||||
"8449";"net.torvald.terrarum.modulebasegame.gameitems.PickaxeIron"
|
||||
"8450";"net.torvald.terrarum.modulebasegame.gameitems.PickaxeSteel"
|
||||
"8466";"net.torvald.terrarum.modulebasegame.gameitems.WirePieceSignalWire"
|
||||
"8467";"net.torvald.terrarum.modulebasegame.gameitems.TikiTorchTester"
|
||||
"8468";"net.torvald.terrarum.modulebasegame.gameitems.ItemCraftingTable"
|
||||
"id";"classname"
|
||||
"135168";"net.torvald.terrarum.modulebasegame.gameitems.PickaxeCopper"
|
||||
"135169";"net.torvald.terrarum.modulebasegame.gameitems.PickaxeIron"
|
||||
"135170";"net.torvald.terrarum.modulebasegame.gameitems.PickaxeSteel"
|
||||
"135171";"net.torvald.terrarum.modulebasegame.gameitems.WirePieceSignalWire"
|
||||
"135172";"net.torvald.terrarum.modulebasegame.gameitems.TikiTorchTester"
|
||||
"135173";"net.torvald.terrarum.modulebasegame.gameitems.ItemCraftingTable"
|
||||
|
||||
|
@@ -6,12 +6,12 @@ package net.torvald.terrarum
|
||||
*/
|
||||
object ReferencingRanges {
|
||||
|
||||
val TILES = 0..4095
|
||||
val WALLS = 4096..8191
|
||||
val WIRES = 8192..8447
|
||||
val ITEMS_STATIC = 8448..0x0F_FFFF
|
||||
val ITEMS_DYNAMIC = 0x10_0000..0x0FFF_FFFF
|
||||
val ACTORS = 0x1000_0000..0x7FFF_FFFF
|
||||
val TILES = 0..65535 // 65 536 blocks
|
||||
val WALLS = 65536..131071 // 65 536 walls
|
||||
val WIRES = 131072..135167 // 4 096 wires
|
||||
val ITEMS_STATIC = 135168..0x0F_FFFF // 913 408 items
|
||||
val ITEMS_DYNAMIC = 0x10_0000..0x0FFF_FFFF // 267 386 880 pseudo-items
|
||||
val ACTORS = 0x1000_0000..0x7FFF_FFFF // too much actors
|
||||
|
||||
// Actor IDs are assigned in 256 groups, single actor can have 256 sub-actors
|
||||
val ACTORS_BEHIND = 0x1000_0000..0x1FFF_FFFF // Rendered behind (e.g. tapestries)
|
||||
|
||||
@@ -12,7 +12,7 @@ public class TerrarumAppConfiguration {
|
||||
//////////////////////////////////////
|
||||
|
||||
public static final String GAME_NAME = "Terrarum";
|
||||
public static final String COPYRIGHT_DATE_NAME = "Copyright 2013-2020 Torvald (minjaesong)";
|
||||
public static final String COPYRIGHT_DATE_NAME = "Copyright 2013-2021 Torvald (minjaesong)";
|
||||
|
||||
/**
|
||||
* <p>
|
||||
|
||||
@@ -22,7 +22,7 @@ object BlockCodex {
|
||||
|
||||
val dynamicLights = SortedArrayList<Int>() // does not include virtual ones
|
||||
|
||||
/** 4096 */
|
||||
/** 65536 */
|
||||
val MAX_TERRAIN_TILES = GameWorld.TILES_SUPPORTED
|
||||
|
||||
private val nullProp = BlockProp()
|
||||
|
||||
@@ -2,6 +2,7 @@ package net.torvald.terrarum.modulebasegame.gameactors
|
||||
|
||||
import net.torvald.terrarum.ModMgr
|
||||
import net.torvald.terrarum.blockproperties.BlockCodex
|
||||
import net.torvald.terrarum.blockproperties.BlockCodex.MAX_TERRAIN_TILES
|
||||
import net.torvald.terrarum.gameactors.AVKey
|
||||
import net.torvald.terrarum.gameactors.faction.FactionFactory
|
||||
import net.torvald.terrarum.worlddrawer.CreateTileAtlas
|
||||
@@ -78,19 +79,19 @@ object PlayerBuilderSigrid {
|
||||
CreateTileAtlas.tags.forEach { t, _ ->
|
||||
inventory.add(t, 9995)
|
||||
if (BlockCodex[t].isWallable) {
|
||||
inventory.add(t + 4096, 9995)
|
||||
inventory.add(t + MAX_TERRAIN_TILES, 9995)
|
||||
}
|
||||
}
|
||||
|
||||
// item ids are defined in <module>/items/itemid.csv
|
||||
|
||||
inventory.add(8448, 16) // copper pick
|
||||
inventory.add(8449) // iron pick
|
||||
inventory.add(8450) // steel pick
|
||||
inventory.add(8466, 9995) // wire piece
|
||||
inventory.add(8467, 385930603) // test tiki torch
|
||||
inventory.add(8468, 95) // crafting table
|
||||
inventory.add(9000) // TEST water bucket
|
||||
inventory.add(9001) // TEST lava bucket
|
||||
inventory.add(135168, 16) // copper pick
|
||||
inventory.add(135169) // iron pick
|
||||
inventory.add(135170) // steel pick
|
||||
inventory.add(135171, 9995) // wire piece
|
||||
inventory.add(135172, 385930603) // test tiki torch
|
||||
inventory.add(135173, 95) // crafting table
|
||||
//inventory.add(9000) // TEST water bucket
|
||||
//inventory.add(9001) // TEST lava bucket
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user