mirror of
https://gitlab.com/veloren/veloren.git
synced 2024-08-30 18:12:32 +00:00
Remove damage batch option + crit_mult
This commit is contained in:
parent
29ce64b4f5
commit
eabbfe6a51
@ -25,10 +25,6 @@
|
||||
"hud.settings.buffs_mmap": "Статусныя эфекты каля мінімапы",
|
||||
"hud.settings.toggle_bar_experience": "Адлюстроўваць панэль досведу",
|
||||
"hud.settings.scrolling_combat_text": "Адлюстроўваць шкоду/злечванне",
|
||||
"hud.settings.single_damage_number": "Шкода ад кожнага ўдару",
|
||||
"hud.settings.cumulated_damage": "Сумарная шкода",
|
||||
"hud.settings.incoming_damage": "Шкода ад кожнага ўдара па гульцу",
|
||||
"hud.settings.cumulated_incoming_damage": "Сумарная шкода па гульцу",
|
||||
"hud.settings.speech_bubble": "Індыкатар гаворкі",
|
||||
"hud.settings.speech_bubble_self": "Паказваць свае індыкатары гаворкі",
|
||||
"hud.settings.speech_bubble_dark_mode": "Цёмны рэжым індыкатара гаворкі",
|
||||
|
@ -25,10 +25,6 @@
|
||||
"hud.settings.buffs_mmap": "Buffs al Minimapa",
|
||||
"hud.settings.toggle_bar_experience": "Mostra Barra d'Experiència",
|
||||
"hud.settings.scrolling_combat_text": "Text de Combat Desplaçat",
|
||||
"hud.settings.single_damage_number": "Danys en Nombres Rodons",
|
||||
"hud.settings.cumulated_damage": "Dany Acumulat",
|
||||
"hud.settings.incoming_damage": "Dany Imminent",
|
||||
"hud.settings.cumulated_incoming_damage": "Dany Imminent Acumulat",
|
||||
"hud.settings.speech_bubble": "Bafarades",
|
||||
"hud.settings.speech_bubble_self": "Mostrar les Bafarades pròpies",
|
||||
"hud.settings.speech_bubble_dark_mode": "Bafarades Mode Fosc",
|
||||
|
@ -25,10 +25,6 @@
|
||||
"hud.settings.buffs_mmap": "Buffy u Minimapy",
|
||||
"hud.settings.toggle_bar_experience": "Povolit Zkušenostní Bar",
|
||||
"hud.settings.scrolling_combat_text": "Létajíci Text v boji",
|
||||
"hud.settings.single_damage_number": "Jednotná čísla Poškození",
|
||||
"hud.settings.cumulated_damage": "Seskupené Poškození",
|
||||
"hud.settings.incoming_damage": "Příchozí Poškození",
|
||||
"hud.settings.cumulated_incoming_damage": "Seskupené Příchozí Poškození",
|
||||
"hud.settings.speech_bubble": "Povídací Bublina",
|
||||
"hud.settings.speech_bubble_dark_mode": "Tmavá Povídací Bublina",
|
||||
"hud.settings.speech_bubble_icon": "Ikona Povídací Bubliny",
|
||||
|
@ -25,10 +25,6 @@
|
||||
"hud.settings.buffs_mmap": "Effekte an der Minimap",
|
||||
"hud.settings.toggle_bar_experience": "Erfahrungsleiste umschalten",
|
||||
"hud.settings.scrolling_combat_text": "Fließtext für Kampfhandlungen",
|
||||
"hud.settings.single_damage_number": "Schaden einzeln anzeigen",
|
||||
"hud.settings.cumulated_damage": "Gesamtschaden anzeigen",
|
||||
"hud.settings.incoming_damage": "Erlittener Schaden",
|
||||
"hud.settings.cumulated_incoming_damage": "Gesamter erlittener Schaden",
|
||||
"hud.settings.speech_bubble": "Sprechblase",
|
||||
"hud.settings.speech_bubble_dark_mode": "Sprechblase: Nachtmodus",
|
||||
"hud.settings.speech_bubble_icon": "Sprechblasen-Icon",
|
||||
|
@ -25,12 +25,8 @@
|
||||
"hud.settings.buffs_mmap": "Buffs at Minimap",
|
||||
"hud.settings.toggle_bar_experience": "Toggle Experience Bar",
|
||||
"hud.settings.scrolling_combat_text": "Scrolling Combat Text",
|
||||
"hud.settings.single_damage_number": "Single Damage Numbers",
|
||||
"hud.settings.damage_accumulation_duration": "Damage Accumulation Duration",
|
||||
"hud.settings.cumulated_damage": "Cumulated Damage",
|
||||
"hud.settings.incoming_damage": "Incoming Damage",
|
||||
"hud.settings.incoming_damage_accumulation_duration": "Incoming Damage Accumulation Duration",
|
||||
"hud.settings.cumulated_incoming_damage": "Cumulated Incoming Damage",
|
||||
"hud.settings.round_damage": "Round Damage",
|
||||
"hud.settings.speech_bubble": "Speech Bubble",
|
||||
"hud.settings.speech_bubble_self": "Show Own Speech Bubbles",
|
||||
|
@ -25,10 +25,6 @@
|
||||
"hud.settings.buffs_mmap": "Estados en el Minimapa",
|
||||
"hud.settings.toggle_bar_experience": "Alternar Barra de Experiencia",
|
||||
"hud.settings.scrolling_combat_text": "Texto de Combate Deslizante",
|
||||
"hud.settings.single_damage_number": "Números de Daño Único",
|
||||
"hud.settings.cumulated_damage": "Daño Acumulado",
|
||||
"hud.settings.incoming_damage": "Daño Entrante",
|
||||
"hud.settings.cumulated_incoming_damage": "Daño Entrante Acumulado",
|
||||
"hud.settings.speech_bubble": "Burbuja de Diálogo",
|
||||
"hud.settings.speech_bubble_self": "Mostrar Diálogos propios en Burbuja",
|
||||
"hud.settings.speech_bubble_dark_mode": "Modo Oscuro de Burbuja de Diálogo",
|
||||
|
@ -25,10 +25,6 @@
|
||||
"hud.settings.buffs_mmap": "Buffs en el Minimapa",
|
||||
"hud.settings.toggle_bar_experience": "Alternar Barra de Experiencia",
|
||||
"hud.settings.scrolling_combat_text": "Texto de Combate con Desplazamiento",
|
||||
"hud.settings.single_damage_number": "Números de Daño Singular",
|
||||
"hud.settings.cumulated_damage": "Daño Acumulado",
|
||||
"hud.settings.incoming_damage": "Daño Recibido",
|
||||
"hud.settings.cumulated_incoming_damage": "Daño Recibido Acumulado",
|
||||
"hud.settings.speech_bubble": "Burbuja de Diálogo",
|
||||
"hud.settings.speech_bubble_self": "Mostrar Diálogos propios en Burbuja",
|
||||
"hud.settings.speech_bubble_dark_mode": "Burbuja de Diálogo en Modo Oscuro",
|
||||
|
@ -18,10 +18,6 @@
|
||||
"hud.settings.opacity": "Opakotasuna",
|
||||
"hud.settings.toggle_shortcuts": "Aldatu laster teklak",
|
||||
"hud.settings.toggle_bar_experience": "Erakutsi/ezkutatu esperientzia barra",
|
||||
"hud.settings.single_damage_number": "Egindako kaltea banaka erakutsi",
|
||||
"hud.settings.cumulated_damage": "Egindako kaltea metatuta erakutsi",
|
||||
"hud.settings.incoming_damage": "Jasotako kaltea banaka erakutsi",
|
||||
"hud.settings.cumulated_incoming_damage": "Jasotako kalte metatua erakutsi",
|
||||
"hud.settings.energybar_numbers": "Zenbakiak energia barran",
|
||||
"hud.settings.always_show_bars": "Erakutsi beti energia barra",
|
||||
"hud.settings.values": "Balioak",
|
||||
|
@ -25,10 +25,6 @@
|
||||
"hud.settings.buffs_mmap": "Effets sur la minimap",
|
||||
"hud.settings.toggle_bar_experience": "Activer la barre d'expérience",
|
||||
"hud.settings.scrolling_combat_text": "Dégats de combat",
|
||||
"hud.settings.single_damage_number": "Dégats infligés",
|
||||
"hud.settings.cumulated_damage": "Dégat infligés cumulés",
|
||||
"hud.settings.incoming_damage": "Dégats reçus",
|
||||
"hud.settings.cumulated_incoming_damage": "Dégats reçus cumulés",
|
||||
"hud.settings.speech_bubble": "Bulle de dialogue",
|
||||
"hud.settings.speech_bubble_self": "Montrer ses propres bulles de dialogue",
|
||||
"hud.settings.speech_bubble_dark_mode": "Bulle de dialogue Mode Sombre",
|
||||
|
@ -24,10 +24,6 @@
|
||||
"hud.settings.buffs_mmap": "Hatások a minitérképnél",
|
||||
"hud.settings.toggle_bar_experience": "Tapasztalatsáv megjelenítése/elrejtése",
|
||||
"hud.settings.scrolling_combat_text": "Harci szöveg görgetése",
|
||||
"hud.settings.single_damage_number": "Minden egyes sebzés",
|
||||
"hud.settings.cumulated_damage": "Összes sebzés",
|
||||
"hud.settings.incoming_damage": "Bejövő sebzés",
|
||||
"hud.settings.cumulated_incoming_damage": "Összes bejövő sebzés",
|
||||
"hud.settings.speech_bubble": "Szövegbuborék",
|
||||
"hud.settings.speech_bubble_dark_mode": "Szövegbuborék sötét mód",
|
||||
"hud.settings.speech_bubble_icon": "Szövegbuborék ikon",
|
||||
|
@ -25,10 +25,6 @@
|
||||
"hud.settings.buffs_mmap": "Buff alla Minimappa",
|
||||
"hud.settings.toggle_bar_experience": "Attiva/Disattiva Barra dell'Esperienza",
|
||||
"hud.settings.scrolling_combat_text": "Testo del Combattimento a Scorrimento",
|
||||
"hud.settings.single_damage_number": "Numero Danni Singoli",
|
||||
"hud.settings.cumulated_damage": "Danno Accumulato",
|
||||
"hud.settings.incoming_damage": "Danno in Entrata",
|
||||
"hud.settings.cumulated_incoming_damage": "Danno in Entrata Accumulato",
|
||||
"hud.settings.speech_bubble": "Fumetto",
|
||||
"hud.settings.speech_bubble_self": "Mostra i Propri Fumetti",
|
||||
"hud.settings.speech_bubble_dark_mode": "Fumetto Modalità Scura",
|
||||
|
@ -22,10 +22,6 @@
|
||||
"hud.settings.buffs_mmap": "Buffs at Minimap",
|
||||
"hud.settings.toggle_bar_experience": "経験値バーの切り替え",
|
||||
"hud.settings.scrolling_combat_text": "戦闘メッセージのスクロール",
|
||||
"hud.settings.single_damage_number": "Single Damage Numbers",
|
||||
"hud.settings.cumulated_damage": "Cumulated Damage",
|
||||
"hud.settings.incoming_damage": "Incoming Damage",
|
||||
"hud.settings.cumulated_incoming_damage": "Cumulated Incoming Damage",
|
||||
"hud.settings.speech_bubble": "吹き出し",
|
||||
"hud.settings.speech_bubble_dark_mode": "ダークモード吹き出し",
|
||||
"hud.settings.speech_bubble_icon": "アイコン吹き出し",
|
||||
|
@ -20,10 +20,6 @@
|
||||
"hud.settings.toggle_shortcuts": "Toon Sneltoetsen",
|
||||
"hud.settings.toggle_bar_experience": "Toon Experience Balk",
|
||||
"hud.settings.scrolling_combat_text": "Pop-up Gevechtstext",
|
||||
"hud.settings.single_damage_number": "Aparte Schade Getallen",
|
||||
"hud.settings.cumulated_damage": "Cumulatieve Schade Getallen",
|
||||
"hud.settings.incoming_damage": "Inkomende Schade Getallen",
|
||||
"hud.settings.cumulated_incoming_damage": "Cumulatieve Inkomende Schade Getallen",
|
||||
"hud.settings.speech_bubble": "Spraakbubbel",
|
||||
"hud.settings.speech_bubble_dark_mode": "Donkere Modus",
|
||||
"hud.settings.speech_bubble_icon": "Spraakbubbel Icoon",
|
||||
|
@ -21,10 +21,6 @@
|
||||
"hud.settings.buffs_mmap": "Ikoner på Minimap",
|
||||
"hud.settings.toggle_bar_experience": "Veksle erfaringsbar",
|
||||
"hud.settings.scrolling_combat_text": "Rullende kamptekst",
|
||||
"hud.settings.single_damage_number": "Enkelt skadetall",
|
||||
"hud.settings.cumulated_damage": "Kumulert skade",
|
||||
"hud.settings.incoming_damage": "Innkommende skade",
|
||||
"hud.settings.cumulated_incoming_damage": "Kumulert innkommende skade",
|
||||
"hud.settings.speech_bubble": "Snakkeboble",
|
||||
"hud.settings.speech_bubble_dark_mode": "Mørk modus for snakkeboble",
|
||||
"hud.settings.speech_bubble_icon": "Snakkeboble ikon",
|
||||
|
@ -25,10 +25,6 @@
|
||||
"hud.settings.buffs_mmap": "Wzmocnienia na minimapie",
|
||||
"hud.settings.toggle_bar_experience": "Przełącz pasek doświadczenia",
|
||||
"hud.settings.scrolling_combat_text": "Przewijanie tekstu podczas walki",
|
||||
"hud.settings.single_damage_number": "Ujednolicone numery obrażeń",
|
||||
"hud.settings.cumulated_damage": "Skumulowane obrażenia",
|
||||
"hud.settings.incoming_damage": "Otrzymywane obrażenia",
|
||||
"hud.settings.cumulated_incoming_damage": "Kalkulowane otrzymywane obrażenia",
|
||||
"hud.settings.speech_bubble": "Dymek rozmowy",
|
||||
"hud.settings.speech_bubble_self": "Pokazuj swój dymek rozmowy",
|
||||
"hud.settings.speech_bubble_dark_mode": "Dymek rozmowy w trybie ciemnym",
|
||||
|
@ -25,10 +25,6 @@
|
||||
"hud.settings.buffs_mmap": "Buffs no Minimapa",
|
||||
"hud.settings.toggle_bar_experience": "Mostar/Ocultar Barra de Experiência",
|
||||
"hud.settings.scrolling_combat_text": "Texto de Combate Deslizante",
|
||||
"hud.settings.single_damage_number": "Números Únicos de Dano",
|
||||
"hud.settings.cumulated_damage": "Dano Acumulado",
|
||||
"hud.settings.incoming_damage": "Dano Recebido",
|
||||
"hud.settings.cumulated_incoming_damage": "Dano Recebido Acumulado",
|
||||
"hud.settings.speech_bubble": "Balão de Fala",
|
||||
"hud.settings.speech_bubble_dark_mode": "Balão de Fala Modo Escuro",
|
||||
"hud.settings.speech_bubble_icon": "Ícone do Balão de Fala",
|
||||
|
@ -19,10 +19,6 @@
|
||||
"hud.settings.toggle_shortcuts": "Mostar/Ocultar atalhos",
|
||||
"hud.settings.toggle_bar_experience": "Mostar/Ocultar barra de experiência",
|
||||
"hud.settings.scrolling_combat_text": "Texto de combate deslizante",
|
||||
"hud.settings.single_damage_number": "Números de dano únicos",
|
||||
"hud.settings.cumulated_damage": "Dano acumulado",
|
||||
"hud.settings.incoming_damage": "Dano recebido",
|
||||
"hud.settings.cumulated_incoming_damage": "Dano recebido acumulado",
|
||||
"hud.settings.energybar_numbers": "Números da barra de energia",
|
||||
"hud.settings.values": "Valores",
|
||||
"hud.settings.percentages": "Percentagens",
|
||||
|
@ -25,10 +25,6 @@
|
||||
"hud.settings.buffs_mmap": "Баффы возле миникарте",
|
||||
"hud.settings.toggle_bar_experience": "Переключить панель опыта",
|
||||
"hud.settings.scrolling_combat_text": "Отображение урона/исцеления",
|
||||
"hud.settings.single_damage_number": "Отдельно нанесённый",
|
||||
"hud.settings.cumulated_damage": "Суммарно нанесённый",
|
||||
"hud.settings.incoming_damage": "Отдельно полученный",
|
||||
"hud.settings.cumulated_incoming_damage": "Суммарно полученный",
|
||||
"hud.settings.speech_bubble": "Диалоговое окно",
|
||||
"hud.settings.speech_bubble_self": "Показывать каждое отдельное окно",
|
||||
"hud.settings.speech_bubble_dark_mode": "Диалоговое окно (тёмная тема)",
|
||||
|
@ -24,10 +24,6 @@
|
||||
"hud.settings.buffs_mmap": "Бафови на Мапици",
|
||||
"hud.settings.toggle_bar_experience": "Ис/Укључи Траку са Искуством",
|
||||
"hud.settings.scrolling_combat_text": "Померајући Борбени Текст ",
|
||||
"hud.settings.single_damage_number": "Појединачне Ране",
|
||||
"hud.settings.cumulated_damage": "Акумулиране Ране",
|
||||
"hud.settings.incoming_damage": "Долазне Ране",
|
||||
"hud.settings.cumulated_incoming_damage": "Акумулирана Долазна Ране",
|
||||
"hud.settings.speech_bubble": "Говорни Облачић",
|
||||
"hud.settings.speech_bubble_dark_mode": "Тамни Говорни Облачић",
|
||||
"hud.settings.speech_bubble_icon": "Иконица Говорног Облачића",
|
||||
|
@ -25,10 +25,6 @@
|
||||
"hud.settings.buffs_mmap": "Effekter vid Minikartan",
|
||||
"hud.settings.toggle_bar_experience": "Visa/dölj erfarenhetsmätare",
|
||||
"hud.settings.scrolling_combat_text": "Rullande stridstext",
|
||||
"hud.settings.single_damage_number": "Ett enda skadenummer",
|
||||
"hud.settings.cumulated_damage": "Sammanlagd skada",
|
||||
"hud.settings.incoming_damage": "Inkommande skada",
|
||||
"hud.settings.cumulated_incoming_damage": "Sammanlagd inkommande skada",
|
||||
"hud.settings.speech_bubble": "Pratbubbla",
|
||||
"hud.settings.speech_bubble_self": "Visa egna pratbubblor",
|
||||
"hud.settings.speech_bubble_dark_mode": "Pratbubbla mörkt läge",
|
||||
|
@ -22,10 +22,6 @@
|
||||
"hud.settings.buffs_mmap": "Etkiler haritanın yanında",
|
||||
"hud.settings.toggle_bar_experience": "Tecrübe çubuğunu aç/kapa",
|
||||
"hud.settings.scrolling_combat_text": "Verilen/Alınan Hasar Yazısı",
|
||||
"hud.settings.single_damage_number": "Verilen Hasarı Tek Tek Göster",
|
||||
"hud.settings.cumulated_damage": "Toplam Verilen Hasarı Göster",
|
||||
"hud.settings.incoming_damage": "Alınan Hasarı Tek Tek Göster",
|
||||
"hud.settings.cumulated_incoming_damage": "Toplam Alınan Hasarı Göster",
|
||||
"hud.settings.speech_bubble": "Konuşma balonu",
|
||||
"hud.settings.speech_bubble_dark_mode": "Konuşma balonunda karanlık tema kullan",
|
||||
"hud.settings.speech_bubble_icon": "Konuşma balonunda ikon göster",
|
||||
|
@ -24,10 +24,6 @@
|
||||
"hud.settings.buffs_mmap": "Бафи біля Мінімапи",
|
||||
"hud.settings.toggle_bar_experience": "Панель досвіду",
|
||||
"hud.settings.scrolling_combat_text": "Відображення Пошкоджень/Зцілень",
|
||||
"hud.settings.single_damage_number": "Роздільно нанесені Гравцем",
|
||||
"hud.settings.cumulated_damage": "Сумарно нанесені Гравцем",
|
||||
"hud.settings.incoming_damage": "Роздільно отримані Гравцем",
|
||||
"hud.settings.cumulated_incoming_damage": "Сумарно отримані Гравцем",
|
||||
"hud.settings.speech_bubble": "Діалоги",
|
||||
"hud.settings.speech_bubble_dark_mode": "Темний режим",
|
||||
"hud.settings.speech_bubble_icon": "Піктограма",
|
||||
|
@ -24,10 +24,6 @@
|
||||
"hud.settings.buffs_mmap": "Buffs tại Minimap",
|
||||
"hud.settings.toggle_bar_experience": "Bật tắt thanh kinh nghiệm",
|
||||
"hud.settings.scrolling_combat_text": "Thông Tin Chiến Đấu",
|
||||
"hud.settings.single_damage_number": "Sát thương từng đòn đánh",
|
||||
"hud.settings.cumulated_damage": "Sát thương tích lũy",
|
||||
"hud.settings.incoming_damage": "Sát thương nhận phải",
|
||||
"hud.settings.cumulated_incoming_damage": "Sát thương tích lũy nhận phải",
|
||||
"hud.settings.speech_bubble": "Bong Bóng Thoại",
|
||||
"hud.settings.speech_bubble_dark_mode": "Chế độ tối màu",
|
||||
"hud.settings.speech_bubble_icon": "Biểu tượng bong bóng thoại",
|
||||
|
@ -22,10 +22,6 @@
|
||||
"hud.settings.buffs_mmap": "增益效果显示在小地图旁",
|
||||
"hud.settings.toggle_bar_experience": "显示经验条",
|
||||
"hud.settings.scrolling_combat_text": "战斗信息",
|
||||
"hud.settings.single_damage_number": "单次伤害",
|
||||
"hud.settings.cumulated_damage": "累计伤害",
|
||||
"hud.settings.incoming_damage": "所受伤害",
|
||||
"hud.settings.cumulated_incoming_damage": "累计所受伤害",
|
||||
"hud.settings.speech_bubble": "对话框",
|
||||
"hud.settings.speech_bubble_dark_mode": "对话框启用暗色模式",
|
||||
"hud.settings.speech_bubble_icon": "对话框显示图标",
|
||||
|
@ -20,10 +20,6 @@
|
||||
"hud.settings.toggle_shortcuts": "顯示快捷鍵",
|
||||
"hud.settings.toggle_bar_experience": "顯示經驗條",
|
||||
"hud.settings.scrolling_combat_text": "戰鬥訊息",
|
||||
"hud.settings.single_damage_number": "單一傷害",
|
||||
"hud.settings.cumulated_damage": "累積傷害",
|
||||
"hud.settings.incoming_damage": "所受傷害",
|
||||
"hud.settings.cumulated_incoming_damage": "累積所受傷害",
|
||||
"hud.settings.energybar_numbers": "能量條",
|
||||
"hud.settings.values": "數字",
|
||||
"hud.settings.percentages": "百分比",
|
||||
|
@ -258,7 +258,7 @@ impl Attack {
|
||||
by: attacker.map(|x| x.into()),
|
||||
cause: Some(damage.damage.source),
|
||||
time,
|
||||
crit_mult: is_crit.then(|| self.crit_multiplier),
|
||||
crit: is_crit,
|
||||
instance: damage.instance,
|
||||
};
|
||||
emit(ServerEvent::HealthChange {
|
||||
@ -358,7 +358,7 @@ impl Attack {
|
||||
by: attacker.map(|a| a.into()),
|
||||
cause: None,
|
||||
time,
|
||||
crit_mult: None,
|
||||
crit: false,
|
||||
instance: rand::random(),
|
||||
};
|
||||
if change.amount.abs() > Health::HEALTH_EPSILON {
|
||||
@ -393,7 +393,7 @@ impl Attack {
|
||||
by: attacker.map(|a| a.into()),
|
||||
cause: None,
|
||||
time,
|
||||
crit_mult: None,
|
||||
crit: false,
|
||||
instance: rand::random(),
|
||||
};
|
||||
if change.amount.abs() > Health::HEALTH_EPSILON {
|
||||
@ -506,7 +506,7 @@ impl Attack {
|
||||
by: attacker.map(|a| a.into()),
|
||||
cause: None,
|
||||
time,
|
||||
crit_mult: None,
|
||||
crit: false,
|
||||
instance: rand::random(),
|
||||
};
|
||||
if change.amount.abs() > Health::HEALTH_EPSILON {
|
||||
@ -541,7 +541,7 @@ impl Attack {
|
||||
by: attacker.map(|a| a.into()),
|
||||
cause: None,
|
||||
time,
|
||||
crit_mult: None,
|
||||
crit: false,
|
||||
instance: rand::random(),
|
||||
};
|
||||
if change.amount.abs() > Health::HEALTH_EPSILON {
|
||||
@ -859,7 +859,7 @@ impl Damage {
|
||||
by: damage_contributor,
|
||||
cause: Some(self.source),
|
||||
time,
|
||||
crit_mult: is_crit.then(|| crit_mult),
|
||||
crit: is_crit,
|
||||
instance,
|
||||
}
|
||||
},
|
||||
@ -873,7 +873,7 @@ impl Damage {
|
||||
by: None,
|
||||
cause: Some(self.source),
|
||||
time,
|
||||
crit_mult: None,
|
||||
crit: false,
|
||||
instance,
|
||||
}
|
||||
},
|
||||
@ -882,7 +882,7 @@ impl Damage {
|
||||
by: None,
|
||||
cause: Some(self.source),
|
||||
time,
|
||||
crit_mult: None,
|
||||
crit: false,
|
||||
instance,
|
||||
},
|
||||
}
|
||||
|
@ -24,8 +24,8 @@ pub struct HealthChange {
|
||||
pub cause: Option<DamageSource>,
|
||||
/// The time that the health change occurred at
|
||||
pub time: Time,
|
||||
/// The crit multiplier (None if it isn't a crit)
|
||||
pub crit_mult: Option<f32>,
|
||||
/// A boolean that tells you if the change was a crit
|
||||
pub crit: bool,
|
||||
/// A random ID, used to group up health changes from the same attack
|
||||
pub instance: u64,
|
||||
}
|
||||
@ -136,7 +136,7 @@ impl Health {
|
||||
amount: 0.0,
|
||||
by: None,
|
||||
cause: None,
|
||||
crit_mult: None,
|
||||
crit: false,
|
||||
time: Time(0.0),
|
||||
instance: rand::random(),
|
||||
},
|
||||
@ -217,7 +217,7 @@ impl Health {
|
||||
amount: 0.0,
|
||||
by: None,
|
||||
cause: None,
|
||||
crit_mult: None,
|
||||
crit: false,
|
||||
time: Time(0.0),
|
||||
instance: rand::random(),
|
||||
},
|
||||
@ -253,7 +253,7 @@ mod tests {
|
||||
time: Time(123.0),
|
||||
by: Some(damage_contrib),
|
||||
cause: None,
|
||||
crit_mult: None,
|
||||
crit: false,
|
||||
instance: rand::random(),
|
||||
};
|
||||
|
||||
@ -280,7 +280,7 @@ mod tests {
|
||||
time: Time(123.0),
|
||||
by: Some(damage_contrib),
|
||||
cause: None,
|
||||
crit_mult: None,
|
||||
crit: false,
|
||||
instance: rand::random(),
|
||||
};
|
||||
|
||||
@ -301,7 +301,7 @@ mod tests {
|
||||
time: Time(123.0),
|
||||
by: Some(damage_contrib),
|
||||
cause: None,
|
||||
crit_mult: None,
|
||||
crit: false,
|
||||
instance: rand::random(),
|
||||
};
|
||||
health.change_by(health_change);
|
||||
@ -328,7 +328,7 @@ mod tests {
|
||||
time: Time(10.0),
|
||||
by: Some(damage_contrib1),
|
||||
cause: None,
|
||||
crit_mult: None,
|
||||
crit: false,
|
||||
instance: rand::random(),
|
||||
};
|
||||
health.change_by(health_change);
|
||||
@ -339,7 +339,7 @@ mod tests {
|
||||
time: Time(100.0),
|
||||
by: Some(damage_contrib2),
|
||||
cause: None,
|
||||
crit_mult: None,
|
||||
crit: false,
|
||||
instance: rand::random(),
|
||||
};
|
||||
health.change_by(health_change);
|
||||
@ -354,7 +354,7 @@ mod tests {
|
||||
time: Time(620.0),
|
||||
by: Some(damage_contrib2),
|
||||
cause: None,
|
||||
crit_mult: None,
|
||||
crit: false,
|
||||
instance: rand::random(),
|
||||
};
|
||||
health.change_by(health_change);
|
||||
|
@ -7,7 +7,7 @@ use vek::*;
|
||||
#[derive(Debug, Clone, Copy, Serialize, Deserialize)]
|
||||
pub struct DamageInfo {
|
||||
pub amount: f32,
|
||||
pub crit_mult: Option<f32>,
|
||||
pub crit: bool,
|
||||
pub target: Uid,
|
||||
pub by: Option<DamageContributor>,
|
||||
pub instance: u64,
|
||||
|
@ -275,7 +275,7 @@ impl<'a> System<'a> for Sys {
|
||||
by: damage_contributor,
|
||||
cause,
|
||||
time: *read_data.time,
|
||||
crit_mult: None,
|
||||
crit: false,
|
||||
instance: *instance,
|
||||
},
|
||||
});
|
||||
|
@ -1056,7 +1056,7 @@ fn handle_health(
|
||||
amount: hp - health.current(),
|
||||
by: None,
|
||||
cause: None,
|
||||
crit_mult: None,
|
||||
crit: false,
|
||||
time: *time,
|
||||
instance: rand::random(),
|
||||
};
|
||||
|
@ -66,7 +66,8 @@ pub fn handle_poise(server: &Server, entity: EcsEntity, change: comp::PoiseChang
|
||||
|
||||
pub fn handle_health_change(server: &Server, entity: EcsEntity, change: HealthChange) {
|
||||
let ecs = &server.state.ecs();
|
||||
let mut outcomes = ecs.write_resource::<Vec<Outcome>>();
|
||||
let outcomes = ecs.write_resource::<EventBus<Outcome>>();
|
||||
let mut outcomes_emitter = outcomes.emitter();
|
||||
let mut changed = false;
|
||||
if let Some(mut health) = ecs.write_storage::<Health>().get_mut(entity) {
|
||||
changed = health.change_by(change);
|
||||
@ -78,13 +79,13 @@ pub fn handle_health_change(server: &Server, entity: EcsEntity, change: HealthCh
|
||||
// If the absolute health change amount was greater than the health epsilon,
|
||||
// push a new Damage outcome
|
||||
if changed {
|
||||
outcomes.push(Outcome::Damage {
|
||||
outcomes_emitter.emit(Outcome::Damage {
|
||||
pos: pos.0,
|
||||
info: DamageInfo {
|
||||
amount: change.amount,
|
||||
by: change.by,
|
||||
target: *uid,
|
||||
crit_mult: change.crit_mult,
|
||||
crit: change.crit,
|
||||
instance: change.instance,
|
||||
},
|
||||
});
|
||||
|
@ -1420,93 +1420,8 @@ impl Hud {
|
||||
Rgb::new(1.0, 0.1, 0.0)
|
||||
}
|
||||
};
|
||||
if global_state.settings.interface.sct_player_batch {
|
||||
let number_speed = 100.0; // Player Batched Numbers Speed
|
||||
let player_sct_bg_id = player_sct_bg_id_walker.next(
|
||||
&mut self.ids.player_sct_bgs,
|
||||
&mut ui_widgets.widget_id_generator(),
|
||||
);
|
||||
let player_sct_id = player_sct_id_walker.next(
|
||||
&mut self.ids.player_scts,
|
||||
&mut ui_widgets.widget_id_generator(),
|
||||
);
|
||||
|
||||
// Because only the Damage HpFloaters are batched
|
||||
// and would result in the wrong timers/crit info being used
|
||||
let damage_floaters: Vec<&HpFloater> =
|
||||
floaters.iter().filter(|f| f.info.amount < 0.0).collect();
|
||||
|
||||
if !damage_floaters.is_empty() {
|
||||
// Calculate total change
|
||||
// Ignores healing
|
||||
let hp_damage: f32 =
|
||||
damage_floaters.iter().map(|fl| fl.info.amount).sum();
|
||||
|
||||
let hp_dmg_text = if global_state.settings.interface.sct_damage_rounding
|
||||
&& hp_damage.abs() >= 1.0
|
||||
{
|
||||
format!("{:.0}", hp_damage.abs())
|
||||
} else {
|
||||
format!("{:.1}", hp_damage.abs())
|
||||
};
|
||||
// As to avoid ridiculously large damage numbers
|
||||
let max_hp_frac = hp_damage
|
||||
.abs()
|
||||
.clamp(Health::HEALTH_EPSILON, health.maximum())
|
||||
/ health.maximum();
|
||||
|
||||
let timer = damage_floaters
|
||||
.last()
|
||||
.expect("There must be at least one floater")
|
||||
.timer;
|
||||
let jump_timer = damage_floaters
|
||||
.last()
|
||||
.expect("There must be at least one floater")
|
||||
.jump_timer;
|
||||
let crit = damage_floaters
|
||||
.last()
|
||||
.map_or(false, |f| f.info.crit_mult.is_some());
|
||||
// Increase font size based on fraction of maximum health
|
||||
// "flashes" by having a larger size in the first 100ms
|
||||
let font_size = 30
|
||||
+ ((max_hp_frac * 10.0 * if crit { 1.35 } else { 1.0 }) as u32) * 3
|
||||
+ if jump_timer < 0.1 {
|
||||
FLASH_MAX
|
||||
* (((1.0 - jump_timer / 0.1)
|
||||
* 10.0
|
||||
* if crit { 1.25 } else { 1.0 })
|
||||
as u32)
|
||||
} else {
|
||||
0
|
||||
};
|
||||
let font_col = player_font_col(crit);
|
||||
// Timer sets the widget offset
|
||||
let y = timer as f64 * number_speed * -1.0;
|
||||
// Timer sets text transparency
|
||||
let hp_fade =
|
||||
((crate::ecs::sys::floater::MY_HP_SHOWTIME - timer) * 0.25) + 0.2;
|
||||
Text::new(&hp_dmg_text)
|
||||
.font_size(font_size)
|
||||
.font_id(self.fonts.cyri.conrod_id)
|
||||
.color(Color::Rgba(0.0, 0.0, 0.0, hp_fade))
|
||||
.mid_bottom_with_margin_on(ui_widgets.window, 297.0 + y)
|
||||
.set(player_sct_bg_id, ui_widgets);
|
||||
Text::new(&hp_dmg_text)
|
||||
.font_size(font_size)
|
||||
.font_id(self.fonts.cyri.conrod_id)
|
||||
.color(Color::Rgba(font_col.r, font_col.g, font_col.b, hp_fade))
|
||||
.mid_bottom_with_margin_on(ui_widgets.window, 300.0 + y)
|
||||
.set(player_sct_id, ui_widgets);
|
||||
}
|
||||
};
|
||||
for floater in floaters {
|
||||
// Healing always single numbers so just skip damage when in batch mode
|
||||
|
||||
if global_state.settings.interface.sct_player_batch
|
||||
&& floater.info.amount < 0.0
|
||||
{
|
||||
continue;
|
||||
}
|
||||
let number_speed = 50.0; // Player Heal Speed
|
||||
let player_sct_bg_id = player_sct_bg_id_walker.next(
|
||||
&mut self.ids.player_sct_bgs,
|
||||
@ -1520,7 +1435,7 @@ impl Hud {
|
||||
.info
|
||||
.amount
|
||||
.abs()
|
||||
.clamp(Health::HEALTH_EPSILON, health.maximum())
|
||||
.clamp(Health::HEALTH_EPSILON, health.maximum() * 1.25)
|
||||
/ health.maximum();
|
||||
let hp_dmg_text = if global_state.settings.interface.sct_damage_rounding
|
||||
&& floater.info.amount.abs() >= 1.0
|
||||
@ -1529,7 +1444,7 @@ impl Hud {
|
||||
} else {
|
||||
format!("{:.1}", floater.info.amount.abs())
|
||||
};
|
||||
let crit = floater.info.crit_mult.is_some();
|
||||
let crit = floater.info.crit;
|
||||
|
||||
// Timer sets text transparency
|
||||
let hp_fade = ((crate::ecs::sys::floater::MY_HP_SHOWTIME - floater.timer)
|
||||
@ -1543,7 +1458,7 @@ impl Hud {
|
||||
// Increase font size based on fraction of maximum health
|
||||
// "flashes" by having a larger size in the first 100ms
|
||||
let font_size = 30
|
||||
+ (max_hp_frac * 10.0 * if crit { 1.35 } else { 1.0 }) as u32 * 3
|
||||
+ (if crit { max_hp_frac * 10.0 * 1.35 + 5.0} else { max_hp_frac * 10.0 }) as u32 * 3
|
||||
+ if floater.jump_timer < 0.1 {
|
||||
FLASH_MAX
|
||||
* (((1.0 - floater.jump_timer / 0.1)
|
||||
@ -2230,6 +2145,12 @@ impl Hud {
|
||||
DARK_ORANGE,
|
||||
RED_ORANGE,
|
||||
];
|
||||
|
||||
// Crit sizes
|
||||
// const CRIT_SIZES: [f32; 6] = [
|
||||
|
||||
// ];
|
||||
|
||||
// Largest value that select the first color is 40, then it shifts colors
|
||||
// every 5
|
||||
let font_col = |font_size: u32, crit: bool| {
|
||||
@ -2241,175 +2162,94 @@ impl Hud {
|
||||
}
|
||||
};
|
||||
|
||||
if global_state.settings.interface.sct_damage_batch {
|
||||
let number_speed = 50.0; // Damage number speed
|
||||
for floater in floaters {
|
||||
let number_speed = 250.0; // Single Numbers Speed
|
||||
let sct_id = sct_walker
|
||||
.next(&mut self.ids.scts, &mut ui_widgets.widget_id_generator());
|
||||
let sct_bg_id = sct_bg_walker
|
||||
.next(&mut self.ids.sct_bgs, &mut ui_widgets.widget_id_generator());
|
||||
|
||||
let damage_floaters: Vec<&HpFloater> =
|
||||
floaters.iter().filter(|f| f.info.amount < 0.0).collect();
|
||||
|
||||
if !damage_floaters.is_empty() {
|
||||
// Calculate total change
|
||||
// Ignores healing
|
||||
let hp_damage: f32 =
|
||||
damage_floaters.iter().map(|fl| fl.info.amount).sum();
|
||||
let hp_dmg_text = if global_state.settings.interface.sct_damage_rounding
|
||||
&& hp_damage.abs() >= 1.0
|
||||
{
|
||||
format!("{:.0}", hp_damage.abs())
|
||||
// Calculate total change
|
||||
let max_hp_frac =
|
||||
floater.info.amount.abs().clamp(
|
||||
Health::HEALTH_EPSILON,
|
||||
health.map_or(1.0, |h| h.maximum()),
|
||||
) / health.map_or(1.0, |h| h.maximum());
|
||||
let hp_dmg_text = if global_state.settings.interface.sct_damage_rounding
|
||||
&& floater.info.amount.abs() >= 1.0
|
||||
{
|
||||
format!("{:.0}", floater.info.amount.abs())
|
||||
} else {
|
||||
format!("{:.1}", floater.info.amount.abs())
|
||||
};
|
||||
let crit = floater.info.crit;
|
||||
// Timer sets text transparency
|
||||
let fade = if crit {
|
||||
((crate::ecs::sys::floater::CRIT_SHOWTIME - floater.timer) * 0.75)
|
||||
+ 0.5
|
||||
} else {
|
||||
((crate::ecs::sys::floater::HP_SHOWTIME - floater.timer) * 0.25)
|
||||
+ 0.2
|
||||
};
|
||||
// Skip floater if fade is less than or equal to 0.0
|
||||
if fade <= 0.0 {
|
||||
continue;
|
||||
}
|
||||
// Increase font size based on fraction of maximum health
|
||||
// "flashes" by having a larger size in the first 100ms
|
||||
let font_size = 30
|
||||
+ (if crit { max_hp_frac * 10.0 * 1.35 + 5.0} else { max_hp_frac * 10.0 }) as u32 * 3
|
||||
+ if floater.jump_timer < 0.1 {
|
||||
FLASH_MAX
|
||||
* (((1.0 - floater.jump_timer / 0.1)
|
||||
* 10.0
|
||||
* if crit { 1.25 } else { 1.0 })
|
||||
as u32)
|
||||
} else {
|
||||
format!("{:.1}", hp_damage.abs())
|
||||
0
|
||||
};
|
||||
|
||||
let max_hp_frac = hp_damage
|
||||
.abs()
|
||||
.clamp(Health::HEALTH_EPSILON, health.map_or(1.0, |h| h.maximum()))
|
||||
/ health.map_or(1.0, |h| h.maximum());
|
||||
let timer = damage_floaters
|
||||
.last()
|
||||
.expect("There must be at least one floater")
|
||||
.timer;
|
||||
let jump_timer = damage_floaters
|
||||
.last()
|
||||
.expect("There must be at least one floater")
|
||||
.jump_timer;
|
||||
let crit = damage_floaters
|
||||
.last()
|
||||
.map_or(false, |f| f.info.crit_mult.is_some());
|
||||
|
||||
// Increase font size based on fraction of maximum health
|
||||
// "flashes" by having a larger size in the first 100ms
|
||||
let font_size = 30
|
||||
+ ((max_hp_frac * 10.0 * if crit { 1.35 } else { 1.0 }) as u32) * 3
|
||||
+ if jump_timer < 0.1 {
|
||||
FLASH_MAX
|
||||
* (((1.0 - jump_timer / 0.1)
|
||||
* 10.0
|
||||
* if crit { 1.25 } else { 1.0 })
|
||||
as u32)
|
||||
} else {
|
||||
0
|
||||
};
|
||||
let font_col = font_col(font_size, crit);
|
||||
// Timer sets the widget offset
|
||||
let y = (timer as f64 / crate::ecs::sys::floater::HP_SHOWTIME as f64
|
||||
let font_col = font_col(font_size, crit);
|
||||
// Timer sets the widget offset
|
||||
let y = if crit {
|
||||
ui_widgets.win_h * (floater.rand as f64 % 0.1)
|
||||
+ ui_widgets.win_h * 0.05
|
||||
} else {
|
||||
(floater.timer as f64
|
||||
/ crate::ecs::sys::floater::HP_SHOWTIME as f64
|
||||
* number_speed)
|
||||
+ 100.0;
|
||||
// Timer sets text transparency
|
||||
let fade =
|
||||
((crate::ecs::sys::floater::HP_SHOWTIME - timer) * 0.25) + 0.2;
|
||||
Text::new(&hp_dmg_text)
|
||||
.font_size(font_size)
|
||||
.font_id(self.fonts.cyri.conrod_id)
|
||||
.color(Color::Rgba(0.0, 0.0, 0.0, fade))
|
||||
.x_y(0.0, y - 3.0)
|
||||
.position_ingame(ingame_pos)
|
||||
.set(sct_bg_id, ui_widgets);
|
||||
Text::new(&hp_dmg_text)
|
||||
.font_size(font_size)
|
||||
.font_id(self.fonts.cyri.conrod_id)
|
||||
.x_y(0.0, y)
|
||||
.color(if hp_damage < 0.0 {
|
||||
Color::Rgba(font_col.r, font_col.g, font_col.b, fade)
|
||||
} else {
|
||||
Color::Rgba(0.1, 1.0, 0.1, fade)
|
||||
})
|
||||
.position_ingame(ingame_pos)
|
||||
.set(sct_id, ui_widgets);
|
||||
}
|
||||
} else {
|
||||
for floater in floaters {
|
||||
let number_speed = 250.0; // Single Numbers Speed
|
||||
let sct_id = sct_walker
|
||||
.next(&mut self.ids.scts, &mut ui_widgets.widget_id_generator());
|
||||
let sct_bg_id = sct_bg_walker
|
||||
.next(&mut self.ids.sct_bgs, &mut ui_widgets.widget_id_generator());
|
||||
// Calculate total change
|
||||
let max_hp_frac =
|
||||
floater.info.amount.abs().clamp(
|
||||
Health::HEALTH_EPSILON,
|
||||
health.map_or(1.0, |h| h.maximum()),
|
||||
) / health.map_or(1.0, |h| h.maximum());
|
||||
let hp_dmg_text = if global_state.settings.interface.sct_damage_rounding
|
||||
&& floater.info.amount.abs() >= 1.0
|
||||
{
|
||||
format!("{:.0}", floater.info.amount.abs())
|
||||
} else {
|
||||
format!("{:.1}", floater.info.amount.abs())
|
||||
};
|
||||
let crit = floater.info.crit_mult.is_some();
|
||||
// Timer sets text transparency
|
||||
let fade = if crit {
|
||||
((crate::ecs::sys::floater::CRIT_SHOWTIME - floater.timer) * 0.75)
|
||||
+ 0.5
|
||||
} else {
|
||||
((crate::ecs::sys::floater::HP_SHOWTIME - floater.timer) * 0.25)
|
||||
+ 0.2
|
||||
};
|
||||
// Skip floater if fade is less than or equal to 0.0
|
||||
if fade <= 0.0 {
|
||||
continue;
|
||||
}
|
||||
// Increase font size based on fraction of maximum health
|
||||
// "flashes" by having a larger size in the first 100ms
|
||||
let font_size = 30
|
||||
+ (max_hp_frac * 10.0 * if crit { 1.35 } else { 1.0 }) as u32 * 3
|
||||
+ if floater.jump_timer < 0.1 {
|
||||
FLASH_MAX
|
||||
* (((1.0 - floater.jump_timer / 0.1)
|
||||
* 10.0
|
||||
* if crit { 1.25 } else { 1.0 })
|
||||
as u32)
|
||||
} else {
|
||||
0
|
||||
};
|
||||
let font_col = font_col(font_size, crit);
|
||||
// Timer sets the widget offset
|
||||
let y = if crit {
|
||||
ui_widgets.win_h * (floater.rand as f64 % 0.1)
|
||||
+ ui_widgets.win_h * 0.05
|
||||
} else {
|
||||
(floater.timer as f64
|
||||
/ crate::ecs::sys::floater::HP_SHOWTIME as f64
|
||||
* number_speed)
|
||||
+ 100.0
|
||||
};
|
||||
+ 100.0
|
||||
};
|
||||
|
||||
let x = if !crit {
|
||||
0.0
|
||||
} else {
|
||||
(floater.rand as f64 - 0.5) * 0.075 * ui_widgets.win_w
|
||||
+ (0.03
|
||||
* ui_widgets.win_w
|
||||
* (floater.rand as f64 - 0.5).signum())
|
||||
};
|
||||
let x = if !crit {
|
||||
0.0
|
||||
} else {
|
||||
(floater.rand as f64 - 0.5) * 0.075 * ui_widgets.win_w
|
||||
+ (0.03
|
||||
* ui_widgets.win_w
|
||||
* (floater.rand as f64 - 0.5).signum())
|
||||
};
|
||||
|
||||
Text::new(&hp_dmg_text)
|
||||
.font_size(font_size)
|
||||
.font_id(self.fonts.cyri.conrod_id)
|
||||
.color(if floater.info.amount < 0.0 {
|
||||
Color::Rgba(0.0, 0.0, 0.0, fade)
|
||||
} else {
|
||||
Color::Rgba(0.0, 0.0, 0.0, 1.0)
|
||||
})
|
||||
.x_y(x, y - 3.0)
|
||||
.position_ingame(ingame_pos)
|
||||
.set(sct_bg_id, ui_widgets);
|
||||
Text::new(&hp_dmg_text)
|
||||
.font_size(font_size)
|
||||
.font_id(self.fonts.cyri.conrod_id)
|
||||
.x_y(x, y)
|
||||
.color(if floater.info.amount < 0.0 {
|
||||
Color::Rgba(font_col.r, font_col.g, font_col.b, fade)
|
||||
} else {
|
||||
Color::Rgba(0.1, 1.0, 0.1, 1.0)
|
||||
})
|
||||
.position_ingame(ingame_pos)
|
||||
.set(sct_id, ui_widgets);
|
||||
}
|
||||
Text::new(&hp_dmg_text)
|
||||
.font_size(font_size)
|
||||
.font_id(self.fonts.cyri.conrod_id)
|
||||
.color(if floater.info.amount < 0.0 {
|
||||
Color::Rgba(0.0, 0.0, 0.0, fade)
|
||||
} else {
|
||||
Color::Rgba(0.0, 0.0, 0.0, 1.0)
|
||||
})
|
||||
.x_y(x, y - 3.0)
|
||||
.position_ingame(ingame_pos)
|
||||
.set(sct_bg_id, ui_widgets);
|
||||
Text::new(&hp_dmg_text)
|
||||
.font_size(font_size)
|
||||
.font_id(self.fonts.cyri.conrod_id)
|
||||
.x_y(x, y)
|
||||
.color(if floater.info.amount < 0.0 {
|
||||
Color::Rgba(font_col.r, font_col.g, font_col.b, fade)
|
||||
} else {
|
||||
Color::Rgba(0.1, 1.0, 0.1, 1.0)
|
||||
})
|
||||
.position_ingame(ingame_pos)
|
||||
.set(sct_id, ui_widgets);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -4565,12 +4405,12 @@ impl Hud {
|
||||
if floater.info.instance == info.instance
|
||||
// Group up crits and regular attacks for incoming damage
|
||||
&& (hit_me
|
||||
|| floater.info.crit_mult.is_some()
|
||||
== info.crit_mult.is_some())
|
||||
|| floater.info.crit
|
||||
== info.crit)
|
||||
{
|
||||
floater.info.amount += info.amount;
|
||||
if info.crit_mult.is_some() {
|
||||
floater.info.crit_mult = info.crit_mult
|
||||
if info.crit {
|
||||
floater.info.crit = info.crit
|
||||
}
|
||||
return;
|
||||
}
|
||||
@ -4585,27 +4425,23 @@ impl Hud {
|
||||
f.info.amount > 0.0
|
||||
}) && (hit_me
|
||||
// Ignore crit floaters if damage isn't incoming
|
||||
|| f.info.crit_mult.is_none())
|
||||
|| !f.info.crit)
|
||||
});
|
||||
|
||||
match last_floater {
|
||||
Some(f)
|
||||
// If the batch option is enabled, group floaters together for a
|
||||
// default time
|
||||
if (f.timer < if interface.sct_damage_batch {
|
||||
1.0
|
||||
} else if hit_me {
|
||||
if f.timer < if hit_me {
|
||||
interface.sct_inc_dmg_accum_duration
|
||||
} else {
|
||||
interface.sct_dmg_accum_duration
|
||||
}
|
||||
// To avoid grouping up crits with non-crits
|
||||
&& (info.crit_mult.is_none() || hit_me)
|
||||
) =>
|
||||
&& (!info.crit || hit_me)
|
||||
=>
|
||||
{
|
||||
f.jump_timer = 0.0;
|
||||
f.info.amount += info.amount;
|
||||
f.info.crit_mult = info.crit_mult;
|
||||
f.info.crit = info.crit;
|
||||
},
|
||||
_ => {
|
||||
floater_list.floaters.push(HpFloater {
|
||||
|
@ -77,15 +77,6 @@ widget_ids! {
|
||||
sct_title,
|
||||
sct_show_text,
|
||||
sct_show_radio,
|
||||
sct_single_dmg_text,
|
||||
sct_single_dmg_radio,
|
||||
sct_show_batch_text,
|
||||
sct_show_batch_radio,
|
||||
sct_batched_dmg_radio,
|
||||
sct_inc_dmg_text,
|
||||
sct_inc_dmg_radio,
|
||||
sct_batch_inc_text,
|
||||
sct_batch_inc_radio,
|
||||
sct_round_dmg_text,
|
||||
sct_round_dmg_radio,
|
||||
sct_dmg_accum_duration_slider,
|
||||
@ -719,9 +710,7 @@ impl<'a> Widget for Interface<'a> {
|
||||
/*Scrolling Combat text
|
||||
|
||||
O Show Damage Numbers
|
||||
O Show single Damage Numbers
|
||||
O Damage Accumulation Duration: 0s ----I----2s
|
||||
O Show batched dealt Damage
|
||||
O Show incoming Damage
|
||||
O Incoming Damage Accumulation Duration: 0s ----I----2s
|
||||
O Batch incoming Numbers
|
||||
@ -770,197 +759,77 @@ impl<'a> Widget for Interface<'a> {
|
||||
.settings
|
||||
.interface
|
||||
.sct_inc_dmg_accum_duration;
|
||||
// Toggle single damage numbers
|
||||
let show_sct_damage_batch = !ToggleButton::new(
|
||||
!self.global_state.settings.interface.sct_damage_batch,
|
||||
self.imgs.checkbox,
|
||||
self.imgs.checkbox_checked,
|
||||
)
|
||||
.w_h(18.0, 18.0)
|
||||
.down_from(state.ids.sct_show_text, 8.0)
|
||||
.hover_images(self.imgs.checkbox_mo, self.imgs.checkbox_checked_mo)
|
||||
.press_images(self.imgs.checkbox_press, self.imgs.checkbox_checked)
|
||||
.set(state.ids.sct_single_dmg_radio, ui);
|
||||
|
||||
Text::new(
|
||||
self.localized_strings
|
||||
.get("hud.settings.single_damage_number"),
|
||||
.get("hud.settings.damage_accumulation_duration"),
|
||||
)
|
||||
.right_from(state.ids.sct_single_dmg_radio, 10.0)
|
||||
.down_from(state.ids.sct_show_radio, 8.0)
|
||||
.right_from(state.ids.sct_show_radio, 10.0)
|
||||
.font_size(self.fonts.cyri.scale(14))
|
||||
.font_id(self.fonts.cyri.conrod_id)
|
||||
.graphics_for(state.ids.sct_single_dmg_radio)
|
||||
.color(TEXT_COLOR)
|
||||
.set(state.ids.sct_single_dmg_text, ui);
|
||||
.set(state.ids.sct_dmg_accum_duration_text, ui);
|
||||
|
||||
if !show_sct_damage_batch {
|
||||
Text::new(
|
||||
self.localized_strings
|
||||
.get("hud.settings.damage_accumulation_duration"),
|
||||
)
|
||||
.down_from(state.ids.sct_single_dmg_radio, 8.0)
|
||||
.right_from(state.ids.sct_single_dmg_radio, 10.0)
|
||||
.font_size(self.fonts.cyri.scale(14))
|
||||
.font_id(self.fonts.cyri.conrod_id)
|
||||
.color(TEXT_COLOR)
|
||||
.set(state.ids.sct_dmg_accum_duration_text, ui);
|
||||
|
||||
if let Some(new_val) = ImageSlider::continuous(
|
||||
sct_dmg_accum_duration,
|
||||
0.0,
|
||||
2.0,
|
||||
self.imgs.slider_indicator,
|
||||
self.imgs.slider,
|
||||
)
|
||||
.w_h(104.0, 22.0)
|
||||
.down_from(state.ids.sct_dmg_accum_duration_text, 8.0)
|
||||
.track_breadth(12.0)
|
||||
.slider_length(10.0)
|
||||
.pad_track((5.0, 5.0))
|
||||
.set(state.ids.sct_dmg_accum_duration_slider, ui)
|
||||
{
|
||||
events.push(SctDamageAccumDuration(new_val));
|
||||
}
|
||||
|
||||
Text::new(&format!("{:.2}", sct_dmg_accum_duration,))
|
||||
.right_from(state.ids.sct_dmg_accum_duration_slider, 8.0)
|
||||
.font_size(self.fonts.cyri.scale(14))
|
||||
.graphics_for(state.ids.sct_dmg_accum_duration_slider)
|
||||
.font_id(self.fonts.cyri.conrod_id)
|
||||
.color(TEXT_COLOR)
|
||||
.set(state.ids.sct_dmg_accum_duration_value, ui);
|
||||
if let Some(new_val) = ImageSlider::continuous(
|
||||
sct_dmg_accum_duration,
|
||||
0.0,
|
||||
2.0,
|
||||
self.imgs.slider_indicator,
|
||||
self.imgs.slider,
|
||||
)
|
||||
.w_h(104.0, 22.0)
|
||||
.down_from(state.ids.sct_dmg_accum_duration_text, 8.0)
|
||||
.track_breadth(12.0)
|
||||
.slider_length(10.0)
|
||||
.pad_track((5.0, 5.0))
|
||||
.set(state.ids.sct_dmg_accum_duration_slider, ui)
|
||||
{
|
||||
events.push(SctDamageAccumDuration(new_val));
|
||||
}
|
||||
|
||||
// Toggle Batched Damage
|
||||
let show_sct_damage_batch = ToggleButton::new(
|
||||
show_sct_damage_batch,
|
||||
self.imgs.checkbox,
|
||||
self.imgs.checkbox_checked,
|
||||
)
|
||||
.w_h(18.0, 18.0)
|
||||
.down_from(
|
||||
if show_sct_damage_batch {
|
||||
state.ids.sct_single_dmg_radio
|
||||
} else {
|
||||
state.ids.sct_dmg_accum_duration_slider
|
||||
},
|
||||
8.0,
|
||||
)
|
||||
.and_if(!show_sct_damage_batch, |tb| {
|
||||
tb.left_from(state.ids.sct_dmg_accum_duration_slider, 10.0)
|
||||
})
|
||||
.hover_images(self.imgs.checkbox_mo, self.imgs.checkbox_checked_mo)
|
||||
.press_images(self.imgs.checkbox_press, self.imgs.checkbox_checked)
|
||||
.set(state.ids.sct_show_batch_radio, ui);
|
||||
|
||||
if self.global_state.settings.interface.sct_damage_batch != show_sct_damage_batch {
|
||||
events.push(SctDamageBatch(
|
||||
!self.global_state.settings.interface.sct_damage_batch,
|
||||
))
|
||||
}
|
||||
|
||||
Text::new(self.localized_strings.get("hud.settings.cumulated_damage"))
|
||||
.right_from(state.ids.sct_show_batch_radio, 10.0)
|
||||
.font_size(self.fonts.cyri.scale(14))
|
||||
.font_id(self.fonts.cyri.conrod_id)
|
||||
.graphics_for(state.ids.sct_batched_dmg_radio)
|
||||
.color(TEXT_COLOR)
|
||||
.set(state.ids.sct_show_batch_text, ui);
|
||||
// Toggle Incoming Damage
|
||||
let show_sct_player_batch = !ToggleButton::new(
|
||||
!self.global_state.settings.interface.sct_player_batch,
|
||||
self.imgs.checkbox,
|
||||
self.imgs.checkbox_checked,
|
||||
)
|
||||
.w_h(18.0, 18.0)
|
||||
.down_from(state.ids.sct_show_batch_radio, 8.0)
|
||||
.hover_images(self.imgs.checkbox_mo, self.imgs.checkbox_checked_mo)
|
||||
.press_images(self.imgs.checkbox_press, self.imgs.checkbox_checked)
|
||||
.set(state.ids.sct_inc_dmg_radio, ui);
|
||||
|
||||
Text::new(self.localized_strings.get("hud.settings.incoming_damage"))
|
||||
.right_from(state.ids.sct_inc_dmg_radio, 10.0)
|
||||
.font_size(self.fonts.cyri.scale(14))
|
||||
.font_id(self.fonts.cyri.conrod_id)
|
||||
.graphics_for(state.ids.sct_inc_dmg_radio)
|
||||
.color(TEXT_COLOR)
|
||||
.set(state.ids.sct_inc_dmg_text, ui);
|
||||
|
||||
if !show_sct_player_batch {
|
||||
Text::new(
|
||||
self.localized_strings
|
||||
.get("hud.settings.incoming_damage_accumulation_duration"),
|
||||
)
|
||||
.down_from(state.ids.sct_inc_dmg_radio, 8.0)
|
||||
.right_from(state.ids.sct_inc_dmg_radio, 10.0)
|
||||
Text::new(&format!("{:.2}", sct_dmg_accum_duration,))
|
||||
.right_from(state.ids.sct_dmg_accum_duration_slider, 8.0)
|
||||
.font_size(self.fonts.cyri.scale(14))
|
||||
.graphics_for(state.ids.sct_dmg_accum_duration_slider)
|
||||
.font_id(self.fonts.cyri.conrod_id)
|
||||
.color(TEXT_COLOR)
|
||||
.set(state.ids.sct_inc_dmg_accum_duration_text, ui);
|
||||
.set(state.ids.sct_dmg_accum_duration_value, ui);
|
||||
|
||||
if let Some(new_val) = ImageSlider::continuous(
|
||||
sct_inc_dmg_accum_duration,
|
||||
0.0,
|
||||
2.0,
|
||||
self.imgs.slider_indicator,
|
||||
self.imgs.slider,
|
||||
)
|
||||
.w_h(104.0, 22.0)
|
||||
.down_from(state.ids.sct_inc_dmg_accum_duration_text, 8.0)
|
||||
.track_breadth(12.0)
|
||||
.slider_length(10.0)
|
||||
.pad_track((5.0, 5.0))
|
||||
.set(state.ids.sct_inc_dmg_accum_duration_slider, ui)
|
||||
{
|
||||
events.push(SctIncomingDamageAccumDuration(new_val));
|
||||
}
|
||||
|
||||
Text::new(&format!("{:.2}", sct_inc_dmg_accum_duration,))
|
||||
.right_from(state.ids.sct_inc_dmg_accum_duration_slider, 8.0)
|
||||
.font_size(self.fonts.cyri.scale(14))
|
||||
.graphics_for(state.ids.sct_inc_dmg_accum_duration_slider)
|
||||
.font_id(self.fonts.cyri.conrod_id)
|
||||
.color(TEXT_COLOR)
|
||||
.set(state.ids.sct_inc_dmg_accum_duration_value, ui);
|
||||
}
|
||||
|
||||
// Toggle Batched Incoming Damage
|
||||
let show_sct_player_batch = ToggleButton::new(
|
||||
show_sct_player_batch,
|
||||
self.imgs.checkbox,
|
||||
self.imgs.checkbox_checked,
|
||||
)
|
||||
.w_h(18.0, 18.0)
|
||||
.down_from(
|
||||
if show_sct_player_batch {
|
||||
state.ids.sct_inc_dmg_radio
|
||||
} else {
|
||||
state.ids.sct_inc_dmg_accum_duration_slider
|
||||
},
|
||||
8.0,
|
||||
)
|
||||
.and_if(!show_sct_player_batch, |tb| {
|
||||
tb.left_from(state.ids.sct_inc_dmg_accum_duration_slider, 10.0)
|
||||
})
|
||||
.hover_images(self.imgs.checkbox_mo, self.imgs.checkbox_checked_mo)
|
||||
.press_images(self.imgs.checkbox_press, self.imgs.checkbox_checked)
|
||||
.set(state.ids.sct_batch_inc_radio, ui);
|
||||
|
||||
if self.global_state.settings.interface.sct_player_batch != show_sct_player_batch {
|
||||
events.push(SctPlayerBatch(
|
||||
!self.global_state.settings.interface.sct_player_batch,
|
||||
))
|
||||
}
|
||||
Text::new(
|
||||
self.localized_strings
|
||||
.get("hud.settings.cumulated_incoming_damage"),
|
||||
.get("hud.settings.incoming_damage_accumulation_duration"),
|
||||
)
|
||||
.right_from(state.ids.sct_batch_inc_radio, 10.0)
|
||||
.down_from(state.ids.sct_dmg_accum_duration_slider, 8.0)
|
||||
.font_size(self.fonts.cyri.scale(14))
|
||||
.font_id(self.fonts.cyri.conrod_id)
|
||||
.graphics_for(state.ids.sct_batch_inc_radio)
|
||||
.color(TEXT_COLOR)
|
||||
.set(state.ids.sct_batch_inc_text, ui);
|
||||
.set(state.ids.sct_inc_dmg_accum_duration_text, ui);
|
||||
|
||||
if let Some(new_val) = ImageSlider::continuous(
|
||||
sct_inc_dmg_accum_duration,
|
||||
0.0,
|
||||
2.0,
|
||||
self.imgs.slider_indicator,
|
||||
self.imgs.slider,
|
||||
)
|
||||
.w_h(104.0, 22.0)
|
||||
.down_from(state.ids.sct_inc_dmg_accum_duration_text, 8.0)
|
||||
.track_breadth(12.0)
|
||||
.slider_length(10.0)
|
||||
.pad_track((5.0, 5.0))
|
||||
.set(state.ids.sct_inc_dmg_accum_duration_slider, ui)
|
||||
{
|
||||
events.push(SctIncomingDamageAccumDuration(new_val));
|
||||
}
|
||||
|
||||
Text::new(&format!("{:.2}", sct_inc_dmg_accum_duration,))
|
||||
.right_from(state.ids.sct_inc_dmg_accum_duration_slider, 8.0)
|
||||
.font_size(self.fonts.cyri.scale(14))
|
||||
.graphics_for(state.ids.sct_inc_dmg_accum_duration_slider)
|
||||
.font_id(self.fonts.cyri.conrod_id)
|
||||
.color(TEXT_COLOR)
|
||||
.set(state.ids.sct_inc_dmg_accum_duration_value, ui);
|
||||
|
||||
// Round Damage
|
||||
let show_sct_damage_rounding = ToggleButton::new(
|
||||
@ -969,7 +838,7 @@ impl<'a> Widget for Interface<'a> {
|
||||
self.imgs.checkbox_checked,
|
||||
)
|
||||
.w_h(18.0, 18.0)
|
||||
.down_from(state.ids.sct_batch_inc_radio, 8.0)
|
||||
.down_from(state.ids.sct_inc_dmg_accum_duration_slider, 8.0)
|
||||
.hover_images(self.imgs.checkbox_mo, self.imgs.checkbox_checked_mo)
|
||||
.press_images(self.imgs.checkbox_press, self.imgs.checkbox_checked)
|
||||
.set(state.ids.sct_round_dmg_radio, ui);
|
||||
|
@ -96,8 +96,6 @@ pub enum Graphics {
|
||||
#[derive(Clone)]
|
||||
pub enum Interface {
|
||||
Sct(bool),
|
||||
SctPlayerBatch(bool),
|
||||
SctDamageBatch(bool),
|
||||
SctRoundDamage(bool),
|
||||
SctDamageAccumDuration(f32),
|
||||
SctIncomingDamageAccumDuration(f32),
|
||||
@ -460,12 +458,6 @@ impl SettingsChange {
|
||||
Interface::Sct(sct) => {
|
||||
settings.interface.sct = sct;
|
||||
},
|
||||
Interface::SctPlayerBatch(sct_player_batch) => {
|
||||
settings.interface.sct_player_batch = sct_player_batch;
|
||||
},
|
||||
Interface::SctDamageBatch(sct_damage_batch) => {
|
||||
settings.interface.sct_damage_batch = sct_damage_batch;
|
||||
},
|
||||
Interface::SctRoundDamage(sct_round_damage) => {
|
||||
settings.interface.sct_damage_rounding = sct_round_damage;
|
||||
},
|
||||
|
@ -15,8 +15,6 @@ pub struct InterfaceSettings {
|
||||
pub toggle_chat: bool,
|
||||
pub toggle_hotkey_hints: bool,
|
||||
pub sct: bool,
|
||||
pub sct_player_batch: bool,
|
||||
pub sct_damage_batch: bool,
|
||||
pub sct_damage_rounding: bool,
|
||||
pub sct_dmg_accum_duration: f32,
|
||||
pub sct_inc_dmg_accum_duration: f32,
|
||||
@ -58,11 +56,9 @@ impl Default for InterfaceSettings {
|
||||
toggle_chat: true,
|
||||
toggle_hotkey_hints: true,
|
||||
sct: true,
|
||||
sct_player_batch: false,
|
||||
sct_damage_batch: false,
|
||||
sct_damage_rounding: false,
|
||||
sct_dmg_accum_duration: 1.0,
|
||||
sct_inc_dmg_accum_duration: 1.0,
|
||||
sct_dmg_accum_duration: 0.45,
|
||||
sct_inc_dmg_accum_duration: 0.45,
|
||||
speech_bubble_self: true,
|
||||
speech_bubble_dark_mode: false,
|
||||
speech_bubble_icon: true,
|
||||
|
Loading…
Reference in New Issue
Block a user