Skip to content

Commit 0ca500d

Browse files
committed
Overhaul a lot of visible_message messages to use grammar helpers
1 parent 2008e6a commit 0ca500d

147 files changed

Lines changed: 595 additions & 1052 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

code/_onclick/other_mobs.dm

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,10 +31,7 @@
3131
if(!LAZYLEN(climbers) || (user in climbers) || !user.check_dexterity(DEXTERITY_HOLD_ITEM, silent = TRUE))
3232
return FALSE
3333

34-
user.visible_message(
35-
SPAN_DANGER("\The [user] shakes \the [src]!"),
36-
SPAN_DANGER("You shake \the [src]!")
37-
)
34+
user.visible_action_message("shake", "\the [src]!", dangerous = ACTION_DANGER_ALL)
3835

3936
object_shaken()
4037
return TRUE

code/datums/extensions/cell/cell.dm

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -136,10 +136,7 @@
136136
return TRUE // technically a valid interaction.
137137

138138
// Unload the cell.
139-
user.visible_message(
140-
SPAN_NOTICE("\The [user] removes \the [existing_cell] from \the [holder]."),
141-
SPAN_NOTICE("You remove \the [existing_cell] from \the [holder].")
142-
)
139+
user.visible_action_message("remove", "\the [existing_cell] from \the [holder].")
143140
existing_cell.dropInto(get_turf(holder))
144141
user.put_in_active_hand(existing_cell)
145142
holder_item.update_icon()

code/datums/extensions/holster/holster.dm

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@
5252
if(isobj(storage?.holder))
5353
var/obj/obj_holder = storage.holder
5454
obj_holder.w_class = max(obj_holder.w_class, holstered.w_class)
55-
user.visible_message("<span class='notice'>\The [user] holsters \the [holstered].</span>", "<span class='notice'>You holster \the [holstered].</span>")
55+
user.visible_action_message("holster", "\the [holstered].")
5656
atom_holder.SetName("occupied [initial(atom_holder.name)]")
5757
atom_holder.update_icon()
5858
events_repository.register(/decl/observ/moved, holstered, src, PROC_REF(check_holster))
@@ -82,15 +82,9 @@
8282
G.check_accidents(user)
8383
if(G.safety() && !user.skill_fail_prob(SKILL_WEAPONS, 100, SKILL_EXPERT, 0.5)) //Experienced shooter will disable safety before shooting.
8484
G.toggle_safety(user)
85-
user.visible_message(
86-
"<span class='danger'>\The [user] draws \the [holstered], ready to go!</span>",
87-
"<span class='warning'>You draw \the [holstered], ready to go!</span>"
88-
)
85+
user.visible_action_message("draw", "\the [holstered], ready to go!", dangerous = ACTION_DANGER_OTHERS)
8986
else
90-
user.visible_message(
91-
"<span class='notice'>\The [user] draws \the [holstered], pointing it at the ground.</span>",
92-
"<span class='notice'>You draw \the [holstered], pointing it at the ground.</span>"
93-
)
87+
user.visible_action_message("draw", "\the [holstered], pointing it at the ground.")
9488
if(sound_out)
9589
playsound(get_turf(atom_holder), sound_out, sound_vol)
9690
holstered.add_fingerprint(user)

code/datums/extensions/label.dm

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,8 @@
4343
return
4444

4545
if(user)
46-
user.visible_message(SPAN_NOTICE("\The [user] removes a label from \the [atom_holder]."), \
47-
SPAN_NOTICE("You remove a label, '[label]', from \the [atom_holder]."))
46+
// The infix usage here is a little clunky but I'm not sure how else to make it work
47+
user.visible_action_message("remove", "from \the [atom_holder]", ACTION_DANGER_NONE, self_infix = "a label, '[label]'", other_infix = "a label")
4848

4949
var/old_name = atom_holder.name
5050
// We find and replace the first instance, since that's the one we removed from the list

code/datums/extensions/milkable/milkable.dm

Lines changed: 3 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -94,15 +94,9 @@
9494
handle_milking_failure(user, critter)
9595
return TRUE
9696

97-
user.visible_message(
98-
SPAN_NOTICE("\The [user] starts milking \the [critter] into \the [container]."),
99-
SPAN_NOTICE("You start milking \the [critter] into \the [container].")
100-
)
97+
user.visible_action_message("start", "milking \the [critter] into \the [container].")
10198
if(!user.do_skilled(4 SECONDS, milking_skill, target = critter, check_holding = TRUE))
102-
user.visible_message(
103-
SPAN_NOTICE("\The [user] stops milking \the [critter]."),
104-
SPAN_NOTICE("You stop milking \the [critter].")
105-
)
99+
user.visible_action_message("stop", "milking \the [critter].")
106100
return TRUE
107101

