Refactors atom/Initialize. Fixes ruins being initialized twice (#22778)

* Refactors atom/Initialize

Captialized for compiling correctness and to be more inline with Destroy

Will now be called from atom/New if the world initialization loop in SSobj has already run. Should always call the base.

Now comes with the `roundstart` parameter indicating whether or not it was called by SSobj or atom/New

Other fixes/tweaks:
- Renamed a proc called Initialize in abduction consoles to Setup
- Removed /obj/item/device/radio/headset/headset_sec/department: Broken and referenced literally nowhere in the code
- Removed a spawn from the Initialize of turbine_computer which made literally zero sense
- Generalized the proc which fixes RND servers with no id set

Reasoning: It's better to check roundstart per function than to have to duplicate code in New and Initialize. Think of it as a safer New for atoms. If we move enough stuff to it, initial map load performance will increase due to less New calls

* Fixed a thing

* Actually, fuck the police

* >Expecting a merge without errors

* >Not calling ..() in New

* Sanic

* Fix the headset bug

* Makes sure the map loaders dew it right

* Fixes ruins being initialized twice

* Rename roundstart -> mapload

* Revert "Rename roundstart -> mapload"

This reverts commit 667c327fd2ccfa3ce4f4db52eac03f9e8b0f6812.

* Remove unrelated change

* A more direct solution to map loads

* And now we shouldnt need this warning

* Add the new var to SSobj recovery

* Revert "Revert "Rename roundstart -> mapload""

This reverts commit dee07dbd5e4696554ac43aae5b91cce743b9b9e0.

* Line endings
This commit is contained in:
Cyberboss
2017-01-23 03:37:45 -05:00
committed by AnturK
parent 345fb5e111
commit 5959ac32cc
67 changed files with 378 additions and 384 deletions

View File

@@ -219,8 +219,10 @@
var/sensor_tag
var/sanitize_external
/obj/machinery/embedded_controller/radio/airlock_controller/initialize()
/obj/machinery/embedded_controller/radio/airlock_controller/Initialize(mapload)
..()
if(!mapload)
return
var/datum/computer/file/embedded_program/airlock_controller/new_prog = new