Janitor balloon alerts (#76284)

## About The Pull Request

Adds some balloon alerts to the mop, /datum/component/cleaner, and the
light replacer
edits some balloon alerts on the janicart

## Why It's Good For The Game

Doing your duties as a janitor tends to clog up chat, and this stuff
seems better for balloon alerts anyway.
Newer players are also often directed towards janitor, and this will
help with feedback for someone unaccustomed to looking at chat.
If any of these are too long let me know.

## Changelog

🆑 Seven
qol: Mops, some cleaning items, and light replacers now use balloon
alerts
/🆑
This commit is contained in:
Lufferly
2023-06-26 22:16:08 -06:00
committed by GitHub
parent 16ac04b486
commit 5057e65041
5 changed files with 26 additions and 25 deletions
-2
View File
@@ -117,9 +117,7 @@
cleaning_duration = (cleaning_duration * min(user.mind.get_skill_modifier(/datum/skill/cleaning, SKILL_SPEED_MODIFIER)+skill_duration_modifier_offset, 1))
//do the cleaning
user.visible_message(span_notice("[user] starts to clean [target]!"), span_notice("You start to clean [target]..."))
if(do_after(user, cleaning_duration, target = target))
user.visible_message(span_notice("[user] finishes cleaning [target]!"), span_notice("You finish cleaning [target]."))
if(clean_target)
for(var/obj/effect/decal/cleanable/cleanable_decal in target) //it's important to do this before you wash all of the cleanables off
user.mind?.adjust_experience(/datum/skill/cleaning, round(cleanable_decal.beauty / CLEAN_SKILL_BEAUTY_ADJUSTMENT))
@@ -71,24 +71,24 @@
/obj/item/lightreplacer/attackby(obj/item/insert, mob/user, params)
. = ..()
if(uses >= max_uses)
to_chat(user, span_warning("[src.name] is full."))
user.balloon_alert(user, "already full!")
return TRUE
if(istype(insert, /obj/item/stack/sheet/glass))
var/obj/item/stack/sheet/glass/glass_to_insert = insert
if(glass_to_insert.use(LIGHTBULB_COST))
add_uses(GLASS_SHEET_USES)
to_chat(user, span_notice("You insert a glass sheet into \the [src.name]. [status_string()]"))
user.balloon_alert(user, "glass inserted")
else
to_chat(user, span_warning("You need [LIGHTBULB_COST] glass to replace lights!"))
user.balloon_alert(user, "need [LIGHTBULB_COST] glass sheets!")
return TRUE
if(insert.type == /obj/item/shard) //we don't want to insert plasma, titanium or other types of shards
if(!user.temporarilyRemoveItemFromInventory(insert))
to_chat(user, span_notice("[insert] is stuck in your hand!"))
user.balloon_alert(user, "stuck in your hand!")
return TRUE
if(!add_shard(user)) //add_shard will display a message if it created a bulb from the shard so only display message when that does not happen
to_chat(user, span_notice("You insert [insert] into \the [src]. [status_string()]"))
user.balloon_alert(user, "shard inserted")
qdel(insert)
return TRUE
@@ -96,7 +96,7 @@
var/obj/item/light/light_to_insert = insert
//remove from player's hand
if(!user.temporarilyRemoveItemFromInventory(light_to_insert))
to_chat(user, span_notice("[insert] is stuck in your hand!"))
user.balloon_alert(user, "stuck in your hand!")
return TRUE
//insert light. display message only if adding a shard did not create a new bulb else the messages will conflict
@@ -106,7 +106,7 @@
else if(add_shard(user))
display_msg = FALSE
if(display_msg)
to_chat(user, span_notice("You insert [light_to_insert] into \the [src]. [status_string()]"))
user.balloon_alert(user, "light inserted")
qdel(light_to_insert)
return TRUE
@@ -146,12 +146,12 @@
if(!replaced_something)
if(uses == max_uses)
to_chat(user, span_warning("\The [src] is full!"))
user.balloon_alert(user, "already full!")
else
to_chat(user, span_warning("\The [storage_to_empty] contains no lights, glass sheets or shards."))
user.balloon_alert(user, "nothing usable in [storage_to_empty]!")
return TRUE
to_chat(user, span_notice("You fill \the [src] with lights from \the [storage_to_empty]. [status_string()]"))
user.balloon_alert(user, "lights inserted")
return TRUE
/obj/item/lightreplacer/emag_act()
@@ -190,9 +190,12 @@
return ..()
/obj/item/lightreplacer/attack_self(mob/user)
var/on_a_light = FALSE //For if we are on the same tile as a light when we do this
for(var/obj/machinery/light/target in user.loc)
replace_light(target, user)
to_chat(user, status_string())
on_a_light = TRUE
if(!on_a_light) //So we dont give a ballon alert when we just used replace_light
user.balloon_alert(user, "[uses] lights, [bulb_shards]/[BULB_SHARDS_REQUIRED] fragments")
/**
* attempts to fix lights, flood lights & lights on a turf
@@ -245,14 +248,14 @@
return
// target not in view
if(!(target in view(7, get_turf(user))))
to_chat(user, span_warning("The \'Out of Range\' light on [src] blinks red."))
user.balloon_alert(user, "out of range!")
return
//replace lights & stuff
do_action(target, user)
/obj/item/lightreplacer/proc/status_string()
return "It has [uses] light\s remaining (plus [bulb_shards] fragment\s)."
return "It has [uses] light\s remaining (plus [bulb_shards]/[BULB_SHARDS_REQUIRED] fragment\s)."
/obj/item/lightreplacer/proc/Use(mob/user)
if(uses <= 0)
@@ -290,11 +293,12 @@
return FALSE
//If the light source is ok then what are we doing here
if(target.status == LIGHT_OK)
to_chat(user, span_warning("There is a working [target.fitting] already inserted!"))
user.balloon_alert(user, "light already installed!")
return FALSE
//Were all out
if(!Use(user))
to_chat(user, span_warning("\The [src]'s refill light blinks red."))
//This balloon alert text is a little redundant, but I want to avoid a new player "yeah i know the light is empty" moment
user.balloon_alert(user, "light replacer empty!")
return FALSE
//remove any broken light on the fixture & add it as a shard
@@ -314,7 +318,6 @@
target.update()
//clean up
qdel(old_light)
to_chat(user, span_notice("You replace \the [target.fitting] with \the [src]."))
return TRUE
+2 -2
View File
@@ -40,7 +40,7 @@
if(clean_blacklist[atom_to_clean.type])
return DO_NOT_CLEAN
if(reagents.total_volume < 0.1)
to_chat(cleaner, span_warning("Your mop is dry!"))
cleaner.balloon_alert(cleaner, "mop is dry!")
return DO_NOT_CLEAN
return reagents.has_chemical_flag(REAGENT_CLEANS, 1)
@@ -90,7 +90,7 @@
START_PROCESSING(SSobj, src)
else
STOP_PROCESSING(SSobj,src)
to_chat(user, span_notice("You set the condenser switch to the '[refill_enabled ? "ON" : "OFF"]' position."))
user.balloon_alert(user, "condenser switch [refill_enabled ? "on" : "off"]")
playsound(user, 'sound/machines/click.ogg', 30, TRUE)
/obj/item/mop/advanced/process(seconds_per_tick)
+3 -3
View File
@@ -38,13 +38,13 @@
/obj/structure/mop_bucket/attackby_secondary(obj/item/weapon, mob/user, params)
if(istype(weapon, /obj/item/mop))
if(weapon.reagents.total_volume >= weapon.reagents.maximum_volume)
balloon_alert(user, "mop is already soaked!")
balloon_alert(user, "already soaked!")
return SECONDARY_ATTACK_CANCEL_ATTACK_CHAIN
if(!CART_HAS_MINIMUM_REAGENT_VOLUME)
balloon_alert(user, "mop bucket is empty!")
balloon_alert(user, "empty!")
return SECONDARY_ATTACK_CANCEL_ATTACK_CHAIN
reagents.trans_to(weapon, weapon.reagents.maximum_volume, transfered_by = user)
balloon_alert(user, "wet mop")
balloon_alert(user, "doused mop")
playsound(src, 'sound/effects/slosh.ogg', 25, vary = TRUE)
if(istype(weapon, /obj/item/reagent_containers) || istype(weapon, /obj/item/mop))
@@ -405,10 +405,10 @@
/obj/item/reagent_containers/cup/bucket/attackby(obj/O, mob/user, params)
if(istype(O, /obj/item/mop))
if(reagents.total_volume < 1)
to_chat(user, span_warning("[src] is out of water!"))
user.balloon_alert(user, "empty!")
else
reagents.trans_to(O, 5, transfered_by = user)
to_chat(user, span_notice("You wet [O] in [src]."))
user.balloon_alert(user, "doused [O]")
playsound(loc, 'sound/effects/slosh.ogg', 25, TRUE)
return
else if(isprox(O)) //This works with wooden buckets for now. Somewhat unintended, but maybe someone will add sprites for it soon(TM)