Skip to content

Conversation

kano-dot
Copy link
Contributor

@kano-dot kano-dot commented Sep 3, 2025

To break down the way we handle map spawning logic:

  • in mapsystem/map.dm, build_away_sites() evaluates every map_template and organizes suitable candidates considering: flags they bear, if the current sector allows this away site to spawn, etc...

  • It randomly picks among available maps via pickweight(), decreasing relevant cost from the total budget

So far why this never caused any problems is, pickweight() will never pick a key with 0 value unless every key passed to this function has 0 value. What was happening here is system runs out of other candidates before exhausting its budget, leaving only odyssey maps with 0 weight in the list.

This fix should only affect natural map spawning process, since Odyssey has its own method on choosing candidates. Fixes #21276

@github-actions github-actions bot added the 🗺️ Mapping - Away Ship/Away Site The PR touches away ship and/or away site map files. label Sep 3, 2025
@kano-dot
Copy link
Contributor Author

kano-dot commented Sep 3, 2025

!bugfix

@BotBOREALIS BotBOREALIS added the Bugfix The PR is fixing an issue and requires less reviews and time to be ready for merging. label Sep 3, 2025
@kano-dot
Copy link
Contributor Author

kano-dot commented Sep 3, 2025

!review

@NonQueueingMatt NonQueueingMatt added this pull request to the merge queue Sep 4, 2025
Merged via the queue into Aurorastation:master with commit f9857ec Sep 4, 2025
25 checks passed
@kano-dot kano-dot deleted the odyssey-fix branch September 4, 2025 20:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Awaiting Merge Bugfix The PR is fixing an issue and requires less reviews and time to be ready for merging. 🗺️ Mapping - Away Ship/Away Site The PR touches away ship and/or away site map files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: Odyssey clone lab spawns every round

4 participants