* ajout d'une aide de jeu directement dans l'interface * ajout de 8 nouvelles mutations (Productif, pressé, pur, vivace, généreux, robuste, protecteur et prolifique) * changements d'icône pour plus de clarté * changement de l'animation de recharge pour montrer le temps qui passe * ajout des mutations rare et de la possibilité d'avoir des mutation niveau 2 dès le départ * ajout d'un zoom * correction de bugs (déplacement au dialogue, problème de score au load d'une région)
82 lines
2.1 KiB
GDScript
82 lines
2.1 KiB
GDScript
extends Resource
|
|
class_name SettingsData
|
|
|
|
const MUSIC_BUS_ID = 1
|
|
const SFX_BUS_ID = 2
|
|
const AMBIANCE_BUS_ID = 3
|
|
|
|
signal language_changed(settings : SettingsData)
|
|
signal sound_changed(settings : SettingsData)
|
|
signal video_changed(settings : SettingsData)
|
|
signal game_changed(settings : SettingsData)
|
|
|
|
#region ------------------ Language ------------------
|
|
|
|
const AVAILABLE_LANGUAGES = [
|
|
"en",
|
|
"fr",
|
|
]
|
|
const AVAILABLE_LANGUAGES_LABEL = [
|
|
"English",
|
|
"Français",
|
|
]
|
|
|
|
@export var language : String = OS.get_locale_language() :
|
|
set(v):
|
|
language = v
|
|
language_changed.emit(self)
|
|
|
|
#region ------------------ Sound ------------------
|
|
|
|
@export var music_volume : float = 0.7 :
|
|
set(v):
|
|
music_volume = v
|
|
sound_changed.emit(self)
|
|
|
|
@export var ambiance_volume : float = 0.7 :
|
|
set(v):
|
|
ambiance_volume = v
|
|
sound_changed.emit(self)
|
|
|
|
@export var sfx_volume : float = 0.5 :
|
|
set(v):
|
|
sfx_volume = v
|
|
sound_changed.emit(self)
|
|
|
|
#region ------------------ Video ------------------
|
|
|
|
@export var full_screen : bool = true :
|
|
set(v):
|
|
full_screen = v
|
|
video_changed.emit(self)
|
|
|
|
#region ------------------ Controls ------------------
|
|
|
|
@export var action_remapped : Array[String] = []
|
|
@export var input_remapped : Array[InputEvent] = []
|
|
|
|
#region ------------------ Game ------------------
|
|
|
|
const MAX_ZOOM = 1.8
|
|
const MIN_ZOOM = 0.9
|
|
|
|
# Not in settings pannel
|
|
@export var zoom : float = 1. :
|
|
set(v):
|
|
zoom = min(MAX_ZOOM,max(MIN_ZOOM,v))
|
|
game_changed.emit(self)
|
|
|
|
@export var closed_help_containers = []
|
|
|
|
func is_help_container_closed(help_container_name : String) -> bool:
|
|
return help_container_name in closed_help_containers
|
|
|
|
func close_help_container(help_container_name : String):
|
|
if not help_container_name in closed_help_containers:
|
|
closed_help_containers.append(help_container_name)
|
|
game_changed.emit(self)
|
|
|
|
func open_help_container(help_container_name : String):
|
|
if help_container_name in closed_help_containers:
|
|
closed_help_containers.erase(help_container_name)
|
|
game_changed.emit(self) |