diff --git a/assets/common/items/armor/belt/assassin.ron b/assets/common/items/armor/belt/assassin.ron index 4471f9a76a..82a47b202d 100644 --- a/assets/common/items/armor/belt/assassin.ron +++ b/assets/common/items/armor/belt/assassin.ron @@ -5,7 +5,7 @@ ItemDef( ( kind: Belt("Assassin"), stats: ( - protection: Normal(0.0), + protection: Normal(1.0), ), ) ), diff --git a/assets/common/items/armor/belt/bonerattler.ron b/assets/common/items/armor/belt/bonerattler.ron index 979c5162c5..2587122937 100644 --- a/assets/common/items/armor/belt/bonerattler.ron +++ b/assets/common/items/armor/belt/bonerattler.ron @@ -5,7 +5,7 @@ ItemDef( ( kind: Belt("Bonerattler"), stats: ( - protection: Normal(0.0), + protection: Normal(3.0), ), ) ), diff --git a/assets/common/items/armor/belt/cloth_blue_0.ron b/assets/common/items/armor/belt/cloth_blue_0.ron index a3014d4d9f..f7ab9f2cd8 100644 --- a/assets/common/items/armor/belt/cloth_blue_0.ron +++ b/assets/common/items/armor/belt/cloth_blue_0.ron @@ -5,7 +5,7 @@ ItemDef( ( kind: Belt("ClothBlue0"), stats: ( - protection: Normal(0.0), + protection: Normal(1.0), ), ) ), diff --git a/assets/common/items/armor/belt/cloth_green_0.ron b/assets/common/items/armor/belt/cloth_green_0.ron index 5ae50946cc..eb8f5129e9 100644 --- a/assets/common/items/armor/belt/cloth_green_0.ron +++ b/assets/common/items/armor/belt/cloth_green_0.ron @@ -5,7 +5,7 @@ ItemDef( ( kind: Belt("ClothGreen0"), stats: ( - protection: Normal(0.0), + protection: Normal(1.0), ), ) ), diff --git a/assets/common/items/armor/belt/cloth_purple_0.ron b/assets/common/items/armor/belt/cloth_purple_0.ron index 29d98cbca0..5bc6eb3f7a 100644 --- a/assets/common/items/armor/belt/cloth_purple_0.ron +++ b/assets/common/items/armor/belt/cloth_purple_0.ron @@ -5,7 +5,7 @@ ItemDef( ( kind: Belt("ClothPurple0"), stats: ( - protection: Normal(0.0), + protection: Normal(1.0), ), ) ), diff --git a/assets/common/items/armor/belt/cultist_belt.ron b/assets/common/items/armor/belt/cultist_belt.ron index d2551046de..9e9de5d4aa 100644 --- a/assets/common/items/armor/belt/cultist_belt.ron +++ b/assets/common/items/armor/belt/cultist_belt.ron @@ -5,7 +5,7 @@ ItemDef( ( kind: Belt("Cultist"), stats: ( - protection: Normal(0.0), + protection: Normal(6.0), ), ) ), diff --git a/assets/common/items/armor/belt/druid.ron b/assets/common/items/armor/belt/druid.ron index cf1a2c3584..d2d58ee7ce 100644 --- a/assets/common/items/armor/belt/druid.ron +++ b/assets/common/items/armor/belt/druid.ron @@ -5,7 +5,7 @@ ItemDef( ( kind: Belt("Druid"), stats: ( - protection: Normal(0.0), + protection: Normal(2.0), ), ) ), diff --git a/assets/common/items/armor/belt/leather_0.ron b/assets/common/items/armor/belt/leather_0.ron index d1f49eb3a0..00e0b85d40 100644 --- a/assets/common/items/armor/belt/leather_0.ron +++ b/assets/common/items/armor/belt/leather_0.ron @@ -5,7 +5,7 @@ ItemDef( ( kind: Belt("Leather0"), stats: ( - protection: Normal(0.0), + protection: Normal(1.0), ), ) ), diff --git a/assets/common/items/armor/belt/leather_2.ron b/assets/common/items/armor/belt/leather_2.ron index 7600500e64..e46ca49a09 100644 --- a/assets/common/items/armor/belt/leather_2.ron +++ b/assets/common/items/armor/belt/leather_2.ron @@ -5,7 +5,7 @@ ItemDef( ( kind: Belt("Leather2"), stats: ( - protection: Normal(0.0), + protection: Normal(1.0), ), ) ), diff --git a/assets/common/items/armor/belt/plate_0.ron b/assets/common/items/armor/belt/plate_0.ron index ce90a4e377..03a2ce6813 100644 --- a/assets/common/items/armor/belt/plate_0.ron +++ b/assets/common/items/armor/belt/plate_0.ron @@ -5,7 +5,7 @@ ItemDef( ( kind: Belt("Plate0"), stats: ( - protection: Normal(0.0), + protection: Normal(3.0), ), ) ), diff --git a/assets/common/items/armor/belt/steel_0.ron b/assets/common/items/armor/belt/steel_0.ron index 2ffc596d5a..53aa58eedc 100644 --- a/assets/common/items/armor/belt/steel_0.ron +++ b/assets/common/items/armor/belt/steel_0.ron @@ -5,7 +5,7 @@ ItemDef( ( kind: Belt("Steel0"), stats: ( - protection: Normal(0.0), + protection: Normal(4.0), ), ) ), diff --git a/assets/common/items/armor/belt/tarasque.ron b/assets/common/items/armor/belt/tarasque.ron index 2be3efd473..8c92cbd67b 100644 --- a/assets/common/items/armor/belt/tarasque.ron +++ b/assets/common/items/armor/belt/tarasque.ron @@ -5,7 +5,7 @@ ItemDef( ( kind: Belt("Tarasque"), stats: ( - protection: Normal(0.0), + protection: Normal(3.0), ), ) ), diff --git a/assets/common/items/armor/belt/twig.ron b/assets/common/items/armor/belt/twig.ron index b9cc98d976..5c32e05d6b 100644 --- a/assets/common/items/armor/belt/twig.ron +++ b/assets/common/items/armor/belt/twig.ron @@ -5,7 +5,7 @@ ItemDef( ( kind: Belt("Twig"), stats: ( - protection: Normal(0.0), + protection: Normal(2.0), ), ) ), diff --git a/assets/common/items/armor/belt/twigsflowers.ron b/assets/common/items/armor/belt/twigsflowers.ron index 07d5b8a11c..56a606c7fd 100644 --- a/assets/common/items/armor/belt/twigsflowers.ron +++ b/assets/common/items/armor/belt/twigsflowers.ron @@ -5,7 +5,7 @@ ItemDef( ( kind: Belt("Twigsflowers"), stats: ( - protection: Normal(0.0), + protection: Normal(2.0), ), ) ), diff --git a/assets/common/items/armor/belt/twigsleaves.ron b/assets/common/items/armor/belt/twigsleaves.ron index a75b9f06ff..7339b850dc 100644 --- a/assets/common/items/armor/belt/twigsleaves.ron +++ b/assets/common/items/armor/belt/twigsleaves.ron @@ -5,7 +5,7 @@ ItemDef( ( kind: Belt("Twigsleaves"), stats: ( - protection: Normal(0.0), + protection: Normal(2.0), ), ) ), diff --git a/assets/voxygen/background/bg_1.png b/assets/voxygen/background/bg_1.png index 0ade800464..03183263ba 100644 --- a/assets/voxygen/background/bg_1.png +++ b/assets/voxygen/background/bg_1.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:36133b21b44d1bc04e817745cf7cb6b12a813c79005334f9e25c2cfff685f08d -size 2702645 +oid sha256:74737a24496cbfb4dc2361119e76f857d6cf59e65e38a8c70fbdd41bfec27539 +size 960497 diff --git a/assets/voxygen/background/bg_10.png b/assets/voxygen/background/bg_10.png index fb46999de2..ff9ad610c9 100644 --- a/assets/voxygen/background/bg_10.png +++ b/assets/voxygen/background/bg_10.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:131c9a7d037b67b97f96684f731e59fae3e619269e99ed9348ab4c741f5ee797 -size 871200 +oid sha256:208169691141ce6884132b7945a2cd3075984ef324fce6f48ccd2f78b84b431b +size 2024011 diff --git a/assets/voxygen/background/bg_11.png b/assets/voxygen/background/bg_11.png index cfbf15131d..5df02a3c84 100644 --- a/assets/voxygen/background/bg_11.png +++ b/assets/voxygen/background/bg_11.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:82d4838eb1c728c546fb288e9c5062a3a3431392e9cdc1a85485938c3a0c277d -size 762106 +oid sha256:c7a38b4f2f9a4740d6f17d00fde042c93bed58b292394fa8b6063a475fb12cfb +size 1782027 diff --git a/assets/voxygen/background/bg_13.png b/assets/voxygen/background/bg_13.png index d8a885f612..eb3ebc819e 100644 --- a/assets/voxygen/background/bg_13.png +++ b/assets/voxygen/background/bg_13.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:88506d5e8b001bf00b5665236c8bdece4eda41072a088034beb09cda2cc0f1e1 -size 816886 +oid sha256:c973583c530fcad6d8ffc98b0a0dfa2462f59527deff1360eff8a24f5bc9a330 +size 446761 diff --git a/assets/voxygen/background/bg_15.png b/assets/voxygen/background/bg_15.png index 70b34c8cd8..0cfb4abd79 100644 --- a/assets/voxygen/background/bg_15.png +++ b/assets/voxygen/background/bg_15.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:6577cb5d2d3108952e21790636ad723dc799e54694ff0f83e1297aec71a6ab82 -size 1505151 +oid sha256:09dde7d5e88f13502d7e210725997e6c40fcb77dc7e1051061207617feee24a9 +size 1956740 diff --git a/assets/voxygen/background/bg_16.png b/assets/voxygen/background/bg_16.png index 6ec4d52d65..7053ef4f6d 100644 --- a/assets/voxygen/background/bg_16.png +++ b/assets/voxygen/background/bg_16.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:bcc674272dad537d27c983f0863c5fe940dff8e29a393f3956996b71a970cc50 -size 242212 +oid sha256:576e759164ce9c3607074d3566f473bd35cdab6e1587b0271487e81e13cceb2e +size 1955663 diff --git a/assets/voxygen/background/bg_2.png b/assets/voxygen/background/bg_2.png index 559f262ab2..510ba95a94 100644 --- a/assets/voxygen/background/bg_2.png +++ b/assets/voxygen/background/bg_2.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:0a0b11ef4d5dafe8dc0fc02cacd918730ccff332d9216298c96fc0385142b014 -size 887064 +oid sha256:2f77618147fbd64c428022ec29438c0ebd5a7c83ad6ee8547af6fd1db4d372ca +size 1671878 diff --git a/assets/voxygen/background/bg_3.png b/assets/voxygen/background/bg_3.png index 62b26c92f2..56225cdb0b 100644 --- a/assets/voxygen/background/bg_3.png +++ b/assets/voxygen/background/bg_3.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:ec76b848d8efda3e4657007845e2fa43b2e7ede3a5abe7878aab50f68e8f9391 -size 1237841 +oid sha256:a1cf78b18c0d2d4a22ec61729f7628ee1e65ea5f29f566dd8a4f1f3558d25165 +size 1254227 diff --git a/assets/voxygen/background/bg_4.png b/assets/voxygen/background/bg_4.png index 6a520a0314..d2f7fd5542 100644 --- a/assets/voxygen/background/bg_4.png +++ b/assets/voxygen/background/bg_4.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:0d418fad088df3cf64c1fd230aa38d7ef79e74c09acd74b8c32fad5fecc47555 -size 1451725 +oid sha256:00f2c9df4c200da414632c6150955dbbbc9dcda5a1ad1ad4dd383d32d3e21c01 +size 2204147 diff --git a/assets/voxygen/background/bg_5.png b/assets/voxygen/background/bg_5.png index 5146feee13..1d66459a4e 100644 --- a/assets/voxygen/background/bg_5.png +++ b/assets/voxygen/background/bg_5.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:0def91b6d685aa0faf319329849963b6ba3b3f0dffe62f270e98580c80c48096 -size 769966 +oid sha256:fd6fa8c2a98d33b79f489ad7911383ec8db3b7f1f2b039ac2182880fc1fa476c +size 1352572 diff --git a/assets/voxygen/background/bg_6.png b/assets/voxygen/background/bg_6.png index 1d9a33ec41..b155ee3ee0 100644 --- a/assets/voxygen/background/bg_6.png +++ b/assets/voxygen/background/bg_6.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:18c6c7fc107512b418256017742c021817ea95089775ec77cbd3499d2676f32f -size 436663 +oid sha256:731d0a1dee76d2440a49bdc6b59e90d21ba68df8564408a8bee716c8bb3890f7 +size 736243 diff --git a/assets/voxygen/background/bg_7.png b/assets/voxygen/background/bg_7.png index 59d8cee4ba..4be33a634e 100644 --- a/assets/voxygen/background/bg_7.png +++ b/assets/voxygen/background/bg_7.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:d93f1346f6d8dc272d0cc32a39bf47cecc8d686a95a0f919142df88856520384 -size 692461 +oid sha256:77e63b4596c1baf8f92b607f1069d16b699c0aab2676571fc852a6aaa4441b91 +size 1656306 diff --git a/assets/voxygen/background/bg_9.png b/assets/voxygen/background/bg_9.png index 54b67e18d8..a7b5e1206c 100644 --- a/assets/voxygen/background/bg_9.png +++ b/assets/voxygen/background/bg_9.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:6abf95dd5069525eaf35437efa09c0ba7c9bcb65ab50bba7a006fff825a2d675 -size 2782437 +oid sha256:28092f546f217d9be19328783d0122a1ef29e78fdc50f812514f516ac72104f4 +size 2900387 diff --git a/assets/voxygen/background/bg_main.png b/assets/voxygen/background/bg_main.png index 7bc1ca0499..ff9ad610c9 100644 --- a/assets/voxygen/background/bg_main.png +++ b/assets/voxygen/background/bg_main.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:131106ba0e9fb5fd1aad22725611d3911bd094d87573d680dc3aea5232cc0620 -size 1803337 +oid sha256:208169691141ce6884132b7945a2cd3075984ef324fce6f48ccd2f78b84b431b +size 2024011 diff --git a/assets/voxygen/background/death.png b/assets/voxygen/background/death.png index ca2fc0be33..d30f365607 100644 --- a/assets/voxygen/background/death.png +++ b/assets/voxygen/background/death.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:22577fd1bc3fd6c9e26452dc2a0ca6c24bf6a119b8930e3b1b4e0badc2faed89 -size 105749 +oid sha256:cf424f868c79caffc3c7c30ac7fc2a9870be5dc98832ca3fd361f7078a0cef44 +size 5917 diff --git a/assets/voxygen/background/hurt.png b/assets/voxygen/background/hurt.png index 40b32f109d..1adbaedfde 100644 --- a/assets/voxygen/background/hurt.png +++ b/assets/voxygen/background/hurt.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:4b0d7b564b361d5c343ff457d68f6e9846e1ac8168d4b7cd049103fe0b35d7a6 -size 168911 +oid sha256:9c959c87dd85dcf1aac22872f4d063a2e47e9d5ba3c35d75d585454ccdc73a3a +size 7535 diff --git a/assets/voxygen/element/frames/loading_screen/loading_bg.png b/assets/voxygen/element/frames/loading_screen/loading_bg.png new file mode 100644 index 0000000000..5816bdd8ce --- /dev/null +++ b/assets/voxygen/element/frames/loading_screen/loading_bg.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:416be9c1c6c33448e20357875ba75a065c44fda86d514959953cc45878b89e66 +size 2109 diff --git a/assets/voxygen/element/frames/loading_screen/loading_bg_l.png b/assets/voxygen/element/frames/loading_screen/loading_bg_l.png new file mode 100644 index 0000000000..16baead23d --- /dev/null +++ b/assets/voxygen/element/frames/loading_screen/loading_bg_l.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:a67beeedbc47ca2dcb9b10edcd93d8770ee5f1cb7a8d26a14f983be686d01d32 +size 1882 diff --git a/assets/voxygen/element/frames/loading_screen/loading_bg_r.png b/assets/voxygen/element/frames/loading_screen/loading_bg_r.png new file mode 100644 index 0000000000..962c73dfea --- /dev/null +++ b/assets/voxygen/element/frames/loading_screen/loading_bg_r.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:f6d32d247376568b829d9e927f52e530b1fa179946f3e9f36e1c6468c5414f34 +size 1879 diff --git a/assets/voxygen/element/icons/dice.png b/assets/voxygen/element/icons/dice.png new file mode 100644 index 0000000000..1140a3a9b9 --- /dev/null +++ b/assets/voxygen/element/icons/dice.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:432c32c6a456879c7317b3617da67c2b10943b619a562d577ba73a5bb60af442 +size 1897 diff --git a/assets/voxygen/element/icons/dice_hover.png b/assets/voxygen/element/icons/dice_hover.png new file mode 100644 index 0000000000..4e4c07eaf5 --- /dev/null +++ b/assets/voxygen/element/icons/dice_hover.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:b8c0e315098e0b7ac38bccdf186c76e99ff3bd913cd1fd0144722f8cf8f3fd7a +size 1929 diff --git a/assets/voxygen/element/icons/dice_press.png b/assets/voxygen/element/icons/dice_press.png new file mode 100644 index 0000000000..a1801a1aa8 --- /dev/null +++ b/assets/voxygen/element/icons/dice_press.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:c4c333e3da16235d65d33cd7ee8e6aa71b084283a334dc881c7b66ab8bba44e1 +size 1925 diff --git a/assets/voxygen/element/misc_bg/settings_bg.png b/assets/voxygen/element/misc_bg/settings_bg.png new file mode 100644 index 0000000000..f885f7e097 --- /dev/null +++ b/assets/voxygen/element/misc_bg/settings_bg.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:c270d83f1a0d71ea27f5e17a5355419d75954d504fd7f94a94cf6fbaaf063a07 +size 5746 diff --git a/assets/voxygen/element/misc_bg/settings_frame.png b/assets/voxygen/element/misc_bg/settings_frame.png new file mode 100644 index 0000000000..ae3029deda --- /dev/null +++ b/assets/voxygen/element/misc_bg/settings_frame.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:05fc09264bc450c67bdb85c9b16fd44baa7eb6867a33bd5de4331306b872b30f +size 5905 diff --git a/assets/voxygen/element/misc_bg/textbox_mid.png b/assets/voxygen/element/misc_bg/textbox_mid.png index 76e2f1ae6b..ba42aed02a 100644 --- a/assets/voxygen/element/misc_bg/textbox_mid.png +++ b/assets/voxygen/element/misc_bg/textbox_mid.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:f67d0de987b60ed50fea6b838df87aa0d23a846af0d8ece4f3b162136fc70a16 -size 1389 +oid sha256:02925cbd4b0475a0ef589b3367cea12cfea4c8ed634bf1c0e6fb13d078c980f7 +size 2204 diff --git a/assets/voxygen/i18n/de_DE.ron b/assets/voxygen/i18n/de_DE.ron index c01de37556..f00f7bd0ef 100644 --- a/assets/voxygen/i18n/de_DE.ron +++ b/assets/voxygen/i18n/de_DE.ron @@ -71,6 +71,14 @@ VoxygenLocalization( "common.decline": "Ablehnen", "common.you": "Ihr", "common.automatic": "Auto", + "common.rand_appearance": "Zufälliges Aussehen und Name", + // Settings Window title + "common.interface_settings": "Interface Einstellungen", + "common.gameplay_settings": "Spiel Einstellungen", + "common.controls_settings": "Steuerung", + "common.video_settings": "Grafik Einstellungen", + "common.sound_settings": "Audio Einstellungen", + "common.language_settings": "Sprache", /// End Common section // Message when connection to the server is lost @@ -97,6 +105,7 @@ VoxygenLocalization( "main.creating_world": "Erschaffe Welt ", "main.tip": "Tipp:", "hud.settings.loading_tips": "Ladebildschirm-Tipps", + "hud.settings.ambiance": "Umgebungs Beleuchtung", /// Start Main screen section @@ -141,6 +150,8 @@ https://account.veloren.net. "main.login.invalid_character": "Ungültiger Charakter", "main.login.client_crashed": "Client abgestürzt", "main.login.not_on_whitelist": "Ihr braucht einen Whitelist Eintrag durch den Server Admin", + "main.login.banned": "Ihr wurdet aus folgendem Grund gebannt", + "main.login.kicked": "Ihr wurdet aus folgendem Grund gekickt", /// End Main screen section @@ -160,11 +171,24 @@ https://account.veloren.net. // Chat outputs "hud.chat.online_msg": "[{name}] ist jetzt online.", - "hud.chat.offline_msg": "[{name}] ist jetzt offline.", + "hud.chat.offline_msg": "{name} ist jetzt offline.", "hud.chat.loot_msg": "Ihr erhaltet [{item}]", "hud.chat.loot_fail": "Euer Inventar ist voll!", "hud.chat.goodbye": "Verbindung getrennt.", "hud.chat.connection_lost": "Verbindung unterbrochen. Trenne Verbindung in {time} Sekunden.", + + "hud.chat.default_death_msg": "[{name}] ist gestorben", + "hud.chat.environmental_kill_msg": "[{name}] starb durch {environment}", + "hud.chat.fall_kill_msg": "[{name}] starb durch Fallschaden", + "hud.chat.suicide_msg": "[{name}] hat sich selbst getötet", + + "hud.chat.pvp_melee_kill_msg": "[{attacker}] hat [{victim}] besiegt", + "hud.chat.pvp_ranged_kill_msg": "[{attacker}] hat [{victim}] aus der Ferne getötet", + "hud.chat.pvp_explosion_kill_msg": "[{attacker}] hat [{victim}] hochgejagt", + + "hud.chat.npc_melee_kill_msg": "{attacker} tötete [{victim}]", + "hud.chat.npc_ranged_kill_msg": "{attacker} tötete [{victim}]", + "hud.chat.npc_explosion_kill_msg": "{attacker} hat [{victim}] hochgejagt", // SCT outputs "hud.sct.experience": "{amount} Erf", @@ -303,7 +327,10 @@ magischen Gegenstände ergattern?"#, "hud.settings.resolution": "Auflösung", "hud.settings.bit_depth": "Bittiefe", "hud.settings.refresh_rate": "Bildwiederholrate", - "hud.settings.fullscreen": "Vollbild", + "hud.settings.fullscreen": "Vollbild", + "hud.settings.fullscreen_mode": "Vollbild-Modus", + "hud.settings.fullscreen_mode.exclusive": "Exklusiv", + "hud.settings.fullscreen_mode.borderless": "Rahmenlos", "hud.settings.lighting_rendering_mode": "Beleuchtung", "hud.settings.lighting_rendering_mode.ashikhmin": "Typ A", "hud.settings.lighting_rendering_mode.blinnphong": "Typ B", @@ -314,6 +341,7 @@ magischen Gegenstände ergattern?"#, "hud.settings.shadow_rendering_mode.map": "Voll", "hud.settings.lod_detail": "LoD Detail", "hud.settings.save_window_size": "Größe speichern", + "hud.settings.shadow_rendering_mode.map.resolution": "Auflösung", "hud.settings.music_volume": "Musiklautstärke", "hud.settings.sound_effect_volume": "Geräuschlautstärke", diff --git a/assets/voxygen/i18n/en.ron b/assets/voxygen/i18n/en.ron index ad91907634..553ff212db 100644 --- a/assets/voxygen/i18n/en.ron +++ b/assets/voxygen/i18n/en.ron @@ -56,6 +56,7 @@ VoxygenLocalization( "common.controls": "Controls", "common.video": "Graphics", "common.sound": "Sound", + "common.languages": "Languages", "common.resume": "Resume", "common.characters": "Characters", "common.close": "Close", @@ -73,6 +74,14 @@ VoxygenLocalization( "common.fatal_error": "Fatal Error", "common.you": "You", "common.automatic": "Auto", + "common.random": "Random", + // Settings Window title + "common.interface_settings": "Interface Settings", + "common.gameplay_settings": "Gameplay Settings", + "common.controls_settings": "Controls Settings", + "common.video_settings": "Graphics Settings", + "common.sound_settings": "Sound Settings", + "common.language_settings": "Language Settings", // Message when connection to the server is lost "common.connection_lost": r#"Connection lost! @@ -92,6 +101,7 @@ Is the client up to date?"#, "common.weapons.staff": "Staff", "common.weapons.bow": "Bow", "common.weapons.hammer": "Hammer", + "common.rand_appearance": "Random appearance and name", /// End Common section @@ -161,15 +171,15 @@ https://account.veloren.net."#, "hud.press_key_to_toggle_debug_info_fmt": "Press {key} to toggle debug info", // Chat outputs - "hud.chat.online_msg": "[{name}] came online", - "hud.chat.offline_msg": "[{name}] went offline", + "hud.chat.online_msg": "[{name}] is online now", + "hud.chat.offline_msg": "{name} went offline", "hud.chat.default_death_msg": "[{name}] died", "hud.chat.environmental_kill_msg": "[{name}] died in {environment}", "hud.chat.fall_kill_msg": "[{name}] died from fall damage", "hud.chat.suicide_msg": "[{name}] died from self-inflicted wounds", - "hud.chat.pvp_melee_kill_msg": "[{attacker}] killed [{victim}]", + "hud.chat.pvp_melee_kill_msg": "[{attacker}] defeated [{victim}]", "hud.chat.pvp_ranged_kill_msg": "[{attacker}] shot [{victim}]", "hud.chat.pvp_explosion_kill_msg": "[{attacker}] blew up [{victim}]", @@ -262,7 +272,7 @@ magically infused items?"#, "hud.map.map_title": "Map", "hud.map.qlog_title": "Quests", - // Settings + // Settings "hud.settings.general": "General", "hud.settings.none": "None", "hud.settings.press_behavior.toggle": "Toggle", @@ -309,6 +319,7 @@ magically infused items?"#, "hud.settings.maximum_fps": "Maximum FPS", "hud.settings.fov": "Field of View (deg)", "hud.settings.gamma": "Gamma", + "hud.settings.ambiance": "Ambiance Brightness", "hud.settings.antialiasing_mode": "AntiAliasing Mode", "hud.settings.cloud_rendering_mode": "Cloud Rendering Mode", "hud.settings.fluid_rendering_mode": "Fluid Rendering Mode", @@ -514,7 +525,7 @@ Protection "Veloren is still in Pre-Alpha. We do our best to improve it every day!", "If you want to join the Dev-Team or just have a chat with us join our Discord-Server.", "You can toggle showing your amount of health on the healthbar in the settings.", - "In order to see your stats click the 'Stats' button in your inventory.", + "In order to see your stats click the 'Stats' button in the inventory.", ], "npc.speech.villager_under_attack": [ "Help, I'm under attack!", diff --git a/assets/voxygen/shaders/include/globals.glsl b/assets/voxygen/shaders/include/globals.glsl index b1ceefe8bd..4f5d74333f 100644 --- a/assets/voxygen/shaders/include/globals.glsl +++ b/assets/voxygen/shaders/include/globals.glsl @@ -17,6 +17,7 @@ uniform u_globals { uvec4 medium; ivec4 select_pos; vec4 gamma; + float ambiance; // 0 - FirstPerson // 1 - ThirdPerson uint cam_mode; diff --git a/assets/voxygen/shaders/include/sky.glsl b/assets/voxygen/shaders/include/sky.glsl index a80dd33d9a..5e2f58d0c2 100644 --- a/assets/voxygen/shaders/include/sky.glsl +++ b/assets/voxygen/shaders/include/sky.glsl @@ -3,6 +3,7 @@ #include #include #include +#include // Information about an approximately directional light, like the sun or moon. struct DirectionalLight { @@ -307,8 +308,7 @@ float get_sun_diffuse2(DirectionalLight sun_info, DirectionalLight moon_info, ve // float ambient_sides = 0.5 - 0.5 * min(abs(dot(-norm, sun_dir)), abs(dot(-norm, moon_dir))); // float ambient_sides = clamp(mix(0.5, 0.0, abs(dot(-norm, sun_dir)) * mix(0.0, 1.0, abs(sun_dir.z) * 10000.0) * 10000.0), 0.0, 0.5); // float ambient_sides = clamp(mix(0.5, 0.0, abs(dot(-norm, sun_dir)) * mix(0.0, 1.0, abs(sun_dir.z) * 10000.0) * 10000.0), 0.0, 0.5); - - emitted_light = light_frac + k_a * PERSISTENT_AMBIANCE * MU_SCATTER; + emitted_light = light_frac + k_a * PERSISTENT_AMBIANCE * ambiance * 0.1 * MU_SCATTER; // emitted_light = k_a * light_frac * (/*ambient_sides + */SUN_AMBIANCE * /*sun_light*/sun_chroma + /*vec3(moon_light)*/MOON_AMBIANCE * moon_chroma) + PERSISTENT_AMBIANCE; reflected_light = R_t_r * ( diff --git a/client/src/lib.rs b/client/src/lib.rs index e588cdd930..5750dd5f0b 100644 --- a/client/src/lib.rs +++ b/client/src/lib.rs @@ -1370,10 +1370,11 @@ impl Client { ServerMsg::ExitIngameCleanup => { self.clean_state(); }, - ServerMsg::InventoryUpdate(inventory, event) => { + ServerMsg::InventoryUpdate(mut inventory, event) => { match event { InventoryUpdateEvent::CollectFailed => {}, _ => { + inventory.recount_items(); // Push the updated inventory component to the client self.state.write_component(self.entity, inventory); }, diff --git a/common/src/comp/inventory/mod.rs b/common/src/comp/inventory/mod.rs index 146a1d4816..25a26a4aca 100644 --- a/common/src/comp/inventory/mod.rs +++ b/common/src/comp/inventory/mod.rs @@ -127,7 +127,7 @@ impl Inventory { match self.slots.get_mut(cell) { Some(slot) => { let old = core::mem::replace(slot, Some(item)); - if old.is_some() { + if old.is_none() { self.recount_items(); } Ok(old) diff --git a/voxygen/src/hud/img_ids.rs b/voxygen/src/hud/img_ids.rs index 04f60f0b3a..6548e91f48 100644 --- a/voxygen/src/hud/img_ids.rs +++ b/voxygen/src/hud/img_ids.rs @@ -206,8 +206,8 @@ image_ids! { window_3: "voxygen.element.frames.window_3", esc_frame: "voxygen.element.frames.esc_menu", // Settings - settings_frame_r: "voxygen.element.frames.settings_r", - settings_frame_l: "voxygen.element.frames.settings_l", + settings_bg: "voxygen.element.misc_bg.settings_bg", + settings_frame: "voxygen.element.misc_bg.settings_frame", // Close-Button close_btn: "voxygen.element.buttons.close_btn", diff --git a/voxygen/src/hud/mod.rs b/voxygen/src/hud/mod.rs index c99cef03a3..6bb5a63b79 100644 --- a/voxygen/src/hud/mod.rs +++ b/voxygen/src/hud/mod.rs @@ -74,7 +74,6 @@ const TEXT_GRAY_COLOR: Color = Color::Rgba(0.5, 0.5, 0.5, 1.0); const TEXT_DULL_RED_COLOR: Color = Color::Rgba(0.56, 0.2, 0.2, 1.0); const TEXT_BG: Color = Color::Rgba(0.0, 0.0, 0.0, 1.0); const TEXT_COLOR_GREY: Color = Color::Rgba(1.0, 1.0, 1.0, 0.5); -const MENU_BG: Color = Color::Rgba(0.0, 0.0, 0.0, 0.4); //const TEXT_COLOR_2: Color = Color::Rgba(0.0, 0.0, 0.0, 1.0); const TEXT_COLOR_3: Color = Color::Rgba(1.0, 1.0, 1.0, 0.1); const TEXT_BIND_CONFLICT_COLOR: Color = Color::Rgba(1.0, 0.0, 0.0, 1.0); @@ -122,6 +121,8 @@ const DEFAULT_NPC: Color = Color::Rgba(1.0, 1.0, 1.0, 1.0); const UI_MAIN: Color = Color::Rgba(0.61, 0.70, 0.70, 1.0); // Greenish Blue //const UI_MAIN: Color = Color::Rgba(0.1, 0.1, 0.1, 0.97); // Dark const UI_HIGHLIGHT_0: Color = Color::Rgba(0.79, 1.09, 1.09, 1.0); +// Pull-Down menu BG color +const MENU_BG: Color = Color::Rgba(0.1, 0.12, 0.12, 1.0); //const UI_DARK_0: Color = Color::Rgba(0.25, 0.37, 0.37, 1.0); /// Distance at which nametags are visible for group members @@ -283,6 +284,7 @@ pub enum Event { ChangeMaxFPS(u32), ChangeFOV(u16), ChangeGamma(f32), + ChangeAmbiance(f32), MapZoom(f64), AdjustWindowSize([u16; 2]), ChangeFullscreenMode(FullScreenSettings), @@ -564,6 +566,7 @@ pub struct Hud { tab_complete: Option, pulse: f32, velocity: f32, + fps: f32, voxygen_i18n: std::sync::Arc, slot_manager: slots::SlotManager, hotbar: hotbar::State, @@ -659,6 +662,7 @@ impl Hud { force_chat_cursor: None, tab_complete: None, pulse: 0.0, + fps: 0.0, velocity: 0.0, voxygen_i18n, slot_manager, @@ -690,7 +694,10 @@ impl Hud { let (ref mut ui_widgets, ref mut tooltip_manager) = self.ui.set_widgets(); // pulse time for pulsating elements self.pulse = self.pulse + dt.as_secs_f32(); - + // FPS + // TODO Get actual FPS from session.rs instead of TPS from the client as they + // may be different in the future + self.fps = 1.0 / client.state().get_delta_time(); let version = format!( "{}-{}", env!("CARGO_PKG_VERSION"), @@ -1865,6 +1872,7 @@ impl Hud { &self.imgs, &self.fonts, &self.voxygen_i18n, + self.fps, ) .set(self.ids.settings_window, ui_widgets) { @@ -1968,6 +1976,9 @@ impl Hud { settings_window::Event::AdjustGamma(new_gamma) => { events.push(Event::ChangeGamma(new_gamma)); }, + settings_window::Event::AdjustAmbiance(new_ambiance) => { + events.push(Event::ChangeAmbiance(new_ambiance)); + }, settings_window::Event::ChangeRenderMode(new_render_mode) => { events.push(Event::ChangeRenderMode(new_render_mode)); }, diff --git a/voxygen/src/hud/settings_window.rs b/voxygen/src/hud/settings_window.rs index 62f3a9cfa1..5a4475a86e 100644 --- a/voxygen/src/hud/settings_window.rs +++ b/voxygen/src/hud/settings_window.rs @@ -1,6 +1,7 @@ use super::{ img_ids::Imgs, BarNumbers, CrosshairType, PressBehavior, ShortcutNumbers, Show, XpBar, - ERROR_COLOR, MENU_BG, TEXT_BIND_CONFLICT_COLOR, TEXT_COLOR, + CRITICAL_HP_COLOR, ERROR_COLOR, HP_COLOR, LOW_HP_COLOR, MANA_COLOR, MENU_BG, + TEXT_BIND_CONFLICT_COLOR, TEXT_COLOR, UI_HIGHLIGHT_0, UI_MAIN, }; use crate::{ i18n::{list_localizations, LanguageMetadata, VoxygenLocalization}, @@ -18,6 +19,7 @@ use conrod_core::{ }; use core::convert::TryFrom; +use inline_tweak::*; use itertools::Itertools; use std::iter::once; use winit::monitor::VideoMode; @@ -26,6 +28,9 @@ const FPS_CHOICES: [u32; 11] = [15, 30, 40, 50, 60, 90, 120, 144, 240, 300, 500] widget_ids! { struct Ids { + frame, + tabs_align, + icon, settings_content, settings_content_r, settings_icon, @@ -53,6 +58,7 @@ widget_ids! { gameplay, controls, languages, + language_list[], languages_list, rectangle, general_txt, @@ -92,6 +98,8 @@ widget_ids! { sound, test, video, + language, + fps_counter, vd_slider, vd_text, vd_value, @@ -113,6 +121,9 @@ widget_ids! { gamma_slider, gamma_text, gamma_value, + ambiance_slider, + ambiance_text, + ambiance_value, aa_mode_text, aa_mode_list, cloud_mode_text, @@ -204,6 +215,7 @@ pub enum SettingsTab { Sound, Gameplay, Controls, + Lang, } #[derive(WidgetCommon)] @@ -213,6 +225,7 @@ pub struct SettingsWindow<'a> { imgs: &'a Imgs, fonts: &'a ConrodVoxygenFonts, localized_strings: &'a std::sync::Arc, + fps: f32, #[conrod(common_builder)] common: widget::CommonBuilder, } @@ -224,6 +237,7 @@ impl<'a> SettingsWindow<'a> { imgs: &'a Imgs, fonts: &'a ConrodVoxygenFonts, localized_strings: &'a std::sync::Arc, + fps: f32, ) -> Self { Self { global_state, @@ -231,6 +245,7 @@ impl<'a> SettingsWindow<'a> { imgs, fonts, localized_strings, + fps, common: widget::CommonBuilder::default(), } } @@ -260,6 +275,7 @@ pub enum Event { AdjustFOV(u16), AdjustLodDetail(u32), AdjustGamma(f32), + AdjustAmbiance(f32), AdjustWindowSize([u16; 2]), ChangeFullscreenMode(FullScreenSettings), ToggleParticlesEnabled(bool), @@ -311,77 +327,88 @@ impl<'a> Widget for SettingsWindow<'a> { let mut events = Vec::new(); let bar_values = self.global_state.settings.gameplay.bar_numbers; + let tab_font_scale = 18; //let mut xp_bar = self.global_state.settings.gameplay.xp_bar; - // Frame Alignment - Rectangle::fill_with([824.0, 488.0], color::TRANSPARENT) - .middle_of(ui.window) - .set(state.ids.settings_bg, ui); // Frame - Image::new(self.imgs.settings_frame_l) - .top_left_with_margins_on(state.ids.settings_bg, 0.0, 0.0) - .w_h(412.0, 488.0) - .set(state.ids.settings_l, ui); - Image::new(self.imgs.settings_frame_r) - .right_from(state.ids.settings_l, 0.0) - .parent(state.ids.settings_bg) - .w_h(412.0, 488.0) - .set(state.ids.settings_r, ui); + Image::new(self.imgs.settings_bg) + .w_h(1052.0, 886.0) + .mid_top_with_margin_on(ui.window, 5.0) + .color(Some(UI_MAIN)) + .set(state.ids.settings_bg, ui); + + Image::new(self.imgs.settings_frame) + .w_h(1052.0, 886.0) + .middle_of(state.ids.settings_bg) + .color(Some(UI_HIGHLIGHT_0)) + .set(state.ids.frame, ui); + // Content Alignment - Rectangle::fill_with([198.0 * 4.0, 97.0 * 4.0], color::TRANSPARENT) - .top_right_with_margins_on(state.ids.settings_r, 21.0 * 4.0, 4.0 * 4.0) + Rectangle::fill_with([814.0, 834.0], color::TRANSPARENT) + .top_right_with_margins_on(state.ids.frame, 46.0, 2.0) .scroll_kids() .scroll_kids_vertically() .set(state.ids.settings_content, ui); - Rectangle::fill_with([198.0 * 4.0 * 0.5, 97.0 * 4.0], color::TRANSPARENT) + Rectangle::fill_with([814.0 / 2.0, 834.0], color::TRANSPARENT) .top_right_with_margins_on(state.ids.settings_content, 0.0, 0.0) - .parent(state.ids.settings_content) .set(state.ids.settings_content_r, ui); Scrollbar::y_axis(state.ids.settings_content) .thickness(5.0) .rgba(0.33, 0.33, 0.33, 1.0) .set(state.ids.settings_scrollbar, ui); + + // Tabs Content Alignment + Rectangle::fill_with([232.0, 814.0], color::TRANSPARENT) + .top_left_with_margins_on(state.ids.frame, 44.0, 2.0) + .scroll_kids() + .scroll_kids_vertically() + .set(state.ids.tabs_align, ui); + + // Icon + Image::new(self.imgs.settings) + .w_h(29.0 * 1.5, 25.0 * 1.5) + .top_left_with_margins_on(state.ids.frame, 2.0, 1.0) + .set(state.ids.icon, ui); + // Title + Text::new(match self.show.settings_tab { + SettingsTab::Interface => self.localized_strings.get("common.interface_settings"), + SettingsTab::Gameplay => self.localized_strings.get("common.gameplay_settings"), + SettingsTab::Controls => self.localized_strings.get("common.controls_settings"), + SettingsTab::Video => self.localized_strings.get("common.video_settings"), + SettingsTab::Sound => self.localized_strings.get("common.sound_settings"), + SettingsTab::Lang => self.localized_strings.get("common.language_settings"), + }) + .mid_top_with_margin_on(state.ids.frame, 3.0) + .font_id(self.fonts.cyri.conrod_id) + .font_size(self.fonts.cyri.scale(29)) + .color(TEXT_COLOR) + .set(state.ids.settings_title, ui); + // X-Button if Button::image(self.imgs.close_button) - .w_h(28.0, 28.0) - .hover_image(self.imgs.close_button_hover) - .press_image(self.imgs.close_button_press) - .top_right_with_margins_on(state.ids.settings_r, 0.0, 0.0) + .w_h(24.0, 25.0) + .hover_image(self.imgs.close_btn_hover) + .press_image(self.imgs.close_btn_press) + .top_right_with_margins_on(state.ids.frame, 0.0, 0.0) .set(state.ids.settings_close, ui) .was_clicked() { events.push(Event::Close); } - // Title - Text::new(&self.localized_strings.get("common.settings")) - .mid_top_with_margin_on(state.ids.settings_bg, 5.0) - .font_size(self.fonts.cyri.scale(14)) - .font_id(self.fonts.cyri.conrod_id) - .color(TEXT_COLOR) - .set(state.ids.settings_title, ui); - // 1) Interface Tab ------------------------------- if Button::image(if let SettingsTab::Interface = self.show.settings_tab { - self.imgs.settings_button_pressed + self.imgs.selection } else { - self.imgs.settings_button + self.imgs.nothing }) - .w_h(31.0 * 4.0, 12.0 * 4.0) - .hover_image(if let SettingsTab::Interface = self.show.settings_tab { - self.imgs.settings_button_pressed - } else { - self.imgs.settings_button_hover - }) - .press_image(if let SettingsTab::Interface = self.show.settings_tab { - self.imgs.settings_button_pressed - } else { - self.imgs.settings_button_press - }) - .top_left_with_margins_on(state.ids.settings_l, 8.0 * 4.0, 2.0 * 4.0) + .w_h(230.0, 48.0) + .hover_image(self.imgs.selection_hover) + .press_image(self.imgs.selection_press) + .mid_top_with_margin_on(state.ids.tabs_align, 28.0) .label(&self.localized_strings.get("common.interface")) - .label_font_size(self.fonts.cyri.scale(14)) + .label_font_size(self.fonts.cyri.scale(tab_font_scale)) .label_font_id(self.fonts.cyri.conrod_id) .label_color(TEXT_COLOR) .set(state.ids.interface, ui) @@ -1219,61 +1246,21 @@ impl<'a> Widget for SettingsWindow<'a> { .set(state.ids.chat_char_name_text, ui); // TODO Show account name in chat - - // TODO Show account names in social window - - // Language select drop down - Text::new(&self.localized_strings.get("common.languages")) - .down_from(state.ids.chat_char_name_button, 20.0) - .font_size(self.fonts.cyri.scale(18)) - .font_id(self.fonts.cyri.conrod_id) - .color(TEXT_COLOR) - .set(state.ids.language_text, ui); - - let selected_language = &self.global_state.settings.language.selected_language; - let language_list = list_localizations(); - let language_list_str: Vec = language_list - .iter() - .map(|e| e.language_name.clone()) - .collect(); - let selected = language_list - .iter() - .position(|x| x.language_identifier.contains(selected_language)); - - if let Some(clicked) = DropDownList::new(&language_list_str, selected) - .down_from(state.ids.language_text, 8.0) - .w_h(200.0, 22.0) - .color(MENU_BG) - .label_color(TEXT_COLOR) - .label_font_id(self.fonts.cyri.conrod_id) - .set(state.ids.languages_list, ui) - { - events.push(Event::ChangeLanguage(Box::new( - language_list[clicked].to_owned(), - ))); - } } // 2) Gameplay Tab -------------------------------- if Button::image(if let SettingsTab::Gameplay = self.show.settings_tab { - self.imgs.settings_button_pressed + self.imgs.selection } else { - self.imgs.settings_button + self.imgs.nothing }) - .w_h(31.0 * 4.0, 12.0 * 4.0) - .hover_image(if let SettingsTab::Gameplay = self.show.settings_tab { - self.imgs.settings_button_pressed - } else { - self.imgs.settings_button_hover - }) - .press_image(if let SettingsTab::Gameplay = self.show.settings_tab { - self.imgs.settings_button_pressed - } else { - self.imgs.settings_button_press - }) - .right_from(state.ids.interface, 0.0) + .w_h(230.0, 48.0) + .hover_image(self.imgs.selection_hover) + .press_image(self.imgs.selection_press) + .down_from(state.ids.interface, 0.0) + .parent(state.ids.tabs_align) .label(&self.localized_strings.get("common.gameplay")) - .label_font_size(self.fonts.cyri.scale(14)) + .label_font_size(self.fonts.cyri.scale(tab_font_scale)) .label_font_id(self.fonts.cyri.conrod_id) .label_color(TEXT_COLOR) .set(state.ids.gameplay, ui) @@ -1546,24 +1533,17 @@ impl<'a> Widget for SettingsWindow<'a> { // 3) Controls Tab -------------------------------- if Button::image(if let SettingsTab::Controls = self.show.settings_tab { - self.imgs.settings_button_pressed + self.imgs.selection } else { - self.imgs.settings_button + self.imgs.nothing }) - .w_h(31.0 * 4.0, 12.0 * 4.0) - .hover_image(if let SettingsTab::Controls = self.show.settings_tab { - self.imgs.settings_button_pressed - } else { - self.imgs.settings_button_hover - }) - .press_image(if let SettingsTab::Controls = self.show.settings_tab { - self.imgs.settings_button_pressed - } else { - self.imgs.settings_button_press - }) - .right_from(state.ids.gameplay, 0.0) + .w_h(230.0, 48.0) + .hover_image(self.imgs.selection_hover) + .press_image(self.imgs.selection_press) + .down_from(state.ids.gameplay, 0.0) + .parent(state.ids.tabs_align) .label(&self.localized_strings.get("common.controls")) - .label_font_size(self.fonts.cyri.scale(14)) + .label_font_size(self.fonts.cyri.scale(tab_font_scale)) .label_font_id(self.fonts.cyri.conrod_id) .label_color(TEXT_COLOR) .set(state.ids.controls, ui) @@ -1685,25 +1665,17 @@ impl<'a> Widget for SettingsWindow<'a> { // 4) Video Tab ----------------------------------- if Button::image(if let SettingsTab::Video = self.show.settings_tab { - self.imgs.settings_button_pressed + self.imgs.selection } else { - self.imgs.settings_button + self.imgs.nothing }) - .w_h(31.0 * 4.0, 12.0 * 4.0) - .hover_image(if let SettingsTab::Video = self.show.settings_tab { - self.imgs.settings_button_pressed - } else { - self.imgs.settings_button_hover - }) - .press_image(if let SettingsTab::Video = self.show.settings_tab { - self.imgs.settings_button_pressed - } else { - self.imgs.settings_button_press - }) - .right_from(state.ids.controls, 0.0) + .w_h(230.0, 48.0) + .hover_image(self.imgs.selection_hover) + .press_image(self.imgs.selection_press) + .down_from(state.ids.controls, 0.0) + .parent(state.ids.tabs_align) .label(&self.localized_strings.get("common.video")) - .parent(state.ids.settings_r) - .label_font_size(self.fonts.cyri.scale(14)) + .label_font_size(self.fonts.cyri.scale(tab_font_scale)) .label_font_id(self.fonts.cyri.conrod_id) .label_color(TEXT_COLOR) .set(state.ids.video, ui) @@ -1714,6 +1686,20 @@ impl<'a> Widget for SettingsWindow<'a> { // Contents if let SettingsTab::Video = self.show.settings_tab { + // FPS/TPS Counter + //let text_col = match + let fps_col = match self.fps as i32 { + 0..=14 => CRITICAL_HP_COLOR, + 15..=29 => LOW_HP_COLOR, + 30..=50 => HP_COLOR, + _ => MANA_COLOR, + }; + Text::new(&format!("FPS: {:.0}", self.fps)) + .color(fps_col) + .top_right_with_margins_on(state.ids.settings_content_r, 10.0, 10.0) + .font_id(self.fonts.cyri.conrod_id) + .font_size(self.fonts.cyri.scale(18)) + .set(state.ids.fps_counter, ui); // View Distance Text::new(&self.localized_strings.get("hud.settings.view_distance")) .top_left_with_margins_on(state.ids.settings_content, 10.0, 10.0) @@ -1882,12 +1868,52 @@ impl<'a> Widget for SettingsWindow<'a> { events.push(Event::AdjustGamma(2.0f32.powf(new_val as f32 / 8.0))); } - Text::new(&format!("{}", self.global_state.settings.graphics.gamma)) + Text::new(&format!("{:.2}", self.global_state.settings.graphics.gamma)) .right_from(state.ids.gamma_slider, 8.0) .font_size(self.fonts.cyri.scale(14)) .font_id(self.fonts.cyri.conrod_id) .color(TEXT_COLOR) .set(state.ids.gamma_value, ui); + + //Ambiance Brightness + // 320.0 = maximum brightness in shaders + let min_ambiance = 10.0; + let max_ambiance = 80.0; + if let Some(new_val) = ImageSlider::discrete( + self.global_state.settings.graphics.ambiance.round() as i32, + min_ambiance as i32, + max_ambiance as i32, + self.imgs.slider_indicator, + self.imgs.slider, + ) + .w_h(104.0, 22.0) + .right_from(state.ids.gamma_slider, 50.0) + .track_breadth(12.0) + .slider_length(10.0) + .pad_track((5.0, 5.0)) + .set(state.ids.ambiance_slider, ui) + { + events.push(Event::AdjustAmbiance(new_val as f32)); + } + Text::new(&self.localized_strings.get("hud.settings.ambiance")) + .up_from(state.ids.ambiance_slider, 8.0) + .font_size(self.fonts.cyri.scale(14)) + .font_id(self.fonts.cyri.conrod_id) + .color(TEXT_COLOR) + .set(state.ids.ambiance_text, ui); + Text::new(&format!( + "{:.0}%", + ((self.global_state.settings.graphics.ambiance - min_ambiance) + / (max_ambiance - min_ambiance) + * 100.0) + .round() + )) + .right_from(state.ids.ambiance_slider, 8.0) + .font_size(self.fonts.cyri.scale(14)) + .font_id(self.fonts.cyri.conrod_id) + .color(TEXT_COLOR) + .set(state.ids.ambiance_value, ui); + // Sprites VD if let Some(new_val) = ImageSlider::discrete( self.global_state.settings.graphics.sprite_render_distance, @@ -2485,15 +2511,16 @@ impl<'a> Widget for SettingsWindow<'a> { } // Save current screen size - if Button::image(self.imgs.settings_button) + if Button::image(self.imgs.button) .w_h(31.0 * 5.0, 12.0 * 2.0) - .hover_image(self.imgs.settings_button_hover) - .press_image(self.imgs.settings_button_press) + .hover_image(self.imgs.button_hover) + .press_image(self.imgs.button_press) .down_from(state.ids.fullscreen_mode_list, 12.0) .label(&self.localized_strings.get("hud.settings.save_window_size")) .label_font_size(self.fonts.cyri.scale(14)) .label_color(TEXT_COLOR) .label_font_id(self.fonts.cyri.conrod_id) + .label_y(Relative::Scalar(2.0)) .set(state.ids.save_window_size_button, ui) .was_clicked() { @@ -2509,25 +2536,17 @@ impl<'a> Widget for SettingsWindow<'a> { // 5) Sound Tab ----------------------------------- if Button::image(if let SettingsTab::Sound = self.show.settings_tab { - self.imgs.settings_button_pressed + self.imgs.selection } else { - self.imgs.settings_button + self.imgs.nothing }) - .w_h(31.0 * 4.0, 12.0 * 4.0) - .hover_image(if let SettingsTab::Sound = self.show.settings_tab { - self.imgs.settings_button_pressed - } else { - self.imgs.settings_button_hover - }) - .press_image(if let SettingsTab::Sound = self.show.settings_tab { - self.imgs.settings_button_pressed - } else { - self.imgs.settings_button_press - }) - .right_from(state.ids.video, 0.0) - .parent(state.ids.settings_r) + .w_h(230.0, 48.0) + .hover_image(self.imgs.selection_hover) + .press_image(self.imgs.selection_press) + .down_from(state.ids.video, 0.0) + .parent(state.ids.tabs_align) .label(&self.localized_strings.get("common.sound")) - .label_font_size(self.fonts.cyri.scale(14)) + .label_font_size(self.fonts.cyri.scale(tab_font_scale)) .label_font_id(self.fonts.cyri.conrod_id) .label_color(TEXT_COLOR) .set(state.ids.sound, ui) @@ -2618,6 +2637,70 @@ impl<'a> Widget for SettingsWindow<'a> { } } + // 5) Languages Tab ----------------------------------- + if Button::image(if let SettingsTab::Lang = self.show.settings_tab { + self.imgs.selection + } else { + self.imgs.nothing + }) + .w_h(230.0, 48.0) + .hover_image(self.imgs.selection_hover) + .press_image(self.imgs.selection_press) + .down_from(state.ids.sound, 0.0) + .parent(state.ids.tabs_align) + .label(&self.localized_strings.get("common.languages")) + .label_font_size(self.fonts.cyri.scale(tab_font_scale)) + .label_font_id(self.fonts.cyri.conrod_id) + .label_color(TEXT_COLOR) + .set(state.ids.language, ui) + .was_clicked() + { + events.push(Event::ChangeTab(SettingsTab::Lang)); + } + + // Contents + if let SettingsTab::Lang = self.show.settings_tab { + // List available languages + let selected_language = &self.global_state.settings.language.selected_language; + let language_list = list_localizations(); + if state.ids.language_list.len() < language_list.len() { + state.update(|state| { + state + .ids + .language_list + .resize(language_list.len(), &mut ui.widget_id_generator()) + }); + }; + for (i, language) in language_list.iter().enumerate() { + let button_w = tweak!(400.0); + let button_h = tweak!(50.0); + let button = Button::image(if selected_language == &language.language_identifier { + self.imgs.selection + } else { + self.imgs.nothing + }); + let button = if i == 0 { + button.mid_top_with_margin_on(state.ids.settings_content, 20.0) + } else { + button.mid_bottom_with_margin_on(state.ids.language_list[i - 1], -button_h) + }; + if button + .label(&language.language_name) + .w_h(button_w, button_h) + .hover_image(self.imgs.selection_hover) + .press_image(self.imgs.selection_press) + .label_color(TEXT_COLOR) + .label_font_size(self.fonts.cyri.scale(tweak!(22))) + .label_font_id(self.fonts.cyri.conrod_id) + .label_y(conrod_core::position::Relative::Scalar(2.0)) + .set(state.ids.language_list[i], ui) + .was_clicked() + { + events.push(Event::ChangeLanguage(Box::new(language.to_owned()))); + } + } + }; + events } } diff --git a/voxygen/src/menu/char_selection/mod.rs b/voxygen/src/menu/char_selection/mod.rs index 6846bbdf92..77179db056 100644 --- a/voxygen/src/menu/char_selection/mod.rs +++ b/voxygen/src/menu/char_selection/mod.rs @@ -130,6 +130,7 @@ impl PlayState for CharSelectionState { thread_pool: client.thread_pool(), body: humanoid_body, gamma: global_state.settings.graphics.gamma, + ambiance: global_state.settings.graphics.ambiance, mouse_smoothing: global_state.settings.gameplay.smooth_pan_enable, figure_lod_render_distance: global_state .settings diff --git a/voxygen/src/menu/char_selection/ui.rs b/voxygen/src/menu/char_selection/ui.rs index 1dbef3af5f..ea56d1ba6b 100644 --- a/voxygen/src/menu/char_selection/ui.rs +++ b/voxygen/src/menu/char_selection/ui.rs @@ -14,7 +14,7 @@ use common::{ assets::Asset, character::{Character, CharacterId, CharacterItem, MAX_CHARACTERS_PER_PLAYER}, comp::{self, humanoid}, - LoadoutBuilder, + npc, LoadoutBuilder, }; use conrod_core::{ color, @@ -25,6 +25,8 @@ use conrod_core::{ widget::{text_box::Event as TextBoxEvent, Button, Image, Rectangle, Scrollbar, Text, TextBox}, widget_ids, Borderable, Color, Colorable, Labelable, Positionable, Sizeable, UiCell, Widget, }; +//use inline_tweak::*; +use rand::{thread_rng, Rng}; use std::sync::Arc; const STARTER_HAMMER: &str = "common.items.weapons.hammer.starter_hammer"; @@ -33,6 +35,7 @@ const STARTER_AXE: &str = "common.items.weapons.axe.starter_axe"; const STARTER_STAFF: &str = "common.items.weapons.staff.starter_staff"; const STARTER_SWORD: &str = "common.items.weapons.sword.starter_sword"; const STARTER_DAGGER: &str = "common.items.weapons.dagger.starter_dagger"; +//const STARTER_SCEPTRE: &str = "common.items.weapons.dagger.starter_dagger"; // UI Color-Theme const UI_MAIN: Color = Color::Rgba(0.61, 0.70, 0.70, 1.0); // Greenish Blue @@ -151,6 +154,7 @@ widget_ids! { species_6, body_type_1, body_type_2, + random_button, // Tools sword, @@ -209,6 +213,11 @@ image_ids! { bow: "voxygen.element.icons.bow", staff: "voxygen.element.icons.staff", + // Dice icons + dice: "voxygen.element.icons.dice", + dice_hover: "voxygen.element.icons.dice_hover", + dice_press: "voxygen.element.icons.dice_press", + // Species Icons human_m: "voxygen.element.icons.human_m", human_f: "voxygen.element.icons.human_f", @@ -858,6 +867,7 @@ impl CharSelectionUi { loadout: _, tool, } => { + let mut rng = thread_rng(); let mut to_select = false; // Back Button if Button::image(self.imgs.button) @@ -1359,6 +1369,31 @@ impl CharSelectionUi { { *tool = Some(STARTER_AXE); } + // Random button + if Button::image(self.imgs.dice) + .wh([35.0; 2]) + .bottom_left_with_margins_on(self.ids.name_input, 15.0, -45.0) + .hover_image(self.imgs.dice_hover) + .press_image(self.imgs.dice_press) + .with_tooltip( + tooltip_manager, + &self.voxygen_i18n.get("common.rand_appearance"), + "", + &tooltip_human, + ) + .set(self.ids.random_button, ui_widgets) + .was_clicked() + { + body.hair_style = + rng.gen_range(0, body.species.num_hair_styles(body.body_type)); + body.beard = rng.gen_range(0, body.species.num_beards(body.body_type)); + body.accessory = rng.gen_range(0, body.species.num_accessories(body.body_type)); + body.hair_color = rng.gen_range(0, body.species.num_hair_colors()); + body.skin = rng.gen_range(0, body.species.num_skin_colors()); + body.eye_color = rng.gen_range(0, body.species.num_eye_colors()); + body.eyes = rng.gen_range(0, body.species.num_eyes(body.body_type)); + *name = npc::get_npc_name(npc::NpcKind::Humanoid).to_string(); + } // Sliders let (cyri, cyri_size, slider_indicator, slider_range) = ( self.fonts.cyri.conrod_id, diff --git a/voxygen/src/menu/main/ui.rs b/voxygen/src/menu/main/ui.rs index a4de9e9c51..bd51f3476b 100644 --- a/voxygen/src/menu/main/ui.rs +++ b/voxygen/src/menu/main/ui.rs @@ -18,6 +18,7 @@ use conrod_core::{ widget_ids, Borderable, Color, Colorable, Labelable, Positionable, Sizeable, Widget, }; use image::DynamicImage; +//use inline_tweak::*; use rand::{seq::SliceRandom, thread_rng, Rng}; use std::time::Duration; @@ -83,6 +84,10 @@ widget_ids! { // Loading Screen Tips tip_txt_bg, tip_txt, + // Loading Screen Artwork + mid, + left, + right, } } @@ -103,6 +108,9 @@ image_ids! { button_press: "voxygen.element.buttons.button_press", input_bg: "voxygen.element.misc_bg.textbox_mid", //disclaimer: "voxygen.element.frames.disclaimer", + loading_art: "voxygen.element.frames.loading_screen.loading_bg", + loading_art_l: "voxygen.element.frames.loading_screen.loading_bg_l", + loading_art_r: "voxygen.element.frames.loading_screen.loading_bg_r", // Animation f1: "voxygen.element.animation.gears.1", f2: "voxygen.element.animation.gears.2", @@ -188,11 +196,11 @@ impl<'a> MainMenuUi { "voxygen.background.bg_7", "voxygen.background.bg_8", "voxygen.background.bg_9", - "voxygen.background.bg_10", + //"voxygen.background.bg_10", "voxygen.background.bg_11", - "voxygen.background.bg_12", + //"voxygen.background.bg_12", "voxygen.background.bg_13", - "voxygen.background.bg_14", + //"voxygen.background.bg_14", "voxygen.background.bg_15", "voxygen.background.bg_16", ]; @@ -301,6 +309,21 @@ impl<'a> MainMenuUi { .set(self.ids.bg, ui_widgets); if self.connect { + // Artwork + Image::new(self.imgs.loading_art) + .h(100.0) + .w_of(self.ids.bg) + .mid_bottom_of(self.ids.bg) + .set(self.ids.mid, ui_widgets); + Image::new(self.imgs.loading_art_l) + .w_h(12.0, 10.0) + .top_left_with_margins_on(self.ids.mid, 2.0, 0.0) + .set(self.ids.left, ui_widgets); + Image::new(self.imgs.loading_art_r) + .w_h(12.0, 10.0) + .top_right_with_margins_on(self.ids.mid, 2.0, 0.0) + .set(self.ids.right, ui_widgets); + // Gears Animation self.anim_timer = (self.anim_timer + dt.as_secs_f32()) * 1.05; // Linear time function with Anim-Speed Factor if self.anim_timer >= 4.0 { self.anim_timer = 0.0 // Reset timer at last frame to loop @@ -313,12 +336,13 @@ impl<'a> MainMenuUi { _ => self.imgs.f5, }) .w_h(74.0, 62.0) - .bottom_left_with_margins_on(self.ids.bg, 10.0, 10.0) + .bottom_right_with_margins_on(self.ids.mid, 10.0, 10.0) .set(self.ids.gears, ui_widgets); if tip_show { + // Tips Text::new(&tip_msg) .color(TEXT_BG) - .mid_bottom_with_margin_on(ui_widgets.window, 80.0) + .mid_bottom_with_margin_on(self.ids.mid, 60.0) .font_id(self.fonts.cyri.conrod_id) .font_size(self.fonts.cyri.scale(20)) .set(self.ids.tip_txt_bg, ui_widgets); diff --git a/voxygen/src/render/pipelines/mod.rs b/voxygen/src/render/pipelines/mod.rs index db6c64ed8b..5cd4a26f1c 100644 --- a/voxygen/src/render/pipelines/mod.rs +++ b/voxygen/src/render/pipelines/mod.rs @@ -46,6 +46,7 @@ gfx_defines! { medium: [u32; 4] = "medium", select_pos: [i32; 4] = "select_pos", gamma: [f32; 4] = "gamma", + ambiance: f32 = "ambiance", cam_mode: u32 = "cam_mode", sprite_render_distance: f32 = "sprite_render_distance", } @@ -82,6 +83,7 @@ impl Globals { medium: BlockKind, select_pos: Option>, gamma: f32, + ambiance: f32, cam_mode: CameraMode, sprite_render_distance: f32, ) -> Self { @@ -122,6 +124,7 @@ impl Globals { .unwrap_or(Vec4::zero()) .into_array(), gamma: [gamma; 4], + ambiance, cam_mode: cam_mode as u32, sprite_render_distance, } @@ -163,6 +166,7 @@ impl Default for Globals { BlockKind::Air, None, 1.0, + 1.0, CameraMode::ThirdPerson, 250.0, ) diff --git a/voxygen/src/scene/mod.rs b/voxygen/src/scene/mod.rs index 537ed1c5d6..a4970a1ed8 100644 --- a/voxygen/src/scene/mod.rs +++ b/voxygen/src/scene/mod.rs @@ -109,6 +109,7 @@ pub struct SceneData<'a> { pub tick: u64, pub thread_pool: &'a uvth::ThreadPool, pub gamma: f32, + pub ambiance: f32, pub mouse_smoothing: bool, pub sprite_render_distance: f32, pub particles_enabled: bool, @@ -638,6 +639,7 @@ impl Scene { .unwrap_or(BlockKind::Air), self.select_pos.map(|e| e - focus_off.map(|e| e as i32)), scene_data.gamma, + scene_data.ambiance, self.camera.get_mode(), scene_data.sprite_render_distance as f32 - 20.0, )]) diff --git a/voxygen/src/scene/simple.rs b/voxygen/src/scene/simple.rs index 927f0a95e3..64f0167117 100644 --- a/voxygen/src/scene/simple.rs +++ b/voxygen/src/scene/simple.rs @@ -95,6 +95,7 @@ pub struct SceneData<'a> { pub thread_pool: &'a uvth::ThreadPool, pub body: Option, pub gamma: f32, + pub ambiance: f32, pub figure_lod_render_distance: f32, pub mouse_smoothing: bool, } @@ -263,6 +264,7 @@ impl Scene { BlockKind::Air, None, scene_data.gamma, + scene_data.ambiance, self.camera.get_mode(), 250.0, )]) { diff --git a/voxygen/src/session.rs b/voxygen/src/session.rs index 7ae6a20aa0..1ed9105336 100644 --- a/voxygen/src/session.rs +++ b/voxygen/src/session.rs @@ -958,6 +958,10 @@ impl PlayState for SessionState { global_state.settings.graphics.gamma = new_gamma; global_state.settings.save_to_file_warn(); }, + HudEvent::ChangeAmbiance(new_ambiance) => { + global_state.settings.graphics.ambiance = new_ambiance; + global_state.settings.save_to_file_warn(); + }, HudEvent::ChangeRenderMode(new_render_mode) => { // Do this first so if it crashes the setting isn't saved :) global_state @@ -1046,6 +1050,7 @@ impl PlayState for SessionState { tick: client.get_tick(), thread_pool: client.thread_pool(), gamma: global_state.settings.graphics.gamma, + ambiance: global_state.settings.graphics.ambiance, mouse_smoothing: global_state.settings.gameplay.smooth_pan_enable, sprite_render_distance: global_state.settings.graphics.sprite_render_distance as f32, @@ -1109,6 +1114,7 @@ impl PlayState for SessionState { tick: client.get_tick(), thread_pool: client.thread_pool(), gamma: settings.graphics.gamma, + ambiance: settings.graphics.ambiance, mouse_smoothing: settings.gameplay.smooth_pan_enable, sprite_render_distance: settings.graphics.sprite_render_distance as f32, figure_lod_render_distance: settings.graphics.figure_lod_render_distance as f32, diff --git a/voxygen/src/settings.rs b/voxygen/src/settings.rs index 93a214d1d3..6d49acd4b3 100644 --- a/voxygen/src/settings.rs +++ b/voxygen/src/settings.rs @@ -616,6 +616,7 @@ pub struct GraphicsSettings { pub max_fps: u32, pub fov: u16, pub gamma: f32, + pub ambiance: f32, pub render_mode: RenderMode, pub window_size: [u16; 2], pub fullscreen: FullScreenSettings, @@ -632,6 +633,7 @@ impl Default for GraphicsSettings { max_fps: 60, fov: 50, gamma: 1.0, + ambiance: 20.0, render_mode: RenderMode::default(), window_size: [1920, 1080], fullscreen: FullScreenSettings::default(),