Public repository for MUR pre alpha
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

26 lines
1.0 KiB

  1. extends Node
  2. const FILE_PATH = "user://local_storage"
  3. const RESOLUTIONS = [Vector2(1920,1080),Vector2(1600,900),Vector2(1366,758),Vector2(1280,720),Vector2(1136,640),Vector2(1024,576)]
  4. const CONTROL_ACTIONS = ["controls_thrust", "controls_break", "controls_add_road", "controls_next_road_type", "controls_prev_road_type", "controls_next_road_variant", "controls_prev_road_variant", "controls_reset", "controls_menu", "controls_capture"]
  5. const INPUT_UI_MAPPING = {"ui_accept" : "controls_add_road", "ui_select" : "controls_add_road", "ui_up" : "controls_next_road_variant", "ui_down" : "controls_prev_road_variant", "ui_left" : "controls_prev_road_type", "ui_right" : "controls_next_road_type"}
  6. var config_file:ConfigFile = ConfigFile.new()
  7. func _ready():
  8. config_file.load(FILE_PATH)
  9. func save():
  10. config_file.save(FILE_PATH)
  11. func get_value(section:String, key:String, default = null):
  12. return config_file.get_value(section,key,default)
  13. func set_value(section:String, key:String, value):
  14. config_file.set_value(section,key,value)