Rebrand project and refresh title presentation
This commit is contained in:
parent
17fef2c5d4
commit
7ae20789a9
138 changed files with 1511 additions and 1498 deletions
|
|
@ -9,11 +9,11 @@ const BOOTSTRAP_TEMP_PATH := "user://data_root_bootstrap.json.tmp"
|
|||
const BOOTSTRAP_VERSION := 1
|
||||
const MANIFEST_VERSION := 1
|
||||
const LAYOUT_VERSION := 1
|
||||
const MANIFEST_FILENAME := "netfishing_data.json"
|
||||
const MANIFEST_FILENAME := "straywild_data.json"
|
||||
const README_FILENAME := "README.txt"
|
||||
const ENVIRONMENT_VARIABLE := "NETFISHING_DATA_DIR"
|
||||
const CREATE_ENVIRONMENT_VARIABLE := "NETFISHING_CREATE_DATA_DIR"
|
||||
const APPLICATION_ID := "netfishing"
|
||||
const ENVIRONMENT_VARIABLE := "straywild_DATA_DIR"
|
||||
const CREATE_ENVIRONMENT_VARIABLE := "straywild_CREATE_DATA_DIR"
|
||||
const APPLICATION_ID := "straywild"
|
||||
const APP_DATA_PORTABLE_PATH := "user://portable-data"
|
||||
const PATH_ALLOWED: StringName = &"allowed"
|
||||
const PATH_SOURCE_PROJECT: StringName = &"source_project"
|
||||
|
|
@ -48,7 +48,7 @@ func resolve() -> bool:
|
|||
mode = Mode.ENVIRONMENT_OVERRIDE
|
||||
var environment_path: String = OS.get_environment(ENVIRONMENT_VARIABLE)
|
||||
if not environment_path.is_absolute_path():
|
||||
return _fail("NETFISHING_DATA_DIR must be an absolute path.")
|
||||
return _fail("straywild_DATA_DIR must be an absolute path.")
|
||||
if (
|
||||
OS.get_environment(CREATE_ENVIRONMENT_VARIABLE) == "1"
|
||||
and not FileAccess.file_exists(
|
||||
|
|
@ -84,7 +84,7 @@ func default_visible_path() -> String:
|
|||
var documents: String = OS.get_system_dir(OS.SYSTEM_DIR_DOCUMENTS)
|
||||
if documents.is_empty():
|
||||
return ""
|
||||
var candidate: String = _normalize(documents.path_join("NETFISHING"))
|
||||
var candidate: String = _normalize(documents.path_join("straywild"))
|
||||
if not candidate.is_absolute_path():
|
||||
return ""
|
||||
var classification: StringName = classify_candidate_path(
|
||||
|
|
@ -109,16 +109,16 @@ func select_new_root(path: String, app_data: bool = false) -> bool:
|
|||
if FileAccess.file_exists(manifest_path):
|
||||
var manifest: Dictionary = _read_json(manifest_path)
|
||||
if not _valid_manifest(manifest):
|
||||
return _fail("The selected folder has a malformed NETfishing manifest.")
|
||||
return _fail("The selected folder has a malformed straywild manifest.")
|
||||
root_id = str(manifest["root_id"])
|
||||
else:
|
||||
if not _directory_is_empty(normalized) and not app_data:
|
||||
return _fail(
|
||||
"Choose an empty folder or an existing NETfishing data folder."
|
||||
"Choose an empty folder or an existing straywild data folder."
|
||||
)
|
||||
root_id = Crypto.new().generate_random_bytes(16).hex_encode()
|
||||
if not _create_layout(normalized, root_id):
|
||||
return _fail("The NETfishing data folder could not be created.")
|
||||
return _fail("The straywild data folder could not be created.")
|
||||
if not _write_bootstrap(normalized, root_id):
|
||||
return _fail("The data-folder pointer could not be saved.")
|
||||
root_path = normalized
|
||||
|
|
@ -238,15 +238,15 @@ func _activate_existing(path: String, expected_id: String, permit_creation: bool
|
|||
return false
|
||||
var manifest_path: String = normalized.path_join(MANIFEST_FILENAME)
|
||||
if not FileAccess.file_exists(manifest_path):
|
||||
return _fail("The selected folder is not a NETfishing data folder.")
|
||||
return _fail("The selected folder is not a straywild data folder.")
|
||||
var manifest: Dictionary = _read_json(manifest_path)
|
||||
if not _valid_manifest(manifest):
|
||||
return _fail("The NETfishing data-folder manifest is malformed.")
|
||||
return _fail("The straywild data-folder manifest is malformed.")
|
||||
var found_id: String = str(manifest["root_id"])
|
||||
if not expected_id.is_empty() and expected_id != found_id:
|
||||
return _fail("The selected data folder does not match this device pointer.")
|
||||
if not _test_writable(normalized):
|
||||
return _fail("The NETfishing data folder is unavailable or unwritable.")
|
||||
return _fail("The straywild data folder is unavailable or unwritable.")
|
||||
root_path = normalized
|
||||
root_id = found_id
|
||||
requires_selection = false
|
||||
|
|
@ -339,7 +339,7 @@ static func _is_same_or_child_path(candidate: String, reference: String) -> bool
|
|||
|
||||
func _test_writable(path: String) -> bool:
|
||||
var probe: String = path.path_join(
|
||||
".netfishing-write-%s.tmp" % device_id.left(12)
|
||||
".straywild-write-%s.tmp" % device_id.left(12)
|
||||
)
|
||||
var file: FileAccess = FileAccess.open(probe, FileAccess.WRITE)
|
||||
if file == null:
|
||||
|
|
@ -370,7 +370,7 @@ func _create_layout(path: String, id: String) -> bool:
|
|||
):
|
||||
return false
|
||||
var readme: String = (
|
||||
"NETfishing player data\n\n"
|
||||
"straywild player data\n\n"
|
||||
+ "This folder is safe to synchronize with tools such as Syncthing.\n"
|
||||
+ "Active private identity keys remain device-local.\n"
|
||||
+ "Encrypted identity backups require their passphrase.\n"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue