canvi d'skin en la consola
This commit is contained in:
@@ -514,6 +514,21 @@ namespace Options {
|
||||
}
|
||||
}
|
||||
|
||||
// Carga configuración del jugador desde YAML
|
||||
void loadPlayerConfigFromYaml(const fkyaml::node& yaml) {
|
||||
if (yaml.contains("player")) {
|
||||
const auto& player_node = yaml["player"];
|
||||
if (player_node.contains("skin")) {
|
||||
try {
|
||||
int skin = player_node["skin"].get_value<int>();
|
||||
game.player_skin = (skin == 2) ? 2 : Defaults::Game::Player::SKIN;
|
||||
} catch (...) {
|
||||
game.player_skin = Defaults::Game::Player::SKIN;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Carga configuración del modo kiosko desde YAML
|
||||
void loadKioskConfigFromYaml(const fkyaml::node& yaml) {
|
||||
if (yaml.contains("kiosk")) {
|
||||
@@ -666,6 +681,7 @@ namespace Options {
|
||||
loadAudioConfigFromYaml(yaml);
|
||||
loadKeyboardControlsFromYaml(yaml);
|
||||
loadGamepadControlsFromYaml(yaml);
|
||||
loadPlayerConfigFromYaml(yaml);
|
||||
loadKioskConfigFromYaml(yaml);
|
||||
loadLocalizationFromYaml(yaml);
|
||||
|
||||
@@ -772,6 +788,11 @@ namespace Options {
|
||||
|
||||
// KIOSK
|
||||
file << "\n";
|
||||
file << "# PLAYER\n";
|
||||
file << "player:\n";
|
||||
file << " skin: " << game.player_skin << "\n";
|
||||
file << "\n";
|
||||
|
||||
file << "# KIOSK MODE\n";
|
||||
file << "kiosk:\n";
|
||||
file << " enabled: " << (kiosk.enabled ? "true" : "false") << "\n";
|
||||
|
||||
Reference in New Issue
Block a user