Repository navigation
Conversation
…44, 50, 55, 57
Destroyed entities lose all their methods (only isValid() works), so a
script that keeps a reference and calls a method on it later raises a Lua
error. GameGlobalInfo::update stops calling update() after 5 errors in a
row, so a mission can freeze with no win or loss. Each hunk guards one such
call; no behaviour changes while the entity is alive.
- 03_waves: reward the first friendly station still alive, not friendlyList[1]
- 06_edgeofspace: orderRoaming only on Kraylor ships that still exist
- 07_gftp: return after victory("Ghosts"); the rest of update() uses stakhanov
- 08_atlantis: target dummies may be destroyed before the scan phase ends; a
destroyed dummy counts as scanned
- 31_payload: PayloadShip checked in CheckWinCondition, DeterminePayloadTarget,
HandlePayloadMovement; SafeAttackRandom returns false for an empty list
(irandom(1, 0))
- 44_outpost: enemy_reverts created before the first table.insert
- 50_gaps: nearStations with an empty list, areEnemiesInRange on a destroyed
homeStation, "Where are you headed?" when the freighter's target is gone
- 55_defenderHunter, 57_shoreline: same "Where are you headed?" guard;
55 endStatistics checks station:isValid(); 57 friendlyFreighterComms
defines the local shipType its branches use
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Same kind of fix as #2908. A destroyed entity loses all its methods (only
isValid()still works), so a script that holds a reference and calls a method on it later raises a Lua error.GameGlobalInfo::updatestops callingupdate()after 5 errors in a row, so the mission can freeze with no win or loss. Each hunk guards one call; nothing changes while the entity is alive.spawnWavefriendlyList[1]:addReputationPointsafter that station died; now rewards the first one still alivekraylor_e1..4:orderRoaming()on destroyed shipsupdate()kept usingstakhanovaftervictory("Ghosts"); now returnssetShields/setShieldsMax/isScannedByon a destroyed dummy; a destroyed dummy counts as scannedCheckWinCondition,DeterminePayloadTarget,HandlePayloadMovement,SafeAttackRandomPayloadShip;irandom(1, 0)on an empty listenemyCommstable.insert(enemy_reverts, ...)before the table existsnearStations,waves, freighter commsareEnemiesInRangeon a destroyedhomeStation;comms_target.target:getCallSign()when the target is goneendStatisticschecksstation:isValid(); 57friendlyFreighterCommsdefines theshipTypelocal its branches useTesting: every added line (apart from 4 comment lines) is identical to code that ran in automated headless runs of all 16 stock scenarios on a fork, with 0 Lua errors from these sites. Some guards (03, 06, 07, 50
homeStation) were never reached by a run, so those are review-by-reading only.🤖 Generated with Claude Code