diff options
author | BigBrotherNii <nicochr1004@gmail.com> | 2024-07-21 16:32:54 +0200 |
---|---|---|
committer | BigBrotherNii <nicochr1004@gmail.com> | 2024-07-21 16:32:54 +0200 |
commit | 4c76febd9c906643f80a94e1cbcdcb3ff6cede2b (patch) | |
tree | 5c1e029fa15abfe6d88e95a409bfbb515385df47 | |
parent | 24fe86b235c2345537ea1d65d2e1bbf1b92523b3 (diff) | |
download | hurrycurry-4c76febd9c906643f80a94e1cbcdcb3ff6cede2b.tar hurrycurry-4c76febd9c906643f80a94e1cbcdcb3ff6cede2b.tar.bz2 hurrycurry-4c76febd9c906643f80a94e1cbcdcb3ff6cede2b.tar.zst |
impossible username F.Miller in character editor
-rw-r--r-- | client/menu/character.gd | 8 | ||||
-rw-r--r-- | client/menu/character.tscn | 1 |
2 files changed, 9 insertions, 0 deletions
diff --git a/client/menu/character.gd b/client/menu/character.gd index a2526515..8f65311d 100644 --- a/client/menu/character.gd +++ b/client/menu/character.gd @@ -1,6 +1,7 @@ # Hurry Curry! - a game about cooking # Copyright 2024 metamuffin # Copyright 2024 tpart +# Copyright 2024 BigbrotherNii # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as published by @@ -73,3 +74,10 @@ func _on_character_back_pressed(): func _on_character_forward_pressed(): Global.set_profile("character", (Global.get_profile("character") + 1) % num_hairstyles) character.select_hairstyle(Global.get_profile("character")) + +func _on_username_text_changed(new_text): + var n = new_text.to_lower() + if n.begins_with("f") and n.ends_with("miller"): + await submenu("res://menu/warning_popup.tscn", tr("You cannot choose that name.\n(It's too close to your boss')")) + username_edit.text = "" + return diff --git a/client/menu/character.tscn b/client/menu/character.tscn index 891b5842..ef0cd842 100644 --- a/client/menu/character.tscn +++ b/client/menu/character.tscn @@ -150,6 +150,7 @@ text = "Back" visible = false layout_mode = 1 +[connection signal="text_changed" from="VBoxContainer/top_panel/a/username" to="." method="_on_username_text_changed"] [connection signal="focus_entered" from="VBoxContainer/Spacer/VBoxContainer/HBoxContainer/Back" to="." method="_on_back_focus_entered"] [connection signal="focus_exited" from="VBoxContainer/Spacer/VBoxContainer/HBoxContainer/Back" to="." method="_on_back_focus_exited"] [connection signal="pressed" from="VBoxContainer/Spacer/VBoxContainer/HBoxContainer/Back" to="." method="_on_character_back_pressed"] |