Skip to content

Remove roundstart runtimes

Rob Nelson requested to merge pull/1487/roundstart_runtimes into Bleeding-Edge

Created by: wild-billy

Having runtimes on roundstart is pretty sad so I fixed them N2O floors were simple, added a check so they don't try to dick with their non-existent air datum The others were more interesting and warrant some explanation so hopefully they don't happen again.

tl;dr turfs are changelings, mob code is garbage, and people think its ok to avoid fixing runtimes for a year

Mining turfs' New() was calling one of their procs after a spawn(). The problem is, during that spawn, they were actually getting deleted and replaced with a different turf (a mining room turf, a /simulated/wall instead of an /unsimulated/floor). When turfs get deleted, their running procs aren't killed or have src set to null. Instead, the procs' src is set to the new turf and they continue running like nothing's wrong. After coming back from the spawn(), New() was trying to call one of its turf's procs, only to find that it had been replaced by an impostor! 😨 Fixed by removing the spawn() (which was added in https://github.com/d3athrow/vgstation13/commit/52c900520ccc390afc9056c1109b8745317b1a62 in 2011 with no explanation of course :trollface:)

Humans' New() was calling their set_species(), which was very crappy. It was crashing due to a runtime when the space russian corpse was created and attempted to get a species from the global list. Problem is, it was initializing before /world, and /world/New() actually builds its species list. Easily fixed. But now the server didn't even start. That's because the runtime in set_species() was causing New() to crash before finishing. When New() didn't crash, it went on to call a proc that eventually attempted to divide by zero. That's because it was dividing by a value it got from a global list. An uninitialized global list. 😞 Fixed that too (by building the lists when they're actually needed and cleaning up the species setting) This shit was introduced in https://github.com/d3athrow/vgstation13/commit/65f4751b60f45a2665dee80b76a4bcf983ad8534 and https://github.com/d3athrow/vgstation13/commit/27e1c5e869f77f1b9ece1ae09fda18069b5f699b and https://github.com/d3athrow/vgstation13/commit/2b77203275a03f765bb1257a96e1c85204ebc74f (all bay ports)

Merge request reports