Follow the GDScript style guide in every script
- Types on every parameter, return value and variable, and snake_case names (the player name limit is the constant MAX_NAME_LENGTH). - Spelling fixes: *_triggered, character_selected, separator, caught_errors. The server's catched_errors key stays as the server sends it. - Signals are connected with signal.connect() instead of by name. - Code is ordered signals, constants, exported vars, vars, @onready vars, functions, with @onready on one line and two blank lines between functions. - Every script starts with a ## description. Template comments, old LOC notes and commented-out code are gone, apart from the local play code. - Lines are at most 100 characters, apart from the local play path. - The screenshot tour turns off the blinking text cursor so pictures match.
This commit is contained in:
1 parent
674604425f
commit
a0428e3475
45 files changed
+580
-589
No files matched your search
@@ -58,9 +58,14 @@ const RENAMED_SCENES: Dictionary = {
|
||||
"Player": "PlayerRow",
|
||||
}
|
||||
|
||||
## Nodes renamed inside a popup: old path from the main window, and new path.
|
||||
const SYNC_COLUMNS: String = "SyncPopup/SyncPanel/ScrollContainer/SyncVBoxContainer"
|
||||
|
||||
## Nodes renamed inside a popup: the path after the moves above, and the new path.
|
||||
const RENAMED_PATHS: Dictionary = {
|
||||
"SearchPopup/ScrollContainer/VBoxContainer": "SearchPopup/ScrollContainer/SearchResults",
|
||||
SYNC_COLUMNS + "/CatchedErrorsVBox": SYNC_COLUMNS + "/CaughtErrorsVBox",
|
||||
SYNC_COLUMNS + "/CaughtErrorsVBox/CatchedErrorsLabel":
|
||||
SYNC_COLUMNS + "/CaughtErrorsVBox/CaughtErrorsLabel",
|
||||
}
|
||||
|
||||
## How far a node may be from its old place, in pixels.
|
||||
@@ -102,9 +107,10 @@ static func new_path(old_path: String) -> String:
|
||||
var first: String = parts[0]
|
||||
parts[0] = MOVED.get(first, first)
|
||||
var path: String = "/".join(parts)
|
||||
# In order, so a node inside a renamed node is found after its parent's rename
|
||||
for renamed: String in RENAMED_PATHS:
|
||||
if path == renamed || path.begins_with(renamed + "/"):
|
||||
return RENAMED_PATHS[renamed] + path.trim_prefix(renamed)
|
||||
path = RENAMED_PATHS[renamed] + path.trim_prefix(renamed)
|
||||
return path
|
||||
|
||||
|
||||
|
||||
Reference in new issue
Block a user