Replaced a ton more for viewer in range things with visible_message

git-svn-id: http://tgstation13.googlecode.com/svn/trunk@4934 316c924e-a436-60f5-8080-3fe189b3f50e
This commit is contained in:
Kortgstation@gmail.com
2012-10-22 04:30:19 +00:00
parent 20ddf29dae
commit 068fc7afda
13 changed files with 46 additions and 97 deletions

View File

@@ -33,9 +33,7 @@
if(charged == 1)
new /obj/effect/rend(get_turf(usr))
charged = 0
for(var/mob/M in viewers(usr, null))
if ((M.client && !( M.blinded )))
M.show_message("\red <B>[src] hums with power as [usr] deals a blow to reality itself!</B>")
visible_message("\red <B>[src] hums with power as [usr] deals a blow to reality itself!</B>")
else
user << "\red The unearthly energies that powered the blade are now dormant"

View File

@@ -180,8 +180,7 @@
usr << "[G.affecting.name] will not fit into the sleeper because they have a Metroid latched onto their head."
return
for (var/mob/V in viewers(user))
V.show_message("[user] starts putting [G.affecting.name] into the sleeper.", 3)
visible_message("[user] starts putting [G.affecting.name] into the sleeper.", 3)
if(do_after(user, 20))
if(src.occupant)
@@ -372,8 +371,7 @@
if(M.Victim == usr)
usr << "You're too busy getting your life sucked out of you."
return
for(var/mob/V in viewers(usr))
V.show_message("[usr] starts climbing into the sleeper.", 3)
visible_message("[usr] starts climbing into the sleeper.", 3)
if(do_after(usr, 20))
if(src.occupant)
usr << "\blue <B>The sleeper is already occupied!</B>"

View File

@@ -166,8 +166,7 @@
/obj/machinery/portable_atmospherics/canister/attackby(var/obj/item/weapon/W as obj, var/mob/user as mob)
if(!istype(W, /obj/item/weapon/wrench) && !istype(W, /obj/item/weapon/tank) && !istype(W, /obj/item/device/analyzer) && !istype(W, /obj/item/device/pda))
for(var/mob/V in viewers(src, null))
V.show_message(text("\red [user] hits the [src] with a [W]!"))
visible_message("\red [user] hits the [src] with a [W]!")
src.health -= W.force
src.add_fingerprint(user)
healthcheck()

View File

@@ -106,8 +106,7 @@
return
else if ((istype(W, /obj/item/device/analyzer) || (istype(W, /obj/item/device/pda))) && get_dist(user, src) <= 1)
for (var/mob/O in viewers(user, null))
O << "\red [user] has used [W] on \icon[icon]"
visible_message("\red [user] has used [W] on \icon[icon]")
if(air_contents)
var/pressure = air_contents.return_pressure()
var/total_moles = air_contents.total_moles()

View File

