From c1279271f7cf736499327eb24a5a11bcff304a1b Mon Sep 17 00:00:00 2001 From: LudwigVonChesterfield <17705613+LudwigVonChesterfield@users.noreply.github.com> Date: Sun, 27 Nov 2022 15:23:50 -0500 Subject: [PATCH 01/36] manipulator From the game, Factorio. --- code/__DEFINES/mob.dm | 1 + code/_onclick/ai.dm | 2 +- code/_onclick/click.dm | 15 +- code/_onclick/cyborg.dm | 4 +- code/datums/wires/_wires.dm | 7 + code/datums/wires/manipulator.dm | 39 ++ code/game/atoms.dm | 2 + code/game/atoms_movable.dm | 4 + code/game/machinery/manipulator.dm | 597 ++++++++++++++++++ code/game/objects/items/mines.dm | 2 + code/modules/demo/hooks.dm | 4 +- code/modules/mob/dead/observer/observer.dm | 2 +- code/modules/mob/living/carbon/human/human.dm | 3 + code/modules/mob/living/carbon/species.dm | 92 ++- code/modules/mob/living/say.dm | 2 +- code/modules/research/designs.dm | 11 +- code/modules/research/research.dm | 2 +- icons/obj/machines/logistic.dmi | Bin 0 -> 2463 bytes taucetistation.dme | 2 + 19 files changed, 774 insertions(+), 17 deletions(-) create mode 100644 code/datums/wires/manipulator.dm create mode 100644 code/game/machinery/manipulator.dm create mode 100644 icons/obj/machines/logistic.dmi diff --git a/code/__DEFINES/mob.dm b/code/__DEFINES/mob.dm index 91f7ee59b3bd..28b5644920bd 100644 --- a/code/__DEFINES/mob.dm +++ b/code/__DEFINES/mob.dm @@ -87,6 +87,7 @@ #define SKELETON_VOX "Skeleton Vox" #define SHADOWLING "Shadowling" #define GOLEM "Adamantine Golem" +#define BLUESPACE "Bluespace Being" #define HOMUNCULUS "Homunculus" #define ZOMBIE "Zombie" #define ZOMBIE_TAJARAN "Zombie Tajaran" diff --git a/code/_onclick/ai.dm b/code/_onclick/ai.dm index 506eb3b9a0a4..53360d3c0a49 100644 --- a/code/_onclick/ai.dm +++ b/code/_onclick/ai.dm @@ -10,7 +10,7 @@ Note that AI have no need for the adjacency proc, and so this proc is a lot cleaner. */ /mob/living/silicon/ai/DblClickOn(atom/A, params) - if(client.click_intercept) // handled in normal click. + if(client && client.click_intercept) // handled in normal click. return if(control_disabled || stat != CONSCIOUS) return diff --git a/code/_onclick/click.dm b/code/_onclick/click.dm index 0297892f02e7..c51c4b37ba7b 100644 --- a/code/_onclick/click.dm +++ b/code/_onclick/click.dm @@ -60,13 +60,13 @@ if(notransform) return - if(client.click_intercept) + if(client && client.click_intercept) client.click_intercept.InterceptClickOn(src, params, A) return var/list/modifiers = params2list(params) - if(client.cob && client.cob.in_building_mode) + if(client && client.cob && client.cob.in_building_mode) cob_click(client, modifiers) return @@ -310,7 +310,8 @@ user.listed_turf = null else user.listed_turf = T - user.client.statpanel = T.name + if(user.client) + user.client.statpanel = T.name /mob/living/AltClick(mob/living/user) /* @@ -372,11 +373,11 @@ if(!dx && !dy) return if(abs(dx) < abs(dy)) - if(dy > 0) usr.set_dir(NORTH) - else usr.set_dir(SOUTH) + if(dy > 0) set_dir(NORTH) + else set_dir(SOUTH) else - if(dx > 0) usr.set_dir(EAST) - else usr.set_dir(WEST) + if(dx > 0) set_dir(EAST) + else set_dir(WEST) // Simple helper to face what you clicked on, in case it should be needed in more than one place // This proc is currently only used in multi_carry.dm (/datum/component/multi_carry) diff --git a/code/_onclick/cyborg.dm b/code/_onclick/cyborg.dm index af0ec1a09b1e..372b39a6214e 100644 --- a/code/_onclick/cyborg.dm +++ b/code/_onclick/cyborg.dm @@ -11,13 +11,13 @@ return next_click = world.time + 1 - if(client.click_intercept) // comes after object.Click to allow buildmode gui objects to be clicked + if(client && client.click_intercept) // comes after object.Click to allow buildmode gui objects to be clicked client.click_intercept.InterceptClickOn(src, params, A) return var/list/modifiers = params2list(params) - if(client.cob.in_building_mode) + if(client && client.cob.in_building_mode) cob_click(client, modifiers) return diff --git a/code/datums/wires/_wires.dm b/code/datums/wires/_wires.dm index 6e0554ec1d74..92c424ed3d5a 100644 --- a/code/datums/wires/_wires.dm +++ b/code/datums/wires/_wires.dm @@ -346,6 +346,13 @@ var/global/list/wire_daltonism_colors = list() else CRASH("[color] is not a key in wires.") +/datum/wires/proc/get_color_by_index(index) + for(var/col in wires) + var/other_index = wires[col] + if(index == other_index) + return col + + CRASH("[index] is not an index in wires") //////////////////////////// // Is Index/Colour Cut procs diff --git a/code/datums/wires/manipulator.dm b/code/datums/wires/manipulator.dm new file mode 100644 index 000000000000..bb79df28d2b4 --- /dev/null +++ b/code/datums/wires/manipulator.dm @@ -0,0 +1,39 @@ +var/const/MANIPULATOR_WIRE_ACTIVATE = 1 +var/const/MANIPULATOR_WIRE_AFTER_ACTIVATE = 2 + +/datum/wires/manipulator + holder_type = /obj/machinery/manipulator + wire_count = 3 + window_y = 240 + +/datum/wires/manipulator/can_use() + var/obj/machinery/manipulator/M = holder + return M.panel_open + +/datum/wires/manipulator/update_cut(index, mended) + var/obj/machinery/manipulator/M = holder + + switch(index) + if(MANIPULATOR_WIRE_ACTIVATE) + if(!M.can_activate()) + M.remember_trigger = TRUE + return + + M.activate() + + if(MANIPULATOR_WIRE_AFTER_ACTIVATE) + M.after_activate() + +/datum/wires/manipulator/update_pulsed(index) + var/obj/machinery/manipulator/M = holder + + switch(index) + if(MANIPULATOR_WIRE_ACTIVATE) + if(!M.can_activate()) + M.remember_trigger = TRUE + return + + M.activate() + + if(MANIPULATOR_WIRE_AFTER_ACTIVATE) + M.after_activate() diff --git a/code/game/atoms.dm b/code/game/atoms.dm index 33ad8c5bab98..84c3ab944090 100644 --- a/code/game/atoms.dm +++ b/code/game/atoms.dm @@ -340,6 +340,8 @@ //called to set the atom's dir and used to add behaviour to dir-changes /atom/proc/set_dir(new_dir) + SHOULD_CALL_PARENT(TRUE) + . = new_dir != dir dir = new_dir if(.) diff --git a/code/game/atoms_movable.dm b/code/game/atoms_movable.dm index d52fdc454e8f..0657bf220257 100644 --- a/code/game/atoms_movable.dm +++ b/code/game/atoms_movable.dm @@ -441,6 +441,8 @@ /client/var/list/image/outlined_item = list() /atom/movable/proc/apply_outline(color) + if(!usr || !usr.client) + return if(anchored || !usr.client.prefs.outline_enabled) return if(!color) @@ -461,6 +463,8 @@ /atom/movable/proc/remove_outline() + if(!usr || !usr.client) + return usr.client.images -= usr.client.outlined_item[src] usr.client.outlined_item -= src diff --git a/code/game/machinery/manipulator.dm b/code/game/machinery/manipulator.dm new file mode 100644 index 000000000000..f49403730045 --- /dev/null +++ b/code/game/machinery/manipulator.dm @@ -0,0 +1,597 @@ +/* + ✞ + Abandon hope. + ✞ + + Отче наш, сущий на небесах! + Да святится имя Твоё; + да приидет Царствие Твоё; + да будет воля Твоя и на земле, + как на небе; + хлеб наш насущный дай нам на сей день; + и прости нам долги наши, + как и мы прощаем должникам нашим; + и не введи нас в искушение, но избавь нас от лукавого. + Ибо Твоё есть Царство и сила и слава во веки. + Аминь. + — Мф. 6:9—13 + + Manipulator is a machinery that simulates clicking stuff on stuff. + Currently it creates it's own mob to click stuff with. + Which is I might say. Sinful. + */ + +#define MANIPULATOR_STATE_OFF "off" +#define MANIPULATOR_STATE_IDLE "idle" +#define MANIPULATOR_STATE_FAIL "fail" +#define MANIPULATOR_STATE_INTERACTING_FROM "interacting_from" +#define MANIPULATOR_STATE_INTERACTING_TO "interacting_to" + +/obj/item/weapon/circuitboard/manipulator + name = "Circuit board (Manipulator)" + build_path = /obj/machinery/manipulator + origin_tech = "programming=3;materials=3;engineering=3" + board_type = "machine" + + req_components = list( + /obj/item/weapon/stock_parts/manipulator = 1, + /obj/item/weapon/stock_parts/capacitor = 1, + /obj/item/weapon/stock_parts/micro_laser = 1, + ) + +/obj/machinery/manipulator + name = "manipulator" + desc = "Manipulates stuff. I think we'll put this thing right here..." + + icon = 'icons/obj/machines/logistic.dmi' + icon_state = "base" + + anchored = TRUE + + use_power = IDLE_POWER_USE + idle_power_usage = 10 + active_power_usage = 100 + + var/delay = 0 + + var/turf/from_turf + var/turf/to_turf + + var/turf/fail_turf + + var/mob/living/carbon/human/clicker + + var/state = MANIPULATOR_STATE_IDLE + + var/mirrored = FALSE + var/fail_angle = 90 + + var/image/decal + var/image/panel + var/image/status + var/atom/movable/hand + var/atom/movable/item + + var/item_x = 0 + var/item_y = 15 + var/item_scale = 0.75 + + // Initialized in atom_init because BYOND is weird with int assoc lists like that. + var/list/hand_offset + + var/busy_moving = FALSE + + // This is here solely for the coolness of manipulators opening crates. + // If something enters the tile even when manipulator is working, it will remember it, + // and activate whenver it stops being busy. + var/remember_trigger = FALSE + + var/datum/wires/manipulator/wires + +/obj/machinery/manipulator/atom_init() + . = ..() + + hand_offset = list( + "[NORTH]" = list(-1, 4), + "[SOUTH]" = list(0, 0), + "[WEST]" = list(-2, 2), + "[EAST]" = list(2, 3), + ) + + wires = new(src) + + var/image/I = image(icon, src, "manipulator", layer + 0.1, dir) + + hand = new(null) + hand.simulated = FALSE + hand.anchored = TRUE + hand.appearance = I + + vis_contents += hand + + decal = image(icon, src, "manip_decor", layer, dir) + panel = image(icon, src, "base-wires", layer, dir) + status = image(icon, src, "power_on", layer, dir) + + add_overlay(decal) + + create_clicker() + + component_parts = list() + component_parts += new /obj/item/weapon/circuitboard/manipulator(null) + component_parts += new /obj/item/weapon/stock_parts/manipulator(null) + component_parts += new /obj/item/weapon/stock_parts/capacitor(null) + component_parts += new /obj/item/weapon/stock_parts/micro_laser(null) + + RefreshParts() + + set_dir(dir) + + if(is_operational() && !panel_open) + add_overlay(status) + +/obj/machinery/manipulator/RefreshParts() + delay = 5 + + for(var/obj/item/weapon/stock_parts/manipulator/M in component_parts) + delay -= M.rating + + delay = max(delay, 1) + + var/laser_rating = 1 + + for(var/obj/item/weapon/stock_parts/micro_laser/M in component_parts) + laser_rating += M.rating + + clicker.mood_multiplicative_actionspeed_modifier = max(-1.0 / (15.0 - laser_rating), -0.9) + +/obj/machinery/manipulator/Destroy() + QDEL_NULL(clicker) + + vis_contents -= hand + if(item) + hand.vis_contents -= item + cut_overlay(decal) + + cut_overlay(panel) + cut_overlay(status) + + QDEL_NULL(hand) + QDEL_NULL(item) + QDEL_NULL(decal) + QDEL_NULL(panel) + QDEL_NULL(status) + + from_turf = null + to_turf = null + fail_turf = null + + return ..() + +/obj/machinery/manipulator/proc/do_sleep(_delay, datum/callback/extra_checks=null) + busy_moving = TRUE + + var/endtime = world.time + _delay + + . = TRUE + + while(world.time < endtime) + stoplag() + if(QDELETED(src)) + . = FALSE + break + + if(extra_checks && !extra_checks.Invoke()) + . = FALSE + break + + busy_moving = FALSE + +/obj/machinery/manipulator/proc/set_mirrored(mirrored) + src.mirrored = mirrored + + if(mirrored) + fail_angle = -90 + else + fail_angle = 90 + + var/fail_dir = turn(dir, fail_angle) + + fail_turf = get_step(src, fail_dir) + + decal.icon_state = "manip_decor[mirrored ? "-mirrored" : ""]" + cut_overlay(decal) + add_overlay(decal) + +/obj/machinery/manipulator/power_change() + ..() + if(is_operational() && !panel_open) + add_overlay(status) + +/obj/machinery/manipulator/update_icon() + if(!clicker) + return + + var/obj/item/I = clicker.get_active_hand() + if(!I) + if(item) + hand.vis_contents -= item + item = null + return + + var/image/IM = image(I.icon, src, I.icon_state, layer + 0.11, SOUTH) + + var/matrix/M = matrix() + M.Scale(item_scale, item_scale) + + IM.transform = M + + if(item) + return + + item = new(null) + item.simulated = FALSE + item.anchored = TRUE + + item.pixel_x = item_x + item.pixel_y = item_y + + item.appearance = IM + item.appearance_flags |= KEEP_TOGETHER + + hand.vis_contents += item + +/obj/machinery/manipulator/proc/get_hand_angle() + var/hand_angle = 0 + switch(state) + if(MANIPULATOR_STATE_IDLE) + hand_angle = 0 // -fail_angle if you want this state to be visible too. + if(MANIPULATOR_STATE_FAIL) + hand_angle = fail_angle + if(MANIPULATOR_STATE_INTERACTING_FROM) + hand_angle = 0 + if(MANIPULATOR_STATE_INTERACTING_TO) + hand_angle = 180 + + // -180 because manipulator is on the opposite side of where the base is facing. + return dir2angle(dir) - 180 + hand_angle + +/obj/machinery/manipulator/proc/set_state(new_state) + if(state == new_state) + return + + state = new_state + + var/hand_angle = get_hand_angle() + + var/matrix/M = matrix() + M.Turn(hand_angle) + + update_icon() + + animate(hand, time=delay, transform=M) + if(item) + var/item_angle = hand_angle + + var/matrix/MI = matrix() + + MI.Turn(item_angle) + MI.Scale(item_scale, item_scale) + + var/p_x = item_x + hand.pixel_x + var/p_y = item_y + hand.pixel_y + + var/x = p_x * cos(item_angle) + p_y * sin(item_angle) + var/y = -p_x * sin(item_angle) + p_y * cos(item_angle) + animate(item, time=delay, pixel_x=x, pixel_y=y, transform=MI) + + use_power(active_power_usage) + +/obj/machinery/manipulator/set_dir(new_dir) + . = ..() + + if(from_turf) + UnregisterSignal(from_turf, list(COMSIG_ATOM_ENTERED)) + from_turf = null + + var/opposite_dir = turn(dir, 180) + + var/fail_dir = turn(dir, fail_angle) + + to_turf = get_step(src, dir) + from_turf = get_step(src, opposite_dir) + fail_turf = get_step(src, fail_dir) + + RegisterSignal(from_turf, list(COMSIG_ATOM_ENTERED), .proc/on_from_entered) + + var/string_dir = "[dir]" + hand.pixel_x = hand_offset[string_dir][1] + hand.pixel_y = hand_offset[string_dir][2] + var/matrix/M = matrix() + M.Turn(get_hand_angle()) + hand.transform = M + + decal.dir = dir + cut_overlay(decal) + add_overlay(decal) + +/obj/machinery/manipulator/is_operational() + return ..() && anchored + +/obj/machinery/manipulator/proc/on_from_entered(datum/source, atom/movable/entering, atom/oldLoc) + SIGNAL_HANDLER + + if(!can_activate(entering)) + remember_trigger = TRUE + return + + activate(entering) + +/obj/machinery/manipulator/proc/can_activate(atom/target=null) + if(!is_operational()) + return FALSE + + if(state != MANIPULATOR_STATE_IDLE) + return FALSE + + if(busy_moving) + return FALSE + + return TRUE + +/obj/machinery/manipulator/proc/activate(atom/target=null) + INVOKE_ASYNC(src, .proc/try_interact_from, target) + +/obj/machinery/manipulator/proc/after_activate() + var/obj/item/device/assembly/signaler/S = wires.get_attached_signaler( + wires.get_color_by_index(MANIPULATOR_WIRE_AFTER_ACTIVATE) + ) + if(S) + S.signal() + +/obj/machinery/manipulator/verb/rotate() + set category = "Object" + set name = "Rotate" + set desc = "Rotate the manipulator." + set src in oview(1) + + if(state != MANIPULATOR_STATE_IDLE) + to_chat(usr, "You cannot rotate [src] while it's working.") + return + + if(busy_moving) + to_chat(usr, "You cannot rotate [src] while it's working.") + return + + playsound(src, 'sound/items/Ratchet.ogg', VOL_EFFECTS_MASTER) + set_dir(turn(dir,-90)) + to_chat(usr, "You rotate [src].") + +/obj/machinery/manipulator/verb/mirror() + set category = "Object" + set name = "Mirror" + set desc = "Mirror the manipulator." + set src in oview(1) + + if(state != MANIPULATOR_STATE_IDLE) + to_chat(usr, "You cannot mirror [src] while it's working.") + return + + if(busy_moving) + to_chat(usr, "You cannot mirror [src] while it's working.") + return + + playsound(src, 'sound/items/Ratchet.ogg', VOL_EFFECTS_MASTER) + set_mirrored(!mirrored) + to_chat(usr, "You mirror [src].") + +/obj/machinery/manipulator/attack_hand(mob/user) + if(wires.interact(user)) + return + + return ..() + +/obj/machinery/manipulator/attackby(obj/item/I, mob/user, params) + if(isscrewdriver(I)) + panel_open = !panel_open + if(panel_open) + if(is_operational()) + cut_overlay(status) + add_overlay(panel) + else + if(is_operational()) + add_overlay(status) + cut_overlay(panel) + + else if(iswirecutter(I)) + wires.interact(user) + return + + else if(ismultitool(I)) + wires.interact(user) + return + + else if(istype(I, /obj/item/device/assembly/signaler)) + wires.interact(user) + return + + else if(default_unfasten_wrench(user, I) && !busy_moving && state == MANIPULATOR_STATE_IDLE) + if(!panel_open) + if(anchored) + add_overlay(stat) + set_dir(dir) + else + cut_overlay(stat) + return + + else if(default_deconstruction_crowbar(I)) + return + + return ..() + +/obj/machinery/manipulator/proc/create_clicker() + clicker = new /mob/living/carbon/human/bluespace(src) + clicker.simulated = FALSE + clicker.real_name = "manipulator ([rand(0, 999)])" + clicker.name = clicker.real_name + clicker.status_flags |= GODMODE + clicker.canmove = FALSE + clicker.invisibility = INVISIBILITY_ABSTRACT + clicker.anchored = TRUE + clicker.density = FALSE + clicker.layer = BELOW_TURF_LAYER + clicker.plane = CLICKCATCHER_PLANE + +/obj/machinery/manipulator/proc/before_click() + clicker.rejuvenate() + clicker.forceMove(loc) + +/obj/machinery/manipulator/proc/after_click() + clicker.forceMove(src) + +/obj/machinery/manipulator/proc/clickability_from(atom/movable/A) + return !A.anchored + +/obj/machinery/manipulator/proc/clickability_to(atom/A) + return TRUE + +/obj/machinery/manipulator/proc/find_clickable(turf/T, datum/callback/clickability) + if(!T.contents.len) + return null + + var/atom/most_clickable + + for(var/C in T.contents) + var/atom/movable/A = C + + if(A.name == "") + continue + + if(!A.simulated) + continue + + if(A.invisibility > clicker.see_invisible) + continue + + if(clickability && !clickability.Invoke(A)) + continue + + if(!most_clickable) + most_clickable = A + continue + + if(A.plane > most_clickable.plane) + most_clickable = A + + else if(A.plane == most_clickable.plane && A.layer > most_clickable.layer) + most_clickable = A + + return most_clickable + +/obj/machinery/manipulator/proc/DoClick(atom/A, list/params) + usr = clicker + clicker.ClickOn(A, params) + +/obj/machinery/manipulator/proc/ClickAndCallBack(atom/A, list/params, list/datum/callback/callbacks) + DoClick(A, params) + + after_click() + + for(var/datum/callback/C in callbacks) + C.Invoke() + +/obj/machinery/manipulator/proc/simulate_click(atom/A, list/datum/callback/callbacks) + var/static/list/fake_params = "[ICON_X]=16&[ICON_Y]=16" + + before_click() + + INVOKE_ASYNC(src, .proc/ClickAndCallBack, A, fake_params, callbacks) + +/obj/machinery/manipulator/proc/after_interact_from() + var/obj/item/I = clicker.get_active_hand() + if(!I) + if(remember_trigger) + remember_trigger = FALSE + set_state(MANIPULATOR_STATE_IDLE) + do_sleep(delay) + try_interact_from() + return + set_state(MANIPULATOR_STATE_IDLE) + do_sleep(delay) + addtimer(CALLBACK(src, .proc/after_activate, delay)) + return + + try_interact_to() + +/obj/machinery/manipulator/proc/try_interact_from(atom/target=null) + if(!target) + target = find_clickable(from_turf) + + if(!target) + set_state(MANIPULATOR_STATE_IDLE) + do_sleep(delay) + addtimer(CALLBACK(src, .proc/after_activate, delay)) + return + + set_state(MANIPULATOR_STATE_INTERACTING_FROM) + if(!do_sleep(delay, CALLBACK(src, /obj/machinery.proc/is_operational))) + set_state(MANIPULATOR_STATE_IDLE) + do_sleep(delay) + addtimer(CALLBACK(src, .proc/after_activate, delay)) + return + + simulate_click(target, list(CALLBACK(src, .proc/after_interact_from))) + +/obj/machinery/manipulator/proc/after_interact_to() + var/obj/item/I = clicker.get_active_hand() + if(I) + set_state(MANIPULATOR_STATE_FAIL) + do_sleep(delay) + + clicker.drop_from_inventory(I, fail_turf) + + set_state(MANIPULATOR_STATE_INTERACTING_TO) + do_sleep(delay) + + set_state(MANIPULATOR_STATE_IDLE) + do_sleep(delay) + try_interact_from() + +/obj/machinery/manipulator/proc/try_interact_to(atom/target=null) + if(!target) + target = find_clickable(to_turf) + + if(!target) + var/obj/item/I = clicker.get_active_hand() + if(I) + set_state(MANIPULATOR_STATE_INTERACTING_TO) + if(!do_sleep(delay, CALLBACK(src, /obj/machinery.proc/is_operational))) + set_state(MANIPULATOR_STATE_IDLE) + do_sleep(delay) + addtimer(CALLBACK(src, .proc/after_activate, delay)) + return + + if(QDELETED(I)) + set_state(MANIPULATOR_STATE_IDLE) + do_sleep(delay) + addtimer(CALLBACK(src, .proc/after_activate, delay)) + return + + clicker.drop_from_inventory(I, to_turf) + + INVOKE_ASYNC(src, .proc/after_interact_to) + return + + set_state(MANIPULATOR_STATE_INTERACTING_TO) + if(!do_sleep(delay, CALLBACK(src, /obj/machinery.proc/is_operational))) + set_state(MANIPULATOR_STATE_IDLE) + do_sleep(delay) + addtimer(CALLBACK(src, .proc/after_activate, delay)) + return + + simulate_click(target, list(CALLBACK(src, .proc/after_interact_to))) + +#undef MANIPULATOR_STATE_IDLE +#undef MANIPULATOR_STATE_FAIL +#undef MANIPULATOR_STATE_INTERACTING_FROM +#undef MANIPULATOR_STATE_INTERACTING_TO diff --git a/code/game/objects/items/mines.dm b/code/game/objects/items/mines.dm index 4ca92b0d09be..bcd1cb550ecb 100644 --- a/code/game/objects/items/mines.dm +++ b/code/game/objects/items/mines.dm @@ -51,6 +51,8 @@ qdel(src) /obj/item/mine/proc/try_trigger(atom/movable/AM) + if(!AM.simulated) + return if(iscarbon(AM) || issilicon(AM) || istype(AM, /obj/mecha)) if(anchored) AM.visible_message("[AM] steps on [src]!") diff --git a/code/modules/demo/hooks.dm b/code/modules/demo/hooks.dm index fec1ed78f5c9..e5c6a43d35c5 100644 --- a/code/modules/demo/hooks.dm +++ b/code/modules/demo/hooks.dm @@ -15,10 +15,10 @@ . = ..() SSdemo.write_event_line("logout [ckey]") -/turf/set_dir() +/turf/set_dir(new_dir) . = ..() SSdemo.mark_turf(src) -/atom/movable/set_dir() +/atom/movable/set_dir(new_dir) . = ..() SSdemo.mark_dirty(src) diff --git a/code/modules/mob/dead/observer/observer.dm b/code/modules/mob/dead/observer/observer.dm index 3805fc2f6fb8..e24c34ef89d7 100644 --- a/code/modules/mob/dead/observer/observer.dm +++ b/code/modules/mob/dead/observer/observer.dm @@ -116,7 +116,7 @@ var/global/list/image/ghost_sightless_images = list() //this is a list of images //this is called when a ghost is drag clicked to something. /mob/dead/observer/MouseDrop(atom/over) if(!usr || !over) return - if (isobserver(usr) && usr.client.holder && isliving(over)) + if (isobserver(usr) && usr.client && usr.client.holder && isliving(over)) if (usr.client.holder.cmd_ghost_drag(src,over)) return diff --git a/code/modules/mob/living/carbon/human/human.dm b/code/modules/mob/living/carbon/human/human.dm index 210478d3e861..61585e7f8816 100644 --- a/code/modules/mob/living/carbon/human/human.dm +++ b/code/modules/mob/living/carbon/human/human.dm @@ -122,6 +122,9 @@ /mob/living/carbon/human/golem/atom_init(mapload) . = ..(mapload, GOLEM) +/mob/living/carbon/human/bluespace/atom_init(mapload) + . = ..(mapload, BLUESPACE) + /mob/living/carbon/human/shadowling/atom_init(mapload) . = ..(mapload, SHADOWLING) var/newNameId = pick(possibleShadowlingNames) diff --git a/code/modules/mob/living/carbon/species.dm b/code/modules/mob/living/carbon/species.dm index 26edf922049c..92ebb729b0a9 100644 --- a/code/modules/mob/living/carbon/species.dm +++ b/code/modules/mob/living/carbon/species.dm @@ -1393,7 +1393,7 @@ for(var/x in list(H.w_uniform, H.head, H.wear_suit, H.shoes, H.wear_mask, H.gloves)) if(x) - var/list/golem_items = list( + var/static/list/golem_items = list( /obj/item/clothing/under/golem, /obj/item/clothing/head/helmet/space/golem, /obj/item/clothing/suit/space/golem, @@ -1730,3 +1730,93 @@ O.adjust_pumped(rand(0, 60)) if(prob(80) && (part_species.name in list(UNATHI, SKRELL, TAJARAN))) O.original_color = pick(list(COLOR_GREEN, COLOR_LIGHT_PINK, COLOR_ROSE_PINK, COLOR_VIOLET, COLOR_DEEP_SKY_BLUE, COLOR_RED, COLOR_LIME, COLOR_PINK)) + + +/datum/species/bluespace + name = BLUESPACE + + icobase = 'icons/mob/human_races/r_golem.dmi' + deform = 'icons/mob/human_races/r_golem.dmi' + dietflags = 0 + + brute_mod = 0.0 + burn_mod = 0.0 + oxy_mod = 0.0 + tox_mod = 0.0 + clone_mod = 0.0 + brain_mod = 0.0 + + blood_datum_path = /datum/dirt_cover/oil + flesh_color = "#575757" + + butcher_drops = list(/obj/item/stack/sheet/plasteel = 3) + + flags = list( + NO_BLOOD = TRUE, + NO_DNA = TRUE, + NO_BREATHE = TRUE, + NO_SCAN = TRUE, + NO_PAIN = TRUE, + NO_EMBED = TRUE, + RAD_IMMUNE = TRUE, + VIRUS_IMMUNE = TRUE, + BIOHAZZARD_IMMUNE = TRUE, + NO_VOMIT = TRUE, + NO_FINGERPRINT = TRUE, + NO_MINORCUTS = TRUE, + NO_EMOTION = TRUE, + NO_MUTATION = TRUE, + NO_FAT = TRUE, + ) + + has_organ = list( + ) + + has_gendered_icons = FALSE + + min_age = 1 + max_age = 1000 + + // Only left and right hand are present. + restricted_inventory_slots = list( + SLOT_BACK, + SLOT_WEAR_MASK, + SLOT_HANDCUFFED, + SLOT_BELT, + SLOT_WEAR_ID, + SLOT_L_EAR, + SLOT_R_EAR, + SLOT_GLASSES, + SLOT_GLOVES, + SLOT_HEAD, + SLOT_SHOES, + SLOT_WEAR_SUIT, + SLOT_W_UNIFORM, + SLOT_L_STORE, + SLOT_R_STORE, + SLOT_S_STORE, + SLOT_IN_BACKPACK, + SLOT_LEGCUFFED, + SLOT_TIE, + SLOT_EARS, + ) + + default_mood_event = /datum/mood_event/machine + +/datum/species/bluespace/on_gain(mob/living/carbon/human/H) + ..() + // Clothing on the Bluepsace Debug Creature is created before the hud_list is generated in the atom + H.prepare_huds() + + H.status_flags &= ~(CANSTUN | CANWEAKEN | CANPARALYSE) + + qdel(H.GetComponent(/datum/component/mood)) + +/datum/species/bluespace/on_loose(mob/living/carbon/human/H) + H.status_flags |= MOB_STATUS_FLAGS_DEFAULT + H.AddComponent(/datum/component/mood) + + ..() + +/datum/species/bluespace/call_digest_proc(mob/living/M, datum/reagent/R) + return FALSE diff --git a/code/modules/mob/living/say.dm b/code/modules/mob/living/say.dm index 0233d1147165..ee268e1d3639 100644 --- a/code/modules/mob/living/say.dm +++ b/code/modules/mob/living/say.dm @@ -115,7 +115,7 @@ var/global/list/department_radio_keys = list( //log var/area/A = get_area(src) - log_say("[key_name(src)] : \[[A.name][message_mode?"/[message_mode]":""]\]: [message]") + log_say("[key_name(src)] : \[[A ? A.name : "NULLSPACE"][message_mode?"/[message_mode]":""]\]: [message]") //handle nonverbal and sign languages here if (speaking) diff --git a/code/modules/research/designs.dm b/code/modules/research/designs.dm index 92ed7c219063..d70f006cdc3b 100644 --- a/code/modules/research/designs.dm +++ b/code/modules/research/designs.dm @@ -49,7 +49,7 @@ other types of metals and chemistry for reagents). category = list("Computer") /datum/design/telepad_concole - name = " Circuit Design (Telescience Console) " + name = " Circuit Design (Telescience Console)" desc = "Allows for the construction of circuit boards used to build telescience computers." id = "telepad_concole" build_type = IMPRINTER @@ -57,6 +57,15 @@ other types of metals and chemistry for reagents). build_path = /obj/item/weapon/circuitboard/telesci_console category = list("Computer") +/datum/design/manipulator + name = " Circuit Design (Manipulator)" + desc = "Allows for the construction of circuit boards used to build manipulators." + id = "manipulator" + build_type = IMPRINTER + materials = list(MAT_GLASS = 2000, "sacid" = 20) + build_path = /obj/item/weapon/circuitboard/manipulator + category = list("Machine") + /datum/design/aicore name = "Circuit Design (AI Core)" desc = "Allows for the construction of circuit boards used to build new AI cores." diff --git a/code/modules/research/research.dm b/code/modules/research/research.dm index 51391c142c8b..7969411f1196 100644 --- a/code/modules/research/research.dm +++ b/code/modules/research/research.dm @@ -1327,7 +1327,7 @@ The tech datums are the actual "tech trees" that you improve through researching required_tech_levels = list() cost = 0 - unlocks_designs = list("mechrecharger", "cyborgrecharger", "cyborg_analyzer", "mmi", "borg_upgrade_hud") + unlocks_designs = list("mechrecharger", "cyborgrecharger", "cyborg_analyzer", "mmi", "borg_upgrade_hud", "manipulator") /datum/technology/mech_ripley name = "Ripley" diff --git a/icons/obj/machines/logistic.dmi b/icons/obj/machines/logistic.dmi new file mode 100644 index 0000000000000000000000000000000000000000..574306b75ec0c26ca99cb97557f880a30e7244e9 GIT binary patch literal 2463 zcma)8i8s`X7ypj2j2`i_r5NP3+4mNT``>x2)DBGB^G?q}Zm1&U1GKj1(sFXcq zPdv&xjghq)W+rBAzv=vbf57jYyPR{+z31HXIiI^cu(LJeKX&RE008_J=Ee?eAOBk+ z+-%#U?>oeHRnah)2xI^7>tXOa5%Aj~0DyXyG4{{#Bo#g`(xpquT?a;Hw&hR1PsRm_4y>N0#Y8>~sRkv*v`*?j6js;Z*Q zIcrXCwba6jM9Je=xWDU}liGoiVi8TlQZc=+GbEx5qpe;^d%K6sbT^m_HXbSdBb9eo zpaz@YZT*SoXgaue*eEpPn_ZL$3{kr1ARlDVM-vbP0LV)Vfe3!K1Cs@RT1d1*$t9Sz^S#?HHBA6j zigm2qs)rMzrp|(ZmC>SsBBCV`TaP|V9n4KIyDNNA1^AA5r3N*#i7xdebZz{ts=qCb z(bLq-_||5_T$0aaWs6tw0Dnczn~vaWJ(9mZQSR>9GILn_)g)neV|jy7gx0%wE8;;F zmN2rkbcN^51QOY_G`R)^tXKjb-){~oUyrlTS-3x%`HPSaDn{QHQlc}!0NaSc+HsV+ z*|}t`$3Hn6nR#nt4{YSUsUQAHD|ejiYYD-f^hU#J%?r){06pl9`-M=W*=6G!=$N9gntg-q|tgh%!2I@Vqjl z4?KMF0-m0w*Eu<eyhCSv#bT4vMF?-1T~w2hQ%of%r}jg93ToH>R&g&PKkKBE7$ne@Dv4Pc3N>ps3WQjfDUN+YhdH#uc879=@;MdXnq%6x4ce>q zMxM{Q#zfV2SVLKAg*x-sUtqdqeY6S`cO7i@x6Y>~A9Eo32j3Nl{~!TawTtn2e9z+d z@MPU;DI7II3d9c%FAd~r3FNC$?R)@!8><|hADe^C3#)6*`xhK0d13MisV)lKCSPfP zzypIQZZ8ENDRb2CSF(p<9Wnhub?HE0p|^YSC@&x|Vz$oWHl-aOqi7HW8RKl<`nC~* zl~vj9;hq2jh^`9zn%;M85f)qY+0PLdGQ+S-3*CRfJYv$m44`{7f^_VMDd5hDQY&4* z=Qo{7zfP&BXVmOhvYT>NVu-}TNgs;=LuR9zwVu40Ylw)bn71FJQ7z!9v7_bq%21-S z{!7@_z+Sky->62${rwAPC=HE>e%s#4WcZ`4MBcR6L}|!xfp85&!wGUvq{83_lZ+MA z=n#Fl`H-nr9V+K^xTUbUyP_+zn0a_+i#Knm%Ty#^yh{0l3+3Gfq-eR={CilL6>~P4hv%f5YEaxa)Hm zhcIerYFY6sV@2{vxtAm|URz1QdjRU#B-XG&h@DguXI335bYRq54Mx`aNIcJDzeyU# zeS<4{?@0(>QYPkKu5Su-JO8oeFE3-cK|WUuMr5JUYL5%c@mB1U?F@Uq?+}Dmxmb+_ zG6=wyS>fKL#v#uPS>&=TH~0g})QbYG?f#C_d|=G-?0STS*N2;3vPF)_e?D!2o^4;< zsor;Bt~?}1#BxlN!S|A-_cW>4c^nAUHqnP*I@R`%v1p?m+JaJ@g_u_FWuhtQ^2bGn zef$$l>%8hqPo}NkWR6mKtSoAI7RpsAq+lNrTyns!>sg~S~fvC3jlJ- zU@T#~jXowIBrGLO{%Gy5c_wm7m2j^fY{EM0bSKaERQ&WIGuk=0TQZNE1nYG-sr31p>e6N3N&l0? z2&>6$NG#=OQ@!^at;BxPoWI+U45XWTQunxYQh08`N;u{?wp3zA)Qi;99DJ%^y5&$I z$GJ-{9=U2((i@weC?YgAXpeJG?(NO(bgQAZnsZ(j{J-UO27PZo-Q`V;_aW`40Wv2B z4P>XOs?X?V<)kH^e&BI9H#om%_sibo@b<)tXF^<22v$%letZFKJ?Cyb<{qqqL-YTA z;?kTsg-RZfVlG;b)hKD7+kZ$!utKK8mfL=K*tfD*h--UD@S*k&Mc+i67dQg9`hu-U TulN+%9~WR@VryJy Date: Sun, 27 Nov 2022 15:31:30 -0500 Subject: [PATCH 02/36] span issues --- code/game/machinery/manipulator.dm | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/code/game/machinery/manipulator.dm b/code/game/machinery/manipulator.dm index f49403730045..ffa69073cbdc 100644 --- a/code/game/machinery/manipulator.dm +++ b/code/game/machinery/manipulator.dm @@ -356,11 +356,11 @@ set src in oview(1) if(state != MANIPULATOR_STATE_IDLE) - to_chat(usr, "You cannot rotate [src] while it's working.") + to_chat(usr, "You cannot rotate [src] while it's working.") return if(busy_moving) - to_chat(usr, "You cannot rotate [src] while it's working.") + to_chat(usr, "You cannot rotate [src] while it's working.") return playsound(src, 'sound/items/Ratchet.ogg', VOL_EFFECTS_MASTER) @@ -374,11 +374,11 @@ set src in oview(1) if(state != MANIPULATOR_STATE_IDLE) - to_chat(usr, "You cannot mirror [src] while it's working.") + to_chat(usr, "You cannot mirror [src] while it's working.") return if(busy_moving) - to_chat(usr, "You cannot mirror [src] while it's working.") + to_chat(usr, "You cannot mirror [src] while it's working.") return playsound(src, 'sound/items/Ratchet.ogg', VOL_EFFECTS_MASTER) From 8ea345d7b59af4660bcaec27e5d062024779cf50 Mon Sep 17 00:00:00 2001 From: LudwigVonChesterfield <17705613+LudwigVonChesterfield@users.noreply.github.com> Date: Sun, 27 Nov 2022 15:33:33 -0500 Subject: [PATCH 03/36] issignaler --- code/game/machinery/manipulator.dm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/game/machinery/manipulator.dm b/code/game/machinery/manipulator.dm index ffa69073cbdc..6bbf58393bfd 100644 --- a/code/game/machinery/manipulator.dm +++ b/code/game/machinery/manipulator.dm @@ -411,7 +411,7 @@ wires.interact(user) return - else if(istype(I, /obj/item/device/assembly/signaler)) + else if(issignaler(I)) wires.interact(user) return From 795c86f385d38c0df62d65ba0bfc800881192660 Mon Sep 17 00:00:00 2001 From: LudwigVonChesterfield <17705613+LudwigVonChesterfield@users.noreply.github.com> Date: Sun, 27 Nov 2022 15:34:17 -0500 Subject: [PATCH 04/36] global consts --- code/datums/wires/manipulator.dm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/code/datums/wires/manipulator.dm b/code/datums/wires/manipulator.dm index bb79df28d2b4..da6326b8763a 100644 --- a/code/datums/wires/manipulator.dm +++ b/code/datums/wires/manipulator.dm @@ -1,5 +1,5 @@ -var/const/MANIPULATOR_WIRE_ACTIVATE = 1 -var/const/MANIPULATOR_WIRE_AFTER_ACTIVATE = 2 +var/global/const/MANIPULATOR_WIRE_ACTIVATE = 1 +var/global/const/MANIPULATOR_WIRE_AFTER_ACTIVATE = 2 /datum/wires/manipulator holder_type = /obj/machinery/manipulator From e8ecec35eae33432b67d5a48638aa40f945949c9 Mon Sep 17 00:00:00 2001 From: LudwigVonChesterfield <17705613+LudwigVonChesterfield@users.noreply.github.com> Date: Fri, 2 Jun 2023 19:44:18 -0400 Subject: [PATCH 05/36] no sprite updates for manipulator mob. --- .../mob/living/carbon/human/update_icons.dm | 87 +++++++++++++++++++ 1 file changed, 87 insertions(+) diff --git a/code/modules/mob/living/carbon/human/update_icons.dm b/code/modules/mob/living/carbon/human/update_icons.dm index 4f394a4e3223..60bcb8ef0aa2 100644 --- a/code/modules/mob/living/carbon/human/update_icons.dm +++ b/code/modules/mob/living/carbon/human/update_icons.dm @@ -168,6 +168,9 @@ Please contact me on #coderbus IRC. ~Carn x //BASE MOB SPRITE /mob/living/carbon/human/proc/update_body() + if(!simulated) + return + remove_standing_overlay(BODY_LAYER) var/list/standing = list() @@ -222,6 +225,9 @@ Please contact me on #coderbus IRC. ~Carn x //HAIR OVERLAY /mob/living/carbon/human/proc/update_hair() + if(!simulated) + return + //Reset our hair remove_standing_overlay(HAIR_LAYER) @@ -277,6 +283,9 @@ Please contact me on #coderbus IRC. ~Carn x /mob/living/carbon/human/update_mutations() + if(!simulated) + return + remove_standing_overlay(MUTATIONS_LAYER) var/list/standing = list() @@ -314,6 +323,9 @@ Please contact me on #coderbus IRC. ~Carn x //Call when target overlay should be added/removed /mob/living/carbon/human/update_targeted() + if(!simulated) + return + remove_standing_overlay(TARGETED_LAYER) if(targeted_by && target_locked) @@ -325,6 +337,9 @@ Please contact me on #coderbus IRC. ~Carn x /mob/living/carbon/human/update_fire() //TG-stuff, fire layer + if(!simulated) + return + remove_standing_overlay(FIRE_LOWER_LAYER) remove_standing_overlay(FIRE_UPPER_LAYER) @@ -343,6 +358,9 @@ Please contact me on #coderbus IRC. ~Carn x /* --------------------------------------- */ //For legacy support. /mob/living/carbon/human/regenerate_icons() + if(!simulated) + return + ..() if(notransform) return @@ -380,6 +398,9 @@ Please contact me on #coderbus IRC. ~Carn x //vvvvvv UPDATE_INV PROCS vvvvvv /mob/living/carbon/human/update_inv_w_uniform() + if(!simulated) + return + remove_standing_overlay(UNIFORM_LAYER) var/default_path = 'icons/mob/uniform.dmi' @@ -425,6 +446,9 @@ Please contact me on #coderbus IRC. ~Carn x /mob/living/carbon/human/update_inv_wear_id() + if(!simulated) + return + remove_standing_overlay(ID_LAYER) if(wear_id) wear_id.screen_loc = ui_id @@ -437,6 +461,9 @@ Please contact me on #coderbus IRC. ~Carn x apply_standing_overlay(ID_LAYER) /mob/living/carbon/human/update_inv_gloves() + if(!simulated) + return + remove_standing_overlay(GLOVES_LAYER) if(gloves) if(client && hud_used && hud_used.hud_shown) @@ -458,6 +485,9 @@ Please contact me on #coderbus IRC. ~Carn x /mob/living/carbon/human/update_inv_glasses() + if(!simulated) + return + remove_standing_overlay(GLASSES_LAYER) if(glasses) @@ -474,6 +504,9 @@ Please contact me on #coderbus IRC. ~Carn x /mob/living/carbon/human/update_inv_ears() + if(!simulated) + return + remove_standing_overlay(EARS_LAYER) if(l_ear || r_ear) @@ -500,6 +533,9 @@ Please contact me on #coderbus IRC. ~Carn x /mob/living/carbon/human/update_inv_shoes() + if(!simulated) + return + remove_standing_overlay(SHOES_LAYER) if(shoes) @@ -522,6 +558,9 @@ Please contact me on #coderbus IRC. ~Carn x /mob/living/carbon/human/update_inv_s_store() + if(!simulated) + return + remove_standing_overlay(SUIT_STORE_LAYER) if(s_store) @@ -540,6 +579,9 @@ Please contact me on #coderbus IRC. ~Carn x /mob/living/carbon/human/update_inv_head() + if(!simulated) + return + remove_standing_overlay(HEAD_LAYER) if(head) @@ -568,6 +610,9 @@ Please contact me on #coderbus IRC. ~Carn x /mob/living/carbon/human/update_inv_belt() + if(!simulated) + return + remove_standing_overlay(BELT_LAYER) if(belt) @@ -582,6 +627,9 @@ Please contact me on #coderbus IRC. ~Carn x apply_standing_overlay(BELT_LAYER) /mob/living/carbon/human/update_inv_wear_suit() + if(!simulated) + return + remove_standing_overlay(SUIT_LAYER) var/default_path = 'icons/mob/suit.dmi' @@ -632,6 +680,9 @@ Please contact me on #coderbus IRC. ~Carn x /mob/living/carbon/human/update_inv_pockets() + if(!simulated) + return + if(l_store) l_store.screen_loc = ui_storage1 if(client && hud_used) @@ -643,6 +694,9 @@ Please contact me on #coderbus IRC. ~Carn x /mob/living/carbon/human/update_inv_wear_mask() + if(!simulated) + return + remove_standing_overlay(FACEMASK_LAYER) if(istype(wear_mask, /obj/item/clothing/mask) || istype(wear_mask, /obj/item/clothing/accessory)) @@ -659,6 +713,9 @@ Please contact me on #coderbus IRC. ~Carn x /mob/living/carbon/human/update_inv_back() + if(!simulated) + return + remove_standing_overlay(BACK_LAYER) if(back) @@ -673,6 +730,9 @@ Please contact me on #coderbus IRC. ~Carn x /mob/living/carbon/human/update_hud() //TODO: do away with this if possible + if(!simulated) + return + if(client) client.screen |= contents if(hud_used) @@ -681,6 +741,9 @@ Please contact me on #coderbus IRC. ~Carn x /mob/living/carbon/human/update_inv_handcuffed() + if(!simulated) + return + remove_standing_overlay(HANDCUFF_LAYER) if(handcuffed) @@ -694,6 +757,9 @@ Please contact me on #coderbus IRC. ~Carn x /mob/living/carbon/human/update_inv_legcuffed() + if(!simulated) + return + remove_standing_overlay(LEGCUFF_LAYER) if(legcuffed) @@ -706,6 +772,9 @@ Please contact me on #coderbus IRC. ~Carn x /mob/living/carbon/human/update_inv_r_hand() + if(!simulated) + return + remove_standing_overlay(R_HAND_LAYER) if(r_hand) @@ -723,6 +792,9 @@ Please contact me on #coderbus IRC. ~Carn x /mob/living/carbon/human/update_inv_l_hand() + if(!simulated) + return + remove_standing_overlay(L_HAND_LAYER) if(l_hand) @@ -742,6 +814,9 @@ Please contact me on #coderbus IRC. ~Carn x apply_standing_overlay(L_HAND_LAYER) /mob/living/carbon/human/proc/update_tail_showing() + if(!simulated) + return + remove_standing_overlay(TAIL_LAYER) if((random_tail_holder || species.tail) && species.flags[HAS_TAIL] && !(HUSK in mutations) && bodyparts_by_name[BP_CHEST]) @@ -776,6 +851,9 @@ Please contact me on #coderbus IRC. ~Carn x //Adds a collar overlay above the helmet layer if the suit has one // Suit needs an identically named sprite in icons/mob/collar.dmi /mob/living/carbon/human/proc/update_collar() + if(!simulated) + return + remove_standing_overlay(COLLAR_LAYER) if(wear_suit) @@ -791,6 +869,9 @@ Please contact me on #coderbus IRC. ~Carn x /mob/living/carbon/human/proc/update_surgery() + if(!simulated) + return + remove_standing_overlay(SURGERY_LAYER) var/list/standing = list() @@ -806,6 +887,9 @@ Please contact me on #coderbus IRC. ~Carn x apply_standing_overlay(SURGERY_LAYER) /mob/living/carbon/human/proc/update_bandage() + if(!simulated) + return + remove_standing_overlay(BANDAGE_LAYER) var/list/standing = list() @@ -846,6 +930,9 @@ Please contact me on #coderbus IRC. ~Carn x //Cutting any human's overlay that we dont want to offset. /mob/living/carbon/human/proc/update_height(image/I) + if(!simulated) + return + var/static/icon/cut_torso_mask = icon('icons/effects/cut.dmi',"Cut1") var/static/icon/cut_legs_mask = icon('icons/effects/cut.dmi',"Cut2") var/static/icon/lenghten_torso_mask = icon('icons/effects/cut.dmi',"Cut3") From 793160bd72468b6f51c40079a31edbe747bb96c5 Mon Sep 17 00:00:00 2001 From: LudwigVonChesterfield <17705613+LudwigVonChesterfield@users.noreply.github.com> Date: Fri, 2 Jun 2023 19:55:16 -0400 Subject: [PATCH 06/36] better code --- code/game/machinery/manipulator.dm | 42 +++++++++++++++++++----------- 1 file changed, 27 insertions(+), 15 deletions(-) diff --git a/code/game/machinery/manipulator.dm b/code/game/machinery/manipulator.dm index 6bbf58393bfd..104f8cc643ff 100644 --- a/code/game/machinery/manipulator.dm +++ b/code/game/machinery/manipulator.dm @@ -195,9 +195,7 @@ else fail_angle = 90 - var/fail_dir = turn(dir, fail_angle) - - fail_turf = get_step(src, fail_dir) + set_fail_turf() decal.icon_state = "manip_decor[mirrored ? "-mirrored" : ""]" cut_overlay(decal) @@ -287,22 +285,36 @@ use_power(active_power_usage) -/obj/machinery/manipulator/set_dir(new_dir) - . = ..() - +/obj/machinery/manipulator/proc/set_from_turf() + SIGNAL_HANDLER if(from_turf) - UnregisterSignal(from_turf, list(COMSIG_ATOM_ENTERED)) - from_turf = null - + UnregisterSignal(from_turf, list(COMSIG_ATOM_ENTERED, COMSIG_PARENT_QDELETING)) var/opposite_dir = turn(dir, 180) + from_turf = get_step(src, opposite_dir) + RegisterSignal(from_turf, list(COMSIG_ATOM_ENTERED), .proc/on_from_entered) + RegisterSignal(from_turf, list(COMSIG_PARENT_QDELETING), .proc/set_from_turf) +/obj/machinery/manipulator/proc/set_fail_turf() + SIGNAL_HANDLER + if(fail_turf) + UnregisterSignal(fail_turf, list(COMSIG_PARENT_QDELETING)) var/fail_dir = turn(dir, fail_angle) + fail_turf = get_step(src, fail_dir) + RegisterSignal(fail_turf, list(COMSIG_PARENT_QDELETING), .proc/set_fail_turf) +/obj/machinery/manipulator/proc/set_to_turf() + SIGNAL_HANDLER + if(to_turf) + UnregisterSignal(to_turf, list(COMSIG_PARENT_QDELETING)) to_turf = get_step(src, dir) - from_turf = get_step(src, opposite_dir) - fail_turf = get_step(src, fail_dir) + RegisterSignal(to_turf, list(COMSIG_PARENT_QDELETING), .proc/set_to_turf) - RegisterSignal(from_turf, list(COMSIG_ATOM_ENTERED), .proc/on_from_entered) +/obj/machinery/manipulator/set_dir(new_dir) + . = ..() + + set_from_turf() + set_fail_turf() + set_to_turf() var/string_dir = "[dir]" hand.pixel_x = hand_offset[string_dir][1] @@ -392,7 +404,7 @@ return ..() /obj/machinery/manipulator/attackby(obj/item/I, mob/user, params) - if(isscrewdriver(I)) + if(isscrewing(I)) panel_open = !panel_open if(panel_open) if(is_operational()) @@ -403,11 +415,11 @@ add_overlay(status) cut_overlay(panel) - else if(iswirecutter(I)) + else if(iscutter(I)) wires.interact(user) return - else if(ismultitool(I)) + else if(ispulsing(I)) wires.interact(user) return From cfe7348deb4dd172670578309cd2f8ec8062a8f2 Mon Sep 17 00:00:00 2001 From: LudwigVonChesterfield <17705613+LudwigVonChesterfield@users.noreply.github.com> Date: Fri, 2 Jun 2023 19:55:21 -0400 Subject: [PATCH 07/36] no life --- code/modules/mob/living/carbon/human/life.dm | 2 ++ 1 file changed, 2 insertions(+) diff --git a/code/modules/mob/living/carbon/human/life.dm b/code/modules/mob/living/carbon/human/life.dm index e417b4a22a97..8f9ab36f9ddc 100644 --- a/code/modules/mob/living/carbon/human/life.dm +++ b/code/modules/mob/living/carbon/human/life.dm @@ -10,6 +10,8 @@ return if(!loc) return // Fixing a null error that occurs when the mob isn't found in the world -- TLE + if(!simulated) + return ..() From 0d47f0ab4ee7010b5fac9b49e8d064a6e9bae877 Mon Sep 17 00:00:00 2001 From: LudwigVonChesterfield <17705613+LudwigVonChesterfield@users.noreply.github.com> Date: Fri, 2 Jun 2023 20:21:16 -0400 Subject: [PATCH 08/36] fixes rotation runtime --- code/game/machinery/manipulator.dm | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/code/game/machinery/manipulator.dm b/code/game/machinery/manipulator.dm index 104f8cc643ff..2393b4bd0ef4 100644 --- a/code/game/machinery/manipulator.dm +++ b/code/game/machinery/manipulator.dm @@ -195,6 +195,8 @@ else fail_angle = 90 + if(fail_turf) + UnregisterSignal(fail_turf, list(COMSIG_PARENT_QDELETING)) set_fail_turf() decal.icon_state = "manip_decor[mirrored ? "-mirrored" : ""]" @@ -287,8 +289,6 @@ /obj/machinery/manipulator/proc/set_from_turf() SIGNAL_HANDLER - if(from_turf) - UnregisterSignal(from_turf, list(COMSIG_ATOM_ENTERED, COMSIG_PARENT_QDELETING)) var/opposite_dir = turn(dir, 180) from_turf = get_step(src, opposite_dir) RegisterSignal(from_turf, list(COMSIG_ATOM_ENTERED), .proc/on_from_entered) @@ -296,22 +296,25 @@ /obj/machinery/manipulator/proc/set_fail_turf() SIGNAL_HANDLER - if(fail_turf) - UnregisterSignal(fail_turf, list(COMSIG_PARENT_QDELETING)) var/fail_dir = turn(dir, fail_angle) fail_turf = get_step(src, fail_dir) RegisterSignal(fail_turf, list(COMSIG_PARENT_QDELETING), .proc/set_fail_turf) /obj/machinery/manipulator/proc/set_to_turf() SIGNAL_HANDLER - if(to_turf) - UnregisterSignal(to_turf, list(COMSIG_PARENT_QDELETING)) to_turf = get_step(src, dir) RegisterSignal(to_turf, list(COMSIG_PARENT_QDELETING), .proc/set_to_turf) /obj/machinery/manipulator/set_dir(new_dir) . = ..() + if(from_turf) + UnregisterSignal(from_turf, list(COMSIG_ATOM_ENTERED, COMSIG_PARENT_QDELETING)) + if(fail_turf) + UnregisterSignal(fail_turf, list(COMSIG_PARENT_QDELETING)) + if(to_turf) + UnregisterSignal(to_turf, list(COMSIG_PARENT_QDELETING)) + set_from_turf() set_fail_turf() set_to_turf() From aff0adda771729a6ceea5df2207ed750ec3d3c78 Mon Sep 17 00:00:00 2001 From: LudwigVonChesterfield <17705613+LudwigVonChesterfield@users.noreply.github.com> Date: Fri, 2 Jun 2023 20:39:21 -0400 Subject: [PATCH 09/36] added crafting to autolathe --- code/game/machinery/autolathe.dm | 1 + code/game/machinery/manipulator.dm | 3 +++ 2 files changed, 4 insertions(+) diff --git a/code/game/machinery/autolathe.dm b/code/game/machinery/autolathe.dm index e2ab445fd9d7..f9153c3d8bd9 100644 --- a/code/game/machinery/autolathe.dm +++ b/code/game/machinery/autolathe.dm @@ -77,6 +77,7 @@ var/global/list/datum/autolathe_recipe/autolathe_recipes = list( R(/obj/item/clothing/accessory/stethoscope, CATEGORY_MEDICAL), R(/obj/item/stack/cable_coil/random, CATEGORY_ENGINEERING), R(/obj/item/weapon/module/power_control, CATEGORY_ENGINEERING), + R(/obj/item/weapon/circuitboard/manipulator, CATEGORY_ENGINEERING), R(/obj/item/weapon/airlock_electronics, CATEGORY_ENGINEERING), R(/obj/item/weapon/airalarm_electronics, CATEGORY_ENGINEERING), R(/obj/item/weapon/firealarm_electronics, CATEGORY_ENGINEERING), diff --git a/code/game/machinery/manipulator.dm b/code/game/machinery/manipulator.dm index 2393b4bd0ef4..71f50544cc12 100644 --- a/code/game/machinery/manipulator.dm +++ b/code/game/machinery/manipulator.dm @@ -39,6 +39,9 @@ /obj/item/weapon/stock_parts/micro_laser = 1, ) + m_amt = 50 + g_amt = 50 + /obj/machinery/manipulator name = "manipulator" desc = "Manipulates stuff. I think we'll put this thing right here..." From 0b56af4c3de81c4b996cd24eb4a6bccaa56c97aa Mon Sep 17 00:00:00 2001 From: LudwigVonChesterfield <17705613+LudwigVonChesterfield@users.noreply.github.com> Date: Fri, 2 Jun 2023 22:48:44 -0400 Subject: [PATCH 10/36] fix manipulator opening browsers. --- code/datums/browser.dm | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/code/datums/browser.dm b/code/datums/browser.dm index 435a04504434..60d5fdb07774 100644 --- a/code/datums/browser.dm +++ b/code/datums/browser.dm @@ -17,6 +17,10 @@ var/mob/M = nuser nuser = M.client + if(!nuser) + qdel(src) + return + user = nuser LAZYSET(user.browsers, nwindow_id, src) window_id = nwindow_id @@ -92,6 +96,9 @@ "} /datum/browser/proc/open() + if(!user) + return + var/window_size if(width && height) window_size = "size=[width]x[height];" From 07d49bfad52a04f9c8e5880809bf3e5c4ddedde9 Mon Sep 17 00:00:00 2001 From: LudwigVonChesterfield <17705613+LudwigVonChesterfield@users.noreply.github.com> Date: Sat, 3 Jun 2023 23:37:52 -0400 Subject: [PATCH 11/36] choose manipulator target zone via wires fixes infinite activation chain via attaching a pulser to after activate wire. --- code/datums/wires/manipulator.dm | 25 ++++++++++--------------- code/game/machinery/manipulator.dm | 28 ++++++++++++++++++++++++++-- 2 files changed, 36 insertions(+), 17 deletions(-) diff --git a/code/datums/wires/manipulator.dm b/code/datums/wires/manipulator.dm index da6326b8763a..00606812368f 100644 --- a/code/datums/wires/manipulator.dm +++ b/code/datums/wires/manipulator.dm @@ -1,28 +1,23 @@ var/global/const/MANIPULATOR_WIRE_ACTIVATE = 1 var/global/const/MANIPULATOR_WIRE_AFTER_ACTIVATE = 2 +var/global/const/MANIPULATOR_WIRE_CHANGE_TARGET_ZONE = 3 /datum/wires/manipulator holder_type = /obj/machinery/manipulator - wire_count = 3 - window_y = 240 + wire_count = 4 + window_y = 400 /datum/wires/manipulator/can_use() var/obj/machinery/manipulator/M = holder return M.panel_open -/datum/wires/manipulator/update_cut(index, mended) +/datum/wires/manipulator/get_status() var/obj/machinery/manipulator/M = holder + . += ..() + . += "Target selection screen displays: [parse_zone(M.target_zone)]" - switch(index) - if(MANIPULATOR_WIRE_ACTIVATE) - if(!M.can_activate()) - M.remember_trigger = TRUE - return - - M.activate() - - if(MANIPULATOR_WIRE_AFTER_ACTIVATE) - M.after_activate() +/datum/wires/manipulator/update_cut(index, mended) + update_pulsed(index) /datum/wires/manipulator/update_pulsed(index) var/obj/machinery/manipulator/M = holder @@ -35,5 +30,5 @@ var/global/const/MANIPULATOR_WIRE_AFTER_ACTIVATE = 2 M.activate() - if(MANIPULATOR_WIRE_AFTER_ACTIVATE) - M.after_activate() + if(MANIPULATOR_WIRE_CHANGE_TARGET_ZONE) + M.cycle_target_zone() diff --git a/code/game/machinery/manipulator.dm b/code/game/machinery/manipulator.dm index 71f50544cc12..baffac10ef38 100644 --- a/code/game/machinery/manipulator.dm +++ b/code/game/machinery/manipulator.dm @@ -27,6 +27,14 @@ #define MANIPULATOR_STATE_INTERACTING_FROM "interacting_from" #define MANIPULATOR_STATE_INTERACTING_TO "interacting_to" +/mob/living/carbon/human/bluespace + var/target_zone + +/mob/living/carbon/human/bluespace/get_targetzone() + if(zone_sel) + return ..() + return target_zone + /obj/item/weapon/circuitboard/manipulator name = "Circuit board (Manipulator)" build_path = /obj/machinery/manipulator @@ -62,7 +70,7 @@ var/turf/fail_turf - var/mob/living/carbon/human/clicker + var/mob/living/carbon/human/bluespace/clicker var/state = MANIPULATOR_STATE_IDLE @@ -91,6 +99,10 @@ var/datum/wires/manipulator/wires + var/target_zone = "random" + + var/static/list/possible_target_zones = TARGET_ZONE_ALL + list("random") + /obj/machinery/manipulator/atom_init() . = ..() @@ -382,7 +394,7 @@ return playsound(src, 'sound/items/Ratchet.ogg', VOL_EFFECTS_MASTER) - set_dir(turn(dir,-90)) + set_dir(turn(dir, -90)) to_chat(usr, "You rotate [src].") /obj/machinery/manipulator/verb/mirror() @@ -462,6 +474,9 @@ /obj/machinery/manipulator/proc/before_click() clicker.rejuvenate() + clicker.target_zone = target_zone + if(target_zone == "random") + clicker.target_zone = pick(TARGET_ZONE_ALL) clicker.forceMove(loc) /obj/machinery/manipulator/proc/after_click() @@ -609,6 +624,15 @@ simulate_click(target, list(CALLBACK(src, .proc/after_interact_to))) +/obj/machinery/manipulator/proc/cycle_target_zone() + var/cur_target_index = possible_target_zones.Find(target_zone) + cur_target_index += 1 + + if(cur_target_index > length(possible_target_zones)) + cur_target_index -= possible_target_zones + + target_zone = possible_target_zones[cur_target_index] + #undef MANIPULATOR_STATE_IDLE #undef MANIPULATOR_STATE_FAIL #undef MANIPULATOR_STATE_INTERACTING_FROM From 5612855dd22aafb1f3ae8a97cffcb039196a7633 Mon Sep 17 00:00:00 2001 From: LudwigVonChesterfield <17705613+LudwigVonChesterfield@users.noreply.github.com> Date: Sat, 3 Jun 2023 23:47:00 -0400 Subject: [PATCH 12/36] fix click delay issues. --- code/game/machinery/manipulator.dm | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/code/game/machinery/manipulator.dm b/code/game/machinery/manipulator.dm index baffac10ef38..d026bce1a273 100644 --- a/code/game/machinery/manipulator.dm +++ b/code/game/machinery/manipulator.dm @@ -35,6 +35,12 @@ return ..() return target_zone +/mob/living/carbon/human/bluespace/SetNextMove(num) + return + +/mob/living/carbon/human/bluespace/AdjustNextMove(num) + return + /obj/item/weapon/circuitboard/manipulator name = "Circuit board (Manipulator)" build_path = /obj/machinery/manipulator @@ -146,12 +152,13 @@ add_overlay(status) /obj/machinery/manipulator/RefreshParts() - delay = 5 + delay = 6 for(var/obj/item/weapon/stock_parts/manipulator/M in component_parts) delay -= M.rating - delay = max(delay, 1) + // Min delay between clicks is 1, so we need at least 2 tick delay to actually be able to interact. + delay = max(delay, 2) var/laser_rating = 1 From d3ce6edd405a0e9caa3475fc2b874ee5b254d799 Mon Sep 17 00:00:00 2001 From: LudwigVonChesterfield <17705613+LudwigVonChesterfield@users.noreply.github.com> Date: Sat, 3 Jun 2023 23:48:42 -0400 Subject: [PATCH 13/36] drop everything from click mob's inventory after click. --- code/game/machinery/manipulator.dm | 2 ++ 1 file changed, 2 insertions(+) diff --git a/code/game/machinery/manipulator.dm b/code/game/machinery/manipulator.dm index d026bce1a273..f0502d1b5517 100644 --- a/code/game/machinery/manipulator.dm +++ b/code/game/machinery/manipulator.dm @@ -487,6 +487,8 @@ clicker.forceMove(loc) /obj/machinery/manipulator/proc/after_click() + for(var/obj/item/I in clicker) + clicker.drop_from_inventory(I, loc) clicker.forceMove(src) /obj/machinery/manipulator/proc/clickability_from(atom/movable/A) From 31e92fb284f93398217f0f7ed8b6a7b2eb6f26ea Mon Sep 17 00:00:00 2001 From: LudwigVonChesterfield <17705613+LudwigVonChesterfield@users.noreply.github.com> Date: Sat, 3 Jun 2023 23:58:21 -0400 Subject: [PATCH 14/36] fixes human list issue. perhaps I should just remove them from human list... ? oh my there's also mob list and alive list and stuff like that... --- code/datums/mood_events/needs_events.dm | 2 ++ code/defines/procs/records.dm | 2 ++ code/game/gamemodes/factions.dm | 2 ++ code/game/gamemodes/factions/revolution.dm | 10 ++++++++++ code/game/gamemodes/misc_gamemode_procs.dm | 2 ++ .../modes_gameplays/nuclear/pinpointer.dm | 2 ++ code/game/gamemodes/objectives/absorb.dm | 2 ++ code/game/gamemodes/objectives/turn_into_zombie.dm | 2 ++ code/game/gamemodes/scoreboard.dm | 4 ++++ code/game/machinery/computer/medical.dm | 10 ++++++---- code/game/machinery/doors/brigdoors.dm | 6 ++++++ code/game/objects/effects/manifest.dm | 2 ++ code/game/response_team.dm | 4 ++++ code/modules/admin/secrets.dm | 14 ++++++++++++++ code/modules/events/ion_storm.dm | 2 ++ .../events/roundstart_events/misc_events.dm | 4 ++++ code/modules/events/viral_infection.dm | 2 ++ code/modules/flufftext/Hallucination.dm | 2 ++ code/modules/mob/living/carbon/human/human.dm | 2 ++ code/modules/mob/living/carbon/human/say.dm | 2 ++ code/modules/mob/living/carbon/human/zombie.dm | 2 ++ code/modules/nano/modules/crew_monitor.dm | 2 ++ 22 files changed, 78 insertions(+), 4 deletions(-) diff --git a/code/datums/mood_events/needs_events.dm b/code/datums/mood_events/needs_events.dm index d31c89a2e216..80af6e9f3b31 100644 --- a/code/datums/mood_events/needs_events.dm +++ b/code/datums/mood_events/needs_events.dm @@ -79,6 +79,8 @@ /datum/mood_event/blueshield/add_effects() var/list/to_protect = list() for(var/mob/living/carbon/human/player as anything in human_list) + if(!player.simulated) + continue if(player.mind && (player.mind.assigned_role in protected_by_blueshield_list)) to_protect += player.mind diff --git a/code/defines/procs/records.dm b/code/defines/procs/records.dm index c9a3b8a007aa..c8afbdadd519 100644 --- a/code/defines/procs/records.dm +++ b/code/defines/procs/records.dm @@ -127,6 +127,8 @@ S.fields["criminal"] = criminal_status add_record(author, S, "Уголовный статус статус был изменен на [criminal_status]
Причина: [reason]") for(var/mob/living/carbon/human/H in global.human_list) + if(!H.simulated) + continue if(H.real_name == target_name) H.sec_hud_set_security_status() diff --git a/code/game/gamemodes/factions.dm b/code/game/gamemodes/factions.dm index 2aac655dade7..412b8f7863ef 100644 --- a/code/game/gamemodes/factions.dm +++ b/code/game/gamemodes/factions.dm @@ -410,6 +410,8 @@ continue if(H.stat == DEAD) continue + if(!H.simulated) + continue if(!H.mind || !H.client) continue total_human++ diff --git a/code/game/gamemodes/factions/revolution.dm b/code/game/gamemodes/factions/revolution.dm index 4d1dcdfec217..8abf4680d7fd 100644 --- a/code/game/gamemodes/factions/revolution.dm +++ b/code/game/gamemodes/factions/revolution.dm @@ -1,6 +1,8 @@ /proc/get_living_heads() var/list/heads = list() for(var/mob/living/carbon/human/player as anything in human_list) + if(!player.simulated) + continue if(player.stat != DEAD && player.mind && (player.mind.assigned_role in heads_positions)) heads += player.mind return heads @@ -27,6 +29,8 @@ /datum/faction/revolution/proc/get_all_heads() var/list/heads = list() for(var/mob/living/carbon/human/player as anything in human_list) + if(!player.simulated) + continue if(player.mind && (player.mind.assigned_role in heads_positions)) heads += player.mind return heads @@ -116,6 +120,8 @@ log_debug("There are zero active heads of revolution, trying to add some..") var/added_heads = FALSE for(var/mob/living/carbon/human/H as anything in human_list) + if(!H.simulated) + continue if(H.stat != DEAD && H.mind && H.client?.inactivity <= 20 MINUTES && isrev(H)) var/datum/role/R = H.mind.GetRole(REV) R.Drop(H.mind) @@ -190,6 +196,8 @@ if(foecount == SSStatistics.score.arrested) SSStatistics.score.allarrested = 1 for(var/mob/living/carbon/human/player as anything in human_list) + if(!player.simulated) + continue if(player.mind) var/role = player.mind.assigned_role if(role in global.command_positions) @@ -220,6 +228,8 @@ revcount++ for(var/mob/living/carbon/human/player as anything in human_list) + if(!player.simulated) + continue if(!player.mind) continue var/role = player.mind.assigned_role diff --git a/code/game/gamemodes/misc_gamemode_procs.dm b/code/game/gamemodes/misc_gamemode_procs.dm index 06fefbc23b63..f3c790806b98 100644 --- a/code/game/gamemodes/misc_gamemode_procs.dm +++ b/code/game/gamemodes/misc_gamemode_procs.dm @@ -206,6 +206,8 @@ /proc/get_nt_opposed() var/list/dudes = list() for(var/mob/living/carbon/human/man as anything in human_list) + if(!man.simulated) + continue if(man.client) if(man.client.prefs.nanotrasen_relation == "Opposed") dudes += man diff --git a/code/game/gamemodes/modes_gameplays/nuclear/pinpointer.dm b/code/game/gamemodes/modes_gameplays/nuclear/pinpointer.dm index bd87ff30b46b..ef7de3c4c05a 100644 --- a/code/game/gamemodes/modes_gameplays/nuclear/pinpointer.dm +++ b/code/game/gamemodes/modes_gameplays/nuclear/pinpointer.dm @@ -171,6 +171,8 @@ /proc/get_humans_by_dna(dna) var/list/result = list() for(var/mob/living/carbon/human/player in human_list) + if(!player.simulated) + continue if (!player.dna) continue if (!player.dna.unique_enzymes) diff --git a/code/game/gamemodes/objectives/absorb.dm b/code/game/gamemodes/objectives/absorb.dm index b0552b5578c8..a4ec879b81ad 100644 --- a/code/game/gamemodes/objectives/absorb.dm +++ b/code/game/gamemodes/objectives/absorb.dm @@ -12,6 +12,8 @@ n_p ++ else if (SSticker.current_state == GAME_STATE_PLAYING) for(var/mob/living/carbon/human/P as anything in human_list) + if(!P.simulated) + continue if(P.client && !ischangeling(P) && P.mind!=owner) n_p ++ target_amount = min(target_amount, n_p) diff --git a/code/game/gamemodes/objectives/turn_into_zombie.dm b/code/game/gamemodes/objectives/turn_into_zombie.dm index 3285d833e872..e214b419e352 100644 --- a/code/game/gamemodes/objectives/turn_into_zombie.dm +++ b/code/game/gamemodes/objectives/turn_into_zombie.dm @@ -9,6 +9,8 @@ for(var/mob/living/carbon/human/H as anything in human_list) if(!H || !H.mind || !is_station_level(H.z)) continue + if(!H.simulated) + continue if(!H.mind.GetRoleByType(faction.initroletype) || !H.mind.GetRoleByType(faction.roletype)) return OBJECTIVE_LOSS return OBJECTIVE_WIN diff --git a/code/game/gamemodes/scoreboard.dm b/code/game/gamemodes/scoreboard.dm index 7e357f1cb8c5..179acf9d71a1 100644 --- a/code/game/gamemodes/scoreboard.dm +++ b/code/game/gamemodes/scoreboard.dm @@ -9,6 +9,8 @@ SSStatistics.score.crew_dead += 1 for (var/mob/living/carbon/human/I as anything in human_list) + if(!I.simulated) + continue if (I.stat == DEAD && is_station_level(I.z)) SSStatistics.score.crew_dead += 1 if (I.job == "Clown") @@ -21,6 +23,8 @@ var/cashscore = 0 var/dmgscore = 0 for(var/mob/living/carbon/human/E as anything in human_list) + if(!E.simulated) + continue if(E.stat == DEAD) continue cashscore = 0 diff --git a/code/game/machinery/computer/medical.dm b/code/game/machinery/computer/medical.dm index df2008dfbfa8..2fcafadca5ff 100644 --- a/code/game/machinery/computer/medical.dm +++ b/code/game/machinery/computer/medical.dm @@ -275,7 +275,7 @@ ADD_TO_GLOBAL_LIST(/obj/machinery/computer/med_data, med_record_consoles_list) for(var/i in global.department_accounts) if(t1 == global.department_accounts[i].account_number) tgui_alert(usr, "This is department account, you can't use it.") - return + return if(MA.owner_name != src.active1.fields["name"]) tgui_alert(usr, "[src.active1.fields["name"]] is not owner of this money account.") return @@ -284,8 +284,10 @@ ADD_TO_GLOBAL_LIST(/obj/machinery/computer/med_data, med_record_consoles_list) if(R) tgui_alert(usr, "This money account is already used by [R.fields["id"]] record.") return - + for(var/mob/living/carbon/human/H as anything in global.human_list) + if(!H.simulated) + continue if(md5(H.dna.uni_identity) != src.active1.fields["fingerprint"]) continue var/old_value = src.active1.fields["insurance_account_number"] @@ -295,10 +297,10 @@ ADD_TO_GLOBAL_LIST(/obj/machinery/computer/med_data, med_record_consoles_list) announcer.autosay("[usr] has changed the insurance account number in [src.active1.fields["id"]] record from '[old_value]' to '[t1]'.", "Insurancer", "Medical", freq = radiochannels["Medical"]) announcer.autosay("[usr] has changed the insurance account number in [src.active1.fields["id"]] record from '[old_value]' to '[t1]'.", "Insurancer", "Security", freq = radiochannels["Security"]) qdel(announcer) - + if(src.active1.fields["insurance_account_number"] != t1) tgui_alert(usr, "Can't match the 'fingerprint' data, please check this and try again.") - + if("sex") if (istype(src.active1, /datum/data/record)) if (src.active1.fields["sex"] == "Male") diff --git a/code/game/machinery/doors/brigdoors.dm b/code/game/machinery/doors/brigdoors.dm index 3c113350084b..4de1b43b93a8 100644 --- a/code/game/machinery/doors/brigdoors.dm +++ b/code/game/machinery/doors/brigdoors.dm @@ -89,6 +89,8 @@ add_record(null, security_data, "Отбыл наказание за преступления по статьям: [prisoner_crimes]. Уголовный статус статус был изменен на Released", id) security_data.fields["criminal"] = "Released" for(var/mob/living/carbon/human/H in global.human_list) + if(!H.simulated) + continue if(H.real_name == prisoner_name) H.sec_hud_set_security_status() timer_end() // open doors, reset timer, clear status screen @@ -316,6 +318,8 @@ add_record(usr, security_data, "Уголовный статус статус был изменен на Incarcerated.
Статья: [prisoner_crimes].
Подробности: [prisoner_details].
Время наказания: [prison_minute] min.") security_data.fields["criminal"] = "Incarcerated" for(var/mob/living/carbon/human/H in global.human_list) + if(!H.simulated) + continue if(H.real_name == prisoner_name) H.sec_hud_set_security_status() data = "База данных обновлена." @@ -328,6 +332,8 @@ add_record(usr, security_data, "Освобожден досрочно из камеры [id]. Уголовный статус статус был изменен на Paroled") security_data.fields["criminal"] = "Paroled" for(var/mob/living/carbon/human/H in global.human_list) + if(!H.simulated) + continue if(H.real_name == prisoner_name) H.sec_hud_set_security_status() timer_end() diff --git a/code/game/objects/effects/manifest.dm b/code/game/objects/effects/manifest.dm index a2f39e0c2329..6d05a960fe20 100644 --- a/code/game/objects/effects/manifest.dm +++ b/code/game/objects/effects/manifest.dm @@ -8,6 +8,8 @@ /obj/effect/manifest/proc/manifest() var/dat = "Crew Manifest:
" for(var/mob/living/carbon/human/M as anything in human_list) + if(!M.simulated) + continue dat += text(" [] - []
", M.name, M.get_assignment()) var/obj/item/weapon/paper/P = new /obj/item/weapon/paper( src.loc ) P.info = dat diff --git a/code/game/response_team.dm b/code/game/response_team.dm index d15ee06496c9..a6b0e10ec1d6 100644 --- a/code/game/response_team.dm +++ b/code/game/response_team.dm @@ -44,6 +44,8 @@ var/global/can_call_ert var/total = 0 var/deadcount = 0 for(var/mob/living/carbon/human/H as anything in human_list) + if(!H.simulated) + continue if(H.client) // Monkeys and mice don't have a client, amirite? if(H.stat == DEAD) deadcount++ total++ @@ -56,6 +58,8 @@ var/global/can_call_ert var/total = 0 var/antagonists = 0 for(var/mob/living/carbon/human/H as anything in human_list) + if(!H.simulated) + continue if(is_special_character(H) >= 1) antagonists++ total++ diff --git a/code/modules/admin/secrets.dm b/code/modules/admin/secrets.dm index 52cb16025d4f..202c0168e402 100644 --- a/code/modules/admin/secrets.dm +++ b/code/modules/admin/secrets.dm @@ -167,6 +167,8 @@ feedback_inc("admin_secrets_fun_used",1) feedback_add_details("admin_secrets_fun_used","M") for(var/mob/living/carbon/human/H as anything in human_list) + if(!H.simulated) + continue spawn(0) H.monkeyize() ok = 1 @@ -175,6 +177,8 @@ feedback_inc("admin_secrets_fun_used",1) feedback_add_details("admin_secrets_fun_used","M") for(var/mob/living/carbon/human/H as anything in human_list) + if(!H.simulated) + continue spawn(0) H.corgize() ok = 1 @@ -254,6 +258,8 @@ if(!is_station_level(loc.z) || prisonwarped.Find(H)) //don't warp them if they aren't ready or are already there continue + if(!H.simulated) + continue H.Paralyse(5) if(H.wear_id) var/obj/item/weapon/card/id/id = H.get_idcard() @@ -469,6 +475,8 @@ feedback_inc("admin_secrets_fun_used",1) feedback_add_details("admin_secrets_fun_used","DF") for(var/mob/living/carbon/human/H as anything in human_list) + if(!H.simulated) + continue H.f_style = "Dwarf Beard" H.update_hair() message_admins("[key_name_admin(usr)] activated dorf mode") @@ -646,6 +654,8 @@ var/dat = "Showing Crew Manifest.
" dat += "" for(var/mob/living/carbon/human/H as anything in human_list) + if(!H.simulated) + continue if(H.ckey) dat += text("", H.name, H.get_assignment()) dat += "
NamePosition
[][]
" @@ -662,6 +672,8 @@ var/dat = "" dat += "" for(var/mob/living/carbon/human/H as anything in human_list) + if(!H.simulated) + continue if(H.dna && H.ckey) dat += "" dat += "
NameDNABlood Type
[H][H.dna.unique_enzymes][H.b_type]
" @@ -675,6 +687,8 @@ var/dat = "" dat += "" for(var/mob/living/carbon/human/H as anything in human_list) + if(!H.simulated) + continue if(H.ckey) if(H.dna && H.dna.uni_identity) dat += "" diff --git a/code/modules/events/ion_storm.dm b/code/modules/events/ion_storm.dm index 12b641b080d5..9eefcfd2ae04 100644 --- a/code/modules/events/ion_storm.dm +++ b/code/modules/events/ion_storm.dm @@ -37,6 +37,8 @@ /mob/living/silicon/ai/proc/generate_ion_law() var/list/players = list() for(var/mob/living/carbon/human/H as anything in human_list) + if(!H.simulated) + continue if(!H.mind || !H.client || H.client.inactivity > 10 MINUTES) continue players += H.real_name diff --git a/code/modules/events/roundstart_events/misc_events.dm b/code/modules/events/roundstart_events/misc_events.dm index c3562edbec9c..ea6dde4c80ac 100644 --- a/code/modules/events/roundstart_events/misc_events.dm +++ b/code/modules/events/roundstart_events/misc_events.dm @@ -1,5 +1,7 @@ /datum/event/feature/headset/start() for(var/mob/living/carbon/human/H as anything in human_list) + if(!H.simulated) + continue if((H.l_ear || H.r_ear) && prob(80) && !isanyantag(H)) var/headset_to_del = H.l_ear ? H.l_ear : H.r_ear message_admins("RoundStart Event: [headset_to_del] was removed from [H]") @@ -8,6 +10,8 @@ /datum/event/feature/survbox/start() for(var/mob/living/carbon/human/H as anything in human_list) + if(!H.simulated) + continue if(!prob(10) || isanyantag(H)) continue var/list/boxs = H.get_all_contents_type(/obj/item/weapon/storage/box/survival) diff --git a/code/modules/events/viral_infection.dm b/code/modules/events/viral_infection.dm index 387253b999eb..02b2969283d4 100644 --- a/code/modules/events/viral_infection.dm +++ b/code/modules/events/viral_infection.dm @@ -14,6 +14,8 @@ for(var/mob/living/carbon/human/H in shuffle(human_list)) if(!infected) break + if(!H.simulated) + continue if(!H.client || H.stat == DEAD || H.species.flags[VIRUS_IMMUNE]) continue if(prob(chance)) diff --git a/code/modules/flufftext/Hallucination.dm b/code/modules/flufftext/Hallucination.dm index 4a689ab2e65b..83b7f3a63c7f 100644 --- a/code/modules/flufftext/Hallucination.dm +++ b/code/modules/flufftext/Hallucination.dm @@ -431,6 +431,8 @@ var/global/list/non_fakeattack_weapons = list(/obj/item/weapon/gun/projectile, / var/clone_weapon = null for(var/mob/living/carbon/human/H as anything in human_list) + if(!H.simulated) + continue if(H.incapacitated()) continue // possible_clones += H diff --git a/code/modules/mob/living/carbon/human/human.dm b/code/modules/mob/living/carbon/human/human.dm index 1ccf8fb8d3c6..50a5afa17984 100644 --- a/code/modules/mob/living/carbon/human/human.dm +++ b/code/modules/mob/living/carbon/human/human.dm @@ -1195,6 +1195,8 @@ var/target = null //Chosen target. for(var/mob/living/carbon/human/M as anything in human_list) //#Z2 only carbon/human for now + if(!M.simulated) + continue var/name = M.real_name if(!(REMOTE_TALK in src.mutations)) count++ diff --git a/code/modules/mob/living/carbon/human/say.dm b/code/modules/mob/living/carbon/human/say.dm index 00683ce695df..94067a5446c8 100644 --- a/code/modules/mob/living/carbon/human/say.dm +++ b/code/modules/mob/living/carbon/human/say.dm @@ -149,6 +149,8 @@ for(var/mob/living/carbon/human/H as anything in human_list) if(!H.mind || H.species.name != ABDUCTOR) continue + if(!H.simulated) + continue var/datum/role/abductor/human = H.mind.GetRoleByType(/datum/role/abductor) if(!(human in A.faction.members)) continue diff --git a/code/modules/mob/living/carbon/human/zombie.dm b/code/modules/mob/living/carbon/human/zombie.dm index 1cf28f14e95c..374854bc5833 100644 --- a/code/modules/mob/living/carbon/human/zombie.dm +++ b/code/modules/mob/living/carbon/human/zombie.dm @@ -309,6 +309,8 @@ var/global/list/zombie_list = list() for(var/mob/living/carbon/human/H as anything in human_list) if(H.stat == DEAD || iszombie(H) || H.z != user.z) continue + if(!H.simulated) + continue var/turf/target_turf = get_turf(H) var/target_dist = get_dist(target_turf, self_turf) if(target_dist < min_dist) diff --git a/code/modules/nano/modules/crew_monitor.dm b/code/modules/nano/modules/crew_monitor.dm index 90f9a21dbdbe..c0255e8a29ea 100644 --- a/code/modules/nano/modules/crew_monitor.dm +++ b/code/modules/nano/modules/crew_monitor.dm @@ -90,6 +90,8 @@ /obj/nano_module/crew_monitor/proc/scan() for(var/mob/living/carbon/human/H as anything in human_list) + if(!H.simulated) + continue var/obj/item/clothing/under/C if(isunder(H.w_uniform)) C = H.w_uniform From a1db80fe70bc35085c0879a89e5bc5f2ec38bb60 Mon Sep 17 00:00:00 2001 From: LudwigVonChesterfield <17705613+LudwigVonChesterfield@users.noreply.github.com> Date: Sun, 4 Jun 2023 00:00:01 -0400 Subject: [PATCH 15/36] removing manipulator mob from mob lists --- code/game/machinery/manipulator.dm | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/code/game/machinery/manipulator.dm b/code/game/machinery/manipulator.dm index f0502d1b5517..59336ef352dd 100644 --- a/code/game/machinery/manipulator.dm +++ b/code/game/machinery/manipulator.dm @@ -479,6 +479,12 @@ clicker.layer = BELOW_TURF_LAYER clicker.plane = CLICKCATCHER_PLANE + global.mob_list -= clicker + global.living_list -= clicker + global.carbon_list -= clicker + global.human_list -= clicker + global.alive_mob_list -= clicker + /obj/machinery/manipulator/proc/before_click() clicker.rejuvenate() clicker.target_zone = target_zone From ca0909dd9c6c3529fcdd9cd00a0ad6b7306ea9ec Mon Sep 17 00:00:00 2001 From: LudwigVonChesterfield <17705613+LudwigVonChesterfield@users.noreply.github.com> Date: Sun, 4 Jun 2023 00:06:08 -0400 Subject: [PATCH 16/36] drop items only after complete activation --- code/game/machinery/manipulator.dm | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/code/game/machinery/manipulator.dm b/code/game/machinery/manipulator.dm index 59336ef352dd..6330c64805ea 100644 --- a/code/game/machinery/manipulator.dm +++ b/code/game/machinery/manipulator.dm @@ -386,6 +386,9 @@ if(S) S.signal() + for(var/obj/item/I in clicker) + clicker.drop_from_inventory(I, loc) + /obj/machinery/manipulator/verb/rotate() set category = "Object" set name = "Rotate" @@ -493,8 +496,6 @@ clicker.forceMove(loc) /obj/machinery/manipulator/proc/after_click() - for(var/obj/item/I in clicker) - clicker.drop_from_inventory(I, loc) clicker.forceMove(src) /obj/machinery/manipulator/proc/clickability_from(atom/movable/A) @@ -566,7 +567,7 @@ return set_state(MANIPULATOR_STATE_IDLE) do_sleep(delay) - addtimer(CALLBACK(src, .proc/after_activate, delay)) + after_activate() return try_interact_to() @@ -578,14 +579,14 @@ if(!target) set_state(MANIPULATOR_STATE_IDLE) do_sleep(delay) - addtimer(CALLBACK(src, .proc/after_activate, delay)) + after_activate() return set_state(MANIPULATOR_STATE_INTERACTING_FROM) if(!do_sleep(delay, CALLBACK(src, /obj/machinery.proc/is_operational))) set_state(MANIPULATOR_STATE_IDLE) do_sleep(delay) - addtimer(CALLBACK(src, .proc/after_activate, delay)) + after_activate() return simulate_click(target, list(CALLBACK(src, .proc/after_interact_from))) @@ -616,13 +617,13 @@ if(!do_sleep(delay, CALLBACK(src, /obj/machinery.proc/is_operational))) set_state(MANIPULATOR_STATE_IDLE) do_sleep(delay) - addtimer(CALLBACK(src, .proc/after_activate, delay)) + after_activate() return if(QDELETED(I)) set_state(MANIPULATOR_STATE_IDLE) do_sleep(delay) - addtimer(CALLBACK(src, .proc/after_activate, delay)) + after_activate() return clicker.drop_from_inventory(I, to_turf) @@ -634,7 +635,7 @@ if(!do_sleep(delay, CALLBACK(src, /obj/machinery.proc/is_operational))) set_state(MANIPULATOR_STATE_IDLE) do_sleep(delay) - addtimer(CALLBACK(src, .proc/after_activate, delay)) + after_activate() return simulate_click(target, list(CALLBACK(src, .proc/after_interact_to))) From d0092d5271f237bd964ce47d757f1b82ef5508c3 Mon Sep 17 00:00:00 2001 From: LudwigVonChesterfield <17705613+LudwigVonChesterfield@users.noreply.github.com> Date: Sun, 4 Jun 2023 00:12:23 -0400 Subject: [PATCH 17/36] fixes not being able to pulse change target zone --- code/datums/wires/manipulator.dm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/datums/wires/manipulator.dm b/code/datums/wires/manipulator.dm index 00606812368f..6af793b1e9f1 100644 --- a/code/datums/wires/manipulator.dm +++ b/code/datums/wires/manipulator.dm @@ -1,6 +1,6 @@ var/global/const/MANIPULATOR_WIRE_ACTIVATE = 1 var/global/const/MANIPULATOR_WIRE_AFTER_ACTIVATE = 2 -var/global/const/MANIPULATOR_WIRE_CHANGE_TARGET_ZONE = 3 +var/global/const/MANIPULATOR_WIRE_CHANGE_TARGET_ZONE = 4 /datum/wires/manipulator holder_type = /obj/machinery/manipulator From 35410a08996c2bd6a04fc8be841ddfd32b61f889 Mon Sep 17 00:00:00 2001 From: LudwigVonChesterfield <17705613+LudwigVonChesterfield@users.noreply.github.com> Date: Sun, 4 Jun 2023 14:34:50 -0400 Subject: [PATCH 18/36] gives manipulator max skills --- code/game/machinery/manipulator.dm | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/code/game/machinery/manipulator.dm b/code/game/machinery/manipulator.dm index 6330c64805ea..9cbe591c4f26 100644 --- a/code/game/machinery/manipulator.dm +++ b/code/game/machinery/manipulator.dm @@ -30,6 +30,14 @@ /mob/living/carbon/human/bluespace var/target_zone + var/datum/skills/skills + +/mob/living/carbon/human/bluespace/atom_init() + . = ..() + skills = new + skills.add_available_skillset(/datum/skillset/max) + skills.maximize_active_skills() + /mob/living/carbon/human/bluespace/get_targetzone() if(zone_sel) return ..() @@ -41,6 +49,9 @@ /mob/living/carbon/human/bluespace/AdjustNextMove(num) return +/mob/living/carbon/human/bluespace/get_skills() + return skills + /obj/item/weapon/circuitboard/manipulator name = "Circuit board (Manipulator)" build_path = /obj/machinery/manipulator From 41f810b7891745eb5f993a8c40ed2cb2e9f06c93 Mon Sep 17 00:00:00 2001 From: LudwigVonChesterfield <17705613+LudwigVonChesterfield@users.noreply.github.com> Date: Sun, 4 Jun 2023 23:06:35 -0400 Subject: [PATCH 19/36] adds manipulator self attack capability, forced attack hand click. --- code/datums/wires/manipulator.dm | 17 ++++++++++++++--- code/game/machinery/manipulator.dm | 22 +++++++++++++++++++--- 2 files changed, 33 insertions(+), 6 deletions(-) diff --git a/code/datums/wires/manipulator.dm b/code/datums/wires/manipulator.dm index 6af793b1e9f1..1f9a829db6df 100644 --- a/code/datums/wires/manipulator.dm +++ b/code/datums/wires/manipulator.dm @@ -1,11 +1,12 @@ var/global/const/MANIPULATOR_WIRE_ACTIVATE = 1 var/global/const/MANIPULATOR_WIRE_AFTER_ACTIVATE = 2 var/global/const/MANIPULATOR_WIRE_CHANGE_TARGET_ZONE = 4 +var/global/const/MANIPULATOR_WIRE_ATTACK_SELF_ON_INTERACTION = 8 /datum/wires/manipulator holder_type = /obj/machinery/manipulator - wire_count = 4 - window_y = 400 + wire_count = 5 + window_y = 560 /datum/wires/manipulator/can_use() var/obj/machinery/manipulator/M = holder @@ -15,8 +16,15 @@ var/global/const/MANIPULATOR_WIRE_CHANGE_TARGET_ZONE = 4 var/obj/machinery/manipulator/M = holder . += ..() . += "Target selection screen displays: [parse_zone(M.target_zone)]" + . += "The 'Activate Instead' light is [M.attack_self_interaction ? "on" : "off"]." /datum/wires/manipulator/update_cut(index, mended) + var/obj/machinery/manipulator/M = holder + + if(index == MANIPULATOR_WIRE_ATTACK_SELF_ON_INTERACTION) + M.attack_self_interaction = !mended + return + update_pulsed(index) /datum/wires/manipulator/update_pulsed(index) @@ -25,10 +33,13 @@ var/global/const/MANIPULATOR_WIRE_CHANGE_TARGET_ZONE = 4 switch(index) if(MANIPULATOR_WIRE_ACTIVATE) if(!M.can_activate()) - M.remember_trigger = TRUE return + M.forced = TRUE M.activate() if(MANIPULATOR_WIRE_CHANGE_TARGET_ZONE) M.cycle_target_zone() + + if(MANIPULATOR_WIRE_ATTACK_SELF_ON_INTERACTION) + M.next_attack_self_interaction = TRUE diff --git a/code/game/machinery/manipulator.dm b/code/game/machinery/manipulator.dm index 9cbe591c4f26..8d4480337d92 100644 --- a/code/game/machinery/manipulator.dm +++ b/code/game/machinery/manipulator.dm @@ -120,6 +120,14 @@ var/static/list/possible_target_zones = TARGET_ZONE_ALL + list("random") + // Whether the next activation chain should be forced (i.e. even when a manipulator doesn't find an item to click with). + var/forced = FALSE + + // Whether instead of clicking to something we should click the item in hand. + var/attack_self_interaction = FALSE + // When pulsed attack self interact only once. + var/next_attack_self_interaction = FALSE + /obj/machinery/manipulator/atom_init() . = ..() @@ -549,6 +557,8 @@ return most_clickable /obj/machinery/manipulator/proc/DoClick(atom/A, list/params) + if(!A) + return usr = clicker clicker.ClickOn(A, params) @@ -569,7 +579,7 @@ /obj/machinery/manipulator/proc/after_interact_from() var/obj/item/I = clicker.get_active_hand() - if(!I) + if(!I && !forced) if(remember_trigger) remember_trigger = FALSE set_state(MANIPULATOR_STATE_IDLE) @@ -581,13 +591,15 @@ after_activate() return + forced = FALSE + try_interact_to() /obj/machinery/manipulator/proc/try_interact_from(atom/target=null) if(!target) target = find_clickable(from_turf) - if(!target) + if(!target && !forced) set_state(MANIPULATOR_STATE_IDLE) do_sleep(delay) after_activate() @@ -621,6 +633,10 @@ if(!target) target = find_clickable(to_turf) + if(!target && (attack_self_interaction || next_attack_self_interaction)) + target = clicker.get_active_hand() + next_attack_self_interaction = FALSE + if(!target) var/obj/item/I = clicker.get_active_hand() if(I) @@ -656,7 +672,7 @@ cur_target_index += 1 if(cur_target_index > length(possible_target_zones)) - cur_target_index -= possible_target_zones + cur_target_index -= length(possible_target_zones) target_zone = possible_target_zones[cur_target_index] From 0d122f7b887fa11977ceb58ff36dc7bc6659cf0a Mon Sep 17 00:00:00 2001 From: LudwigVonChesterfield <17705613+LudwigVonChesterfield@users.noreply.github.com> Date: Sun, 4 Jun 2023 23:17:00 -0400 Subject: [PATCH 20/36] little emag feature --- code/game/machinery/manipulator.dm | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/code/game/machinery/manipulator.dm b/code/game/machinery/manipulator.dm index 8d4480337d92..abbeeee829a9 100644 --- a/code/game/machinery/manipulator.dm +++ b/code/game/machinery/manipulator.dm @@ -676,6 +676,15 @@ target_zone = possible_target_zones[cur_target_index] +/obj/machinery/manipulator/emag_act(mob/user) + if(emagged) + return FALSE + clicker.a_intent = INTENT_HARM + to_chat(user, "You short out [src]'s harm prevention systems.") + visible_message("[src] hums oddly...") + emagged = TRUE + return TRUE + #undef MANIPULATOR_STATE_IDLE #undef MANIPULATOR_STATE_FAIL #undef MANIPULATOR_STATE_INTERACTING_FROM From a030c3d07c9c780dec1355f5a7da9f3e2b0494f6 Mon Sep 17 00:00:00 2001 From: LudwigVonChesterfield <17705613+LudwigVonChesterfield@users.noreply.github.com> Date: Mon, 5 Jun 2023 21:22:17 -0400 Subject: [PATCH 21/36] cutting activation wire will make manipulator not activate automatically, only by signal. --- code/datums/wires/manipulator.dm | 11 ++++++++--- code/game/machinery/manipulator.dm | 6 ++++++ 2 files changed, 14 insertions(+), 3 deletions(-) diff --git a/code/datums/wires/manipulator.dm b/code/datums/wires/manipulator.dm index 1f9a829db6df..88d2288cfc02 100644 --- a/code/datums/wires/manipulator.dm +++ b/code/datums/wires/manipulator.dm @@ -21,9 +21,14 @@ var/global/const/MANIPULATOR_WIRE_ATTACK_SELF_ON_INTERACTION = 8 /datum/wires/manipulator/update_cut(index, mended) var/obj/machinery/manipulator/M = holder - if(index == MANIPULATOR_WIRE_ATTACK_SELF_ON_INTERACTION) - M.attack_self_interaction = !mended - return + switch(index) + if(MANIPULATOR_WIRE_ATTACK_SELF_ON_INTERACTION) + M.auto_activation = mended + return + + if(MANIPULATOR_WIRE_ATTACK_SELF_ON_INTERACTION) + M.attack_self_interaction = !mended + return update_pulsed(index) diff --git a/code/game/machinery/manipulator.dm b/code/game/machinery/manipulator.dm index abbeeee829a9..71d1eefa9847 100644 --- a/code/game/machinery/manipulator.dm +++ b/code/game/machinery/manipulator.dm @@ -128,6 +128,9 @@ // When pulsed attack self interact only once. var/next_attack_self_interaction = FALSE + // Whether the manipulator will automatically activate on items entering the turf. + var/auto_activation = TRUE + /obj/machinery/manipulator/atom_init() . = ..() @@ -377,6 +380,9 @@ /obj/machinery/manipulator/proc/on_from_entered(datum/source, atom/movable/entering, atom/oldLoc) SIGNAL_HANDLER + if(!auto_activation) + return + if(!can_activate(entering)) remember_trigger = TRUE return From 71092421c73356f4bbd71699bffa63fea832591c Mon Sep 17 00:00:00 2001 From: LudwigVonChesterfield <17705613+LudwigVonChesterfield@users.noreply.github.com> Date: Mon, 5 Jun 2023 21:23:22 -0400 Subject: [PATCH 22/36] prohibitting unwrenching while working --- code/game/machinery/manipulator.dm | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/code/game/machinery/manipulator.dm b/code/game/machinery/manipulator.dm index 71d1eefa9847..d8ea07b4849c 100644 --- a/code/game/machinery/manipulator.dm +++ b/code/game/machinery/manipulator.dm @@ -481,6 +481,14 @@ return else if(default_unfasten_wrench(user, I) && !busy_moving && state == MANIPULATOR_STATE_IDLE) + if(state != MANIPULATOR_STATE_IDLE) + to_chat(usr, "You cannot unwrench [src] while it's working.") + return + + if(busy_moving) + to_chat(usr, "You cannot unwrench [src] while it's working.") + return + if(!panel_open) if(anchored) add_overlay(stat) From dd6536520f86aa893db850eb02bb098bbd3f0b03 Mon Sep 17 00:00:00 2001 From: LudwigVonChesterfield <17705613+LudwigVonChesterfield@users.noreply.github.com> Date: Mon, 5 Jun 2023 21:25:43 -0400 Subject: [PATCH 23/36] manipulator elements(hand and item) are not clickable, thus causing less buggy interactions hopefully. --- code/game/machinery/manipulator.dm | 3 +++ 1 file changed, 3 insertions(+) diff --git a/code/game/machinery/manipulator.dm b/code/game/machinery/manipulator.dm index d8ea07b4849c..3aa13a778675 100644 --- a/code/game/machinery/manipulator.dm +++ b/code/game/machinery/manipulator.dm @@ -148,6 +148,7 @@ hand = new(null) hand.simulated = FALSE hand.anchored = TRUE + hand.mouse_opacity = MOUSE_OPACITY_TRANSPARENT hand.appearance = I vis_contents += hand @@ -280,6 +281,8 @@ item.pixel_x = item_x item.pixel_y = item_y + item.mouse_opacity = MOUSE_OPACITY_TRANSPARENT + item.appearance = IM item.appearance_flags |= KEEP_TOGETHER From f58b9a19c9234ae70c10c8f5e7639a91cf1cf780 Mon Sep 17 00:00:00 2001 From: LudwigVonChesterfield <17705613+LudwigVonChesterfield@users.noreply.github.com> Date: Tue, 6 Jun 2023 00:04:49 -0400 Subject: [PATCH 24/36] naming support, personalization. --- code/game/machinery/manipulator.dm | 45 +++++++++++++++++++++++++++-- icons/obj/machines/logistic.dmi | Bin 2463 -> 3964 bytes 2 files changed, 42 insertions(+), 3 deletions(-) diff --git a/code/game/machinery/manipulator.dm b/code/game/machinery/manipulator.dm index 3aa13a778675..27ee33a5bfdd 100644 --- a/code/game/machinery/manipulator.dm +++ b/code/game/machinery/manipulator.dm @@ -97,6 +97,7 @@ var/image/decal var/image/panel var/image/status + var/image/eyes var/atom/movable/hand var/atom/movable/item @@ -131,6 +132,11 @@ // Whether the manipulator will automatically activate on items entering the turf. var/auto_activation = TRUE + // Whether we are cute and have googly eyes. + var/has_eyes = FALSE + // The idea of the googly eyes icon. + var/eyes_id = 1 + /obj/machinery/manipulator/atom_init() . = ..() @@ -153,9 +159,12 @@ vis_contents += hand + eyes_id = rand(1, 3) + decal = image(icon, src, "manip_decor", layer, dir) panel = image(icon, src, "base-wires", layer, dir) status = image(icon, src, "power_on", layer, dir) + eyes = image(icon, src, "eyes-[eyes_id]", layer, dir) add_overlay(decal) @@ -196,14 +205,16 @@ vis_contents -= hand if(item) hand.vis_contents -= item - cut_overlay(decal) + cut_overlay(decal) cut_overlay(panel) cut_overlay(status) + overlays -= eyes QDEL_NULL(hand) QDEL_NULL(item) QDEL_NULL(decal) + QDEL_NULL(eyes) QDEL_NULL(panel) QDEL_NULL(status) @@ -485,11 +496,11 @@ else if(default_unfasten_wrench(user, I) && !busy_moving && state == MANIPULATOR_STATE_IDLE) if(state != MANIPULATOR_STATE_IDLE) - to_chat(usr, "You cannot unwrench [src] while it's working.") + to_chat(user, "You cannot unwrench [src] while it's working.") return if(busy_moving) - to_chat(usr, "You cannot unwrench [src] while it's working.") + to_chat(user, "You cannot unwrench [src] while it's working.") return if(!panel_open) @@ -500,6 +511,12 @@ cut_overlay(stat) return + else if(istype(I, /obj/item/weapon/pen)) + to_chat(user, "You draw googly eyes on the chassis of [src]. Somehow they even shake!") + overlays += eyes + has_eyes = TRUE + return + else if(default_deconstruction_crowbar(I)) return @@ -525,6 +542,10 @@ global.alive_mob_list -= clicker /obj/machinery/manipulator/proc/before_click() + if(name != "manipulator") + clicker.real_name = name + clicker.name = clicker.real_name + clicker.rejuvenate() clicker.target_zone = target_zone if(target_zone == "random") @@ -612,6 +633,21 @@ try_interact_to() +/obj/machinery/manipulator/proc/shake_eyes() + var/list/eyes_recipients = list() + for(var/mob/M in viewers(src)) + if(M.client) + eyes_recipients += M.client + + var/image/I = image(icon, src, "eyes-[eyes_id]-anim", layer, dir) + I.mouse_opacity = MOUSE_OPACITY_TRANSPARENT + flick_overlay(I, eyes_recipients, 5) + + eyes_id = rand(1, 3) + overlays -= eyes + eyes = image(icon, src, "eyes-[eyes_id]", layer, dir) + overlays += eyes + /obj/machinery/manipulator/proc/try_interact_from(atom/target=null) if(!target) target = find_clickable(from_turf) @@ -622,6 +658,9 @@ after_activate() return + if(has_eyes) + shake_eyes() + set_state(MANIPULATOR_STATE_INTERACTING_FROM) if(!do_sleep(delay, CALLBACK(src, /obj/machinery.proc/is_operational))) set_state(MANIPULATOR_STATE_IDLE) diff --git a/icons/obj/machines/logistic.dmi b/icons/obj/machines/logistic.dmi index 574306b75ec0c26ca99cb97557f880a30e7244e9..6335f4cab4836726f2017340d7fde6fa41058046 100644 GIT binary patch literal 3964 zcmb7H`9DhE@N%ox>O9(X@OO|HFQlf;iCd*hKO9^F53`N9f z?8IO!Wtp)&WSe35OwZ@@2YkOjoa=q=*ZY3I?sK1WU)Sq8PpvGB+1Z5H003Y&H8HfI zuN{9b7A88{Oy6auFRM{@PN9ZAA>P6M_e1@I-~bSjSN*aspz{jn6Tj69DYvU{+$%51 zTCmcUuHn2qrmkNr9b)5kv?pp~bC&hN`8zM?MovWcYv#QVC)bK*)u~t0G?{8^BT*v( z9@(z7R+%mhUFCnl#4mWu*4AzdG;6GF8D6RuF=IF#??8+zc(*TXCM9F5&~=7sZ+|kp zS|m&}E`Gr$xSr&-w)r>{m-kCGe@w-1S9-aW`I=POiOliR>~PAfCGw6yGend6Y`X{U z>%8bJ&Gyj;gBM+@ocnwQC1S#%+#hFr^EOkK@uiD9LXC$)B)5`ipjVfmM|~B51ON^T zQ$qv0h`jZD*d37`(VliWXZZ}M$rW?xeMVPfY3F4RVON#y8gc!~Me1A3mtIQxpro&Ha;TKixnS5)rGj`z;}Tud#W3nh??v zfLqq%X}IhE^=W#~R$uP~V&NwOsKp+lJAWT!{_^QZA9-FT^>P>IYJ-2!(}hs$K19Rp z%kI?#4YklNjqhEW3PK>|WFatTX0#V_SYv2}zy`!L5hLHUD9M}4!04MvLg3o)hf~{; zq5R>^vMtC}wk6*UhbFVK>mp(+HE@_FBz}AM5fJmGNO)zo&3IXhr#M-*M!Y3S=gNbC zdSA>Beci#-5Ze(Th7RhPM2q=BcJp#m6WwMkBLN{4TUfFvcy3=WDJ5sJg=k2&Ok6z> z>d5)P(~j9sA&?9fvWiI`1L*X<1ULOYkP z>3+A28%gilKkUjmLwkW1?bGT641Oj=FQpoyEb0$lAt{WSN3pYuer9$Q!*dW^qxD%6 zd%LzdfZAQTNr^PjbZ`#1wsRcw%3{v&RXQbJh2C@SZ&z{IZn+@>(NV8ki_OrH#p~iQ z6JR$jy|xM3>r?U|TfUD;0|6VEv#dmL;%e76cfYkn8m}&U2X6QLTQf%2=(JP1>~sB- ztk3g>sK|e(4%anP3<+^o|n&LDTd(QzrAwG#?<>gx~T2+ud+yg+SP~IjoY}Nyb0I?ofI<6 z4=5%q@(GYB`~{s;jR`)gs@$=NB)Txz(oIG8JJN3XJ7YbWr`+!spaYw>J-*ZaP=LC_F0o~3qwqmk|s zCs=e$wW4`}|5Q`B3m(a;eCh&uiayN2f%EIl0_^7>b6#cnzrza?CkS`A5Xlz8jv@v< z*7B}S;LSF_hB|3Ad`qkKXIpoxB;o#M?ZZ);@M^I{Rz7}PzOhj4?cvIMap!R9d3`KV|>-jES+OqIntA(NtUF!6x`ycT12OYO=Kpp}qLqZ|jgzd*@BoD7Hnc1Qw zjVH%^ZgQpRZFFp z*lv5bopqFmq#6mv(CQ|#21-6PckVXhvfp{Ym*8Qa=$xF7JtpnN|F)HfL0ABJk(Stv znTHjYC`TkJcDVFYGuXS_C~)uTdMB8ssiDpe(80|%LMQ&320aP(Jc^-tzLg~|CB@Hb zdS5}?*O!du8Mj1{m_6%3d0IL}c@9p|6sp0Q))osC>66!8eiI27peC#1tf(T_uCOaH z0&Mkpc0XzOY#Dly>^BbFD7)VOefoN3{R;IH9xcBs>MC?F#c4f>-& zBD8)%sH0yIeAxTW3X6X8_WcKga9WG2BuOI+y>v!G!Jj^_7(Loe;SR-YWe*+1{J-_KFLLkiNTLBX5`Mj;<>t<>^e^pEKq9Pc`iUb6;0fgPy>b2HILs-gOD z|2RH#+vpI|p@S8!sw+xK>ANEbhjmfDb)?U8kF|m5I>1ge*B5?LzO;{mJS_6n$;N#a zWc+c-JSbXRzd3kJLq9ne+jgWvm2|U1HMPd=%;2@2VI`8u;!Wr|9_TF-=QRxjrmY`5 zTnuXz5xocJ0%0h{GNt0v5g+@RRtYbM_*VwA729boz%_1sE_rNdW<3bXg)s|Jgw9ZYq#&G%3C12sKfq=ftG-4&TxY)f@j%Og&%tdZF_g|UVWVUQH%*BB zhqj%`xRDnMz#X{%mm`huccvoFk;!Lk8_IfB%@6l1a5+l5l}d@zHgdhQ1>o_i>^In+ z=38ncTMV7~h&gIA%d>&YNq3PESJR3&WHfIgAMk$ZPLPu}4LBol_fOD85B&cd2!6o> z+FB|Hu4eW`L2-AV+l8oydSp$)P z!JhvGxNXgcP~uG@AAfdtCLN!Q2=`4{yPyuy&UxK=YQMwm$=DCp-OB&GDG)+uYrlxGS>&Ft?K%o!P>w zJzlE)+X}^sQ?dSpupXXrJ=Uy=mOazK{xETk5+6LXiD)`Dpd!*Uu-ROUt39-HgZ9Ta zg<@0<8z)}eyHx`9++CFPM>X|f9%CI(VCC34>+`Lg@j8bRs2bfbD?O$!(4&GY6;y46@TuWSj42pMOS0U|H0I89??*M; z`$ABnZ~+5pYjnG_hZ{9V9f0IXv0Qw|c@Yb3K`(cbJ5>jyg*XEWf{^_Q=iP+2{~jd%!E z7Lir>L=`NwYWJ%X7$AwhPfM{38jyOc^o%BAf9vD=j}e^1ZP6Kw+Dx52GS-fiw5%IL zx^dZ!QYwmZmpQwvRiLHARe9uxw~$vds;e=vHE=9TodPPS!8zL#3cMd`SjPo<87h!? zv==gM=zOB}XlU&8!UwWsO8nkq!?F!gs6Z^-5c%Nh&0;)ow6F*{`4SSlH914QrLr~8 zYRbK8UD$((P)MPBS-M$*cDXcp2lYZuP(Ii33&RdO?w@|;7?nzO8UB|Mg*IEKG1JDN zebmUee~D81L|PD&Pp6h??&o=~H_d_V>YBPO+x5JgJKX$ogZ%9$dfKjDQ z_SK7uK|rOSu-Tfqcj30!KxB;k)_hpka_Tk;$ls#a^FRKvzbYnpDU(lGBc#bUw}R^c z1&jfe)-xVo_d#|@QrOq!)P=J_1I8L5;qWEAxj7i1gZBpBoI~%@0-3F-MH2V1z&7l< z)l{HYi2~?($pT?@C4%WIYM|KLmydp^yK3wk-RT9jK75+#+;Z{iaG=*CzHsRV*{rUl za*$zicnvpUCbbj;`1dT!^>X4~dn`v;*blq&mjI0FTE-a(x|rnCqMd2d7o%SjnI)(%3Rui8>PMfWX_~rXR%FI=JW}E~N1omW(5bZM zp3jeV(k1TETvb0*k~A2GHv!MZ-(-PPHe;#j^}DD3G^YvT6D`Z0tKFIm8#wiiME;^x zm9e)EO4QFtFn9!y%A+%DCv0B5RH$^5pMZIFO@YU=1sOXmOUfR0rhJzh1d6BoExbUt^8v9iUDCQpy{}$?r|0gNqu!<5$8YSX# zY2tfHvz}*H>LgF!hxy2Ob6Pu=Ua$OCb!qrtkC*uJ7WU+F$us(w@0AzHml&pp8}nny zO0z*ms_+_G3`~D_1lwuJesYQR-r-7NI_7BMD~WhQBjgs58m)<}jr=K|r~Ms98Qh_n6; laDwg3>;X}(D2nTZ+497%q}xf7K>wWvOs`uQzPsuX_aD%Vt7QNH literal 2463 zcma)8i8s`X7ypj2j2`i_r5NP3+4mNT``>x2)DBGB^G?q}Zm1&U1GKj1(sFXcq zPdv&xjghq)W+rBAzv=vbf57jYyPR{+z31HXIiI^cu(LJeKX&RE008_J=Ee?eAOBk+ z+-%#U?>oeHRnah)2xI^7>tXOa5%Aj~0DyXyG4{{#Bo#g`(xpquT?a;Hw&hR1PsRm_4y>N0#Y8>~sRkv*v`*?j6js;Z*Q zIcrXCwba6jM9Je=xWDU}liGoiVi8TlQZc=+GbEx5qpe;^d%K6sbT^m_HXbSdBb9eo zpaz@YZT*SoXgaue*eEpPn_ZL$3{kr1ARlDVM-vbP0LV)Vfe3!K1Cs@RT1d1*$t9Sz^S#?HHBA6j zigm2qs)rMzrp|(ZmC>SsBBCV`TaP|V9n4KIyDNNA1^AA5r3N*#i7xdebZz{ts=qCb z(bLq-_||5_T$0aaWs6tw0Dnczn~vaWJ(9mZQSR>9GILn_)g)neV|jy7gx0%wE8;;F zmN2rkbcN^51QOY_G`R)^tXKjb-){~oUyrlTS-3x%`HPSaDn{QHQlc}!0NaSc+HsV+ z*|}t`$3Hn6nR#nt4{YSUsUQAHD|ejiYYD-f^hU#J%?r){06pl9`-M=W*=6G!=$N9gntg-q|tgh%!2I@Vqjl z4?KMF0-m0w*Eu<eyhCSv#bT4vMF?-1T~w2hQ%of%r}jg93ToH>R&g&PKkKBE7$ne@Dv4Pc3N>ps3WQjfDUN+YhdH#uc879=@;MdXnq%6x4ce>q zMxM{Q#zfV2SVLKAg*x-sUtqdqeY6S`cO7i@x6Y>~A9Eo32j3Nl{~!TawTtn2e9z+d z@MPU;DI7II3d9c%FAd~r3FNC$?R)@!8><|hADe^C3#)6*`xhK0d13MisV)lKCSPfP zzypIQZZ8ENDRb2CSF(p<9Wnhub?HE0p|^YSC@&x|Vz$oWHl-aOqi7HW8RKl<`nC~* zl~vj9;hq2jh^`9zn%;M85f)qY+0PLdGQ+S-3*CRfJYv$m44`{7f^_VMDd5hDQY&4* z=Qo{7zfP&BXVmOhvYT>NVu-}TNgs;=LuR9zwVu40Ylw)bn71FJQ7z!9v7_bq%21-S z{!7@_z+Sky->62${rwAPC=HE>e%s#4WcZ`4MBcR6L}|!xfp85&!wGUvq{83_lZ+MA z=n#Fl`H-nr9V+K^xTUbUyP_+zn0a_+i#Knm%Ty#^yh{0l3+3Gfq-eR={CilL6>~P4hv%f5YEaxa)Hm zhcIerYFY6sV@2{vxtAm|URz1QdjRU#B-XG&h@DguXI335bYRq54Mx`aNIcJDzeyU# zeS<4{?@0(>QYPkKu5Su-JO8oeFE3-cK|WUuMr5JUYL5%c@mB1U?F@Uq?+}Dmxmb+_ zG6=wyS>fKL#v#uPS>&=TH~0g})QbYG?f#C_d|=G-?0STS*N2;3vPF)_e?D!2o^4;< zsor;Bt~?}1#BxlN!S|A-_cW>4c^nAUHqnP*I@R`%v1p?m+JaJ@g_u_FWuhtQ^2bGn zef$$l>%8hqPo}NkWR6mKtSoAI7RpsAq+lNrTyns!>sg~S~fvC3jlJ- zU@T#~jXowIBrGLO{%Gy5c_wm7m2j^fY{EM0bSKaERQ&WIGuk=0TQZNE1nYG-sr31p>e6N3N&l0? z2&>6$NG#=OQ@!^at;BxPoWI+U45XWTQunxYQh08`N;u{?wp3zA)Qi;99DJ%^y5&$I z$GJ-{9=U2((i@weC?YgAXpeJG?(NO(bgQAZnsZ(j{J-UO27PZo-Q`V;_aW`40Wv2B z4P>XOs?X?V<)kH^e&BI9H#om%_sibo@b<)tXF^<22v$%letZFKJ?Cyb<{qqqL-YTA z;?kTsg-RZfVlG;b)hKD7+kZ$!utKK8mfL=K*tfD*h--UD@S*k&Mc+i67dQg9`hu-U TulN+%9~WR@VryJy Date: Tue, 6 Jun 2023 00:22:31 -0400 Subject: [PATCH 25/36] googly perfection --- code/game/machinery/manipulator.dm | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) diff --git a/code/game/machinery/manipulator.dm b/code/game/machinery/manipulator.dm index 27ee33a5bfdd..586b25dedcf3 100644 --- a/code/game/machinery/manipulator.dm +++ b/code/game/machinery/manipulator.dm @@ -136,6 +136,8 @@ var/has_eyes = FALSE // The idea of the googly eyes icon. var/eyes_id = 1 + // Is currently shaking eyes. + var/shaking_eyes = FALSE /obj/machinery/manipulator/atom_init() . = ..() @@ -634,6 +636,10 @@ try_interact_to() /obj/machinery/manipulator/proc/shake_eyes() + if(shaking_eyes) + return + shaking_eyes = TRUE + var/list/eyes_recipients = list() for(var/mob/M in viewers(src)) if(M.client) @@ -648,6 +654,8 @@ eyes = image(icon, src, "eyes-[eyes_id]", layer, dir) overlays += eyes + VARSET_IN(src, shaking_eyes, FALSE, 5) + /obj/machinery/manipulator/proc/try_interact_from(atom/target=null) if(!target) target = find_clickable(from_turf) @@ -658,9 +666,6 @@ after_activate() return - if(has_eyes) - shake_eyes() - set_state(MANIPULATOR_STATE_INTERACTING_FROM) if(!do_sleep(delay, CALLBACK(src, /obj/machinery.proc/is_operational))) set_state(MANIPULATOR_STATE_IDLE) @@ -668,6 +673,9 @@ after_activate() return + if(has_eyes) + shake_eyes() + simulate_click(target, list(CALLBACK(src, .proc/after_interact_from))) /obj/machinery/manipulator/proc/after_interact_to() @@ -741,6 +749,11 @@ emagged = TRUE return TRUE +/obj/machinery/manipulator/Moved(atom/OldLoc, Dir) + . = ..() + if(has_eyes) + shake_eyes() + #undef MANIPULATOR_STATE_IDLE #undef MANIPULATOR_STATE_FAIL #undef MANIPULATOR_STATE_INTERACTING_FROM From 8d62594818cc1412e2ba08e01a8673c5cf822af8 Mon Sep 17 00:00:00 2001 From: LudwigVonChesterfield <17705613+LudwigVonChesterfield@users.noreply.github.com> Date: Tue, 6 Jun 2023 22:00:06 -0400 Subject: [PATCH 26/36] fixes wire issue --- code/datums/wires/manipulator.dm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/datums/wires/manipulator.dm b/code/datums/wires/manipulator.dm index 88d2288cfc02..e7b3422d4e22 100644 --- a/code/datums/wires/manipulator.dm +++ b/code/datums/wires/manipulator.dm @@ -22,7 +22,7 @@ var/global/const/MANIPULATOR_WIRE_ATTACK_SELF_ON_INTERACTION = 8 var/obj/machinery/manipulator/M = holder switch(index) - if(MANIPULATOR_WIRE_ATTACK_SELF_ON_INTERACTION) + if(MANIPULATOR_WIRE_ACTIVATE) M.auto_activation = mended return From f343eb372f64e5854b34f2003fa6445d27875658 Mon Sep 17 00:00:00 2001 From: LudwigVonChesterfield <17705613+LudwigVonChesterfield@users.noreply.github.com> Date: Tue, 6 Jun 2023 22:02:05 -0400 Subject: [PATCH 27/36] Revert "fixes human list issue." Since mob is deleted from lists anyway. This reverts commit 31e92fb284f93398217f0f7ed8b6a7b2eb6f26ea. --- code/datums/mood_events/needs_events.dm | 2 -- code/defines/procs/records.dm | 2 -- code/game/gamemodes/factions.dm | 2 -- code/game/gamemodes/factions/revolution.dm | 10 ---------- code/game/gamemodes/misc_gamemode_procs.dm | 2 -- .../modes_gameplays/nuclear/pinpointer.dm | 2 -- code/game/gamemodes/objectives/absorb.dm | 2 -- code/game/gamemodes/objectives/turn_into_zombie.dm | 2 -- code/game/gamemodes/scoreboard.dm | 4 ---- code/game/machinery/computer/medical.dm | 10 ++++------ code/game/machinery/doors/brigdoors.dm | 6 ------ code/game/objects/effects/manifest.dm | 2 -- code/game/response_team.dm | 4 ---- code/modules/admin/secrets.dm | 14 -------------- code/modules/events/ion_storm.dm | 2 -- .../events/roundstart_events/misc_events.dm | 4 ---- code/modules/events/viral_infection.dm | 2 -- code/modules/flufftext/Hallucination.dm | 2 -- code/modules/mob/living/carbon/human/human.dm | 2 -- code/modules/mob/living/carbon/human/say.dm | 2 -- code/modules/mob/living/carbon/human/zombie.dm | 2 -- code/modules/nano/modules/crew_monitor.dm | 2 -- 22 files changed, 4 insertions(+), 78 deletions(-) diff --git a/code/datums/mood_events/needs_events.dm b/code/datums/mood_events/needs_events.dm index 80af6e9f3b31..d31c89a2e216 100644 --- a/code/datums/mood_events/needs_events.dm +++ b/code/datums/mood_events/needs_events.dm @@ -79,8 +79,6 @@ /datum/mood_event/blueshield/add_effects() var/list/to_protect = list() for(var/mob/living/carbon/human/player as anything in human_list) - if(!player.simulated) - continue if(player.mind && (player.mind.assigned_role in protected_by_blueshield_list)) to_protect += player.mind diff --git a/code/defines/procs/records.dm b/code/defines/procs/records.dm index c8afbdadd519..c9a3b8a007aa 100644 --- a/code/defines/procs/records.dm +++ b/code/defines/procs/records.dm @@ -127,8 +127,6 @@ S.fields["criminal"] = criminal_status add_record(author, S, "Уголовный статус статус был изменен на [criminal_status]
Причина: [reason]") for(var/mob/living/carbon/human/H in global.human_list) - if(!H.simulated) - continue if(H.real_name == target_name) H.sec_hud_set_security_status() diff --git a/code/game/gamemodes/factions.dm b/code/game/gamemodes/factions.dm index 412b8f7863ef..2aac655dade7 100644 --- a/code/game/gamemodes/factions.dm +++ b/code/game/gamemodes/factions.dm @@ -410,8 +410,6 @@ continue if(H.stat == DEAD) continue - if(!H.simulated) - continue if(!H.mind || !H.client) continue total_human++ diff --git a/code/game/gamemodes/factions/revolution.dm b/code/game/gamemodes/factions/revolution.dm index 8abf4680d7fd..4d1dcdfec217 100644 --- a/code/game/gamemodes/factions/revolution.dm +++ b/code/game/gamemodes/factions/revolution.dm @@ -1,8 +1,6 @@ /proc/get_living_heads() var/list/heads = list() for(var/mob/living/carbon/human/player as anything in human_list) - if(!player.simulated) - continue if(player.stat != DEAD && player.mind && (player.mind.assigned_role in heads_positions)) heads += player.mind return heads @@ -29,8 +27,6 @@ /datum/faction/revolution/proc/get_all_heads() var/list/heads = list() for(var/mob/living/carbon/human/player as anything in human_list) - if(!player.simulated) - continue if(player.mind && (player.mind.assigned_role in heads_positions)) heads += player.mind return heads @@ -120,8 +116,6 @@ log_debug("There are zero active heads of revolution, trying to add some..") var/added_heads = FALSE for(var/mob/living/carbon/human/H as anything in human_list) - if(!H.simulated) - continue if(H.stat != DEAD && H.mind && H.client?.inactivity <= 20 MINUTES && isrev(H)) var/datum/role/R = H.mind.GetRole(REV) R.Drop(H.mind) @@ -196,8 +190,6 @@ if(foecount == SSStatistics.score.arrested) SSStatistics.score.allarrested = 1 for(var/mob/living/carbon/human/player as anything in human_list) - if(!player.simulated) - continue if(player.mind) var/role = player.mind.assigned_role if(role in global.command_positions) @@ -228,8 +220,6 @@ revcount++ for(var/mob/living/carbon/human/player as anything in human_list) - if(!player.simulated) - continue if(!player.mind) continue var/role = player.mind.assigned_role diff --git a/code/game/gamemodes/misc_gamemode_procs.dm b/code/game/gamemodes/misc_gamemode_procs.dm index f3c790806b98..06fefbc23b63 100644 --- a/code/game/gamemodes/misc_gamemode_procs.dm +++ b/code/game/gamemodes/misc_gamemode_procs.dm @@ -206,8 +206,6 @@ /proc/get_nt_opposed() var/list/dudes = list() for(var/mob/living/carbon/human/man as anything in human_list) - if(!man.simulated) - continue if(man.client) if(man.client.prefs.nanotrasen_relation == "Opposed") dudes += man diff --git a/code/game/gamemodes/modes_gameplays/nuclear/pinpointer.dm b/code/game/gamemodes/modes_gameplays/nuclear/pinpointer.dm index ef7de3c4c05a..bd87ff30b46b 100644 --- a/code/game/gamemodes/modes_gameplays/nuclear/pinpointer.dm +++ b/code/game/gamemodes/modes_gameplays/nuclear/pinpointer.dm @@ -171,8 +171,6 @@ /proc/get_humans_by_dna(dna) var/list/result = list() for(var/mob/living/carbon/human/player in human_list) - if(!player.simulated) - continue if (!player.dna) continue if (!player.dna.unique_enzymes) diff --git a/code/game/gamemodes/objectives/absorb.dm b/code/game/gamemodes/objectives/absorb.dm index a4ec879b81ad..b0552b5578c8 100644 --- a/code/game/gamemodes/objectives/absorb.dm +++ b/code/game/gamemodes/objectives/absorb.dm @@ -12,8 +12,6 @@ n_p ++ else if (SSticker.current_state == GAME_STATE_PLAYING) for(var/mob/living/carbon/human/P as anything in human_list) - if(!P.simulated) - continue if(P.client && !ischangeling(P) && P.mind!=owner) n_p ++ target_amount = min(target_amount, n_p) diff --git a/code/game/gamemodes/objectives/turn_into_zombie.dm b/code/game/gamemodes/objectives/turn_into_zombie.dm index e214b419e352..3285d833e872 100644 --- a/code/game/gamemodes/objectives/turn_into_zombie.dm +++ b/code/game/gamemodes/objectives/turn_into_zombie.dm @@ -9,8 +9,6 @@ for(var/mob/living/carbon/human/H as anything in human_list) if(!H || !H.mind || !is_station_level(H.z)) continue - if(!H.simulated) - continue if(!H.mind.GetRoleByType(faction.initroletype) || !H.mind.GetRoleByType(faction.roletype)) return OBJECTIVE_LOSS return OBJECTIVE_WIN diff --git a/code/game/gamemodes/scoreboard.dm b/code/game/gamemodes/scoreboard.dm index 179acf9d71a1..7e357f1cb8c5 100644 --- a/code/game/gamemodes/scoreboard.dm +++ b/code/game/gamemodes/scoreboard.dm @@ -9,8 +9,6 @@ SSStatistics.score.crew_dead += 1 for (var/mob/living/carbon/human/I as anything in human_list) - if(!I.simulated) - continue if (I.stat == DEAD && is_station_level(I.z)) SSStatistics.score.crew_dead += 1 if (I.job == "Clown") @@ -23,8 +21,6 @@ var/cashscore = 0 var/dmgscore = 0 for(var/mob/living/carbon/human/E as anything in human_list) - if(!E.simulated) - continue if(E.stat == DEAD) continue cashscore = 0 diff --git a/code/game/machinery/computer/medical.dm b/code/game/machinery/computer/medical.dm index 2fcafadca5ff..df2008dfbfa8 100644 --- a/code/game/machinery/computer/medical.dm +++ b/code/game/machinery/computer/medical.dm @@ -275,7 +275,7 @@ ADD_TO_GLOBAL_LIST(/obj/machinery/computer/med_data, med_record_consoles_list) for(var/i in global.department_accounts) if(t1 == global.department_accounts[i].account_number) tgui_alert(usr, "This is department account, you can't use it.") - return + return if(MA.owner_name != src.active1.fields["name"]) tgui_alert(usr, "[src.active1.fields["name"]] is not owner of this money account.") return @@ -284,10 +284,8 @@ ADD_TO_GLOBAL_LIST(/obj/machinery/computer/med_data, med_record_consoles_list) if(R) tgui_alert(usr, "This money account is already used by [R.fields["id"]] record.") return - + for(var/mob/living/carbon/human/H as anything in global.human_list) - if(!H.simulated) - continue if(md5(H.dna.uni_identity) != src.active1.fields["fingerprint"]) continue var/old_value = src.active1.fields["insurance_account_number"] @@ -297,10 +295,10 @@ ADD_TO_GLOBAL_LIST(/obj/machinery/computer/med_data, med_record_consoles_list) announcer.autosay("[usr] has changed the insurance account number in [src.active1.fields["id"]] record from '[old_value]' to '[t1]'.", "Insurancer", "Medical", freq = radiochannels["Medical"]) announcer.autosay("[usr] has changed the insurance account number in [src.active1.fields["id"]] record from '[old_value]' to '[t1]'.", "Insurancer", "Security", freq = radiochannels["Security"]) qdel(announcer) - + if(src.active1.fields["insurance_account_number"] != t1) tgui_alert(usr, "Can't match the 'fingerprint' data, please check this and try again.") - + if("sex") if (istype(src.active1, /datum/data/record)) if (src.active1.fields["sex"] == "Male") diff --git a/code/game/machinery/doors/brigdoors.dm b/code/game/machinery/doors/brigdoors.dm index 4de1b43b93a8..3c113350084b 100644 --- a/code/game/machinery/doors/brigdoors.dm +++ b/code/game/machinery/doors/brigdoors.dm @@ -89,8 +89,6 @@ add_record(null, security_data, "Отбыл наказание за преступления по статьям: [prisoner_crimes]. Уголовный статус статус был изменен на Released", id) security_data.fields["criminal"] = "Released" for(var/mob/living/carbon/human/H in global.human_list) - if(!H.simulated) - continue if(H.real_name == prisoner_name) H.sec_hud_set_security_status() timer_end() // open doors, reset timer, clear status screen @@ -318,8 +316,6 @@ add_record(usr, security_data, "Уголовный статус статус был изменен на Incarcerated.
Статья: [prisoner_crimes].
Подробности: [prisoner_details].
Время наказания: [prison_minute] min.") security_data.fields["criminal"] = "Incarcerated" for(var/mob/living/carbon/human/H in global.human_list) - if(!H.simulated) - continue if(H.real_name == prisoner_name) H.sec_hud_set_security_status() data = "База данных обновлена." @@ -332,8 +328,6 @@ add_record(usr, security_data, "Освобожден досрочно из камеры [id]. Уголовный статус статус был изменен на Paroled") security_data.fields["criminal"] = "Paroled" for(var/mob/living/carbon/human/H in global.human_list) - if(!H.simulated) - continue if(H.real_name == prisoner_name) H.sec_hud_set_security_status() timer_end() diff --git a/code/game/objects/effects/manifest.dm b/code/game/objects/effects/manifest.dm index 6d05a960fe20..a2f39e0c2329 100644 --- a/code/game/objects/effects/manifest.dm +++ b/code/game/objects/effects/manifest.dm @@ -8,8 +8,6 @@ /obj/effect/manifest/proc/manifest() var/dat = "Crew Manifest:
" for(var/mob/living/carbon/human/M as anything in human_list) - if(!M.simulated) - continue dat += text(" [] - []
", M.name, M.get_assignment()) var/obj/item/weapon/paper/P = new /obj/item/weapon/paper( src.loc ) P.info = dat diff --git a/code/game/response_team.dm b/code/game/response_team.dm index a6b0e10ec1d6..d15ee06496c9 100644 --- a/code/game/response_team.dm +++ b/code/game/response_team.dm @@ -44,8 +44,6 @@ var/global/can_call_ert var/total = 0 var/deadcount = 0 for(var/mob/living/carbon/human/H as anything in human_list) - if(!H.simulated) - continue if(H.client) // Monkeys and mice don't have a client, amirite? if(H.stat == DEAD) deadcount++ total++ @@ -58,8 +56,6 @@ var/global/can_call_ert var/total = 0 var/antagonists = 0 for(var/mob/living/carbon/human/H as anything in human_list) - if(!H.simulated) - continue if(is_special_character(H) >= 1) antagonists++ total++ diff --git a/code/modules/admin/secrets.dm b/code/modules/admin/secrets.dm index 202c0168e402..52cb16025d4f 100644 --- a/code/modules/admin/secrets.dm +++ b/code/modules/admin/secrets.dm @@ -167,8 +167,6 @@ feedback_inc("admin_secrets_fun_used",1) feedback_add_details("admin_secrets_fun_used","M") for(var/mob/living/carbon/human/H as anything in human_list) - if(!H.simulated) - continue spawn(0) H.monkeyize() ok = 1 @@ -177,8 +175,6 @@ feedback_inc("admin_secrets_fun_used",1) feedback_add_details("admin_secrets_fun_used","M") for(var/mob/living/carbon/human/H as anything in human_list) - if(!H.simulated) - continue spawn(0) H.corgize() ok = 1 @@ -258,8 +254,6 @@ if(!is_station_level(loc.z) || prisonwarped.Find(H)) //don't warp them if they aren't ready or are already there continue - if(!H.simulated) - continue H.Paralyse(5) if(H.wear_id) var/obj/item/weapon/card/id/id = H.get_idcard() @@ -475,8 +469,6 @@ feedback_inc("admin_secrets_fun_used",1) feedback_add_details("admin_secrets_fun_used","DF") for(var/mob/living/carbon/human/H as anything in human_list) - if(!H.simulated) - continue H.f_style = "Dwarf Beard" H.update_hair() message_admins("[key_name_admin(usr)] activated dorf mode") @@ -654,8 +646,6 @@ var/dat = "Showing Crew Manifest.
" dat += "
NameFingerprints
[H][md5(H.dna.uni_identity)]
" for(var/mob/living/carbon/human/H as anything in human_list) - if(!H.simulated) - continue if(H.ckey) dat += text("", H.name, H.get_assignment()) dat += "
NamePosition
[][]
" @@ -672,8 +662,6 @@ var/dat = "" dat += "" for(var/mob/living/carbon/human/H as anything in human_list) - if(!H.simulated) - continue if(H.dna && H.ckey) dat += "" dat += "
NameDNABlood Type
[H][H.dna.unique_enzymes][H.b_type]
" @@ -687,8 +675,6 @@ var/dat = "" dat += "" for(var/mob/living/carbon/human/H as anything in human_list) - if(!H.simulated) - continue if(H.ckey) if(H.dna && H.dna.uni_identity) dat += "" diff --git a/code/modules/events/ion_storm.dm b/code/modules/events/ion_storm.dm index 9eefcfd2ae04..12b641b080d5 100644 --- a/code/modules/events/ion_storm.dm +++ b/code/modules/events/ion_storm.dm @@ -37,8 +37,6 @@ /mob/living/silicon/ai/proc/generate_ion_law() var/list/players = list() for(var/mob/living/carbon/human/H as anything in human_list) - if(!H.simulated) - continue if(!H.mind || !H.client || H.client.inactivity > 10 MINUTES) continue players += H.real_name diff --git a/code/modules/events/roundstart_events/misc_events.dm b/code/modules/events/roundstart_events/misc_events.dm index ea6dde4c80ac..c3562edbec9c 100644 --- a/code/modules/events/roundstart_events/misc_events.dm +++ b/code/modules/events/roundstart_events/misc_events.dm @@ -1,7 +1,5 @@ /datum/event/feature/headset/start() for(var/mob/living/carbon/human/H as anything in human_list) - if(!H.simulated) - continue if((H.l_ear || H.r_ear) && prob(80) && !isanyantag(H)) var/headset_to_del = H.l_ear ? H.l_ear : H.r_ear message_admins("RoundStart Event: [headset_to_del] was removed from [H]") @@ -10,8 +8,6 @@ /datum/event/feature/survbox/start() for(var/mob/living/carbon/human/H as anything in human_list) - if(!H.simulated) - continue if(!prob(10) || isanyantag(H)) continue var/list/boxs = H.get_all_contents_type(/obj/item/weapon/storage/box/survival) diff --git a/code/modules/events/viral_infection.dm b/code/modules/events/viral_infection.dm index 02b2969283d4..387253b999eb 100644 --- a/code/modules/events/viral_infection.dm +++ b/code/modules/events/viral_infection.dm @@ -14,8 +14,6 @@ for(var/mob/living/carbon/human/H in shuffle(human_list)) if(!infected) break - if(!H.simulated) - continue if(!H.client || H.stat == DEAD || H.species.flags[VIRUS_IMMUNE]) continue if(prob(chance)) diff --git a/code/modules/flufftext/Hallucination.dm b/code/modules/flufftext/Hallucination.dm index 83b7f3a63c7f..4a689ab2e65b 100644 --- a/code/modules/flufftext/Hallucination.dm +++ b/code/modules/flufftext/Hallucination.dm @@ -431,8 +431,6 @@ var/global/list/non_fakeattack_weapons = list(/obj/item/weapon/gun/projectile, / var/clone_weapon = null for(var/mob/living/carbon/human/H as anything in human_list) - if(!H.simulated) - continue if(H.incapacitated()) continue // possible_clones += H diff --git a/code/modules/mob/living/carbon/human/human.dm b/code/modules/mob/living/carbon/human/human.dm index 50a5afa17984..1ccf8fb8d3c6 100644 --- a/code/modules/mob/living/carbon/human/human.dm +++ b/code/modules/mob/living/carbon/human/human.dm @@ -1195,8 +1195,6 @@ var/target = null //Chosen target. for(var/mob/living/carbon/human/M as anything in human_list) //#Z2 only carbon/human for now - if(!M.simulated) - continue var/name = M.real_name if(!(REMOTE_TALK in src.mutations)) count++ diff --git a/code/modules/mob/living/carbon/human/say.dm b/code/modules/mob/living/carbon/human/say.dm index 94067a5446c8..00683ce695df 100644 --- a/code/modules/mob/living/carbon/human/say.dm +++ b/code/modules/mob/living/carbon/human/say.dm @@ -149,8 +149,6 @@ for(var/mob/living/carbon/human/H as anything in human_list) if(!H.mind || H.species.name != ABDUCTOR) continue - if(!H.simulated) - continue var/datum/role/abductor/human = H.mind.GetRoleByType(/datum/role/abductor) if(!(human in A.faction.members)) continue diff --git a/code/modules/mob/living/carbon/human/zombie.dm b/code/modules/mob/living/carbon/human/zombie.dm index 374854bc5833..1cf28f14e95c 100644 --- a/code/modules/mob/living/carbon/human/zombie.dm +++ b/code/modules/mob/living/carbon/human/zombie.dm @@ -309,8 +309,6 @@ var/global/list/zombie_list = list() for(var/mob/living/carbon/human/H as anything in human_list) if(H.stat == DEAD || iszombie(H) || H.z != user.z) continue - if(!H.simulated) - continue var/turf/target_turf = get_turf(H) var/target_dist = get_dist(target_turf, self_turf) if(target_dist < min_dist) diff --git a/code/modules/nano/modules/crew_monitor.dm b/code/modules/nano/modules/crew_monitor.dm index c0255e8a29ea..90f9a21dbdbe 100644 --- a/code/modules/nano/modules/crew_monitor.dm +++ b/code/modules/nano/modules/crew_monitor.dm @@ -90,8 +90,6 @@ /obj/nano_module/crew_monitor/proc/scan() for(var/mob/living/carbon/human/H as anything in human_list) - if(!H.simulated) - continue var/obj/item/clothing/under/C if(isunder(H.w_uniform)) C = H.w_uniform From 470c0bf3747a50adcf4f4b66062fb921e5f42192 Mon Sep 17 00:00:00 2001 From: LudwigVonChesterfield <17705613+LudwigVonChesterfield@users.noreply.github.com> Date: Tue, 6 Jun 2023 22:04:46 -0400 Subject: [PATCH 28/36] removes processing from SSmobs, removes simulated check in Life --- code/game/machinery/manipulator.dm | 2 ++ code/modules/mob/living/carbon/human/life.dm | 2 -- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/code/game/machinery/manipulator.dm b/code/game/machinery/manipulator.dm index 586b25dedcf3..c096b1ac9aa3 100644 --- a/code/game/machinery/manipulator.dm +++ b/code/game/machinery/manipulator.dm @@ -185,6 +185,8 @@ if(is_operational() && !panel_open) add_overlay(status) + STOP_PROCESSING(SSmobs, src) + /obj/machinery/manipulator/RefreshParts() delay = 6 diff --git a/code/modules/mob/living/carbon/human/life.dm b/code/modules/mob/living/carbon/human/life.dm index 8f9ab36f9ddc..e417b4a22a97 100644 --- a/code/modules/mob/living/carbon/human/life.dm +++ b/code/modules/mob/living/carbon/human/life.dm @@ -10,8 +10,6 @@ return if(!loc) return // Fixing a null error that occurs when the mob isn't found in the world -- TLE - if(!simulated) - return ..() From 148d54f2b4640c0a68cd003689f114fcf8f22cad Mon Sep 17 00:00:00 2001 From: LudwigVonChesterfield <17705613+LudwigVonChesterfield@users.noreply.github.com> Date: Tue, 6 Jun 2023 22:09:09 -0400 Subject: [PATCH 29/36] Revert "removes processing from SSmobs, removes simulated check in Life" This reverts commit 470c0bf3747a50adcf4f4b66062fb921e5f42192. --- code/game/machinery/manipulator.dm | 2 -- code/modules/mob/living/carbon/human/life.dm | 2 ++ 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/code/game/machinery/manipulator.dm b/code/game/machinery/manipulator.dm index c096b1ac9aa3..586b25dedcf3 100644 --- a/code/game/machinery/manipulator.dm +++ b/code/game/machinery/manipulator.dm @@ -185,8 +185,6 @@ if(is_operational() && !panel_open) add_overlay(status) - STOP_PROCESSING(SSmobs, src) - /obj/machinery/manipulator/RefreshParts() delay = 6 diff --git a/code/modules/mob/living/carbon/human/life.dm b/code/modules/mob/living/carbon/human/life.dm index e417b4a22a97..8f9ab36f9ddc 100644 --- a/code/modules/mob/living/carbon/human/life.dm +++ b/code/modules/mob/living/carbon/human/life.dm @@ -10,6 +10,8 @@ return if(!loc) return // Fixing a null error that occurs when the mob isn't found in the world -- TLE + if(!simulated) + return ..() From 34dc9faa26784956ff0bd1165bfdd48fd4b4d916 Mon Sep 17 00:00:00 2001 From: LudwigVonChesterfield <17705613+LudwigVonChesterfield@users.noreply.github.com> Date: Wed, 7 Jun 2023 18:22:47 -0400 Subject: [PATCH 30/36] adding missing after_activate --- code/game/machinery/manipulator.dm | 1 + 1 file changed, 1 insertion(+) diff --git a/code/game/machinery/manipulator.dm b/code/game/machinery/manipulator.dm index 586b25dedcf3..f56afd230ace 100644 --- a/code/game/machinery/manipulator.dm +++ b/code/game/machinery/manipulator.dm @@ -691,6 +691,7 @@ set_state(MANIPULATOR_STATE_IDLE) do_sleep(delay) + after_activate() try_interact_from() /obj/machinery/manipulator/proc/try_interact_to(atom/target=null) From 5677fa57e3bba8145134d0a3c2d90b89f0cf5591 Mon Sep 17 00:00:00 2001 From: LudwigVonChesterfield <17705613+LudwigVonChesterfield@users.noreply.github.com> Date: Thu, 8 Jun 2023 13:19:36 -0400 Subject: [PATCH 31/36] the activator won't send after activation signal if nothing actually happened. --- code/game/machinery/manipulator.dm | 2 -- 1 file changed, 2 deletions(-) diff --git a/code/game/machinery/manipulator.dm b/code/game/machinery/manipulator.dm index f56afd230ace..ca7fc27068d4 100644 --- a/code/game/machinery/manipulator.dm +++ b/code/game/machinery/manipulator.dm @@ -663,14 +663,12 @@ if(!target && !forced) set_state(MANIPULATOR_STATE_IDLE) do_sleep(delay) - after_activate() return set_state(MANIPULATOR_STATE_INTERACTING_FROM) if(!do_sleep(delay, CALLBACK(src, /obj/machinery.proc/is_operational))) set_state(MANIPULATOR_STATE_IDLE) do_sleep(delay) - after_activate() return if(has_eyes) From af6ac51ca179828012b510cb6e6e68c14bc9f974 Mon Sep 17 00:00:00 2001 From: LudwigVonChesterfield <17705613+LudwigVonChesterfield@users.noreply.github.com> Date: Thu, 8 Jun 2023 13:53:08 -0400 Subject: [PATCH 32/36] you can't pulse cut wires, so auto activation is seperate now --- code/datums/wires/manipulator.dm | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/code/datums/wires/manipulator.dm b/code/datums/wires/manipulator.dm index e7b3422d4e22..2558946bf7f2 100644 --- a/code/datums/wires/manipulator.dm +++ b/code/datums/wires/manipulator.dm @@ -2,6 +2,7 @@ var/global/const/MANIPULATOR_WIRE_ACTIVATE = 1 var/global/const/MANIPULATOR_WIRE_AFTER_ACTIVATE = 2 var/global/const/MANIPULATOR_WIRE_CHANGE_TARGET_ZONE = 4 var/global/const/MANIPULATOR_WIRE_ATTACK_SELF_ON_INTERACTION = 8 +var/global/const/MANIPULATOR_WIRE_AUTO_ACTIVATION = 16 /datum/wires/manipulator holder_type = /obj/machinery/manipulator @@ -17,12 +18,13 @@ var/global/const/MANIPULATOR_WIRE_ATTACK_SELF_ON_INTERACTION = 8 . += ..() . += "Target selection screen displays: [parse_zone(M.target_zone)]" . += "The 'Activate Instead' light is [M.attack_self_interaction ? "on" : "off"]." + . += "The 'Auto Activation' light is [M.auto_activation ? "on" : "off"]." /datum/wires/manipulator/update_cut(index, mended) var/obj/machinery/manipulator/M = holder switch(index) - if(MANIPULATOR_WIRE_ACTIVATE) + if(MANIPULATOR_WIRE_AUTO_ACTIVATION) M.auto_activation = mended return From 8a13f8e562a642473928725ec90ffdd8181168fa Mon Sep 17 00:00:00 2001 From: LudwigVonChesterfield <17705613+LudwigVonChesterfield@users.noreply.github.com> Date: Sun, 13 Aug 2023 19:58:02 -0400 Subject: [PATCH 33/36] ghosts can't mirror --- code/game/machinery/manipulator.dm | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/code/game/machinery/manipulator.dm b/code/game/machinery/manipulator.dm index ca7fc27068d4..63e6a5c5887d 100644 --- a/code/game/machinery/manipulator.dm +++ b/code/game/machinery/manipulator.dm @@ -436,6 +436,9 @@ set desc = "Rotate the manipulator." set src in oview(1) + if(usr.incapacitated()) + return + if(state != MANIPULATOR_STATE_IDLE) to_chat(usr, "You cannot rotate [src] while it's working.") return @@ -454,6 +457,9 @@ set desc = "Mirror the manipulator." set src in oview(1) + if(usr.incapacitated()) + return + if(state != MANIPULATOR_STATE_IDLE) to_chat(usr, "You cannot mirror [src] while it's working.") return From 6f05597b6a48d0e0587e2f8b7cb61b40de15c94b Mon Sep 17 00:00:00 2001 From: LudwigVonChesterfield <17705613+LudwigVonChesterfield@users.noreply.github.com> Date: Wed, 6 Dec 2023 11:15:52 -0500 Subject: [PATCH 34/36] balance patches --- code/game/machinery/constructable_frame.dm | 3 +++ code/modules/mob/living/silicon/robot/robot.dm | 2 ++ 2 files changed, 5 insertions(+) diff --git a/code/game/machinery/constructable_frame.dm b/code/game/machinery/constructable_frame.dm index ddfde8949227..9880bc72d553 100644 --- a/code/game/machinery/constructable_frame.dm +++ b/code/game/machinery/constructable_frame.dm @@ -123,6 +123,9 @@ if(!anchored) to_chat(user, "The frame needs to be secured first!") return + if(issilicon(user) && istype(P, /obj/item/weapon/circuitboard/manipulator)) + to_chat(user, "Sorry! Automatic protocols preventing AI from becoming too powerful can't allow you to assemble this!") + return var/obj/item/weapon/circuitboard/B = P if(B.board_type == "machine") if(!user.drop_from_inventory(P, src)) diff --git a/code/modules/mob/living/silicon/robot/robot.dm b/code/modules/mob/living/silicon/robot/robot.dm index 60e07f87bd06..f874ff5351bc 100644 --- a/code/modules/mob/living/silicon/robot/robot.dm +++ b/code/modules/mob/living/silicon/robot/robot.dm @@ -784,6 +784,8 @@ to_chat(usr, "The borg must choose a module before he can be upgraded!") else if(U.locked) to_chat(usr, "The upgrade is locked and cannot be used yet!") + else if(cell) + to_chat(usr, "Remove the power cell first.") else if(U.action(src)) to_chat(usr, "You apply the upgrade to [src]!") From 6e0b182b0919de94b6af7ff0939c1b4a089184fb Mon Sep 17 00:00:00 2001 From: LudwigVonChesterfield <17705613+LudwigVonChesterfield@users.noreply.github.com> Date: Wed, 6 Dec 2023 11:36:51 -0500 Subject: [PATCH 35/36] just one more thing Avoids IC situations where borg players steal the manipulator for their nefarious uses, since preventing them to do that might lead to even stupider situations. --- code/game/machinery/manipulator.dm | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/code/game/machinery/manipulator.dm b/code/game/machinery/manipulator.dm index 63e6a5c5887d..b7da9d43041b 100644 --- a/code/game/machinery/manipulator.dm +++ b/code/game/machinery/manipulator.dm @@ -503,6 +503,10 @@ return else if(default_unfasten_wrench(user, I) && !busy_moving && state == MANIPULATOR_STATE_IDLE) + if(issilicon(user)) + to_chat(user, "Sorry! Automatic protocols preventing AI from becoming too powerful can't allow you to unwrench this!") + return + if(state != MANIPULATOR_STATE_IDLE) to_chat(user, "You cannot unwrench [src] while it's working.") return From 2ba250bbe730efe219cc6af004b03b14d0bceed0 Mon Sep 17 00:00:00 2001 From: LudwigVonChesterfield <17705613+LudwigVonChesterfield@users.noreply.github.com> Date: Wed, 6 Dec 2023 11:55:47 -0500 Subject: [PATCH 36/36] fixes unwrenching --- code/game/machinery/manipulator.dm | 27 +++++++++++++++------------ 1 file changed, 15 insertions(+), 12 deletions(-) diff --git a/code/game/machinery/manipulator.dm b/code/game/machinery/manipulator.dm index b7da9d43041b..c29cbd745d53 100644 --- a/code/game/machinery/manipulator.dm +++ b/code/game/machinery/manipulator.dm @@ -503,18 +503,6 @@ return else if(default_unfasten_wrench(user, I) && !busy_moving && state == MANIPULATOR_STATE_IDLE) - if(issilicon(user)) - to_chat(user, "Sorry! Automatic protocols preventing AI from becoming too powerful can't allow you to unwrench this!") - return - - if(state != MANIPULATOR_STATE_IDLE) - to_chat(user, "You cannot unwrench [src] while it's working.") - return - - if(busy_moving) - to_chat(user, "You cannot unwrench [src] while it's working.") - return - if(!panel_open) if(anchored) add_overlay(stat) @@ -534,6 +522,21 @@ return ..() +/obj/machinery/manipulator/default_unfasten_wrench(mob/user, obj/item/weapon/I, time = SKILL_TASK_VERY_EASY) + if(issilicon(user)) + to_chat(user, "Sorry! Automatic protocols preventing AI from becoming too powerful can't allow you to unwrench this!") + return FALSE + + if(state != MANIPULATOR_STATE_IDLE) + to_chat(user, "You cannot unwrench [src] while it's working.") + return FALSE + + if(busy_moving) + to_chat(user, "You cannot unwrench [src] while it's working.") + return FALSE + + return ..() + /obj/machinery/manipulator/proc/create_clicker() clicker = new /mob/living/carbon/human/bluespace(src) clicker.simulated = FALSE
NameFingerprints
[H][md5(H.dna.uni_identity)]