108102
if(critter.stat == DEAD)
@@ -120,10 +114,7 @@
120114
to_chat(user, SPAN_WARNING("Wait for \the [critter] to stop moving before you try milking it."))
121115
return TRUE
122116

123-
user.visible_message(
124-
SPAN_NOTICE("\The [user] milks \the [critter] into \the [container]."),
125-
SPAN_NOTICE("You milk \the [critter] into \the [container].")
126-
)
117+
user.visible_action_message("milk", "\the [critter] into \the [container].")
127118
udder.trans_to(container, min(REAGENTS_FREE_SPACE(container.reagents), rand(15, 20)))
128119
return TRUE
129120

code/datums/extensions/resistable/resistable.dm

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -22,11 +22,7 @@
2222
breakouttime = max(5, breakouttime * user.get_restraint_breakout_mod())
2323
user.setClickCooldown(breakouttime)
2424

25-
user.visible_message(
26-
SPAN_DANGER("\The [user] attempts to remove \the [restraint]!"),
27-
SPAN_DANGER("You attempt to remove \the [restraint] (This will take around [ceil(breakouttime / (1 SECOND))] second\s and you need to stand still)."),
28-
range = 2
29-
)
25+
user.visible_action_message("attempt", "to remove \the [restraint]!", ACTION_DANGER_ALL, range = 2, self_postfix = "(This will take around [ceil(breakouttime / (1 SECOND))] second\s and you need to stand still).")
3026

3127
var/static/resist_stages = 4
3228
for(var/i = 1 to resist_stages)

code/datums/extensions/shearable/shearable.dm

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -62,15 +62,9 @@
6262
handle_shearing_failure(user, critter)
6363
return TRUE
6464

65-
user.visible_message(
66-
SPAN_NOTICE("\The [user] starts shearing \the [critter]."),
67-
SPAN_NOTICE("You start shearing \the [critter].")
68-
)
65+
user.visible_action_message("start", "shearing \the [critter].")
6966
if(!user.do_skilled(4 SECONDS, shearing_skill))
70-
user.visible_message(
71-
SPAN_NOTICE("\The [user] stops shearing \the [critter]."),
72-
SPAN_NOTICE("You stop shearing \the [critter].")
73-
)
67+
user.visible_action_message("stop", "shearing \the [critter].")
7468
return TRUE
7569

7670
if(QDELETED(user) || QDELETED(critter) || QDELETED(shears) || user.get_active_held_item() != shears)

code/datums/storage/subtypes_misc.dm

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -55,10 +55,7 @@
5555

5656
/datum/storage/med_pouch/open(mob/user)
5757
if(!opened)
58-
user.visible_message(
59-
SPAN_NOTICE("\The [user] tears open \the [holder], breaking the vacuum seal!"),
60-
SPAN_NOTICE("You tear open \the [holder], breaking the vacuum seal!")
61-
)
58+
user.visible_action_message("tear", "open \the [holder], breaking the vacuum seal!")
6259
. = ..()
6360

6461
/datum/storage/cigpapers

code/datums/uplink/services.dm

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@
9494
return
9595
state = CURRENTLY_ACTIVE
9696
update_icon()
97-
user.visible_message("<span class='notice'>\The [user] activates \the [src].</span>", "<span class='notice'>You activate \the [src].</span>")
97+
user.visible_action_message("activate", "\the [src].")
9898
log_and_message_admins("has activated the service '[service_label]'", user)
9999

100100
if(service_duration)

code/game/machinery/OpTable.dm

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -99,9 +99,7 @@
9999

100100
/obj/machinery/optable/proc/take_victim(mob/living/target, mob/living/user)
101101
if (target == user)
102-
user.visible_message( \
103-
SPAN_NOTICE("\The [user] climbs on \the [src]."), \
104-
SPAN_NOTICE("You climb on \the [src]."))
102+
user.visible_action_message("climb", "on \the [src].")
105103
else
106104
visible_message(SPAN_NOTICE("\The [target] has been laid on \the [src] by \the [user]."))
107105
target.dropInto(loc)

0 commit comments

Comments
 (0)