mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-07-20 20:45:28 +01:00
Adds the broom (#49120)
It's a broom The basic janitorial tool that's been missing for all these years Demo here: https://www.youtube.com/watch?v=KHcEIhAxx0g 🆑 add: Added the broom. For sweeping. /🆑
This commit is contained in:
@@ -78,6 +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/twohanded/broom = 1,
|
||||
/obj/item/reagent_containers/glass/bucket = 1,
|
||||
/obj/item/toy/crayon/spraycan = 1,
|
||||
) = 1,
|
||||
|
||||
@@ -538,7 +538,8 @@
|
||||
/obj/item/clothing/gloves,
|
||||
/obj/item/melee/flyswatter,
|
||||
/obj/item/assembly/mousetrap,
|
||||
/obj/item/paint/paint_remover
|
||||
/obj/item/paint/paint_remover,
|
||||
/obj/item/twohanded/broom
|
||||
))
|
||||
|
||||
/obj/item/storage/belt/janitor/full/PopulateContents()
|
||||
|
||||
@@ -852,3 +852,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."
|
||||
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, "<span class='notice'>You brace the [src] against the ground in a firm sweeping stance.</span>")
|
||||
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', 30, 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()
|
||||
|
||||
@@ -7,10 +7,11 @@
|
||||
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
|
||||
|
||||
@@ -50,7 +51,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
|
||||
@@ -98,6 +104,8 @@
|
||||
dat += "<a href='?src=[REF(src)];garbage=1'>[mybag.name]</a><br>"
|
||||
if(mymop)
|
||||
dat += "<a href='?src=[REF(src)];mop=1'>[mymop.name]</a><br>"
|
||||
if(mybroom)
|
||||
dat += "<a href='?src=[REF(src)];broom=1'>[mybroom.name]</a><br>"
|
||||
if(myspray)
|
||||
dat += "<a href='?src=[REF(src)];spray=1'>[myspray.name]</a><br>"
|
||||
if(myreplacer)
|
||||
@@ -125,6 +133,11 @@
|
||||
user.put_in_hands(mymop)
|
||||
to_chat(user, "<span class='notice'>You take [mymop] from [src].</span>")
|
||||
mymop = null
|
||||
if(href_list["broom"])
|
||||
if(mybroom)
|
||||
user.put_in_hands(mybroom)
|
||||
to_chat(user, "<span class='notice'>You take [mybroom] from [src].</span>")
|
||||
mybroom = null
|
||||
if(href_list["spray"])
|
||||
if(myspray)
|
||||
user.put_in_hands(myspray)
|
||||
@@ -156,6 +169,8 @@
|
||||
. += "cart_garbage"
|
||||
if(mymop)
|
||||
. += "cart_mop"
|
||||
if(mybroom)
|
||||
. += "cart_broom"
|
||||
if(myspray)
|
||||
. += "cart_spray"
|
||||
if(myreplacer)
|
||||
|
||||
@@ -1452,12 +1452,13 @@
|
||||
|
||||
/datum/supply_pack/service/janitor
|
||||
name = "Janitorial Supplies Crate"
|
||||
desc = "Fight back against dirt and grime with Nanotrasen's Janitorial Essentials(tm)! Contains three buckets, caution signs, and cleaner grenades. Also has a single mop, spray cleaner, rag, and trash bag."
|
||||
desc = "Fight back against dirt and grime with Nanotrasen's Janitorial Essentials(tm)! Contains three buckets, caution signs, and cleaner grenades. Also has a single mop, broom, spray cleaner, rag, and trash bag."
|
||||
cost = 1000
|
||||
contains = list(/obj/item/reagent_containers/glass/bucket,
|
||||
/obj/item/reagent_containers/glass/bucket,
|
||||
/obj/item/reagent_containers/glass/bucket,
|
||||
/obj/item/mop,
|
||||
/obj/item/twohanded/broom,
|
||||
/obj/item/clothing/suit/caution,
|
||||
/obj/item/clothing/suit/caution,
|
||||
/obj/item/clothing/suit/caution,
|
||||
|
||||
@@ -283,6 +283,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/twohanded/broom = 2,
|
||||
/obj/item/paint/paint_remover = 2,
|
||||
/obj/item/melee/flyswatter = 2,
|
||||
/obj/item/flashlight = 2,
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 1.9 KiB After Width: | Height: | Size: 2.2 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 1.9 KiB After Width: | Height: | Size: 2.2 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 26 KiB After Width: | Height: | Size: 25 KiB |
Reference in New Issue
Block a user