Skip to content

Commit 3a32f54

Browse files
authored
storyquest_bootstrap: Forbid "story" and "quest" words (#1452)
In title and folder. The rationale for the folder is that the quests are already inside a story_quests/ folder. The rationale for the title is to prevent dull titles like "My Story Quest" or similar.
1 parent 187f29d commit 3a32f54

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

addons/storyquest_bootstrap/new_storyquest_dialog.gd

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,8 +99,12 @@ func _revalidate() -> void:
9999
errors.append("⚠ ‘%s’ is not allowed in the folder name" % match.get_string(0))
100100
if _filename.to_lower() != _filename:
101101
errors.append("⚠ Folder name must be lower-case")
102+
if "story" in _filename and "quest" in _filename:
103+
errors.append('⚠ Folder name cannot include "story" and "quest" words')
102104
if _title:
103105
errors.append_array(validate_filename.call(_filename))
106+
if "story" in _title.to_lower() and "quest" in _title.to_lower():
107+
errors.append('⚠ Title cannot include "story" and "quest" words')
104108

105109
errors_label.text = "\n".join(errors)
106110
create_button.disabled = errors.size() > 0

0 commit comments

Comments
 (0)