From 4e68958abd5f8b0680e9dd818f864a5739284d3f Mon Sep 17 00:00:00 2001 From: PollardTheDragon <144391971+PollardTheDragon@users.noreply.github.com> Date: Sun, 10 Nov 2024 08:22:46 -0500 Subject: [PATCH] SOP-Compliant Mega Mop (#27084) --- code/game/mecha/equipment/tools/janitor_tools.dm | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/code/game/mecha/equipment/tools/janitor_tools.dm b/code/game/mecha/equipment/tools/janitor_tools.dm index 866fc0c13132..5980499582d3 100644 --- a/code/game/mecha/equipment/tools/janitor_tools.dm +++ b/code/game/mecha/equipment/tools/janitor_tools.dm @@ -29,6 +29,10 @@ var/refill_cost = 10 /// What reagent to refill with var/refill_reagent = "water" + /// Is the holosign deployer on? + var/holosign_enabled = TRUE + /// Internal holosign deployer + var/obj/item/holosign_creator/janitor/holosign_controller = new /obj/item/holosign_creator/janitor /obj/item/mecha_parts/mecha_equipment/janitor/mega_mop/Initialize(mapload) . = ..() @@ -66,6 +70,8 @@ for(var/turf/current_target_turf in view(1, target)) current_target_turf.cleaning_act(chassis.occupant, src, mop_speed, "mop", ".", skip_do_after = TRUE) chassis.occupant_message("You mop \the [target].") + if(holosign_enabled) + holosign_controller.afterattack(target_turf, chassis.occupant, TRUE) /obj/item/mecha_parts/mecha_equipment/janitor/mega_mop/post_clean(atom/target, mob/user) var/turf/T = get_turf(target) @@ -86,7 +92,7 @@ /obj/item/mecha_parts/mecha_equipment/janitor/mega_mop/get_equip_info() var/output = ..() if(output) - return "[output] \[Refill [refill_enabled? "Enabled" : "Disabled"]\] \[[reagents.total_volume]\]" + return "[output] \[Refill [refill_enabled? "Enabled" : "Disabled"]\] \[[reagents.total_volume]\] \[Holosigns [holosign_enabled? "Enabled" : "Disabled"]\]" /obj/item/mecha_parts/mecha_equipment/janitor/mega_mop/Topic(href, href_list) if(..()) @@ -99,6 +105,13 @@ else STOP_PROCESSING(SSobj, src) update_equip_info() + return + if(afilter.get("toggle_holosign")) + holosign_enabled = !holosign_enabled + if(!holosign_enabled) + holosign_controller.attack_self(chassis.occupant) + update_equip_info() + return #undef MOP_SOUND_CD