Add lints for idiomatic balloon alert usage (#72280)

Adds lints for `balloon_alert(span_xxx(...))` (which is always wrong),
and balloon alert where the first letter is a capital (which is usually
wrong). Fixes everything that failed them. As a reminder, abbreviations
like "AI" and "GPS" shouldn't be capitalized in a balloon alert.

In cases where this is intentional for flavor (there was one case), you
can `UNLINT` like so:

Co-authored-by: Zephyr <12817816+ZephyrTFA@users.noreply.github.com>
This commit is contained in:
Mothblocks
2022-12-29 19:01:45 +00:00
committed by GitHub
co-authored by Zephyr
parent 2b1ef0a7ed
commit e9351f6ae0
28 changed files with 73 additions and 57 deletions
+8 -8
View File
@@ -8,7 +8,7 @@
switch(interaction)
if(AI_TRANS_TO_CARD)
if(!ai)
balloon_alert(user, "no AI in suit!")
balloon_alert(user, "no ai in suit!")
return
balloon_alert(user, "transferring to card...")
if(!do_after(user, 5 SECONDS, target = src))
@@ -28,21 +28,21 @@
intAI.controlled_equipment = null
intAI.remote_control = null
balloon_alert(intAI, "transferred to a card")
balloon_alert(user, "AI transferred to card")
balloon_alert(user, "ai transferred to card")
ai = null
if(AI_TRANS_FROM_CARD) //Using an AI card to upload to the suit.
intAI = card.AI
if(!intAI)
balloon_alert(user, "no AI in card!")
balloon_alert(user, "no ai in card!")
return
if(ai)
balloon_alert(user, "already has AI!")
balloon_alert(user, "already has ai!")
return
if(intAI.deployed_shell) //Recall AI if shelled so it can be checked for a client
intAI.disconnect_shell()
if(intAI.stat || !intAI.client)
balloon_alert(user, "AI unresponsive!")
balloon_alert(user, "ai unresponsive!")
return
balloon_alert(user, "transferring to suit...")
if(!do_after(user, 5 SECONDS, target = src))
@@ -50,7 +50,7 @@
return
if(ai)
return
balloon_alert(user, "AI transferred to suit")
balloon_alert(user, "ai transferred to suit")
ai_enter_mod(intAI)
card.AI = null
@@ -135,7 +135,7 @@
return
var/mob/living/silicon/ai/ai = stored_ai.resolve()
if(!ai)
balloon_alert(user, "no AI!")
balloon_alert(user, "no ai!")
return
balloon_alert(user, "transferring to card...")
if(!do_after(user, 5 SECONDS, target = src) || !ai)
@@ -145,5 +145,5 @@
ai.forceMove(card)
card.AI = ai
ai.notify_ghost_cloning("You have been recovered from the wreckage!", source = card)
balloon_alert(user, "AI transferred to card")
balloon_alert(user, "ai transferred to card")
stored_ai = null
+1 -1
View File
@@ -196,7 +196,7 @@
balloon_alert(user, "boots added")
return
playsound(src, 'sound/machines/click.ogg', 30, TRUE)
balloon_alert(user, "You fit [part] onto [src].")
balloon_alert(user, "fit [part.name]")
boots = part
step = BOOTS_STEP
else if(part.tool_behaviour == TOOL_CROWBAR) //Deconstruct
+1 -1
View File
@@ -231,7 +231,7 @@
if(prob(min(num_sheets_dispensed * 2, 30)))
if(crisp_paper in mod.wearer.held_items)
mod.wearer.dropItemToGround(crisp_paper, force = TRUE)
crisp_paper.balloon_alert(mod.wearer, "PC LOAD LETTER!")
crisp_paper.balloon_alert(mod.wearer, UNLINT("PC LOAD LETTER!"))
crisp_paper.visible_message(span_warning("[crisp_paper] bursts into flames, it's too crisp!"))
crisp_paper.fire_act(1000, 100)