Fixed Achievements widget layout on mobile. Minor fixes for class selector (achievement requirements now shown when selecting a locked class)
This commit is contained in:
1 parent
b4ffcbed2a
commit
e4d582f153
3 files changed
+63
-5
No files matched your search
+7
-4
@@ -1390,9 +1390,11 @@ function displayClassInfo(playerClass) {
|
||||
<p>Damage: ${playerClass.base_attributes.damage_multiplier}</p>
|
||||
`;
|
||||
|
||||
// Add a visual indicator for locked classes in the info box
|
||||
if (!playerClass.unlocked_by_default) {
|
||||
className.innerHTML += ' <span class="locked-indicator">(Locked)</span>';
|
||||
// Remove the locked indicator if the class is unlocked
|
||||
if (playerClass.unlocked) {
|
||||
className.innerHTML = playerClass.name;
|
||||
} else {
|
||||
className.innerHTML = `${playerClass.name} <span class="locked-indicator">(Locked)</span>`;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3306,7 +3308,8 @@ function drawGameObjects() {
|
||||
|
||||
function selectClass(playerClass) {
|
||||
if (!playerClass.unlocked) {
|
||||
notificationSystem.showNotification('This class is locked. Unlock it to select.');
|
||||
const unlockRequirements = playerClass.unlock_requirements_text || "Unlock requirements not available";
|
||||
notificationSystem.showNotification(`This class is locked. ${unlockRequirements}`);
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user