Skip to content

Type Handlers - #1237

Open
PiggyPiglet wants to merge 1 commit into
masterfrom
feat/type-handling
Open

PiggyPiglet wants to merge 1 commit into
masterfrom
feat/type-handling

Conversation

@PiggyPiglet

Copy link
Copy Markdown
Member

Pull Request

Type

  • Internal change (Doesn't affect end-user).
  • External change (Does affect end-user).
  • Wiki (Changes towards the Wiki).
  • Other: __________

Description

Closes #1208

This is an idea from PAPI3, however the implementation in this version doesn't exactly match what it would've in papi 3.

A developer could for example have something like

case "loc":
        return player.getLocation();

and should a type handler for Location be registered, that type handler could then provide placeholders like _x, _y, etc, allowing for a standarised format and predictable results across all expansions returning a specific type versus independent implementations that may differ.

I'm not happy with the implementation or api design here... at all, but I only had 2 hours to work on this so that's where we're at. In a perfect world a type handler would attach directly to an expansion and for example %player_x% would work, wouldn't need %player_loc_x%, however that's out of scope for tonight.

@PiggyPiglet
PiggyPiglet requested a review from darbyjack as a code owner July 1, 2026 13:52
@PiggyPiglet PiggyPiglet changed the title rough prototype Type Handlers Jul 1, 2026
@Andre601

Andre601 commented Jul 1, 2026

Copy link
Copy Markdown
Collaborator

Why the rush? Just wait with making this in all honesty.

@PiggyPiglet

Copy link
Copy Markdown
Member Author

Not really any rush, doubt this will be ready for next release

This branch has not been deployed

No deployments
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.

Allow placeholder to return text component

2 participants