diff --git a/code/game/objects/items/weapons/storage/belt.dm b/code/game/objects/items/weapons/storage/belt.dm index 5b6a0ddc4b..1613fa2459 100644 --- a/code/game/objects/items/weapons/storage/belt.dm +++ b/code/game/objects/items/weapons/storage/belt.dm @@ -14,6 +14,7 @@ icon_state = "utilitybelt" item_state = "utility" can_hold = list( + "/obj/item/weapon/combitool", "/obj/item/weapon/crowbar", "/obj/item/weapon/screwdriver", "/obj/item/weapon/weldingtool", diff --git a/code/game/objects/items/weapons/tools.dm b/code/game/objects/items/weapons/tools.dm index 214044a88e..2165a6bfa4 100644 --- a/code/game/objects/items/weapons/tools.dm +++ b/code/game/objects/items/weapons/tools.dm @@ -478,6 +478,7 @@ desc = "It even has one of those nubbins for doing the thingy." icon = 'icons/obj/items.dmi' icon_state = "combitool" + w_class = 2 var/list/spawn_tools = list( /obj/item/weapon/screwdriver, @@ -511,11 +512,17 @@ user << "You switch \the [src] to the [tool.name] fitting." return 1 -/obj/item/weapon/combitool/attack(var/atom/target, var/mob/living/user) +/obj/item/weapon/combitool/attack(mob/living/carbon/M as mob, mob/living/carbon/user as mob) var/obj/item/tool = tools[current_tool] - if(!tool) - return ..() + if(!tool) return 0 + return (tool ? tool.attack(M,user) : 0) + +/obj/item/weapon/combitool/afterattack(var/atom/target, var/mob/living/user, proximity, params) + var/obj/item/tool = tools[current_tool] + if(!tool) return 0 + tool.loc = user var/resolved = target.attackby(tool,user) if(!resolved && tool && target) tool.afterattack(target,user,1) - return 1 \ No newline at end of file + if(tool) + tool.loc = src \ No newline at end of file diff --git a/code/modules/client/preferences_gear.dm b/code/modules/client/preferences_gear.dm index 3c92df50f4..663e3f785c 100644 --- a/code/modules/client/preferences_gear.dm +++ b/code/modules/client/preferences_gear.dm @@ -815,6 +815,11 @@ var/global/list/gear_datums = list() sort_category = "misc" cost = 2 +/datum/gear/combitool + display_name = "combi-tool" + path = /obj/item/weapon/combitool + cost = 3 + // Stuff worn on the ears. Items here go in the "ears" sort_category but they must not use // the slot_r_ear or slot_l_ear as the slot, or else players will spawn with no headset. /datum/gear/skrell_chain