Skip to content

Commit

Permalink
Merge pull request #213 from ghost/dev-allow-chat-while-challenged
Browse files Browse the repository at this point in the history
Do not hide the `Chat` label while challenged.
  • Loading branch information
DDR0 authored Jun 4, 2022
2 parents d7233ad + a2a22e9 commit 41e9ac5
Showing 1 changed file with 23 additions and 1 deletion.
24 changes: 23 additions & 1 deletion modules/tbs/data/objects/user_online_entry.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,29 @@
selected_index: -1,
zorder: zorder+10,
_font_size: lib.gui.py(14),
items: if(has_challenged, ['Accept', 'Decline'], ['Challenge'] + if(info.status != 'idle', ['Watch'], []) + ['Chat']),
items: if (
has_challenged,
['Accept', 'Decline'],
// else
// TODO Consider making 'playing vs ai' local to `tbs`.
// Right now this is using a bit of `citadel` knowledge,
// reverting the abstraction `tbs` stands for.
['Challenge'] +
if (
info.status != 'idle'
and (observing_allowed_for_1vsAI or info.status != 'playing vs ai'),
['Watch'],
// else
[]
)
) + ['Chat']
where observing_allowed_for_1vsAI = developer_mode
where developer_mode = false
// The `tictactoe` module will use this.
or MODULE_OPTIONS.devtools is null
// The `citadel` module will use this.
or MODULE_OPTIONS.devtools is bool and MODULE_OPTIONS.devtools
,
click_handler: me._select_option,
grouping: info.id + '_user_info',
}, [
Expand Down

0 comments on commit 41e9ac5

Please sign in to comment.