sorters! one-way setting! brazen code borrowing!

This commit is contained in:
Hatterhat
2022-12-29 20:18:34 -06:00
parent 746885b2ae
commit 34eaf93a01
6 changed files with 221 additions and 2 deletions
+29
View File
@@ -308,6 +308,7 @@ GLOBAL_LIST_EMPTY(conveyors_by_id)
S.update_icon()
CHECK_TICK
/*
/obj/machinery/conveyor_switch/attackby(obj/item/I, mob/user, params)
if(I.tool_behaviour == TOOL_CROWBAR)
var/obj/item/conveyor_switch_construct/C = new/obj/item/conveyor_switch_construct(src.loc)
@@ -315,6 +316,34 @@ GLOBAL_LIST_EMPTY(conveyors_by_id)
transfer_fingerprints_to(C)
to_chat(user, "<span class='notice'>You detach the conveyor switch.</span>")
qdel(src)
*/
/obj/machinery/conveyor_switch/crowbar_act(mob/user, obj/item/tool)
tool.play_tool_sound(src, 50)
var/obj/item/conveyor_switch_construct/switch_construct = new/obj/item/conveyor_switch_construct(src.loc)
switch_construct.id = id
transfer_fingerprints_to(switch_construct)
to_chat(user, span_notice("You detach [src]."))
qdel(src)
return TRUE
/obj/machinery/conveyor_switch/screwdriver_act(mob/user, obj/item/tool)
tool.play_tool_sound(src, 50)
oneway = !oneway
to_chat(user, span_notice("You set [src] to [oneway ? "one way" : "default"] configuration."))
return TRUE
/obj/machinery/conveyor_switch/wrench_act(mob/user, obj/item/tool)
tool.play_tool_sound(src, 50)
invert_icon = !invert_icon
update_appearance()
to_chat(user, span_notice("You set [src] to [invert_icon ? "inverted": "normal"] position."))
return TRUE
/obj/machinery/conveyor_switch/examine(mob/user)
. = ..()
. += span_notice("[src] is set to [oneway ? "one way" : "default"] configuration. It can be changed with a <b>screwdriver</b>.")
. += span_notice("[src] is set to [invert_icon ? "inverted": "normal"] position. It can be rotated with a <b>wrench</b>.")
/obj/machinery/conveyor_switch/oneway
icon_state = "conveyor_switch_oneway"