From 060c49b9a6d7f9c45f1e2e9cff95a1eb67bb3e9c Mon Sep 17 00:00:00 2001 From: silicons <2003111+silicons@users.noreply.github.com> Date: Sun, 21 Feb 2021 23:18:34 -0700 Subject: [PATCH] more --- code/modules/holodeck/HolodeckObjects.dm | 16 +- code/modules/holomap/station_holomap.dm | 4 +- .../modules/hydroponics/beekeeping/beehive.dm | 25 ++- code/modules/hydroponics/grown_inedible.dm | 6 +- code/modules/hydroponics/seed_machines.dm | 7 +- code/modules/hydroponics/seed_storage.dm | 4 +- code/modules/hydroponics/trays/tray_soil.dm | 8 +- .../core/assemblies/device.dm | 4 +- .../core/integrated_circuit.dm | 12 +- .../integrated_electronics/core/tools.dm | 145 +++++++----------- .../subtypes/data_transfer.dm | 14 +- .../integrated_electronics/subtypes/input.dm | 9 +- .../integrated_electronics/subtypes/memory.dm | 4 +- .../integrated_electronics/subtypes/output.dm | 8 +- .../subtypes/reagents.dm | 5 +- code/modules/lighting/lighting_area.dm | 4 +- code/modules/materials/material_synth.dm | 12 +- code/modules/mining/coins.dm | 3 +- code/modules/mining/drilling/drill.dm | 5 +- code/modules/mining/machine_processing.dm | 4 +- code/modules/mining/mine_items.dm | 4 +- code/modules/mining/shelter_atoms.dm | 4 +- code/modules/mob/freelook/ai/eye.dm | 13 +- .../mob/freelook/ai/update_triggers.dm | 4 +- code/modules/mob/freelook/mask/eye.dm | 4 +- .../mob/freelook/mask/update_triggers.dm | 4 +- code/modules/mob/freelook/update_triggers.dm | 8 +- code/modules/mob/living/bot/bot.dm | 4 +- code/modules/mob/living/bot/cleanbot.dm | 4 +- code/modules/mob/living/bot/medbot.dm | 13 +- code/modules/mob/living/bot/mulebot.dm | 5 +- code/modules/mob/living/carbon/alien/alien.dm | 7 +- code/modules/mob/living/living.dm | 5 +- code/modules/mob/mob_planes_vr.dm | 8 +- 34 files changed, 178 insertions(+), 208 deletions(-) diff --git a/code/modules/holodeck/HolodeckObjects.dm b/code/modules/holodeck/HolodeckObjects.dm index 1a6a36931da..07b46066af4 100644 --- a/code/modules/holodeck/HolodeckObjects.dm +++ b/code/modules/holodeck/HolodeckObjects.dm @@ -282,11 +282,11 @@ datum/unarmed_attack/holopugilism/unarmed_override(var/mob/living/carbon/human/u flags = NOBLOODY var/active = 0 -/obj/item/holo/esword/green/New() - lcolor = "#008000" +/obj/item/holo/esword/green + lcolor = "#008000" -/obj/item/holo/esword/red/New() - lcolor = "#FF0000" +/obj/item/holo/esword/red + lcolor = "#FF0000" /obj/item/holo/esword/handle_shield(mob/user, var/damage, atom/damage_source = null, mob/attacker = null, var/def_zone = null, var/attack_text = "the attack") if(active && default_parry_check(user, attacker, damage_source) && prob(50)) @@ -409,10 +409,6 @@ datum/unarmed_attack/holopugilism/unarmed_override(var/mob/living/carbon/human/u to_chat(user, "The station AI is not to interact with these devices!") return -/obj/machinery/readybutton/New() - ..() - - /obj/machinery/readybutton/attackby(obj/item/W as obj, mob/user as mob) to_chat(user, "The device is a solid button, there's nothing you can do with it!") @@ -479,8 +475,8 @@ datum/unarmed_attack/holopugilism/unarmed_override(var/mob/living/carbon/human/u meat_amount = 0 meat_type = null -/mob/living/simple_mob/animal/space/carp/holodeck/New() - ..() +/mob/living/simple_mob/animal/space/carp/holodeck/Initialize(mapload) + . = ..() set_light(2) //hologram lighting /mob/living/simple_mob/animal/space/carp/holodeck/proc/set_safety(var/safe) diff --git a/code/modules/holomap/station_holomap.dm b/code/modules/holomap/station_holomap.dm index 293318a6ac9..2966fe3a9cf 100644 --- a/code/modules/holomap/station_holomap.dm +++ b/code/modules/holomap/station_holomap.dm @@ -31,8 +31,8 @@ var/bogus = TRUE // set to 0 when you initialize the station map on a zLevel that has its own icon formatted for use by station holomaps. var/datum/station_holomap/holomap_datum -/obj/machinery/station_map/New() - ..() +/obj/machinery/station_map/Initialize(mapload) + . = ..() holomap_datum = new() original_zLevel = loc.z SSholomaps.station_holomaps += src diff --git a/code/modules/hydroponics/beekeeping/beehive.dm b/code/modules/hydroponics/beekeeping/beehive.dm index dce6c4a2ee7..2ae6bfd6da0 100644 --- a/code/modules/hydroponics/beekeeping/beehive.dm +++ b/code/modules/hydroponics/beekeeping/beehive.dm @@ -215,9 +215,9 @@ desc = "A frame for the beehive that the bees have filled with honeycombs." honey = 20 -/obj/item/honey_frame/filled/New() - ..() - overlays += "honeycomb" +/obj/item/honey_frame/filled/Initialize(mapload) + . = ..() + add_overlay("honeycomb") /obj/item/beehive_assembly name = "beehive assembly" @@ -232,7 +232,6 @@ new /obj/machinery/beehive(get_turf(user)) user.drop_from_inventory(src) qdel(src) - return /obj/item/stack/material/wax name = "wax" @@ -244,8 +243,8 @@ pass_color = TRUE strict_color_stacking = TRUE -/obj/item/stack/material/wax/New() - ..() +/obj/item/stack/material/wax/Initialize(mapload, new_amount, merge) + . = ..() recipes = wax_recipes /datum/material/wax @@ -267,20 +266,20 @@ var/global/list/datum/stack_recipe/wax_recipes = list( \ icon_state = "beepack" var/full = 1 -/obj/item/bee_pack/New() - ..() - overlays += "beepack-full" +/obj/item/bee_pack/Initialize(mapload) + . = ..() + add_overlay("beepack-full") /obj/item/bee_pack/proc/empty() full = 0 name = "empty bee pack" desc = "A stasis pack for moving bees. It's empty." - overlays.Cut() - overlays += "beepack-empty" + cut_overlays() + add_overlay("beepack-empty") /obj/item/bee_pack/proc/fill() full = initial(full) name = initial(name) desc = initial(desc) - overlays.Cut() - overlays += "beepack-full" + cut_overlays() + add_overlay("beepack-full") diff --git a/code/modules/hydroponics/grown_inedible.dm b/code/modules/hydroponics/grown_inedible.dm index 9fcf5b779f3..84cf424c778 100644 --- a/code/modules/hydroponics/grown_inedible.dm +++ b/code/modules/hydroponics/grown_inedible.dm @@ -8,10 +8,8 @@ var/plantname var/potency = 1 -/obj/item/grown/New(newloc,planttype) - - ..() - +/obj/item/grown/Initialize(mapload, planttype) + . = ..() var/datum/reagents/R = new/datum/reagents(50) reagents = R R.my_atom = src diff --git a/code/modules/hydroponics/seed_machines.dm b/code/modules/hydroponics/seed_machines.dm index 6015d2126af..3ded07ee989 100644 --- a/code/modules/hydroponics/seed_machines.dm +++ b/code/modules/hydroponics/seed_machines.dm @@ -8,8 +8,8 @@ var/list/genes = list() var/genesource = "unknown" -/obj/item/disk/botany/New() - ..() +/obj/item/disk/botany/Initialize(mapload) + . = ..() pixel_x = rand(-5,5) pixel_y = rand(-5,5) @@ -27,8 +27,7 @@ name = "flora disk box" desc = "A box of flora data disks, apparently." -/obj/item/storage/box/botanydisk/New() - ..() +/obj/item/storage/box/botanydisk/PopulateContents() for(var/i = 0;i<7;i++) new /obj/item/disk/botany(src) diff --git a/code/modules/hydroponics/seed_storage.dm b/code/modules/hydroponics/seed_storage.dm index 28c0dac544c..cf5ce3b1239 100644 --- a/code/modules/hydroponics/seed_storage.dm +++ b/code/modules/hydroponics/seed_storage.dm @@ -39,8 +39,8 @@ var/lockdown = 0 var/datum/wires/seedstorage/wires = null -/obj/machinery/seed_storage/New() - ..() +/obj/machinery/seed_storage/Initialize(mapload, newdir) + . = ..() wires = new(src) if(!contraband_seeds.len) contraband_seeds = pick(list( diff --git a/code/modules/hydroponics/trays/tray_soil.dm b/code/modules/hydroponics/trays/tray_soil.dm index d1fa1e62c50..dd39be4f76f 100644 --- a/code/modules/hydroponics/trays/tray_soil.dm +++ b/code/modules/hydroponics/trays/tray_soil.dm @@ -13,8 +13,8 @@ else return ..() -/obj/machinery/portable_atmospherics/hydroponics/soil/New() - ..() +/obj/machinery/portable_atmospherics/hydroponics/soil/Initialize(mapload) + . = ..() verbs -= /obj/machinery/portable_atmospherics/hydroponics/verb/close_lid_verb verbs -= /obj/machinery/portable_atmospherics/hydroponics/verb/remove_label verbs -= /obj/machinery/portable_atmospherics/hydroponics/verb/setlight @@ -27,8 +27,8 @@ icon = 'icons/obj/seeds.dmi' icon_state = "blank" -/obj/machinery/portable_atmospherics/hydroponics/soil/invisible/New(var/newloc,var/datum/seed/newseed) - ..() +/obj/machinery/portable_atmospherics/hydroponics/soil/invisible/Initialize(mapload, datum/seed/newseed) + . = ..() seed = newseed dead = 0 age = 1 diff --git a/code/modules/integrated_electronics/core/assemblies/device.dm b/code/modules/integrated_electronics/core/assemblies/device.dm index e4b42c051d1..6cc4d529bea 100644 --- a/code/modules/integrated_electronics/core/assemblies/device.dm +++ b/code/modules/integrated_electronics/core/assemblies/device.dm @@ -70,8 +70,8 @@ max_complexity = IC_COMPLEXITY_BASE * 3/4 -/obj/item/electronic_assembly/device/New() - ..() +/obj/item/electronic_assembly/device/Initialize(mapload) + . = ..() var/obj/item/integrated_circuit/built_in/device_input/input = new(src) var/obj/item/integrated_circuit/built_in/device_output/output = new(src) input.assembly = src diff --git a/code/modules/integrated_electronics/core/integrated_circuit.dm b/code/modules/integrated_electronics/core/integrated_circuit.dm index 2cc08459104..0c57fcaa431 100644 --- a/code/modules/integrated_electronics/core/integrated_circuit.dm +++ b/code/modules/integrated_electronics/core/integrated_circuit.dm @@ -30,14 +30,16 @@ a creative player the means to solve many problems. Circuits are held inside an /obj/item/integrated_circuit/proc/any_examine(mob/user) return -/obj/item/integrated_circuit/New() +/obj/item/integrated_circuit/Initialize(mapload) + . = ..() displayed_name = name - if(!size) size = w_class - if(size == -1) size = 0 + if(!size) + size = w_class + if(size == -1) + size = 0 setup_io(inputs, /datum/integrated_io, inputs_default) setup_io(outputs, /datum/integrated_io, outputs_default) setup_io(activators, /datum/integrated_io/activate) - ..() /obj/item/integrated_circuit/proc/on_data_written() //Override this for special behaviour when new data gets pushed to the circuit. return @@ -400,4 +402,4 @@ a creative player the means to solve many problems. Circuits are held inside an return /obj/item/integrated_circuit/proc/on_unanchored() - return \ No newline at end of file + return diff --git a/code/modules/integrated_electronics/core/tools.dm b/code/modules/integrated_electronics/core/tools.dm index fd15e44e18d..70f955835ae 100644 --- a/code/modules/integrated_electronics/core/tools.dm +++ b/code/modules/integrated_electronics/core/tools.dm @@ -282,60 +282,53 @@ ) cant_hold = list(/obj/item/tool/screwdriver/power) -/obj/item/storage/bag/circuits/basic/New() - ..() - spawn(2 SECONDS) // So the list has time to initialize. -// for(var/obj/item/integrated_circuit/IC in all_integrated_circuits) -// if(IC.spawn_flags & IC_SPAWN_DEFAULT) -// for(var/i = 1 to 4) -// new IC.type(src) - new /obj/item/storage/bag/circuits/mini/arithmetic(src) - new /obj/item/storage/bag/circuits/mini/trig(src) - new /obj/item/storage/bag/circuits/mini/input(src) - new /obj/item/storage/bag/circuits/mini/output(src) - new /obj/item/storage/bag/circuits/mini/memory(src) - new /obj/item/storage/bag/circuits/mini/logic(src) - new /obj/item/storage/bag/circuits/mini/time(src) - new /obj/item/storage/bag/circuits/mini/reagents(src) - new /obj/item/storage/bag/circuits/mini/transfer(src) - new /obj/item/storage/bag/circuits/mini/converter(src) - new /obj/item/storage/bag/circuits/mini/power(src) +/obj/item/storage/bag/circuits/PopulateContents() + new /obj/item/storage/bag/circuits/mini/arithmetic(src) + new /obj/item/storage/bag/circuits/mini/trig(src) + new /obj/item/storage/bag/circuits/mini/input(src) + new /obj/item/storage/bag/circuits/mini/output(src) + new /obj/item/storage/bag/circuits/mini/memory(src) + new /obj/item/storage/bag/circuits/mini/logic(src) + new /obj/item/storage/bag/circuits/mini/time(src) + new /obj/item/storage/bag/circuits/mini/reagents(src) + new /obj/item/storage/bag/circuits/mini/transfer(src) + new /obj/item/storage/bag/circuits/mini/converter(src) + new /obj/item/storage/bag/circuits/mini/power(src) - new /obj/item/electronic_assembly(src) - new /obj/item/assembly/electronic_assembly(src) - new /obj/item/assembly/electronic_assembly(src) - new /obj/item/multitool(src) - new /obj/item/tool/screwdriver(src) - new /obj/item/tool/crowbar(src) - make_exact_fit() + new /obj/item/electronic_assembly(src) + new /obj/item/assembly/electronic_assembly(src) + new /obj/item/assembly/electronic_assembly(src) + new /obj/item/multitool(src) + new /obj/item/tool/screwdriver(src) + new /obj/item/tool/crowbar(src) + make_exact_fit() -/obj/item/storage/bag/circuits/all/New() - ..() - spawn(2 SECONDS) // So the list has time to initialize. - new /obj/item/storage/bag/circuits/mini/arithmetic/all(src) - new /obj/item/storage/bag/circuits/mini/trig/all(src) - new /obj/item/storage/bag/circuits/mini/input/all(src) - new /obj/item/storage/bag/circuits/mini/output/all(src) - new /obj/item/storage/bag/circuits/mini/memory/all(src) - new /obj/item/storage/bag/circuits/mini/logic/all(src) - new /obj/item/storage/bag/circuits/mini/smart/all(src) - new /obj/item/storage/bag/circuits/mini/manipulation/all(src) - new /obj/item/storage/bag/circuits/mini/time/all(src) - new /obj/item/storage/bag/circuits/mini/reagents/all(src) - new /obj/item/storage/bag/circuits/mini/transfer/all(src) - new /obj/item/storage/bag/circuits/mini/converter/all(src) - new /obj/item/storage/bag/circuits/mini/power/all(src) +/obj/item/storage/bag/circuits/all/PopulateContents() + . = ..() + new /obj/item/storage/bag/circuits/mini/arithmetic/all(src) + new /obj/item/storage/bag/circuits/mini/trig/all(src) + new /obj/item/storage/bag/circuits/mini/input/all(src) + new /obj/item/storage/bag/circuits/mini/output/all(src) + new /obj/item/storage/bag/circuits/mini/memory/all(src) + new /obj/item/storage/bag/circuits/mini/logic/all(src) + new /obj/item/storage/bag/circuits/mini/smart/all(src) + new /obj/item/storage/bag/circuits/mini/manipulation/all(src) + new /obj/item/storage/bag/circuits/mini/time/all(src) + new /obj/item/storage/bag/circuits/mini/reagents/all(src) + new /obj/item/storage/bag/circuits/mini/transfer/all(src) + new /obj/item/storage/bag/circuits/mini/converter/all(src) + new /obj/item/storage/bag/circuits/mini/power/all(src) - new /obj/item/electronic_assembly(src) - new /obj/item/electronic_assembly/medium(src) - new /obj/item/electronic_assembly/large(src) - new /obj/item/electronic_assembly/drone(src) - new /obj/item/integrated_electronics/wirer(src) - new /obj/item/integrated_electronics/debugger(src) - new /obj/item/tool/crowbar(src) - make_exact_fit() + new /obj/item/electronic_assembly(src) + new /obj/item/electronic_assembly/medium(src) + new /obj/item/electronic_assembly/large(src) + new /obj/item/electronic_assembly/drone(src) + new /obj/item/integrated_electronics/wirer(src) + new /obj/item/integrated_electronics/debugger(src) + new /obj/item/tool/crowbar(src) + make_exact_fit() -/obj/item/storage/bag/circuits/mini/ +/obj/item/storage/bag/circuits/mini name = "circuit box" desc = "Used to partition categories of circuits, for a neater workspace." w_class = 2 @@ -351,15 +344,13 @@ /obj/item/storage/bag/circuits/mini/arithmetic/all // Don't believe this will ever be needed. spawn_flags_to_use = IC_SPAWN_DEFAULT|IC_SPAWN_RESEARCH -/obj/item/storage/bag/circuits/mini/arithmetic/New() - ..() +/obj/item/storage/bag/circuits/mini/arithmetic/PopulateContents() for(var/obj/item/integrated_circuit/arithmetic/IC in all_integrated_circuits) if(IC.spawn_flags & spawn_flags_to_use) for(var/i = 1 to 4) new IC.type(src) make_exact_fit() - /obj/item/storage/bag/circuits/mini/trig name = "trig circuit box" desc = "Danger: Contains more math." @@ -368,15 +359,13 @@ /obj/item/storage/bag/circuits/mini/trig/all // Ditto spawn_flags_to_use = IC_SPAWN_DEFAULT|IC_SPAWN_RESEARCH -/obj/item/storage/bag/circuits/mini/trig/New() - ..() +/obj/item/storage/bag/circuits/mini/trig/PopulateContents() for(var/obj/item/integrated_circuit/trig/IC in all_integrated_circuits) if(IC.spawn_flags & spawn_flags_to_use) for(var/i = 1 to 4) new IC.type(src) make_exact_fit() - /obj/item/storage/bag/circuits/mini/input name = "input circuit box" desc = "Tell these circuits everything you know." @@ -385,15 +374,13 @@ /obj/item/storage/bag/circuits/mini/input/all spawn_flags_to_use = IC_SPAWN_DEFAULT|IC_SPAWN_RESEARCH -/obj/item/storage/bag/circuits/mini/input/New() - ..() +/obj/item/storage/bag/circuits/mini/input/PopulateContents() for(var/obj/item/integrated_circuit/input/IC in all_integrated_circuits) if(IC.spawn_flags & spawn_flags_to_use) for(var/i = 1 to 4) new IC.type(src) make_exact_fit() - /obj/item/storage/bag/circuits/mini/output name = "output circuit box" desc = "Circuits to interface with the world beyond itself." @@ -402,15 +389,13 @@ /obj/item/storage/bag/circuits/mini/output/all spawn_flags_to_use = IC_SPAWN_DEFAULT|IC_SPAWN_RESEARCH -/obj/item/storage/bag/circuits/mini/output/New() - ..() +/obj/item/storage/bag/circuits/mini/output/PopulateContents() for(var/obj/item/integrated_circuit/output/IC in all_integrated_circuits) if(IC.spawn_flags & spawn_flags_to_use) for(var/i = 1 to 4) new IC.type(src) make_exact_fit() - /obj/item/storage/bag/circuits/mini/memory name = "memory circuit box" desc = "Machines can be quite forgetful without these." @@ -419,15 +404,13 @@ /obj/item/storage/bag/circuits/mini/memory/all spawn_flags_to_use = IC_SPAWN_DEFAULT|IC_SPAWN_RESEARCH -/obj/item/storage/bag/circuits/mini/memory/New() - ..() +/obj/item/storage/bag/circuits/mini/memory/PopulateContents() for(var/obj/item/integrated_circuit/memory/IC in all_integrated_circuits) if(IC.spawn_flags & spawn_flags_to_use) for(var/i = 1 to 4) new IC.type(src) make_exact_fit() - /obj/item/storage/bag/circuits/mini/logic name = "logic circuit box" desc = "May or may not be Turing complete." @@ -436,15 +419,13 @@ /obj/item/storage/bag/circuits/mini/logic/all spawn_flags_to_use = IC_SPAWN_DEFAULT|IC_SPAWN_RESEARCH -/obj/item/storage/bag/circuits/mini/logic/New() - ..() +/obj/item/storage/bag/circuits/mini/logic/PopulateContents() for(var/obj/item/integrated_circuit/logic/IC in all_integrated_circuits) if(IC.spawn_flags & spawn_flags_to_use) for(var/i = 1 to 4) new IC.type(src) make_exact_fit() - /obj/item/storage/bag/circuits/mini/time name = "time circuit box" desc = "No time machine parts, sadly." @@ -453,15 +434,13 @@ /obj/item/storage/bag/circuits/mini/time/all spawn_flags_to_use = IC_SPAWN_DEFAULT|IC_SPAWN_RESEARCH -/obj/item/storage/bag/circuits/mini/time/New() - ..() +/obj/item/storage/bag/circuits/mini/time/PopulateContents() for(var/obj/item/integrated_circuit/time/IC in all_integrated_circuits) if(IC.spawn_flags & spawn_flags_to_use) for(var/i = 1 to 4) new IC.type(src) make_exact_fit() - /obj/item/storage/bag/circuits/mini/reagents name = "reagent circuit box" desc = "Unlike most electronics, these circuits are supposed to come in contact with liquids." @@ -470,15 +449,14 @@ /obj/item/storage/bag/circuits/mini/reagents/all spawn_flags_to_use = IC_SPAWN_DEFAULT|IC_SPAWN_RESEARCH -/obj/item/storage/bag/circuits/mini/reagents/New() - ..() +/obj/item/storage/bag/circuits/mini/reagents/PopulateContents() + . = ..() for(var/obj/item/integrated_circuit/reagent/IC in all_integrated_circuits) if(IC.spawn_flags & spawn_flags_to_use) for(var/i = 1 to 4) new IC.type(src) make_exact_fit() - /obj/item/storage/bag/circuits/mini/transfer name = "transfer circuit box" desc = "Useful for moving data representing something arbitrary to another arbitrary virtual place." @@ -487,15 +465,13 @@ /obj/item/storage/bag/circuits/mini/transfer/all spawn_flags_to_use = IC_SPAWN_DEFAULT|IC_SPAWN_RESEARCH -/obj/item/storage/bag/circuits/mini/transfer/New() - ..() +/obj/item/storage/bag/circuits/mini/transfer/PopulateContents() for(var/obj/item/integrated_circuit/transfer/IC in all_integrated_circuits) if(IC.spawn_flags & spawn_flags_to_use) for(var/i = 1 to 4) new IC.type(src) make_exact_fit() - /obj/item/storage/bag/circuits/mini/converter name = "converter circuit box" desc = "Transform one piece of data to another type of data with these." @@ -504,8 +480,7 @@ /obj/item/storage/bag/circuits/mini/converter/all spawn_flags_to_use = IC_SPAWN_DEFAULT|IC_SPAWN_RESEARCH -/obj/item/storage/bag/circuits/mini/converter/New() - ..() +/obj/item/storage/bag/circuits/mini/converter/PopulateContents() for(var/obj/item/integrated_circuit/converter/IC in all_integrated_circuits) if(IC.spawn_flags & spawn_flags_to_use) for(var/i = 1 to 4) @@ -520,8 +495,8 @@ /obj/item/storage/bag/circuits/mini/smart/all spawn_flags_to_use = IC_SPAWN_DEFAULT|IC_SPAWN_RESEARCH -/obj/item/storage/bag/circuits/mini/smart/New() - ..() +/obj/item/storage/bag/circuits/mini/smart/PopulateContents() + . = ..() for(var/obj/item/integrated_circuit/smart/IC in all_integrated_circuits) if(IC.spawn_flags & spawn_flags_to_use) for(var/i = 1 to 4) @@ -536,15 +511,14 @@ /obj/item/storage/bag/circuits/mini/manipulation/all spawn_flags_to_use = IC_SPAWN_DEFAULT|IC_SPAWN_RESEARCH -/obj/item/storage/bag/circuits/mini/manipulation/New() - ..() +/obj/item/storage/bag/circuits/mini/manipulation/PopulateContents() + . = ..() for(var/obj/item/integrated_circuit/manipulation/IC in all_integrated_circuits) if(IC.spawn_flags & spawn_flags_to_use) for(var/i = 1 to 4) new IC.type(src) make_exact_fit() - /obj/item/storage/bag/circuits/mini/power name = "power circuit box" desc = "Electronics generally require electricity." @@ -553,8 +527,7 @@ /obj/item/storage/bag/circuits/mini/power/all spawn_flags_to_use = IC_SPAWN_DEFAULT|IC_SPAWN_RESEARCH -/obj/item/storage/bag/circuits/mini/power/New() - ..() +/obj/item/storage/bag/circuits/mini/power/PopulateContents() for(var/obj/item/integrated_circuit/passive/power/IC in all_integrated_circuits) if(IC.spawn_flags & spawn_flags_to_use) for(var/i = 1 to 4) diff --git a/code/modules/integrated_electronics/subtypes/data_transfer.dm b/code/modules/integrated_electronics/subtypes/data_transfer.dm index ce2d06dd888..78507ffecbc 100644 --- a/code/modules/integrated_electronics/subtypes/data_transfer.dm +++ b/code/modules/integrated_electronics/subtypes/data_transfer.dm @@ -16,12 +16,12 @@ power_draw_per_use = 4 var/number_of_inputs = 2 -/obj/item/integrated_circuit/transfer/multiplexer/New() +/obj/item/integrated_circuit/transfer/multiplexer/Initialize(mapload) for(var/i = 1 to number_of_inputs) inputs["input [i]"] = IC_PINTYPE_ANY // This is just a string since pins don't get built until ..() is called. // inputs += "input [i]" complexity = number_of_inputs - ..() + . = ..() desc += " It has [number_of_inputs] input pins." extended_desc += " This multiplexer has a range from 1 to [inputs.len - 1]." @@ -64,13 +64,12 @@ power_draw_per_use = 4 var/number_of_outputs = 2 -/obj/item/integrated_circuit/transfer/demultiplexer/New() +/obj/item/integrated_circuit/transfer/demultiplexer/Initialize(mapload) for(var/i = 1 to number_of_outputs) // outputs += "output [i]" outputs["output [i]"] = IC_PINTYPE_ANY complexity = number_of_outputs - - ..() + . = ..() desc += " It has [number_of_outputs] output pins." extended_desc += " This demultiplexer has a range from 1 to [outputs.len]." @@ -112,13 +111,12 @@ power_draw_per_use = 4 var/number_of_outputs = 2 -/obj/item/integrated_circuit/transfer/pulsedemultiplexer/New() +/obj/item/integrated_circuit/transfer/pulsedemultiplexer/Initialize(mapload) for(var/i = 1 to number_of_outputs) // outputs += "output [i]" activators["output [i]"] = IC_PINTYPE_PULSE_OUT complexity = number_of_outputs - - ..() + . = ..() desc += " It has [number_of_outputs] output pins." extended_desc += " This pulse demultiplexer has a range from 1 to [activators.len - 1]." diff --git a/code/modules/integrated_electronics/subtypes/input.dm b/code/modules/integrated_electronics/subtypes/input.dm index 57db3ba0696..c5a18fe1c5a 100644 --- a/code/modules/integrated_electronics/subtypes/input.dm +++ b/code/modules/integrated_electronics/subtypes/input.dm @@ -442,8 +442,8 @@ power_draw_per_use = 50 var/datum/exonet_protocol/exonet = null -/obj/item/integrated_circuit/input/EPv2/New() - ..() +/obj/item/integrated_circuit/input/EPv2/Initialize(mapload) + . = ..() exonet = new(src) exonet.make_address("EPv2_circuit-\ref[src]") desc += "
This circuit's EPv2 address is: [exonet.address]" @@ -516,9 +516,10 @@ activators = list("on message received" = IC_PINTYPE_PULSE_OUT, "on translation" = IC_PINTYPE_PULSE_OUT) spawn_flags = IC_SPAWN_DEFAULT|IC_SPAWN_RESEARCH power_draw_per_use = 15 + flags = HEAR -/obj/item/integrated_circuit/input/microphone/New() - ..() +/obj/item/integrated_circuit/input/microphone/Initialize(mapload) + . = ..() listening_objects |= src /obj/item/integrated_circuit/input/microphone/Destroy() diff --git a/code/modules/integrated_electronics/subtypes/memory.dm b/code/modules/integrated_electronics/subtypes/memory.dm index 1141d3e5e30..60a9c2d3dff 100644 --- a/code/modules/integrated_electronics/subtypes/memory.dm +++ b/code/modules/integrated_electronics/subtypes/memory.dm @@ -11,12 +11,12 @@ power_draw_per_use = 1 var/number_of_pins = 1 -/obj/item/integrated_circuit/memory/New() +/obj/item/integrated_circuit/memory/Initialize(mapload) + . = ..() for(var/i = 1 to number_of_pins) inputs["input [i]"] = IC_PINTYPE_ANY // This is just a string since pins don't get built until ..() is called. outputs["output [i]"] = IC_PINTYPE_ANY complexity = number_of_pins - ..() /obj/item/integrated_circuit/memory/examine(mob/user) . = ..() diff --git a/code/modules/integrated_electronics/subtypes/output.dm b/code/modules/integrated_electronics/subtypes/output.dm index 41b43f99dfd..71a84d309ef 100644 --- a/code/modules/integrated_electronics/subtypes/output.dm +++ b/code/modules/integrated_electronics/subtypes/output.dm @@ -179,8 +179,8 @@ power_draw_per_use = 20 var/list/sounds = list() -/obj/item/integrated_circuit/output/sound/New() - ..() +/obj/item/integrated_circuit/output/sound/Initialize(mapload) + . = ..() extended_desc = list() extended_desc += "The first input pin determines which sound is used. The choices are; " extended_desc += jointext(sounds, ", ") @@ -273,8 +273,8 @@ power_draw_idle = 5 // Raises to 80 when on. var/obj/machinery/camera/network/circuits/camera -/obj/item/integrated_circuit/output/video_camera/New() - ..() +/obj/item/integrated_circuit/output/video_camera/Initialize(mapload) + . = ..() camera = new(src) on_data_written() diff --git a/code/modules/integrated_electronics/subtypes/reagents.dm b/code/modules/integrated_electronics/subtypes/reagents.dm index 1e64b37d97f..935dc184d3a 100644 --- a/code/modules/integrated_electronics/subtypes/reagents.dm +++ b/code/modules/integrated_electronics/subtypes/reagents.dm @@ -4,8 +4,8 @@ unacidable = 1 origin_tech = list(TECH_ENGINEERING = 2, TECH_DATA = 2, TECH_BIO = 2) -/obj/item/integrated_circuit/reagent/New() - ..() +/obj/item/integrated_circuit/reagent/Initialize(mapload) + . = ..() if(volume) create_reagents(volume) @@ -30,7 +30,6 @@ set_pin_data(IC_OUTPUT, 1, reagents.total_volume) push_data() - /obj/item/integrated_circuit/reagent/smoke/interact(mob/user) set_pin_data(IC_OUTPUT, 2, WEAKREF(src)) push_data() diff --git a/code/modules/lighting/lighting_area.dm b/code/modules/lighting/lighting_area.dm index 92923e6b0d5..8a98d656360 100644 --- a/code/modules/lighting/lighting_area.dm +++ b/code/modules/lighting/lighting_area.dm @@ -2,8 +2,8 @@ luminosity = TRUE var/dynamic_lighting = TRUE -/area/New() +/area/Initialize(mapload) . = ..() if(dynamic_lighting) - luminosity = FALSE \ No newline at end of file + luminosity = FALSE diff --git a/code/modules/materials/material_synth.dm b/code/modules/materials/material_synth.dm index 566f6126d3c..f5fe7f1362a 100644 --- a/code/modules/materials/material_synth.dm +++ b/code/modules/materials/material_synth.dm @@ -6,11 +6,11 @@ gender = NEUTER matter = null // Don't shove it in the autholathe. -/obj/item/stack/material/cyborg/New() - if(..()) - name = "[material.display_name] synthesiser" - desc = "A device that synthesises [material.display_name]." - matter = null +/obj/item/stack/material/cyborg/Initialize(mapload, new_amount, merge) + . = ..() + name = "[material.display_name] synthesiser" + desc = "A device that synthesises [material.display_name]." + matter = null /obj/item/stack/material/cyborg/update_strings() return @@ -38,4 +38,4 @@ /obj/item/stack/material/cyborg/glass/reinforced icon_state = "sheet-rglass" default_type = "rglass" - charge_costs = list(500, 1000) \ No newline at end of file + charge_costs = list(500, 1000) diff --git a/code/modules/mining/coins.dm b/code/modules/mining/coins.dm index d077b9d0b90..60c3154b3a9 100644 --- a/code/modules/mining/coins.dm +++ b/code/modules/mining/coins.dm @@ -13,7 +13,8 @@ drop_sound = 'sound/items/drop/ring.ogg' pickup_sound = 'sound/items/pickup/ring.ogg' -/obj/item/coin/New() +/obj/item/coin/Initialize(mapload) + . = ..() pixel_x = rand(0,16)-8 pixel_y = rand(0,8)-8 diff --git a/code/modules/mining/drilling/drill.dm b/code/modules/mining/drilling/drill.dm index 53c308f82b6..1b6c4f1e8f3 100644 --- a/code/modules/mining/drilling/drill.dm +++ b/code/modules/mining/drilling/drill.dm @@ -323,9 +323,8 @@ circuit = /obj/item/circuitboard/miningdrillbrace var/obj/machinery/mining/drill/connected -/obj/machinery/mining/brace/New() - ..() - +/obj/machinery/mining/brace/Initialize(mapload, newdir) + . = ..() component_parts = list() /obj/machinery/mining/brace/attackby(obj/item/W as obj, mob/user as mob) diff --git a/code/modules/mining/machine_processing.dm b/code/modules/mining/machine_processing.dm index cace398c7f4..69288384fc5 100644 --- a/code/modules/mining/machine_processing.dm +++ b/code/modules/mining/machine_processing.dm @@ -187,8 +187,8 @@ "mhydrogen" = 40, "verdantium" = 60) -/obj/machinery/mineral/processing_unit/New() - ..() +/obj/machinery/mineral/processing_unit/Initialize(mapload) + . = ..() // initialize static alloy_data list if(!alloy_data) alloy_data = list() diff --git a/code/modules/mining/mine_items.dm b/code/modules/mining/mine_items.dm index 4a71e20cdf5..74bf657830c 100644 --- a/code/modules/mining/mine_items.dm +++ b/code/modules/mining/mine_items.dm @@ -178,8 +178,8 @@ var/upright = 0 var/base_state -/obj/item/stack/flag/New() - ..() +/obj/item/stack/flag/Initialize(mapload, new_amount, merge) + . = ..() base_state = icon_state /obj/item/stack/flag/blue diff --git a/code/modules/mining/shelter_atoms.dm b/code/modules/mining/shelter_atoms.dm index 0e6b39ced5f..29bd1495040 100644 --- a/code/modules/mining/shelter_atoms.dm +++ b/code/modules/mining/shelter_atoms.dm @@ -165,11 +165,11 @@ /obj/structure/table/survival_pod/update_icon() icon_state = "table" -/obj/structure/table/survival_pod/New() +/obj/structure/table/survival_pod/Initialize(mapload) material = get_material_by_name(DEFAULT_WALL_MATERIAL) verbs -= /obj/structure/table/verb/do_flip verbs -= /obj/structure/table/proc/do_put - ..() + return ..() /obj/structure/table/survival_pod/dismantle(obj/item/tool/wrench/W, mob/user) to_chat(user, "You cannot dismantle \the [src].") diff --git a/code/modules/mob/freelook/ai/eye.dm b/code/modules/mob/freelook/ai/eye.dm index 595044fe89f..a9590936bd3 100644 --- a/code/modules/mob/freelook/ai/eye.dm +++ b/code/modules/mob/freelook/ai/eye.dm @@ -50,12 +50,15 @@ SetName(src.name) // Intiliaze the eye by assigning it's "ai" variable to us. Then set it's loc to us. -/mob/living/silicon/ai/New() - ..() +/mob/living/silicon/ai/Initialize(mapload) + . = ..() create_eyeobj() - spawn(5) - if(eyeobj) - eyeobj.loc = src.loc + return INITIALIZE_HINT_LATELOAD + +/mob/living/silicon/ai/LateInitialize() + . = ..() + if(eyeobj) + eyeobj.forceMove(loc) /mob/living/silicon/ai/Destroy() destroy_eyeobj() diff --git a/code/modules/mob/freelook/ai/update_triggers.dm b/code/modules/mob/freelook/ai/update_triggers.dm index 797e5cc23b5..d6edb83b7f3 100644 --- a/code/modules/mob/freelook/ai/update_triggers.dm +++ b/code/modules/mob/freelook/ai/update_triggers.dm @@ -45,8 +45,8 @@ src.set_light(0) cameranet.removeCamera(src) -/obj/machinery/camera/New() - ..() +/obj/machinery/camera/Initialize(mapload) + . = ..() //Camera must be added to global list of all cameras no matter what... if(cameranet.cameras_unsorted || !SSticker) cameranet.cameras += src diff --git a/code/modules/mob/freelook/mask/eye.dm b/code/modules/mob/freelook/mask/eye.dm index 4fcbc35149f..253196e343f 100644 --- a/code/modules/mob/freelook/mask/eye.dm +++ b/code/modules/mob/freelook/mask/eye.dm @@ -8,6 +8,6 @@ acceleration = 0 owner_follows_eye = 1 -/mob/observer/eye/maskEye/New() - ..() +/mob/observer/eye/maskEye/Initialize(mapload) + . = ..() visualnet = cultnet diff --git a/code/modules/mob/freelook/mask/update_triggers.dm b/code/modules/mob/freelook/mask/update_triggers.dm index bbbb43af795..d4d24850d30 100644 --- a/code/modules/mob/freelook/mask/update_triggers.dm +++ b/code/modules/mob/freelook/mask/update_triggers.dm @@ -19,8 +19,8 @@ #undef CULT_UPDATE_BUFFER -/mob/living/New() - ..() +/mob/living/Initialize(mapload) + . = ..() cultnet.updateVisibility(src, 0) /mob/living/Destroy() diff --git a/code/modules/mob/freelook/update_triggers.dm b/code/modules/mob/freelook/update_triggers.dm index a6a47a721a1..ce21f6be6be 100644 --- a/code/modules/mob/freelook/update_triggers.dm +++ b/code/modules/mob/freelook/update_triggers.dm @@ -27,8 +27,8 @@ updateVisibility(src) return ..() -/obj/structure/New() - ..() +/obj/structure/Initialize(mapload) + . = ..() updateVisibility(src) // EFFECTS @@ -37,8 +37,8 @@ updateVisibility(src) return ..() -/obj/effect/New() - ..() +/obj/effect/Initialize(mapload) + . = ..() updateVisibility(src) // DOORS diff --git a/code/modules/mob/living/bot/bot.dm b/code/modules/mob/living/bot/bot.dm index 01a21df1a43..19e8d6de5c6 100644 --- a/code/modules/mob/living/bot/bot.dm +++ b/code/modules/mob/living/bot/bot.dm @@ -42,8 +42,8 @@ var/frustration = 0 var/max_frustration = 0 -/mob/living/bot/New() - ..() +/mob/living/bot/Initialize(mapload) + . = ..() update_icons() default_language = GLOB.all_languages[LANGUAGE_GALCOM] diff --git a/code/modules/mob/living/bot/cleanbot.dm b/code/modules/mob/living/bot/cleanbot.dm index 1d2b16d0b3c..ea0d2b65474 100644 --- a/code/modules/mob/living/bot/cleanbot.dm +++ b/code/modules/mob/living/bot/cleanbot.dm @@ -15,8 +15,8 @@ var/blood = 1 var/list/target_types = list() -/mob/living/bot/cleanbot/New() - ..() +/mob/living/bot/cleanbot/Initialize(mapload) + . = ..() get_targets() /mob/living/bot/cleanbot/handleIdle() diff --git a/code/modules/mob/living/bot/medbot.dm b/code/modules/mob/living/bot/medbot.dm index 611aa512d82..f0960f2ff6a 100644 --- a/code/modules/mob/living/bot/medbot.dm +++ b/code/modules/mob/living/bot/medbot.dm @@ -394,11 +394,14 @@ var/skin = null //Same as medbot, set to tox or ointment for the respective kits. w_class = ITEMSIZE_NORMAL -/obj/item/firstaid_arm_assembly/New() - ..() - spawn(5) // Terrible. TODO: fix - if(skin) - overlays += image('icons/obj/aibots.dmi', "kit_skin_[src.skin]") +/obj/item/firstaid_arm_assembly/Initialize(mapload) + . = ..() + return INITIALIZE_HINT_QDEL + +/obj/item/fireaid_arm_assembly/LateInitialize() + . = ..() + if(skin) + overlays += image('icons/obj/aibots.dmi', "kit_skin_[src.skin]") /obj/item/firstaid_arm_assembly/attackby(obj/item/W as obj, mob/user as mob) ..() diff --git a/code/modules/mob/living/bot/mulebot.dm b/code/modules/mob/living/bot/mulebot.dm index c47a7852a07..ef3d59b60ac 100644 --- a/code/modules/mob/living/bot/mulebot.dm +++ b/code/modules/mob/living/bot/mulebot.dm @@ -36,9 +36,8 @@ var/global/amount = 0 -/mob/living/bot/mulebot/New() - ..() - +/mob/living/bot/mulebot/Initialize(mapload) + . = ..() var/turf/T = get_turf(loc) var/obj/machinery/navbeacon/N = locate() in T if(N) diff --git a/code/modules/mob/living/carbon/alien/alien.dm b/code/modules/mob/living/carbon/alien/alien.dm index 0b3159b2cb4..007547c27b5 100644 --- a/code/modules/mob/living/carbon/alien/alien.dm +++ b/code/modules/mob/living/carbon/alien/alien.dm @@ -20,8 +20,7 @@ var/adult_name var/instance_num -/mob/living/carbon/alien/New() - +/mob/living/carbon/alien/Initialize(mapload) time_of_birth = world.time verbs += /mob/living/proc/ventcrawl @@ -37,7 +36,7 @@ gender = NEUTER - ..() + return ..() /mob/living/carbon/alien/u_equip(obj/item/W as obj) return @@ -53,4 +52,4 @@ return //Consider adding cuffs and hats to this, for the sake of fun. /mob/living/carbon/alien/cannot_use_vents() - return \ No newline at end of file + return diff --git a/code/modules/mob/living/living.dm b/code/modules/mob/living/living.dm index 1bff70f792c..973f507ad30 100644 --- a/code/modules/mob/living/living.dm +++ b/code/modules/mob/living/living.dm @@ -1,6 +1,5 @@ -/mob/living/New() - ..() - +/mob/living/Initialize(mapload) + . = ..() //Prime this list if we need it. if(has_huds) add_overlay(backplane,TRUE) //Strap this on here, to block HUDs from appearing in rightclick menus: http://www.byond.com/forum/?post=2336679 diff --git a/code/modules/mob/mob_planes_vr.dm b/code/modules/mob/mob_planes_vr.dm index 5d41209b196..60b40e6809d 100644 --- a/code/modules/mob/mob_planes_vr.dm +++ b/code/modules/mob/mob_planes_vr.dm @@ -14,9 +14,11 @@ var/state = FALSE //Saves cost with the lists var/mob/my_mob -/obj/screen/plane_master/augmented/New(var/mob/M) - ..() - my_mob = M +/obj/screen/plane_master/augmented/Initialize(mapload) + . = ..() + if(!ismob(loc)) + CRASH("No mob") + my_mob = loc /obj/screen/plane_master/augmented/Destroy() my_mob = null