Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add new item textures and locales (WIP) #279

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/main/java/org/qme/client/vis/RenderMaster.java
Original file line number Diff line number Diff line change
Expand Up @@ -338,7 +338,7 @@ private static int getTexture(TileType type) {
*/
private static int getTexture(ResourceType type) {
String texString =
// HIGH_MOUNTAIN -> high_mountain -> high-mountain -> high-mountain.png
// HIGH_MOUNTAIN -> high_mountain -> high-mountain.png
"items/" + type.name().toLowerCase().replace('_', '-') + ".png";
return TextureManager.getTexture(texString);
}
Expand Down
20 changes: 11 additions & 9 deletions src/main/java/org/qme/client/vis/tex/TextureManager.java
Original file line number Diff line number Diff line change
Expand Up @@ -48,25 +48,27 @@ public TextureManager() {
toLoad.add("tiles/desert.png");
toLoad.add("tiles/jungle.png");
toLoad.add("tiles/tundra.png");

toLoad.add("tiles/hover.png");

toLoad.add("items/coal.png");
toLoad.add("items/fruit.png");
toLoad.add("items/gold-ore.png");
toLoad.add("items/grape-vine.png");
toLoad.add("items/grass.png");
toLoad.add("items/leaf.png");
toLoad.add("items/silver-ore.png");
toLoad.add("items/iron-ore.png");
toLoad.add("items/salt.png");
toLoad.add("items/sea-weed.png");
toLoad.add("items/tall-grass.png");
toLoad.add("tiles/hover.png");
toLoad.add("items/snow.png");
toLoad.add("items/rock.png");
toLoad.add("items/sand.png");
toLoad.add("items/sand-stone.png");
toLoad.add("items/grapes.png");
toLoad.add("items/lumber.png");
toLoad.add("items/cactus.png");
toLoad.add("items/wheat.png");
toLoad.add("items/seagull.png");
toLoad.add("items/salmon.png");
toLoad.add("items/amethyst-shard.png");
toLoad.add("items/book.png");
toLoad.add("items/cod.png");
toLoad.add("items/egg.png");

toLoad.add("misc/box.png");
toLoad.add("misc/button.png");
for (String texture : toLoad) {
Expand Down
5 changes: 2 additions & 3 deletions src/main/java/org/qme/world/Tile.java
Original file line number Diff line number Diff line change
Expand Up @@ -74,11 +74,10 @@ private void rollResources() {
Random rand = new Random();
final int roll = rand.nextInt(100);
ResourceType[] resourceList = (ResourceType.values());
for (int i = 0; i < resourceList.length; i++) {
ResourceType res = resourceList[i];
for (ResourceType res : resourceList) {
if (roll < Resource.getSpawnChance(res, this.type)) {
// TODO: Seagulls here
if ( (res != ResourceType.SALT) || (this.resources.size() == 0) )
if ((res != ResourceType.SALT) || (this.resources.size() == 0))
this.resources.add(new Resource(res));
}
}
Expand Down
30 changes: 17 additions & 13 deletions src/main/java/org/qme/world/res/ResourceType.java
Original file line number Diff line number Diff line change
Expand Up @@ -6,22 +6,26 @@
* @since 0.3.0
*/
public enum ResourceType {
AMETHYST_SHARD,
COAL,
SAND,
SNOW,
SALT,

BOOK,

FRUIT,
GOLD_ORE,
GRAPE_VINE,
GRAPES,
GRASS,
LEAF,
SALT,
WHEAT,
EGG,

SEA_WEED,
TALL_GRASS,
ROCK,
SNOW,
CACTUS,
SAND,
SAND_STONE,
LUMBER,

GOLD_ORE,
IRON_ORE,
SILVER_ORE,

SEAGULL,
WHEAT
COD,
SALMON,
}
72 changes: 72 additions & 0 deletions src/main/resources/locale/ca_ES.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
#
# QME Language ca_ES.properties (Catalan)
# Authored by Jake Roggenbuck
#

# Tiles
PLAINS=Planures
OCEAN=Oceà
FOREST=Bosc
SEA=Mar
MOUNTAIN=Muntanya
HIGH_MOUNTAIN=Muntanya Alta
FERTILE_PLAINS=Planes fèrtils
DESERT=Desert
JUNGLE=Jungla
TUNDRA=Tundra

# Resources
BIG_FISH=Peix Gran
SALT=Sal
SEA_WEED=Desacatasitades
SMALL_FISH=Peix Petit
SMALL_SHARK=Tauró Petit
SEAGULL=Gavina
GRAIN=Gra
GRASS=Herba
SMALL_GAME=Animal Petit
MEDIUM_GAME=Animal Mitjà
TALL_GRASS=Herba Alta
GRAPES=Raïm
GRAPE_VINE=Vinya De Raïm
LUMBER=Fusta
LEAF=Fulla
FRUIT=Fruita
SAP=Saba
LARGE_GAME=Animal Gran
ROCK=Roca
SNOW=Neu
COAL=Carbó
IRON_ORE=Mineral De Ferro
GOLD_ORE=Mineral D'or
SAND=Sorra
SAND_STONE=Pedra De Sorra
CACTUS=Cactus
WHEAT=Blat

COD=Bacallà
SALMON=Salmó
BOOK=Llibre
EGG=Ou
SILVER_ORE=Hores De Plata
AMETHYST_SHARD=Fragment D'ametista

# Tile Descriptions
PLAINS_DESCRIPTION=Parcel·la plana i infèrtil de terra.
OCEAN_DESCRIPTION=Gran quantitat d'aigua.
FOREST_DESCRIPTION=Zona boscosa amb molts arbres.
SEA_DESCRIPTION=Cos d'aigua poc profund.
MOUNTAIN_DESCRIPTION=Pics alts que contenen roca.
HIGH_MOUNTAIN_DESCRIPTION=Pics molt alts que contenen roca.
FERTILE_PLAINS_DESCRIPTION=Terra plana i fèrtil.
DESERT_DESCRIPTION=Paisatge estèril.
JUNGLE_DESCRIPTION=Arbres densos.
TUNDRA_DESCRIPTION=Terres planes fredes i incòmodes.

# General UI
CLOSE=Tancar

# Tile Selection UI
TILE_CONTAINS=Aquesta peça conté:
HARVEST=Collita
NO_RESOURCES=Aquesta peça no té recursos
7 changes: 7 additions & 0 deletions src/main/resources/locale/en_UK.properties
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,13 @@ SAND_STONE=Sand Stone
CACTUS=Cactus
WHEAT=Wheat

COD=Cod
SALMON=Salmon
BOOK=book
EGG=Egg
SILVER_ORE=Silver Ore
AMETHYST_SHARD=Amethyst Shard

# Tile Descriptions
PLAINS_DESCRIPTION=Es a flat, infertile patch of land init.
OCEAN_DESCRIPTION=Large body of woter.
Expand Down
7 changes: 7 additions & 0 deletions src/main/resources/locale/en_US.properties
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,13 @@ SAND_STONE=Sand Stone
CACTUS=Cactus
WHEAT=Wheat

COD=Cod
SALMON=Salmon
BOOK=book
EGG=Egg
SILVER_ORE=Silver Ore
AMETHYST_SHARD=Amethyst Shard

# Tile Descriptions
PLAINS_DESCRIPTION=Flat, infertile patch of land.
OCEAN_DESCRIPTION=Large body of water.
Expand Down
72 changes: 72 additions & 0 deletions src/main/resources/locale/es_ES.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
#
# QME Language es_ES.properties (Spanish)
# Authored by Jake Roggenbuck
#

# Tiles
PLAINS=Llanuras
OCEAN=Oceano
FOREST=Bosque
SEA=Mar
MOUNTAIN=Montaña
HIGH_MOUNTAIN=Montaña Alta
FERTILE_PLAINS=Llanuras fértiles
DESERT=Desierto
JUNGLE=Selva
TUNDRA=Tundra

# Resources
BIG_FISH=Pez Grande
SALT=Sal
SEA_WEED=Algas Marinas
SMALL_FISH=Pez Pequeño
SMALL_SHARK=Tiburón Pequeño
SEAGULL=Gaviota
GRAIN=Grano
GRASS=Césped
SMALL_GAME=Animal Pequeño
MEDIUM_GAME=Animal Medio
TALL_GRASS=Cesped Alto
GRAPES=Uvas
GRAPE_VINE=Vid De Uva
LUMBER=Madera
LEAF=Hoja
FRUIT=Fruta
SAP=Savia
LARGE_GAME=Animal Grande
ROCK=Roca
SNOW=Nieve
COAL=Carbón
IRON_ORE=Mineral De Hierro
GOLD_ORE=Metal De Oro
SAND=Arena
SAND_STONE=Arenisca
CACTUS=Cactus
WHEAT=Trigo

COD=Cod
SALMON=Bacalao
BOOK=Libro
EGG=Huevo
SILVER_ORE=Mineral De Plata
AMETHYST_SHARD=Fragmento De Amatista

# Tile Descriptions
PLAINS_DESCRIPTION=Parcela de tierra plana e infértil.
OCEAN_DESCRIPTION=Gran cuerpo de agua.
FOREST_DESCRIPTION=Zona arbolada con muchos árboles.
SEA_DESCRIPTION=Cuerpo de agua poco profundo.
MOUNTAIN_DESCRIPTION=Picos altos que contienen roca.
HIGH_MOUNTAIN_DESCRIPTION=Picos muy altos que contienen roca.
FERTILE_PLAINS_DESCRIPTION=Tierra llana y fértil.
DESERT_DESCRIPTION=Paisaje árido.
JUNGLE_DESCRIPTION=Dense trees.
TUNDRA_DESCRIPTION=Llanura fría e incómoda.

# General UI
CLOSE=Cerrar

# Tile Selection UI
TILE_CONTAINS=Este mosaico contiene:
HARVEST=Cosecha
NO_RESOURCES=Este mosaico no tiene recursos
51 changes: 27 additions & 24 deletions src/main/resources/misc/spawn_tables.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,60 +3,63 @@
"mountain": 50,
"high_mountain": 20
},
"amethyst_shard": {
"mountain": 2,
"high_mountain": 8
},
"fruit": {
"forest": 20
},
"egg": {
"desert": 20,
"forest": 1,
"fertile_plains": 5
},
"book": {
"forest": 1
},
"gold_ore": {
"mountain": 10,
"high_mountain": 20
},
"grape_vine": {
"fertile_plains": 10
"silver_ore": {
"mountain": 8,
"high_mountain": 2
},
"iron_ore": {
"mountain": 20,
"high_mountain": 10
},
"grapes": {
"fertile_plains": 5
},
"wheat": {
"fertile_plains": 20
},
"grass": {
"plains": 70
},
"leaf": {
"forest": 80
"seagull": {
"ocean": 2,
"sea": 6
},
"lumber": {
"forest": 65
"cod": {
"ocean": 2,
"sea": 6
},
"seagull": {
"salmon": {
"ocean": 2,
"sea": 6
},
"salt": {
"ocean": 20
"ocean": 10
},
"sea_weed": {
"ocean": 30,
"sea": 25
},
"tall_grass": {
"fertile_plains": 50
},
"rock": {
"high_mountain": 35,
"mountain": 80
},
"snow": {
"high_mountain": 100,
"mountain": 20
},
"sand": {
"desert": 60
},
"sand_stone": {
"desert": 5
},
"cactus": {
"desert": 20
}
}
Binary file added src/main/resources/textures/items/amethyst-shard.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/main/resources/textures/items/book.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed src/main/resources/textures/items/cactus.png
Binary file not shown.
Binary file modified src/main/resources/textures/items/coal.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/main/resources/textures/items/cod.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/main/resources/textures/items/egg.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified src/main/resources/textures/items/fruit.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified src/main/resources/textures/items/gold-ore.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed src/main/resources/textures/items/grape-vine.png
Binary file not shown.
Binary file modified src/main/resources/textures/items/grapes.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed src/main/resources/textures/items/grass.png
Binary file not shown.
Binary file modified src/main/resources/textures/items/iron-ore.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed src/main/resources/textures/items/leaf.png
Binary file not shown.
Binary file removed src/main/resources/textures/items/lumber.png
Binary file not shown.
Binary file removed src/main/resources/textures/items/rock.png
Binary file not shown.
Binary file added src/main/resources/textures/items/salmon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified src/main/resources/textures/items/salt.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed src/main/resources/textures/items/sand-stone.png
Binary file not shown.
Binary file modified src/main/resources/textures/items/sand.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified src/main/resources/textures/items/sea-weed.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/main/resources/textures/items/silver-ore.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed src/main/resources/textures/items/silver_ore.png
Binary file not shown.
Binary file modified src/main/resources/textures/items/snow.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed src/main/resources/textures/items/tall-grass.png
Binary file not shown.
Binary file modified src/main/resources/textures/items/wheat.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.