Skip to content
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

Add team attribute to entities #989

Merged
merged 15 commits into from
Dec 9, 2024
Merged

Conversation

Nico-Sanchez
Copy link
Collaborator

@Nico-Sanchez Nico-Sanchez commented Nov 20, 2024

@Nico-Sanchez Nico-Sanchez marked this pull request as ready for review November 20, 2024 18:15
@tvillegas98
Copy link
Contributor

This PR also closes #960

tvillegas98
tvillegas98 previously approved these changes Nov 25, 2024
Copy link
Contributor

@tvillegas98 tvillegas98 left a comment

Choose a reason for hiding this comment

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

LGTM just left a question

character_name: character_name,
name: player_name,
from_pid: from_pid,
type: :human
Copy link
Contributor

Choose a reason for hiding this comment

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

Is there a reason for this type parameter? just wondering

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

It's used by the game_updater genserver to save human and bot ids in different lists.
See game_updater.ex:80-84

@tvillegas98 tvillegas98 marked this pull request as draft November 29, 2024 21:03
@Nico-Sanchez Nico-Sanchez marked this pull request as ready for review December 2, 2024 15:21
tvillegas98
tvillegas98 previously approved these changes Dec 3, 2024
Copy link
Collaborator

@manucamejo manucamejo left a comment

Choose a reason for hiding this comment

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

Hey @Nico-Sanchez I'm getting an error when the match ends in Deathmatch mode.

** (BadMapError) expected a map, got: 12
    (elixir 1.16.2) lib/map.ex:682: Map.update(12, :category, nil, #Function<8.2673582/1 in Arena.GameUpdater.complete_entity/2>)
    (arena 0.11.1) lib/arena/game_updater.ex:812: Arena.GameUpdater.complete_entity/2
    (arena 0.11.1) lib/arena/game_updater.ex:803: anonymous fn/3 in Arena.GameUpdater.complete_entities/2
    (stdlib 5.2.1) maps.erl:416: :maps.fold_1/4
    (arena 0.11.1) lib/arena/game_updater.ex:786: Arena.GameUpdater.broadcast_game_ended/2
    (arena 0.11.1) lib/arena/game_updater.ex:353: Arena.GameUpdater.handle_info/2
    (stdlib 5.2.1) gen_server.erl:1095: :gen_server.try_handle_info/3
    (stdlib 5.2.1) gen_server.erl:1183: :gen_server.handle_msg/6
    (stdlib 5.2.1) proc_lib.erl:241: :proc_lib.init_p_do_apply/3
Last message: :deathmatch_end_game_check

Can you solve it?

@tvillegas98 tvillegas98 merged commit f64096d into main Dec 9, 2024
1 check passed
@tvillegas98 tvillegas98 deleted the add-team-attribute-to-entities branch December 9, 2024 18:06
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.

3 participants