feat: Colors

This commit is contained in:
2025-05-29 18:43:21 +02:00
parent 70d41b7aee
commit 34110534b4
3 changed files with 28 additions and 28 deletions

View File

@@ -3,7 +3,7 @@
<option name="myName" value="Project Default" /> <option name="myName" value="Project Default" />
<inspection_tool class="DuplicatedCode" enabled="true" level="WEAK WARNING" enabled_by_default="true"> <inspection_tool class="DuplicatedCode" enabled="true" level="WEAK WARNING" enabled_by_default="true">
<Languages> <Languages>
<language minSize="69" name="Java" /> <language minSize="111" name="Java" />
</Languages> </Languages>
</inspection_tool> </inspection_tool>
</profile> </profile>

View File

@@ -91,7 +91,7 @@ public class Menu {
switch (marketOption) { switch (marketOption) {
case 0 -> { case 0 -> {
game.getStrings().print("marketBuy"); game.getStrings().print("marketBuy");
List<String> availableItems = game.getMarket().getAvailableItems().stream().map(item -> item + ": " + item.getPrice() + " coins").toList(); List<String> availableItems = game.getMarket().getAvailableItems().stream().map(item -> item + ": " + "\u001B[0;33m" + item.getPrice() + " Coins\u001B[0m").toList();
int itemIndex = Cli.selectOptionIndex(availableItems); int itemIndex = Cli.selectOptionIndex(availableItems);
Item item = game.getMarket().getAvailableItems().get(itemIndex); Item item = game.getMarket().getAvailableItems().get(itemIndex);
game.getMarket().buyItem(game, item); game.getMarket().buyItem(game, item);

View File

@@ -1,35 +1,35 @@
{ {
"welcome": "Welcome player! ", "welcome": "Welcome player! ",
"forestType": "Your forest size: {0}", "forestType": "Your \u001B[0;32mforest\u001B[0m size: {0}",
"soilType": "Your soil type size: {0}", "soilType": "Your \u001B[38;2;150;93;0msoil\u001B[0m type size: {0}",
"pathType": "Your path type: {0}", "pathType": "Your \u001B[38;2;255;126;0mpath\u001B[0m type: {0}",
"waterType": "Your water type: {0}", "waterType": "Your \u001B[0;34mwater\u001B[0m type: {0}",
"coins": "Amount of Coins: {0}", "coins": "Amount of \u001B[0;33mCoins\u001B[0m: {0}",
"marketGreeting": "Welcome to Market!", "marketGreeting": "Welcome to Market!",
"marketBuy": "Pick which item you want to buy", "marketBuy": "Pick which item you want to buy",
"marketBuyMessage": "You bought: {0}", "marketBuyMessage": "Info: You bought \u001B[4;37m{0}\u001B[0m",
"marketSell": "Pick which item you want to sell", "marketSell": "Pick which item you want to sell",
"marketSellMessage": "You sold: {0}", "marketSellMessage": "Info: You sold \u001B[4;37m{0}\u001B[0m",
"cantBeBuiltCows": "First you need to build 3 villager houses before owning cows!", "cantBeBuiltCows": "\u001B[4;31mError: First you need to build 3 villager houses before owning cows!\u001B[0m",
"cantBeBuiltChurch": "You can`t have more than 1 church!", "cantBeBuiltChurch": "\u001B[4;31mError: You can`t have more than 1 church!\u001B[0m",
"cantBeBuiltVillagerHouse": "First you need to built church before villager houses!", "cantBeBuiltVillagerHouse": "\u001B[4;31mError: First you need to built church before villager houses!\u001B[0m",
"cantBeBuiltBakery": "First you need to built wheat farmland before a bakery! You need wheat you know!", "cantBeBuiltBakery": "\u001B[4;31mError: First you need to built wheat farmland before a bakery! You need wheat you know!\u001B[0m",
"cantBeBuiltPub": "First you need to built hops farmland before a pub! You need hops you know!", "cantBeBuiltPub": "\u001B[4;31mError: First you need to built hops farmland before a pub! You need hops you know!\u001B[0m",
"cantBeBuiltWinery": "First you need to built vineyard before a winery! You need grapevines you know!", "cantBeBuiltWinery": "\u001B[4;31mError: First you need to built vineyard before a winery! You need grapevines you know!\u001B[0m",
"cantBeBuiltCheeseFactory": "First you need to own cows before a cheese factory! You need milk you know!", "cantBeBuiltCheeseFactory": "\u001B[4;31mError: First you need to own cows before a cheese factory! You need milk you know!\u001B[0m",
"noVillagerHouseMessage": "Build a villager house first!", "noVillagerHouseMessage": "\u001B[4;31mError: Build a villager house first!\u001B[0m",
"cantBuild": "You don`t have that item in your inventory!", "cantBuild": "\u001B[4;31mError: You don`t have that item in your inventory!\u001B[0m",
"cantCutTrees": "You need {0} axes to cut trees!", "cantCutTrees": "\u001B[4;31mError: You need {0} axes to cut trees!\u001B[0m",
"cantMilkCows": "You don`t own any cows!", "cantMilkCows": "\u001B[4;31mError: You don`t own any cows!\u001B[0m",
"cantProduce": "You can`t produce when you dont have {0}", "cantProduce": "\u001B[4;31mError: You can`t produce when you dont have {0}\u001B[0m",
"cantSell": "You can`t sell this item! You don`t have it!", "cantSell": "\u001B[4;31mError: You can`t sell this item! You don`t have it!\u001B[0m",
"forestSize": "The size of your forest is {0} trees", "forestSize": "The size of your forest is {0} trees",
"stats": "Your stats: ", "stats": "Your stats: ",
"currentDay": "Day: {0}", "currentDay": "\u001B[4;37mDay: {0}\u001B[0m",
"cantMilkToMuch": "You milked the cow already 3 times today!", "cantMilkToMuch": "\u001B[4;31mError: You milked the cow already 3 times today!\u001B[0m",
"noTrees": "You don't have any trees left!", "noTrees": "\u001B[4;31mError: You don't have any trees left!\u001B[0m",
"event": "Event for this day: {0}", "event": "Event for this day: {0}",
"eventFire": "Fire! You lost 10 trees...", "eventFire": "Info: Fire! You lost 10 trees...",
"eventFlood": "Flood! You lost All of your farmlands... If you had them.", "eventFlood": "Info: Flood! You lost All of your farmlands... If you had them.",
"eventAttack": "Attack! Your villagers got robbed and you lost 100 coins..." "eventAttack": "Info: Attack! Your villagers got robbed and you lost \u001B[0;33m100 coins\u001B[0m..."
} }