Skip to content

Commit

Permalink
* removed user settings.ini which will be replaced with the LL_settin…
Browse files Browse the repository at this point in the history
…gs table in the geopackage
  • Loading branch information
chrisgraf committed May 24, 2020
1 parent c9f4821 commit 82f3635
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions Global/Settings.gd
Original file line number Diff line number Diff line change
Expand Up @@ -3,20 +3,16 @@ extends JSONParser

#
# Parses default-settings.json in order to allow any script to access any setting
# TODO: an optional settings.json in the working directory can overwrite the default settings
# TODO: an optional readout of the LL_settings table in the geopackage can overwrite the default settings
#

var user_config: JSONParseResult = parse_user_data()
var default_data: JSONParseResult = _parse_json("res://default-settings.json")


func parse_user_data():
var config = ConfigFile.new()
var err = config.load("user://settings.ini")
if err == OK:
return config
else:
logger.info("Could not find a user configuration file so working with the defaults")
# TODO: implement reading the geopackage table LL_settings
pass


# Get a specific setting by category and label (for example: category 'server', label 'ip')
Expand Down

0 comments on commit 82f3635

Please sign in to comment.