mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2025-12-21 07:03:05 +00:00
[MIRROR] Trash bin sprite [MDB IGNORE] (#21610)
* Trash bin sprite (#75612) * Trash bin sprite --------- Co-authored-by: Andrew <mt.forspam@gmail.com> Co-authored-by: ghost sheep <sheepwiththemask@gmail.com>
This commit is contained in:
@@ -1,8 +1,8 @@
|
||||
/obj/structure/closet/crate/bin
|
||||
desc = "A trash bin, place your trash here for the janitor to collect."
|
||||
name = "trash bin"
|
||||
icon_state = "largebins"
|
||||
base_icon_state = "largebins"
|
||||
icon_state = "trashbin"
|
||||
base_icon_state = "trashbin"
|
||||
open_sound = 'sound/effects/bin_open.ogg'
|
||||
close_sound = 'sound/effects/bin_close.ogg'
|
||||
anchored = TRUE
|
||||
@@ -11,9 +11,9 @@
|
||||
can_install_electronics = FALSE
|
||||
paint_jobs = null
|
||||
|
||||
/obj/structure/closet/crate/bin/Initialize(mapload)
|
||||
/obj/structure/closet/crate/bin/LateInitialize()
|
||||
. = ..()
|
||||
update_appearance()
|
||||
update_appearance(UPDATE_ICON)
|
||||
var/static/list/loc_connections = list(
|
||||
COMSIG_TURF_RECEIVE_SWEEPED_ITEMS = PROC_REF(ready_for_trash),
|
||||
)
|
||||
@@ -21,16 +21,17 @@
|
||||
|
||||
/obj/structure/closet/crate/bin/update_overlays()
|
||||
. = ..()
|
||||
. += emissive_appearance(icon, base_icon_state + "_empty", src, alpha = src.alpha)
|
||||
if(contents.len == 0)
|
||||
. += "largebing"
|
||||
. += base_icon_state + "_empty"
|
||||
return
|
||||
if(contents.len >= storage_capacity)
|
||||
. += "largebinr"
|
||||
. += base_icon_state + "_full"
|
||||
return
|
||||
. += "largebino"
|
||||
. += base_icon_state + "_some"
|
||||
|
||||
/obj/structure/closet/crate/bin/attackby(obj/item/W, mob/user, params)
|
||||
if(istype(W, /obj/item/storage/bag/trash))
|
||||
if(istype(W, /obj/item/storage/bag/trash) && !opened)
|
||||
var/obj/item/storage/bag/trash/T = W
|
||||
to_chat(user, span_notice("You fill the bag."))
|
||||
for(var/obj/item/O in src)
|
||||
@@ -43,8 +44,8 @@
|
||||
|
||||
/obj/structure/closet/crate/bin/proc/do_animate()
|
||||
playsound(loc, open_sound, 15, TRUE, -3)
|
||||
flick("animate_largebins", src)
|
||||
addtimer(CALLBACK(src, PROC_REF(do_close)), 13)
|
||||
flick(base_icon_state + "_animate", src)
|
||||
addtimer(CALLBACK(src, PROC_REF(do_close)), 11)
|
||||
|
||||
/obj/structure/closet/crate/bin/proc/do_close()
|
||||
playsound(loc, close_sound, 15, TRUE, -3)
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 28 KiB After Width: | Height: | Size: 28 KiB |
Reference in New Issue
Block a user