mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-07-20 11:34:19 +01:00
Janitorial Quality of Life Update (#5239)
* Janitorial Quality of Life - Trash Bags fit in satchels/bags/duffelbags - Advanced Mops clean faster, can clean more - Holosign Projectors can create more signs - New Closet added, with janitorial stuff that was previously on the ground - Ghosts can no longer create dirt - Dirt creation slowed down - Janitorial Closet tidied up * Removes redundant check * Trash Bags become heavier with use * Fixes Map Merge not being done * Re-adds Box Refilling because I am an idiot Missing parenthesis, not even ONCE * Unblocks MULEbot docking area * Adds broken bulb recycling * Addresses Fox's/DZD's concerns * Adds sanity checks for NODROP
This commit is contained in:
@@ -53,6 +53,8 @@
|
||||
|
||||
var/max_uses = 20
|
||||
var/uses = 0
|
||||
var/shards = 0
|
||||
var/recycle = 3
|
||||
var/emagged = 0
|
||||
var/failmsg = ""
|
||||
// How much to increase per each glass?
|
||||
@@ -68,7 +70,7 @@
|
||||
|
||||
/obj/item/device/lightreplacer/examine(mob/user)
|
||||
if(..(user, 2))
|
||||
to_chat(user, "It has [uses] lights remaining.")
|
||||
to_chat(user, "It has [uses] lights and [shards] shards remaining.")
|
||||
|
||||
/obj/item/device/lightreplacer/attackby(obj/item/W, mob/user, params)
|
||||
if(istype(W, /obj/item/stack/sheet/glass))
|
||||
@@ -89,14 +91,46 @@
|
||||
if(istype(W, /obj/item/weapon/light))
|
||||
var/obj/item/weapon/light/L = W
|
||||
if(L.status == 0) // LIGHT OKAY
|
||||
if(!user.drop_item())
|
||||
to_chat(user, "[L] is stuck to your hand!")
|
||||
return
|
||||
if(uses < max_uses)
|
||||
AddUses(1)
|
||||
to_chat(user, "You insert the [L.name] into the [src.name]. You have [uses] lights remaining.")
|
||||
user.drop_item()
|
||||
qdel(L)
|
||||
return
|
||||
else
|
||||
to_chat(user, "You need a working light.")
|
||||
else if(L.status == 2 || L.status == 3)
|
||||
if(!user.drop_item())
|
||||
to_chat(user, "[L] is stuck to your hand!")
|
||||
return
|
||||
else
|
||||
AddShards(1)
|
||||
to_chat(user, "You insert [L] into [src]. You have [shards] shards remaining.")
|
||||
user.drop_item()
|
||||
qdel(L)
|
||||
return
|
||||
|
||||
if(istype(W, /obj/item/weapon/storage))
|
||||
var/obj/item/weapon/storage/S = W
|
||||
var/found_lightbulbs = 0
|
||||
|
||||
for(var/obj/item/I in S.contents)
|
||||
if(istype(I,/obj/item/weapon/light))
|
||||
var/obj/item/weapon/light/L = I
|
||||
found_lightbulbs = 1
|
||||
if(uses >= max_uses)
|
||||
to_chat(user, "<span class='warning'>[src] is full!</span>")
|
||||
break
|
||||
if(L.status == 0)
|
||||
AddUses(1)
|
||||
qdel(L)
|
||||
else if(L.status == 2 || L.status == 3)
|
||||
AddShards(1)
|
||||
qdel(L)
|
||||
to_chat(user, "<span class='notice'>You fill [src] with lights from [S].")
|
||||
if(!found_lightbulbs)
|
||||
to_chat(user, "<span class='warning'>[S] contains no bulbs.</span>")
|
||||
return
|
||||
|
||||
/obj/item/device/lightreplacer/emag_act(user as mob)
|
||||
@@ -128,6 +162,14 @@
|
||||
/obj/item/device/lightreplacer/proc/AddUses(var/amount = 1)
|
||||
uses = min(max(uses + amount, 0), max_uses)
|
||||
|
||||
/obj/item/device/lightreplacer/proc/AddShards(amount = 1)
|
||||
shards += amount
|
||||
var/recycled_lights = round(shards / recycle)
|
||||
if(recycled_lights > 0)
|
||||
AddUses(recycled_lights)
|
||||
shards = shards % recycle
|
||||
return recycled_lights
|
||||
|
||||
/obj/item/device/lightreplacer/proc/Charge(var/mob/user)
|
||||
charge += 1
|
||||
if(charge > 7)
|
||||
@@ -206,4 +248,4 @@
|
||||
#undef LIGHT_OK
|
||||
#undef LIGHT_EMPTY
|
||||
#undef LIGHT_BROKEN
|
||||
#undef LIGHT_BURNED
|
||||
#undef LIGHT_BURNED
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
throw_range = 7
|
||||
origin_tech = "programming=3"
|
||||
var/list/signs = list()
|
||||
var/max_signs = 10
|
||||
var/max_signs = 20
|
||||
|
||||
/obj/item/weapon/holosign_creator/afterattack(atom/target, mob/user, flag)
|
||||
if(flag)
|
||||
@@ -45,4 +45,4 @@
|
||||
desc = "The words flicker as if they mean nothing."
|
||||
icon = 'icons/obj/janitor.dmi'
|
||||
icon_state = "holosign"
|
||||
anchored = 1
|
||||
anchored = 1
|
||||
|
||||
@@ -73,13 +73,13 @@
|
||||
/obj/item/weapon/mop/advanced
|
||||
desc = "The most advanced tool in a custodian's arsenal. Just think of all the viscera you will clean up with this!"
|
||||
name = "advanced mop"
|
||||
mopcap = 10
|
||||
mopcap = 15
|
||||
icon_state = "advmop"
|
||||
item_state = "mop" //meh will do for now until TG makes one
|
||||
force = 6
|
||||
throwforce = 8
|
||||
throw_range = 4
|
||||
mopspeed = 20
|
||||
mopspeed = 10
|
||||
|
||||
/obj/item/weapon/mop/advanced/cyborg
|
||||
mopcap = 40
|
||||
@@ -90,4 +90,4 @@
|
||||
|
||||
/obj/item/weapon/mop/advanced/cyborg/examine(mob/user)
|
||||
..(user)
|
||||
to_chat(user, "<span class='notice'>The mop's water tank has [round(reagents.get_reagent_amount("water"))] units of water left.</span>")
|
||||
to_chat(user, "<span class='notice'>The mop's water tank has [round(reagents.get_reagent_amount("water"))] units of water left.</span>")
|
||||
|
||||
@@ -33,7 +33,7 @@
|
||||
icon_state = "trashbag"
|
||||
item_state = "trashbag"
|
||||
|
||||
w_class = 4
|
||||
w_class = 1
|
||||
max_w_class = 2
|
||||
storage_slots = 30
|
||||
can_hold = list() // any
|
||||
@@ -46,12 +46,17 @@
|
||||
|
||||
/obj/item/weapon/storage/bag/trash/update_icon()
|
||||
if(contents.len == 0)
|
||||
w_class = 1
|
||||
icon_state = "[initial(icon_state)]"
|
||||
else if(contents.len < 12)
|
||||
w_class = 4
|
||||
icon_state = "[initial(icon_state)]1"
|
||||
else if(contents.len < 21)
|
||||
w_class = 4
|
||||
icon_state = "[initial(icon_state)]2"
|
||||
else icon_state = "[initial(icon_state)]3"
|
||||
else
|
||||
w_class = 4
|
||||
icon_state = "[initial(icon_state)]3"
|
||||
|
||||
/obj/item/weapon/storage/bag/trash/cyborg
|
||||
|
||||
@@ -499,4 +504,4 @@
|
||||
max_combined_w_class = 200
|
||||
w_class = 1
|
||||
can_hold = list("/obj/item/slime_extract","/obj/item/weapon/reagent_containers/food/snacks/monkeycube","/obj/item/weapon/reagent_containers/syringe","/obj/item/weapon/reagent_containers/glass/beaker","/obj/item/weapon/reagent_containers/glass/bottle","/obj/item/weapon/reagent_containers/blood","/obj/item/weapon/reagent_containers/hypospray/autoinjector")
|
||||
burn_state = FLAMMABLE
|
||||
burn_state = FLAMMABLE
|
||||
|
||||
Reference in New Issue
Block a user