daid / daid/EmptyEpsilon

[Regression] onNewPlayerShip() callback is never triggered

Open
#2,602 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Lua
Stars
869
Forks
222
Avg merge
18h 33m
Merged PRs (30d)
1

Description

@GinjaNinja32 via Discord

gameGlobalInfo stores the callback, but nothing actually triggers it

the quick fix on the scenario side is to just call setPlayers from update, so it's definitely happened by the time stuff needs accessing. it appears to not care about its argument and doesn't edit anything if everything's configured, so triggering it "too much" is safe

probably onNewPlayerShip should actually work though 😆

the lua side probably needs a way to trigger oNPS for script-invoked PlayerSpaceship() too, for maximum compat

unsure when exactly that callback happened, but it might be doable inside PlayerSpaceship itself?

looks like it happened inside the setTemplate call

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by tracing where gameGlobalInfo stores onNewPlayerShip and how setPlayers, PlayerSpaceship, and setTemplate interact. Confirm the callback fires for scenario-created and script-invoked PlayerSpaceship instances, including when the setTemplate path is used.

Written by the indexing model from the issue text.

Assessment

Tech stack
lua
Domain
game-dev
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.