Finish Machinery new to init (#17334)

* Finish Machinery new to init

* fix that

---------

Co-authored-by: Cameron Lennox <killer65311@gmail.com>
This commit is contained in:
Kashargul
2025-03-16 08:57:48 +01:00
committed by GitHub
parent f362f6585f
commit 4d36cfdaeb
116 changed files with 486 additions and 528 deletions
+4 -2
View File
@@ -66,7 +66,8 @@ GLOBAL_DATUM(gateway_station, /obj/machinery/gateway/centerstation)
return
icon_state = "offcenter"
/* VOREStation Removal - Doesn't do anything
/obj/machinery/gateway/centerstation/New()
/obj/machinery/gateway/centerstation/Initialize(mapload)
. = ..()
density = TRUE
*/ //VOREStation Removal End
@@ -249,7 +250,8 @@ GLOBAL_DATUM(gateway_away, /obj/machinery/gateway/centeraway)
var/ready = 0
var/obj/machinery/gateway/centerstation/stationgate = null
/obj/machinery/gateway/centeraway/New()
/obj/machinery/gateway/centeraway/Initialize(mapload)
. = ..()
density = TRUE
/obj/machinery/gateway/centeraway/Initialize(mapload)
@@ -18,8 +18,8 @@
)
//Forces different sprite sheet on equip
/obj/item/clothing/accessory/choker/New()
..()
/obj/item/clothing/accessory/choker/Initialize(mapload)
. = ..()
icon_previous_override = icon_override
/obj/item/clothing/accessory/choker/equipped() //Solution for race-specific sprites for an accessory which is also a suit. Suit icons break if you don't use icon override which then also overrides race-specific sprites.
@@ -57,8 +57,8 @@
)
//Forces different sprite sheet on equip
/obj/item/clothing/accessory/collar/New()
..()
/obj/item/clothing/accessory/collar/Initialize(mapload)
. = ..()
icon_previous_override = icon_override
/obj/item/clothing/accessory/collar/equipped() //Solution for race-specific sprites for an accessory which is also a suit. Suit icons break if you don't use icon override which then also overrides race-specific sprites.
@@ -11,8 +11,8 @@
slot_flags = SLOT_TIE
var/obj/item/dosimeter_film/current_film = null
/obj/item/clothing/accessory/dosimeter/New()
..()
/obj/item/clothing/accessory/dosimeter/Initialize(mapload)
. = ..()
current_film = new /obj/item/dosimeter_film(src)
update_state(current_film.state)
START_PROCESSING(SSobj, src)
@@ -119,8 +119,8 @@
max_storage_space = (ITEMSIZE_COST_SMALL * 4) + (ITEMSIZE_COST_TINY * 1)
w_class = ITEMSIZE_SMALL
/obj/item/storage/box/dosimeter/New()
..()
/obj/item/storage/box/dosimeter/Initialize(mapload)
. = ..()
new /obj/item/paper/dosimeter_manual(src)
new /obj/item/clothing/accessory/dosimeter(src)
new /obj/item/dosimeter_film(src)
+2 -1
View File
@@ -58,7 +58,8 @@
var/datum/gas_mixture/env = T.return_air()
. += span_notice("Pressure: [env.return_pressure()]kPa / Temperature: [env.temperature]K ")
/obj/item/clothing/accessory/watch/survival/New()
/obj/item/clothing/accessory/watch/survival/Initialize(mapload)
. = ..()
gps = new/obj/item/gps/watch(src)
/obj/item/gps/watch
+2 -2
View File
@@ -304,8 +304,8 @@
origin_tech = list(TECH_ILLEGAL = 3)
var/list/global/clothing_choices
/obj/item/clothing/glasses/chameleon/New()
..()
/obj/item/clothing/glasses/chameleon/Initialize(mapload)
. = ..()
if(!clothing_choices)
clothing_choices = generate_chameleon_choices(/obj/item/clothing/glasses, list(src.type))
+10 -10
View File
@@ -97,8 +97,8 @@ BLIND // can't see anything
vision_flags = SEE_TURFS
enables_planes = list(VIS_FULLBRIGHT, VIS_MESONS)
/obj/item/clothing/glasses/meson/New()
..()
/obj/item/clothing/glasses/meson/Initialize(mapload)
. = ..()
overlay = global_hud.meson
/obj/item/clothing/glasses/meson/prescription
@@ -142,8 +142,8 @@ BLIND // can't see anything
actions_types = list(/datum/action/item_action/toggle_goggles)
item_flags = AIRTIGHT
/obj/item/clothing/glasses/science/New()
..()
/obj/item/clothing/glasses/science/Initialize(mapload)
. = ..()
overlay = global_hud.science
/obj/item/clothing/glasses/goggles
@@ -172,8 +172,8 @@ BLIND // can't see anything
species_restricted = list("Vox")
flags = PHORONGUARD
/obj/item/clothing/glasses/night/New()
..()
/obj/item/clothing/glasses/night/Initialize(mapload)
. = ..()
overlay = global_hud.nvg
/obj/item/clothing/glasses/eyepatch
@@ -264,8 +264,8 @@ BLIND // can't see anything
flash_protection = FLASH_PROTECTION_REDUCED
enables_planes = list(VIS_FULLBRIGHT, VIS_MESONS)
/obj/item/clothing/glasses/graviton/New()
..()
/obj/item/clothing/glasses/graviton/Initialize(mapload)
. = ..()
overlay = global_hud.material
/obj/item/clothing/glasses/regular
@@ -551,8 +551,8 @@ BLIND // can't see anything
M.disabilities &= ~NEARSIGHTED
..()
/obj/item/clothing/glasses/thermal/New()
..()
/obj/item/clothing/glasses/thermal/Initialize(mapload)
. = ..()
overlay = global_hud.thermal
/obj/item/clothing/glasses/thermal/syndi //These are now a traitor item, concealed as mesons. -Pete
+2 -2
View File
@@ -16,8 +16,8 @@
var/ar_toggled = TRUE //Used for toggle_ar_planes() verb
/obj/item/clothing/glasses/omnihud/New()
..()
/obj/item/clothing/glasses/omnihud/Initialize(mapload)
. = ..()
if(tgarscreen_path)
tgarscreen = new tgarscreen_path(src)
+2 -2
View File
@@ -1,8 +1,8 @@
// Our clear gas masks don't hide faces, but changing the var on mask/gas would require un-chaging it on all children. This is nicer.
/obj/item/clothing/mask/gas/New()
/obj/item/clothing/mask/gas/Initialize(mapload)
. = ..()
if(type == /obj/item/clothing/mask/gas)
flags_inv &= ~HIDEFACE
..()
// Since we changed the gas mask sprite, if we want the old one for some reason use this.
/obj/item/clothing/mask/gas/wwii
+6 -5
View File
@@ -15,8 +15,8 @@
item_state_slots = list(slot_r_hand_str = null, slot_l_hand_str = null)
w_class = ITEMSIZE_TINY
/obj/item/clothing/mask/muzzle/New()
..()
/obj/item/clothing/mask/muzzle/Initialize(mapload)
. = ..()
say_messages = list("Mmfph!", "Mmmf mrrfff!", "Mmmf mnnf!")
say_verbs = list("mumbles", "says")
@@ -217,8 +217,8 @@
w_class = ITEMSIZE_SMALL
body_parts_covered = HEAD|FACE
*/
/obj/item/clothing/mask/horsehead/New()
..()
/obj/item/clothing/mask/horsehead/Initialize(mapload)
. = ..()
// The horse mask doesn't cause voice changes by default, the wizard spell changes the flag as necessary
say_messages = list("NEEIIGGGHHHH!", "NEEEIIIIGHH!", "NEIIIGGHH!", "HAAWWWWW!", "HAAAWWW!")
say_verbs = list("whinnies", "neighs", "says")
@@ -232,7 +232,8 @@
body_parts_covered = 0
var/mob/observer/eye/aiEye/eye
/obj/item/clothing/mask/ai/New()
/obj/item/clothing/mask/ai/Initialize(mapload)
. = ..()
eye = new(src)
/obj/item/clothing/mask/ai/equipped(var/mob/user, var/slot)
+2 -2
View File
@@ -33,6 +33,6 @@
changer.voice = null
to_chat(usr, span_notice("You have reset your voice changer's mimicry feature."))
/obj/item/clothing/mask/gas/voice/New()
..()
/obj/item/clothing/mask/gas/voice/Initialize(mapload)
. = ..()
changer = new(src)
@@ -119,8 +119,8 @@
var/gun_type = /obj/item/gun/energy/lasercannon/mounted
var/obj/item/gun/gun
/obj/item/rig_module/mounted/New()
..()
/obj/item/rig_module/mounted/Initialize(mapload)
. = ..()
gun = new gun_type(src)
/obj/item/rig_module/mounted/engage(atom/target)
@@ -237,11 +237,7 @@
interface_name = "contact datajack"
interface_desc = "An induction-powered high-throughput datalink suitable for hacking encrypted networks."
var/list/stored_research
/obj/item/rig_module/datajack/New()
..()
stored_research = list()
var/list/stored_research = list()
/obj/item/rig_module/datajack/engage(atom/target)
@@ -182,8 +182,8 @@
interface_name = "dead man's switch"
interface_desc = "An integrated self-destruct module. When the wearer dies, they vanish in smoke. Do not press this button."
/obj/item/rig_module/self_destruct/New()
..()
/obj/item/rig_module/self_destruct/Initialize(mapload)
. = ..()
src.smoke = new /datum/effect/effect/system/smoke_spread/bad()
src.smoke.attach(src)
+2 -2
View File
@@ -8,8 +8,8 @@
drop_sound = 'sound/items/drop/toolbox.ogg'
pickup_sound = 'sound/items/pickup/toolbox.ogg'
/obj/item/storage/briefcase/crimekit/New()
..()
/obj/item/storage/briefcase/crimekit/Initialize(mapload)
. = ..()
new /obj/item/storage/box/swabs(src)
new /obj/item/storage/box/fingerprints(src)
new /obj/item/reagent_containers/spray/luminol(src)
@@ -4,14 +4,14 @@
w_class = ITEMSIZE_TINY
var/list/evidence = list()
/obj/item/sample/New(var/newloc, var/atom/supplied)
..(newloc)
/obj/item/sample/Initialize(mapload, var/atom/supplied)
. = ..()
if(supplied)
copy_evidence(supplied)
name = "[initial(name)] (\the [supplied])"
/obj/item/sample/print/New(var/newloc, var/atom/supplied)
..(newloc, supplied)
/obj/item/sample/print/Initialize(mapload, supplied)
. = ..()
if(evidence && evidence.len)
icon_state = "fingerprint1"
+6 -6
View File
@@ -6,8 +6,8 @@
can_hold = list(/obj/item/forensics/swab)
storage_slots = 14
/obj/item/storage/box/swabs/New()
..()
/obj/item/storage/box/swabs/Initialize(mapload)
. = ..()
for(var/i = 1 to storage_slots) // Fill 'er up.
new /obj/item/forensics/swab(src)
@@ -17,8 +17,8 @@
storage_slots = 7
can_hold = list(/obj/item/evidencebag)
/obj/item/storage/box/evidence/New()
..()
/obj/item/storage/box/evidence/Initialize(mapload)
. = ..()
for(var/i = 1 to storage_slots)
new /obj/item/evidencebag(src)
@@ -30,7 +30,7 @@
can_hold = list(/obj/item/sample/print)
storage_slots = 14
/obj/item/storage/box/fingerprints/New()
..()
/obj/item/storage/box/fingerprints/Initialize(mapload)
. = ..()
for(var/i = 1 to storage_slots)
new /obj/item/sample/print(src)
+2 -2
View File
@@ -35,9 +35,9 @@ log transactions
var/view_screen = NO_SCREEN
var/datum/effect/effect/system/spark_spread/spark_system
/obj/machinery/atm/New()
..()
/obj/machinery/atm/Initialize(mapload)
machine_id = "[station_name()] RT #[num_financial_terminals++]"
. = ..()
spark_system = new /datum/effect/effect/system/spark_spread
spark_system.set_up(5, 0, src)
spark_system.attach(src)
+2 -2
View File
@@ -40,9 +40,9 @@
<u>Generated By:</u> [held_card.registered_name], [held_card.assignment]<br>
"}
/obj/machinery/account_database/New()
/obj/machinery/account_database/Initialize(mapload)
machine_id = "[station_name()] Acc. DB #[num_financial_terminals++]"
..()
. = ..()
/obj/machinery/account_database/attackby(obj/O, mob/user)
if(!istype(O, /obj/item/card/id))
+2 -1
View File
@@ -25,8 +25,9 @@
// Claim machine ID
/obj/machinery/cash_register/New()
/obj/machinery/cash_register/Initialize(mapload)
machine_id = "[station_name()] RETAIL #[num_financial_terminals++]"
. = ..()
cash_stored = rand(10, 70)*10
transaction_devices += src // Global reference list to be properly set up by /proc/setup_economy()
@@ -100,12 +100,12 @@
price_tag = null
// for /obj/machinery/vending/sovietsoda
/obj/item/reagent_containers/food/drinks/drinkingglass/soda/New()
..()
/obj/item/reagent_containers/food/drinks/drinkingglass/soda/Initialize(mapload)
. = ..()
reagents.add_reagent(REAGENT_ID_SODAWATER, 50)
/obj/item/reagent_containers/food/drinks/drinkingglass/cola/New()
..()
/obj/item/reagent_containers/food/drinks/drinkingglass/cola/Initialize(mapload)
. = ..()
reagents.add_reagent(REAGENT_ID_COLA, 50)
/obj/item/reagent_containers/food/drinks/drinkingglass/shotglass
+2 -2
View File
@@ -7,8 +7,8 @@
icon_state = "card_pack_cardemon"
parentdeck = "cardemon"
/obj/item/pack/cardemon/New()
..()
/obj/item/pack/cardemon/Initialize(mapload)
. = ..()
var/datum/playingcard/P
var/i
for(i=0; i<5; i++)
+2 -2
View File
@@ -8,8 +8,8 @@
/obj/item/deck/egy/New()
..()
/obj/item/deck/egy/Initialize(mapload)
. = ..()
var/datum/playingcard/P
//Universal cards
for(var/i=0; i<=3; i++)
+2 -2
View File
@@ -8,8 +8,8 @@
desc = "An ancient trick-taking card game from a bygone-Earth country. For 2 players!"
icon_state = "deck"
/obj/item/deck/schnapsen/New()
..()
/obj/item/deck/schnapsen/Initialize(mapload)
. = ..()
var/datum/playingcard/P
var/colour
for(var/suit in list("acorns","leaves","bells","hearts"))
+2 -2
View File
@@ -187,8 +187,8 @@
if (last_to_emag)
C.friends = list(last_to_emag)
/obj/machinery/computer/HolodeckControl/New()
..()
/obj/machinery/computer/HolodeckControl/Initialize(mapload)
. = ..()
current_program = powerdown_program
linkedholodeck = locate(projection_area)
if(!linkedholodeck)
+6 -10
View File
@@ -301,11 +301,11 @@
unacidable = TRUE
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))
@@ -431,10 +431,6 @@
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, mob/user)
to_chat(user, "The device is a solid button, there's nothing you can do with it!")
@@ -501,8 +497,8 @@
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)
+1 -4
View File
@@ -29,10 +29,7 @@
var/original_zLevel = 1 // zLevel on which the station map was initialized.
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()
..()
flags |= ON_BORDER // Why? It doesn't help if its not density
flags = ON_BORDER
/obj/machinery/station_map/Initialize(mapload)
. = ..()
+3 -4
View File
@@ -375,12 +375,11 @@
var/list/fruit_icon_cache = list()
/obj/item/reagent_containers/food/snacks/fruit_slice/New(var/newloc, var/datum/seed/S)
..(newloc)
/obj/item/reagent_containers/food/snacks/fruit_slice/Initialize(mapload, var/datum/seed/S)
. = ..()
// Need to go through and make a general image caching controller. Todo.
if(!istype(S))
qdel(src)
return
return INITIALIZE_HINT_QDEL
name = "[S.seed_name] slice"
desc = "A slice of \a [S.seed_name]. Tasty, probably."
+2 -3
View File
@@ -39,8 +39,8 @@
var/lockdown = 0
var/datum/wires/seedstorage/wires = null
/obj/machinery/seed_storage/New()
..()
/obj/machinery/seed_storage/Initialize(mapload)
. = ..()
wires = new(src)
if(!contraband_seeds.len)
contraband_seeds = pick( /// Some form of ambrosia in all lists.
@@ -83,7 +83,6 @@
/obj/item/seeds/deathberryseed = 1 /// Very ow.
)
)
return
/obj/machinery/seed_storage/process()
..()
+2 -2
View File
@@ -23,8 +23,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
@@ -287,8 +287,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)
. = ..()
extended_desc = list()
extended_desc += "Network choices are; "
extended_desc += jointext(networks, ", ")
@@ -7,7 +7,8 @@
density = FALSE
anchored = TRUE
/obj/machinery/mineral/input/New()
/obj/machinery/mineral/input/Initialize(mapload)
. = ..()
icon_state = "blank"
/obj/machinery/mineral/output
@@ -17,5 +18,6 @@
density = FALSE
anchored = TRUE
/obj/machinery/mineral/output/New()
/obj/machinery/mineral/output/Initialize(mapload)
. = ..()
icon_state = "blank"
@@ -10,19 +10,16 @@
var/obj/machinery/mineral/stacking_machine/machine = null
//var/machinedir = SOUTHEAST //This is really dumb, so lets burn it with fire.
/obj/machinery/mineral/stacking_unit_console/New()
..()
spawn(7)
//src.machine = locate(/obj/machinery/mineral/stacking_machine, get_step(src, machinedir)) //No.
src.machine = locate(/obj/machinery/mineral/stacking_machine) in range(5,src)
if (machine)
machine.console = src
else
//Silently failing and causing mappers to scratch their heads while runtiming isn't ideal.
to_world(span_danger("Warning: Stacking machine console at [src.x], [src.y], [src.z] could not find its machine!"))
qdel(src)
/obj/machinery/mineral/stacking_unit_console/Initialize(mapload)
. = ..()
//src.machine = locate(/obj/machinery/mineral/stacking_machine, get_step(src, machinedir)) //No.
src.machine = locate(/obj/machinery/mineral/stacking_machine) in range(5,src)
if (machine)
machine.console = src
else
//Silently failing and causing mappers to scratch their heads while runtiming isn't ideal.
to_world(span_danger("Warning: Stacking machine console at [src.x], [src.y], [src.z] could not find its machine!"))
return INITIALIZE_HINT_QDEL
/obj/machinery/mineral/stacking_unit_console/attack_hand(mob/user)
add_fingerprint(user)
@@ -84,23 +81,19 @@
var/list/stack_paths[0]
var/stack_amt = 50; // Amount to stack before releassing
/obj/machinery/mineral/stacking_machine/New()
..()
/obj/machinery/mineral/stacking_machine/Initialize(mapload)
. = ..()
for(var/obj/item/stack/material/S as anything in (subtypesof(/obj/item/stack/material) - typesof(/obj/item/stack/material/cyborg)))
var/s_matname = initial(S.default_type)
stack_storage[s_matname] = 0
stack_paths[s_matname] = S
spawn( 5 )
for (var/dir in cardinal)
src.input = locate(/obj/machinery/mineral/input, get_step(src, dir))
if(src.input) break
for (var/dir in cardinal)
src.output = locate(/obj/machinery/mineral/output, get_step(src, dir))
if(src.output) break
return
return
for (var/dir in cardinal)
src.input = locate(/obj/machinery/mineral/input, get_step(src, dir))
if(src.input) break
for (var/dir in cardinal)
src.output = locate(/obj/machinery/mineral/output, get_step(src, dir))
if(src.output) break
/obj/machinery/mineral/stacking_machine/proc/toggle_speed(var/forced)
if(forced)
@@ -43,8 +43,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 || !ticker)
cameranet.cameras += src
+5 -3
View File
@@ -313,15 +313,17 @@ var/list/ai_verbs_default = list(
var/mob/living/silicon/ai/powered_ai = null
invisibility = 100
/obj/machinery/ai_powersupply/New(var/mob/living/silicon/ai/ai=null)
powered_ai = ai
/obj/machinery/ai_powersupply/Initialize(mapload)
. = ..()
powered_ai = loc
if(!istype(powered_ai))
return INITIALIZE_HINT_QDEL
powered_ai.psupply = src
if(istype(powered_ai,/mob/living/silicon/ai/announcer)) //Don't try to get a loc for a nullspace announcer mob, just put it into it
forceMove(powered_ai)
else
forceMove(powered_ai.loc)
..()
use_power(1) // Just incase we need to wake up the power system.
/obj/machinery/ai_powersupply/Destroy()
@@ -34,9 +34,6 @@
fabricator_tag = "Upper Level Mining"
drone_type = /mob/living/silicon/robot/drone/mining
/obj/machinery/drone_fabricator/New()
..()
/obj/machinery/drone_fabricator/power_change()
..()
if (stat & NOPOWER)
@@ -253,13 +253,13 @@ var/global/list/grub_machine_overlays = list()
ignored_targets += A
/obj/machinery/abstract_grub_machine/New()
..()
/obj/machinery/abstract_grub_machine/Initialize(mapload)
. = ..()
shuffle_power_usages()
grub = loc
if(!istype(grub))
grub = null
qdel(src)
return INITIALIZE_HINT_QDEL
/obj/machinery/abstract_grub_machine/Destroy()
grub = null
@@ -95,8 +95,8 @@
ntnet_global.add_log("Manual override: Network blacklist cleared.")
. = TRUE
/obj/machinery/ntnet_relay/New()
..()
/obj/machinery/ntnet_relay/Initialize(mapload)
. = ..()
assign_uid()
default_apply_parts()
+2 -2
View File
@@ -28,8 +28,8 @@
level = 1
/obj/machinery/atmospherics/pipe/zpipe/New()
..()
/obj/machinery/atmospherics/pipe/zpipe/Initialize(mapload)
. = ..()
init_dir()
/obj/machinery/atmospherics/pipe/zpipe/init_dir()
@@ -11,9 +11,6 @@
/obj/machinery/disperser/Initialize(mapload)
. = ..()
// TODO - Remove this bit once machines are converted to Initialize
if(ispath(circuit))
circuit = new circuit(src)
default_apply_parts()
/obj/machinery/disperser/examine(mob/user)
+2 -2
View File
@@ -605,8 +605,8 @@ var/datum/planet/virgo4/planet_virgo4 = null
name = "deep ocean"
alpha = 0
/obj/machinery/power/smes/buildable/offmap_spawn/empty/New()
..(1)
/obj/machinery/power/smes/buildable/offmap_spawn/empty/Initialize(mapload)
. = ..()
charge = 0
RCon = TRUE
input_level = input_level_max
+8 -10
View File
@@ -15,16 +15,14 @@
var/obj/machinery/power/am_engine/injector/connected_I = null
var/state = STATE_DEFAULT
/obj/machinery/computer/am_engine/New()
..()
spawn( 24 )
for(var/obj/machinery/power/am_engine/engine/E in world)
if(E.engine_id == src.engine_id)
src.connected_E = E
for(var/obj/machinery/power/am_engine/injector/I in world)
if(I.engine_id == src.engine_id)
src.connected_I = I
return
/obj/machinery/computer/am_engine/Initialize(mapload)
. = ..()
for(var/obj/machinery/power/am_engine/engine/E in world)
if(E.engine_id == src.engine_id)
src.connected_E = E
for(var/obj/machinery/power/am_engine/injector/I in world)
if(I.engine_id == src.engine_id)
src.connected_I = I
/obj/machinery/computer/am_engine/Topic(href, href_list)
if(..())
+5 -9
View File
@@ -29,8 +29,8 @@
var/stored_power = 0//Power to deploy per tick
/obj/machinery/power/am_control_unit/New()
..()
/obj/machinery/power/am_control_unit/Initialize(mapload)
. = ..()
linked_shielding = list()
linked_cores = list()
@@ -227,16 +227,13 @@
for(var/obj/machinery/am_shielding/AMS in linked_shielding)
if(AMS.processing) AMS.shutdown_core()
AMS.control_unit = null
spawn(10)
AMS.controllerscan()
addtimer(CALLBACK(AMS, TYPE_PROC_REF(/obj/machinery/am_shielding, controllerscan)), 1 SECOND, TIMER_DELETE_ME)
linked_shielding = list()
else
for(var/obj/machinery/am_shielding/AMS in linked_shielding)
AMS.update_icon()
spawn(20)
shield_icon_delay = 0
return
VARSET_IN(src, shield_icon_delay, 0, 2 SECONDS)
/obj/machinery/power/am_control_unit/proc/check_core_stability()
@@ -246,8 +243,7 @@
for(var/obj/machinery/am_shielding/AMS in linked_cores)
stored_core_stability += AMS.stability
stored_core_stability/=linked_cores.len
spawn(40)
stored_core_stability_delay = 0
VARSET_IN(src, stored_core_stability_delay, 0, 4 SECONDS)
return
+8 -15
View File
@@ -28,14 +28,10 @@
//injector
/obj/machinery/power/am_engine/injector/New()
..()
spawn( 13 )
var/loc = get_step(src, NORTH)
src.connected = locate(/obj/machinery/power/am_engine/engine, get_step(loc, NORTH))
return
return
/obj/machinery/power/am_engine/injector/Initialize(mapload)
. = ..()
var/link_loc = get_step(src, NORTH)
src.connected = locate(/obj/machinery/power/am_engine/engine, get_step(link_loc, NORTH))
/obj/machinery/power/am_engine/injector/attackby(obj/item/fuel/F, mob/user)
if( (stat & BROKEN) || !connected) return
@@ -72,13 +68,10 @@
//engine
/obj/machinery/power/am_engine/engine/New()
..()
spawn( 7 )
var/loc = get_step(src, SOUTH)
src.connected = locate(/obj/machinery/power/am_engine/injector, get_step(loc, SOUTH))
return
return
/obj/machinery/power/am_engine/engine/Initialize(mapload)
. = ..()
var/link_loc = get_step(src, SOUTH)
src.connected = locate(/obj/machinery/power/am_engine/injector, get_step(link_loc, SOUTH))
/obj/machinery/power/am_engine/engine/proc/engine_go()
+27 -23
View File
@@ -26,45 +26,49 @@
var/efficiency = 1//How many cores this core counts for when doing power processing, phoron in the air and stability could affect this
/obj/machinery/am_shielding/New(loc)
..(loc)
spawn(10)
controllerscan()
return
/obj/machinery/am_shielding/proc/controllerscan(var/priorscan = 0)
/obj/machinery/am_shielding/Initialize(mapload)
. = ..()
if(!istype(loc, /turf))
return INITIALIZE_HINT_QDEL
//Make sure we are the only one here
if(!istype(src.loc, /turf))
for(var/obj/machinery/am_shielding/AMS in loc.contents)
if(AMS == src)
continue
return INITIALIZE_HINT_QDEL
scan_control_shield()
if(!control_unit) // Failed to link
return INITIALIZE_HINT_QDEL
/obj/machinery/am_shielding/proc/controllerscan()
//Make sure we are the only one here
if(!istype(loc, /turf))
qdel(src)
return
for(var/obj/machinery/am_shielding/AMS in loc.contents)
if(AMS == src) continue
spawn(0)
qdel(src)
if(AMS == src)
continue
qdel(src)
return
scan_control_shield()
if(!control_unit) // Failed to link
qdel(src)
/obj/machinery/am_shielding/proc/scan_control_shield()
//Search for shielding first
for(var/obj/machinery/am_shielding/AMS in cardinalrange(src))
if(AMS && AMS.control_unit && link_control(AMS.control_unit))
break
if(!control_unit)//No other guys nearby look for a control unit
for(var/direction in cardinal)
for(var/obj/machinery/power/am_control_unit/AMC in cardinalrange(src))
if(AMC.add_shielding(src))
break
if(!control_unit)
if(!priorscan)
spawn(20)
controllerscan(1)//Last chance
return
spawn(0)
qdel(src)
return
/obj/machinery/am_shielding/Destroy()
if(control_unit) control_unit.remove_shielding(src)
if(processing) shutdown_core()
+5 -7
View File
@@ -190,8 +190,8 @@ GLOBAL_LIST_EMPTY(apcs)
return drained_energy
/obj/machinery/power/apc/New(turf/loc, var/ndir, var/building=0)
..()
/obj/machinery/power/apc/Initialize(mapload, ndir, building)
. = ..()
wires = new(src)
GLOB.apcs += src
@@ -211,12 +211,10 @@ GLOBAL_LIST_EMPTY(apcs)
name = "[area.name] APC"
stat |= MAINT
update_icon()
return
/obj/machinery/power/apc/Initialize(mapload, ndir, building)
. = ..()
if(!building)
init()
return INITIALIZE_HINT_LATELOAD
init()
return INITIALIZE_HINT_LATELOAD
/obj/machinery/power/apc/LateInitialize()
. = ..()
+2 -2
View File
@@ -28,8 +28,8 @@
should_be_mapped = TRUE
/obj/machinery/power/smes/batteryrack/New()
..()
/obj/machinery/power/smes/batteryrack/Initialize(mapload)
. = ..()
add_parts()
RefreshParts()
@@ -12,8 +12,8 @@
var/obj/machinery/power/fusion_core/cur_viewed_device
var/datum/tgui_module/rustcore_monitor/monitor
/obj/machinery/computer/fusion_core_control/New()
..()
/obj/machinery/computer/fusion_core_control/Initialize(mapload)
. = ..()
monitor = new(src)
monitor.core_tag = id_tag
@@ -10,8 +10,8 @@
var/scan_range = 25
var/datum/tgui_module/rustfuel_control/monitor
/obj/machinery/computer/fusion_fuel_control/New()
..()
/obj/machinery/computer/fusion_fuel_control/Initialize(mapload)
. = ..()
monitor = new(src)
monitor.fuel_tag = id_tag
@@ -11,8 +11,8 @@
var/scan_range = 25
var/datum/tgui_module/gyrotron_control/monitor
/obj/machinery/computer/gyrotron_control/New()
..()
/obj/machinery/computer/gyrotron_control/Initialize(mapload)
. = ..()
monitor = new(src)
monitor.gyro_tag = id_tag
monitor.scan_range = scan_range
+2 -2
View File
@@ -31,8 +31,8 @@ var/global/list/light_type_cache = list()
var/cell_connectors = TRUE
/obj/machinery/light_construct/New(var/atom/newloc, var/newdir, var/building = 0, var/datum/frame/frame_types/frame_type, var/obj/machinery/light/fixture = null)
..(newloc)
/obj/machinery/light_construct/Initialize(mapload, var/newdir, var/building = 0, var/datum/frame/frame_types/frame_type, var/obj/machinery/light/fixture = null)
. = ..()
if(fixture)
fixture_type = fixture.type
fixture.transfer_fingerprints_to(src)
+4 -4
View File
@@ -7,13 +7,13 @@
layer = BELOW_MOB_LAYER
//Vorestation addition, to override the New() proc further below, since this is a lamp.
/obj/machinery/light/flamp/New()
..()
/obj/machinery/light/flamp/Initialize(mapload, obj/machinery/light_construct/construct)
layer = initial(layer)
. = ..()
// create a new lighting fixture
/obj/machinery/light/New()
..()
/obj/machinery/light/Initialize(mapload, obj/machinery/light_construct/construct)
. = ..()
//Vorestation addition, so large mobs stop looking stupid in front of lights.
if (dir == SOUTH) // Lights are backwards, SOUTH lights face north (they are on south wall)
layer = ABOVE_MOB_LAYER
-2
View File
@@ -95,8 +95,6 @@
/obj/machinery/power/rtg/Initialize(mapload)
. = ..()
if(ispath(circuit))
circuit = new circuit(src)
default_apply_parts()
connect_to_network()
@@ -25,14 +25,12 @@
var/next_record = 0
var/is_secret_monitor = FALSE
// Proc: New()
// Proc: Initialize(mapload)
// Parameters: None
// Description: Automatically assigns name according to ID tag.
/obj/machinery/power/sensor/New()
..()
auto_set_name()
/obj/machinery/power/sensor/Initialize(mapload)
. = ..()
auto_set_name()
history["supply"] = list()
history["demand"] = list()
@@ -37,8 +37,8 @@
..()
*/
// On creation automatically connects to active sensors. This is delayed to ensure sensors already exist.
/obj/machinery/computer/power_monitor/New()
..()
/obj/machinery/computer/power_monitor/Initialize(mapload)
. = ..()
power_monitor = new(src)
// On user click opens the UI of this computer.
+2 -2
View File
@@ -17,8 +17,8 @@ var/global/list/rad_collectors = list()
var/locked = 0
var/drainratio = 1
/obj/machinery/power/rad_collector/New()
..()
/obj/machinery/power/rad_collector/Initialize(mapload)
. = ..()
rad_collectors += src
/obj/machinery/power/rad_collector/Destroy()
@@ -68,11 +68,10 @@ field_generator power level display
return
/obj/machinery/field_generator/New()
..()
/obj/machinery/field_generator/Initialize(mapload)
. = ..()
fields = list()
connected_gens = list()
return
/obj/machinery/field_generator/process()
if(Varedit_start == 1)
@@ -21,11 +21,11 @@
var/parts = null
var/datum/wires/particle_acc/control_box/wires = null
/obj/machinery/particle_accelerator/control_box/New()
/obj/machinery/particle_accelerator/control_box/Initialize(mapload)
. = ..()
wires = new(src)
connected_parts = list()
update_active_power_usage(initial(active_power_usage) * (strength + 1))
..()
/obj/machinery/particle_accelerator/control_box/Destroy()
if(active)
@@ -109,8 +109,8 @@
var/datum/looping_sound/supermatter/soundloop
/obj/machinery/power/supermatter/New()
..()
/obj/machinery/power/supermatter/Initialize(mapload)
. = ..()
uid = gl_uid++
/obj/machinery/power/supermatter/Initialize(mapload)
+2 -3
View File
@@ -14,11 +14,10 @@
layer = WIRES_LAYER+0.01
/obj/machinery/power/terminal/New()
..()
/obj/machinery/power/terminal/Initialize(mapload)
. = ..()
var/turf/T = src.loc
if(level==1) hide(!T.is_plating())
return
/obj/machinery/power/terminal/Destroy()
if(master)
+2 -2
View File
@@ -29,8 +29,8 @@
else
. += span_warning("It is not secured!")
/obj/machinery/power/tesla_coil/New()
..()
/obj/machinery/power/tesla_coil/Initialize(mapload)
. = ..()
wires = new(src)
/obj/machinery/power/tesla_coil/Initialize(mapload)
@@ -23,8 +23,8 @@
flags = OPENCONTAINER
clicksound = "button"
/obj/machinery/chem_master/New()
..()
/obj/machinery/chem_master/Initialize(mapload)
. = ..()
var/datum/reagents/R = new/datum/reagents(900) //Just a huge random number so the buffer should (probably) never dump your reagents.
reagents = R //There should be a nano ui thingy to warn of this.
R.my_atom = src
+6 -7
View File
@@ -70,17 +70,15 @@ var/global/list/obj/machinery/message_server/message_servers = list()
//Messages having theese tokens will be rejected by server. Case sensitive
var/spamfilter_limit = MESSAGE_SERVER_DEFAULT_SPAM_LIMIT //Maximal amount of tokens
/obj/machinery/message_server/New()
/obj/machinery/message_server/Initialize(mapload)
. = ..()
message_servers += src
decryptkey = GenerateKey()
send_pda_message("System Administrator", "system", "This is an automated message. The messaging system is functioning correctly.")
..()
return
/obj/machinery/message_server/Destroy()
message_servers -= src
..()
return
return ..()
/obj/machinery/message_server/examine(mob/user, distance, infix, suffix)
. = ..()
@@ -263,10 +261,11 @@ var/obj/machinery/blackbox_recorder/blackbox
var/list/datum/feedback_variable/feedback = new()
//Only one can exist in the world!
/obj/machinery/blackbox_recorder/New()
/obj/machinery/blackbox_recorder/Initialize(mapload)
. = ..()
if(blackbox)
if(istype(blackbox,/obj/machinery/blackbox_recorder))
qdel(src)
return INITIALIZE_HINT_QDEL
blackbox = src
/obj/machinery/blackbox_recorder/Destroy()
+2 -2
View File
@@ -104,8 +104,8 @@ won't update every console in existence) but it's more of a hassle to do. Also,
C.files.AddDesign2Known(D)
C.files.RefreshResearch()
/obj/machinery/computer/rdconsole/New()
..()
/obj/machinery/computer/rdconsole/Initialize(mapload)
. = ..()
files = new /datum/research(src) //Setup the research data holder.
if(!id)
for(var/obj/machinery/r_n_d/server/centcom/S in machines)
+4 -4
View File
@@ -224,8 +224,8 @@
var/burn_value = 0 //Setting these to 0, if resleeving as organic with unupgraded sleevers gives them no damage, resleeving synths with unupgraded synthfabs should not give them potentially 105 damage.
var/brute_value = 0
/obj/machinery/transhuman/synthprinter/New()
..()
/obj/machinery/transhuman/synthprinter/Initialize(mapload)
. = ..()
component_parts = list()
component_parts += new /obj/item/stock_parts/matter_bin(src)
component_parts += new /obj/item/stock_parts/scanning_module(src)
@@ -461,8 +461,8 @@
var/sleevecards = 2
/obj/machinery/transhuman/resleever/New()
..()
/obj/machinery/transhuman/resleever/Initialize(mapload)
. = ..()
component_parts = list()
component_parts += new /obj/item/stock_parts/scanning_module(src)
component_parts += new /obj/item/stock_parts/scanning_module(src)
+3 -3
View File
@@ -28,16 +28,16 @@
qdel(src)
return
/obj/machinery/shield/New()
/obj/machinery/shield/Initialize(mapload)
src.set_dir(pick(1,2,3,4))
..()
. = ..()
update_nearby_tiles(need_rebuild=1)
/obj/machinery/shield/Destroy()
opacity = 0
density = FALSE
update_nearby_tiles()
..()
. = ..()
/obj/machinery/shield/attackby(obj/item/W as obj, mob/user as mob)
if(!istype(W)) return
+5 -6
View File
@@ -151,8 +151,7 @@
var/field_dir = get_dir(T2,get_step(T2, NSEW))
T = get_step(T2, NSEW)
T2 = T
var/obj/machinery/shieldwall/CF = new/obj/machinery/shieldwall/(src, G) //(ref to this gen, ref to connected gen)
CF.loc = T
var/obj/machinery/shieldwall/CF = new/obj/machinery/shieldwall(T, src, G) //(ref to this gen, ref to connected gen)
CF.set_dir(field_dir)
@@ -239,19 +238,19 @@
var/power_usage = 2500 //how much power it takes to sustain the shield
var/generate_power_usage = 7500 //how much power it takes to start up the shield
/obj/machinery/shieldwall/New(var/obj/machinery/shieldwallgen/A, var/obj/machinery/shieldwallgen/B)
..()
/obj/machinery/shieldwall/Initialize(mapload, var/obj/machinery/shieldwallgen/A, var/obj/machinery/shieldwallgen/B)
. = ..()
update_nearby_tiles()
src.gen_primary = A
src.gen_secondary = B
if(A && B && A.active && B.active)
if(istype(A) && istype(B) && A.active && B.active)
needs_power = 1
if(prob(50))
A.storedpower -= generate_power_usage
else
B.storedpower -= generate_power_usage
else
qdel(src) //need at least two generator posts
return INITIALIZE_HINT_QDEL
/obj/machinery/shieldwall/Destroy()
update_nearby_tiles()
@@ -16,9 +16,6 @@
/obj/machinery/shield_diffuser/Initialize(mapload)
. = ..()
// TODO - Remove this bit once machines are converted to Initialize
if(ispath(circuit))
circuit = new circuit(src)
default_apply_parts()
var/turf/T = get_turf(src)
@@ -54,9 +54,6 @@
. = ..()
if(!wires)
wires = new(src)
// TODO - Remove this bit once machines are converted to Initialize
if(ispath(circuit))
circuit = new circuit(src)
default_apply_parts()
connect_to_network()
+2 -2
View File
@@ -11,8 +11,8 @@
active_power_usage = 5000
var/efficiency
/obj/machinery/telepad/New()
..()
/obj/machinery/telepad/Initialize(mapload)
. = ..()
component_parts = list()
component_parts += new /obj/item/bluespace_crystal(src)
component_parts += new /obj/item/stock_parts/capacitor(src)
@@ -33,8 +33,8 @@
//So if xenoarch isn't careful and is just shoving items willy-nilly without taking the proper precautions they can end up in a bit of trouble!
/obj/machinery/replicator/vore/New() //This replicator turns people into mobs!
..() //TODO: Someone can replace the 'alien' interface with something neater sometime. It is simply out of my abilities at the current moment.
/obj/machinery/replicator/vore/Initialize(mapload) //This replicator turns people into mobs!
. = ..() //TODO: Someone can replace the 'alien' interface with something neater sometime. It is simply out of my abilities at the current moment.
for(var/i=0, i<quantity, i++)
var/background = pick("yellow","purple","green","blue","red","orange","white")
@@ -385,8 +385,8 @@
) // Currently: 3 gloves, 5 undersuits, 3 oversuits, 5 plushies, 5 headwear, 7 shoes, 7 misc. = 35
//Fishing hat was going to be added, but it was simply too powerful for this world.
/obj/machinery/replicator/clothing/New() //The specific thing about the VORE replicator is that it will only contain obj/items. Only things that can be picked up, used, and worn!
..() //TODO: Someone can replace the 'alien' interface with something neater sometime. It is simply out of my abilities at the current moment.
/obj/machinery/replicator/clothing/Initialize(mapload) //The specific thing about the VORE replicator is that it will only contain obj/items. Only things that can be picked up, used, and worn!
. = ..() //TODO: Someone can replace the 'alien' interface with something neater sometime. It is simply out of my abilities at the current moment.
for(var/i=0, i<quantity, i++)
var/background = pick("yellow","purple","green","blue","red","orange","white")
@@ -43,8 +43,8 @@
var/t_left_radspike = 0
var/rad_shield = 0
/obj/machinery/radiocarbon_spectrometer/New()
..()
/obj/machinery/radiocarbon_spectrometer/Initialize(mapload)
. = ..()
create_reagents(500)
coolant_reagents_purity[REAGENT_ID_WATER] = 0.5
coolant_reagents_purity[REAGENT_ID_ICECOFFEE] = 0.6