Merge pull request #11136 from Owai-Seek/broomport-2-17-19
Ports Broom, Tweak Janitor Vendor
This commit is contained in:
@@ -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,
|
||||
|
||||
@@ -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, "<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', 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()
|
||||
@@ -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 += "<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)
|
||||
@@ -124,6 +131,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)
|
||||
@@ -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)
|
||||
|
||||
@@ -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."
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -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)
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 1.8 KiB After Width: | Height: | Size: 2.1 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 1.8 KiB After Width: | Height: | Size: 2.1 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 26 KiB After Width: | Height: | Size: 27 KiB |
Reference in New Issue
Block a user