[0.15.33] Spawn location not affected by on_chunk_generated

Bugs that are actually features.
Post Reply
User avatar
eradicator
Smart Inserter
Smart Inserter
Posts: 5206
Joined: Tue Jul 12, 2016 9:03 am
Contact:

[0.15.33] Spawn location not affected by on_chunk_generated

Post by eradicator »

While modding i accidentially replaced most of the spawn area with water in an on_chunk_generated event. Spawning as a corpse when after starting in a new world. After pressing "continue" (Singleplayer) and waiting for the respawn i was standing on my corpse alive - very much to my suprise.
Picture
As my mod still has land at {0,0} and i can't seem to reproduce this by randomly restarting the world i suspect the following order of events:

1) The game generates the chunk containing {0,0}
2) The game checks if {0,0} is a valid spawn point
3) The game notices that {0,0} is NOT a valid spawn point (water, stones (?))
4) The game sets a new spawn point in the vicinity
5) My mod changes the chunk in on_chunk_generated
6) The game doesn't recheck if the spawn point still has land and spawns me on a water tile
7) I die.

Expected behavior:

Check 2) only after all mods events in 5) are done. I guess? :idea:

Addendum:

I'm not sure if would be my mods resposibility in that case to put the spawn point somewhere else. So i'm kinda posting this for completitions sake.
Author of: Belt Planner, Hand Crank Generator, Screenshot Maker, /sudo and more.
Mod support languages: 日本語, Deutsch, English
My code in the post above is dedicated to the public domain under CC0.

Rseding91
Factorio Staff
Factorio Staff
Posts: 13346
Joined: Wed Jun 11, 2014 5:23 am
Contact:

Re: [0.15.33] Spawn location not affected by on_chunk_generated

Post by Rseding91 »

Thanks for the report however this is working correctly.

Don't change the tiles under the player to water if you don't want to kill them :P
If you want to get ahold of me I'm almost always on Discord.

Post Reply

Return to “Not a bug”