Revert all the this.

This commit is contained in:
ESwordTheCat
2014-04-27 04:04:12 -08:00
parent cfa3f483f7
commit 22dd864a6d
6 changed files with 5 additions and 90 deletions

View File

@@ -1,70 +1,3 @@
/proc/recursiveMobCheck(const/atom/movable/O, const/list/listeners = list(), const/repeat = 3)
if (!isobj(O) && !ismob(O))
CRASH("1st argument must be a movable atom, value : [O]")
if (!islist(listeners))
CRASH("2nd argument must be a list, value : [listeners]")
if (!isnum(repeat))
CRASH("3rd argument must be a num, value : [repeat]")
var/list/ma = listeners.Copy()
if (!repeat)
return ma
for(var/atom/movable/Movable in O.contents)
if(ismob(Movable))
ma += Movable
else if(istype(Movable, /obj/item/device/radio))
ma += Movable
else
ma = recursive_mob_check(Movable, ma, repeat - 1)
return ma
/proc/getListenersInView(const/atom/movable/center, const/dist = world.view, const/rmb = 1)
if (!isobj(center) && !ismob(center))
CRASH("1st argument must be an obj or mob, value : [center]")
if (!isnum(dist))
CRASH("2nd argument must be a num, value : [dist]")
if (!isnum(rmb))
CRASH("3rd argument must be a num, value : [rmb]")
var/turf/T = get_turf(center)
if (!T)
return list()
var/list/listeners = list()
for(var/atom/movable/Movable in hear(dist, T))
if(ismob(Movable))
var/mob/M = Movable
if (istype(M, /mob/camera))
continue
if (istype(M, /mob/dead))
listeners += M
continue
listeners += M
if (rmb)
listeners = recursive_mob_check(M, listeners)
else if(istype(Movable, /obj/item/device/radio))
listeners += Movable
// Don't include if the player is not connected.
for (var/mob/Mob in listeners)
if (isnull(Mob.client))
listeners -= Mob
return listeners
/proc/dopage(src,target)
var/href_list
var/href

View File

@@ -149,8 +149,7 @@ steam.start() -- spawns the effect
/obj/effect/effect/sparks/New()
..()
//playsound(get_turf(src), "sparks", 100, 1)
playsoundE(src, "sparks", 100, 1)
playsound(get_turf(src), "sparks", 100, 1)
var/turf/T = src.loc
if (istype(T, /turf))
T.hotspot_expose(1000,100)

View File

@@ -668,8 +668,7 @@ var/GLOBAL_RADIO_TYPE = 1 // radio type to use
var/range = receive_range(freq, level)
if(range > -1)
//return get_mobs_in_view(canhear_range, src)
return getListenersInView(src)
return get_mobs_in_view(canhear_range, src)
/obj/item/device/radio/examine()

View File

@@ -9,18 +9,6 @@ var/list/hiss_sound = list('sound/voice/hiss1.ogg','sound/voice/hiss2.ogg','soun
var/list/page_sound = list('sound/effects/pageturn1.ogg', 'sound/effects/pageturn2.ogg','sound/effects/pageturn3.ogg')
//var/list/gun_sound = list('sound/weapons/Gunshot.ogg', 'sound/weapons/Gunshot2.ogg','sound/weapons/Gunshot3.ogg','sound/weapons/Gunshot4.ogg')
/proc/playsoundE(const/atom/movable/source, const/soundin, const/vol, const/vary, const/extrarange, const/falloff)
if (!isobj(source) && !ismob(source))
CRASH("1st argument must be a movable atom, value : [source]")
var/soundinn = get_sfx(soundin) // Same sound for everyone
var/frequency = get_rand_frequency() // Same frequency for everybody
var/turf/turf_source = get_turf(source)
for (var/mob/Mob in getListenersInView(source, world.view + extrarange, 0))
Mob.playsound_local(turf_source, soundinn, vol, vary, frequency, falloff)
/proc/playsound(var/atom/source, soundin, vol as num, vary, extrarange as num, falloff)
soundin = get_sfx(soundin) // same sound for everyone

View File

@@ -131,12 +131,10 @@ var/global/normal_ooc_colour = "#002eb8"
var/list/heard
var/mob/living/silicon/ai/AI
if(!isAI(src.mob))
//heard = get_mobs_in_view(7, src.mob)
heard = getListenersInView(src.mob)
heard = get_mobs_in_view(7, src.mob)
else
AI = src.mob
//heard = get_mobs_in_view(7, (istype(AI.eyeobj) ? AI.eyeobj : AI)) //if it doesn't have an eye somehow give it just the AI mob itself
heard = getListenersInView(istype(AI.eyeobj) ? AI.eyeobj : AI) // If it doesn't have an eye somehow give it just the AI mob itself.
heard = get_mobs_in_view(7, (istype(AI.eyeobj) ? AI.eyeobj : AI)) //if it doesn't have an eye somehow give it just the AI mob itself
for(var/mob/M in heard)
if(AI == M) continue
if(!M.client)

View File

@@ -467,10 +467,8 @@ var/list/department_radio_keys = list(
var/list/listening
//listening = get_mobs_in_view(message_range, src)
listening = getListenersInView(src, message_range)
listening = get_mobs_in_view(message_range, src)
//var/list/onscreen = get_mobs_in_view(7, src)
//var/list/onscreen = getListenersInView(src)
for(var/mob/M in player_list)
if (!M.client)
continue //skip monkeys and leavers