Custodial Additions (#13612)

This commit is contained in:
SleepyGemmy
2022-06-09 12:46:14 +02:00
committed by GitHub
parent 3d9a17098c
commit 85298bc510
36 changed files with 513 additions and 290 deletions
+47 -51
View File
@@ -321,62 +321,68 @@
icon_state = "comicstormman"
item_state = "comicstormman"
/*
* Toy crossbow
*/
//
// Toy Crossbows
//
/obj/item/toy/crossbow
name = "foam dart crossbow"
desc = "A weapon favored by many overactive children. Ages 8 and up."
desc = "A foam dart crossbow."
icon = 'icons/obj/guns/crossbow.dmi'
icon_state = "crossbow"
item_state = "crossbow"
slot_flags = SLOT_BELT | SLOT_HOLSTER
drop_sound = 'sound/items/drop/gun.ogg'
pickup_sound = 'sound/items/pickup/gun.ogg'
contained_sprite = TRUE
w_class = ITEMSIZE_SMALL
attack_verb = list("attacked", "struck", "hit")
var/bullets = 5
var/dart_count = 5
/obj/item/toy/crossbow/examine(mob/user)
if(..(user, 2) && bullets)
to_chat(user, "<span class='notice'>It is loaded with [bullets] foam darts!</span>")
if(..(user, 2) && dart_count)
to_chat(user, "<span class='notice'>\The [src] is loaded with [dart_count] foam dart\s.</span>")
/obj/item/toy/crossbow/attackby(obj/item/I as obj, mob/user as mob)
/obj/item/toy/crossbow/attackby(obj/item/I, mob/user)
if(istype(I, /obj/item/toy/ammo/crossbow))
if(bullets <= 4)
user.drop_from_inventory(I,src)
if(dart_count <= 4)
user.drop_from_inventory(I, src)
qdel(I)
bullets++
to_chat(user, "<span class='notice'>You load the foam dart into the crossbow.</span>")
dart_count++
to_chat(user, "<span class='notice'>You load the foam dart into \the [src].</span>")
else
to_chat(usr, "<span class='warning'>It's already fully loaded.</span>")
to_chat(usr, "<span class='warning'>\The [src] is already fully loaded.</span>")
/obj/item/toy/crossbow/afterattack(atom/target as mob|obj|turf|area, mob/user as mob, flag)
if(!isturf(target.loc) || target == user) return
if(flag) return
if (locate (/obj/structure/table, src.loc))
/obj/item/toy/crossbow/afterattack(atom/target, mob/user, flag)
if(!isturf(target.loc) || target == user)
return
else if (bullets)
if(flag)
return
if(locate(/obj/structure/table) in get_turf(src))
return
else if(dart_count)
var/turf/trg = get_turf(target)
var/obj/effect/foam_dart_dummy/D = new/obj/effect/foam_dart_dummy(get_turf(src))
bullets--
dart_count--
D.icon_state = "foamdart"
D.name = "foam dart"
playsound(user.loc, 'sound/items/syringeproj.ogg', 50, 1)
playsound(src, 'sound/items/syringeproj.ogg', 50, TRUE)
for(var/i=0, i<6, i++)
for(var/i = 0, i < 6, i++)
if (D)
if(D.loc == trg) break
step_towards(D,trg)
step_towards(D, trg)
for(var/mob/living/M in D.loc)
if(!istype(M,/mob/living)) continue
if(M == user) continue
if(!istype(M, /mob/living))
continue
if(M == user)
continue
for(var/mob/O in viewers(world.view, D))
O.show_message(text("<span class='warning'>\The [] was hit by the foam dart!</span>", M), 1)
new /obj/item/toy/ammo/crossbow(M.loc)
@@ -384,7 +390,9 @@
return
for(var/atom/A in D.loc)
if(A == user) continue
if(A == user)
continue
if(A.density)
new /obj/item/toy/ammo/crossbow(A.loc)
qdel(D)
@@ -397,35 +405,24 @@
qdel(D)
return
else if (bullets == 0)
user.Weaken(5)
for(var/mob/O in viewers(world.view, user))
O.show_message(text("<span class='warning'>\The [] realized they were out of ammo and starting scrounging for some!</span>", user), 1)
/obj/item/toy/crossbow/attack(mob/M as mob, mob/user as mob)
/obj/item/toy/crossbow/attack(mob/M, mob/user)
src.add_fingerprint(user)
// ******* Check
if (src.bullets > 0 && M.lying)
if (src.dart_count > 0 && M.lying) // Check
for(var/mob/O in viewers(M, null))
if(O.client)
O.show_message(text("<span class='danger'>\The [] casually lines up a shot with []'s head and pulls the trigger!</span>", user, M), 1, "<span class='warning'>You hear the sound of foam against skull</span>", 2)
O.show_message(text("<span class='notice'>\The [] casually lines up a shot with []'s head and pulls the trigger.</span>", user, M), 1)
O.show_message(text("<span class='warning'>\The [] was hit in the head by the foam dart!</span>", M), 1)
playsound(user.loc, 'sound/items/syringeproj.ogg', 50, 1)
playsound(src, 'sound/items/syringeproj.ogg', 50, TRUE)
new /obj/item/toy/ammo/crossbow(M.loc)
src.bullets--
else if (M.lying && src.bullets == 0)
for(var/mob/O in viewers(M, null))
if (O.client) O.show_message(text("<span class='danger'>\The [] casually lines up a shot with []'s head, pulls the trigger, then realizes they are out of ammo and drops to the floor in search of some!</span>", user, M), 1, "<span class='warning'>You hear someone fall</span>", 2)
user.Weaken(5)
src.dart_count--
return
/obj/item/toy/ammo/crossbow
name = "foam dart"
desc = "It's nerf or nothing! Ages 8 and up."
desc = "A foam dart."
icon = 'icons/obj/toy.dmi'
icon_state = "foamdart"
w_class = ITEMSIZE_TINY
@@ -434,13 +431,12 @@
pickup_sound = 'sound/items/pickup/food.ogg'
/obj/effect/foam_dart_dummy
name = ""
desc = ""
name = null
desc = null
icon = 'icons/obj/toy.dmi'
icon_state = null
anchored = 1
density = 0
anchored = TRUE
density = FALSE
/*
* Toy swords
@@ -106,6 +106,19 @@ var/list/tape_roll_applications = list()
return
return ..()
/obj/item/taperoll/custodial
name = "custodial holographic tape"
desc = "A high-tech roll of custodial tape, used to prevent people from tracking dirt everywhere and getting their shoes dirty."
icon_state = "custodial_start"
tape_type = /obj/item/tape/custodial
icon_base = "custodial"
/obj/item/tape/custodial
name = "custodial holographic tape"
desc = "A length of custodial tape. Better not cross it."
req_one_access = list(access_janitor)
icon_base = "custodial"
/obj/item/taperoll/attack_self(mob/user as mob)
if(icon_state == "[icon_base]_start")
start = get_turf(src)
@@ -387,11 +387,12 @@
icon_state = "militarybelt_syndie"
item_state = "militarybelt_syndie"
/obj/item/storage/belt/janitor
name = "janibelt"
desc = "A belt used to hold most janitorial supplies."
icon_state = "janibelt"
item_state = "janibelt"
/obj/item/storage/belt/custodial
name = "custodial belt"
desc = "A utility belt designed for custodial use."
desc_fluff = "A custodial belt is similar to most utility belts, but designed with pockets and attachment points that can hold common custodial tools."
icon_state = "custodialbelt"
item_state = "custodialbelt"
storage_slots = 8
w_class = ITEMSIZE_NORMAL
max_w_class = ITEMSIZE_NORMAL
@@ -403,15 +404,16 @@
/obj/item/extinguisher/mini,
/obj/item/device/radio,
/obj/item/clothing/gloves,
/obj/item/clothing/glasses/material,
/obj/item/clothing/glasses,
/obj/item/reagent_containers/spray,
/obj/item/grenade/chem_grenade, //if I'm going to be doing a full allowance on one belt, I need to do the other.
/obj/item/grenade/chem_grenade,
/obj/item/device/lightreplacer,
/obj/item/soap,
/obj/item/storage/bag/trash,
/obj/item/reagent_containers/glass/rag,
/obj/item/gun/energy/mousegun
)
/obj/item/gun/energy/mousegun,
/obj/item/device/gps
)
/obj/item/storage/belt/mining
name = "explorer's belt"
+1 -1
View File
@@ -413,7 +413,7 @@
/obj/item/storage/belt/medical/first_responder/combat = 0.1,
/obj/item/storage/belt/security/tactical = 0.1,
/obj/item/storage/belt/military = 0.1,
/obj/item/storage/belt/janitor = 0.4
/obj/item/storage/belt/custodial = 0.4
)
// Spawns a random backpack.
@@ -1,7 +1,7 @@
/* Closets for specific jobs
* Contains:
* Bartender
* Janitor
* Chef
* Lawyer
*/
@@ -56,44 +56,6 @@
new /obj/item/clothing/head/hairnet(src)
new /obj/item/clothing/head/hairnet(src)
/*
* Janitor
*/
/obj/structure/closet/jcloset
name = "custodial closet"
desc = "It's a storage unit for janitorial clothes and gear."
icon_door = "mixed"
/obj/structure/closet/jcloset/fill()
new /obj/item/clothing/head/softcap/nt/custodian(src)
new /obj/item/clothing/under/rank/janitor(src)
new /obj/item/clothing/head/softcap/idris/custodian(src)
new /obj/item/clothing/under/rank/janitor/idris(src)
new /obj/item/device/radio/headset/headset_service(src)
new /obj/item/clothing/gloves/black(src)
new /obj/item/clothing/head/softcap/custodian(src)
new /obj/item/clothing/head/bandana/janitor(src)
new /obj/item/clothing/head/beret/janitor(src)
new /obj/item/gun/energy/mousegun(src)
new /obj/item/device/flashlight(src)
new /obj/item/clothing/suit/caution(src)
new /obj/item/clothing/suit/caution(src)
new /obj/item/clothing/suit/caution(src)
new /obj/item/clothing/suit/caution(src)
new /obj/item/device/lightreplacer(src)
new /obj/item/storage/bag/trash(src)
new /obj/item/clothing/shoes/galoshes(src)
new /obj/item/storage/belt/janitor(src)
new /obj/item/storage/box/lights/mixed(src)
new /obj/item/grenade/chem_grenade/cleaner(src)
new /obj/item/grenade/chem_grenade/cleaner(src)
new /obj/item/grenade/chem_grenade/cleaner(src)
new /obj/item/reagent_containers/spray/cleaner(src)
new /obj/item/reagent_containers/glass/rag(src)
new /obj/item/soap/nanotrasen(src)
new /obj/item/reagent_containers/glass/rag/advanced(src)
new /obj/item/device/gps/janitor(src)
/*
* Lawyer
*/
@@ -109,4 +71,4 @@
new /obj/item/clothing/under/lawyer/purple(src)
new /obj/item/clothing/suit/storage/lawyer/purpjacket(src)
new /obj/item/clothing/shoes/brown(src)
new /obj/item/clothing/shoes/black(src)
new /obj/item/clothing/shoes/black(src)
@@ -32,11 +32,15 @@
/obj/structure/closet/l3closet/janitor
name = "level 3 biohazard custodial gear closet"
desc = "It's a storage unit for level 3 biohazard custodial gear."
icon_state = "bio_jan"
/obj/structure/closet/l3closet/janitor/fill()
new /obj/item/clothing/suit/bio_suit/janitor(src)
new /obj/item/clothing/head/bio_hood/janitor(src)
new /obj/item/clothing/mask/gas/half(src)
new /obj/item/watertank/janitor(src)
/obj/structure/closet/l3closet/scientist
icon_state = "bio_scientist"
@@ -0,0 +1,36 @@
// Custodian
/obj/structure/closet/secure_closet/custodial
name = "custodial closet"
req_access = list(access_janitor)
desc = "It's a storage unit for a custodian's clothes and gear."
icon_state = "custodial"
/obj/structure/closet/secure_closet/custodial/fill()
new /obj/item/clothing/head/softcap/nt/custodian(src)
new /obj/item/clothing/head/softcap/idris/custodian(src)
new /obj/item/device/radio/headset/headset_service(src)
new /obj/item/clothing/under/rank/janitor(src)
new /obj/item/clothing/under/rank/janitor/idris(src)
new /obj/item/clothing/gloves/black(src)
new /obj/item/storage/belt/custodial(src)
new /obj/item/clothing/accessory/holster/utility/custodial/armpit/brown(src)
new /obj/item/clothing/shoes/galoshes(src)
new /obj/item/gun/energy/mousegun(src)
new /obj/item/device/flashlight(src)
new /obj/item/reagent_containers/spray/cleaner(src)
new /obj/item/soap/nanotrasen(src)
new /obj/item/reagent_containers/glass/rag(src)
new /obj/item/reagent_containers/glass/rag/advanced(src)
new /obj/item/device/lightreplacer(src)
new /obj/item/storage/bag/trash(src)
new /obj/item/grenade/chem_grenade/cleaner(src)
new /obj/item/grenade/chem_grenade/cleaner(src)
new /obj/item/grenade/chem_grenade/cleaner(src)
new /obj/item/device/gps/janitor(src)
new /obj/item/taperoll/custodial(src)
new /obj/item/clothing/suit/caution(src)
new /obj/item/clothing/suit/caution(src)
new /obj/item/clothing/suit/caution(src)
new /obj/item/clothing/suit/caution(src)
new /obj/item/storage/box/lights/mixed(src)
new /obj/item/storage/box/mousetraps(src)
+16
View File
@@ -12,6 +12,8 @@
climbable = TRUE
flags = OPENCONTAINER
build_amt = 15
slowdown = 0
//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
@@ -31,6 +33,20 @@
myspray = new /obj/item/reagent_containers/spray/cleaner(src)
myreplacer = new /obj/item/device/lightreplacer(src)
mybucket = new /obj/structure/mopbucket(src)
for(signs, signs < 4, signs++)
new /obj/item/clothing/suit/caution(src)
update_icon()
/obj/structure/janitorialcart/full/water/Initialize()
. = ..()
mybag = new /obj/item/storage/bag/trash(src)
mymop = new /obj/item/mop(src)
myspray = new /obj/item/reagent_containers/spray/cleaner(src)
myreplacer = new /obj/item/device/lightreplacer(src)
mybucket = new /obj/structure/mopbucket(src)
mybucket.reagents.add_reagent(/decl/reagent/water, mybucket.bucketsize)