From 2e95bbd59921471200e22326df5866c502422cc6 Mon Sep 17 00:00:00 2001 From: kevinz000 <2003111+kevinz000@users.noreply.github.com> Date: Fri, 10 Apr 2020 19:38:02 -0700 Subject: [PATCH] rig --- code/game/objects/items/stacks/stack.dm | 19 ++++++------------- .../spacesuits/rig/modules/computer.dm | 2 +- .../spacesuits/rig/modules/modules.dm | 5 ++--- code/modules/recycling/conveyor2.dm | 6 ++++++ 4 files changed, 15 insertions(+), 17 deletions(-) diff --git a/code/game/objects/items/stacks/stack.dm b/code/game/objects/items/stacks/stack.dm index 4ec2cd4f76f..1ae395b0c54 100644 --- a/code/game/objects/items/stacks/stack.dm +++ b/code/game/objects/items/stacks/stack.dm @@ -336,20 +336,10 @@ break /obj/item/stack/attack_hand(mob/user as mob) - if (user.get_inactive_hand() == src) - var/N = input("How many stacks of [src] would you like to split off? There are currently [amount].", "Split stacks", 1) as num|null - if(N) - var/obj/item/stack/F = src.split(N) - if (F) - user.put_in_hands(F) - src.add_fingerprint(user) - F.add_fingerprint(user) - spawn(0) - if (src && usr.machine==src) - src.interact(usr) + if(user.get_inactive_hand() == src) + change_stack(user, 1) else - ..() - return + return ..() /obj/item/stack/Crossed(obj/o) if(istype(o, stacktype) && !o.throwing) @@ -388,6 +378,9 @@ . = ..() if(!istype(user) || !in_range(user, src) || !user.canmove) return + attempt_split_stack(user) + +/obj/item/stack/proc/attempt_split_stack(mob/living/user) if(uses_charge) return else diff --git a/code/modules/clothing/spacesuits/rig/modules/computer.dm b/code/modules/clothing/spacesuits/rig/modules/computer.dm index 9308e44cb06..cc6f0e8da31 100644 --- a/code/modules/clothing/spacesuits/rig/modules/computer.dm +++ b/code/modules/clothing/spacesuits/rig/modules/computer.dm @@ -56,7 +56,7 @@ /mob/living/Stat() . = ..() - if(. && get_rig_stats) + if(get_rig_stats) var/obj/item/weapon/rig/rig = get_rig() if(rig) SetupStat(rig) diff --git a/code/modules/clothing/spacesuits/rig/modules/modules.dm b/code/modules/clothing/spacesuits/rig/modules/modules.dm index 0e0e366d82b..c1e6b08d569 100644 --- a/code/modules/clothing/spacesuits/rig/modules/modules.dm +++ b/code/modules/clothing/spacesuits/rig/modules/modules.dm @@ -230,12 +230,11 @@ /mob/living/carbon/human/Stat() . = ..() - - if(. && istype(back,/obj/item/weapon/rig)) + if(istype(back,/obj/item/weapon/rig)) var/obj/item/weapon/rig/R = back SetupStat(R) - else if(. && istype(belt,/obj/item/weapon/rig)) + else if(istype(belt,/obj/item/weapon/rig)) var/obj/item/weapon/rig/R = belt SetupStat(R) diff --git a/code/modules/recycling/conveyor2.dm b/code/modules/recycling/conveyor2.dm index f25d60753a9..98064489fe8 100644 --- a/code/modules/recycling/conveyor2.dm +++ b/code/modules/recycling/conveyor2.dm @@ -45,6 +45,12 @@ component_parts += new /obj/item/weapon/stock_parts/motor(src) component_parts += new /obj/item/stack/cable_coil(src,5) RefreshParts() + processing_machines -= src //heck off this needs to be removed/machine process() renamed + START_PROCESSING(SSfastprocess, src) + +/obj/machinery/conveyor/Destroy() + STOP_PROCESSING(SSfastprocess, src) + return ..() /obj/machinery/conveyor/proc/setmove() if(operating == FORWARDS)