Skip to content

Commit

Permalink
SOP-Compliant Mega Mop (ParadiseSS13#27084)
Browse files Browse the repository at this point in the history
  • Loading branch information
PollardTheDragon authored Nov 10, 2024
1 parent 4c9555a commit 4e68958
Showing 1 changed file with 14 additions and 1 deletion.
15 changes: 14 additions & 1 deletion code/game/mecha/equipment/tools/janitor_tools.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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)
. = ..()
Expand Down Expand Up @@ -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)
Expand All @@ -86,7 +92,7 @@
/obj/item/mecha_parts/mecha_equipment/janitor/mega_mop/get_equip_info()
var/output = ..()
if(output)
return "[output] \[<a href='byond://?src=[UID()];toggle_mode=1'>Refill [refill_enabled? "Enabled" : "Disabled"]</a>\] \[[reagents.total_volume]\]"
return "[output] \[<a href='byond://?src=[UID()];toggle_mode=1'>Refill [refill_enabled? "Enabled" : "Disabled"]</a>\] \[[reagents.total_volume]\] \[<a href='byond://?src=[UID()];toggle_holosign=1'>Holosigns [holosign_enabled? "Enabled" : "Disabled"]</a>\]"

/obj/item/mecha_parts/mecha_equipment/janitor/mega_mop/Topic(href, href_list)
if(..())
Expand All @@ -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

Expand Down

0 comments on commit 4e68958

Please sign in to comment.