-
Notifications
You must be signed in to change notification settings - Fork 28
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Vote screen and revamped chatbox #252
base: main
Are you sure you want to change the base?
Vote screen and revamped chatbox #252
Conversation
Chatbox can now receive a message history to display
HOW TO REVIEW:
|
Chatbox can now receive a message history to display
…-and-revamped-chatbox
Marked this ready for review as this code might as well be in the game already. The vote UI is not done, but it is nice to have even as a placeholder. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I found bugs:
- There is no rolescreen
- No one gets infiltrator (broken role distribution?)
- In some cases, confirming a vote only deactivates the button I voted on, and if I click on an other button, it asks for confirmation, but doesn't change the vote.
- Skip doesn't do anything (is it intended like that?)
- Voting is never over nor any indication of number of votes can be seen
If any of the things I mentioned is out of the scope of the current PR, just let me know.
var enabledRoles: Array = ["infiltrator", "detective", "agent"] | ||
var roles: Dictionary = {"infiltrator": {"percent": float(2)/7, "amount": 1, "mustAssign": true, "team": 1}, | ||
var enabledRoles: Array = ["traitor", "detective", "default"] | ||
var roles: Dictionary = {"traitor": {"percent": float(2)/7, "amount": 1, "mustAssign": true, "team": 1}, | ||
"detective": {"percent": float(1)/7, "amount": 1, "mustAssign": false, "team": 0}, | ||
"agent": {"percent": 0, "amount": 0, "mustAssign": false, "team": 0}} | ||
"default": {"percent": 0, "amount": 0, "mustAssign": false, "team": 0}} | ||
var players: Dictionary = {} | ||
var playerRoles: Dictionary = {} | ||
var playerColors: Dictionary = {enabledRoles[0]: Color(1,0,0),# infiltrator | ||
var playerColors: Dictionary = {enabledRoles[0]: Color(1,0,0),# traitor | ||
enabledRoles[1]: Color(0,0,1),# detective | ||
enabledRoles[2]: Color(1,1,1)}# agent | ||
enabledRoles[2]: Color(1,1,1)}# default |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The official terminology is "infiltrator" and "agent", please don't change it back.
func update_ui(ui_name: String, ui_data: Dictionary = {}): | ||
if not ui_list.keys().has(ui_name): | ||
push_error("update_ui() called with invalid ui name " + ui_name) | ||
emit_signal("update_ui", ui_name, ui_data) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why are these functions here removed?
|
||
func state_changed_priority(old_state, new_state, priority): | ||
if priority != 0: | ||
return | ||
if new_state == GameManager.State.Normal: | ||
# needs to call _on_ready to connect signals, before roles are assigned | ||
open_ui("rolescreen") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
By deleting this, the rolescreen doesn't appear in the end of the turn
TODO
NOTES
res://assets/ui/lobbyui/voteui/
res://assets/ui/common/elements/chatboxbase/