diff --git a/code/ATMOSPHERICS/pipes/simple.dm b/code/ATMOSPHERICS/pipes/simple.dm
index da6fce0c263..eabf5a2badb 100644
--- a/code/ATMOSPHERICS/pipes/simple.dm
+++ b/code/ATMOSPHERICS/pipes/simple.dm
@@ -102,7 +102,7 @@ The regular pipe you see everywhere, including bent ones.
else return 1
/obj/machinery/atmospherics/pipe/simple/proc/burst()
- src.visible_message("[src] bursts!");
+ visible_message("[src] bursts!");
playsound(src.loc, 'sound/effects/bang.ogg', 25, 1)
var/datum/effect/effect/system/harmless_smoke_spread/smoke = new
smoke.set_up(1,0, src.loc, 0)
diff --git a/code/game/machinery/doors/windowdoor.dm b/code/game/machinery/doors/windowdoor.dm
index f35c1c7a38e..a0cb59823f5 100644
--- a/code/game/machinery/doors/windowdoor.dm
+++ b/code/game/machinery/doors/windowdoor.dm
@@ -200,7 +200,6 @@
/obj/machinery/door/window/mech_melee_attack(obj/mecha/M)
if(M.damtype == "brute")
playsound(src.loc, 'sound/effects/Glasshit.ogg', 75, 1)
- M.occupant_message("You hit [src].")
visible_message("[M.name] has hit [src].")
take_damage(M.force)
return
diff --git a/code/game/mecha/equipment/tools/tools.dm b/code/game/mecha/equipment/tools/tools.dm
index dc711bb3874..7105b6d5234 100644
--- a/code/game/mecha/equipment/tools/tools.dm
+++ b/code/game/mecha/equipment/tools/tools.dm
@@ -26,13 +26,14 @@
cargo_holder = null
/obj/item/mecha_parts/mecha_equipment/tool/hydraulic_clamp/action(atom/target)
- if(!action_checks(target)) return
- if(!cargo_holder) return
+ if(!action_checks(target))
+ return
+ if(!cargo_holder)
+ return
if(istype(target,/obj))
var/obj/O = target
if(!O.anchored)
if(cargo_holder.cargo.len < cargo_holder.cargo_capacity)
- occupant_message("You lift [target] and start to load it into cargo compartment.")
chassis.visible_message("[chassis] lifts [target] and starts to load it into cargo compartment.")
set_ready_state(0)
chassis.use_power(energy_drain)
@@ -46,12 +47,12 @@
occupant_message("[target] successfully loaded.")
log_message("Loaded [O]. Cargo compartment capacity: [cargo_holder.cargo_capacity - cargo_holder.cargo.len]")
else
- occupant_message("You must hold still while handling objects.")
+ occupant_message("You must hold still while handling objects.")
O.anchored = initial(O.anchored)
else
- occupant_message("Not enough room in cargo compartment.")
+ occupant_message("Not enough room in cargo compartment.")
else
- occupant_message("[target] is firmly secured.")
+ occupant_message("[target] is firmly secured.")
else if(istype(target,/mob/living))
var/mob/living/M = target
@@ -62,8 +63,9 @@
return
M.adjustOxyLoss(round(dam_force/2))
M.updatehealth()
- occupant_message("You squeeze [target] with [src.name]. Something cracks.")
- chassis.visible_message("[chassis] squeezes [target].")
+ target.visible_message("[chassis] squeezes [target].", \
+ "[chassis] squeezes [target].",\
+ "You hear something crack")
add_logs(chassis.occupant, M, "attacked", object="[name]", addition="(INTENT: [uppertext(chassis.occupant.a_intent)]) (DAMTYE: [uppertext(damtype)])")
else
step_away(M,chassis)
@@ -83,20 +85,28 @@
force = 15
/obj/item/mecha_parts/mecha_equipment/tool/drill/action(atom/target)
- if(!action_checks(target)) return
+ if(!action_checks(target))
+ return
if(isobj(target))
var/obj/target_obj = target
- if(!target_obj.vars.Find("unacidable") || target_obj.unacidable) return
+ if(target_obj.unacidable)
+ return
set_ready_state(0)
chassis.use_power(energy_drain)
- chassis.visible_message("[chassis] starts to drill [target]", "You hear the drill.")
- occupant_message("You start to drill [target]")
+ target.visible_message("[chassis] starts to drill [target]", \
+ "[chassis] starts to drill [target]", \
+ "You hear drilling.")
var/T = chassis.loc
var/C = target.loc //why are these backwards? we may never know -Pete
if(do_after_cooldown(target))
if(T == chassis.loc && src == chassis.selected)
if(istype(target, /turf/simulated/wall/r_wall))
- occupant_message("[target] is too durable to drill through.")
+ if(istype(src , /obj/item/mecha_parts/mecha_equipment/tool/drill/diamonddrill))
+ if(do_after_cooldown(target))//To slow down how fast mechs can drill through the station
+ log_message("Drilled through [target]")
+ target.ex_act(3)
+ else
+ occupant_message("[target] is too durable to drill through.")
else if(istype(target, /turf/simulated/mineral))
for(var/turf/simulated/mineral/M in range(chassis,1))
if(get_dir(chassis,M)&chassis.dir)
@@ -122,7 +132,10 @@
else if(target.loc == C)
log_message("Drilled through [target]")
if(isliving(target))
- drill_mob(target, chassis.occupant)
+ if(istype(src , /obj/item/mecha_parts/mecha_equipment/tool/drill/diamonddrill))
+ drill_mob(target, chassis.occupant, 120)
+ else
+ drill_mob(target, chassis.occupant)
else
target.ex_act(2)
return 1
@@ -156,50 +169,6 @@
equip_cooldown = 20
force = 15
-/obj/item/mecha_parts/mecha_equipment/tool/drill/diamonddrill/action(atom/target)
- if(!action_checks(target)) return
- if(isobj(target))
- var/obj/target_obj = target
- if(target_obj.unacidable) return
- set_ready_state(0)
- chassis.use_power(energy_drain)
- chassis.visible_message("[chassis] starts to drill [target]", "You hear the drill.")
- occupant_message("You start to drill [target]")
- var/T = chassis.loc
- var/C = target.loc //why are these backwards? we may never know -Pete
- if(do_after_cooldown(target))
- if(T == chassis.loc && src == chassis.selected)
- if(istype(target, /turf/simulated/wall/r_wall))
- if(do_after_cooldown(target))//To slow down how fast mechs can drill through the station
- log_message("Drilled through [target]")
- target.ex_act(3)
- else if(istype(target, /turf/simulated/mineral))
- for(var/turf/simulated/mineral/M in range(chassis,1))
- if(get_dir(chassis,M)&chassis.dir)
- M.gets_drilled()
- log_message("Drilled through [target]")
- if(locate(/obj/item/mecha_parts/mecha_equipment/tool/hydraulic_clamp) in chassis.equipment)
- var/obj/structure/ore_box/ore_box = locate(/obj/structure/ore_box) in chassis:cargo
- if(ore_box)
- for(var/obj/item/weapon/ore/ore in range(chassis,1))
- if(get_dir(chassis,ore)&chassis.dir)
- ore.Move(ore_box)
- else if(istype(target,/turf/simulated/floor/plating/asteroid))
- for(var/turf/simulated/floor/plating/asteroid/M in range(target,1))
- M.gets_dug()
- log_message("Drilled through [target]")
- if(locate(/obj/item/mecha_parts/mecha_equipment/tool/hydraulic_clamp) in chassis.equipment)
- var/obj/structure/ore_box/ore_box = locate(/obj/structure/ore_box) in chassis:cargo
- if(ore_box)
- for(var/obj/item/weapon/ore/ore in range(target,1))
- ore.Move(ore_box)
- else if(target.loc == C)
- log_message("Drilled through [target]")
- if(isliving(target))
- drill_mob(target, chassis.occupant, 120)
- else
- target.ex_act(2)
- return 1
/obj/item/mecha_parts/mecha_equipment/tool/drill/diamonddrill/can_attach(obj/mecha/M as obj)
if(..())
@@ -756,7 +725,6 @@
if(!action_checks(src))
return chassis.dynbulletdamage(Proj)
if(prob(chassis.deflect_chance*deflect_coeff))
- chassis.occupant_message("The armor deflects incoming projectile.")
chassis.visible_message("The [chassis.name] armor deflects the projectile")
chassis.log_append_to_last("Armor saved.")
else
@@ -772,7 +740,6 @@
if(!action_checks(A))
return chassis.dynhitby(A)
if(prob(chassis.deflect_chance*deflect_coeff) || istype(A, /mob/living) || istype(A, /obj/item/mecha_parts/mecha_tracking))
- chassis.occupant_message("The [A] bounces off the armor.")
chassis.visible_message("The [A] bounces off the [chassis] armor")
chassis.log_append_to_last("Armor saved.")
if(istype(A, /mob/living))
@@ -1206,7 +1173,6 @@
var/obj/O = target
if(!O.anchored)
if(cargo_holder.cargo.len < cargo_holder.cargo_capacity)
- chassis.occupant_message("You lift [target] and start to load it into cargo compartment.")
chassis.visible_message("[chassis] lifts [target] and starts to load it into cargo compartment.")
set_ready_state(0)
chassis.use_power(energy_drain)
@@ -1220,26 +1186,25 @@
chassis.occupant_message("[target] successfully loaded.")
chassis.log_message("Loaded [O]. Cargo compartment capacity: [cargo_holder.cargo_capacity - cargo_holder.cargo.len]")
else
- chassis.occupant_message("You must hold still while handling objects.")
+ chassis.occupant_message("You must hold still while handling objects.")
O.anchored = initial(O.anchored)
else
- chassis.occupant_message("Not enough room in cargo compartment.")
+ chassis.occupant_message("Not enough room in cargo compartment.")
else
- chassis.occupant_message("[target] is firmly secured.")
+ chassis.occupant_message("[target] is firmly secured.")
else if(istype(target,/mob/living))
var/mob/living/M = target
if(M.stat>1) return
if(chassis.occupant.a_intent == "harm")
- chassis.occupant_message("You obliterate [target] with [src.name], leaving blood and guts everywhere.")
- chassis.visible_message("[chassis] destroys [target] in an unholy fury.")
+ target.visible_message("[chassis] destroys [target] in an unholy fury.", \
+ "[chassis] destroys [target] in an unholy fury.")
if(chassis.occupant.a_intent == "disarm")
- chassis.occupant_message("You tear [target]'s limbs off with [src.name].")
- chassis.visible_message("[chassis] rips [target]'s arms off.")
+ target.visible_message("[chassis] rips [target]'s arms off.", \
+ "[chassis] rips [target]'s arms off.")
else
step_away(M,chassis)
- chassis.occupant_message("You smash into [target], sending them flying.")
- chassis.visible_message("[chassis] tosses [target] like a piece of paper.")
+ target.visible_message("[chassis] tosses [target] like a piece of paper.")
set_ready_state(0)
chassis.use_power(energy_drain)
do_after_cooldown()
diff --git a/code/game/mecha/mecha.dm b/code/game/mecha/mecha.dm
index 6bd0982060b..757cf90e8da 100644
--- a/code/game/mecha/mecha.dm
+++ b/code/game/mecha/mecha.dm
@@ -320,7 +320,6 @@ obj/mecha/proc/can_use(mob/user)
playsound(src, 'sound/items/Welder.ogg', 50, 1)
else
return
- M.occupant_message("You hit [src].")
visible_message("[M.name] has hit [src].")
take_damage(M.force, damtype)
add_logs(M.occupant, src, "attacked", object=M, addition="(INTENT: [uppertext(M.occupant.a_intent)]) (DAMTYPE: [uppertext(M.damtype)])")
@@ -475,6 +474,7 @@ obj/mecha/proc/can_use(mob/user)
var/damage = absorbDamage(amount,type)
health -= damage
update_health()
+ occupant_message("Taking damage!")
log_append_to_last("Took [damage] points of damage. Damage type: \"[type]\".",1)
/obj/mecha/proc/absorbDamage(damage,damage_type)
@@ -499,7 +499,6 @@ obj/mecha/proc/can_use(mob/user)
src.take_damage(15)
src.check_for_internal_damage(list(MECHA_INT_TEMP_CONTROL,MECHA_INT_TANK_BREACH,MECHA_INT_CONTROL_LOST))
user.visible_message("[user] hits [src.name], doing some damage.", "You hit [src.name] with all your might. The metal creaks and bends.")
- src.occupant_message("[user] hits [src.name], doing some damage.")
else
user.visible_message("[user] hits [src.name]. Nothing happens","You hit [src.name] with no visible effect.")
src.log_append_to_last("Armor saved.")
@@ -517,14 +516,11 @@ obj/mecha/proc/can_use(mob/user)
src.take_damage(15)
src.check_for_internal_damage(list(MECHA_INT_TEMP_CONTROL,MECHA_INT_TANK_BREACH,MECHA_INT_CONTROL_LOST))
playsound(src.loc, 'sound/weapons/slash.ogg', 50, 1, -1)
- user << "You slash at the armored suit!"
visible_message("The [user] slashes at [src.name]'s armor!")
- src.occupant_message("The [user] slashes at [src.name]'s armor!")
else
src.log_append_to_last("Armor saved.")
playsound(src.loc, 'sound/weapons/slash.ogg', 50, 1, -1)
user << "\green Your claws had no effect!"
- src.occupant_message("The [user]'s claws are stopped by the armor.")
visible_message("The [user] rebounds off [src.name]'s armor!")
return
@@ -541,12 +537,10 @@ obj/mecha/proc/can_use(mob/user)
src.take_damage(damage)
src.check_for_internal_damage(list(MECHA_INT_TEMP_CONTROL,MECHA_INT_TANK_BREACH,MECHA_INT_CONTROL_LOST))
visible_message("[user] [user.attacktext] [src]!")
- src.occupant_message("[user] [user.attacktext] [src]!")
add_logs(user, src, "attacked", admin=0)
else
src.log_append_to_last("Armor saved.")
playsound(src.loc, 'sound/weapons/slash.ogg', 50, 1, -1)
- src.occupant_message("[user]'s attack is stopped by the armor.")
visible_message("The [user] rebounds off [src.name]'s armor!")
add_logs(user, src, "attacked", admin=0)
return
@@ -565,7 +559,6 @@ obj/mecha/proc/can_use(mob/user)
src.visible_message("The [A] fastens firmly to [src].")
return
if(prob(src.deflect_chance) || istype(A, /mob))
- src.occupant_message("[A] bounces off the armor.")
src.visible_message("[A] bounces off the [src.name] armor")
src.log_append_to_last("Armor saved.")
if(istype(A, /mob/living))
@@ -574,7 +567,6 @@ obj/mecha/proc/can_use(mob/user)
else if(istype(A, /obj))
var/obj/O = A
if(O.throwforce)
- src.occupant_message("[src.name] is hit by [A].")
src.visible_message("[src.name] is hit by [A].")
src.take_damage(O.throwforce)
src.check_for_internal_damage(list(MECHA_INT_TEMP_CONTROL,MECHA_INT_TANK_BREACH,MECHA_INT_CONTROL_LOST))
@@ -589,7 +581,6 @@ obj/mecha/proc/can_use(mob/user)
/obj/mecha/proc/dynbulletdamage(var/obj/item/projectile/Proj)
if(prob(src.deflect_chance))
- src.occupant_message("The armor deflects incoming projectile.")
src.visible_message("The [src.name] armor deflects the projectile")
src.log_append_to_last("Armor saved.")
return
@@ -601,7 +592,6 @@ obj/mecha/proc/can_use(mob/user)
ignore_threshold = 1
if((Proj.damage_type == BRUTE || Proj.damage_type == BURN))
src.take_damage(Proj.damage,Proj.flag)
- src.occupant_message("[src.name] is hit by [Proj]!")
src.visible_message("[src.name] is hit by [Proj].")
src.check_for_internal_damage(list(MECHA_INT_FIRE,MECHA_INT_TEMP_CONTROL,MECHA_INT_TANK_BREACH,MECHA_INT_CONTROL_LOST,MECHA_INT_SHORT_CIRCUIT),ignore_threshold)
Proj.on_hit(src)
@@ -677,14 +667,8 @@ obj/mecha/proc/can_use(mob/user)
if(prob(src.deflect_chance))
user << "The [W] bounces off [src.name] armor."
src.log_append_to_last("Armor saved.")
-/*
- for (var/mob/V in viewers(src))
- if(V.client && !(V.blinded))
- V.show_message("The [W] bounces off [src.name] armor.", 1)
-*/
return 0
else
- src.occupant_message("[user] hits [src] with [W].")
user.visible_message("[user] hits [src] with [W].", "You hit [src] with [W].")
src.take_damage(W.force,W.damtype)
src.check_for_internal_damage(list(MECHA_INT_TEMP_CONTROL,MECHA_INT_TANK_BREACH,MECHA_INT_CONTROL_LOST))
diff --git a/code/game/objects/items/toys.dm b/code/game/objects/items/toys.dm
index 9b91799d00e..30f01ef2e6a 100644
--- a/code/game/objects/items/toys.dm
+++ b/code/game/objects/items/toys.dm
@@ -67,7 +67,7 @@
/obj/item/toy/balloon/throw_impact(atom/hit_atom)
if(src.reagents.total_volume >= 1)
- src.visible_message("The [src] bursts!","You hear a pop and a splash.")
+ src.visible_message("\The [src] bursts!","You hear a pop and a splash.")
src.reagents.reaction(get_turf(hit_atom))
for(var/atom/A in get_turf(hit_atom))
src.reagents.reaction(A)
@@ -735,7 +735,7 @@ obj/item/toy/cards/deck/attack_hand(mob/user as mob)
src.cards -= choice
H.pickup(user)
user.put_in_active_hand(H)
- src.visible_message("[user] draws a card from the deck.", "You draw a card from the deck.")
+ user.visible_message("[user] draws a card from the deck.", "You draw a card from the deck.")
if(cards.len > 26)
src.icon_state = "deck_[deckstyle]_full"
else if(cards.len > 10)
diff --git a/code/game/objects/structures.dm b/code/game/objects/structures.dm
index eadb7c6d32d..ac90c38347b 100644
--- a/code/game/objects/structures.dm
+++ b/code/game/objects/structures.dm
@@ -12,7 +12,6 @@
/obj/structure/mech_melee_attack(obj/mecha/M)
if(M.damtype == "brute")
- M.occupant_message("You hit [src].")
visible_message("[M.name] has hit [src].")
return 1
return 0
diff --git a/code/game/turfs/simulated/walls.dm b/code/game/turfs/simulated/walls.dm
index d30300fd82e..d519784cd61 100644
--- a/code/game/turfs/simulated/walls.dm
+++ b/code/game/turfs/simulated/walls.dm
@@ -76,11 +76,9 @@
/turf/simulated/wall/mech_melee_attack(obj/mecha/M)
if(M.damtype == "brute")
playsound(src, 'sound/weapons/punch4.ogg', 50, 1)
- M.occupant_message("You hit [src].")
visible_message("[M.name] has hit [src]!")
if(prob(5) && M.force > 20)
dismantle_wall(1)
- M.occupant_message("You smash through the wall.")
visible_message("[src.name] smashes through the wall!")
playsound(src, 'sound/effects/meteorimpact.ogg', 100, 1)
diff --git a/code/modules/mob/living/carbon/human/human_defense.dm b/code/modules/mob/living/carbon/human/human_defense.dm
index 7594938f076..b1ae7e55db6 100644
--- a/code/modules/mob/living/carbon/human/human_defense.dm
+++ b/code/modules/mob/living/carbon/human/human_defense.dm
@@ -441,7 +441,6 @@ emp_act
update_damage_overlays(0)
updatehealth()
- M.occupant_message("You hit [src].")
visible_message("[M.name] has hit [src]!", \
"[M.name] has hit [src]!")
add_logs(M.occupant, src, "attacked", object=M, addition="(INTENT: [uppertext(M.occupant.a_intent)]) (DAMTYPE: [uppertext(M.damtype)])")
diff --git a/code/modules/mob/living/emote.dm b/code/modules/mob/living/emote.dm
index ed75ad5e894..cb4c51e3618 100644
--- a/code/modules/mob/living/emote.dm
+++ b/code/modules/mob/living/emote.dm
@@ -267,7 +267,8 @@
for(var/mob/M in dead_mob_list)
if(!M.client || istype(M, /mob/new_player))
continue //skip monkeys, leavers and new players
- if(M.stat == DEAD && (M.client.prefs.toggles & CHAT_GHOSTSIGHT) && !(M in viewers(src,null)))
+ var/T = get_turf(src)
+ if(M.stat == DEAD && (M.client.prefs.toggles & CHAT_GHOSTSIGHT) && !(M in viewers(T,null)))
M.show_message(message)
diff --git a/code/modules/mob/living/living_defense.dm b/code/modules/mob/living/living_defense.dm
index 54898ef7638..dbf6733a955 100644
--- a/code/modules/mob/living/living_defense.dm
+++ b/code/modules/mob/living/living_defense.dm
@@ -86,14 +86,12 @@ proc/vol_by_throwforce_and_or_w_class(var/obj/item/I)
else
return
updatehealth()
- M.occupant_message("You hit [src].")
visible_message("[M.name] has hit [src]!", \
"[M.name] has hit [src]!")
add_logs(M.occupant, src, "attacked", object=M, addition="(INTENT: [uppertext(M.occupant.a_intent)]) (DAMTYPE: [uppertext(M.damtype)])")
else
step_away(src,M)
add_logs(M.occupant, src, "pushed", object=M, admin=0)
- M.occupant_message("You push [src] out of the way.")
visible_message("[M] pushes [src] out of the way.")
return
diff --git a/code/modules/mob/living/silicon/pai/life.dm b/code/modules/mob/living/silicon/pai/life.dm
index f35c035b9dc..04e80299d9a 100644
--- a/code/modules/mob/living/silicon/pai/life.dm
+++ b/code/modules/mob/living/silicon/pai/life.dm
@@ -18,9 +18,3 @@
stat = CONSCIOUS
return
health = maxHealth - getBruteLoss() - getFireLoss()
-
-/mob/living/silicon/pai/proc/follow_pai()
- while(card)
- loc = get_turf(card)
- sleep(5)
- qdel(src) //if there's no pAI we shouldn't exist
diff --git a/code/modules/mob/living/silicon/pai/pai.dm b/code/modules/mob/living/silicon/pai/pai.dm
index a73ecc80042..193477e8dab 100644
--- a/code/modules/mob/living/silicon/pai/pai.dm
+++ b/code/modules/mob/living/silicon/pai/pai.dm
@@ -4,7 +4,6 @@
mouse_opacity = 0
density = 0
mob_size = 0
- invisibility = 101
var/network = "SS13"
var/obj/machinery/camera/current = null
@@ -51,7 +50,7 @@
/mob/living/silicon/pai/New(var/obj/item/device/paicard)
make_laws()
canmove = 0
- src.loc = get_turf(paicard)
+ src.loc = paicard
card = paicard
sradio = new(src)
if(card)
@@ -66,7 +65,6 @@
pda.owner = text("[]", src)
pda.name = pda.owner + " (" + pda.ownjob + ")"
- follow_pai()
..()
/mob/living/silicon/pai/make_laws()
diff --git a/code/modules/mob/mob.dm b/code/modules/mob/mob.dm
index e80a4a863c3..cc57e5b0daa 100644
--- a/code/modules/mob/mob.dm
+++ b/code/modules/mob/mob.dm
@@ -75,28 +75,52 @@ var/next_mob_id = 0
src << msg
return
-// Show a message to all mobs in sight of this one
+// Show a message to all mobs who sees the src mob and the src mob itself
// This would be for visible actions by the src mob
// message is the message output to anyone who can see e.g. "[src] does something!"
-// self_message (optional) is what the src mob sees e.g. "You do something!"
+// self_message (optional) is what the src mob sees e.g. "You do something!"
// blind_message (optional) is what blind people will hear e.g. "You hear something!"
/mob/visible_message(var/message, var/self_message, var/blind_message)
- for(var/mob/M in viewers(src))
+ var/list/atom_viewers = list()
+ for(var/atom/movable/A in view(src))
+ atom_viewers |= recursive_hear_check(A)
+ atom_viewers |= src
+ for(var/mob/M in atom_viewers)
if(M.see_invisible < invisibility)
continue //can't view the invisible
var/msg = message
if(self_message && M==src)
msg = self_message
- M.show_message( msg, 1, blind_message, 2)
+ M.show_message( msg, 1)
+ if(blind_message)
+ var/list/atom_hearers = list()
+ for(var/atom/movable/O in get_hearers_in_view(7, src))
+ if(O in atom_viewers)
+ continue
+ atom_hearers |= O
+ for(var/mob/MOB in atom_hearers)
+ MOB.show_message(blind_message, 2)
-// Show a message to all mobs in sight of this atom
+// Show a message to all mobs who sees this atom
// Use for objects performing visible actions
// message is output to anyone who can see, e.g. "The [src] does something!"
// blind_message (optional) is what blind people will hear e.g. "You hear something!"
+
/atom/proc/visible_message(var/message, var/blind_message)
- for(var/mob/M in viewers(src))
- M.show_message( message, 1, blind_message, 2)
+ var/list/atom_viewers = list()
+ for(var/atom/movable/A in view(src))
+ atom_viewers |= recursive_hear_check(A)
+ for(var/mob/M in atom_viewers)
+ M.show_message( message, 1)
+ if(blind_message)
+ var/list/atom_hearers = list()
+ for(var/atom/movable/O in get_hearers_in_view(7, src))
+ if(O in atom_viewers)
+ continue
+ atom_hearers |= O
+ for(var/mob/MOB in atom_hearers)
+ MOB.show_message(blind_message, 2)
// Show a message to all mobs in earshot of this one
// This would be for audible actions by the src mob
diff --git a/code/modules/projectiles/projectile.dm b/code/modules/projectiles/projectile.dm
index 8fa9b8b795d..0de1e2fe156 100644
--- a/code/modules/projectiles/projectile.dm
+++ b/code/modules/projectiles/projectile.dm
@@ -91,8 +91,8 @@
if(hitsound)
var/volume = vol_by_damage()
playsound(loc, hitsound, volume, 1, -1)
- M.visible_message("[M] is hit by \a [src] in the [parse_zone(def_zone)]!", \
- "[M] is hit by \a [src] in the [parse_zone(def_zone)]!") //X has fired Y is now given by the guns so you cant tell who shot you if you could not see the shooter
+ M.visible_message("[M] is hit by \a [src] in the [parse_zone(def_zone)]!", \
+ "[M] is hit by \a [src] in the [parse_zone(def_zone)]!") //X has fired Y is now given by the guns so you cant tell who shot you if you could not see the shooter
add_logs(firer, M, "shot", object="[src]", addition=reagent_note)
var/turf/new_loc = get_turf(A)
diff --git a/code/modules/reagents/Chemistry-Holder.dm b/code/modules/reagents/Chemistry-Holder.dm
index 2490dd033b0..254b10db479 100644
--- a/code/modules/reagents/Chemistry-Holder.dm
+++ b/code/modules/reagents/Chemistry-Holder.dm
@@ -284,7 +284,7 @@ datum/reagents/proc/handle_reactions()
ME2.Uses--
if(ME2.Uses <= 0) // give the notification that the slime core is dead
for(var/mob/M in seen)
- M << "\icon[my_atom] The [my_atom]'s power is consumed in the reaction."
+ M << "\icon[my_atom] \The [my_atom]'s power is consumed in the reaction."
ME2.name = "used slime extract"
ME2.desc = "This extract has been used up."