Convert most of /obj/machinery to use Initialize rather than New (#17845)

* Switch a bunch of /obj/machinery from /New to /Initialize

This is an easy and uncontroversial batch.
No globs, no late init, and stuff.

* Move more machinery to Initialize

This time the ones dealing with GLOB vars,
as well as some simpler ones i missed previously.

* More tricky New -> Initialize migrations

* The last of machinery Initialize conversion

* fixups

* Newscaster armor fix

* styling

* Comment on armor handling

* Move newscaster armor definition back to datum

* farie82 review

* kill extra .=

Co-authored-by: Farie82 <farie82@users.noreply.github.com>

* farie's review part 2

Co-authored-by: Farie82 <farie82@users.noreply.github.com>

Co-authored-by: Farie82 <farie82@users.noreply.github.com>
This commit is contained in:
moxian
2022-06-29 08:33:52 +02:00
committed by GitHub
co-authored by Farie82
parent 3807bf43c7
commit 09e7f54a43
101 changed files with 410 additions and 453 deletions
+3 -3
View File
@@ -14,12 +14,12 @@
var/last_winner = null //for letting people who to hunt down and steal prizes from
var/window_name = "arcade" //in case you want to change the window name for certain machines
/obj/machinery/arcade/New()
..()
/obj/machinery/arcade/Initialize(mapload)
. = ..()
if(type == /obj/machinery/arcade) //if you spawn the base-type, it will replace itself with a random subtype for randomness
var/choice = pick(subtypesof(/obj/machinery/arcade))
new choice(loc)
qdel(src)
return INITIALIZE_HINT_QDEL
/obj/machinery/arcade/examine(mob/user)
. = ..()
+2 -2
View File
@@ -17,8 +17,8 @@ GLOBAL_VAR(claw_game_html)
'icons/obj/arcade_images/prize_inside.png',
'icons/obj/arcade_images/prizeorbs.png')
/obj/machinery/arcade/claw/New()
..()
/obj/machinery/arcade/claw/Initialize(mapload)
. = ..()
machine_image = pick("_1", "_2")
update_icon()
+2 -2
View File
@@ -10,8 +10,8 @@
idle_power_usage = 40
var/tickets = 0
/obj/machinery/prize_counter/New()
..()
/obj/machinery/prize_counter/Initialize(mapload)
. = ..()
component_parts = list()
component_parts += new /obj/item/circuitboard/prize_counter(null)
component_parts += new /obj/item/stock_parts/matter_bin(null)
+2 -4
View File
@@ -40,13 +40,11 @@ GLOBAL_DATUM_INIT(the_gateway, /obj/machinery/gateway/centerstation, null)
var/wait = 0 //this just grabs world.time at world start
var/obj/machinery/gateway/centeraway/awaygate = null
/obj/machinery/gateway/centerstation/New()
..()
/obj/machinery/gateway/centerstation/Initialize(mapload)
. = ..()
if(!GLOB.the_gateway)
GLOB.the_gateway = src
/obj/machinery/gateway/centerstation/Initialize()
..()
update_icon()
wait = world.time + GLOB.configuration.gateway.away_mission_delay
return INITIALIZE_HINT_LATELOAD
+3 -5
View File
@@ -35,12 +35,10 @@ log transactions
var/view_screen = DEFAULT_SCREEN
var/lastprint = 0 // Printer needs time to cooldown
/obj/machinery/atm/New()
..()
machine_id = "[station_name()] RT #[GLOB.num_financial_terminals++]"
/obj/machinery/atm/Initialize()
..()
/obj/machinery/atm/Initialize(mapload)
. = ..()
machine_id = "[station_name()] RT #[GLOB.num_financial_terminals++]"
reconnect_database()
/obj/machinery/atm/process()
+4 -4
View File
@@ -114,14 +114,14 @@
// NEW() PROCS //
//////////////////////////////
/obj/machinery/fishtank/New()
..()
/obj/machinery/fishtank/Initialize(mapload)
. = ..()
if(!has_lid) //Tank doesn't have a lid/light, remove the verbs for then
verbs -= /obj/machinery/fishtank/verb/toggle_lid_verb
verbs -= /obj/machinery/fishtank/verb/toggle_light_verb
/obj/machinery/fishtank/tank/New()
..()
/obj/machinery/fishtank/tank/Initialize(mapload)
. = ..()
if(prob(5)) //5% chance to get the castle decoration
icon_state = "tank2"
@@ -22,7 +22,7 @@
var/list/containers = list("glass bottle" = 10, "plastic bottle" = 20, "metal can" = 25)
var/bottling = 0
/obj/machinery/bottler/New()
/obj/machinery/bottler/Initialize(mapload)
. = ..()
if(!available_recipes)
available_recipes = list()
@@ -18,8 +18,8 @@
* Initialising
********************/
/obj/machinery/kitchen_machine/candy_maker/New()
..()
/obj/machinery/kitchen_machine/candy_maker/Initialize(mapload)
. = ..()
component_parts = list()
component_parts += new /obj/item/circuitboard/candy_maker(null)
component_parts += new /obj/item/stock_parts/manipulator(null)
@@ -27,8 +27,8 @@
component_parts += new /obj/item/stack/cable_coil(null, 5)
RefreshParts()
/obj/machinery/kitchen_machine/candy_maker/upgraded/New()
..()
/obj/machinery/kitchen_machine/candy_maker/upgraded/Initialize(mapload)
. = ..()
component_parts = list()
component_parts += new /obj/item/circuitboard/candy_maker(null)
component_parts += new /obj/item/stock_parts/manipulator/pico(null)
@@ -14,8 +14,8 @@
has_specials = 1
upgradeable = 1
/obj/machinery/cooker/deepfryer/New()
..()
/obj/machinery/cooker/deepfryer/Initialize(mapload)
. = ..()
component_parts = list()
component_parts += new /obj/item/circuitboard/deepfryer(null)
component_parts += new /obj/item/stock_parts/micro_laser(null)
@@ -23,8 +23,8 @@
component_parts += new /obj/item/stack/cable_coil(null, 5)
RefreshParts()
/obj/machinery/cooker/deepfryer/upgraded/New()
..()
/obj/machinery/cooker/deepfryer/upgraded/Initialize(mapload)
. = ..()
component_parts = list()
component_parts += new /obj/item/circuitboard/deepfryer(null)
component_parts += new /obj/item/stock_parts/micro_laser/ultra(null)
@@ -326,12 +326,13 @@
var/consumption_delay = 3 SECONDS
var/list/victim_targets = list()
/obj/machinery/gibber/autogibber/New()
..()
spawn(5)
var/turf/T = get_step(src, acceptdir)
if(istype(T))
lturf = T
/obj/machinery/gibber/autogibber/Initialize(mapload)
. = ..()
var/turf/T = get_step(src, acceptdir)
if(istype(T))
lturf = T
component_parts = list()
component_parts += new /obj/item/circuitboard/gibber(null)
component_parts += new /obj/item/stock_parts/matter_bin(null)
@@ -18,8 +18,8 @@
* Initialising
********************/
/obj/machinery/kitchen_machine/grill/New()
..()
/obj/machinery/kitchen_machine/grill/Initialize(mapload)
. = ..()
component_parts = list()
component_parts += new /obj/item/circuitboard/grill(null)
component_parts += new /obj/item/stock_parts/micro_laser(null)
@@ -28,8 +28,8 @@
component_parts += new /obj/item/stack/cable_coil(null, 5)
RefreshParts()
/obj/machinery/kitchen_machine/grill/upgraded/New()
..()
/obj/machinery/kitchen_machine/grill/upgraded/Initialize(mapload)
. = ..()
component_parts = list()
component_parts += new /obj/item/circuitboard/grill(null)
component_parts += new /obj/item/stock_parts/micro_laser/ultra(null)
@@ -24,8 +24,8 @@
return cone_name
/obj/machinery/icemachine/New()
..()
/obj/machinery/icemachine/Initialize(mapload)
. = ..()
create_reagents(500)
/obj/machinery/icemachine/attackby(obj/item/I, mob/user, params)
@@ -30,7 +30,7 @@
/obj/item/reagent_containers/food/snacks/grown/pineapple = "pineapplejuice"
)
/obj/machinery/juicer/New()
/obj/machinery/juicer/Initialize(mapload)
. = ..()
beaker = new /obj/item/reagent_containers/glass/beaker/large(src)
@@ -28,8 +28,8 @@
* Initialising
********************/
/obj/machinery/kitchen_machine/New()
..()
/obj/machinery/kitchen_machine/Initialize(mapload)
. = ..()
create_reagents(100)
reagents.set_reacting(FALSE)
init_lists()
@@ -19,8 +19,8 @@
* Initialising
********************/
/obj/machinery/kitchen_machine/microwave/New()
..()
/obj/machinery/kitchen_machine/microwave/Initialize(mapload)
. = ..()
component_parts = list()
component_parts += new /obj/item/circuitboard/microwave(null)
component_parts += new /obj/item/stock_parts/micro_laser(null)
@@ -28,8 +28,8 @@
component_parts += new /obj/item/stack/cable_coil(null, 2)
RefreshParts()
/obj/machinery/kitchen_machine/microwave/upgraded/New()
..()
/obj/machinery/kitchen_machine/microwave/upgraded/Initialize(mapload)
. = ..()
component_parts = list()
component_parts += new /obj/item/circuitboard/microwave(null)
component_parts += new /obj/item/stock_parts/micro_laser/ultra(null)
@@ -18,8 +18,8 @@ GLOBAL_LIST_EMPTY(monkey_recyclers)
var/obj/item/reagent_containers/food/snacks/monkeycube/cube_type = /obj/item/reagent_containers/food/snacks/monkeycube
var/list/connected = list()
/obj/machinery/monkey_recycler/New()
..()
/obj/machinery/monkey_recycler/Initialize(mapload)
. = ..()
component_parts = list()
component_parts += new /obj/item/circuitboard/monkey_recycler(null)
component_parts += new /obj/item/stock_parts/manipulator(null)
@@ -11,8 +11,9 @@
idle_power_usage = 5
var/on = FALSE //Is it making food already?
var/list/food_choices = list()
/obj/machinery/cooking/New()
..()
/obj/machinery/cooking/Initialize(mapload)
. = ..()
updatefood()
/obj/machinery/cooking/attackby(obj/item/I, mob/user, params)
@@ -18,8 +18,8 @@
* Initialising
********************/
/obj/machinery/kitchen_machine/oven/New()
..()
/obj/machinery/kitchen_machine/oven/Initialize(mapload)
. = ..()
component_parts = list()
component_parts += new /obj/item/circuitboard/oven(null)
component_parts += new /obj/item/stock_parts/micro_laser(null)
@@ -28,8 +28,8 @@
component_parts += new /obj/item/stack/cable_coil(null, 5)
RefreshParts()
/obj/machinery/kitchen_machine/oven/upgraded/New()
..()
/obj/machinery/kitchen_machine/oven/upgraded/Initialize(mapload)
. = ..()
component_parts = list()
component_parts += new /obj/item/circuitboard/oven(null)
component_parts += new /obj/item/stock_parts/micro_laser/ultra(null)
@@ -15,13 +15,13 @@
var/rating_speed = 1
var/rating_amount = 1
/obj/machinery/processor/New()
..()
component_parts = list()
component_parts += new /obj/item/circuitboard/processor(null)
component_parts += new /obj/item/stock_parts/matter_bin(null)
component_parts += new /obj/item/stock_parts/manipulator(null)
RefreshParts()
/obj/machinery/processor/Initialize(mapload)
. = ..()
component_parts = list()
component_parts += new /obj/item/circuitboard/processor(null)
component_parts += new /obj/item/stock_parts/matter_bin(null)
component_parts += new /obj/item/stock_parts/manipulator(null)
RefreshParts()
/obj/machinery/processor/RefreshParts()
for(var/obj/item/stock_parts/matter_bin/B in component_parts)
+2 -2
View File
@@ -18,8 +18,8 @@
var/list/show_categories = list("Food", "Botany Chemicals", "Organic Materials", "Leather and Cloth")
var/list/timesFiveCategories = list("Food", "Botany Chemicals", "Organic Materials")
/obj/machinery/biogenerator/New()
..()
/obj/machinery/biogenerator/Initialize(mapload)
. = ..()
files = new /datum/research/biogenerator(src)
create_reagents(1000)
component_parts = list()
+4 -4
View File
@@ -23,8 +23,8 @@
var/min_wchance = 67
var/min_wrate = 10
/obj/machinery/plantgenes/New()
..()
/obj/machinery/plantgenes/Initialize(mapload)
. = ..()
component_parts = list()
component_parts += new /obj/item/circuitboard/plantgenes(null)
component_parts += new /obj/item/stack/sheet/glass(null)
@@ -33,8 +33,8 @@
component_parts += new /obj/item/stock_parts/manipulator(null)
RefreshParts()
/obj/machinery/plantgenes/seedvault/New()
..()
/obj/machinery/plantgenes/seedvault/Initialize(mapload)
. = ..()
component_parts = list()
component_parts += new /obj/item/circuitboard/plantgenes/vault(null)
component_parts += new /obj/item/stack/sheet/glass(null)
+4 -4
View File
@@ -32,8 +32,8 @@
var/self_sustaining = FALSE //If the tray generates nutrients and water on its own
hud_possible = list (PLANT_NUTRIENT_HUD, PLANT_WATER_HUD, PLANT_STATUS_HUD, PLANT_HEALTH_HUD, PLANT_TOXIN_HUD, PLANT_PEST_HUD, PLANT_WEED_HUD)
/obj/machinery/hydroponics/New()
..()
/obj/machinery/hydroponics/Initialize(mapload)
. = ..()
var/datum/atom_hud/data/hydroponic/hydro_hud = GLOB.huds[DATA_HUD_HYDROPONIC]
prepare_huds()
hydro_hud.add_to_hud(src)
@@ -50,8 +50,8 @@
icon = 'icons/obj/hydroponics/equipment.dmi'
icon_state = "hydrotray3"
/obj/machinery/hydroponics/constructable/New()
..()
/obj/machinery/hydroponics/constructable/Initialize(mapload)
. = ..()
component_parts = list()
component_parts += new /obj/item/circuitboard/hydroponics(null)
component_parts += new /obj/item/stock_parts/matter_bin(null)
+2 -2
View File
@@ -48,8 +48,8 @@
var/max_seeds = 1000
var/seed_multiplier = 1
/obj/machinery/seed_extractor/New()
..()
/obj/machinery/seed_extractor/Initialize(mapload)
. = ..()
component_parts = list()
component_parts += new /obj/item/circuitboard/seed_extractor(null)
component_parts += new /obj/item/stock_parts/matter_bin(null)
@@ -153,8 +153,8 @@
icon_state = "sleeper-open"
density = FALSE
/obj/machinery/sleeper/survival_pod/New()
..()
/obj/machinery/sleeper/survival_pod/Initialize(mapload)
. = ..()
component_parts = list()
component_parts += new /obj/item/circuitboard/sleeper/survival(null)
var/obj/item/stock_parts/matter_bin/B = new(null)
@@ -33,9 +33,10 @@
var/list/affected_targets = list()
var/activation_sound = 'sound/effects/break_stone.ogg'
/obj/machinery/anomalous_crystal/New()
/obj/machinery/anomalous_crystal/Initialize(mapload)
. = ..()
activation_method = pick("touch","laser","bullet","energy","bomb","mob_bump","weapon","speech") // "heat" removed due to lack of is_hot()
..()
/obj/machinery/anomalous_crystal/hear_talk(mob/speaker, list/message_pieces)
..()
@@ -76,11 +77,11 @@
/obj/machinery/anomalous_crystal/ex_act()
ActivationReaction(null,"bomb")
/obj/machinery/anomalous_crystal/random/New() //Just a random crysal spawner for loot
/obj/machinery/anomalous_crystal/random/Initialize() //Just a random crysal spawner for loot
. = ..()
var/random_crystal = pick(typesof(/obj/machinery/anomalous_crystal) - /obj/machinery/anomalous_crystal/random - /obj/machinery/anomalous_crystal)
new random_crystal(loc)
qdel(src)
return INITIALIZE_HINT_QDEL
/obj/machinery/anomalous_crystal/theme_warp //Warps the area you're in to look like a new one
activation_method = "touch"
@@ -93,8 +94,8 @@
var/list/NewFlora = list()
var/florachance = 8
/obj/machinery/anomalous_crystal/theme_warp/New()
..()
/obj/machinery/anomalous_crystal/theme_warp/Initialize(mapload)
. = ..()
terrain_theme = pick("lavaland","winter","jungle","alien")
switch(terrain_theme)
if("lavaland")//Depressurizes the place... and free cult metal, I guess.
@@ -161,8 +162,8 @@
cooldown_add = 50
var/generated_projectile = /obj/item/projectile/beam/emitter
/obj/machinery/anomalous_crystal/emitter/New()
..()
/obj/machinery/anomalous_crystal/emitter/Initialize(mapload)
. = ..()
generated_projectile = pick(/obj/item/projectile/magic/fireball/infernal,
/obj/item/projectile/bullet/meteorshot, /obj/item/projectile/beam/xray, /obj/item/projectile/colossus)
@@ -299,8 +300,8 @@
var/list/banned_items_typecache = list(/obj/item/storage, /obj/item/implant, /obj/item/implanter, /obj/item/disk/nuclear,
/obj/item/projectile, /obj/item/spellbook, /obj/item/clothing/mask/facehugger, /obj/item/contractor_uplink)
/obj/machinery/anomalous_crystal/refresher/New()
..()
/obj/machinery/anomalous_crystal/refresher/Initialize(mapload)
. = ..()
banned_items_typecache = typecacheof(banned_items_typecache)
+11 -9
View File
@@ -55,11 +55,13 @@
/// The currently inserted design disk.
var/obj/item/disk/design_disk/inserted_disk
/obj/machinery/mineral/ore_redemption/New()
/obj/machinery/mineral/ore_redemption/ComponentInitialize()
..()
ore_buffer = list()
// Components
AddComponent(/datum/component/material_container, list(MAT_METAL, MAT_GLASS, MAT_SILVER, MAT_GOLD, MAT_DIAMOND, MAT_PLASMA, MAT_URANIUM, MAT_BANANIUM, MAT_TRANQUILLITE, MAT_TITANIUM, MAT_BLUESPACE), INFINITY, FALSE, /obj/item/stack, null, CALLBACK(src, .proc/on_material_insert))
/obj/machinery/mineral/ore_redemption/Initialize(mapload)
. = ..()
ore_buffer = list()
files = new /datum/research/smelter(src)
// Stock parts
component_parts = list()
@@ -71,8 +73,8 @@
component_parts += new /obj/item/stack/sheet/glass(null)
RefreshParts()
/obj/machinery/mineral/ore_redemption/upgraded/New()
..()
/obj/machinery/mineral/ore_redemption/upgraded/Initialize(mapload)
. = ..()
component_parts = list()
component_parts += new /obj/item/circuitboard/ore_redemption(null)
component_parts += new /obj/item/stock_parts/matter_bin/super(null)
@@ -91,8 +93,8 @@
req_access = list(ACCESS_FREE_GOLEMS)
req_access_claim = ACCESS_FREE_GOLEMS
/obj/machinery/mineral/ore_redemption/golem/New()
..()
/obj/machinery/mineral/ore_redemption/golem/Initialize(mapload)
. = ..()
component_parts = list()
component_parts += new /obj/item/circuitboard/ore_redemption/golem(null)
component_parts += new /obj/item/stock_parts/matter_bin(null)
@@ -112,8 +114,8 @@
req_access = list()
anyone_claim = TRUE
/obj/machinery/mineral/ore_redemption/labor/New()
..()
/obj/machinery/mineral/ore_redemption/labor/Initialize(mapload)
. = ..()
component_parts = list()
component_parts += new /obj/item/circuitboard/ore_redemption/labor(null)
component_parts += new /obj/item/stock_parts/matter_bin(null)
+6 -6
View File
@@ -17,8 +17,8 @@
var/list/prize_list // Initialized just below! (if you're wondering why - check CONTRIBUTING.md, look for: "hidden" init proc)
var/dirty_items = FALSE // Used to refresh the static/redundant data in case the machine gets VV'd
/obj/machinery/mineral/equipment_vendor/New()
..()
/obj/machinery/mineral/equipment_vendor/Initialize(mapload)
. = ..()
component_parts = list()
component_parts += new /obj/item/circuitboard/mining_equipment_vendor(null)
component_parts += new /obj/item/stock_parts/matter_bin(null)
@@ -277,8 +277,8 @@
/obj/machinery/mineral/equipment_vendor/golem
name = "golem ship equipment vendor"
/obj/machinery/mineral/equipment_vendor/golem/New()
..()
/obj/machinery/mineral/equipment_vendor/golem/Initialize(mapload)
. = ..()
component_parts = list()
component_parts += new /obj/item/circuitboard/mining_equipment_vendor/golem(null)
component_parts += new /obj/item/stock_parts/matter_bin(null)
@@ -308,8 +308,8 @@
name = "labor camp equipment vendor"
desc = "An equipment vendor for scum, points collected at an ore redemption machine can be spent here."
/obj/machinery/mineral/equipment_vendor/labor/New()
..()
/obj/machinery/mineral/equipment_vendor/labor/Initialize(mapload)
. = ..()
component_parts = list()
component_parts += new /obj/item/circuitboard/mining_equipment_vendor/labor(null)
component_parts += new /obj/item/stock_parts/matter_bin(null)
+1 -1
View File
@@ -14,7 +14,7 @@
speed_process = TRUE
/obj/machinery/mineral/mint/New()
/obj/machinery/mineral/mint/ComponentInitialize()
..()
AddComponent(/datum/component/material_container, list(MAT_METAL, MAT_PLASMA, MAT_SILVER, MAT_GOLD, MAT_URANIUM, MAT_DIAMOND, MAT_BANANIUM, MAT_TRANQUILLITE), MINERAL_MATERIAL_AMOUNT * 50, FALSE, /obj/item/stack)
+4 -5
View File
@@ -19,6 +19,7 @@
desc = "A standard Nanotrasen-licensed newsfeed handler for use in commercial space stations. All the news you absolutely have no use for, in one place!"
icon = 'icons/obj/terminals.dmi'
icon_state = "newscaster_normal"
armor = list(MELEE = 50, BULLET = 0, LASER = 0, ENERGY = 0, BOMB = 0, BIO = 0, RAD = 0, FIRE = 50, ACID = 30)
max_integrity = 200
integrity_failure = 50
light_range = 0
@@ -54,17 +55,15 @@
name = "security newscaster"
is_security = TRUE
/obj/machinery/newscaster/New()
/obj/machinery/newscaster/Initialize(mapload)
. = ..()
GLOB.allNewscasters += src
unit_number = length(GLOB.allNewscasters)
update_icon() //for any custom ones on the map...
if(!last_views)
last_views = list()
armor = list(melee = 50, bullet = 0, laser = 0, energy = 0, bomb = 0, bio = 0, rad = 0, fire = 50, acid = 30)
..()
/obj/machinery/newscaster/Initialize(mapload)
. = ..()
if(is_security)
name = "security newscaster"
else
+3 -6
View File
@@ -16,9 +16,10 @@
var/lastgenlev = -1
var/lastcirc = "00"
/obj/machinery/power/generator/New()
..()
/obj/machinery/power/generator/Initialize(mapload)
. = ..()
update_desc()
connect()
/obj/machinery/power/generator/proc/update_desc()
desc = initial(desc) + " Its cold circulator is located on the [dir2text(cold_dir)] side, and its heat circulator is located on the [dir2text(hot_dir)] side."
@@ -35,10 +36,6 @@
if(powernet)
disconnect_from_network()
/obj/machinery/power/generator/Initialize()
..()
connect()
/obj/machinery/power/generator/proc/connect()
connect_to_network()
+8 -10
View File
@@ -114,13 +114,11 @@
var/temperature = 0 //The current temperature
var/overheating = 0 //if this gets high enough the generator explodes
/obj/machinery/power/port_gen/pacman/Initialize()
..()
/obj/machinery/power/port_gen/pacman/Initialize(mapload)
. = ..()
if(anchored)
connect_to_network()
/obj/machinery/power/port_gen/pacman/New()
..()
component_parts = list()
component_parts += new /obj/item/stock_parts/matter_bin(null)
component_parts += new /obj/item/stock_parts/micro_laser(null)
@@ -130,8 +128,8 @@
component_parts += new board_path(null)
RefreshParts()
/obj/machinery/power/port_gen/pacman/upgraded/New()
..()
/obj/machinery/power/port_gen/pacman/upgraded/Initialize(mapload)
. = ..()
component_parts = list()
component_parts += new /obj/item/stock_parts/matter_bin/super(null)
component_parts += new /obj/item/stock_parts/micro_laser/ultra(null)
@@ -390,8 +388,8 @@
time_per_sheet = 576 //same power output, but a 50 sheet stack will last 2 hours at max safe power
board_path = /obj/item/circuitboard/pacman/super
/obj/machinery/power/port_gen/pacman/super/upgraded/New()
..()
/obj/machinery/power/port_gen/pacman/super/upgraded/Initialize(mapload)
. = ..()
component_parts = list()
component_parts += new /obj/item/stock_parts/matter_bin/super(null)
component_parts += new /obj/item/stock_parts/micro_laser/ultra(null)
@@ -431,8 +429,8 @@
temperature_gain = 90
board_path = /obj/item/circuitboard/pacman/mrs
/obj/machinery/power/port_gen/pacman/mrs/upgraded/New()
..()
/obj/machinery/power/port_gen/pacman/mrs/upgraded/Initialize(mapload)
. = ..()
component_parts = list()
component_parts += new /obj/item/stock_parts/matter_bin/super(null)
component_parts += new /obj/item/stock_parts/micro_laser/ultra(null)
@@ -28,8 +28,8 @@
/obj/machinery/chem_dispenser/get_cell()
return cell
/obj/machinery/chem_dispenser/New()
..()
/obj/machinery/chem_dispenser/Initialize(mapload)
. = ..()
component_parts = list()
component_parts += new /obj/item/circuitboard/chem_dispenser(null)
component_parts += new /obj/item/stock_parts/matter_bin(null)
@@ -41,8 +41,8 @@
RefreshParts()
dispensable_reagents = sortList(dispensable_reagents)
/obj/machinery/chem_dispenser/upgraded/New()
..()
/obj/machinery/chem_dispenser/upgraded/Initialize(mapload)
. = ..()
component_parts = list()
component_parts += new /obj/item/circuitboard/chem_dispenser(null)
component_parts += new /obj/item/stock_parts/matter_bin/super(null)
@@ -73,8 +73,8 @@
"diethylamine")
upgrade_reagents = null
/obj/machinery/chem_dispenser/mutagensaltpeter/New()
..()
/obj/machinery/chem_dispenser/mutagensaltpeter/Initialize(mapload)
. = ..()
component_parts = list()
component_parts += new /obj/item/circuitboard/chem_dispenser(null)
component_parts += new /obj/item/stock_parts/matter_bin/bluespace(null)
@@ -346,8 +346,8 @@
unhack_message = "You change the mode from 'Pizza King' to 'McNano'."
is_drink = TRUE
/obj/machinery/chem_dispenser/soda/New()
..()
/obj/machinery/chem_dispenser/soda/Initialize(mapload)
. = ..()
QDEL_LIST(component_parts)
component_parts += new /obj/item/circuitboard/chem_dispenser/soda(null)
component_parts += new /obj/item/stock_parts/matter_bin(null)
@@ -358,8 +358,8 @@
component_parts += new cell_type(null)
RefreshParts()
/obj/machinery/chem_dispenser/soda/upgraded/New()
..()
/obj/machinery/chem_dispenser/soda/upgraded/Initialize(mapload)
. = ..()
QDEL_LIST(component_parts)
component_parts += new /obj/item/circuitboard/chem_dispenser/soda(null)
component_parts += new /obj/item/stock_parts/matter_bin/super(null)
@@ -382,8 +382,8 @@
unhack_message = "You re-enable the 'nanotrasen-are-cheap-bastards' lock, disabling hidden and very expensive boozes."
is_drink = TRUE
/obj/machinery/chem_dispenser/beer/New()
..()
/obj/machinery/chem_dispenser/beer/Initialize(mapload)
. = ..()
QDEL_LIST(component_parts)
component_parts += new /obj/item/circuitboard/chem_dispenser/beer(null)
component_parts += new /obj/item/stock_parts/matter_bin(null)
@@ -394,8 +394,8 @@
component_parts += new cell_type(null)
RefreshParts()
/obj/machinery/chem_dispenser/beer/upgraded/New()
..()
/obj/machinery/chem_dispenser/beer/upgraded/Initialize(mapload)
. = ..()
QDEL_LIST(component_parts)
component_parts += new /obj/item/circuitboard/chem_dispenser/beer(null)
component_parts += new /obj/item/stock_parts/matter_bin/super(null)
@@ -15,8 +15,8 @@
/// The higher this number, the faster reagents will heat/cool.
var/speed_increase = 0
/obj/machinery/chem_heater/New()
..()
/obj/machinery/chem_heater/Initialize(mapload)
. = ..()
component_parts = list()
component_parts += new /obj/item/circuitboard/chem_heater(null)
component_parts += new /obj/item/stock_parts/micro_laser(null)
@@ -27,8 +27,8 @@
var/static/list/pill_bottle_wrappers
var/static/list/bottle_styles
/obj/machinery/chem_master/New()
..()
/obj/machinery/chem_master/Initialize(mapload)
. = ..()
create_reagents(100)
component_parts = list()
component_parts += new /obj/item/circuitboard/chem_master(null)
@@ -547,8 +547,8 @@
name = "\improper CondiMaster 3000"
condi = TRUE
/obj/machinery/chem_master/condimaster/New()
..()
/obj/machinery/chem_master/condimaster/Initialize(mapload)
. = ..()
QDEL_LIST(component_parts)
component_parts += new /obj/item/circuitboard/chem_master/condi_master(null)
component_parts += new /obj/item/stock_parts/manipulator(null)
@@ -14,8 +14,8 @@
var/wait = null
var/obj/item/reagent_containers/beaker = null
/obj/machinery/computer/pandemic/New()
..()
/obj/machinery/computer/pandemic/Initialize(mapload)
. = ..()
update_icon()
/obj/machinery/computer/pandemic/set_broken()
@@ -95,8 +95,8 @@
icon_state = "juicer0"
beaker = null
/obj/machinery/reagentgrinder/New()
..()
/obj/machinery/reagentgrinder/Initialize(mapload)
. = ..()
component_parts = list()
component_parts += new /obj/item/circuitboard/reagentgrinder(null)
component_parts += new /obj/item/stock_parts/manipulator(null)
+3 -11
View File
@@ -32,15 +32,6 @@
active_power_usage = 600
idle_power_usage = 100
// create a new disposal
// find the attached trunk (if present)
/obj/machinery/disposal/New()
..()
trunk_check()
//gas.volume = 1.05 * CELLSTANDARD
update()
/obj/machinery/disposal/proc/trunk_check()
var/obj/structure/disposalpipe/trunk/T = locate() in loc
if(!T)
@@ -82,9 +73,9 @@
if(current_size >= STAGE_FIVE)
deconstruct()
/obj/machinery/disposal/Initialize()
/obj/machinery/disposal/Initialize(mapload)
// this will get a copy of the air turf and take a SEND PRESSURE amount of air from it
..()
. = ..()
var/atom/L = loc
var/datum/gas_mixture/env = new
env.copy_from(L.return_air())
@@ -92,6 +83,7 @@
air_contents = new
air_contents.merge(removed)
trunk_check()
update()
// attack by item places it in to disposal
/obj/machinery/disposal/attackby(obj/item/I, mob/user, params)
+6 -6
View File
@@ -274,12 +274,12 @@
deconstructs_to = PIPE_DISPOSALS_CHUTE
var/can_deconstruct = FALSE
/obj/machinery/disposal/deliveryChute/New()
..()
spawn(5)
trunk = locate() in src.loc
if(trunk)
trunk.linked = src // link the pipe trunk to self
/obj/machinery/disposal/deliveryChute/Initialize(mapload)
. = ..()
trunk = locate() in src.loc
if(trunk)
trunk.linked = src // link the pipe trunk to self
/obj/machinery/disposal/deliveryChute/interact()
return
+4 -4
View File
@@ -23,8 +23,8 @@ using metal and glass, it uses glass and reagents (usually sulfuric acis).
"Teleportation Machinery"
)
/obj/machinery/r_n_d/circuit_imprinter/New()
..()
/obj/machinery/r_n_d/circuit_imprinter/Initialize(mapload)
. = ..()
component_parts = list()
component_parts += new /obj/item/circuitboard/circuit_imprinter(null)
component_parts += new /obj/item/stock_parts/matter_bin(null)
@@ -34,8 +34,8 @@ using metal and glass, it uses glass and reagents (usually sulfuric acis).
create_reagents()
RefreshParts()
/obj/machinery/r_n_d/circuit_imprinter/upgraded/New()
..()
/obj/machinery/r_n_d/circuit_imprinter/upgraded/Initialize(mapload)
. = ..()
component_parts = list()
component_parts += new /obj/item/circuitboard/circuit_imprinter(null)
component_parts += new /obj/item/stock_parts/matter_bin/super(null)
@@ -11,8 +11,8 @@ Note: Must be placed within 3 tiles of the R&D Console
icon_state = "d_analyzer"
var/decon_mod = 0
/obj/machinery/r_n_d/destructive_analyzer/New()
..()
/obj/machinery/r_n_d/destructive_analyzer/Initialize(mapload)
. = ..()
component_parts = list()
component_parts += new /obj/item/circuitboard/destructive_analyzer(null)
component_parts += new /obj/item/stock_parts/scanning_module(null)
@@ -20,8 +20,8 @@ Note: Must be placed within 3 tiles of the R&D Console
component_parts += new /obj/item/stock_parts/micro_laser(null)
RefreshParts()
/obj/machinery/r_n_d/destructive_analyzer/upgraded/New()
..()
/obj/machinery/r_n_d/destructive_analyzer/upgraded/Initialize(mapload)
. = ..()
component_parts = list()
component_parts += new /obj/item/circuitboard/destructive_analyzer(null)
component_parts += new /obj/item/stock_parts/scanning_module/phasic(null)
+9 -5
View File
@@ -78,8 +78,7 @@
if(initial(tempCheck.icon_state) != null)
critical_items += I
/obj/machinery/r_n_d/experimentor/New()
/obj/machinery/r_n_d/experimentor/Initialize(mapload)
..()
component_parts = list()
component_parts += new /obj/item/circuitboard/experimentor(src)
@@ -88,11 +87,16 @@
component_parts += new /obj/item/stock_parts/manipulator(src)
component_parts += new /obj/item/stock_parts/micro_laser(src)
component_parts += new /obj/item/stock_parts/micro_laser(src)
spawn(1)
trackedIan = locate(/mob/living/simple_animal/pet/dog/corgi/Ian) in GLOB.mob_living_list
trackedRuntime = locate(/mob/living/simple_animal/pet/cat/Runtime) in GLOB.mob_living_list
SetTypeReactions()
RefreshParts()
return INITIALIZE_HINT_LATELOAD
/obj/machinery/r_n_d/experimentor/LateInitialize()
..()
// GLOB.mob_living_list gets populated in /mob/Initialize()
// so we need to delay searching for those until after the Initialize()
trackedIan = locate(/mob/living/simple_animal/pet/dog/corgi/Ian) in GLOB.mob_living_list
trackedRuntime = locate(/mob/living/simple_animal/pet/cat/Runtime) in GLOB.mob_living_list
/obj/machinery/r_n_d/experimentor/RefreshParts()
for(var/obj/item/stock_parts/manipulator/M in component_parts)
+4 -4
View File
@@ -25,8 +25,8 @@ Note: Must be placed west/left of and R&D console to function.
"Weapons"
)
/obj/machinery/r_n_d/protolathe/New()
..()
/obj/machinery/r_n_d/protolathe/Initialize(mapload)
. = ..()
component_parts = list()
component_parts += new /obj/item/circuitboard/protolathe(null)
component_parts += new /obj/item/stock_parts/matter_bin(null)
@@ -38,8 +38,8 @@ Note: Must be placed west/left of and R&D console to function.
create_reagents()
RefreshParts()
/obj/machinery/r_n_d/protolathe/upgraded/New()
..()
/obj/machinery/r_n_d/protolathe/upgraded/Initialize(mapload)
. = ..()
component_parts = list()
component_parts += new /obj/item/circuitboard/protolathe(null)
component_parts += new /obj/item/stock_parts/matter_bin/super(null)
+2 -9
View File
@@ -162,17 +162,10 @@ won't update every console in existence) but it's more of a hassle to do. Also,
KT.level=KT.max_level
files.RefreshResearch()
/obj/machinery/computer/rdconsole/New()
..()
/obj/machinery/computer/rdconsole/Initialize(mapload)
. = ..()
files = new /datum/research(src) //Setup the research data holder.
matching_designs = list()
if(!id)
for(var/obj/machinery/r_n_d/server/centcom/S in GLOB.machines)
S.initialize_serv()
break
/obj/machinery/computer/rdconsole/Initialize()
..()
SyncRDevices()
/obj/machinery/computer/rdconsole/Destroy()
+9 -4
View File
@@ -21,10 +21,10 @@
var/efficiency_coeff = 1
var/list/categories = list()
/obj/machinery/r_n_d/New()
materials = AddComponent(/datum/component/material_container, list(MAT_METAL, MAT_GLASS, MAT_SILVER, MAT_GOLD, MAT_DIAMOND, MAT_PLASMA, MAT_URANIUM, MAT_BANANIUM, MAT_TRANQUILLITE, MAT_TITANIUM, MAT_BLUESPACE, MAT_PLASTIC), 0, TRUE, /obj/item/stack, CALLBACK(src, .proc/is_insertion_ready), CALLBACK(src, .proc/AfterMaterialInsert))
materials.precise_insertion = TRUE
..()
/obj/machinery/r_n_d/Initialize(mapload)
. = ..()
wires["Red"] = 0
wires["Blue"] = 0
wires["Green"] = 0
@@ -36,6 +36,11 @@
shock_wire = pick_n_take(w)
disable_wire = pick_n_take(w)
/obj/machinery/r_n_d/ComponentInitialize()
..()
materials = AddComponent(/datum/component/material_container, list(MAT_METAL, MAT_GLASS, MAT_SILVER, MAT_GOLD, MAT_DIAMOND, MAT_PLASMA, MAT_URANIUM, MAT_BANANIUM, MAT_TRANQUILLITE, MAT_TITANIUM, MAT_BLUESPACE, MAT_PLASTIC), 0, TRUE, /obj/item/stack, CALLBACK(src, .proc/is_insertion_ready), CALLBACK(src, .proc/AfterMaterialInsert))
materials.precise_insertion = TRUE
/obj/machinery/r_n_d/Destroy()
if(loaded_item)
loaded_item.forceMove(get_turf(src))
+4 -4
View File
@@ -15,8 +15,8 @@
req_access = list(ACCESS_RD) //Only the R&D can change server settings.
var/plays_sound = 0
/obj/machinery/r_n_d/server/New()
..()
/obj/machinery/r_n_d/server/Initialize(mapload)
. = ..()
component_parts = list()
component_parts += new /obj/item/circuitboard/rdserver(null)
component_parts += new /obj/item/stock_parts/scanning_module(null)
@@ -25,8 +25,8 @@
RefreshParts()
initialize_serv(); //Agouri // fuck you agouri
/obj/machinery/r_n_d/server/upgraded/New()
..()
/obj/machinery/r_n_d/server/upgraded/Initialize(mapload)
. = ..()
component_parts = list()
component_parts += new /obj/item/circuitboard/rdserver(null)
component_parts += new /obj/item/stock_parts/scanning_module/phasic(null)
@@ -41,7 +41,11 @@
icon_screen = "slime_comp"
icon_keyboard = "rd_key"
/obj/machinery/computer/camera_advanced/xenobio/New()
/obj/machinery/computer/camera_advanced/xenobio/Initialize(mapload)
..()
return INITIALIZE_HINT_LATELOAD
/obj/machinery/computer/camera_advanced/xenobio/LateInitialize()
..()
for(var/obj/machinery/monkey_recycler/recycler in GLOB.monkey_recyclers)
if(get_area(recycler.loc) == get_area(loc))
+1 -1
View File
@@ -21,7 +21,7 @@
var/list/templates = list()
var/list/shuttle_data = list()
/obj/machinery/shuttle_manipulator/New()
/obj/machinery/shuttle_manipulator/Initialize(mapload)
. = ..()
update_icon()
+2 -2
View File
@@ -232,8 +232,8 @@
var/safe_levels = 10
/obj/machinery/power/bluespace_tap/New()
..()
/obj/machinery/power/bluespace_tap/Initialize(mapload)
. = ..()
//more code stolen from dna vault, inculding comment below. Taking bets on that datum being made ever.
//TODO: Replace this,bsa and gravgen with some big machinery datum
var/list/occupied = list()
+2 -1
View File
@@ -167,7 +167,8 @@ GLOBAL_LIST_INIT(non_simple_animals, typecacheof(list(/mob/living/carbon/human/m
var/list/obj/structure/fillers = list()
/obj/machinery/dna_vault/New()
/obj/machinery/dna_vault/Initialize(mapload)
. = ..()
//TODO: Replace this,bsa and gravgen with some big machinery datum
var/list/occupied = list()
for(var/direct in list(EAST,WEST,SOUTHEAST,SOUTHWEST))
+2 -2
View File
@@ -108,8 +108,8 @@
var/static/gid = 0
var/id = 0
/obj/machinery/satellite/New()
..()
/obj/machinery/satellite/Initialize(mapload)
. = ..()
id = gid++
/obj/machinery/satellite/attack_hand(mob/user)
+4 -4
View File
@@ -10,8 +10,8 @@
active_power_usage = 5000
var/efficiency
/obj/machinery/telepad/New()
..()
/obj/machinery/telepad/Initialize(mapload)
. = ..()
component_parts = list()
component_parts += new /obj/item/circuitboard/telesci_pad(null)
component_parts += new /obj/item/stack/ore/bluespace_crystal/artificial(null, 2)
@@ -20,8 +20,8 @@
component_parts += new /obj/item/stack/cable_coil(null, 1)
RefreshParts()
/obj/machinery/telepad/upgraded/New()
..()
/obj/machinery/telepad/upgraded/Initialize(mapload)
. = ..()
component_parts = list()
component_parts += new /obj/item/circuitboard/telesci_pad(null)
component_parts += new /obj/item/stack/ore/bluespace_crystal/artificial(null, 2)
+2 -5
View File
@@ -30,8 +30,8 @@
var/max_crystals = 4
var/obj/item/gps/inserted_gps
/obj/machinery/computer/telescience/New()
..()
/obj/machinery/computer/telescience/Initialize(mapload)
. = ..()
recalibrate()
/obj/machinery/computer/telescience/Destroy()
@@ -45,9 +45,6 @@
. = ..()
. += "There are [crystals ? crystals : "no"] bluespace crystal\s in the crystal slots."
/obj/machinery/computer/telescience/Initialize()
..()
/obj/machinery/computer/telescience/attackby(obj/item/W, mob/user, params)
if(istype(W, /obj/item/stack/ore/bluespace_crystal))
var/obj/item/stack/ore/bluespace_crystal/B = W