diff --git a/.idea/codeStyleSettings.xml b/.idea/codeStyleSettings.xml
index 94dd25709..8d8047d9b 100644
--- a/.idea/codeStyleSettings.xml
+++ b/.idea/codeStyleSettings.xml
@@ -25,7 +25,7 @@
-
+
diff --git a/out/production/Terrarum_renewed/com/Torvald/ColourUtil/Col216.class b/out/production/Terrarum_renewed/com/Torvald/ColourUtil/Col216.class
index 4f5d8ec65..04a53574a 100644
Binary files a/out/production/Terrarum_renewed/com/Torvald/ColourUtil/Col216.class and b/out/production/Terrarum_renewed/com/Torvald/ColourUtil/Col216.class differ
diff --git a/out/production/Terrarum_renewed/com/Torvald/ColourUtil/Col40.class b/out/production/Terrarum_renewed/com/Torvald/ColourUtil/Col40.class
new file mode 100644
index 000000000..ece6800b7
Binary files /dev/null and b/out/production/Terrarum_renewed/com/Torvald/ColourUtil/Col40.class differ
diff --git a/out/production/Terrarum_renewed/com/Torvald/ImageFont/GameFontBase.class b/out/production/Terrarum_renewed/com/Torvald/ImageFont/GameFontBase.class
index 7b05084f0..c1149d0ff 100644
Binary files a/out/production/Terrarum_renewed/com/Torvald/ImageFont/GameFontBase.class and b/out/production/Terrarum_renewed/com/Torvald/ImageFont/GameFontBase.class differ
diff --git a/out/production/Terrarum_renewed/com/Torvald/ImageFont/GameFontWhite.class b/out/production/Terrarum_renewed/com/Torvald/ImageFont/GameFontWhite.class
index f4b1fcac3..93cfe3aa5 100644
Binary files a/out/production/Terrarum_renewed/com/Torvald/ImageFont/GameFontWhite.class and b/out/production/Terrarum_renewed/com/Torvald/ImageFont/GameFontWhite.class differ
diff --git a/out/production/Terrarum_renewed/com/Torvald/Terrarum/ABOUT b/out/production/Terrarum_renewed/com/Torvald/Terrarum/ABOUT
index daff1baa6..bdef43298 100644
--- a/out/production/Terrarum_renewed/com/Torvald/Terrarum/ABOUT
+++ b/out/production/Terrarum_renewed/com/Torvald/Terrarum/ABOUT
@@ -147,7 +147,7 @@ HEARTS, CLUBS, DIAMONDS, SPADES: PLAYERS WHO SUIT MUDS
- (Optional) SFX
* Size
- - Regular sprite 'height': 40 px
+ - Regular sprite 'height' (hitbox height) : 40 px
- Apparent height may vary
@@ -160,6 +160,4 @@ HEARTS, CLUBS, DIAMONDS, SPADES: PLAYERS WHO SUIT MUDS
* Colour: 4096 colours (12-bit 0x000 - 0xFFF)
-* Height variation option (.85 - .90 - .95 - 1 - 1.05 - 1.10 - 1.15)
-
* Base mass: 60 kg
diff --git a/out/production/Terrarum_renewed/com/Torvald/Terrarum/Actors/Landholder.class b/out/production/Terrarum_renewed/com/Torvald/Terrarum/Actors/Landholder.class
new file mode 100644
index 000000000..e2e3f77fc
Binary files /dev/null and b/out/production/Terrarum_renewed/com/Torvald/Terrarum/Actors/Landholder.class differ
diff --git a/out/production/Terrarum_renewed/com/Torvald/Terrarum/Actors/Luminous.class b/out/production/Terrarum_renewed/com/Torvald/Terrarum/Actors/Luminous.class
index 80ce4b82f..46ad2272b 100644
Binary files a/out/production/Terrarum_renewed/com/Torvald/Terrarum/Actors/Luminous.class and b/out/production/Terrarum_renewed/com/Torvald/Terrarum/Actors/Luminous.class differ
diff --git a/out/production/Terrarum_renewed/com/Torvald/Terrarum/Actors/NPCIntelligentBase$1.class b/out/production/Terrarum_renewed/com/Torvald/Terrarum/Actors/NPCIntelligentBase$1.class
new file mode 100644
index 000000000..4a3c50cf9
Binary files /dev/null and b/out/production/Terrarum_renewed/com/Torvald/Terrarum/Actors/NPCIntelligentBase$1.class differ
diff --git a/out/production/Terrarum_renewed/com/Torvald/Terrarum/Actors/NPCIntelligentBase.class b/out/production/Terrarum_renewed/com/Torvald/Terrarum/Actors/NPCIntelligentBase.class
new file mode 100644
index 000000000..e557896f4
Binary files /dev/null and b/out/production/Terrarum_renewed/com/Torvald/Terrarum/Actors/NPCIntelligentBase.class differ
diff --git a/out/production/Terrarum_renewed/com/Torvald/Terrarum/Actors/PBFSigrid.class b/out/production/Terrarum_renewed/com/Torvald/Terrarum/Actors/PBFSigrid.class
index 32e58c2eb..428349629 100644
Binary files a/out/production/Terrarum_renewed/com/Torvald/Terrarum/Actors/PBFSigrid.class and b/out/production/Terrarum_renewed/com/Torvald/Terrarum/Actors/PBFSigrid.class differ
diff --git a/out/production/Terrarum_renewed/com/Torvald/Terrarum/Actors/Player.class b/out/production/Terrarum_renewed/com/Torvald/Terrarum/Actors/Player.class
index 564098542..623639ecc 100644
Binary files a/out/production/Terrarum_renewed/com/Torvald/Terrarum/Actors/Player.class and b/out/production/Terrarum_renewed/com/Torvald/Terrarum/Actors/Player.class differ
diff --git a/out/production/Terrarum_renewed/com/Torvald/Terrarum/Actors/TestNPC$1.class b/out/production/Terrarum_renewed/com/Torvald/Terrarum/Actors/TestNPC$1.class
deleted file mode 100644
index 43d0dd135..000000000
Binary files a/out/production/Terrarum_renewed/com/Torvald/Terrarum/Actors/TestNPC$1.class and /dev/null differ
diff --git a/out/production/Terrarum_renewed/com/Torvald/Terrarum/Actors/TestNPC.class b/out/production/Terrarum_renewed/com/Torvald/Terrarum/Actors/TestNPC.class
deleted file mode 100644
index f6f933136..000000000
Binary files a/out/production/Terrarum_renewed/com/Torvald/Terrarum/Actors/TestNPC.class and /dev/null differ
diff --git a/out/production/Terrarum_renewed/com/Torvald/Terrarum/ConsoleCommand/Authenticator.class b/out/production/Terrarum_renewed/com/Torvald/Terrarum/ConsoleCommand/Authenticator.class
index f25c6032d..fe83ed89a 100644
Binary files a/out/production/Terrarum_renewed/com/Torvald/Terrarum/ConsoleCommand/Authenticator.class and b/out/production/Terrarum_renewed/com/Torvald/Terrarum/ConsoleCommand/Authenticator.class differ
diff --git a/out/production/Terrarum_renewed/com/Torvald/Terrarum/ConsoleCommand/CodexEdictis.class b/out/production/Terrarum_renewed/com/Torvald/Terrarum/ConsoleCommand/CodexEdictis.class
index 394173585..10592adfa 100644
Binary files a/out/production/Terrarum_renewed/com/Torvald/Terrarum/ConsoleCommand/CodexEdictis.class and b/out/production/Terrarum_renewed/com/Torvald/Terrarum/ConsoleCommand/CodexEdictis.class differ
diff --git a/out/production/Terrarum_renewed/com/Torvald/Terrarum/ConsoleCommand/CommandInterpreter.class b/out/production/Terrarum_renewed/com/Torvald/Terrarum/ConsoleCommand/CommandInterpreter.class
index 9cd1b59a7..2a928c09a 100644
Binary files a/out/production/Terrarum_renewed/com/Torvald/Terrarum/ConsoleCommand/CommandInterpreter.class and b/out/production/Terrarum_renewed/com/Torvald/Terrarum/ConsoleCommand/CommandInterpreter.class differ
diff --git a/out/production/Terrarum_renewed/com/Torvald/Terrarum/ConsoleCommand/GetAV.class b/out/production/Terrarum_renewed/com/Torvald/Terrarum/ConsoleCommand/GetAV.class
index f62d41d7b..7f573e399 100644
Binary files a/out/production/Terrarum_renewed/com/Torvald/Terrarum/ConsoleCommand/GetAV.class and b/out/production/Terrarum_renewed/com/Torvald/Terrarum/ConsoleCommand/GetAV.class differ
diff --git a/out/production/Terrarum_renewed/com/Torvald/Terrarum/ConsoleCommand/GetFactioning.class b/out/production/Terrarum_renewed/com/Torvald/Terrarum/ConsoleCommand/GetFactioning.class
index 549c1548f..41a49b5f7 100644
Binary files a/out/production/Terrarum_renewed/com/Torvald/Terrarum/ConsoleCommand/GetFactioning.class and b/out/production/Terrarum_renewed/com/Torvald/Terrarum/ConsoleCommand/GetFactioning.class differ
diff --git a/out/production/Terrarum_renewed/com/Torvald/Terrarum/ConsoleCommand/SetGlobalLightLevel.class b/out/production/Terrarum_renewed/com/Torvald/Terrarum/ConsoleCommand/SetGlobalLightLevel.class
index 3fb46f0c4..3106411ef 100644
Binary files a/out/production/Terrarum_renewed/com/Torvald/Terrarum/ConsoleCommand/SetGlobalLightLevel.class and b/out/production/Terrarum_renewed/com/Torvald/Terrarum/ConsoleCommand/SetGlobalLightLevel.class differ
diff --git a/out/production/Terrarum_renewed/com/Torvald/Terrarum/ConsoleCommand/SetLocale.class b/out/production/Terrarum_renewed/com/Torvald/Terrarum/ConsoleCommand/SetLocale.class
index 0a4d7d99f..4678758c2 100644
Binary files a/out/production/Terrarum_renewed/com/Torvald/Terrarum/ConsoleCommand/SetLocale.class and b/out/production/Terrarum_renewed/com/Torvald/Terrarum/ConsoleCommand/SetLocale.class differ
diff --git a/out/production/Terrarum_renewed/com/Torvald/Terrarum/GameControl/GameController.class b/out/production/Terrarum_renewed/com/Torvald/Terrarum/GameControl/GameController.class
index 71a3586ca..c933baa98 100644
Binary files a/out/production/Terrarum_renewed/com/Torvald/Terrarum/GameControl/GameController.class and b/out/production/Terrarum_renewed/com/Torvald/Terrarum/GameControl/GameController.class differ
diff --git a/out/production/Terrarum_renewed/com/Torvald/Terrarum/GameMap/GameMap.class b/out/production/Terrarum_renewed/com/Torvald/Terrarum/GameMap/GameMap.class
index 418cc4171..2d05f4111 100644
Binary files a/out/production/Terrarum_renewed/com/Torvald/Terrarum/GameMap/GameMap.class and b/out/production/Terrarum_renewed/com/Torvald/Terrarum/GameMap/GameMap.class differ
diff --git a/out/production/Terrarum_renewed/com/Torvald/Terrarum/MISC_FEATURES b/out/production/Terrarum_renewed/com/Torvald/Terrarum/MISC_FEATURES
index 6ce71a3d1..67fd5594b 100644
--- a/out/production/Terrarum_renewed/com/Torvald/Terrarum/MISC_FEATURES
+++ b/out/production/Terrarum_renewed/com/Torvald/Terrarum/MISC_FEATURES
@@ -1,4 +1,4 @@
* Drawing
- Players can create their own décors (hang on wall), dresses.
-- Two looms (3-3-2 colour mode, 4096 colour mode)
\ No newline at end of file
+- Two looms (216 colour mode, 4096 colour mode)
\ No newline at end of file
diff --git a/out/production/Terrarum_renewed/com/Torvald/Terrarum/MapDrawer/LightmapLantern.class b/out/production/Terrarum_renewed/com/Torvald/Terrarum/MapDrawer/LightmapLantern.class
index 959fabf6a..3a6bee705 100644
Binary files a/out/production/Terrarum_renewed/com/Torvald/Terrarum/MapDrawer/LightmapLantern.class and b/out/production/Terrarum_renewed/com/Torvald/Terrarum/MapDrawer/LightmapLantern.class differ
diff --git a/out/production/Terrarum_renewed/com/Torvald/Terrarum/MapDrawer/LightmapRenderer.class b/out/production/Terrarum_renewed/com/Torvald/Terrarum/MapDrawer/LightmapRenderer.class
index 37d9e85c5..2269ec306 100644
Binary files a/out/production/Terrarum_renewed/com/Torvald/Terrarum/MapDrawer/LightmapRenderer.class and b/out/production/Terrarum_renewed/com/Torvald/Terrarum/MapDrawer/LightmapRenderer.class differ
diff --git a/out/production/Terrarum_renewed/com/Torvald/Terrarum/MapDrawer/MapCamera.class b/out/production/Terrarum_renewed/com/Torvald/Terrarum/MapDrawer/MapCamera.class
index 8b4524edd..db0dbeb29 100644
Binary files a/out/production/Terrarum_renewed/com/Torvald/Terrarum/MapDrawer/MapCamera.class and b/out/production/Terrarum_renewed/com/Torvald/Terrarum/MapDrawer/MapCamera.class differ
diff --git a/out/production/Terrarum_renewed/com/Torvald/Terrarum/MapGenerator/MapGenerator.class b/out/production/Terrarum_renewed/com/Torvald/Terrarum/MapGenerator/MapGenerator.class
index e9a743bc0..f1840a548 100644
Binary files a/out/production/Terrarum_renewed/com/Torvald/Terrarum/MapGenerator/MapGenerator.class and b/out/production/Terrarum_renewed/com/Torvald/Terrarum/MapGenerator/MapGenerator.class differ
diff --git a/out/production/Terrarum_renewed/com/Torvald/Terrarum/Terrarum.class b/out/production/Terrarum_renewed/com/Torvald/Terrarum/Terrarum.class
index 4af13fcbd..8b9822e93 100644
Binary files a/out/production/Terrarum_renewed/com/Torvald/Terrarum/Terrarum.class and b/out/production/Terrarum_renewed/com/Torvald/Terrarum/Terrarum.class differ
diff --git a/out/production/Terrarum_renewed/com/Torvald/Terrarum/TileProperties/TileProp.class b/out/production/Terrarum_renewed/com/Torvald/Terrarum/TileProperties/TileProp.class
index 790331e95..86882584b 100644
Binary files a/out/production/Terrarum_renewed/com/Torvald/Terrarum/TileProperties/TileProp.class and b/out/production/Terrarum_renewed/com/Torvald/Terrarum/TileProperties/TileProp.class differ
diff --git a/out/production/Terrarum_renewed/com/Torvald/Terrarum/TileProperties/TilePropCodex.class b/out/production/Terrarum_renewed/com/Torvald/Terrarum/TileProperties/TilePropCodex.class
index 9751c5278..6812d8d6e 100644
Binary files a/out/production/Terrarum_renewed/com/Torvald/Terrarum/TileProperties/TilePropCodex.class and b/out/production/Terrarum_renewed/com/Torvald/Terrarum/TileProperties/TilePropCodex.class differ
diff --git a/out/production/Terrarum_renewed/com/Torvald/Terrarum/TileProperties/propdata.csv b/out/production/Terrarum_renewed/com/Torvald/Terrarum/TileProperties/propdata.csv
index 3ff60be43..a9eeb757b 100644
--- a/out/production/Terrarum_renewed/com/Torvald/Terrarum/TileProperties/propdata.csv
+++ b/out/production/Terrarum_renewed/com/Torvald/Terrarum/TileProperties/propdata.csv
@@ -1,46 +1,46 @@
"id";"name" ;"opacity";"strength";"fluid";"viscosity";"solid";"wall";"lumcolor";"drop";"fall";"friction"
# Friction: 0: frictionless, <16: slippery, 16: regular, >16: sticky
- "0";"TILE_AIR" ; "4"; "0"; "0"; "N/A"; "0"; "0"; "0"; "0"; "0";"16"
- "1";"TILE_STONE" ; "32"; "25"; "0"; "N/A"; "1"; "1"; "0"; "1"; "0";"16"
- "2";"TILE_DIRT" ; "32"; "6"; "0"; "N/A"; "1"; "1"; "0"; "2"; "0";"16"
- "3";"TILE_GRASS" ; "32"; "6"; "0"; "N/A"; "1"; "1"; "0"; "2"; "0";"16"
- "4";"TILE_PLANK_NORMAL" ; "32"; "12"; "0"; "N/A"; "1"; "1"; "0"; "4"; "0";"16"
- "5";"TILE_PLANK_EBONY" ; "32"; "12"; "0"; "N/A"; "1"; "1"; "0"; "5"; "0";"16"
- "6";"TILE_PLANK_BIRCH" ; "32"; "12"; "0"; "N/A"; "1"; "1"; "0"; "6"; "0";"16"
- "7";"TILE_PLANK_BLOODROSE" ; "32"; "12"; "0"; "N/A"; "1"; "1"; "0"; "7"; "0";"16"
- "8";"TILE_TRUNK_NORMAL" ; "32"; "12"; "0"; "N/A"; "1"; "0"; "0"; "8"; "0";"16"
- "9";"TILE_TRUNK_EBONY" ; "32"; "12"; "0"; "N/A"; "1"; "0"; "0"; "9"; "0";"16"
- "10";"TILE_TRUNK_BIRCH" ; "32"; "12"; "0"; "N/A"; "1"; "0"; "0"; "10"; "0";"16"
- "11";"TILE_TRUNK_BLOODROSE" ; "32"; "12"; "0"; "N/A"; "1"; "0"; "0"; "11"; "0";"16"
- "12";"TILE_STONE" ; "32"; "25"; "0"; "N/A"; "1"; "1"; "0"; "12"; "0";"16"
- "13";"TILE_SAND" ; "32"; "6"; "0"; "N/A"; "1"; "1"; "0"; "13"; "1";"16"
- "14";"TILE_GRAVEL" ; "32"; "6"; "0"; "N/A"; "1"; "0"; "0"; "14"; "1";"16"
+ "0";"TILE_AIR" ; "1"; "0"; "0"; "N/A"; "0"; "0"; "0"; "0"; "0";"16"
+ "1";"TILE_STONE" ; "5"; "25"; "0"; "N/A"; "1"; "1"; "0"; "1"; "0";"16"
+ "2";"TILE_DIRT" ; "5"; "6"; "0"; "N/A"; "1"; "1"; "0"; "2"; "0";"16"
+ "3";"TILE_GRASS" ; "5"; "6"; "0"; "N/A"; "1"; "1"; "0"; "2"; "0";"16"
+ "4";"TILE_PLANK_NORMAL" ; "5"; "12"; "0"; "N/A"; "1"; "1"; "0"; "4"; "0";"16"
+ "5";"TILE_PLANK_EBONY" ; "5"; "12"; "0"; "N/A"; "1"; "1"; "0"; "5"; "0";"16"
+ "6";"TILE_PLANK_BIRCH" ; "5"; "12"; "0"; "N/A"; "1"; "1"; "0"; "6"; "0";"16"
+ "7";"TILE_PLANK_BLOODROSE" ; "5"; "12"; "0"; "N/A"; "1"; "1"; "0"; "7"; "0";"16"
+ "8";"TILE_TRUNK_NORMAL" ; "5"; "12"; "0"; "N/A"; "1"; "0"; "0"; "8"; "0";"16"
+ "9";"TILE_TRUNK_EBONY" ; "5"; "12"; "0"; "N/A"; "1"; "0"; "0"; "9"; "0";"16"
+ "10";"TILE_TRUNK_BIRCH" ; "5"; "12"; "0"; "N/A"; "1"; "0"; "0"; "10"; "0";"16"
+ "11";"TILE_TRUNK_BLOODROSE" ; "5"; "12"; "0"; "N/A"; "1"; "0"; "0"; "11"; "0";"16"
+ "12";"TILE_STONE" ; "5"; "25"; "0"; "N/A"; "1"; "1"; "0"; "12"; "0";"16"
+ "13";"TILE_SAND" ; "5"; "6"; "0"; "N/A"; "1"; "1"; "0"; "13"; "1";"16"
+ "14";"TILE_GRAVEL" ; "5"; "6"; "0"; "N/A"; "1"; "0"; "0"; "14"; "1";"16"
- "15";"TILE_ORE_MALACHITE" ; "32"; "25"; "0"; "N/A"; "1"; "0"; "0"; "15"; "0";"16"
- "16";"TILE_ORE_HEMATITE" ; "32"; "25"; "0"; "N/A"; "1"; "0"; "0"; "16"; "0";"16"
- "17";"TILE_ORE_NATURAL_GOLD" ; "32"; "25"; "0"; "N/A"; "1"; "0"; "0"; "17"; "0";"16"
- "18";"TILE_ORE_NATURAL_SILVER" ; "32"; "25"; "0"; "N/A"; "1"; "0"; "0"; "18"; "0";"16"
- "19";"TILE_ORE_RUTILE" ; "32"; "25"; "0"; "N/A"; "1"; "0"; "0"; "19"; "0";"16"
- "20";"TILE_ORE_AURICHALCUMITE" ; "32"; "25"; "0"; "N/A"; "1"; "0"; "0"; "20"; "0";"16"
- "21";"TILE_GEM_RUBY" ; "32"; "25"; "0"; "N/A"; "1"; "0"; "0"; "21"; "0";"16"
- "22";"TILE_GEM_EMERALD" ; "32"; "25"; "0"; "N/A"; "1"; "0"; "0"; "22"; "0";"16"
- "23";"TILE_GEM_SAPPHIRE" ; "32"; "25"; "0"; "N/A"; "1"; "0"; "0"; "23"; "0";"16"
- "24";"TILE_GEM_TOPAZ" ; "32"; "25"; "0"; "N/A"; "1"; "0"; "0"; "24"; "0";"16"
- "25";"TILE_GEM_DIAMOND" ; "32"; "25"; "0"; "N/A"; "1"; "0"; "0"; "25"; "0";"16"
- "26";"TILE_GEM_AMETHYST" ; "32"; "25"; "0"; "N/A"; "1"; "0"; "0"; "26"; "0";"16"
+ "15";"TILE_ORE_MALACHITE" ; "5"; "25"; "0"; "N/A"; "1"; "0"; "0"; "15"; "0";"16"
+ "16";"TILE_ORE_HEMATITE" ; "5"; "25"; "0"; "N/A"; "1"; "0"; "0"; "16"; "0";"16"
+ "17";"TILE_ORE_NATURAL_GOLD" ; "5"; "25"; "0"; "N/A"; "1"; "0"; "0"; "17"; "0";"16"
+ "18";"TILE_ORE_NATURAL_SILVER" ; "5"; "25"; "0"; "N/A"; "1"; "0"; "0"; "18"; "0";"16"
+ "19";"TILE_ORE_RUTILE" ; "5"; "25"; "0"; "N/A"; "1"; "0"; "0"; "19"; "0";"16"
+ "20";"TILE_ORE_AURICHALCUMITE" ; "5"; "25"; "0"; "N/A"; "1"; "0"; "0"; "20"; "0";"16"
+ "21";"TILE_GEM_RUBY" ; "5"; "25"; "0"; "N/A"; "1"; "0"; "0"; "21"; "0";"16"
+ "22";"TILE_GEM_EMERALD" ; "5"; "25"; "0"; "N/A"; "1"; "0"; "0"; "22"; "0";"16"
+ "23";"TILE_GEM_SAPPHIRE" ; "5"; "25"; "0"; "N/A"; "1"; "0"; "0"; "23"; "0";"16"
+ "24";"TILE_GEM_TOPAZ" ; "5"; "25"; "0"; "N/A"; "1"; "0"; "0"; "24"; "0";"16"
+ "25";"TILE_GEM_DIAMOND" ; "5"; "25"; "0"; "N/A"; "1"; "0"; "0"; "25"; "0";"16"
+ "26";"TILE_GEM_AMETHYST" ; "5"; "25"; "0"; "N/A"; "1"; "0"; "0"; "26"; "0";"16"
- "27";"TILE_SNOW" ; "32"; "6"; "0"; "N/A"; "1"; "1"; "0"; "27"; "0";"16"
- "28";"TILE_ICE_FRAGILE" ; "8"; "1"; "0"; "N/A"; "1"; "0"; "0"; "28"; "0";"16"
- "29";"TILE_ICE_NATURAL" ; "24"; "25"; "0"; "N/A"; "1"; "1"; "0"; "29"; "0"; "8"
- "30";"TILE_ICE_CLEAR_MAGICAL" ; "32"; "25"; "0"; "N/A"; "1"; "1"; "855567"; "30"; "0"; "8"
+ "27";"TILE_SNOW" ; "5"; "6"; "0"; "N/A"; "1"; "1"; "0"; "27"; "0";"16"
+ "28";"TILE_ICE_FRAGILE" ; "2"; "1"; "0"; "N/A"; "1"; "0"; "0"; "28"; "0";"16"
+ "29";"TILE_ICE_NATURAL" ; "4"; "25"; "0"; "N/A"; "1"; "1"; "0"; "29"; "0"; "8"
+ "30";"TILE_ICE_CLEAR_MAGICAL" ; "5"; "25"; "0"; "N/A"; "1"; "1"; "4967"; "30"; "0"; "8"
# see scandinavian name set female of this tile id!
- "31";"TILE_PLATFORM_STONE" ; "2"; "0"; "0"; "N/A"; "0"; "0"; "0"; "31"; "0";"16"
- "32";"TILE_PLATFORM_WOODEN" ; "2"; "0"; "0"; "N/A"; "0"; "0"; "0"; "32"; "0";"16"
- "33";"TILE_PLATFORM_EBONY" ; "2"; "0"; "0"; "N/A"; "0"; "0"; "0"; "33"; "0";"16"
- "34";"TILE_PLATFORM_BIRCH" ; "2"; "0"; "0"; "N/A"; "0"; "0"; "0"; "34"; "0";"16"
- "35";"TILE_PLATFORM_BLOODROSE" ; "2"; "0"; "0"; "N/A"; "0"; "0"; "0"; "35"; "0";"16"
+ "31";"TILE_PLATFORM_STONE" ; "0"; "0"; "0"; "N/A"; "0"; "0"; "0"; "31"; "0";"16"
+ "32";"TILE_PLATFORM_WOODEN" ; "0"; "0"; "0"; "N/A"; "0"; "0"; "0"; "32"; "0";"16"
+ "33";"TILE_PLATFORM_EBONY" ; "0"; "0"; "0"; "N/A"; "0"; "0"; "0"; "33"; "0";"16"
+ "34";"TILE_PLATFORM_BIRCH" ; "0"; "0"; "0"; "N/A"; "0"; "0"; "0"; "34"; "0";"16"
+ "35";"TILE_PLATFORM_BLOODROSE" ; "0"; "0"; "0"; "N/A"; "0"; "0"; "0"; "35"; "0";"16"
- "36";"TILE_TORCH" ; "0"; "0"; "0"; "N/A"; "0"; "0";"16769997"; "36"; "0";"16"
+ "36";"TILE_TORCH" ; "0"; "0"; "0"; "N/A"; "0"; "0";"63680"; "36"; "0";"16"
-"239";"TILE_WATER" ; "16"; "100"; "1"; "2"; "0"; "0";"15464447"; "239"; "0";"16"
-"255";"TILE_LAVA" ; "0"; "100"; "1"; "2"; "0"; "0"; "8397312"; "239"; "0";"16"
+"239";"TILE_WATER" ; "2"; "100"; "1"; "2"; "0"; "0";"59159"; "239"; "0";"16"
+"255";"TILE_LAVA" ; "0"; "100"; "1"; "2"; "0"; "0";"48320"; "239"; "0";"16"
diff --git a/out/production/Terrarum_renewed/com/Torvald/Terrarum/UserInterface/BasicDebugInfoWindow.class b/out/production/Terrarum_renewed/com/Torvald/Terrarum/UserInterface/BasicDebugInfoWindow.class
index 22d2674d2..568cdd36f 100644
Binary files a/out/production/Terrarum_renewed/com/Torvald/Terrarum/UserInterface/BasicDebugInfoWindow.class and b/out/production/Terrarum_renewed/com/Torvald/Terrarum/UserInterface/BasicDebugInfoWindow.class differ
diff --git a/out/production/Terrarum_renewed/com/Torvald/Terrarum/UserInterface/ConsoleWindow.class b/out/production/Terrarum_renewed/com/Torvald/Terrarum/UserInterface/ConsoleWindow.class
index fe805abeb..d65b2d128 100644
Binary files a/out/production/Terrarum_renewed/com/Torvald/Terrarum/UserInterface/ConsoleWindow.class and b/out/production/Terrarum_renewed/com/Torvald/Terrarum/UserInterface/ConsoleWindow.class differ
diff --git a/res/books/kana_test.txt b/res/books/kana_test.txt
index e7e3e5922..765566ddf 100644
--- a/res/books/kana_test.txt
+++ b/res/books/kana_test.txt
@@ -1,29 +1,29 @@
-せかい いち みんな の にんきもの
-それ は かのじょ の こと アシュリー
+せかい いち みんなの にんきもの
+それは かのじょの こと アシュリー
ひとめ みれば だれもが ふりむく
あたりまえ アシュリーだもん
-せかいじゅう みんな が あこがれる
-それは かのじょ の こと アシュリー
-アシュリー さま の まほう は さいこう
-こんや も パーティーよ
+せかいじゅう みんなが あこがれる
+それは かのじょの こと アシュリー
+アシュリー さまの まほうは さいこう
+こんやも パーティーよ
-なわ ぶな ぬー わらい の じゅもん
-じお いら うん なん の じゅもん
+なわ ぶな ぬー わらいの じゅもん
+じお いら うん なんの じゅもん
いお でぃ えむ おぼえ られない
-ああ いや たいくつ
+あぁ いや たいくつ
-せかいいち みんな の にんきもの
-それは かのじょ の こと アシュリー
-アシュリー さま の まほうは さいこう
+せかいいち みんなの にんきもの
+それは かのじょの こと アシュリー
+アシュリー さまの まほうは さいこう
こわい もの なしよ
-よぞら の うみ あまた の ほし
+よぞらの うみ あまたの ほし
いつも ひとりきり
-みんな と なかよく したい の
-どうしたら いい の
+みんなと なかよく したいの
+どうしたら いいの
-せかい いち みんな の にんきもの
-それは かのじょ の こと アシュリー
-アシュリー さま の まほうは さいこう
-こんや も パーティーよ
+せかい いち みんなの にんきもの
+それは かのじょの こと アシュリー
+アシュリー さまの まほうは さいこう
+こんやも パーティーよ
diff --git a/res/books/kana_test_2_kanji.txt b/res/books/kana_test_2_kanji.txt
new file mode 100644
index 000000000..eabc9a363
--- /dev/null
+++ b/res/books/kana_test_2_kanji.txt
@@ -0,0 +1,28 @@
+まだ気付いていない 提示された疑問
+いま境界線が消えてく
+
+このデータとコードで定義された思考
+もうひとつの「リアル」が生まれる
+
+千里を超え飛ぶ光の束から
+伝わる新しい自分の存在
+
+Neo Identity ー 広がって行く
+電網の意識と
+不可思議な未来
+
+(Neo Identity ー 幻)
+
+その認識により存在し得る世界
+すべてを消去したらどうなる?
+
+千里を超え飛ぶ光の束から
+伝わる新しい自分の存在
+
+Neo Identity ー 広がって行く
+電網の意識と
+不可思議な未来
+
+Neo Identity ー そびえ立つ幻
+電網の意識と
+不可思議な未来
\ No newline at end of file
diff --git a/res/books/kana_test_kanji.txt b/res/books/kana_test_kanji.txt
new file mode 100644
index 000000000..ea92ad6ef
--- /dev/null
+++ b/res/books/kana_test_kanji.txt
@@ -0,0 +1,29 @@
+世界一みんなの人気者
+それは彼女のこと アシュリー
+一目見れば誰もが振り向く
+当たり前アシュリーだもん
+
+世界中みんなが憧れる
+それは彼女のこと アシュリー
+アシュリー様の魔法は最高
+今夜もパーティよ
+
+なわ ぶな ぬー 笑いの呪文
+じお いら うん 何お呪文
+いお でぃ えむ 覚えられない
+あぁ いや 退屈
+
+世界一みんなの人気者
+それは彼女のこと アシュリー
+アシュリー様の魔法は最高
+怖いもの無しよ
+
+夜空の海 数多の星
+いつも一人きり
+みんなと仲良くしたいの
+どうしたらいいの
+
+世界一みんなの人気者
+それは彼女のこと アシュリー
+アシュリー様の魔法は最高
+今夜もパーティよ
diff --git a/res/books/kanji_test_3.txt b/res/books/kanji_test_3.txt
new file mode 100644
index 000000000..a372cb191
--- /dev/null
+++ b/res/books/kanji_test_3.txt
@@ -0,0 +1,2 @@
+貴社の記者が汽車で帰社しました。
+きしゃの きしゃが きしゃで きしゃ しました。
\ No newline at end of file
diff --git a/res/books/kanji_test_4.txt b/res/books/kanji_test_4.txt
new file mode 100644
index 000000000..6f0d58334
--- /dev/null
+++ b/res/books/kanji_test_4.txt
@@ -0,0 +1,24 @@
+探し物はなんですか
+見つけにくい物ですか
+カバンの中も机の中も
+探したけれど見つからないのに
+
+まだまだ探すぎですか
+それより僕と踊りませんか
+夢の中へ夢の中へ
+行ってみたいと思いませんか
+
+休むことも許されず
+笑うことわ止められて
+這いずくばって這いずくばって
+いったい何をさがしているのか
+
+探すのをやめたとき
+見つかることもよくある話で
+踊りましょう 夢の中へ
+行ってみたいと思いませんか
+
+探し物はなんですか
+まだまだ探すぎですか
+夢の中へ夢の中へ
+行ってみたいと思いませんか
diff --git a/res/graphics/fonts/unifont_unihan.png b/res/graphics/fonts/unifont_unihan.png
index aed4a2317..37abde055 100644
Binary files a/res/graphics/fonts/unifont_unihan.png and b/res/graphics/fonts/unifont_unihan.png differ
diff --git a/res/graphics/fonts/unifont_unihan_jp.png b/res/graphics/fonts/unifont_unihan_jp.png
new file mode 100644
index 000000000..c2f56ea62
Binary files /dev/null and b/res/graphics/fonts/unifont_unihan_jp.png differ
diff --git a/res/locales/fr.lang b/res/locales/fr.lang
index 2141f8ce9..f367a6c16 100644
--- a/res/locales/fr.lang
+++ b/res/locales/fr.lang
@@ -257,6 +257,6 @@ CREDITS_POLYGLOT=Traduit par le Polyglot Projet.
LANGUAGE_ENGLISH=Anglais
LANGUAGE_FRENCH=Français
-LANGUAGE_JAPANESE_KANA=Japonais
+LANGUAGE_JAPANESE=Japonais
LANGUAGE_JAPANESE_KANA=Japonais (kana)
LANGUAGE_KOREAN=Coréen
diff --git a/src/com/Torvald/ColourUtil/Col216.java b/src/com/Torvald/ColourUtil/Col216.java
index 80372328a..0b1a9a9b5 100644
--- a/src/com/Torvald/ColourUtil/Col216.java
+++ b/src/com/Torvald/ColourUtil/Col216.java
@@ -10,6 +10,11 @@ public class Col216 implements LimitedColours {
private byte data;
private static int[] LOOKUP = {0x00, 0x33, 0x66, 0x99, 0xCC, 0xFF};
+ public static final int MUL = 6;
+ public static final int MUL_2 = MUL * MUL;
+ public static final int MAX_STEP = MUL - 1;
+ public static final int COLOUR_DOMAIN_SIZE = MUL_2 * MUL;
+
/**
*
* @param data
@@ -31,9 +36,9 @@ public class Col216 implements LimitedColours {
@Override
public Color createSlickColor(int raw) {
assertRaw(raw);
- int r = LOOKUP[(raw / 36)];
- int g = LOOKUP[((raw % 36) / 6)];
- int b = LOOKUP[raw % 6];
+ int r = raw / MUL_2;
+ int g = (raw % MUL_2) / MUL;
+ int b = raw % MUL;
return createSlickColor(r, g, b);
}
@@ -53,20 +58,20 @@ public class Col216 implements LimitedColours {
@Override
public void create(int r, int g, int b) {
assertRGB(r, g, b);
- data = (byte) (36 * r + 6 * g + b);
+ data = (byte) (MUL_2 * r + MUL * g + b);
}
public byte getRaw() { return data; }
private void assertRaw(int i) {
- if (i > 0xFF || i < 0) {
+ if (i >= COLOUR_DOMAIN_SIZE || i < 0) {
System.out.println("i: " + String.valueOf(i));
throw new IllegalArgumentException();
}
}
private void assertRGB(int r, int g, int b) {
- if (r > 5 || g > 5 || b > 5 || r < 0 || g < 0 || b < 0) {
+ if (r > MAX_STEP || g > MAX_STEP || b > MAX_STEP || r < 0 || g < 0 || b < 0) {
System.out.println("r: " + String.valueOf(r));
System.out.println("g: " + String.valueOf(g));
System.out.println("b: " + String.valueOf(b));
diff --git a/src/com/Torvald/ColourUtil/Col40.java b/src/com/Torvald/ColourUtil/Col40.java
new file mode 100644
index 000000000..87dda503c
--- /dev/null
+++ b/src/com/Torvald/ColourUtil/Col40.java
@@ -0,0 +1,64 @@
+package com.Torvald.ColourUtil;
+
+import org.newdawn.slick.Color;
+
+/**
+ * Created by minjaesong on 16-02-20.
+ */
+public class Col40 implements LimitedColours {
+
+ private char data;
+ private static int[] LOOKUP = {0,7,13,20,26,33,39,46,52,59,65,72,78,85,92,98,105,111,118,124
+ ,131,137,144,150,157,163,170,177,183,190,196,203,209,216,222,229,235,242,248,255};
+
+ public static final int MUL = 40;
+ public static final int MUL_2 = MUL * MUL;
+ public static final int MAX_STEP = MUL - 1;
+ public static final int COLOUR_DOMAIN_SIZE = MUL_2 * MUL;
+
+ @Override
+ public Color createSlickColor(int raw) {
+ assertRaw(raw);
+ int r = raw / MUL_2;
+ int g = (raw % MUL_2) / MUL;
+ int b = raw % MUL;
+
+ return createSlickColor(r, g, b);
+ }
+
+ @Override
+ public Color createSlickColor(int r, int g, int b) {
+ assertRGB(r, g, b);
+ return new Color((LOOKUP[r] << 16) | (LOOKUP[g] << 8) | LOOKUP[b]);
+ }
+
+ @Override
+ public void create(int raw) {
+ assertRaw(raw);
+ data = (char) raw;
+ }
+
+ @Override
+ public void create(int r, int g, int b) {
+ assertRGB(r, g, b);
+ data = (char) (MUL_2 * r + MUL * g + b);
+ }
+
+ public char getRaw() { return data; }
+
+ private void assertRaw(int i) {
+ if (i >= COLOUR_DOMAIN_SIZE || i < 0) {
+ System.out.println("i: " + String.valueOf(i));
+ throw new IllegalArgumentException();
+ }
+ }
+
+ private void assertRGB(int r, int g, int b) {
+ if (r > MAX_STEP || g > MAX_STEP || b > MAX_STEP || r < 0 || g < 0 || b < 0) {
+ System.out.println("r: " + String.valueOf(r));
+ System.out.println("g: " + String.valueOf(g));
+ System.out.println("b: " + String.valueOf(b));
+ throw new IllegalArgumentException();
+ }
+ }
+}
diff --git a/src/com/Torvald/ImageFont/GameFontBase.java b/src/com/Torvald/ImageFont/GameFontBase.java
index be7ce7104..f0b86ca3a 100644
--- a/src/com/Torvald/ImageFont/GameFontBase.java
+++ b/src/com/Torvald/ImageFont/GameFontBase.java
@@ -26,7 +26,6 @@ public class GameFontBase implements Font {
static final int W_CJK = 10;
static final int W_UNIHAN = 16;
- static final int W_CJK_DRAW = 11;
static final int W_LATIN_WIDE = 9; // width of regular letters, including m
static final int W_LATIN_NARROW = 5; // width of letter f, t, i, l
static final int H = 20;
@@ -81,6 +80,8 @@ public class GameFontBase implements Font {
,'ᛂ','᛬','᛫','᛭','ᛮ','ᛯ','ᛰ'
};
+ static int interchar = 0;
+
public GameFontBase() throws SlickException {
@@ -201,24 +202,44 @@ public class GameFontBase implements Font {
@Override
public int getWidth(String s) {
- int len = 0;
- for (int i = 0; i < s.length(); i++) {
- char c = s.charAt(i);
+ return getWidthSubstr(s, s.length());
+ }
- switch (getSheetType(c)) {
- case SHEET_ASCII_EF:
- len += W_LATIN_NARROW; break;
- case SHEET_KANA: case SHEET_CJK_PUNCT:
- len += W_CJK_DRAW; break;
- case SHEET_HANGUL:
- len += W_CJK_DRAW;
- break;
- case SHEET_UNIHAN:
- len += W_UNIHAN; break;
- default:
- len += W_LATIN_WIDE;
+ private int getWidthSubstr(String s, int endIndex) {
+ int len = 0;
+ for (int i = 0; i < endIndex; i++) {
+ int c = getSheetType(s.charAt(i));
+
+ if (i > 0 && s.charAt(i) > 0x20) { // Kerning
+ int cpre = getSheetType(s.charAt(i - 1));
+ if (
+ ((cpre == SHEET_UNIHAN || cpre == SHEET_HANGUL)
+ && !(c == SHEET_UNIHAN || c == SHEET_HANGUL))
+
+ || ((c == SHEET_UNIHAN || c == SHEET_HANGUL)
+ && !(cpre == SHEET_UNIHAN || cpre == SHEET_HANGUL))
+ ) {
+ // margin after/before hangul/unihan
+ len += 2;
+ }
+ else if ((c == SHEET_HANGUL || c == SHEET_KANA)
+ && (cpre == SHEET_HANGUL || cpre == SHEET_KANA)) {
+ // margin between hangul/kana
+ len += 1;
+ }
}
+
+ if (c == SHEET_ASCII_EF || c == SHEET_EXTA_EF || c == SHEET_CYRILIC_EF)
+ len += W_LATIN_NARROW;
+ else if (c == SHEET_KANA || c == SHEET_HANGUL || c == SHEET_CJK_PUNCT)
+ len += W_CJK;
+ else if (c == SHEET_UNIHAN)
+ len += W_UNIHAN;
+ else
+ len += W_LATIN_WIDE;
+
+ if (i < endIndex - 1) len += interchar;
}
return len;
}
@@ -247,9 +268,10 @@ public class GameFontBase implements Font {
if (isHangul(ch)) {
int[] hanPos = getHan(ch - 0xAC00);
+ int glyphW = getWidth("" + ch);
hangulSheet.renderInUse(
Math.round(x
- + getWidth(s.substring(0, i))
+ + getWidthSubstr(s, i + 1) - glyphW
)
, Math.round((H - H_HANGUL) / 2 + y + 1)
, hanPos[0]
@@ -265,9 +287,10 @@ public class GameFontBase implements Font {
char ch = s.charAt(i);
if (isUniHan(ch)) {
+ int glyphW = getWidth("" + ch);
uniHan.renderInUse(
Math.round(x
- + getWidth(s.substring(0, i))
+ + getWidthSubstr(s, i + 1) - glyphW
)
, Math.round((H - H_HANGUL) / 2 + y)
, uniHanIndexX(ch)
@@ -334,10 +357,11 @@ public class GameFontBase implements Font {
}
try {
+ int glyphW = getWidth("" + ch);
sheetKey[prevInstance].renderInUse(
- Math.round(x + getWidth(s.substring(0, i)))
- // pull punct right next to hangul to the left
- + ((i > 0 && isHangul(s.charAt(i - 1))) ? -2 : 0)
+ Math.round(x + getWidthSubstr(s, i + 1) - glyphW)
+ // Interchar: pull punct right next to hangul to the left
+ + ((i > 0 && isHangul(s.charAt(i - 1))) ? -3 : 0)
, Math.round(y)
- ((prevInstance == SHEET_CJK_PUNCT) ? 1 : 0)
, sheetX
@@ -384,4 +408,15 @@ public class GameFontBase implements Font {
}
+ public void reloadUnihan() throws SlickException {
+
+ }
+
+ /**
+ * Set margin between characters
+ * @param margin
+ */
+ public void setInterchar(int margin) {
+ interchar = margin;
+ }
}
diff --git a/src/com/Torvald/ImageFont/GameFontWhite.java b/src/com/Torvald/ImageFont/GameFontWhite.java
index 98f22062e..937acad05 100644
--- a/src/com/Torvald/ImageFont/GameFontWhite.java
+++ b/src/com/Torvald/ImageFont/GameFontWhite.java
@@ -1,5 +1,6 @@
package com.Torvald.ImageFont;
+import com.Torvald.Terrarum.Terrarum;
import org.newdawn.slick.*;
/**
@@ -43,7 +44,10 @@ public class GameFontWhite extends GameFontBase {
, W_CJK, H_KANA
);
uniHan = new SpriteSheet(
- "./res/graphics/fonts/unifont_unihan.png"
+ "./res/graphics/fonts/unifont_unihan"
+ + (((Terrarum.gameLocale.contains("jp") || Terrarum.gameLocale.contains("ko")))
+ ? "_jp" : "")
+ +".png"
, W_UNIHAN, H_UNIHAN
);
cyrilic = new SpriteSheet(
@@ -71,4 +75,14 @@ public class GameFontWhite extends GameFontBase {
sheetKey = shk;
}
+ @Override
+ public void reloadUnihan() throws SlickException {
+ uniHan = new SpriteSheet(
+ "./res/graphics/fonts/unifont_unihan"
+ + ((!Terrarum.gameLocale.contains("cn"))
+ ? "_jp" : "")
+ +".png"
+ , W_UNIHAN, H_UNIHAN
+ );
+ }
}
diff --git a/src/com/Torvald/Terrarum/ABOUT b/src/com/Torvald/Terrarum/ABOUT
index daff1baa6..bdef43298 100644
--- a/src/com/Torvald/Terrarum/ABOUT
+++ b/src/com/Torvald/Terrarum/ABOUT
@@ -147,7 +147,7 @@ HEARTS, CLUBS, DIAMONDS, SPADES: PLAYERS WHO SUIT MUDS
- (Optional) SFX
* Size
- - Regular sprite 'height': 40 px
+ - Regular sprite 'height' (hitbox height) : 40 px
- Apparent height may vary
@@ -160,6 +160,4 @@ HEARTS, CLUBS, DIAMONDS, SPADES: PLAYERS WHO SUIT MUDS
* Colour: 4096 colours (12-bit 0x000 - 0xFFF)
-* Height variation option (.85 - .90 - .95 - 1 - 1.05 - 1.10 - 1.15)
-
* Base mass: 60 kg
diff --git a/src/com/Torvald/Terrarum/Actors/Landholder.java b/src/com/Torvald/Terrarum/Actors/Landholder.java
new file mode 100644
index 000000000..a76f694f1
--- /dev/null
+++ b/src/com/Torvald/Terrarum/Actors/Landholder.java
@@ -0,0 +1,16 @@
+package com.Torvald.Terrarum.Actors;
+
+import java.util.ArrayList;
+
+/**
+ * Created by minjaesong on 16-02-20.
+ */
+public interface Landholder {
+
+ ArrayList getHouseDesignation();
+ void setHouseDesignation(ArrayList list);
+ void addHouseTile(int x, int y);
+ void removeHouseTile(int x, int y);
+ void clearHouseDesignation();
+
+}
diff --git a/src/com/Torvald/Terrarum/Actors/Luminous.java b/src/com/Torvald/Terrarum/Actors/Luminous.java
index bcad0a50e..f0b1e7730 100644
--- a/src/com/Torvald/Terrarum/Actors/Luminous.java
+++ b/src/com/Torvald/Terrarum/Actors/Luminous.java
@@ -5,7 +5,7 @@ package com.Torvald.Terrarum.Actors;
*/
public interface Luminous {
- void setLuminance(int RGB);
- int getLuminance();
+ void setLuminance(char RGB);
+ char getLuminance();
}
diff --git a/src/com/Torvald/Terrarum/Actors/TestNPC.java b/src/com/Torvald/Terrarum/Actors/NPCIntelligentBase.java
similarity index 74%
rename from src/com/Torvald/Terrarum/Actors/TestNPC.java
rename to src/com/Torvald/Terrarum/Actors/NPCIntelligentBase.java
index 92cde8960..9b35bc87b 100644
--- a/src/com/Torvald/Terrarum/Actors/TestNPC.java
+++ b/src/com/Torvald/Terrarum/Actors/NPCIntelligentBase.java
@@ -2,15 +2,17 @@ package com.Torvald.Terrarum.Actors;
import com.Torvald.Terrarum.Actors.Faction.Faction;
import com.Torvald.Terrarum.GameItem.InventoryItem;
+import com.Torvald.Terrarum.Terrarum;
import org.newdawn.slick.GameContainer;
+import java.util.ArrayList;
import java.util.HashSet;
/**
* Created by minjaesong on 16-01-31.
*/
-public class TestNPC extends ActorWithBody implements AIControlled, Pocketed, CanBeStoredAsItem,
- Factionable {
+public class NPCIntelligentBase extends ActorWithBody implements AIControlled, Pocketed, CanBeStoredAsItem,
+ Factionable, Landholder {
private InventoryItem itemData;
// private ActorAI ai;
@@ -18,6 +20,8 @@ public class TestNPC extends ActorWithBody implements AIControlled, Pocketed, Ca
private HashSet factionSet = new HashSet<>();
+ private ArrayList houseTiles = new ArrayList<>();
+
@Override
public void attachAI() {
@@ -88,6 +92,31 @@ public class TestNPC extends ActorWithBody implements AIControlled, Pocketed, Ca
return super.getMass();
}
+ @Override
+ public ArrayList getHouseDesignation() {
+ return houseTiles;
+ }
+
+ @Override
+ public void setHouseDesignation(ArrayList list) {
+ houseTiles = list;
+ }
+
+ @Override
+ public void addHouseTile(int x, int y) {
+ houseTiles.add(Terrarum.game.map.width * y + x);
+ }
+
+ @Override
+ public void removeHouseTile(int x, int y) {
+ houseTiles.remove(new Integer(Terrarum.game.map.width * y + x));
+ }
+
+ @Override
+ public void clearHouseDesignation() {
+ houseTiles.clear();
+ }
+
@Override
public void stopUpdateAndDraw() {
super.setUpdate(false);
diff --git a/src/com/Torvald/Terrarum/Actors/Player.java b/src/com/Torvald/Terrarum/Actors/Player.java
index 74243e761..975b3971f 100644
--- a/src/com/Torvald/Terrarum/Actors/Player.java
+++ b/src/com/Torvald/Terrarum/Actors/Player.java
@@ -55,7 +55,7 @@ public class Player extends ActorWithBody implements Controllable, Pocketed, Fac
private final int TSIZE = MapDrawer.TILE_SIZE;
- private int LUMINANCE_RGB = 0xFFFFFF;
+ private char LUMINANCE_RGB = 63999;
private HashSet factionSet = new HashSet<>();
@@ -174,7 +174,7 @@ public class Player extends ActorWithBody implements Controllable, Pocketed, Fac
* |
* 0+------············ t
*
- * which is unrealistic, so this method tries to introduce some realism by:
+ * which is unrealistic, so this method tries to introduce some realism by doing:
*
* a
* | ------------
@@ -547,12 +547,12 @@ public class Player extends ActorWithBody implements Controllable, Pocketed, Fac
}
@Override
- public void setLuminance(int RGB) {
+ public void setLuminance(char RGB) {
LUMINANCE_RGB = RGB;
}
@Override
- public int getLuminance() {
+ public char getLuminance() {
return LUMINANCE_RGB;
}
}
diff --git a/src/com/Torvald/Terrarum/ConsoleCommand/Authenticator.java b/src/com/Torvald/Terrarum/ConsoleCommand/Authenticator.java
index d12c63bdc..2eeebdee0 100644
--- a/src/com/Torvald/Terrarum/ConsoleCommand/Authenticator.java
+++ b/src/com/Torvald/Terrarum/ConsoleCommand/Authenticator.java
@@ -3,38 +3,40 @@ package com.Torvald.Terrarum.ConsoleCommand;
import com.Torvald.Terrarum.Terrarum;
import com.Torvald.Terrarum.UserInterface.ConsoleWindow;
import org.apache.commons.codec.digest.DigestUtils;
-import org.newdawn.slick.SlickException;
/**
* Created by minjaesong on 16-02-19.
*/
public class Authenticator implements ConsoleCommand {
- private static final String A = "0d34076fc15db1b7c7a0943045699eba6f186ec1"; // alpine
- // or 'srisrimahasri'
-
- private static boolean B = false;
+ private static boolean a = false;
@Override
public void execute(String[] args) {
if (args.length == 2) {
String pwd = args[1];
- String hashedPwd = DigestUtils.sha1Hex(pwd);
+ String hashedPwd = DigestUtils.sha256Hex(pwd);
- if (A.equalsIgnoreCase(hashedPwd)) {
- new Echo().execute(((B) ? "Dis" : "") + "authenticated.");
- B = !B;
+ if ("54c5b3dd459d5ef778bb2fa1e23a5fb0e1b62ae66970bcb436e8f81a1a1a8e41".equalsIgnoreCase(hashedPwd)) {
+ // alpine
+ String msg = (a) ? "Locked" : "Authenticated";
+ new Echo().execute(msg);
+ System.out.println("[Authenticator] " + msg);
+ a = !a;
((ConsoleWindow) (Terrarum.game.consoleHandler.getUI())).reset();
}
+ else {
+ printUsage(); // thou shalt not pass!
+ }
}
else {
printUsage();
}
}
- public boolean C() {
- return B;
+ public boolean b() {
+ return a;
}
@Override
diff --git a/src/com/Torvald/Terrarum/ConsoleCommand/CommandInterpreter.java b/src/com/Torvald/Terrarum/ConsoleCommand/CommandInterpreter.java
index 4863c403b..a2ba8d1c8 100644
--- a/src/com/Torvald/Terrarum/ConsoleCommand/CommandInterpreter.java
+++ b/src/com/Torvald/Terrarum/ConsoleCommand/CommandInterpreter.java
@@ -28,7 +28,7 @@ public class CommandInterpreter {
new Zoom().execute(single_command.toStringArray());
}
else {
- if (Terrarum.game.auth.C()) {
+ if (Terrarum.game.auth.b()) {
ConsoleCommand commandObj = CommandDict.getCommand(
single_command.getName().toLowerCase());
commandObj.execute(single_command.toStringArray());
diff --git a/src/com/Torvald/Terrarum/ConsoleCommand/SetGlobalLightLevel.java b/src/com/Torvald/Terrarum/ConsoleCommand/SetGlobalLightLevel.java
index c7d3d02df..8295b268d 100644
--- a/src/com/Torvald/Terrarum/ConsoleCommand/SetGlobalLightLevel.java
+++ b/src/com/Torvald/Terrarum/ConsoleCommand/SetGlobalLightLevel.java
@@ -1,5 +1,6 @@
package com.Torvald.Terrarum.ConsoleCommand;
+import com.Torvald.Terrarum.MapDrawer.LightmapRenderer;
import com.Torvald.Terrarum.Terrarum;
/**
@@ -13,13 +14,32 @@ public class SetGlobalLightLevel implements ConsoleCommand {
int r = new Integer(args[1]);
int g = new Integer(args[2]);
int b = new Integer(args[3]);
- int GL = (r << 16) | (g << 8) | b;
+ char GL = LightmapRenderer.constructRGBFromInt(r, g, b);
Terrarum.game.map.setGlobalLight(GL);
}
catch (NumberFormatException e) {
new Echo().execute("Wrong number input.");
}
+ catch (IllegalArgumentException e1) {
+ new Echo().execute("Range: 0-" + LightmapRenderer.CHANNEL_MAX + " per channel");
+ }
+ }
+ else if (args.length == 2) {
+ try {
+ char GL = (char) (new Integer(args[1]).intValue());
+
+ if (GL < 0 || GL >= LightmapRenderer.COLOUR_DOMAIN_SIZE) {
+ new Echo().execute("Range: 0-" + (LightmapRenderer.COLOUR_DOMAIN_SIZE - 1));
+ }
+ else {
+ Terrarum.game.map.setGlobalLight(GL);
+ }
+ }
+ catch (NumberFormatException e) {
+ new Echo().execute("Wrong number input.");
+ }
+
}
else{
printUsage();
@@ -28,6 +48,6 @@ public class SetGlobalLightLevel implements ConsoleCommand {
@Override
public void printUsage() {
- new Echo().execute("Usage: setgl r g b");
+ new Echo().execute("Usage: setgl [raw_value|r g b]");
}
}
diff --git a/src/com/Torvald/Terrarum/ConsoleCommand/SetLocale.java b/src/com/Torvald/Terrarum/ConsoleCommand/SetLocale.java
index bd14f5a78..561ac695d 100644
--- a/src/com/Torvald/Terrarum/ConsoleCommand/SetLocale.java
+++ b/src/com/Torvald/Terrarum/ConsoleCommand/SetLocale.java
@@ -1,7 +1,9 @@
package com.Torvald.Terrarum.ConsoleCommand;
+import com.Torvald.ImageFont.GameFontBase;
import com.Torvald.Terrarum.LangPack.Lang;
import com.Torvald.Terrarum.Terrarum;
+import org.newdawn.slick.SlickException;
import java.io.IOException;
@@ -17,6 +19,12 @@ public class SetLocale implements ConsoleCommand {
try {
new Lang();
new Echo().execute("Set locale to '" + Terrarum.gameLocale + "'.");
+
+ if ((!prevLocale.contains("cn") && Terrarum.gameLocale.contains("cn"))
+ || (prevLocale.contains("cn") && !Terrarum.gameLocale.contains("cn"))) {
+ try { ((GameFontBase) Terrarum.gameFontWhite).reloadUnihan(); }
+ catch (SlickException e) { e.printStackTrace(); }
+ }
}
catch (IOException e) {
new Echo().execute("Locale '"
diff --git a/src/com/Torvald/Terrarum/GameControl/GameController.java b/src/com/Torvald/Terrarum/GameControl/GameController.java
index 479121b41..53283ac0d 100644
--- a/src/com/Torvald/Terrarum/GameControl/GameController.java
+++ b/src/com/Torvald/Terrarum/GameControl/GameController.java
@@ -2,6 +2,8 @@ package com.Torvald.Terrarum.GameControl;
import com.Torvald.Terrarum.Actors.Controllable;
import com.Torvald.Terrarum.Actors.Player;
+import com.Torvald.Terrarum.MapDrawer.MapCamera;
+import com.Torvald.Terrarum.MapDrawer.MapDrawer;
import com.Torvald.Terrarum.Terrarum;
import com.Torvald.Terrarum.UserInterface.UIHandler;
import org.newdawn.slick.Input;
@@ -75,7 +77,16 @@ public class GameController {
}
public static void mousePressed(int button, int x, int y) {
+ int mouseTileX = (int) ((MapCamera.getCameraX() + x / Terrarum.game.screenZoom)
+ / MapDrawer.TILE_SIZE);
+ int mouseTileY = (int) ((MapCamera.getCameraY() + y / Terrarum.game.screenZoom)
+ / MapDrawer.TILE_SIZE);
+ try {
+ Terrarum.game.map.setTileTerrain(mouseTileX, mouseTileY, (byte) 0);
+ Terrarum.game.map.setTileWall(mouseTileX, mouseTileY, (byte) 0);
+ }
+ catch (ArrayIndexOutOfBoundsException e) {}
}
public static void mouseReleased(int button, int x, int y) {
diff --git a/src/com/Torvald/Terrarum/GameMap/GameMap.java b/src/com/Torvald/Terrarum/GameMap/GameMap.java
index 908c7d843..b36f14b57 100644
--- a/src/com/Torvald/Terrarum/GameMap/GameMap.java
+++ b/src/com/Torvald/Terrarum/GameMap/GameMap.java
@@ -31,8 +31,6 @@ public class GameMap {
public int spawnX;
public int spawnY;
- private LinkedList houseDesignation;
-
public static final int WALL = 0;
public static final int TERRAIN = 1;
public static final int WIRE = 2;
@@ -40,7 +38,7 @@ public class GameMap {
//public World physWorld = new World( new Vec2(0, -TerrarumMain.game.gravitationalAccel) );
//physics
private float gravitation;
- private int globalLight;
+ private char globalLight;
private WorldTime worldTime;
/**
@@ -59,7 +57,7 @@ public class GameMap {
layerWire = new MapLayer(width, height);
terrainDamageCode = new PairedMapLayer(width, height);
- globalLight = 0xFFFFFF;
+ globalLight = (char) 63999;
worldTime = new WorldTime();
}
@@ -140,6 +138,18 @@ public class GameMap {
return terrainDamageCode.getData(x, y);
}
+ public void setTileWall(int x, int y, byte tile) {
+ layerWall.data[y][x] = tile;
+ }
+
+ public void setTileTerrain(int x, int y, byte tile) {
+ layerTerrain.data[y][x] = tile;
+ }
+
+ public void setTileWire(int x, int y, byte tile) {
+ layerWire.data[y][x] = tile;
+ }
+
public int getTileFrom(int mode, int x, int y) {
if (mode == TERRAIN) { return getTileFromTerrain(x, y); }
else if (mode == WALL) { return getTileFromWall(x, y); }
@@ -161,11 +171,11 @@ public class GameMap {
return gravitation;
}
- public int getGlobalLight() {
+ public char getGlobalLight() {
return globalLight;
}
- public void setGlobalLight(int globalLight) {
+ public void setGlobalLight(char globalLight) {
this.globalLight = globalLight;
}
diff --git a/src/com/Torvald/Terrarum/MISC_FEATURES b/src/com/Torvald/Terrarum/MISC_FEATURES
index 6ce71a3d1..67fd5594b 100644
--- a/src/com/Torvald/Terrarum/MISC_FEATURES
+++ b/src/com/Torvald/Terrarum/MISC_FEATURES
@@ -1,4 +1,4 @@
* Drawing
- Players can create their own décors (hang on wall), dresses.
-- Two looms (3-3-2 colour mode, 4096 colour mode)
\ No newline at end of file
+- Two looms (216 colour mode, 4096 colour mode)
\ No newline at end of file
diff --git a/src/com/Torvald/Terrarum/MapDrawer/LightmapRenderer.java b/src/com/Torvald/Terrarum/MapDrawer/LightmapRenderer.java
index 0834453de..83c1b5b90 100644
--- a/src/com/Torvald/Terrarum/MapDrawer/LightmapRenderer.java
+++ b/src/com/Torvald/Terrarum/MapDrawer/LightmapRenderer.java
@@ -1,5 +1,6 @@
package com.Torvald.Terrarum.MapDrawer;
+import com.Torvald.ColourUtil.Col40;
import com.Torvald.Terrarum.Terrarum;
import com.Torvald.Terrarum.TileProperties.TilePropCodex;
import com.jme3.math.FastMath;
@@ -17,7 +18,7 @@ public class LightmapRenderer {
/**
* 8-Bit RGB values
*/
- private static volatile int[][] staticLightMap;
+ private static volatile char[][] staticLightMap;
private static boolean lightMapInitialised = false;
/**
@@ -26,6 +27,7 @@ public class LightmapRenderer {
private static ArrayList lanterns = new ArrayList<>();
private static final int AIR = 0;
+ private static final int SUNSTONE = 41; // TODO add sunstone: emits same light as Map.GL. Goes dark at night
private static final int OFFSET_R = 2;
@@ -34,18 +36,18 @@ public class LightmapRenderer {
private static final int TSIZE = MapDrawer.TILE_SIZE;
- /**
- * Stores current light map as image.
- * WILL BE PURGED in every single round of light calculation.
- */
- //private static Graphics lightMapGraphicsInstance;
-
+ // color model related vars
+ public static final int MUL = Col40.MUL;
+ public static final int MUL_2 = Col40.MUL_2;
+ public static final int CHANNEL_MAX = Col40.MAX_STEP;
+ public static final float CHANNEL_MAX_FLOAT = (float) CHANNEL_MAX;
+ public static final int COLOUR_DOMAIN_SIZE = Col40.COLOUR_DOMAIN_SIZE;
public LightmapRenderer() {
}
- public static void addLantern(int x, int y, int intensity) {
+ public static void addLantern(int x, int y, char intensity) {
LightmapLantern thisLantern = new LightmapLantern(x, y, intensity);
for (int i = lanterns.size() - 1; i >= 0; i--) {
@@ -53,7 +55,7 @@ public class LightmapRenderer {
// found duplicates
if (lanternInList.getX() == x && lanternInList.getY() == y) {
// add colour
- int addedL = addRaw(intensity, lanternInList.getIntensity());
+ char addedL = addRaw(intensity, lanternInList.getIntensity());
lanternInList.intensity = addedL;
return;
}
@@ -73,7 +75,7 @@ public class LightmapRenderer {
public static void renderLightMap() {
if (staticLightMap == null) {
- staticLightMap = new int[Terrarum.game.map.height][Terrarum.game.map.width];
+ staticLightMap = new char[Terrarum.game.map.height][Terrarum.game.map.width];
if (lightMapInitialised) {
throw new RuntimeException("Attempting to re-initialise 'staticLightMap'");
@@ -145,7 +147,7 @@ public class LightmapRenderer {
for (int x = for_x_start; x < for_x_end; x++) {
// smooth
if (Terrarum.game.screenZoom >= 1 && ((boolean) Terrarum.game.gameConfig.get("smoothlighting"))) {
- int thisLightLevel = staticLightMap[y][x];
+ char thisLightLevel = staticLightMap[y][x];
if (y > 0 && x < for_x_end && thisLightLevel == 0 && staticLightMap[y - 1][x] == 0) {
// coalesce zero intensity blocks to one
int zeroLevelCounter = 1;
@@ -175,23 +177,25 @@ public class LightmapRenderer {
* +-+-+
* d
*/
- int a = (y == 0) ? thisLightLevel
+ char a = (y == 0) ? thisLightLevel
: (y == Terrarum.game.map.height - 1) ? thisLightLevel
- : Math.max(staticLightMap[y][x]
+ : max(staticLightMap[y][x]
, staticLightMap[y - 1][x]);
- int d = (y == 0) ? thisLightLevel
+ char d = (y == 0) ? thisLightLevel
: (y == Terrarum.game.map.height - 1) ? thisLightLevel
- : Math.max(staticLightMap[y][x]
+ : max(staticLightMap[y][x]
, staticLightMap[y + 1][x]);
- int b = (x == 0) ? thisLightLevel
+ char b = (x == 0) ? thisLightLevel
: (x == Terrarum.game.map.width - 1) ? thisLightLevel
- : Math.max(staticLightMap[y][x]
+ : max(staticLightMap[y][x]
, staticLightMap[y][x - 1]);
- int c = (x == 0) ? thisLightLevel
+ char c = (x == 0) ? thisLightLevel
: (x == Terrarum.game.map.width - 1) ? thisLightLevel
- : Math.max(staticLightMap[y][x]
+ : max(staticLightMap[y][x]
, staticLightMap[y][x + 1]);
- int[] colourMapItoL = new int[4];
+ char t = staticLightMap[y][x];
+
+ char[] colourMapItoL = new char[4];
colourMapItoL[0] = colourLinearMix(a, b);
colourMapItoL[1] = colourLinearMix(a, c);
colourMapItoL[2] = colourLinearMix(b, d);
@@ -199,7 +203,7 @@ public class LightmapRenderer {
for (int iy = 0; iy < 2; iy++) {
for (int ix = 0; ix < 2; ix++) {
- g.setColor(new Color(colourMapItoL[iy * 2 + ix]));
+ g.setColor(toTargetColour(colourMapItoL[iy * 2 + ix]));
g.fillRect(
Math.round(x * TSIZE * Terrarum.game.screenZoom) + (ix * TSIZE / 2 * Terrarum.game.screenZoom)
@@ -223,7 +227,7 @@ public class LightmapRenderer {
if (x + sameLevelCounter >= for_x_end) break;
}
- g.setColor(new Color(staticLightMap[y][x]));
+ g.setColor(toTargetColour(staticLightMap[y][x]));
g.fillRect(
Math.round(x * TSIZE * Terrarum.game.screenZoom)
, Math.round(y * TSIZE * Terrarum.game.screenZoom)
@@ -237,13 +241,17 @@ public class LightmapRenderer {
}
}
- private static int calculate(int x, int y){
+ private static Color toTargetColour(char raw) {
+ return new Col40().createSlickColor(raw);
+ }
+
+ private static char calculate(int x, int y){
if (!outOfBounds(x, y)){
float lightColorR = 1f;
float lightColorG = 1f;
float lightColorB = 1f;
- int lightColorInt;
+ char lightColorInt;
int thisTerrain = Terrarum.game.map.getTileFromTerrain(x, y);
int thisWall = Terrarum.game.map.getTileFromWall(x, y);
@@ -255,7 +263,7 @@ public class LightmapRenderer {
else {
// mix light emitter
if (TilePropCodex.getProp(thisTerrain).getLuminosity() != 0) {
- int lum = TilePropCodex.getProp(thisTerrain).getLuminosity();
+ char lum = TilePropCodex.getProp(thisTerrain).getLuminosity();
lightColorR = getR(lum);
lightColorG = getG(lum);
lightColorB = getB(lum);
@@ -264,7 +272,7 @@ public class LightmapRenderer {
// mix lantern
for (LightmapLantern lantern : lanterns) {
if (lantern.getX() == x && lantern.getY() == y) {
- int lum = lantern.getIntensity();
+ char lum = lantern.getIntensity();
lightColorR = getR(lum);
lightColorG = getG(lum);
lightColorB = getB(lum);
@@ -277,7 +285,7 @@ public class LightmapRenderer {
int tileX = Math.round(Terrarum.game.getPlayer().getHitbox().getPointedX() / TSIZE);
int tileY = Math.round(Terrarum.game.getPlayer().getHitbox().getPointedY() / TSIZE)
- 1;
- int lum = Terrarum.game.getPlayer().getLuminance();
+ char lum = Terrarum.game.getPlayer().getLuminance();
if (x == tileX && y == tileY) {
lightColorR = getR(lum);
lightColorG = getG(lum);
@@ -286,49 +294,56 @@ public class LightmapRenderer {
float[] bgrVal = new float[3]; // {B, G, R}
- // test for each R, G, B channel
+ // test for each B, G, R channel
for (int i = 0; i < 3; i++) {
int brightest = 0;
//get brightest of nearby 4 tiles
- int nearby = 0;
+ int nearby = 0b0;
findNearbyBrightest:
for (int yoff = -1; yoff <= 1; yoff++) {
for (int xoff = -1; xoff <= 1; xoff++) {
/**
* filter for 'v's as:
* +-+-+-+
- * | |v| |
+ * |a|v|a|
* +-+-+-+
* |v| |v|
* +-+-+-+
- * | |v| |
+ * |a|v|a|
* +-+-+-+
*/
- if (xoff != yoff && -xoff != yoff) {
- if (!outOfMapBounds(x + xoff, y + yoff)) {
- nearby = getRaw(staticLightMap[y + yoff][x + xoff], i);
- }
-
- if (nearby > brightest) {
- brightest = nearby;
- }
-
- if (brightest == 0xFF) break findNearbyBrightest;
+ if (xoff != yoff && -xoff != yoff) { // 'v' tiles
+ if (!outOfMapBounds(x + xoff, y + yoff)) {
+ nearby = getRaw(staticLightMap[y + yoff][x + xoff], i);
+ }
}
+ else if (xoff != 0 && yoff != 0) { // 'a' tiles
+ if (!outOfMapBounds(x + xoff, y + yoff)) {
+ nearby = darken((char) getRaw(staticLightMap[y + yoff][x + xoff], i)
+ , 0x3); //mix some to have more 'spreading'
+ // so that light spreads in a shape of an octagon instead of a diamond
+ }
+ }
+
+ if (nearby > brightest) {
+ brightest = nearby;
+ }
+
+ if (brightest == CHANNEL_MAX) break findNearbyBrightest;
}
}
//return: brightest - opacity
bgrVal[i] = darkenFloat(
- brightest
+ (char) (brightest)
, TilePropCodex.getProp(thisTerrain).getOpacity()
);
}
// construct lightColor from bgrVal
lightColorInt = constructRGBFromFloat(
- bgrVal[OFFSET_R] * lightColorR
+ bgrVal[OFFSET_R] * lightColorR
, bgrVal[OFFSET_G] * lightColorG
, bgrVal[OFFSET_B] * lightColorB
);
@@ -344,36 +359,41 @@ public class LightmapRenderer {
/**
*
- * @param data Raw channel value [0-255]
- * @param darken [0-255]
- * @return darkened data [0-1]
+ * @param data Raw channel value [0-39] per channel
+ * @param darken [0-39] per channel
+ * @return darkened data [0-9] per channel (darken-int divided by 39)
*/
- private static float darkenFloat(int data, int darken) {
- return (darken(data, darken) / 255f);
+ private static float darkenFloat(char data, int darken) {
+ return (darken(data, darken) / CHANNEL_MAX_FLOAT);
}
/**
*
- * @param data Raw channel value [0-255]
- * @param darken [0-255]
- * @return darkened data [0-255]
+ * @param data Raw channel value [0-39] per channel
+ * @param darken [0-39] per channel
+ * @return darkened data [0-39] per channel
*/
- private static int darken(int data, int darken) {
- if (darken < 0 || darken > 0xFF) { throw new IllegalArgumentException("darken: out of range"); }
+ private static char darken(char data, int darken) {
+ if (darken < 0 || darken > CHANNEL_MAX) { throw new IllegalArgumentException("darken: out of " +
+ "range"); }
- return clampZero(data - darken);
+ int r = clampZero(getRawR(data) - darken);
+ int g = clampZero(getRawG(data) - darken);
+ int b = clampZero(getRawB(data) - darken);
+
+ return constructRGBFromInt(r, g, b);
}
- private static int getRawR(int RGB) {
- return (RGB >> 16) & 0xFF;
+ public static int getRawR(char RGB) {
+ return RGB / MUL_2;
}
- private static int getRawG(int RGB) {
- return (RGB >> 8) & 0xFF;
+ public static int getRawG(char RGB) {
+ return (RGB % MUL_2) / MUL;
}
- private static int getRawB(int RGB) {
- return RGB & 0xFF;
+ public static int getRawB(char RGB) {
+ return RGB % MUL;
}
/**
@@ -382,24 +402,26 @@ public class LightmapRenderer {
* @param offset 2 = R, 1 = G, 0 = B
* @return
*/
- private static int getRaw(int RGB, int offset) {
- if (offset < 0 || offset > 2) throw new IllegalArgumentException("Offset out of range");
- return (RGB >> (8 * offset)) & 0xFF;
+ public static int getRaw(char RGB, int offset) {
+ if (offset == OFFSET_R) return getRawR(RGB);
+ if (offset == OFFSET_G) return getRawG(RGB);
+ if (offset == OFFSET_B) return getRawB(RGB);
+ else throw new IllegalArgumentException("Channel offset out of range");
}
- private static float getR(int rgb) {
- return getRawR(rgb) / 255f;
+ private static float getR(char rgb) {
+ return getRawR(rgb) / CHANNEL_MAX_FLOAT;
}
- private static float getG(int rgb) {
- return getRawG(rgb) / 255f;
+ private static float getG(char rgb) {
+ return getRawG(rgb) / CHANNEL_MAX_FLOAT;
}
- private static float getB(int rgb) {
- return getRawB(rgb) / 255f;
+ private static float getB(char rgb) {
+ return getRawB(rgb) / CHANNEL_MAX_FLOAT;
}
- private static int addRaw(int rgb1, int rgb2) {
+ private static char addRaw(char rgb1, char rgb2) {
int newR = clampByte(getRawR(rgb1) + getRawB(rgb2));
int newG = clampByte(getRawG(rgb1) + getRawG(rgb2));
int newB = clampByte(getRawB(rgb1) + getRawB(rgb2));
@@ -407,51 +429,32 @@ public class LightmapRenderer {
return constructRGBFromInt(newR, newG, newB);
}
- private static int constructRGBFromInt(int r, int g, int b) {
- if (r < 0 || r > 0xFF) { throw new IllegalArgumentException("Red: out of range"); }
- if (g < 0 || g > 0xFF) { throw new IllegalArgumentException("Green: out of range"); }
- if (b < 0 || b > 0xFF) { throw new IllegalArgumentException("Blue: out of range"); }
- return (r << 16) | (g << 8) | b;
+ public static char constructRGBFromInt(int r, int g, int b) {
+ if (r < 0 || r > CHANNEL_MAX) { throw new IllegalArgumentException("Red: out of range"); }
+ if (g < 0 || g > CHANNEL_MAX) { throw new IllegalArgumentException("Green: out of range"); }
+ if (b < 0 || b > CHANNEL_MAX) { throw new IllegalArgumentException("Blue: out of range"); }
+ return (char) (r * MUL_2 + g * MUL + b);
}
- private static int constructRGBFromFloat(float r, float g, float b) {
+ private static char constructRGBFromFloat(float r, float g, float b) {
if (r < 0 || r > 1.0f) { throw new IllegalArgumentException("Red: out of range"); }
if (g < 0 || g > 1.0f) { throw new IllegalArgumentException("Green: out of range"); }
if (b < 0 || b > 1.0f) { throw new IllegalArgumentException("Blue: out of range"); }
- int intR = Math.round(r * 0xFF);
- int intG = Math.round(g * 0xFF);
- int intB = Math.round(b * 0xFF);
+ int intR = Math.round(r * CHANNEL_MAX);
+ int intG = Math.round(g * CHANNEL_MAX);
+ int intB = Math.round(b * CHANNEL_MAX);
return constructRGBFromInt(intR, intG, intB);
}
- private static int colourLinearMix(int colA, int colB) {
+ private static char colourLinearMix(char colA, char colB) {
int r = (getRawR(colA) + getRawR(colB)) >> 1;
int g = (getRawG(colA) + getRawG(colB)) >> 1;
int b = (getRawB(colA) + getRawB(colB)) >> 1;
return constructRGBFromInt(r, g, b);
}
- /**
- *
- * @param thisTile
- * @param side1
- * @param side2
- * @param corner
- * @return
- */
- private static int colourQuadraticMix(int thisTile, int side1, int side2, int corner) {
- int rSide = max(getRawR(side1), getRawR(side2), getRawR(corner) / 2);
- int r = arithmeticAverage(rSide, getRawR(thisTile));
- int gSide = max(getRawG(side1), getRawG(side2), getRawG(corner) / 2);
- int g = arithmeticAverage(gSide, getRawG(thisTile));
- int bSide = max(getRawG(side1), getRawG(side2), getRawG(corner) / 2);
- int b = arithmeticAverage(bSide, getRawG(thisTile));
-
- return constructRGBFromInt(r, g, b);
- }
-
private static int quantise16(int x) {
if (x < 0) throw new IllegalArgumentException("positive integer only.");
return (x & 0xFFFF_FFF0);
@@ -467,12 +470,12 @@ public class LightmapRenderer {
return (x << 4);
}
- private static int max(int... i) {
+ private static char max(char... i) {
Arrays.sort(i);
return i[i.length - 1];
}
- private static int min(int... i) {
+ private static char min(char... i) {
Arrays.sort(i);
return i[0];
}
@@ -494,14 +497,14 @@ public class LightmapRenderer {
}
private static int clampByte(int i) {
- return (i < 0) ? 0 : (i > 0xFF) ? 0xFF : i;
+ return (i < 0) ? 0 : (i > CHANNEL_MAX) ? CHANNEL_MAX : i;
}
- public static int[][] getStaticLightMap() {
+ public static char[][] getStaticLightMap() {
return staticLightMap;
}
- public static int getValueFromMap(int x, int y) {
+ public static char getValueFromMap(int x, int y) {
return staticLightMap[y][x];
}
@@ -550,9 +553,9 @@ public class LightmapRenderer {
class LightmapLantern {
int x, y;
- int intensity;
+ char intensity;
- public LightmapLantern(int x, int y, int intensity) {
+ public LightmapLantern(int x, int y, char intensity) {
this.x = x;
this.y = y;
this.intensity = intensity;
@@ -566,7 +569,7 @@ class LightmapLantern {
return y;
}
- public int getIntensity() {
+ public char getIntensity() {
return intensity;
}
}
diff --git a/src/com/Torvald/Terrarum/MapGenerator/MapGenerator.java b/src/com/Torvald/Terrarum/MapGenerator/MapGenerator.java
index a61648e48..63957ac21 100644
--- a/src/com/Torvald/Terrarum/MapGenerator/MapGenerator.java
+++ b/src/com/Torvald/Terrarum/MapGenerator/MapGenerator.java
@@ -892,11 +892,11 @@ public class MapGenerator {
int thisTile = map.getTileFromTerrain(x, y);
for (int i = 0; i < 9; i++) {
- int nearbyTile = -1;
- try { nearbyTile = map.getTileFromTerrain(x + (i / 3) - 1, y + (i % 3) - 1); }
+ int nearbyWallTile = -1;
+ try { nearbyWallTile = map.getTileFromWall(x + (i % 3) - 1, y + (i / 3) - 1); }
catch (ArrayIndexOutOfBoundsException e) {}
- if (i != 4 && thisTile == DIRT && nearbyTile == AIR) {
+ if (i != 4 && thisTile == DIRT && nearbyWallTile == AIR) {
map.getTerrainArray()[y][x] = GRASS;
break;
}
diff --git a/src/com/Torvald/Terrarum/Terrarum.java b/src/com/Torvald/Terrarum/Terrarum.java
index 9e6dfd034..0436ec396 100644
--- a/src/com/Torvald/Terrarum/Terrarum.java
+++ b/src/com/Torvald/Terrarum/Terrarum.java
@@ -5,6 +5,7 @@ import java.io.IOException;
import java.util.logging.Level;
import java.util.logging.Logger;
+import com.Torvald.ImageFont.GameFontBase;
import com.Torvald.ImageFont.GameFontWhite;
import com.Torvald.Terrarum.ConsoleCommand.Authenticator;
import com.Torvald.Terrarum.LangPack.Lang;
@@ -42,7 +43,7 @@ public class Terrarum extends StateBasedGame {
public static String defaultDir;
public static String defaultSaveDir;
- public static String gameLocale = "ko";
+ public static String gameLocale = "jp";
public static Font gameFontWhite;
diff --git a/src/com/Torvald/Terrarum/TileProperties/TileProp.java b/src/com/Torvald/Terrarum/TileProperties/TileProp.java
index 89c4a8914..9ab513cf1 100644
--- a/src/com/Torvald/Terrarum/TileProperties/TileProp.java
+++ b/src/com/Torvald/Terrarum/TileProperties/TileProp.java
@@ -19,7 +19,7 @@ public class TileProp {
private boolean wallable;
- private int luminosity;
+ private char luminosity;
private int drop;
private boolean fallable;
@@ -94,7 +94,7 @@ public class TileProp {
* Raw RGB value, without alpha
* @return
*/
- public int getLuminosity() {
+ public char getLuminosity() {
return luminosity;
}
@@ -102,7 +102,7 @@ public class TileProp {
*
* @param luminosity Raw RGB value, without alpha
*/
- void setLuminosity(int luminosity) {
+ void setLuminosity(char luminosity) {
this.luminosity = luminosity;
}
diff --git a/src/com/Torvald/Terrarum/TileProperties/TilePropCodex.java b/src/com/Torvald/Terrarum/TileProperties/TilePropCodex.java
index 2fe9f315e..f2eeb13b8 100644
--- a/src/com/Torvald/Terrarum/TileProperties/TilePropCodex.java
+++ b/src/com/Torvald/Terrarum/TileProperties/TilePropCodex.java
@@ -49,14 +49,18 @@ public class TilePropCodex {
return tileProps[index];
}
- private void setProp(TileProp prop, CSVRecord record) {
+ public static byte getTileID(String name) {
+ return 0;
+ }
+
+ private static void setProp(TileProp prop, CSVRecord record) {
prop.setName(record.get("name"));
prop.setId(intVal(record, "id"));
prop.setOpacity(intVal(record, "opacity"));
prop.setStrength(intVal(record, "strength"));
- prop.setLuminosity(intVal(record, "lumcolor"));
+ prop.setLuminosity((char) intVal(record, "lumcolor"));
prop.setDrop(intVal(record, "drop"));
prop.setFriction(intVal(record, "friction"));
@@ -71,11 +75,11 @@ public class TilePropCodex {
System.out.println("\t" + prop.getName());
}
- private int intVal(CSVRecord rec, String s) {
+ private static int intVal(CSVRecord rec, String s) {
return Integer.decode(rec.get(s));
}
- private boolean boolVal(CSVRecord rec, String s) {
+ private static boolean boolVal(CSVRecord rec, String s) {
return !(intVal(rec, s) == 0);
}
}
diff --git a/src/com/Torvald/Terrarum/TileProperties/propdata.csv b/src/com/Torvald/Terrarum/TileProperties/propdata.csv
index 3ff60be43..a9eeb757b 100644
--- a/src/com/Torvald/Terrarum/TileProperties/propdata.csv
+++ b/src/com/Torvald/Terrarum/TileProperties/propdata.csv
@@ -1,46 +1,46 @@
"id";"name" ;"opacity";"strength";"fluid";"viscosity";"solid";"wall";"lumcolor";"drop";"fall";"friction"
# Friction: 0: frictionless, <16: slippery, 16: regular, >16: sticky
- "0";"TILE_AIR" ; "4"; "0"; "0"; "N/A"; "0"; "0"; "0"; "0"; "0";"16"
- "1";"TILE_STONE" ; "32"; "25"; "0"; "N/A"; "1"; "1"; "0"; "1"; "0";"16"
- "2";"TILE_DIRT" ; "32"; "6"; "0"; "N/A"; "1"; "1"; "0"; "2"; "0";"16"
- "3";"TILE_GRASS" ; "32"; "6"; "0"; "N/A"; "1"; "1"; "0"; "2"; "0";"16"
- "4";"TILE_PLANK_NORMAL" ; "32"; "12"; "0"; "N/A"; "1"; "1"; "0"; "4"; "0";"16"
- "5";"TILE_PLANK_EBONY" ; "32"; "12"; "0"; "N/A"; "1"; "1"; "0"; "5"; "0";"16"
- "6";"TILE_PLANK_BIRCH" ; "32"; "12"; "0"; "N/A"; "1"; "1"; "0"; "6"; "0";"16"
- "7";"TILE_PLANK_BLOODROSE" ; "32"; "12"; "0"; "N/A"; "1"; "1"; "0"; "7"; "0";"16"
- "8";"TILE_TRUNK_NORMAL" ; "32"; "12"; "0"; "N/A"; "1"; "0"; "0"; "8"; "0";"16"
- "9";"TILE_TRUNK_EBONY" ; "32"; "12"; "0"; "N/A"; "1"; "0"; "0"; "9"; "0";"16"
- "10";"TILE_TRUNK_BIRCH" ; "32"; "12"; "0"; "N/A"; "1"; "0"; "0"; "10"; "0";"16"
- "11";"TILE_TRUNK_BLOODROSE" ; "32"; "12"; "0"; "N/A"; "1"; "0"; "0"; "11"; "0";"16"
- "12";"TILE_STONE" ; "32"; "25"; "0"; "N/A"; "1"; "1"; "0"; "12"; "0";"16"
- "13";"TILE_SAND" ; "32"; "6"; "0"; "N/A"; "1"; "1"; "0"; "13"; "1";"16"
- "14";"TILE_GRAVEL" ; "32"; "6"; "0"; "N/A"; "1"; "0"; "0"; "14"; "1";"16"
+ "0";"TILE_AIR" ; "1"; "0"; "0"; "N/A"; "0"; "0"; "0"; "0"; "0";"16"
+ "1";"TILE_STONE" ; "5"; "25"; "0"; "N/A"; "1"; "1"; "0"; "1"; "0";"16"
+ "2";"TILE_DIRT" ; "5"; "6"; "0"; "N/A"; "1"; "1"; "0"; "2"; "0";"16"
+ "3";"TILE_GRASS" ; "5"; "6"; "0"; "N/A"; "1"; "1"; "0"; "2"; "0";"16"
+ "4";"TILE_PLANK_NORMAL" ; "5"; "12"; "0"; "N/A"; "1"; "1"; "0"; "4"; "0";"16"
+ "5";"TILE_PLANK_EBONY" ; "5"; "12"; "0"; "N/A"; "1"; "1"; "0"; "5"; "0";"16"
+ "6";"TILE_PLANK_BIRCH" ; "5"; "12"; "0"; "N/A"; "1"; "1"; "0"; "6"; "0";"16"
+ "7";"TILE_PLANK_BLOODROSE" ; "5"; "12"; "0"; "N/A"; "1"; "1"; "0"; "7"; "0";"16"
+ "8";"TILE_TRUNK_NORMAL" ; "5"; "12"; "0"; "N/A"; "1"; "0"; "0"; "8"; "0";"16"
+ "9";"TILE_TRUNK_EBONY" ; "5"; "12"; "0"; "N/A"; "1"; "0"; "0"; "9"; "0";"16"
+ "10";"TILE_TRUNK_BIRCH" ; "5"; "12"; "0"; "N/A"; "1"; "0"; "0"; "10"; "0";"16"
+ "11";"TILE_TRUNK_BLOODROSE" ; "5"; "12"; "0"; "N/A"; "1"; "0"; "0"; "11"; "0";"16"
+ "12";"TILE_STONE" ; "5"; "25"; "0"; "N/A"; "1"; "1"; "0"; "12"; "0";"16"
+ "13";"TILE_SAND" ; "5"; "6"; "0"; "N/A"; "1"; "1"; "0"; "13"; "1";"16"
+ "14";"TILE_GRAVEL" ; "5"; "6"; "0"; "N/A"; "1"; "0"; "0"; "14"; "1";"16"
- "15";"TILE_ORE_MALACHITE" ; "32"; "25"; "0"; "N/A"; "1"; "0"; "0"; "15"; "0";"16"
- "16";"TILE_ORE_HEMATITE" ; "32"; "25"; "0"; "N/A"; "1"; "0"; "0"; "16"; "0";"16"
- "17";"TILE_ORE_NATURAL_GOLD" ; "32"; "25"; "0"; "N/A"; "1"; "0"; "0"; "17"; "0";"16"
- "18";"TILE_ORE_NATURAL_SILVER" ; "32"; "25"; "0"; "N/A"; "1"; "0"; "0"; "18"; "0";"16"
- "19";"TILE_ORE_RUTILE" ; "32"; "25"; "0"; "N/A"; "1"; "0"; "0"; "19"; "0";"16"
- "20";"TILE_ORE_AURICHALCUMITE" ; "32"; "25"; "0"; "N/A"; "1"; "0"; "0"; "20"; "0";"16"
- "21";"TILE_GEM_RUBY" ; "32"; "25"; "0"; "N/A"; "1"; "0"; "0"; "21"; "0";"16"
- "22";"TILE_GEM_EMERALD" ; "32"; "25"; "0"; "N/A"; "1"; "0"; "0"; "22"; "0";"16"
- "23";"TILE_GEM_SAPPHIRE" ; "32"; "25"; "0"; "N/A"; "1"; "0"; "0"; "23"; "0";"16"
- "24";"TILE_GEM_TOPAZ" ; "32"; "25"; "0"; "N/A"; "1"; "0"; "0"; "24"; "0";"16"
- "25";"TILE_GEM_DIAMOND" ; "32"; "25"; "0"; "N/A"; "1"; "0"; "0"; "25"; "0";"16"
- "26";"TILE_GEM_AMETHYST" ; "32"; "25"; "0"; "N/A"; "1"; "0"; "0"; "26"; "0";"16"
+ "15";"TILE_ORE_MALACHITE" ; "5"; "25"; "0"; "N/A"; "1"; "0"; "0"; "15"; "0";"16"
+ "16";"TILE_ORE_HEMATITE" ; "5"; "25"; "0"; "N/A"; "1"; "0"; "0"; "16"; "0";"16"
+ "17";"TILE_ORE_NATURAL_GOLD" ; "5"; "25"; "0"; "N/A"; "1"; "0"; "0"; "17"; "0";"16"
+ "18";"TILE_ORE_NATURAL_SILVER" ; "5"; "25"; "0"; "N/A"; "1"; "0"; "0"; "18"; "0";"16"
+ "19";"TILE_ORE_RUTILE" ; "5"; "25"; "0"; "N/A"; "1"; "0"; "0"; "19"; "0";"16"
+ "20";"TILE_ORE_AURICHALCUMITE" ; "5"; "25"; "0"; "N/A"; "1"; "0"; "0"; "20"; "0";"16"
+ "21";"TILE_GEM_RUBY" ; "5"; "25"; "0"; "N/A"; "1"; "0"; "0"; "21"; "0";"16"
+ "22";"TILE_GEM_EMERALD" ; "5"; "25"; "0"; "N/A"; "1"; "0"; "0"; "22"; "0";"16"
+ "23";"TILE_GEM_SAPPHIRE" ; "5"; "25"; "0"; "N/A"; "1"; "0"; "0"; "23"; "0";"16"
+ "24";"TILE_GEM_TOPAZ" ; "5"; "25"; "0"; "N/A"; "1"; "0"; "0"; "24"; "0";"16"
+ "25";"TILE_GEM_DIAMOND" ; "5"; "25"; "0"; "N/A"; "1"; "0"; "0"; "25"; "0";"16"
+ "26";"TILE_GEM_AMETHYST" ; "5"; "25"; "0"; "N/A"; "1"; "0"; "0"; "26"; "0";"16"
- "27";"TILE_SNOW" ; "32"; "6"; "0"; "N/A"; "1"; "1"; "0"; "27"; "0";"16"
- "28";"TILE_ICE_FRAGILE" ; "8"; "1"; "0"; "N/A"; "1"; "0"; "0"; "28"; "0";"16"
- "29";"TILE_ICE_NATURAL" ; "24"; "25"; "0"; "N/A"; "1"; "1"; "0"; "29"; "0"; "8"
- "30";"TILE_ICE_CLEAR_MAGICAL" ; "32"; "25"; "0"; "N/A"; "1"; "1"; "855567"; "30"; "0"; "8"
+ "27";"TILE_SNOW" ; "5"; "6"; "0"; "N/A"; "1"; "1"; "0"; "27"; "0";"16"
+ "28";"TILE_ICE_FRAGILE" ; "2"; "1"; "0"; "N/A"; "1"; "0"; "0"; "28"; "0";"16"
+ "29";"TILE_ICE_NATURAL" ; "4"; "25"; "0"; "N/A"; "1"; "1"; "0"; "29"; "0"; "8"
+ "30";"TILE_ICE_CLEAR_MAGICAL" ; "5"; "25"; "0"; "N/A"; "1"; "1"; "4967"; "30"; "0"; "8"
# see scandinavian name set female of this tile id!
- "31";"TILE_PLATFORM_STONE" ; "2"; "0"; "0"; "N/A"; "0"; "0"; "0"; "31"; "0";"16"
- "32";"TILE_PLATFORM_WOODEN" ; "2"; "0"; "0"; "N/A"; "0"; "0"; "0"; "32"; "0";"16"
- "33";"TILE_PLATFORM_EBONY" ; "2"; "0"; "0"; "N/A"; "0"; "0"; "0"; "33"; "0";"16"
- "34";"TILE_PLATFORM_BIRCH" ; "2"; "0"; "0"; "N/A"; "0"; "0"; "0"; "34"; "0";"16"
- "35";"TILE_PLATFORM_BLOODROSE" ; "2"; "0"; "0"; "N/A"; "0"; "0"; "0"; "35"; "0";"16"
+ "31";"TILE_PLATFORM_STONE" ; "0"; "0"; "0"; "N/A"; "0"; "0"; "0"; "31"; "0";"16"
+ "32";"TILE_PLATFORM_WOODEN" ; "0"; "0"; "0"; "N/A"; "0"; "0"; "0"; "32"; "0";"16"
+ "33";"TILE_PLATFORM_EBONY" ; "0"; "0"; "0"; "N/A"; "0"; "0"; "0"; "33"; "0";"16"
+ "34";"TILE_PLATFORM_BIRCH" ; "0"; "0"; "0"; "N/A"; "0"; "0"; "0"; "34"; "0";"16"
+ "35";"TILE_PLATFORM_BLOODROSE" ; "0"; "0"; "0"; "N/A"; "0"; "0"; "0"; "35"; "0";"16"
- "36";"TILE_TORCH" ; "0"; "0"; "0"; "N/A"; "0"; "0";"16769997"; "36"; "0";"16"
+ "36";"TILE_TORCH" ; "0"; "0"; "0"; "N/A"; "0"; "0";"63680"; "36"; "0";"16"
-"239";"TILE_WATER" ; "16"; "100"; "1"; "2"; "0"; "0";"15464447"; "239"; "0";"16"
-"255";"TILE_LAVA" ; "0"; "100"; "1"; "2"; "0"; "0"; "8397312"; "239"; "0";"16"
+"239";"TILE_WATER" ; "2"; "100"; "1"; "2"; "0"; "0";"59159"; "239"; "0";"16"
+"255";"TILE_LAVA" ; "0"; "100"; "1"; "2"; "0"; "0";"48320"; "239"; "0";"16"
diff --git a/src/com/Torvald/Terrarum/UserInterface/BasicDebugInfoWindow.java b/src/com/Torvald/Terrarum/UserInterface/BasicDebugInfoWindow.java
index 3a616a03f..e67b8ff9a 100644
--- a/src/com/Torvald/Terrarum/UserInterface/BasicDebugInfoWindow.java
+++ b/src/com/Torvald/Terrarum/UserInterface/BasicDebugInfoWindow.java
@@ -83,7 +83,14 @@ public class BasicDebugInfoWindow implements UICanvas {
String lightVal;
try {
- lightVal = Integer.toHexString(LightmapRenderer.getValueFromMap(mouseTileX, mouseTileY)).toUpperCase();
+ char valRaw = LightmapRenderer.getValueFromMap(mouseTileX, mouseTileY);
+ int rawR = LightmapRenderer.getRawR(valRaw);
+ int rawG = LightmapRenderer.getRawG(valRaw);
+ int rawB = LightmapRenderer.getRawB(valRaw);
+ lightVal = String.valueOf((int)valRaw) + " ("
+ + String.valueOf(rawR) + " "
+ + String.valueOf(rawG) + " "
+ + String.valueOf(rawB) + ")";
}
catch (ArrayIndexOutOfBoundsException e) {
lightVal = "out of bounds";
diff --git a/src/com/Torvald/Terrarum/UserInterface/ConsoleWindow.java b/src/com/Torvald/Terrarum/UserInterface/ConsoleWindow.java
index 8ad187bb7..cf85333c3 100644
--- a/src/com/Torvald/Terrarum/UserInterface/ConsoleWindow.java
+++ b/src/com/Torvald/Terrarum/UserInterface/ConsoleWindow.java
@@ -189,7 +189,7 @@ public class ConsoleWindow implements UICanvas {
prevCommand = "";
commandInputPool = new StringBuffer();
- if (Terrarum.game.auth.C()) sendMessage(Lang.get("DEV_MESSAGE_CONSOLE_CODEX"));
+ if (Terrarum.game.auth.b()) sendMessage(Lang.get("DEV_MESSAGE_CONSOLE_CODEX"));
}
@Override