diff --git a/code/game/objects/items/storage/belt.dm b/code/game/objects/items/storage/belt.dm index 646db15c74..25dd746008 100755 --- a/code/game/objects/items/storage/belt.dm +++ b/code/game/objects/items/storage/belt.dm @@ -581,6 +581,7 @@ /obj/item/key/janitor, /obj/item/clothing/gloves, /obj/item/melee/flyswatter, + /obj/item/twohanded/broom, /obj/item/paint/paint_remover, /obj/item/assembly/mousetrap, /obj/item/screwdriver, diff --git a/code/game/objects/items/twohanded.dm b/code/game/objects/items/twohanded.dm index a551f642d0..72a5c5b1da 100644 --- a/code/game/objects/items/twohanded.dm +++ b/code/game/objects/items/twohanded.dm @@ -1016,3 +1016,66 @@ C.change_view(CONFIG_GET(string/default_view)) user.client.pixel_x = 0 user.client.pixel_y = 0 + +/obj/item/twohanded/broom + name = "broom" + desc = "This is my BROOMSTICK! It can be used manually or braced with two hands to sweep items as you move. It has a telescopic handle for compact storage." //LIES + icon = 'icons/obj/janitor.dmi' + icon_state = "broom0" + lefthand_file = 'icons/mob/inhands/equipment/custodial_lefthand.dmi' + righthand_file = 'icons/mob/inhands/equipment/custodial_righthand.dmi' + force = 8 + throwforce = 10 + throw_speed = 3 + throw_range = 7 + w_class = WEIGHT_CLASS_NORMAL + force_unwielded = 8 + force_wielded = 12 + attack_verb = list("swept", "brushed off", "bludgeoned", "whacked") + resistance_flags = FLAMMABLE + +/obj/item/twohanded/broom/update_icon_state() + icon_state = "broom[wielded]" + +/obj/item/twohanded/broom/wield(mob/user) + . = ..() + if(!wielded) + return + to_chat(user, "You brace the [src] against the ground in a firm sweeping stance.") + RegisterSignal(user, COMSIG_MOVABLE_MOVED, .proc/sweep) + +/obj/item/twohanded/broom/unwield(mob/user) + . = ..() + UnregisterSignal(user, COMSIG_MOVABLE_MOVED) + +/obj/item/twohanded/broom/afterattack(atom/A, mob/user, proximity) + . = ..() + if(!proximity) + return + sweep(user, A, FALSE) + +/obj/item/twohanded/broom/proc/sweep(mob/user, atom/A, moving = TRUE) + var/turf/target + if (!moving) + if (isturf(A)) + target = A + else + target = A.loc + else + target = user.loc + if (locate(/obj/structure/table) in target.contents) + return + var/i = 0 + for(var/obj/item/garbage in target.contents) + if(!garbage.anchored) + garbage.Move(get_step(target, user.dir), user.dir) + i++ + if(i >= 20) + break + if(i >= 1) + playsound(loc, 'sound/weapons/thudswoosh.ogg', 5, TRUE, -1) + +/obj/item/twohanded/broom/proc/janicart_insert(mob/user, obj/structure/janitorialcart/J) //bless you whoever fixes this copypasta + J.put_in_cart(src, user) + J.mybroom=src + J.update_icon() \ No newline at end of file diff --git a/code/game/objects/structures/janicart.dm b/code/game/objects/structures/janicart.dm index 54b9d650d5..58c8a739dc 100644 --- a/code/game/objects/structures/janicart.dm +++ b/code/game/objects/structures/janicart.dm @@ -6,11 +6,11 @@ anchored = FALSE density = TRUE //copypaste sorry - var/amount_per_transfer_from_this = 5 //shit I dunno, adding this so syringes stop runtime erroring. --NeoFite - var/obj/item/storage/bag/trash/mybag = null - var/obj/item/mop/mymop = null - var/obj/item/reagent_containers/spray/cleaner/myspray = null - var/obj/item/lightreplacer/myreplacer = null + var/obj/item/storage/bag/trash/mybag + var/obj/item/mop/mymop + var/obj/item/twohanded/broom/mybroom + var/obj/item/reagent_containers/spray/cleaner/myspray + var/obj/item/lightreplacer/myreplacer var/signs = 0 var/const/max_signs = 4 @@ -49,7 +49,12 @@ m.janicart_insert(user, src) else to_chat(user, fail_msg) - + else if(istype(I, /obj/item/twohanded/broom)) + if(!mybroom) + var/obj/item/twohanded/broom/b=I + b.janicart_insert(user,src) + else + to_chat(user, fail_msg) else if(istype(I, /obj/item/storage/bag/trash)) if(!mybag) var/obj/item/storage/bag/trash/t=I @@ -97,6 +102,8 @@ dat += "[mybag.name]
" if(mymop) dat += "[mymop.name]
" + if(mybroom) + dat += "[mybroom.name]
" if(myspray) dat += "[myspray.name]
" if(myreplacer) @@ -124,6 +131,11 @@ user.put_in_hands(mymop) to_chat(user, "You take [mymop] from [src].") mymop = null + if(href_list["broom"]) + if(mybroom) + user.put_in_hands(mybroom) + to_chat(user, "You take [mybroom] from [src].") + mybroom = null if(href_list["spray"]) if(myspray) user.put_in_hands(myspray) @@ -155,6 +167,8 @@ add_overlay("cart_garbage") if(mymop) add_overlay("cart_mop") + if(mybroom) + add_overlay("cart_broom") if(myspray) add_overlay("cart_spray") if(myreplacer) diff --git a/code/modules/research/designs/misc_designs.dm b/code/modules/research/designs/misc_designs.dm index 72b2c91e4c..df1c1edd9c 100644 --- a/code/modules/research/designs/misc_designs.dm +++ b/code/modules/research/designs/misc_designs.dm @@ -289,6 +289,16 @@ ////////////Janitor Designs////////////// ///////////////////////////////////////// +/datum/design/broom + name = "Broom" + desc = "Just your everyday standard broom." + id = "broom" + build_type = PROTOLATHE + materials = list(MAT_METAL = 1000, MAT_GLASS = 600) + build_path = /obj/item/twohanded/broom + category = list("Equipment") + departmental_flags = DEPARTMENTAL_FLAG_SERVICE + /datum/design/mop name = "Mop" desc = "Just your everyday standard mop." diff --git a/code/modules/research/techweb/all_nodes.dm b/code/modules/research/techweb/all_nodes.dm index 66d51fb168..a9f5dbf3c6 100644 --- a/code/modules/research/techweb/all_nodes.dm +++ b/code/modules/research/techweb/all_nodes.dm @@ -602,7 +602,7 @@ display_name = "Basic Tools" description = "Basic mechanical, electronic, surgical and botanical tools." prereq_ids = list("base") - design_ids = list("screwdriver", "wrench", "wirecutters", "crowbar", "multitool", "welding_tool", "tscanner", "analyzer", "cable_coil", "pipe_painter", "airlock_painter", "scalpel", "circular_saw", "surgicaldrill", "retractor", "cautery", "hemostat", "cultivator", "plant_analyzer", "shovel", "spade", "hatchet", "mop") + design_ids = list("screwdriver", "wrench", "wirecutters", "crowbar", "multitool", "welding_tool", "tscanner", "analyzer", "cable_coil", "pipe_painter", "airlock_painter", "scalpel", "circular_saw", "surgicaldrill", "retractor", "cautery", "hemostat", "cultivator", "plant_analyzer", "shovel", "spade", "hatchet", "mop", "broom") research_costs = list(TECHWEB_POINT_TYPE_GENERIC = 500) export_price = 5000 diff --git a/code/modules/vending/wardrobes.dm b/code/modules/vending/wardrobes.dm index 5d2e08734e..d368a9bbca 100644 --- a/code/modules/vending/wardrobes.dm +++ b/code/modules/vending/wardrobes.dm @@ -266,16 +266,17 @@ /obj/item/cartridge/janitor = 3, /obj/item/clothing/gloves/color/black = 2, /obj/item/clothing/head/soft/purple = 2, + /obj/item/twohanded/broom = 2, /obj/item/paint/paint_remover = 2, - /obj/item/melee/flyswatter = 1, + /obj/item/melee/flyswatter = 2, /obj/item/flashlight = 2, /obj/item/caution = 8, - /obj/item/holosign_creator = 1, - /obj/item/lightreplacer = 1, - /obj/item/soap = 1, - /obj/item/storage/bag/trash = 1, - /obj/item/clothing/shoes/galoshes = 1, - /obj/item/watertank/janitor = 1, + /obj/item/holosign_creator = 2, + /obj/item/lightreplacer = 2, + /obj/item/soap = 2, + /obj/item/storage/bag/trash = 2, + /obj/item/clothing/shoes/galoshes = 2, + /obj/item/watertank/janitor = 2, /obj/item/storage/belt/janitor = 2, /obj/item/screwdriver = 2, /obj/item/stack/cable_coil/random = 4) diff --git a/icons/mob/inhands/equipment/custodial_lefthand.dmi b/icons/mob/inhands/equipment/custodial_lefthand.dmi index 90ffd2495e..eaed11867c 100644 Binary files a/icons/mob/inhands/equipment/custodial_lefthand.dmi and b/icons/mob/inhands/equipment/custodial_lefthand.dmi differ diff --git a/icons/mob/inhands/equipment/custodial_righthand.dmi b/icons/mob/inhands/equipment/custodial_righthand.dmi index 33e708f8c9..dc7ee742a3 100644 Binary files a/icons/mob/inhands/equipment/custodial_righthand.dmi and b/icons/mob/inhands/equipment/custodial_righthand.dmi differ diff --git a/icons/obj/janitor.dmi b/icons/obj/janitor.dmi index 9128654a5b..802e165550 100644 Binary files a/icons/obj/janitor.dmi and b/icons/obj/janitor.dmi differ