diff --git a/code/_macros.dm b/code/_macros.dm index e423455e9a..ccde7c963d 100644 --- a/code/_macros.dm +++ b/code/_macros.dm @@ -28,5 +28,6 @@ #define JOINTEXT(X) jointext(X, null) #define isbelly(A) istype(A, /obj/belly) +#define isrobotmultibelt(A) istype(A, /obj/item/robotic_multibelt) #define isgripperpocket(A) istype(A, /obj/item/storage/internal/gripper) #define iscapturecrystal(A) istype(A, /obj/item/capture_crystal) diff --git a/code/game/objects/items/weapons/tools/weldingtool.dm b/code/game/objects/items/weapons/tools/weldingtool.dm index ae88fb457f..e32f23c1ef 100644 --- a/code/game/objects/items/weapons/tools/weldingtool.dm +++ b/code/game/objects/items/weapons/tools/weldingtool.dm @@ -636,7 +636,7 @@ ..() /obj/item/weldingtool/electric/proc/get_external_power_supply() - if(istype(src.loc, /obj/item/robotic_multibelt)) //We are in a multibelt + if(isrobotmultibelt(src.loc)) //We are in a multibelt if(istype(src.loc.loc, /mob/living/silicon/robot)) //We are in a multibelt that is in a robot! This is sanity in case someone spawns a multibelt in via admin commands. var/mob/living/silicon/robot/R = src.loc.loc return R.cell diff --git a/code/modules/mob/living/silicon/robot/inventory.dm b/code/modules/mob/living/silicon/robot/inventory.dm index 6c617a9111..56f38c1cb3 100644 --- a/code/modules/mob/living/silicon/robot/inventory.dm +++ b/code/modules/mob/living/silicon/robot/inventory.dm @@ -5,7 +5,7 @@ /mob/living/silicon/robot/get_active_hand(atom/A) if(module_active == A) //If we are interacting with the item itself (I.E swapping multibelt items) return module_active - else if(istype(module_active, /obj/item/robotic_multibelt)) //If we are hitting something with a multibelt + else if(isrobotmultibelt(module_active)) //If we are hitting something with a multibelt var/obj/item/robotic_multibelt/belt = module_active if(belt.selected_item) return belt.selected_item @@ -29,7 +29,7 @@ return if(module_state_1 == I) - if(istype(module_state_1,/obj/item/robotic_multibelt)) + if(isrobotmultibelt(module_state_1)) var/obj/item/robotic_multibelt/toolbelt = module_state_1 toolbelt.original_state() if(istype(module_state_1,/obj/item/borg/sight)) @@ -42,7 +42,7 @@ module_state_1 = null inv1.icon_state = "inv1" else if(module_state_2 == I) - if(istype(module_state_2,/obj/item/robotic_multibelt)) + if(isrobotmultibelt(module_state_2)) var/obj/item/robotic_multibelt/toolbelt = module_state_2 toolbelt.original_state() if(istype(module_state_2,/obj/item/borg/sight)) @@ -55,7 +55,7 @@ module_state_2 = null inv2.icon_state = "inv2" else if(module_state_3 == I) - if(istype(module_state_3,/obj/item/robotic_multibelt)) + if(isrobotmultibelt(module_state_3)) var/obj/item/robotic_multibelt/toolbelt = module_state_3 toolbelt.original_state() if(istype(module_state_3,/obj/item/borg/sight)) diff --git a/code/modules/mob/living/silicon/robot/robot_simple_items.dm b/code/modules/mob/living/silicon/robot/robot_simple_items.dm index 9b3748e3ef..2fa7fb0354 100644 --- a/code/modules/mob/living/silicon/robot/robot_simple_items.dm +++ b/code/modules/mob/living/silicon/robot/robot_simple_items.dm @@ -166,7 +166,7 @@ /obj/item/weldingtool/electric/mounted/cyborg/update_icon() . = ..() - if(istype(loc, /obj/item/robotic_multibelt)) + if(isrobotmultibelt(loc)) var/obj/item/robotic_multibelt/our_belt = loc if(welding) our_belt.add_overlay("indwelder_cyborg-on") @@ -226,7 +226,7 @@ var/selected_type = tgui_input_list(user, "Pick new colour.", "Cable Colour", GLOB.possible_cable_coil_colours) set_cable_color(selected_type, user) - if(istype(loc, /obj/item/robotic_multibelt)) + if(isrobotmultibelt(loc)) var/obj/item/robotic_multibelt/our_belt = loc var/image/cable_image = our_belt.integrated_tool_images[name] cable_image.color = color diff --git a/code/modules/tgui/states/inventory.dm b/code/modules/tgui/states/inventory.dm index 37b8616181..5726210cd2 100644 --- a/code/modules/tgui/states/inventory.dm +++ b/code/modules/tgui/states/inventory.dm @@ -7,11 +7,12 @@ * tgui state: inventory_state * * Checks that the src_object is in the user's top-level (hand, ear, pocket, belt, etc) inventory. + * Or part of a robotic toolbelt. **/ GLOBAL_DATUM_INIT(tgui_inventory_state, /datum/tgui_state/inventory_state, new) -/datum/tgui_state/inventory_state/can_use_topic(src_object, mob/user) - if(!(src_object in user)) +/datum/tgui_state/inventory_state/can_use_topic(atom/src_object, mob/user) + if(!(src_object in user) && !(isrobotmultibelt(src_object.loc))) return STATUS_CLOSE return user.shared_tgui_interaction(src_object) diff --git a/tgui/packages/tgui/interfaces/PlantAnalyzer.tsx b/tgui/packages/tgui/interfaces/PlantAnalyzer.tsx index cec799222b..d608bc15aa 100644 --- a/tgui/packages/tgui/interfaces/PlantAnalyzer.tsx +++ b/tgui/packages/tgui/interfaces/PlantAnalyzer.tsx @@ -35,7 +35,7 @@ export const PlantAnalyzer = (props) => { // Resizable just in case the calculatedHeight fails return ( - + @@ -57,6 +57,8 @@ const PlantAnalyzerContent = (props) => { return (