Skip to content

EntitySystem.Spawn: defer MapInitEvent in SpawnNextTo/InContainer/...OrDrop#6784

Open
whatston3 wants to merge 3 commits into
space-wizards:masterfrom
whatston3:2026-07-11-spawnnextoordrop-init
Open

EntitySystem.Spawn: defer MapInitEvent in SpawnNextTo/InContainer/...OrDrop#6784
whatston3 wants to merge 3 commits into
space-wizards:masterfrom
whatston3:2026-07-11-spawnnextoordrop-init

Conversation

@whatston3

Copy link
Copy Markdown
Contributor

This PR changes the EntityManager.SpawnX functions so that the MapInitEvent is fired when the entity is on its target map, not nullspace.

Why?

Will resolve this issue: space-wizards/space-station-14#41502

Without this, these Spawn functions are more or less useless for spawning spawners (that tend to run on MapInit).

Gives a stronger, more consistent guarantee of when the MapInitEvent will be run between Spawn commands.

Media

A demonstration of the issue in space-wizards/space-station-14#41502 being resolved, which uses SpawnNextToOrDrop:

get-crystal.mp4

@whatston3
whatston3 requested a review from DrSmugleaf as a code owner July 12, 2026 15:21
@SnappingOpossum

Copy link
Copy Markdown

Similar to #6192 in what it accomplishes.

@whatston3

Copy link
Copy Markdown
Contributor Author

Similar to #6192 in what it accomplishes.

Wasn't noted in the linked issue when it should've been.

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.

2 participants