From c066120fc07ded5d1098a1af47814664a380ad57 Mon Sep 17 00:00:00 2001 From: Evsey Antonovich Date: Thu, 8 Feb 2018 14:10:48 +0500 Subject: [PATCH 1/2] Circuit drone + grabber/thrower balance changes (#34834) * makes grabbers bulky and inventory max bulky * makes circuit drones bulky * removes drone stacking * made grabbers max w class based on drone assembly, changed their w class back to small * review stuff * makes throwers max_w_class depend on assembly size * uh * kills sheer heart attack * fuck off * FUCK * GR --- .../integrated_electronics/core/assemblies.dm | 2 +- .../subtypes/manipulation.dm | 21 +++++++++++++------ 2 files changed, 16 insertions(+), 7 deletions(-) diff --git a/code/modules/integrated_electronics/core/assemblies.dm b/code/modules/integrated_electronics/core/assemblies.dm index f88c197120..351c42917c 100644 --- a/code/modules/integrated_electronics/core/assemblies.dm +++ b/code/modules/integrated_electronics/core/assemblies.dm @@ -491,7 +491,7 @@ name = "electronic drone" icon_state = "setup_drone" desc = "It's a case, for building mobile electronics with." - w_class = WEIGHT_CLASS_SMALL + w_class = WEIGHT_CLASS_BULKY max_components = IC_MAX_SIZE_BASE * 3 max_complexity = IC_COMPLEXITY_BASE * 3 diff --git a/code/modules/integrated_electronics/subtypes/manipulation.dm b/code/modules/integrated_electronics/subtypes/manipulation.dm index 0daed12bce..c14278bd19 100644 --- a/code/modules/integrated_electronics/subtypes/manipulation.dm +++ b/code/modules/integrated_electronics/subtypes/manipulation.dm @@ -292,7 +292,7 @@ /obj/item/integrated_circuit/manipulation/grabber name = "grabber" - desc = "A circuit which is used to grab and store tiny to small objects within it's self-contained inventory." + desc = "A circuit with it's own inventory for items, used to grab and store things." icon_state = "grabber" extended_desc = "The circuit accepts a reference to an object to be grabbed and can store up to 10 objects. Modes: 1 to grab, 0 to eject the first object, and -1 to eject all objects." w_class = WEIGHT_CLASS_SMALL @@ -304,19 +304,28 @@ activators = list("pulse in" = IC_PINTYPE_PULSE_IN,"pulse out" = IC_PINTYPE_PULSE_OUT) spawn_flags = IC_SPAWN_RESEARCH power_draw_per_use = 50 - var/max_w_class = WEIGHT_CLASS_NORMAL var/max_items = 10 - /obj/item/integrated_circuit/manipulation/grabber/do_work() + var/max_w_class = assembly.w_class var/atom/movable/acting_object = get_object() var/turf/T = get_turf(acting_object) var/obj/item/AM = get_pin_data_as_type(IC_INPUT, 1, /obj/item) if(AM) var/mode = get_pin_data(IC_INPUT, 2) - if(mode == 1) if(check_target(AM)) - if((contents.len < max_items) && (!max_w_class || AM.w_class <= max_w_class)) + var/weightcheck = FALSE + if ((!istype(AM,/obj/item/device/electronic_assembly/)) && (!istype(AM,/obj/item/device/transfer_valve))) + if (AM.w_class <= max_w_class) + weightcheck = TRUE + else + weightcheck = FALSE + else + if (AM.w_class < max_w_class) + weightcheck = TRUE + else + weightcheck = FALSE + if((contents.len < max_items) && (weightcheck)) AM.forceMove(src) if(mode == 0) if(contents.len) @@ -408,9 +417,9 @@ ) spawn_flags = IC_SPAWN_RESEARCH power_draw_per_use = 50 - var/max_w_class = WEIGHT_CLASS_NORMAL /obj/item/integrated_circuit/manipulation/thrower/do_work() + var/max_w_class = assembly.w_class var/target_x_rel = round(get_pin_data(IC_INPUT, 1)) var/target_y_rel = round(get_pin_data(IC_INPUT, 2)) var/obj/item/A = get_pin_data_as_type(IC_INPUT, 3, /obj/item)