Skip to content

馃┕ Fix spawning with directions being blocked by hostiles under safemode - #159

Open
tiennou wants to merge 2 commits into
screeps:masterfrom
tiennou:fix/safemode-blocks-spawning-move
Open

馃┕ Fix spawning with directions being blocked by hostiles under safemode#159
tiennou wants to merge 2 commits into
screeps:masterfrom
tiennou:fix/safemode-blocks-spawning-move

Conversation

@tiennou

@tiennou tiennou commented Aug 6, 2026

Copy link
Copy Markdown
Contributor

As reported on Discord.

When a room is under safemode, newly born creeps can't actually spawn as the obstacle check there doesn't account for the safemode to be active (vs. the generic movement code, which does). This leads to a situation where, if you have a specific direction hardcoded, and an enemy creep stand there, spawning deadlocks until the obstacle clears even though technically they should be passable (per the safemode rules).

Fix the issue by extracting the more elaborate obstacle check helpers from movement into utils, and make use of that in _born-creep.js intent.

Note that the bulk of the spec was written by an LLM (really just prompted for "spec me this"), then some hefty guidance to have the helper extracted and wired in.

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.

1 participant