@@ -167,12 +167,10 @@ text("<A href='?src=\ref[src];operation=oddbutton'>[src.oddbutton ? "Yes" : "No"
var/list/cleanbottargets = list()
if(!src.screwloose && !src.oddbutton && prob(5))
for(var/mob/O in viewers(src, null))
O.show_message(text("[src] makes an excited beeping booping sound!"), 1)
visible_message("[src] makes an excited beeping booping sound!")
if(src.screwloose && prob(5))
for(var/mob/O in viewers(src, null))
O.show_message(text("[src] leaks a drop of water. How strange."), 1)
visible_message("[src] leaks a drop of water. How strange.")
if(istype(loc,/turf/simulated))
var/turf/simulated/T = src.loc
if(T.wet < 1)
@@ -189,8 +187,7 @@ text("<A href='?src=\ref[src];operation=oddbutton'>[src.oddbutton ? "Yes" : "No"
T.overlays -= T.wet_overlay
T.wet_overlay = null
if(src.oddbutton && prob(5))
for(var/mob/O in viewers(src, null))
O.show_message(text("Something flies out of [src]. He seems to be acting oddly."), 1)
visible_message("Something flies out of [src]. He seems to be acting oddly.")
var/obj/effect/decal/cleanable/blood/gibs/gib = new /obj/effect/decal/cleanable/blood/gibs(src.loc)
//gib.streak(list(NORTH, SOUTH, EAST, WEST, NORTHEAST, NORTHWEST, SOUTHEAST, SOUTHWEST))
src.oldtarget = gib
@@ -312,8 +309,7 @@ text("<A href='?src=\ref[src];operation=oddbutton'>[src.oddbutton ? "Yes" : "No"
/obj/machinery/bot/cleanbot/proc/clean(var/obj/effect/decal/cleanable/target)
src.anchored = 1
src.icon_state = "cleanbot-c"
for(var/mob/O in viewers(src, null))
O.show_message(text("\red [src] begins to clean up the [target]"), 1)
visible_message("\red [src] begins to clean up the [target]")
src.cleaning = 1
spawn(50)
src.cleaning = 0

View File

@@ -288,8 +288,7 @@ Auto Patrol: []"},
maxstuns--
if (maxstuns <= 0)
target = null
for(var/mob/O in viewers(src, null))
O.show_message("\red <B>[src.target] has been stunned by [src]!</B>", 1, "\red You hear someone fall", 2)
visible_message("\red <B>[src.target] has been stunned by [src]!</B>")
mode = SECBOT_PREP_ARREST
src.anchored = 1
@@ -321,8 +320,7 @@ Auto Patrol: []"},
if (!src.target.handcuffed && !src.arrest_type)
playsound(src.loc, 'sound/weapons/handcuffs.ogg', 30, 1, -2)
mode = SECBOT_ARREST
for(var/mob/O in viewers(src, null))
O.show_message("\red <B>[src] is trying to put handcuffs on [src.target]!</B>", 1)
visible_message("\red <B>[src] is trying to put handcuffs on [src.target]!</B>")
spawn(60)
if (get_dist(src, src.target) <= 1)

View File

@@ -190,8 +190,7 @@
else
return
if(prob(5))
for(var/mob/O in viewers(src, null))
O.show_message(text("[src] makes an excited booping beeping sound!"), 1)
visible_message("[src] makes an excited booping beeping sound!")
if((!src.target || src.target == null) && emagged < 2)
if(targetdirection != null)
@@ -272,8 +271,7 @@
F.break_tile_to_plating()
else
F.ReplaceWithLattice()
for(var/mob/O in viewers(src, null))
O.show_message(text("\red [src] makes an excited booping sound."), 1)
visible_message("\red [src] makes an excited booping sound.")
spawn(50)
src.amount ++
src.anchored = 0
@@ -296,8 +294,7 @@
src.anchored = 1
src.icon_state = "floorbot-c"
if(istype(target, /turf/space/))
for(var/mob/O in viewers(src, null))
O.show_message(text("\red [src] begins to repair the hole"), 1)
visible_message("\red [src] begins to repair the hole")
var/obj/item/stack/tile/plasteel/T = new /obj/item/stack/tile/plasteel
src.repairing = 1
spawn(50)
@@ -308,8 +305,7 @@
src.anchored = 0
src.target = null
else
for(var/mob/O in viewers(src, null))
O.show_message(text("\red [src] begins to improve the floor."), 1)
visible_message("\red [src] begins to improve the floor.")
src.repairing = 1
spawn(50)
src.loc.icon_state = "floor"
@@ -322,8 +318,7 @@
/obj/machinery/bot/floorbot/proc/eattile(var/obj/item/stack/tile/plasteel/T)
if(!istype(T, /obj/item/stack/tile/plasteel))
return
for(var/mob/O in viewers(src, null))
O.show_message(text("\red [src] begins to collect tiles."), 1)
visible_message("\red [src] begins to collect tiles.")
src.repairing = 1
spawn(20)
if(isnull(T))
@@ -346,8 +341,7 @@
return
if(M.amount > 1)
return
for(var/mob/O in viewers(src, null))
O.show_message(text("\red [src] begins to create tiles."), 1)
visible_message("\red [src] begins to create tiles.")
src.repairing = 1
spawn(20)
if(isnull(M))

View File

@@ -419,8 +419,7 @@
return
else
src.icon_state = "medibots"
for(var/mob/O in viewers(src, null))
O.show_message("\red <B>[src] is trying to inject [src.patient]!</B>", 1)
visible_message("\red <B>[src] is trying to inject [src.patient]!</B>")
spawn(30)
if ((get_dist(src, src.patient) <= 1) && (src.on))
if((reagent_id == "internal_beaker") && (src.reagent_glass) && (src.reagent_glass.reagents.total_volume))
@@ -428,8 +427,7 @@
src.reagent_glass.reagents.reaction(src.patient, 2)
else
src.patient.reagents.add_reagent(reagent_id,src.injection_amount)
for(var/mob/O in viewers(src, null))
O.show_message("\red <B>[src] injects [src.patient] with the syringe!</B>", 1)
visible_message("\red <B>[src] injects [src.patient] with the syringe!</B>")
src.icon_state = "medibot[src.on]"
src.currently_healing = 0
@@ -443,8 +441,7 @@
/obj/machinery/bot/medbot/proc/speak(var/message)
if((!src.on) || (!message))
return
for(var/mob/O in hearers(src, null))
O.show_message("<span class='game say'><span class='name'>[src]</span> beeps, \"[message]\"",2)
visible_message("[src] beeps, \"[message]\"")
return
/obj/machinery/bot/medbot/bullet_act(var/obj/item/projectile/Proj)
@@ -454,8 +451,7 @@
/obj/machinery/bot/medbot/explode()
src.on = 0
for(var/mob/O in hearers(src, null))
O.show_message("\red <B>[src] blows apart!</B>", 1)
visible_message("\red <B>[src] blows apart!</B>", 1)
var/turf/Tsec = get_turf(src)
new /obj/item/weapon/storage/firstaid(Tsec)

View File

@@ -68,13 +68,11 @@ for reference:
attackby(obj/item/W as obj, mob/user as mob)
if (istype(W, /obj/item/stack/sheet/wood))
if (src.health < src.maxhealth)
for(var/mob/O in viewers(src, null))
O << "\red [user] begins to repair the [src]!"
visible_message("\red [user] begins to repair the [src]!")
if(do_after(user,20))
src.health = src.maxhealth
W:use(1)
for(var/mob/O in viewers(src, null))
O << "\red [user] repairs the [src]!"
visible_message("\red [user] repairs the [src]!")
return
else
return
@@ -87,8 +85,7 @@ for reference:
src.health -= W.force * 0.75
else
if (src.health <= 0)
for(var/mob/O in viewers(src, null))
O << "\red <B>The barricade is smashed apart!</B>"
visible_message("\red <B>The barricade is smashed apart!</B>")
new /obj/item/stack/sheet/wood(get_turf(src))
new /obj/item/stack/sheet/wood(get_turf(src))
new /obj/item/stack/sheet/wood(get_turf(src))
@@ -98,15 +95,13 @@ for reference:
ex_act(severity)
switch(severity)
if(1.0)
for(var/mob/O in viewers(src, null))
O << "\red <B>The barricade is blown apart!</B>"
visible_message("\red <B>The barricade is blown apart!</B>")
del(src)
return
if(2.0)
src.health -= 25
if (src.health <= 0)
for(var/mob/O in viewers(src, null))
O << "\red <B>The barricade is blown apart!</B>"
visible_message("\red <B>The barricade is blown apart!</B>")
new /obj/item/stack/sheet/wood(get_turf(src))
new /obj/item/stack/sheet/wood(get_turf(src))
new /obj/item/stack/sheet/wood(get_turf(src))
@@ -114,8 +109,7 @@ for reference:
return
meteorhit()
for(var/mob/O in viewers(src, null))
O << "\red <B>The barricade is smashed apart!</B>"
visible_message("\red <B>The barricade is smashed apart!</B>")
new /obj/item/stack/sheet/wood(get_turf(src))
new /obj/item/stack/sheet/wood(get_turf(src))
new /obj/item/stack/sheet/wood(get_turf(src))
@@ -125,8 +119,7 @@ for reference:
blob_act()
src.health -= 25
if (src.health <= 0)
for(var/mob/O in viewers(src, null))
O << "\red <B>The blob eats through the barricade!</B>"
visible_message("\red <B>The blob eats through the barricade!</B>")
del(src)
return
@@ -181,8 +174,7 @@ for reference:
var/datum/effect/effect/system/spark_spread/s = new /datum/effect/effect/system/spark_spread
s.set_up(2, 1, src)
s.start()
for(var/mob/O in viewers(src, null))
O << "\red BZZzZZzZZzZT"
visible_message("\red BZZzZZzZZzZT")
return
return
else if (istype(W, /obj/item/weapon/card/emag))
@@ -193,8 +185,7 @@ for reference:
var/datum/effect/effect/system/spark_spread/s = new /datum/effect/effect/system/spark_spread
s.set_up(2, 1, src)
s.start()
for(var/mob/O in viewers(src, null))
O << "\red BZZZZT"
visible_message("\red BZZzZZzZZzZT")
return
else if (src.emagged == 1)
src.emagged = 2
@@ -202,22 +193,19 @@ for reference:
var/datum/effect/effect/system/spark_spread/s = new /datum/effect/effect/system/spark_spread
s.set_up(2, 1, src)
s.start()
for(var/mob/O in viewers(src, null))
O << "\red BZZZZT"
visible_message("\red BZZzZZzZZzZT")
return
else if (istype(W, /obj/item/weapon/wrench))
if (src.health < src.maxhealth)
src.health = src.maxhealth
src.emagged = 0
src.req_access = list(access_security)
for(var/mob/O in viewers(src, null))
O << "\red [user] repairs the [src]!"
visible_message("\red [user] repairs the [src]!")
return
else if (src.emagged > 0)
src.emagged = 0
src.req_access = list(access_security)
for(var/mob/O in viewers(src, null))
O << "\red [user] repairs the [src]!"
visible_message("\red [user] repairs the [src]!")
return
return
else
@@ -262,8 +250,7 @@ for reference:
proc/explode()
for(var/mob/O in hearers(src, null))
O.show_message("\red <B>[src] blows apart!</B>", 1)
visible_message("\red <B>[src] blows apart!</B>")
var/turf/Tsec = get_turf(src)
/* var/obj/item/stack/rods/ =*/

View File

@@ -202,8 +202,7 @@ Class Procs:
if (ishuman(user))
var/mob/living/carbon/human/H = user
if(H.getBrainLoss() >= 60)
for(var/mob/M in viewers(src, null))
M << "\red [H] stares cluelessly at [src] and drools."
visible_message("\red [H] stares cluelessly at [src] and drools.")
return 1
else if(prob(H.getBrainLoss()))
user << "\red You momentarily forget how to use [src]."

View File

@@ -84,8 +84,7 @@
if (src.health <= 0)
for(var/mob/O in viewers(src, null))
O.show_message("\blue The [src] dissapates")
visible_message("\blue The [src] dissapates")
del(src)
return
@@ -98,8 +97,7 @@
src.health -= max_health*0.75 //3/4 health as damage
if(src.health <= 0)
for(var/mob/O in viewers(src, null))
O.show_message("\blue The [src] dissapates")
visible_message("\blue The [src] dissapates")
del(src)
return
@@ -111,8 +109,7 @@
health -= Proj.damage
..()
if(health <=0)
for(var/mob/O in viewers(src, null))
O.show_message("\blue The [src] dissapates")
visible_message("\blue The [src] dissapates")
del(src)
return
opacity = 1
@@ -145,8 +142,7 @@
/obj/machinery/shield/hitby(AM as mob|obj)
//Let everyone know we've been hit!
for(var/mob/O in viewers(src, null))
O.show_message("\red <B>[src] was hit by [AM].</B>", 1)
visible_message("\red <B>[src] was hit by [AM].</B>")
//Super realistic, resource-intensive, real-time damage calculations.
var/tforce = 0
@@ -162,8 +158,7 @@
//Handle the destruction of the shield
if (src.health <= 0)
for(var/mob/O in viewers(src, null))
O.show_message("\blue The [src] dissapates")
visible_message("\blue The [src] dissapates")
del(src)
return
@@ -548,10 +543,7 @@
else
src.add_fingerprint(user)
user << "\red You hit the [src.name] with your [W.name]!"
for(var/mob/M in viewers(src))
if(M == user) continue
M.show_message("\red The [src.name] has been hit with the [W.name] by [user.name]!")
visible_message("\red The [src.name] has been hit with the [W.name] by [user.name]!")
/obj/machinery/shieldwallgen/proc/cleanup(var/NSEW)
var/obj/machinery/shieldwall/F

View File

@@ -353,8 +353,7 @@
src.SUIT = null
if(src.MASK)
src.MASK = null
for (var/mob/V in viewers(user))
V.show_message("<font color='red'>With a loud whining noise, the Suit Storage Unit's door grinds open. Puffs of ashen smoke come out of its chamber.</font>", 3)
visible_message("<font color='red'>With a loud whining noise, the Suit Storage Unit's door grinds open. Puffs of ashen smoke come out of its chamber.</font>", 3)
src.isbroken = 1
src.isopen = 1
src.islocked = 0
@@ -449,8 +448,7 @@
if ( (src.OCCUPANT) || (src.HELMET) || (src.SUIT) )
usr << "<font color='red'>It's too cluttered inside for you to fit in!</font>"
return
for (var/mob/V in viewers(usr))
V.show_message("[usr] starts squeezing into the suit storage unit!", 3)
visible_message("[usr] starts squeezing into the suit storage unit!", 3)
if(do_after(usr, 10))
usr.stop_pulling()
usr.client.perspective = EYE_PERSPECTIVE
@@ -494,8 +492,7 @@
if ( (src.OCCUPANT) || (src.HELMET) || (src.SUIT) ) //Unit needs to be absolutely empty
user << "<font color='red'>The unit's storage area is too cluttered.</font>"
return
for (var/mob/V in viewers(user))
V.show_message("[user] starts putting [G.affecting.name] into the Suit Storage Unit.", 3)
visible_message("[user] starts putting [G.affecting.name] into the Suit Storage Unit.", 3)
if(do_after(user, 20))
if(!G || !G.affecting) return //derpcheck
var/mob/M = G.affecting

View File

@@ -401,9 +401,7 @@
/obj/machinery/turret/attack_animal(mob/living/simple_animal/M as mob)
if(M.melee_damage_upper == 0) return
if(!(stat & BROKEN))
for(var/mob/O in viewers(src, null))
if ((O.client && !( O.blinded )))
O.show_message(text("\red <B>[M] [M.attacktext] [src]!</B>"), 1)
visible_message("\red <B>[M] [M.attacktext] [src]!</B>")
M.attack_log += text("\[[time_stamp()]\] <font color='red'>attacked [src.name]</font>")
//src.attack_log += text("\[[time_stamp()]\] <font color='orange'>was attacked by [M.name] ([M.ckey])</font>")
src.health -= M.melee_damage_upper
@@ -419,9 +417,7 @@
/obj/machinery/turret/attack_alien(mob/living/carbon/alien/humanoid/M as mob)
if(!(stat & BROKEN))
playsound(src.loc, 'sound/weapons/slash.ogg', 25, 1, -1)
for(var/mob/O in viewers(src, null))
if ((O.client && !( O.blinded )))
O.show_message(text("\red <B>[] has slashed at []!</B>", M, src), 1)
visible_message("\red <B>[] has slashed at []!</B>", M, src)
src.health -= 15
if (src.health <= 0)
src.die()