diff --git a/code/_globalvars/bitfields.dm b/code/_globalvars/bitfields.dm index f5c2f1ff26f..548cf0489b7 100644 --- a/code/_globalvars/bitfields.dm +++ b/code/_globalvars/bitfields.dm @@ -76,7 +76,8 @@ GLOBAL_LIST_INIT(bitfields, list( "INTERACT_MACHINE_WIRES_IF_OPEN" = INTERACT_MACHINE_WIRES_IF_OPEN, "INTERACT_MACHINE_ALLOW_SILICON" = INTERACT_MACHINE_ALLOW_SILICON, "INTERACT_MACHINE_OPEN_SILICON" = INTERACT_MACHINE_OPEN_SILICON, - "INTERACT_MACHINE_REQUIRES_SILICON" = INTERACT_MACHINE_REQUIRES_SILICON + "INTERACT_MACHINE_REQUIRES_SILICON" = INTERACT_MACHINE_REQUIRES_SILICON, + "INTERACT_MACHINE_SET_MACHINE" = INTERACT_MACHINE_SET_MACHINE ), "pass_flags" = list( "PASSTABLE" = PASSTABLE, diff --git a/code/game/machinery/computer/law.dm b/code/game/machinery/computer/law.dm index e761c400db6..25b82ac143a 100644 --- a/code/game/machinery/computer/law.dm +++ b/code/game/machinery/computer/law.dm @@ -35,11 +35,7 @@ desc = "Used to upload laws to the AI." circuit = /obj/item/circuitboard/computer/aiupload -/obj/machinery/computer/upload/ai/attack_hand(mob/user) - . = ..() - if(.) - return - +/obj/machinery/computer/upload/ai/interact(mob/user) src.current = select_active_ai(user) if (!src.current) @@ -60,11 +56,7 @@ desc = "Used to upload laws to Cyborgs." circuit = /obj/item/circuitboard/computer/borgupload -/obj/machinery/computer/upload/borg/attack_hand(mob/user) - . = ..() - if(.) - return - +/obj/machinery/computer/upload/borg/interact(mob/user) src.current = select_active_free_borg(user) if(!src.current) diff --git a/code/game/machinery/doors/windowdoor.dm b/code/game/machinery/doors/windowdoor.dm index b2199753508..702583d01a1 100644 --- a/code/game/machinery/doors/windowdoor.dm +++ b/code/game/machinery/doors/windowdoor.dm @@ -14,6 +14,7 @@ flags_1 = ON_BORDER_1 opacity = 0 CanAtmosPass = ATMOS_PASS_PROC + interaction_flags_machine = INTERACT_MACHINE_WIRES_IF_OPEN | INTERACT_MACHINE_ALLOW_SILICON | INTERACT_MACHINE_OPEN_SILICON | INTERACT_MACHINE_REQUIRES_SILICON | INTERACT_MACHINE_OPEN var/obj/item/electronics/airlock/electronics = null var/reinf = 0 var/shards = 2 @@ -277,6 +278,9 @@ return return ..() +/obj/machinery/door/window/interact(mob/user) //for sillycones + try_to_activate_door(user) + /obj/machinery/door/window/try_to_crowbar(obj/item/I, mob/user) if(!hasPower()) if(density) diff --git a/code/game/machinery/embedded_controller/access_controller.dm b/code/game/machinery/embedded_controller/access_controller.dm index c891dfb4e7f..63b7f2caebc 100644 --- a/code/game/machinery/embedded_controller/access_controller.dm +++ b/code/game/machinery/embedded_controller/access_controller.dm @@ -58,10 +58,7 @@ door = I break -/obj/machinery/doorButtons/access_button/attack_hand(mob/user) - . = ..() - if(.) - return +/obj/machinery/doorButtons/access_button/interact(mob/user) if(busy) return if(!allowed(user)) @@ -260,10 +257,7 @@ else icon_state = "access_control_standby" -/obj/machinery/doorButtons/airlock_controller/attack_hand(mob/user) - . = ..() - if(.) - return +/obj/machinery/doorButtons/airlock_controller/ui_interact(mob/user) var/datum/browser/popup = new(user, "computer", name) popup.set_title_image(user.browse_rsc_icon(src.icon, src.icon_state)) popup.set_content(returnText()) diff --git a/code/game/objects/structures/watercloset.dm b/code/game/objects/structures/watercloset.dm index 456acb6c992..8a90bfe2ad9 100644 --- a/code/game/objects/structures/watercloset.dm +++ b/code/game/objects/structures/watercloset.dm @@ -234,10 +234,7 @@ anchored = TRUE mouse_opacity = MOUSE_OPACITY_TRANSPARENT -/obj/machinery/shower/attack_hand(mob/M) - . = ..() - if(.) - return +/obj/machinery/shower/interact(mob/M) on = !on update_icon() add_fingerprint(M) diff --git a/code/modules/recycling/conveyor2.dm b/code/modules/recycling/conveyor2.dm index 759c048ab63..c3dfc409f46 100644 --- a/code/modules/recycling/conveyor2.dm +++ b/code/modules/recycling/conveyor2.dm @@ -268,10 +268,7 @@ GLOBAL_LIST_EMPTY(conveyors_by_id) CHECK_TICK // attack with hand, switch position -/obj/machinery/conveyor_switch/attack_hand(mob/user) - . = ..() - if(.) - return +/obj/machinery/conveyor_switch/interact(mob/user) add_fingerprint(user) if(position == 0) if(convdir) //is it a oneway switch diff --git a/code/modules/recycling/disposal/bin.dm b/code/modules/recycling/disposal/bin.dm index 99c2784ebf8..e656b616ddd 100644 --- a/code/modules/recycling/disposal/bin.dm +++ b/code/modules/recycling/disposal/bin.dm @@ -9,7 +9,8 @@ armor = list("melee" = 25, "bullet" = 10, "laser" = 10, "energy" = 100, "bomb" = 0, "bio" = 100, "rad" = 100, "fire" = 90, "acid" = 30) max_integrity = 200 resistance_flags = FIRE_PROOF - interaction_flags_machine = INTERACT_MACHINE_OPEN + interaction_flags_machine = INTERACT_MACHINE_OPEN | INTERACT_MACHINE_WIRES_IF_OPEN | INTERACT_MACHINE_ALLOW_SILICON | INTERACT_MACHINE_OPEN_SILICON + obj_flags = CAN_BE_HIT | USES_TGUI var/datum/gas_mixture/air_contents // internal reservoir var/full_pressure = FALSE var/pressure_charging = TRUE @@ -280,7 +281,7 @@ // handle machine interaction /obj/machinery/disposal/bin/ui_interact(mob/user, ui_key = "main", datum/tgui/ui = null, force_open = FALSE, \ - datum/tgui/master_ui = null, datum/ui_state/state = GLOB.notcontained_state) + datum/tgui/master_ui = null, datum/ui_state/state = GLOB.default_state) if(stat & BROKEN) return ui = SStgui.try_update_ui(user, src, ui_key, ui, force_open)