Skip to content

Parse callouts#391

Open
JanEricNitschke wants to merge 12 commits into
pnxenopoulos:mainfrom
JanEricNitschke:parse-callouts
Open

Parse callouts#391
JanEricNitschke wants to merge 12 commits into
pnxenopoulos:mainfrom
JanEricNitschke:parse-callouts

Conversation

@JanEricNitschke
Copy link
Copy Markdown
Collaborator

@JanEricNitschke JanEricNitschke commented Mar 31, 2025

Closes #390

Based on #376

Example test could be like:

callouts = Callout.multiple_from_json("callouts/de_anubis.json")
print(sorted({callout.callout for callout in callouts}))

print(Callout.callout_from_position(Vector3(579, 1296, -17), callouts))  # Unknown (Camera)
print(Callout.callout_from_position(Vector3(-125, 416, 64), callouts))  # Bridge
print(Callout.callout_from_position(Vector3(264, 176, -125), callouts))  # Canal
print(Callout.callout_from_position(Vector3(-701, 119, -32), callouts))  # Connector


Also still needs to be integrated into the artifact handling.

@JanEricNitschke JanEricNitschke requested a review from Copilot March 31, 2025 07:28
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR implements enhancements for parsing callouts and improves handling of VPhys data, including optional in-memory input and additional filtering options. Key changes:

  • Added to_dict/from_dict for Triangle in awpy/visibility.py.
  • Updated VphysParser to support in-memory VPhys data and new flags (including_player_clippings and include_everything).
  • Introduced a new module, awpy/callout.py, and integrated a new CLI command for parsing callouts.

Reviewed Changes

Copilot reviewed 5 out of 7 changed files in this pull request and generated no comments.

Show a summary per file
File Description
awpy/visibility.py Added dictionary conversion methods for Triangle and extended VphysParser API.
awpy/vector.py Added scalar division and multiplication operators for Vector3.
awpy/cli.py Updated CLI commands and parameters to support new VPhysParser options and callouts.
awpy/callout.py Introduced callout parsing from vents and PHYS blocks with JSON serialization.
awpy/init.py Updated all to expose the new Callout module.
Files not reviewed (2)
  • scripts/generate-callouts.ps1: Language not supported
  • scripts/generate-tris.ps1: Language not supported
Comments suppressed due to low confidence (1)

awpy/visibility.py:286

  • [nitpick] Consider renaming 'include_everything' to a more descriptive name, such as 'include_all_meshes_and_hulls', to clearly indicate its purpose.
include_everything: bool = False,

@JanEricNitschke JanEricNitschke requested a review from Copilot April 11, 2025 08:46
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Copilot reviewed 9 out of 11 changed files in this pull request and generated no comments.

Files not reviewed (2)
  • scripts/generate-tris.ps1: Language not supported
  • scripts/generate-volumes.ps1: Language not supported
Comments suppressed due to low confidence (2)

awpy/plantzone.py:80

  • The docstring in the from_dict method mistakenly refers to 'Bomnbsite' instead of 'Plantzone'. Please update the type reference to match the class name.
            Bomnbsite: plantzone object created from the dictionary.

awpy/buyzone.py:73

  • The docstring incorrectly states that it converts to a Callout object; it should reference a Buyzone object instead.
        """Convert a dictionary to a Callout object.

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.

Provide function of Position -> Place name (in game callout)

2 participants