diff --git a/_maps/map_files/Deltastation/DeltaStation2.dmm b/_maps/map_files/Deltastation/DeltaStation2.dmm index da5ccc7710b..1f0f3c3a510 100644 --- a/_maps/map_files/Deltastation/DeltaStation2.dmm +++ b/_maps/map_files/Deltastation/DeltaStation2.dmm @@ -98266,7 +98266,7 @@ pixel_x = -3; pixel_y = 2 }, -/obj/item/broom, +/obj/item/pushbroom, /turf/open/floor/plating{ icon_state = "platingdmg2" }, diff --git a/_maps/map_files/MetaStation/MetaStation.dmm b/_maps/map_files/MetaStation/MetaStation.dmm index 100d0ca6987..06969e9a678 100644 --- a/_maps/map_files/MetaStation/MetaStation.dmm +++ b/_maps/map_files/MetaStation/MetaStation.dmm @@ -77104,7 +77104,7 @@ /turf/open/floor/plasteel, /area/security/checkpoint/engineering) "vGs" = ( -/obj/item/broom, +/obj/item/pushbroom, /obj/structure/closet{ name = "janitorial supplies" }, diff --git a/code/_globalvars/lists/maintenance_loot.dm b/code/_globalvars/lists/maintenance_loot.dm index 4be245d06b8..c0d3557f63d 100644 --- a/code/_globalvars/lists/maintenance_loot.dm +++ b/code/_globalvars/lists/maintenance_loot.dm @@ -78,7 +78,7 @@ GLOBAL_LIST_INIT(common_loot, list( //common: basic items /obj/item/geiger_counter = 1, /obj/item/analyzer = 1, /obj/item/mop = 1, - /obj/item/broom = 1, + /obj/item/pushbroom = 1, /obj/item/reagent_containers/glass/bucket = 1, /obj/item/toy/crayon/spraycan = 1, ) = 1, diff --git a/code/game/objects/items/broom.dm b/code/game/objects/items/broom.dm index c9aa2e24407..188b649c31a 100644 --- a/code/game/objects/items/broom.dm +++ b/code/game/objects/items/broom.dm @@ -1,5 +1,5 @@ -/obj/item/broom - name = "broom" +/obj/item/pushbroom + name = "push 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." icon = 'icons/obj/janitor.dmi' icon_state = "broom0" @@ -13,58 +13,63 @@ attack_verb = list("swept", "brushed off", "bludgeoned", "whacked") resistance_flags = FLAMMABLE -/obj/item/broom/Initialize() +/obj/item/pushbroom/Initialize() . = ..() RegisterSignal(src, COMSIG_TWOHANDED_WIELD, .proc/on_wield) RegisterSignal(src, COMSIG_TWOHANDED_UNWIELD, .proc/on_unwield) -/obj/item/broom/ComponentInitialize() +/obj/item/pushbroom/ComponentInitialize() . = ..() AddComponent(/datum/component/two_handed, force_unwielded=8, force_wielded=12, icon_wielded="broom1") -/obj/item/broom/update_icon_state() +/obj/item/pushbroom/update_icon_state() icon_state = "broom0" /// triggered on wield of two handed item -/obj/item/broom/proc/on_wield(obj/item/source, mob/user) +/obj/item/pushbroom/proc/on_wield(obj/item/source, mob/user) to_chat(user, "You brace the [src] against the ground in a firm sweeping stance.") RegisterSignal(user, COMSIG_MOVABLE_MOVED, .proc/sweep) /// triggered on unwield of two handed item -/obj/item/broom/proc/on_unwield(obj/item/source, mob/user) +/obj/item/pushbroom/proc/on_unwield(obj/item/source, mob/user) UnregisterSignal(user, COMSIG_MOVABLE_MOVED) -/obj/item/broom/afterattack(atom/A, mob/user, proximity) +/obj/item/pushbroom/afterattack(atom/A, mob/user, proximity) . = ..() if(!proximity) return sweep(user, A, FALSE) -/obj/item/broom/proc/sweep(mob/user, atom/A, moving = TRUE) +/obj/item/pushbroom/proc/sweep(mob/user, atom/A, moving = TRUE) var/turf/target if (!moving) if (isturf(A)) target = A else - if (isturf(A.loc)) - target = A.loc - else - return + target = A.loc else target = user.loc if (locate(/obj/structure/table) in target.contents) return var/i = 0 + var/turf/target_turf = get_step(target, user.dir) + var/obj/machinery/disposal/bin/target_bin = locate(/obj/machinery/disposal/bin) in target_turf.contents for(var/obj/item/garbage in target.contents) if(!garbage.anchored) - garbage.Move(get_step(target, user.dir), user.dir) - i++ - if(i >= 20) + if (target_bin) + garbage.forceMove(target_bin) + else + garbage.Move(target_turf, user.dir) + i++ + if(i > 19) break - if(i >= 1) + if(i > 0) + if (target_bin) + target_bin.update_icon() + to_chat(user, "You sweep the pile of garbage into [target_bin].") playsound(loc, 'sound/weapons/thudswoosh.ogg', 30, TRUE, -1) -/obj/item/broom/proc/janicart_insert(mob/user, obj/structure/janitorialcart/J) //bless you whoever fixes this copypasta +/obj/item/pushbroom/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() diff --git a/code/game/objects/items/storage/belt.dm b/code/game/objects/items/storage/belt.dm index b3f9b849ed6..3918eb4f71a 100644 --- a/code/game/objects/items/storage/belt.dm +++ b/code/game/objects/items/storage/belt.dm @@ -539,7 +539,7 @@ /obj/item/melee/flyswatter, /obj/item/assembly/mousetrap, /obj/item/paint/paint_remover, - /obj/item/broom + /obj/item/pushbroom )) /obj/item/storage/belt/janitor/full/PopulateContents() diff --git a/code/game/objects/structures/janicart.dm b/code/game/objects/structures/janicart.dm index 3cf14a7fb3e..adeeec5affe 100644 --- a/code/game/objects/structures/janicart.dm +++ b/code/game/objects/structures/janicart.dm @@ -9,7 +9,7 @@ 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 var/obj/item/mop/mymop - var/obj/item/broom/mybroom + var/obj/item/pushbroom/mybroom var/obj/item/reagent_containers/spray/cleaner/myspray var/obj/item/lightreplacer/myreplacer var/signs = 0 @@ -51,9 +51,9 @@ m.janicart_insert(user, src) else to_chat(user, fail_msg) - else if(istype(I, /obj/item/broom)) + else if(istype(I, /obj/item/pushbroom)) if(!mybroom) - var/obj/item/broom/b=I + var/obj/item/pushbroom/b=I b.janicart_insert(user,src) else to_chat(user, fail_msg) diff --git a/code/modules/cargo/packs.dm b/code/modules/cargo/packs.dm index 583c470a9a2..c7a2b723c50 100644 --- a/code/modules/cargo/packs.dm +++ b/code/modules/cargo/packs.dm @@ -1467,7 +1467,7 @@ /obj/item/reagent_containers/glass/bucket, /obj/item/reagent_containers/glass/bucket, /obj/item/mop, - /obj/item/broom, + /obj/item/pushbroom, /obj/item/clothing/suit/caution, /obj/item/clothing/suit/caution, /obj/item/clothing/suit/caution, diff --git a/code/modules/research/designs/autolathe_designs.dm b/code/modules/research/designs/autolathe_designs.dm index b7fdc5b0d87..21d77fc8d99 100644 --- a/code/modules/research/designs/autolathe_designs.dm +++ b/code/modules/research/designs/autolathe_designs.dm @@ -20,6 +20,15 @@ category = list("initial","Tools","Tool Designs") departmental_flags = DEPARTMENTAL_FLAG_SERVICE +/datum/design/broom + name="Push Broom" + id="pushbroom" + build_type = AUTOLATHE | PROTOLATHE + materials = list(/datum/material/iron = 2000) + build_path = /obj/item/pushbroom + category = list("initial","Tools","Tool Designs") + departmental_flags = DEPARTMENTAL_FLAG_SERVICE + /datum/design/crowbar name = "Pocket Crowbar" id = "crowbar" diff --git a/code/modules/vending/wardrobes.dm b/code/modules/vending/wardrobes.dm index 362ea6b5b28..1fc45d053a2 100644 --- a/code/modules/vending/wardrobes.dm +++ b/code/modules/vending/wardrobes.dm @@ -284,7 +284,7 @@ /obj/item/clothing/under/rank/civilian/janitor/skirt = 2, /obj/item/clothing/gloves/color/black = 2, /obj/item/clothing/head/soft/purple = 2, - /obj/item/broom = 2, + /obj/item/pushbroom = 2, /obj/item/paint/paint_remover = 2, /obj/item/melee/flyswatter = 2, /obj/item/flashlight = 2,