mirror of
https://github.com/PolarisSS13/Polaris.git
synced 2025-12-14 20:22:42 +00:00
/atom New() => Initialize() [MDB IGNORE] (#8298)
* Find and replace argless atom New() to Initialize(). * Manual replacement of no-arg New() to Initialize(). * Manually replacing remaining New() overrides. * Fixing linter issues with now-removed New() args. * Tidying area init overrides. * Porting Neb's atom subsystem. * Trying to isolate init problems. * Adjusting Init code post-test. * Merging duplicate Initialize() procs. * Merge resolution.
This commit is contained in:
@@ -31,7 +31,7 @@ var/global/datum/ntnet/ntnet_global = new()
|
||||
/datum/ntnet/New()
|
||||
if(ntnet_global && (ntnet_global != src))
|
||||
ntnet_global = src // There can be only one.
|
||||
if (SSatoms && SSatoms.initialized > INITIALIZATION_INSSATOMS)
|
||||
if(SSatoms?.atom_init_stage > INITIALIZATION_INSSATOMS)
|
||||
for(var/obj/machinery/ntnet_relay/R in machines)
|
||||
relays.Add(R)
|
||||
R.NTNet = src
|
||||
|
||||
@@ -95,13 +95,10 @@
|
||||
ntnet_global.add_log("Manual override: Network blacklist cleared.")
|
||||
. = TRUE
|
||||
|
||||
/obj/machinery/ntnet_relay/New()
|
||||
..()
|
||||
assign_uid()
|
||||
default_apply_parts()
|
||||
|
||||
/obj/machinery/ntnet_relay/Initialize()
|
||||
. = ..()
|
||||
assign_uid()
|
||||
default_apply_parts()
|
||||
if(ntnet_global)
|
||||
ntnet_global.relays.Add(src)
|
||||
NTNet = ntnet_global
|
||||
|
||||
@@ -19,8 +19,8 @@
|
||||
broken_damage = 150
|
||||
w_class = ITEMSIZE_HUGE
|
||||
|
||||
/obj/item/modular_computer/telescreen/New()
|
||||
..()
|
||||
/obj/item/modular_computer/telescreen/Initialize()
|
||||
. = ..()
|
||||
// Allows us to create "north bump" "south bump" etc. named objects, for more comfortable mapping.
|
||||
name = "telescreen"
|
||||
|
||||
|
||||
@@ -46,11 +46,11 @@
|
||||
/obj/item/weapon/computer_hardware/proc/diagnostics(var/mob/user)
|
||||
to_chat(user, "Hardware Integrity Test... (Corruption: [damage]/[max_damage]) [damage > damage_failure ? "FAIL" : damage > damage_malfunction ? "WARN" : "PASS"]")
|
||||
|
||||
/obj/item/weapon/computer_hardware/New(var/obj/L)
|
||||
..()
|
||||
/obj/item/weapon/computer_hardware/Initialize()
|
||||
. = ..()
|
||||
w_class = hardware_size
|
||||
if(istype(L, /obj/item/modular_computer))
|
||||
holder2 = L
|
||||
if(istype(loc, /obj/item/modular_computer))
|
||||
holder2 = loc
|
||||
return
|
||||
|
||||
/obj/item/weapon/computer_hardware/Destroy()
|
||||
|
||||
@@ -56,19 +56,19 @@
|
||||
hardware_size = 1
|
||||
battery_rating = 30000
|
||||
|
||||
/obj/item/weapon/computer_hardware/battery_module/lambda/New()
|
||||
..()
|
||||
/obj/item/weapon/computer_hardware/battery_module/lambda/Initialize()
|
||||
. = ..()
|
||||
battery = new/obj/item/weapon/cell/infinite(src)
|
||||
|
||||
/obj/item/weapon/computer_hardware/battery_module/diagnostics(var/mob/user)
|
||||
..()
|
||||
to_chat(user, "Internal battery charge: [battery.charge]/[battery.maxcharge] CU")
|
||||
|
||||
/obj/item/weapon/computer_hardware/battery_module/New()
|
||||
/obj/item/weapon/computer_hardware/battery_module/Initialize()
|
||||
battery = new/obj/item/weapon/cell(src)
|
||||
battery.maxcharge = battery_rating
|
||||
battery.charge = 0
|
||||
..()
|
||||
. = ..()
|
||||
|
||||
/obj/item/weapon/computer_hardware/battery_module/Destroy()
|
||||
qdel_null(battery)
|
||||
|
||||
@@ -162,6 +162,6 @@
|
||||
stored_files = null
|
||||
return ..()
|
||||
|
||||
/obj/item/weapon/computer_hardware/hard_drive/New()
|
||||
/obj/item/weapon/computer_hardware/hard_drive/Initialize()
|
||||
install_default_programs()
|
||||
..()
|
||||
. = ..()
|
||||
@@ -25,8 +25,8 @@ var/global/ntnet_card_uid = 1
|
||||
if(ethernet)
|
||||
to_chat(user, "OpenEth (Physical Connection) - Physical network connection port")
|
||||
|
||||
/obj/item/weapon/computer_hardware/network_card/New(var/l)
|
||||
..(l)
|
||||
/obj/item/weapon/computer_hardware/network_card/Initialize()
|
||||
. = ..()
|
||||
identification_id = ntnet_card_uid
|
||||
ntnet_card_uid++
|
||||
|
||||
|
||||
@@ -26,8 +26,8 @@
|
||||
max_capacity = 256
|
||||
origin_tech = list(TECH_DATA = 4)
|
||||
|
||||
/obj/item/weapon/computer_hardware/hard_drive/portable/New()
|
||||
..()
|
||||
/obj/item/weapon/computer_hardware/hard_drive/portable/Initialize()
|
||||
. = ..()
|
||||
stored_files = list()
|
||||
recalculate_size()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user