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" />
<inspection_tool class="DuplicatedCode" enabled="true" level="WEAK WARNING" enabled_by_default="true">
<Languages>
<language minSize="69" name="Java" />
<language minSize="111" name="Java" />
</Languages>
</inspection_tool>
</profile>

View File

@@ -91,7 +91,7 @@ public class Menu {
switch (marketOption) {
case 0 -> {
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);
Item item = game.getMarket().getAvailableItems().get(itemIndex);
game.getMarket().buyItem(game, item);

View File

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