mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-21 19:17:50 +01:00
Janicart and Mop bucket tweaks (#20198)
* Janicart and Mop bucket tweaks * removed by mistake * Update code/game/objects/structures/mop_bucket.dm Co-authored-by: Ryan <80364400+Sirryan2002@users.noreply.github.com> Co-authored-by: Ryan <80364400+Sirryan2002@users.noreply.github.com>
This commit is contained in:
@@ -10,6 +10,7 @@
|
||||
face_while_pulling = FALSE
|
||||
container_type = OPENCONTAINER
|
||||
//copypaste sorry
|
||||
var/maximum_volume = 150
|
||||
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
|
||||
@@ -18,10 +19,9 @@
|
||||
var/signs = 0
|
||||
var/const/max_signs = 4
|
||||
|
||||
|
||||
/obj/structure/janitorialcart/Initialize(mapload)
|
||||
. = ..()
|
||||
create_reagents(100)
|
||||
create_reagents(150)
|
||||
GLOB.janitorial_equipment += src
|
||||
|
||||
/obj/structure/janitorialcart/Destroy()
|
||||
@@ -125,7 +125,6 @@
|
||||
popup.set_content(dat)
|
||||
popup.open()
|
||||
|
||||
|
||||
/obj/structure/janitorialcart/Topic(href, href_list)
|
||||
if(!in_range(src, usr))
|
||||
return
|
||||
@@ -166,7 +165,6 @@
|
||||
update_icon(UPDATE_OVERLAYS)
|
||||
updateUsrDialog()
|
||||
|
||||
|
||||
/obj/structure/janitorialcart/update_overlays()
|
||||
. = ..()
|
||||
if(mybag)
|
||||
@@ -182,14 +180,14 @@
|
||||
if(reagents.total_volume > 0)
|
||||
var/image/reagentsImage = image(icon,src,"cart_reagents0")
|
||||
reagentsImage.alpha = 150
|
||||
switch((reagents.total_volume/reagents.maximum_volume)*100)
|
||||
if(1 to 25)
|
||||
switch((reagents.total_volume / maximum_volume) * 100)
|
||||
if(1 to 37)
|
||||
reagentsImage.icon_state = "cart_reagents1"
|
||||
if(26 to 50)
|
||||
if(38 to 75)
|
||||
reagentsImage.icon_state = "cart_reagents2"
|
||||
if(51 to 75)
|
||||
if(76 to 112)
|
||||
reagentsImage.icon_state = "cart_reagents3"
|
||||
if(76 to 100)
|
||||
if(113 to 150)
|
||||
reagentsImage.icon_state = "cart_reagents4"
|
||||
reagentsImage.icon += mix_color_from_reagents(reagents.reagent_list)
|
||||
. += reagentsImage
|
||||
|
||||
@@ -1,32 +1,28 @@
|
||||
/obj/structure/mopbucket
|
||||
desc = "Fill it with water, but don't forget a mop!"
|
||||
name = "mop bucket"
|
||||
desc = "Fill it with water, but don't forget a mop!"
|
||||
icon = 'icons/obj/janitor.dmi'
|
||||
icon_state = "mopbucket"
|
||||
density = TRUE
|
||||
container_type = OPENCONTAINER
|
||||
face_while_pulling = FALSE
|
||||
var/obj/item/mop/stored_mop = null
|
||||
var/maximum_volume = 150
|
||||
var/amount_per_transfer_from_this = 5 //shit I dunno, adding this so syringes stop runtime erroring. --NeoFite
|
||||
|
||||
/obj/structure/mopbucket/Initialize(mapload)
|
||||
. = ..()
|
||||
create_reagents(100)
|
||||
create_reagents(150)
|
||||
GLOB.janitorial_equipment += src
|
||||
|
||||
/obj/structure/mopbucket/full/Initialize(mapload)
|
||||
. = ..()
|
||||
reagents.add_reagent("water", 100)
|
||||
reagents.add_reagent("water", 150)
|
||||
|
||||
/obj/structure/mopbucket/Destroy()
|
||||
GLOB.janitorial_equipment -= src
|
||||
return ..()
|
||||
|
||||
/obj/structure/mopbucket/examine(mob/user)
|
||||
. = ..()
|
||||
if(in_range(user, src))
|
||||
. += "[bicon(src)] [src] contains [reagents.total_volume] units of water left!"
|
||||
|
||||
/obj/structure/mopbucket/attackby(obj/item/W as obj, mob/user as mob, params)
|
||||
if(istype(W, /obj/item/mop))
|
||||
var/obj/item/mop/M = W
|
||||
@@ -38,7 +34,6 @@
|
||||
return
|
||||
to_chat(user, "<span class='notice'>Theres already a mop in the mopbucket.</span>")
|
||||
return
|
||||
return ..()
|
||||
|
||||
/obj/structure/mopbucket/proc/put_in_cart(obj/item/mop/I, mob/user)
|
||||
user.drop_item()
|
||||
@@ -60,14 +55,14 @@
|
||||
if(reagents.total_volume > 0)
|
||||
var/image/reagentsImage = image(icon, src, "mopbucket_reagents0")
|
||||
reagentsImage.alpha = 150
|
||||
switch((reagents.total_volume/reagents.maximum_volume)*100)
|
||||
if(1 to 25)
|
||||
switch((reagents.total_volume / maximum_volume) * 100)
|
||||
if(1 to 37)
|
||||
reagentsImage.icon_state = "mopbucket_reagents1"
|
||||
if(26 to 50)
|
||||
if(38 to 75)
|
||||
reagentsImage.icon_state = "mopbucket_reagents2"
|
||||
if(51 to 75)
|
||||
if(76 to 112)
|
||||
reagentsImage.icon_state = "mopbucket_reagents3"
|
||||
if(76 to 100)
|
||||
if(113 to 150)
|
||||
reagentsImage.icon_state = "mopbucket_reagents4"
|
||||
reagentsImage.icon += mix_color_from_reagents(reagents.reagent_list)
|
||||
. += reagentsImage
|
||||
@@ -81,4 +76,3 @@
|
||||
update_icon(UPDATE_OVERLAYS)
|
||||
return
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user