diff --git a/code/datums/components/crafting/recipes.dm b/code/datums/components/crafting/recipes.dm index d330c47e45d..bd9dcc0f490 100644 --- a/code/datums/components/crafting/recipes.dm +++ b/code/datums/components/crafting/recipes.dm @@ -366,6 +366,7 @@ reqs = list(/obj/item/reagent_containers/cup/bucket = 1, /obj/item/assembly/prox_sensor = 1, /obj/item/bodypart/r_arm/robot = 1) + parts = list(/obj/item/reagent_containers/cup/bucket = 1) time = 4 SECONDS category = CAT_ROBOT diff --git a/code/datums/greyscale/config_types/greyscale_configs.dm b/code/datums/greyscale/config_types/greyscale_configs.dm index ce2215fe2c2..ce9ef9c6021 100644 --- a/code/datums/greyscale/config_types/greyscale_configs.dm +++ b/code/datums/greyscale/config_types/greyscale_configs.dm @@ -775,6 +775,31 @@ icon_file = 'icons/obj/tapes.dmi' json_config = 'code/datums/greyscale/json_configs/tape_piece_spikes_worn.json' +/datum/greyscale_config/buckets + name = "Buckets" + icon_file = 'icons/obj/janitor.dmi' + json_config = 'code/datums/greyscale/json_configs/buckets.json' + +/datum/greyscale_config/buckets_worn + name = "Buckets Worn" + icon_file = 'icons/mob/clothing/head/utility.dmi' + json_config = 'code/datums/greyscale/json_configs/buckets.json' + +/datum/greyscale_config/buckets_inhands_left + name = "Buckets Inhands Left" + icon_file = 'icons/mob/inhands/equipment/custodial_lefthand.dmi' + json_config = 'code/datums/greyscale/json_configs/buckets.json' + +/datum/greyscale_config/buckets_inhands_right + name = "Buckets Inhands Right" + icon_file = 'icons/mob/inhands/equipment/custodial_righthand.dmi' + json_config = 'code/datums/greyscale/json_configs/buckets.json' + +/datum/greyscale_config/buckets_cleanbot + name = "Buckets - Cleanbot" + icon_file = 'icons/mob/silicon/aibots.dmi' + json_config = 'code/datums/greyscale/json_configs/buckets_bot.json' + /datum/greyscale_config/buttondown_slacks name = "Buttondown with Slacks" icon_file = 'icons/obj/clothing/under/shorts_pants_shirts.dmi' diff --git a/code/datums/greyscale/json_configs/buckets.json b/code/datums/greyscale/json_configs/buckets.json new file mode 100644 index 00000000000..5fab0698fc5 --- /dev/null +++ b/code/datums/greyscale/json_configs/buckets.json @@ -0,0 +1,15 @@ +{ + "bucket": [ + { + "type": "icon_state", + "icon_state": "bucket", + "blend_mode": "overlay", + "color_ids": [ 1 ] + }, + { + "type": "icon_state", + "icon_state": "bucket_handle", + "blend_mode": "overlay" + } + ] +} diff --git a/code/datums/greyscale/json_configs/buckets_bot.json b/code/datums/greyscale/json_configs/buckets_bot.json new file mode 100644 index 00000000000..cdefed7af70 --- /dev/null +++ b/code/datums/greyscale/json_configs/buckets_bot.json @@ -0,0 +1,54 @@ +{ + "cleanbot0": [ + { + "type": "icon_state", + "icon_state": "cleanbot_bucket", + "blend_mode": "overlay", + "color_ids": [ 1 ] + }, + { + "type": "icon_state", + "icon_state": "cleanbot0", + "blend_mode": "overlay" + } + ], + "cleanbot1": [ + { + "type": "icon_state", + "icon_state": "cleanbot_bucket", + "blend_mode": "overlay", + "color_ids": [ 1 ] + }, + { + "type": "icon_state", + "icon_state": "cleanbot1", + "blend_mode": "overlay" + } + ], + "cleanbot-c": [ + { + "type": "icon_state", + "icon_state": "cleanbot_bucket", + "blend_mode": "overlay", + "color_ids": [ 1 ] + }, + { + "type": "icon_state", + "icon_state": "cleanbot-c", + "blend_mode": "overlay" + } + ], + "bucket_proxy": [ + { + "type": "icon_state", + "icon_state": "cleanbot_bucket", + "blend_mode": "overlay", + "color_ids": [ 1 ] + }, + { + "type": "icon_state", + "icon_state": "bucket_proxy", + "blend_mode": "overlay" + } + ] +} diff --git a/code/modules/mob/living/simple_animal/bot/cleanbot.dm b/code/modules/mob/living/simple_animal/bot/cleanbot.dm index d2dcf0905aa..1fe06691039 100644 --- a/code/modules/mob/living/simple_animal/bot/cleanbot.dm +++ b/code/modules/mob/living/simple_animal/bot/cleanbot.dm @@ -18,6 +18,9 @@ bot_type = CLEAN_BOT hackables = "cleaning software" path_image_color = "#993299" + greyscale_config = /datum/greyscale_config/buckets_cleanbot + ///the bucket used to build us. + var/obj/item/reagent_containers/cup/bucket/build_bucket ///Flags indicating what kind of cleanables we should scan for to set as our target to clean. var/janitor_mode_flags = CLEANBOT_CLEAN_BLOOD @@ -95,7 +98,11 @@ maints_access_required = list(ACCESS_ROBOTICS, ACCESS_JANITOR, ACCESS_MEDICAL) bot_mode_flags = ~(BOT_MODE_ON | BOT_MODE_REMOTE_ENABLED) -/mob/living/simple_animal/bot/cleanbot/Initialize(mapload) +/mob/living/simple_animal/bot/cleanbot/Initialize(mapload, obj/item/reagent_containers/cup/bucket/bucket_obj) + if(!bucket_obj) + bucket_obj = new() + bucket_obj.forceMove(src) + . = ..() AddComponent(/datum/component/cleaner, CLEANBOT_CLEANING_TIME, \ @@ -111,7 +118,22 @@ GLOB.janitor_devices += src +/mob/living/simple_animal/bot/cleanbot/Entered(atom/movable/arrived, atom/old_loc, list/atom/old_locs) + if(istype(arrived, /obj/item/reagent_containers/cup/bucket)) + if(build_bucket && build_bucket != arrived) + qdel(build_bucket) + build_bucket = arrived + set_greyscale(build_bucket.greyscale_colors) + return ..() + +/mob/living/simple_animal/bot/cleanbot/Exited(atom/movable/gone, direction) + if(gone == build_bucket) + build_bucket = null + return ..() + + /mob/living/simple_animal/bot/cleanbot/Destroy() + QDEL_NULL(build_bucket) GLOB.janitor_devices -= src if(weapon) var/atom/drop_loc = drop_location() @@ -390,7 +412,7 @@ /mob/living/simple_animal/bot/cleanbot/explode() var/atom/drop_loc = drop_location() - new /obj/item/reagent_containers/cup/bucket(drop_loc) + build_bucket.forceMove(drop_loc) new /obj/item/assembly/prox_sensor(drop_loc) return ..() diff --git a/code/modules/mob/living/simple_animal/bot/construction.dm b/code/modules/mob/living/simple_animal/bot/construction.dm index d6dad79b8ca..a4b038b2715 100644 --- a/code/modules/mob/living/simple_animal/bot/construction.dm +++ b/code/modules/mob/living/simple_animal/bot/construction.dm @@ -45,15 +45,42 @@ desc = "It's a bucket with a sensor attached." name = "incomplete cleanbot assembly" icon_state = "bucket_proxy" + greyscale_config = /datum/greyscale_config/buckets_cleanbot throwforce = 5 created_name = "Cleanbot" + var/obj/item/reagent_containers/cup/bucket/bucket_obj + +/obj/item/bot_assembly/cleanbot/Initialize(mapload, obj/item/reagent_containers/cup/bucket/new_bucket) + if(!new_bucket) + new_bucket = new() + new_bucket.forceMove(src) + return ..() + +/obj/item/bot_assembly/cleanbot/Entered(atom/movable/arrived, atom/old_loc, list/atom/old_locs) + if(istype(arrived, /obj/item/reagent_containers/cup/bucket)) + if(bucket_obj && bucket_obj != arrived) + qdel(bucket_obj) + bucket_obj = arrived + set_greyscale(bucket_obj.greyscale_colors) + return ..() + +/obj/item/bot_assembly/cleanbot/Exited(atom/movable/gone, direction) + if(gone == bucket_obj) + bucket_obj = null + return ..() + + +/obj/item/bot_assembly/cleanbot/Destroy(force) + QDEL_NULL(bucket_obj) + return ..() + /obj/item/bot_assembly/cleanbot/attackby(obj/item/W, mob/user, params) ..() if(istype(W, /obj/item/bodypart/l_arm/robot) || istype(W, /obj/item/bodypart/r_arm/robot)) if(!can_finish_build(W, user)) return - var/mob/living/simple_animal/bot/cleanbot/A = new(drop_location()) + var/mob/living/simple_animal/bot/cleanbot/A = new(drop_location(), bucket_obj) A.name = created_name A.robot_arm = W.type to_chat(user, span_notice("You add [W] to [src]. Beep boop!")) diff --git a/code/modules/reagents/reagent_containers/cups/_cup.dm b/code/modules/reagents/reagent_containers/cups/_cup.dm index 1f9e6f903ef..fb162318341 100644 --- a/code/modules/reagents/reagent_containers/cups/_cup.dm +++ b/code/modules/reagents/reagent_containers/cups/_cup.dm @@ -311,6 +311,11 @@ inhand_icon_state = "bucket" lefthand_file = 'icons/mob/inhands/equipment/custodial_lefthand.dmi' righthand_file = 'icons/mob/inhands/equipment/custodial_righthand.dmi' + greyscale_colors = "#0085e5" //matches 1:1 with the original sprite color before gag-ification. + greyscale_config = /datum/greyscale_config/buckets + greyscale_config_worn = /datum/greyscale_config/buckets_worn + greyscale_config_inhand_left = /datum/greyscale_config/buckets_inhands_left + greyscale_config_inhand_right = /datum/greyscale_config/buckets_inhands_right custom_materials = list(/datum/material/iron=200) w_class = WEIGHT_CLASS_NORMAL amount_per_transfer_from_this = 20 @@ -331,10 +336,20 @@ ITEM_SLOT_DEX_STORAGE ) +/obj/item/reagent_containers/cup/bucket/Initialize(mapload, vol) + if(greyscale_colors == initial(greyscale_colors)) + set_greyscale(pick(list("#0085e5", COLOR_OFF_WHITE, COLOR_ORANGE_BROWN, COLOR_SERVICE_LIME, COLOR_MOSTLY_PURE_ORANGE, COLOR_FADED_PINK, COLOR_RED, COLOR_YELLOW, COLOR_VIOLET, COLOR_WEBSAFE_DARK_GRAY))) + return ..() + /obj/item/reagent_containers/cup/bucket/wooden name = "wooden bucket" icon_state = "woodbucket" inhand_icon_state = "woodbucket" + greyscale_colors = null + greyscale_config = null + greyscale_config_worn = null + greyscale_config_inhand_left = null + greyscale_config_inhand_right = null custom_materials = list(/datum/material/wood = MINERAL_MATERIAL_AMOUNT * 2) armor = list(MELEE = 10, BULLET = 0, LASER = 0, ENERGY = 0, BOMB = 0, BIO = 0, FIRE = 0, ACID = 50) resistance_flags = FLAMMABLE @@ -351,8 +366,8 @@ else if(isprox(O)) //This works with wooden buckets for now. Somewhat unintended, but maybe someone will add sprites for it soon(TM) to_chat(user, span_notice("You add [O] to [src].")) qdel(O) - qdel(src) - user.put_in_hands(new /obj/item/bot_assembly/cleanbot) + var/obj/item/bot_assembly/cleanbot/new_cleanbot_ass = new(null, src) + user.put_in_hands(new_cleanbot_ass) return return ..() diff --git a/icons/mob/clothing/head/utility.dmi b/icons/mob/clothing/head/utility.dmi index f1b8cbb9ba3..bd4318891c8 100644 Binary files a/icons/mob/clothing/head/utility.dmi and b/icons/mob/clothing/head/utility.dmi differ diff --git a/icons/mob/inhands/equipment/custodial_lefthand.dmi b/icons/mob/inhands/equipment/custodial_lefthand.dmi index 04f9c7af711..8af03cfdf64 100644 Binary files a/icons/mob/inhands/equipment/custodial_lefthand.dmi and b/icons/mob/inhands/equipment/custodial_lefthand.dmi differ diff --git a/icons/mob/inhands/equipment/custodial_righthand.dmi b/icons/mob/inhands/equipment/custodial_righthand.dmi index d5f7ebe89c6..03a281d143f 100644 Binary files a/icons/mob/inhands/equipment/custodial_righthand.dmi and b/icons/mob/inhands/equipment/custodial_righthand.dmi differ diff --git a/icons/mob/silicon/aibots.dmi b/icons/mob/silicon/aibots.dmi index 0e4ddd1b984..82c98560520 100644 Binary files a/icons/mob/silicon/aibots.dmi and b/icons/mob/silicon/aibots.dmi differ diff --git a/icons/obj/janitor.dmi b/icons/obj/janitor.dmi index cb2c906a325..8da111e8af5 100644 Binary files a/icons/obj/janitor.dmi and b/icons/obj/janitor.dmi differ