From 72694b5030da10876f3909d6592a54710b84bc2b Mon Sep 17 00:00:00 2001 From: duncathan Date: Fri, 26 Jun 2015 21:49:24 -0600 Subject: [PATCH 1/2] refactors update_icon for trinary devices the base trinary update_icon now adds pipes in the same way all other atmos components do no longer overrides icon_addbroken and icon_addintact with its own silly pipe + cap overlay used for filters and mixers filters and mixers are now oop in terms of icon_addintact (not as much in terms of icon_addbroken) --- .../components/trinary_devices/filter.dm | 17 +++++++++++++++++ .../components/trinary_devices/mixer.dm | 15 +++++++++++++++ .../components/trinary_devices/trinary_base.dm | 14 +------------- 3 files changed, 33 insertions(+), 13 deletions(-) diff --git a/code/ATMOSPHERICS/components/trinary_devices/filter.dm b/code/ATMOSPHERICS/components/trinary_devices/filter.dm index e988e113c08..5fe5817b52c 100644 --- a/code/ATMOSPHERICS/components/trinary_devices/filter.dm +++ b/code/ATMOSPHERICS/components/trinary_devices/filter.dm @@ -49,7 +49,24 @@ Filter types: radio_controller.remove_object(src,frequency) ..() +/obj/machinery/atmospherics/trinary/filter/icon_addintact(var/obj/machinery/atmospherics/node, var/connected) + var/image/img = getpipeimage('icons/obj/atmospherics/trinary_devices.dmi', "cap", get_dir(src,node), node.pipe_color) + overlays += img + return ..() + +/obj/machinery/atmospherics/trinary/filter/icon_addbroken(var/connected) + var/unconnected = (~connected) & initialize_directions + for(var/direction in cardinal) + if(unconnected & direction) + underlays += getpipeimage('icons/obj/atmospherics/binary_devices.dmi', "pipe_exposed", direction) + overlays += getpipeimage('icons/obj/atmospherics/trinary_devices.dmi', "cap", direction) + +/obj/machinery/atmospherics/trinary/filter/update_icon() + overlays.Cut() + ..() + /obj/machinery/atmospherics/trinary/filter/update_icon_nopipes() + if(!(stat & NOPOWER) && on && node1 && node2 && node3) icon_state = "filter_on[flipped?"_f":""]" return diff --git a/code/ATMOSPHERICS/components/trinary_devices/mixer.dm b/code/ATMOSPHERICS/components/trinary_devices/mixer.dm index e80c0c7654b..07a5ae8278e 100644 --- a/code/ATMOSPHERICS/components/trinary_devices/mixer.dm +++ b/code/ATMOSPHERICS/components/trinary_devices/mixer.dm @@ -20,6 +20,21 @@ icon_state = "mixer_off_f" flipped = 1 +/obj/machinery/atmospherics/trinary/mixer/icon_addintact(var/obj/machinery/atmospherics/node, var/connected) + var/image/img = getpipeimage('icons/obj/atmospherics/trinary_devices.dmi', "cap", get_dir(src,node), node.pipe_color) + overlays += img + return ..() + +/obj/machinery/atmospherics/trinary/mixer/icon_addbroken(var/connected) + var/unconnected = (~connected) & initialize_directions + for(var/direction in cardinal) + if(unconnected & direction) + underlays += getpipeimage('icons/obj/atmospherics/binary_devices.dmi', "pipe_exposed", direction) + overlays += getpipeimage('icons/obj/atmospherics/trinary_devices.dmi', "cap", direction) + +/obj/machinery/atmospherics/trinary/mixer/update_icon() + overlays.Cut() + ..() /obj/machinery/atmospherics/trinary/mixer/update_icon_nopipes() if(!(stat & NOPOWER) && on && node1 && node2 && node3) diff --git a/code/ATMOSPHERICS/components/trinary_devices/trinary_base.dm b/code/ATMOSPHERICS/components/trinary_devices/trinary_base.dm index c0faefa71d6..97edb62a8d9 100644 --- a/code/ATMOSPHERICS/components/trinary_devices/trinary_base.dm +++ b/code/ATMOSPHERICS/components/trinary_devices/trinary_base.dm @@ -45,23 +45,11 @@ Iconnery /obj/machinery/atmospherics/trinary/proc/update_icon_nopipes() return -/obj/machinery/atmospherics/trinary/icon_addintact(var/obj/machinery/atmospherics/node, var/connected) - var/image/img = getpipeimage('icons/obj/atmospherics/trinary_devices.dmi', "intact", get_dir(src,node), node.pipe_color) - overlays += img - - return connected | img.dir - -/obj/machinery/atmospherics/trinary/icon_addbroken(var/connected) - var/unconnected = (~connected) & initialize_directions - for(var/direction in cardinal) - if(unconnected & direction) - overlays += getpipeimage('icons/obj/atmospherics/trinary_devices.dmi', "intact", direction) - /obj/machinery/atmospherics/trinary/update_icon() update_icon_nopipes() var/connected = 0 - overlays.Cut() + underlays.Cut() //Add non-broken pieces if(node1) From 50fb67ca65c554890d538825194d496d7118f437 Mon Sep 17 00:00:00 2001 From: duncathan Date: Thu, 16 Jul 2015 16:07:22 -0600 Subject: [PATCH 2/2] how can one man be so bad at git --- code/game/objects/items/weapons/RPD.dm | 2 +- html/changelogs/dunc-fuck.yml | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) create mode 100644 html/changelogs/dunc-fuck.yml diff --git a/code/game/objects/items/weapons/RPD.dm b/code/game/objects/items/weapons/RPD.dm index 2320d528651..91c8e9cc2b9 100644 --- a/code/game/objects/items/weapons/RPD.dm +++ b/code/game/objects/items/weapons/RPD.dm @@ -575,7 +575,7 @@ var/global/list/RPD_recipes=list( return 0 user << "You start building pipes..." playsound(get_turf(src), 'sound/machines/click.ogg', 50, 1) - if(do_after(user, 2, target = A)) + if(do_after(user, 20, target = A)) var/obj/structure/disposalconstruct/C = new (A, queued_p_type ,queued_p_dir) if(!C.can_place()) diff --git a/html/changelogs/dunc-fuck.yml b/html/changelogs/dunc-fuck.yml new file mode 100644 index 00000000000..cbae18a5cc5 --- /dev/null +++ b/html/changelogs/dunc-fuck.yml @@ -0,0 +1,6 @@ +author: duncathan + +delete-after: true + +changes: + - tweak: "Restores RPD delay on disposals machines." \ No newline at end of file