Skip to content

Display selected characters in player panel and log - #64

Open
lulco wants to merge 2 commits into
Syarwin:masterfrom
lulco:display-selected-characters
Open

Display selected characters in player panel and log#64
lulco wants to merge 2 commits into
Syarwin:masterfrom
lulco:display-selected-characters

Conversation

@lulco

@lulco lulco commented Oct 5, 2025

Copy link
Copy Markdown
Collaborator

Resolved https://en.boardgamearena.com/bug?id=61987

Some screenshots from BGA studio

image
image
image

@lulco
lulco requested a review from kuwizard October 5, 2025 14:00
if (isset($data['player'])) {
$data['player_id'] = $data['player']->getId();
$data['player_name'] = $data['player']->getName();
$data['player_name'] = !isset($data['player_name']) ? $data['player']->getName() : $data['player_name'];

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you please invert !isset to isset? It's harder to read ternary conditions when it starts with !

return $this->name;
$name = $this->name;
if ($withCharacter && $this->getCharName()) {
$name .= ' (' . $this->getCharName() . ')';

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we go with JS-like syntax: $name = "{$name} ({$this->getCharName()})" ? It's much more readable IMO

@kuwizard

kuwizard commented Oct 14, 2025

Copy link
Copy Markdown
Collaborator

Looks great overall actually, thanks for adding this.
One general comment - @lulco, could you add some top and bottom margins a bit before and after the character name at playerboard? It looks a bit messy now

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants