diff --git a/code/__DEFINES/dcs/signals.dm b/code/__DEFINES/dcs/signals.dm index e3fca96fcd0..b1bd2a5ad23 100644 --- a/code/__DEFINES/dcs/signals.dm +++ b/code/__DEFINES/dcs/signals.dm @@ -38,6 +38,14 @@ //End positions #define COMPONENT_EXNAME_CHANGED 1 */ +///from base of atom/update_icon(): () +#define COMSIG_ATOM_UPDATE_ICON "atom_update_icon" + #define COMSIG_ATOM_NO_UPDATE_ICON_STATE (1<<0) + #define COMSIG_ATOM_NO_UPDATE_OVERLAYS (1<<1) +///from base of atom/update_overlays(): (list/new_overlays) +#define COMSIG_ATOM_UPDATE_OVERLAYS "atom_update_overlays" +///from base of atom/update_icon(): (signalOut, did_anything) +#define COMSIG_ATOM_UPDATED_ICON "atom_updated_icon" #define COMSIG_ATOM_ENTERED "atom_entered" //from base of atom/Entered(): (atom/movable/entering, /atom) #define COMSIG_ATOM_EXIT "atom_exit" //from base of atom/Exit(): (/atom/movable/exiting, /atom/newloc) #define COMPONENT_ATOM_BLOCK_EXIT 1 @@ -221,7 +229,6 @@ #define COMSIG_OBJ_DECONSTRUCT "obj_deconstruct" //from base of obj/deconstruct(): (disassembled) #define COMSIG_OBJ_SETANCHORED "obj_setanchored" //called in /obj/structure/setAnchored(): (value) #define COMSIG_OBJ_DEFAULT_UNFASTEN_WRENCH "obj_default_unfasten_wrench" //from base of code/game/machinery -#define COMSIG_OBJ_UPDATE_ICON "obj_update_icon" //Called by obj to itself whenever update_icon is run. Useful for containers that want to detect this change obj/item signals */ diff --git a/code/controllers/subsystems/vis_overlays.dm b/code/controllers/subsystems/vis_overlays.dm new file mode 100644 index 00000000000..b0e5d6c6896 --- /dev/null +++ b/code/controllers/subsystems/vis_overlays.dm @@ -0,0 +1,80 @@ +SUBSYSTEM_DEF(vis_overlays) + name = "Vis contents overlays" + wait = 1 MINUTES + priority = FIRE_PRIORITY_VIS + init_order = INIT_ORDER_VIS + + var/list/vis_overlay_cache + var/list/unique_vis_overlays + var/list/currentrun + +/datum/controller/subsystem/vis_overlays/Initialize() + vis_overlay_cache = list() + unique_vis_overlays = list() + return ..() + +/datum/controller/subsystem/vis_overlays/fire(resumed = FALSE) + if(!resumed) + currentrun = vis_overlay_cache.Copy() + var/list/current_run = currentrun + + while(current_run.len) + var/key = current_run[current_run.len] + var/obj/effect/overlay/vis/overlay = current_run[key] + current_run.len-- + if(!overlay.unused && !length(overlay.vis_locs)) + overlay.unused = world.time + else if(overlay.unused && overlay.unused + overlay.cache_expiration < world.time) + vis_overlay_cache -= key + qdel(overlay) + if(MC_TICK_CHECK) + return + +//the "thing" var can be anything with vis_contents which includes images +/datum/controller/subsystem/vis_overlays/proc/add_vis_overlay(atom/movable/thing, icon, iconstate, layer, plane, dir, alpha = 255, add_appearance_flags = NONE, unique = FALSE) + var/obj/effect/overlay/vis/overlay + if(!unique) + . = "[icon]|[iconstate]|[layer]|[plane]|[dir]|[alpha]|[add_appearance_flags]" + overlay = vis_overlay_cache[.] + if(!overlay) + overlay = _create_new_vis_overlay(icon, iconstate, layer, plane, dir, alpha, add_appearance_flags) + vis_overlay_cache[.] = overlay + else + overlay.unused = 0 + else + overlay = _create_new_vis_overlay(icon, iconstate, layer, plane, dir, alpha, add_appearance_flags) + overlay.cache_expiration = -1 + var/cache_id = "\ref[overlay]@{[world.time]}" + unique_vis_overlays += overlay + vis_overlay_cache[cache_id] = overlay + . = overlay + thing.vis_contents += overlay + + if(!isatom(thing)) // Automatic rotation is not supported on non atoms + return overlay + + if(!thing.managed_vis_overlays) + thing.managed_vis_overlays = list(overlay) + else + thing.managed_vis_overlays += overlay + return overlay + +/datum/controller/subsystem/vis_overlays/proc/_create_new_vis_overlay(icon, iconstate, layer, plane, dir, alpha, add_appearance_flags) + var/obj/effect/overlay/vis/overlay = new + overlay.icon = icon + overlay.icon_state = iconstate + overlay.layer = layer + overlay.plane = plane + overlay.dir = dir + overlay.alpha = alpha + overlay.appearance_flags |= add_appearance_flags + return overlay + + +/datum/controller/subsystem/vis_overlays/proc/remove_vis_overlay(atom/movable/thing, list/overlays) + thing.vis_contents -= overlays + if(!isatom(thing)) + return + thing.managed_vis_overlays -= overlays + if(!length(thing.managed_vis_overlays)) + thing.managed_vis_overlays = null diff --git a/code/datums/repositories/decls.dm b/code/datums/repositories/decls.dm index e2dbcd4e036..d87e5e62901 100644 --- a/code/datums/repositories/decls.dm +++ b/code/datums/repositories/decls.dm @@ -35,5 +35,6 @@ .[decl_type] = get_decl(decl_type) /decls/Destroy() + . = ..() stack_trace("Prevented attempt to delete a decl instance: [log_info_line(src)]") return QDEL_HINT_LETMELIVE // Prevents Decl destruction diff --git a/code/game/antagonist/antagonist.dm b/code/game/antagonist/antagonist.dm index 9b035f46f11..3ae9bb7f71e 100644 --- a/code/game/antagonist/antagonist.dm +++ b/code/game/antagonist/antagonist.dm @@ -178,7 +178,7 @@ /datum/antagonist/proc/draft_antagonist(var/datum/mind/player) //Check if the player can join in this antag role, or if the player has already been given an antag role. - if(!can_become_antag(player) || player.assigned_role in roundstart_restricted) + if(!can_become_antag(player) || (player.assigned_role in roundstart_restricted)) log_debug("[player.key] was selected for [role_text] by lottery, but is not allowed to be that role.") return 0 if(player.special_role) diff --git a/code/game/antagonist/station/rogue_ai.dm b/code/game/antagonist/station/rogue_ai.dm index 60a852d4aae..09b4f66b425 100644 --- a/code/game/antagonist/station/rogue_ai.dm +++ b/code/game/antagonist/station/rogue_ai.dm @@ -54,7 +54,7 @@ var/datum/antagonist/rogue_ai/malf if(!istype(A)) log_world("Non-AI mob designated malf AI! Report this.") to_chat(world, "##ERROR: Non-AI mob designated malf AI! Report this.") - return 0 + return A.setup_for_malf() A.laws = new /datum/ai_laws/nanotrasen/malfunction diff --git a/code/game/atom_movement.dm b/code/game/atom_movement.dm index 0157c8b34a2..5a9fb1aa41e 100644 --- a/code/game/atom_movement.dm +++ b/code/game/atom_movement.dm @@ -46,6 +46,7 @@ /// Returns true or false to allow the mover to move through src /atom/proc/CanAllowThrough(atom/movable/mover, turf/target) - SHOULD_CALL_PARENT(TRUE) + // these two are temporary for now. + // SHOULD_CALL_PARENT(TRUE) // SHOULD_BE_PURE(TRUE) return !density diff --git a/code/game/atoms.dm b/code/game/atoms.dm index 60f10d7114c..25f20f23124 100644 --- a/code/game/atoms.dm +++ b/code/game/atoms.dm @@ -18,6 +18,18 @@ var/list/atom_colours //used to store the different colors on an atom //its inherent color, the colored paint applied on it, special color effect etc... +/* new overlay system + /// a very temporary list of overlays to remove + var/list/remove_overlays + /// a very temporary list of overlays to add + var/list/add_overlays +*/ + + ///vis overlays managed by SSvis_overlays to automaticaly turn them like other overlays + var/list/managed_vis_overlays + ///overlays managed by [update_overlays][/atom/proc/update_overlays] to prevent removing overlays that weren't added by the same proc + var/list/managed_overlays + /// The orbiter comopnent if we're being orbited. var/datum/component/orbiter/orbiters ///Chemistry. @@ -27,14 +39,6 @@ // replaced by OPENCONTAINER flags and atom/proc/is_open_container() ///Chemistry. -/* New overlay system - var/list/priority_overlays //overlays that should remain on top and not normally removed when using cut_overlay functions, like c4. - var/list/remove_overlays // a very temporary list of overlays to remove - var/list/add_overlays // a very temporary list of overlays to add - - var/list/managed_vis_overlays //vis overlays managed by SSvis_overlays to automaticaly turn them like other overlays -*/ - //Detective Work, used for the duplicate data points kept in the scanners var/list/original_atom @@ -218,6 +222,41 @@ return distance == -1 || (get_dist(src, user) <= distance) +/// Updates the icon of the atom +/atom/proc/update_icon() + SIGNAL_HANDLER + + var/signalOut = SEND_SIGNAL(src, COMSIG_ATOM_UPDATE_ICON) + . = FALSE + + if(!(signalOut & COMSIG_ATOM_NO_UPDATE_ICON_STATE)) + update_icon_state() + . = TRUE + + if(!(signalOut & COMSIG_ATOM_NO_UPDATE_OVERLAYS)) + if(LAZYLEN(managed_vis_overlays)) + SSvis_overlays.remove_vis_overlay(src, managed_vis_overlays) + + var/list/new_overlays = update_overlays() + if(managed_overlays) + cut_overlay(managed_overlays) + managed_overlays = null + if(length(new_overlays)) + managed_overlays = new_overlays + add_overlay(new_overlays) + . = TRUE + + SEND_SIGNAL(src, COMSIG_ATOM_UPDATED_ICON, signalOut, .) + +/// Updates the icon state of the atom +/atom/proc/update_icon_state() + +/// Updates the overlays of the atom +/atom/proc/update_overlays() + SHOULD_CALL_PARENT(TRUE) + . = list() + SEND_SIGNAL(src, COMSIG_ATOM_UPDATE_OVERLAYS, .) + // called by mobs when e.g. having the atom as their machine, pulledby, loc (AKA mob being inside the atom) or buckled var set. // see code/modules/mob/mob_movement.dm for more. /atom/proc/relaymove() diff --git a/code/game/dna/genes/gene.dm b/code/game/dna/genes/gene.dm index e52cd4e6c03..6aea7975f58 100644 --- a/code/game/dna/genes/gene.dm +++ b/code/game/dna/genes/gene.dm @@ -27,7 +27,7 @@ * Is the gene active in this mob's DNA? */ /datum/dna/gene/proc/is_active(var/mob/M) - return M.active_genes && type in M.active_genes + return M.active_genes && (type in M.active_genes) // Return 1 if we can activate. // HANDLE MUTCHK_FORCED HERE! diff --git a/code/game/gamemodes/cult/narsie.dm b/code/game/gamemodes/cult/narsie.dm index 5de738311ee..fe5c2234f1b 100644 --- a/code/game/gamemodes/cult/narsie.dm +++ b/code/game/gamemodes/cult/narsie.dm @@ -16,13 +16,13 @@ var/global/list/narsie_list = list() consume_range = 3 //How many tiles out do we eat -/obj/singularity/narsie/New() - ..() +/obj/singularity/narsie/Initialize(mapload) + . = ..() narsie_list.Add(src) /obj/singularity/narsie/Destroy() narsie_list.Remove(src) - ..() + return ..() /obj/singularity/narsie/large name = "Nar-Sie" diff --git a/code/game/gamemodes/events/dust.dm b/code/game/gamemodes/events/dust.dm index c6869caeb6b..a0032cd1d0a 100644 --- a/code/game/gamemodes/events/dust.dm +++ b/code/game/gamemodes/events/dust.dm @@ -89,26 +89,24 @@ The "dust" will damage the hull of the station causin minor hull breaches. qdel(src) /obj/effect/space_dust/Bump(atom/A) - spawn(0) - if(prob(50)) - for(var/mob/M in range(10, src)) - if(!M.stat && !istype(M, /mob/living/silicon/ai)) - shake_camera(M, 3, 1) - if (A) - playsound(src.loc, 'sound/effects/meteorimpact.ogg', 40, 1) + . = ..() + if(prob(50)) + for(var/mob/M in range(10, src)) + if(!M.stat && !istype(M, /mob/living/silicon/ai)) + shake_camera(M, 3, 1) + if (A) + playsound(src.loc, 'sound/effects/meteorimpact.ogg', 40, 1) - if(ismob(A)) - A.ex_act(strength) // This should work for now I guess - else if(!istype(A,/obj/machinery/power/emitter) && !istype(A,/obj/machinery/field_generator)) // Protect the singularity from getting released every round! - A.ex_act(strength) // Changing emitter/field gen ex_act would make it immune to bombs and C4 - - life-- - if(life <= 0) - walk(src,0) - qdel(src) - return 0 - return + if(ismob(A)) + A.ex_act(strength) // This should work for now I guess + else if(!istype(A,/obj/machinery/power/emitter) && !istype(A,/obj/machinery/field_generator)) // Protect the singularity from getting released every round! + A.ex_act(strength) // Changing emitter/field gen ex_act would make it immune to bombs and C4 + life-- + if(life <= 0) + walk(src,0) + qdel(src) + return /obj/effect/space_dust/Bumped(atom/A) Bump(A) diff --git a/code/game/gamemodes/events/holidays/Holidays.dm b/code/game/gamemodes/events/holidays/Holidays.dm index 729ab80d6a2..cde50070c32 100644 --- a/code/game/gamemodes/events/holidays/Holidays.dm +++ b/code/game/gamemodes/events/holidays/Holidays.dm @@ -127,7 +127,7 @@ var/global/list/Holiday = list() //Holidays are lists now, so we can have more t if(8) //Aug switch(DD) // if(10) -// Holiday["S'randarr's Day"] = "A Tajaran holiday that occurs on the longest day of the year in summer, \ +// Holiday["S'randarr's Day"] = "A Tajaran holiday that occurs on the longest day of the year in summer, // on Ahdomai. It is named after the Tajaran deity of Light, and huge celebrations are common." //VOREStation Add - Of course we need this. if(8) @@ -168,9 +168,9 @@ var/global/list/Holiday = list() //Holidays are lists now, so we can have more t community, focusing on the positive power and the common thread of kindness which binds humanity and \ friends together." // if(28) //Space thanksgiving. -// Holiday["Appreciation Day"] = "Originally an old holiday from Earth, Appreciation Day follows many of the \ - traditions that its predecessor did, such as having a large feast (turkey often included), gathering with family, and being thankful \ - for what one has in life." +// Holiday["Appreciation Day"] = "Originally an old holiday from Earth, Appreciation Day follows many of the +// traditions that its predecessor did, such as having a large feast (turkey often included), gathering with family, and being thankful +// for what one has in life." if(28 > DD > 20) if(time2text(world.timeofday, "Day") == "Thursday") Holiday["Thanksgiving"] = "Originally an old holiday from Earth, Thanksgiving follows many of the \ diff --git a/code/game/machinery/OpTable.dm b/code/game/machinery/OpTable.dm index 4f328a2ead4..9cac740a730 100644 --- a/code/game/machinery/OpTable.dm +++ b/code/game/machinery/OpTable.dm @@ -14,8 +14,8 @@ var/strapped = 0.0 var/obj/machinery/computer/operating/computer = null -/obj/machinery/optable/New() - ..() +/obj/machinery/optable/Initialize(mapload) + . = ..() for(var/direction in list(NORTH,EAST,SOUTH,WEST)) computer = locate(/obj/machinery/computer/operating, get_step(src, direction)) if(computer) diff --git a/code/game/machinery/atmoalter/clamp.dm b/code/game/machinery/atmoalter/clamp.dm deleted file mode 100644 index 318145c2292..00000000000 --- a/code/game/machinery/atmoalter/clamp.dm +++ /dev/null @@ -1,154 +0,0 @@ -//Good luck. --BlueNexus - -//Static version of the clamp -/obj/machinery/clamp - name = "stasis clamp" - desc = "A magnetic clamp which can halt the flow of gas in a pipe, via a localised stasis field." - description_info = "Click-dragging this to yourself while adjacent will attempt to remove it from the pipe." - icon = 'icons/atmos/clamp.dmi' - icon_state = "pclamp0" - anchored = 1.0 - var/obj/machinery/atmospherics/pipe/simple/target = null - var/open = 1 - - var/datum/pipe_network/network_node1 - var/datum/pipe_network/network_node2 - -/obj/machinery/clamp/New(loc, var/obj/machinery/atmospherics/pipe/simple/to_attach = null) - ..() - if(istype(to_attach)) - target = to_attach - else - target = locate(/obj/machinery/atmospherics/pipe/simple) in loc - if(target) - update_networks() - dir = target.dir - return 1 - -/obj/machinery/clamp/proc/update_networks() - if(!target) - return - else - var/obj/machinery/atmospherics/pipe/node1 = target.node1 - var/obj/machinery/atmospherics/pipe/node2 = target.node2 - if(istype(node1)) - var/datum/pipeline/P1 = node1.parent - network_node1 = P1.network - if(istype(node2)) - var/datum/pipeline/P2 = node2.parent - network_node2 = P2.network - -/obj/machinery/clamp/attack_hand(var/mob/user) - if(!target) - return FALSE - if(!open) - open() - else - close() - to_chat(user, "You turn [open ? "off" : "on"] \the [src]") - return TRUE - -/obj/machinery/clamp/Destroy() - if(!open) - spawn(-1) open() - . = ..() - -/obj/machinery/clamp/proc/open() - if(open || !target) - return 0 - - target.build_network() - - - if(network_node1&&network_node2) - network_node1.merge(network_node2) - network_node2 = network_node1 - - if(network_node1) - network_node1.update = 1 - else if(network_node2) - network_node2.update = 1 - - update_networks() - - open = 1 - icon_state = "pclamp0" - target.in_stasis = 0 - return 1 - -/obj/machinery/clamp/proc/close() - if(!open) - return 0 - - qdel(target.parent) - - if(network_node1) - qdel(network_node1) - if(network_node2) - qdel(network_node2) - - var/obj/machinery/atmospherics/pipe/node1 = null - var/obj/machinery/atmospherics/pipe/node2 = null - - if(target.node1) - target.node1.build_network() - node1 = target.node1 - if(target.node2) - target.node2.build_network() - node2 = target.node2 - if(istype(node1) && node1.parent) - var/datum/pipeline/P1 = node1.parent - P1.build_pipeline(node1) - qdel(P1) - if(istype(node2) && node2.parent) - var/datum/pipeline/P2 = node2.parent - P2.build_pipeline(node2) - qdel(P2) -// P1.build_network() -// P2.build_network() - - open = 0 - icon_state = "pclamp1" - target.in_stasis = 1 - - return 1 - -/obj/machinery/clamp/MouseDrop(obj/over_object as obj) - if(!usr) - return - - if(open && over_object == usr && Adjacent(usr)) - to_chat(usr, "You begin to remove \the [src]...") - if (do_after(usr, 30, src)) - to_chat(usr, "You have removed \the [src].") - var/obj/item/clamp/C = new/obj/item/clamp(src.loc) - C.forceMove(usr.loc) - if(ishuman(usr)) - usr.put_in_hands(C) - qdel(src) - return - else - to_chat(usr, "You can't remove \the [src] while it's active!") - -/obj/item/clamp - name = "stasis clamp" - desc = "A magnetic clamp which can halt the flow of gas in a pipe, via a localised stasis field." - icon = 'icons/atmos/clamp.dmi' - icon_state = "pclamp0" - origin_tech = list(TECH_ENGINEERING = 4, TECH_MAGNET = 4) - -/obj/item/clamp/afterattack(var/atom/A, mob/user as mob, proximity) - if(!proximity) - return - - if (istype(A, /obj/machinery/atmospherics/pipe/simple)) - to_chat(user, "You begin to attach \the [src] to \the [A]...") - var/C = locate(/obj/machinery/clamp) in get_turf(A) - if (do_after(user, 30, src) && !C) - if(!user.unEquip(src)) - return - to_chat(user, "You have attached \the [src] to \the [A].") - new/obj/machinery/clamp(A.loc, A) - qdel(src) - if(C) - to_chat(user, "\The [C] is already attached to the pipe at this location!") diff --git a/code/game/machinery/camera/camera.dm b/code/game/machinery/camera/camera.dm index 9265d21b48c..e12b246b930 100644 --- a/code/game/machinery/camera/camera.dm +++ b/code/game/machinery/camera/camera.dm @@ -7,7 +7,7 @@ idle_power_usage = 5 active_power_usage = 10 plane = MOB_PLANE - layer = ABOVE_MOB_LAYER + layer = BELOW_MOB_LAYER var/list/network = list(NETWORK_DEFAULT) var/c_tag = null @@ -58,7 +58,9 @@ M.machine_visual = null return 1 -/obj/machinery/camera/New() +/obj/machinery/camera/Initialize(mapload) + if (dir == NORTH) + layer = ABOVE_MOB_LAYER wires = new(src) assembly = new(src) assembly.state = 4 @@ -81,7 +83,7 @@ if(!c_tag) var/area/A = get_area(src) c_tag = "[A ? A.name : "Unknown"] #[rand(111,999)]" - ..() + return ..() // VOREStation Edit End /obj/machinery/camera/Destroy() diff --git a/code/game/machinery/camera/camera_vr.dm b/code/game/machinery/camera/camera_vr.dm deleted file mode 100644 index 1111b2773ca..00000000000 --- a/code/game/machinery/camera/camera_vr.dm +++ /dev/null @@ -1,7 +0,0 @@ -/obj/machinery/camera - layer = BELOW_MOB_LAYER - -/obj/machinery/camera/New() - ..() - if (dir == NORTH) - layer = ABOVE_MOB_LAYER \ No newline at end of file diff --git a/code/game/machinery/cloning.dm b/code/game/machinery/cloning.dm index a88d9c8f4c3..b6ed2d46b41 100644 --- a/code/game/machinery/cloning.dm +++ b/code/game/machinery/cloning.dm @@ -524,8 +524,8 @@ buf.dna.SE=new_SE buf.dna.SetSEValueRange(MONKEYBLOCK,0xDAC, 0xFFF) -/obj/item/disk/data/New() - ..() +/obj/item/disk/data/Initialize(mapload) + . = ..() var/diskcolor = pick(0,1,2) icon_state = "datadisk[diskcolor]" diff --git a/code/game/machinery/computer/Operating.dm b/code/game/machinery/computer/Operating.dm index 09b873c0d98..e888a361257 100644 --- a/code/game/machinery/computer/Operating.dm +++ b/code/game/machinery/computer/Operating.dm @@ -10,8 +10,8 @@ var/mob/living/carbon/human/victim = null var/obj/machinery/optable/table = null -/obj/machinery/computer/operating/New() - ..() +/obj/machinery/computer/operating/Initialize(mapload) + . = ..() for(var/direction in list(NORTH,EAST,SOUTH,WEST)) table = locate(/obj/machinery/optable, get_step(src, direction)) if (table) @@ -69,4 +69,4 @@ usr.set_machine(src) src.add_fingerprint(usr) - SSnanoui.update_uis(src) \ No newline at end of file + SSnanoui.update_uis(src) diff --git a/code/game/machinery/computer/RCON_Console.dm b/code/game/machinery/computer/RCON_Console.dm index 9543f3e75c2..0def98e28af 100644 --- a/code/game/machinery/computer/RCON_Console.dm +++ b/code/game/machinery/computer/RCON_Console.dm @@ -15,14 +15,13 @@ var/current_tag = null var/datum/nano_module/rcon/rcon -/obj/machinery/computer/rcon/New() - ..() +/obj/machinery/computer/rcon/Initialize(mapload) + . = ..() rcon = new(src) /obj/machinery/computer/rcon/Destroy() - qdel(rcon) - rcon = null - ..() + QDEL_NULL(rcon) + return ..() // Proc: attack_hand() // Parameters: 1 (user - Person which clicked this computer) @@ -40,4 +39,4 @@ /obj/machinery/computer/rcon/update_icon() ..() if(!(stat & (NOPOWER|BROKEN))) - overlays += image(icon, "ai-fixer-empty", overlay_layer) //VOREStation Edit \ No newline at end of file + overlays += image(icon, "ai-fixer-empty", overlay_layer) //VOREStation Edit diff --git a/code/game/machinery/computer/aifixer.dm b/code/game/machinery/computer/aifixer.dm index 591c7dd6542..4424db2f09e 100644 --- a/code/game/machinery/computer/aifixer.dm +++ b/code/game/machinery/computer/aifixer.dm @@ -8,8 +8,8 @@ var/mob/living/silicon/ai/occupant = null var/active = 0 -/obj/machinery/computer/aifixer/New() - ..() +/obj/machinery/computer/aifixer/Initialize(mapload) + . = ..() update_icon() /obj/machinery/computer/aifixer/proc/load_ai(var/mob/living/silicon/ai/transfer, var/obj/item/aicard/card, var/mob/user) diff --git a/code/game/machinery/computer/arcade.dm b/code/game/machinery/computer/arcade.dm index 2c3dae45a0c..6d6464e7bd4 100644 --- a/code/game/machinery/computer/arcade.dm +++ b/code/game/machinery/computer/arcade.dm @@ -35,8 +35,8 @@ /obj/item/toy/stickhorse = 2 ) -/obj/machinery/computer/arcade/New() - ..() +/obj/machinery/computer/arcade/Initialize(mapload) + . = ..() // If it's a generic arcade machine, pick a random arcade // circuit board for it and make the new machine if(!circuit) @@ -102,8 +102,8 @@ var/blocked = 0 //Player cannot attack/heal while set var/turtle = 0 -/obj/machinery/computer/arcade/battle/New() - ..() +/obj/machinery/computer/arcade/battle/Initialize(mapload) + . = ..() var/name_action var/name_part1 var/name_part2 diff --git a/code/game/machinery/computer/atmos_control.dm b/code/game/machinery/computer/atmos_control.dm index 62076c915e3..98387547b73 100644 --- a/code/game/machinery/computer/atmos_control.dm +++ b/code/game/machinery/computer/atmos_control.dm @@ -14,9 +14,6 @@ var/list/monitored_alarm_ids = null var/datum/nano_module/atmos_control/atmos_control -/obj/machinery/computer/atmoscontrol/New() - ..() - /obj/machinery/computer/atmoscontrol/laptop name = "Atmospherics Laptop" desc = "A cheap laptop." diff --git a/code/game/machinery/computer/camera.dm b/code/game/machinery/computer/camera.dm index 2a3cfe613ac..3e9593da811 100644 --- a/code/game/machinery/computer/camera.dm +++ b/code/game/machinery/computer/camera.dm @@ -14,10 +14,10 @@ var/cache_id = 0 circuit = /obj/item/circuitboard/security -/obj/machinery/computer/security/New() +/obj/machinery/computer/security/Initialize(mapload) if(!network) network = GLOB.using_map.station_networks.Copy() - ..() + . = ..() if(network.len) current_network = network[1] @@ -280,10 +280,10 @@ circuit = /obj/item/circuitboard/security/engineering light_color = "#FAC54B" -/obj/machinery/computer/security/engineering/New() +/obj/machinery/computer/security/engineering/Initialize(mapload) if(!network) network = engineering_networks.Copy() - ..() + . = ..() /obj/machinery/computer/security/nuclear name = "head mounted camera monitor" @@ -292,6 +292,6 @@ network = list(NETWORK_MERCENARY) circuit = null -/obj/machinery/computer/security/nuclear/New() - ..() - req_access = list(150) \ No newline at end of file +/obj/machinery/computer/security/nuclear/Initialize(mapload) + . = ..() + req_access = list(150) diff --git a/code/game/machinery/computer/computer.dm b/code/game/machinery/computer/computer.dm index 8f50baa4be1..ea9e4999ec0 100644 --- a/code/game/machinery/computer/computer.dm +++ b/code/game/machinery/computer/computer.dm @@ -17,11 +17,8 @@ clicksound = "keyboard" -/obj/machinery/computer/New() - overlay_layer = layer - ..() - /obj/machinery/computer/Initialize() + overlay_layer = layer . = ..() power_change() update_icon() @@ -116,4 +113,4 @@ playsound(src, "keyboard", 100, 1, 0) return attack_hand(user) - return \ No newline at end of file + return diff --git a/code/game/machinery/computer/crew.dm b/code/game/machinery/computer/crew.dm index 36d8307105e..3fb0f7b0df8 100644 --- a/code/game/machinery/computer/crew.dm +++ b/code/game/machinery/computer/crew.dm @@ -10,14 +10,13 @@ circuit = /obj/item/circuitboard/crew var/datum/nano_module/crew_monitor/crew_monitor -/obj/machinery/computer/crew/New() +/obj/machinery/computer/crew/Initialize(mapload) crew_monitor = new(src) - ..() + return ..() /obj/machinery/computer/crew/Destroy() - qdel(crew_monitor) - crew_monitor = null - ..() + QDEL_NULL(crew_monitor) + return ..() /obj/machinery/computer/crew/attack_ai(mob/user) ui_interact(user) diff --git a/code/game/machinery/computer/guestpass.dm b/code/game/machinery/computer/guestpass.dm index 35bdda59427..03bd9efdbf2 100755 --- a/code/game/machinery/computer/guestpass.dm +++ b/code/game/machinery/computer/guestpass.dm @@ -94,11 +94,10 @@ var/list/internal_log = list() var/mode = 0 // 0 - making pass, 1 - viewing logs -/obj/machinery/computer/guestpass/New() - ..() +/obj/machinery/computer/guestpass/Initialize(mapload) + . = ..() uid = "[rand(100,999)]-G[rand(10,99)]" - /obj/machinery/computer/guestpass/attackby(obj/I, mob/user) if(istype(I, /obj/item/card/id)) if(!giver && user.unEquip(I)) @@ -242,4 +241,4 @@ to_chat(usr, "Cannot issue pass without issuing ID.") src.add_fingerprint(usr) - SSnanoui.update_uis(src) \ No newline at end of file + SSnanoui.update_uis(src) diff --git a/code/game/machinery/computer/message.dm b/code/game/machinery/computer/message.dm index 0bbdb7213c9..de24dbb1d9e 100644 --- a/code/game/machinery/computer/message.dm +++ b/code/game/machinery/computer/message.dm @@ -505,18 +505,20 @@ /obj/item/paper/monitorkey - //..() name = "Monitor Decryption Key" var/obj/machinery/message_server/server = null -/obj/item/paper/monitorkey/New() - ..() - spawn(10) - if(message_servers) - for(var/obj/machinery/message_server/server in message_servers) - if(!isnull(server)) - if(!isnull(server.decryptkey)) - info = "