forked from jaildesigner-jailgames/jaildoctors_dilemma
canvi de pc
This commit is contained in:
@@ -77,18 +77,18 @@ int Cheevos::find(int id)
|
||||
// Desbloquea un logro
|
||||
void Cheevos::unlock(int id)
|
||||
{
|
||||
const int index = find(id);
|
||||
const int INDEX = find(id);
|
||||
|
||||
// Si el índice es inválido, el logro no es válido, ya está completado o el sistema de logros no está habilitado, no hacemos nada
|
||||
if (index == -1 || !cheevos_list_.at(index).obtainable || cheevos_list_.at(index).completed || !enabled_)
|
||||
if (INDEX == -1 || !cheevos_list_.at(INDEX).obtainable || cheevos_list_.at(INDEX).completed || !enabled_)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
// Marcar el logro como completado
|
||||
cheevos_list_.at(index).completed = true;
|
||||
cheevos_list_.at(INDEX).completed = true;
|
||||
// Mostrar notificación en la pantalla
|
||||
Notifier::get()->show({"ACHIEVEMENT UNLOCKED!", cheevos_list_.at(index).caption}, NotificationText::LEFT, cheevos_list_.at(index).icon);
|
||||
Notifier::get()->show({"ACHIEVEMENT UNLOCKED!", cheevos_list_.at(INDEX).caption}, NotificationText::LEFT, cheevos_list_.at(INDEX).icon);
|
||||
// Guardar el estado de los logros
|
||||
saveToFile();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user