this.shipExitedWormhole broken in 1.73.4?

For test results, bug reports, announcements of new builds etc.

Moderators: winston, another_commander, Getafix

Post Reply
User avatar
Commander McLane
---- E L I T E ----
---- E L I T E ----
Posts: 9520
Joined: Thu Dec 14, 2006 9:08 am
Location: a Hacker Outpost in a moderately remote area
Contact:

this.shipExitedWormhole broken in 1.73.4?

Post by Commander McLane »

For the OXP discussed here I want ships to send a message after they left a wormhole (and not if they are spawned without a wormhole effect). I thought I could use the shipExitedWormhole handler for that.

But it turns out that it is not fired after a system.legacy_addShip. Also the shipExitedWitchspace handler does not fire, but probably it isn't supposed to for NPCs.

Which brings me to the question whether there is something broken, or if the shipExitedWormhole handler isn't supposed to fire after a legacy_addShip in the first place? I think it should, because from the player's perspective the NPC is coming out of witchspace.

My request is therefore that legacy_addShip should trigger a shipExitedWormhole, but not all the other legacy_addFoo methods, because they don't show a witchspace cloud.

More specifically: any ship adding method which shows the witchspace cloud effect should trigger the shipExitedWormhole handler. Thank you!
User avatar
JensAyton
Grand Admiral Emeritus
Grand Admiral Emeritus
Posts: 6657
Joined: Sat Apr 02, 2005 2:43 pm
Location: Sweden
Contact:

Post by JensAyton »

shipExitedWormhole is not supposed to be called in that situation. It’s intended for restoring state after a ship has been suspended in a wormhole object, rather than reflecting special effects.

Supporting shipExitedWitchspace for NPCs (both when spawning in a wormholey way and when being restored from a “real” wormhole) would probably be a better idea.
User avatar
Commander McLane
---- E L I T E ----
---- E L I T E ----
Posts: 9520
Joined: Thu Dec 14, 2006 9:08 am
Location: a Hacker Outpost in a moderately remote area
Contact:

Post by Commander McLane »

Is there a workaround I could use in the meantime? What I come up with out of my head is to check for proximity to the witchpoint at shipSpawned. But perhaps there is a better way?
User avatar
JensAyton
Grand Admiral Emeritus
Grand Admiral Emeritus
Posts: 6657
Joined: Sat Apr 02, 2005 2:43 pm
Location: Sweden
Contact:

Post by JensAyton »

Nothing off the top of my head.
Post Reply