mirror of
https://github.com/vgstation-coders/vgstation13.git
synced 2025-12-10 02:16:05 +00:00
-You can now only hear from headsets when it is on your ear slot. People around you won't be able to hear your headset anymore.
-The firedoor wasn't updating the freelook camera. When I looked at it I couldn't figure out why it was using it's own "rebuild" code, supposedly it only updates the air that it set in the dir variable but the current map doesn't utilize it at all (firelocks with a dir of 8 which are lined horizontalally), and you would have to have two thick wide firelocks to make it effective. I've commented it out and I'll put it back in if we have problems. git-svn-id: http://tgstation13.googlecode.com/svn/trunk@4832 316c924e-a436-60f5-8080-3fe189b3f50e
This commit is contained in:
@@ -193,6 +193,12 @@
|
||||
// Returns a list of mobs who can hear any of the radios given in @radios
|
||||
var/list/speaker_coverage = list()
|
||||
for(var/obj/item/device/radio/R in radios)
|
||||
// This is usually for headsets, which only the wearer can hear.
|
||||
if(R.canhear_range == 0)
|
||||
if(ismob(R.loc))
|
||||
. += R.loc
|
||||
continue
|
||||
|
||||
var/turf/speaker = get_turf(R)
|
||||
if(speaker)
|
||||
for(var/turf/T in hear(R.canhear_range,speaker))
|
||||
@@ -203,7 +209,7 @@
|
||||
var/turf/ear = get_turf(M)
|
||||
if(ear && (level == 0 || level == ear.z))
|
||||
if(ear in speaker_coverage)
|
||||
. += M
|
||||
. |= M
|
||||
|
||||
return .
|
||||
|
||||
|
||||
@@ -99,7 +99,7 @@
|
||||
return 0
|
||||
return 1
|
||||
|
||||
|
||||
/*
|
||||
update_nearby_tiles(need_rebuild)
|
||||
if(!air_master) return 0
|
||||
|
||||
@@ -120,4 +120,5 @@
|
||||
else
|
||||
if(istype(source)) air_master.tiles_to_update += source
|
||||
if(istype(destination)) air_master.tiles_to_update += destination
|
||||
return 1
|
||||
return 1
|
||||
*/
|
||||
@@ -229,7 +229,7 @@ var/message_delay = 0 // To make sure restarting the recentmessages list is kept
|
||||
|
||||
if(data == 1)
|
||||
for (var/obj/item/device/radio/intercom/R in connection.devices["[RADIO_CHAT]"])
|
||||
if(R.receive_range(display_freq, level) > 0)
|
||||
if(R.receive_range(display_freq, level) > -1)
|
||||
radios += R
|
||||
|
||||
// --- Broadcast only to intercoms and station-bounced radios ---
|
||||
@@ -240,7 +240,7 @@ var/message_delay = 0 // To make sure restarting the recentmessages list is kept
|
||||
if(istype(R, /obj/item/device/radio/headset))
|
||||
continue
|
||||
|
||||
if(R.receive_range(display_freq, level) > 0)
|
||||
if(R.receive_range(display_freq, level) > -1)
|
||||
radios += R
|
||||
|
||||
// --- Broadcast to syndicate radio! ---
|
||||
@@ -250,14 +250,14 @@ var/message_delay = 0 // To make sure restarting the recentmessages list is kept
|
||||
|
||||
for (var/obj/item/device/radio/R in syndicateconnection.devices["[RADIO_CHAT]"])
|
||||
|
||||
if(R.receive_range(SYND_FREQ, level) > 0)
|
||||
if(R.receive_range(SYND_FREQ, level) > -1)
|
||||
radios += R
|
||||
|
||||
// --- Broadcast to ALL radio devices ---
|
||||
|
||||
else
|
||||
for (var/obj/item/device/radio/R in connection.devices["[RADIO_CHAT]"])
|
||||
if(R.receive_range(display_freq, level) > 0)
|
||||
if(R.receive_range(display_freq, level) > -1)
|
||||
radios += R
|
||||
|
||||
// Get a list of mobs who can hear from the radios we collected.
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
g_amt = 0
|
||||
m_amt = 75
|
||||
subspace_transmission = 1
|
||||
canhear_range = 1 // can't hear headsets from very far away
|
||||
canhear_range = 0 // can't hear headsets from very far away
|
||||
|
||||
slot_flags = SLOT_EARS
|
||||
var/translate_binary = 0
|
||||
@@ -20,6 +20,13 @@
|
||||
keyslot1 = new /obj/item/device/encryptionkey/
|
||||
recalculateChannels()
|
||||
|
||||
/obj/item/device/radio/headset/receive_range(freq, level)
|
||||
if(ishuman(src.loc))
|
||||
var/mob/living/carbon/human/H = src.loc
|
||||
if(H.ears == src)
|
||||
return ..(freq, level)
|
||||
return -1
|
||||
|
||||
/obj/item/device/radio/headset/syndicate
|
||||
origin_tech = "syndicate=3"
|
||||
/obj/item/device/radio/headset/syndicate/New()
|
||||
|
||||
@@ -30,18 +30,18 @@
|
||||
|
||||
/obj/item/device/radio/intercom/receive_range(freq, level)
|
||||
if (!on)
|
||||
return 0
|
||||
return -1
|
||||
if (!(src.wires & WIRE_RECEIVE))
|
||||
return 0
|
||||
return -1
|
||||
if(level != 0)
|
||||
var/turf/position = get_turf(src)
|
||||
if(isnull(position) || position.z != level)
|
||||
return 0
|
||||
return -1
|
||||
if (!src.listening)
|
||||
return 0
|
||||
return -1
|
||||
if(freq == SYND_FREQ)
|
||||
if(!(src.syndie))
|
||||
return 0//Prevents broadcast of messages over devices lacking the encryption
|
||||
return -1//Prevents broadcast of messages over devices lacking the encryption
|
||||
|
||||
return canhear_range
|
||||
|
||||
|
||||
@@ -595,24 +595,24 @@ var/GLOBAL_RADIO_TYPE = 1 // radio type to use
|
||||
/obj/item/device/radio/proc/receive_range(freq, level)
|
||||
// check if this radio can receive on the given frequency, and if so,
|
||||
// what the range is in which mobs will hear the radio
|
||||
// returns: 0 if can't receive, range otherwise
|
||||
// returns: -1 if can't receive, range otherwise
|
||||
|
||||
if (!(wires & WIRE_RECEIVE))
|
||||
return 0
|
||||
return -1
|
||||
if(!listening)
|
||||
return 0
|
||||
return -1
|
||||
if(level != 0)
|
||||
var/turf/position = get_turf(src)
|
||||
if(isnull(position) || position.z != level)
|
||||
return 0
|
||||
return -1
|
||||
if(freq == SYND_FREQ)
|
||||
if(!(src.syndie))//Checks to see if it's allowed on that frequency, based on the encryption keys
|
||||
return 0
|
||||
return -1
|
||||
if (!on)
|
||||
return 0
|
||||
return -1
|
||||
if (!freq) //recieved on main frequency
|
||||
if (!listening)
|
||||
return 0
|
||||
return -1
|
||||
else
|
||||
var/accept = (freq==frequency && listening)
|
||||
if (!accept)
|
||||
@@ -622,14 +622,14 @@ var/GLOBAL_RADIO_TYPE = 1 // radio type to use
|
||||
accept = 1
|
||||
break
|
||||
if (!accept)
|
||||
return 0
|
||||
return -1
|
||||
|
||||
return canhear_range
|
||||
|
||||
/obj/item/device/radio/proc/send_hear(freq, level)
|
||||
|
||||
var/range = receive_range(freq, level)
|
||||
if(range > 0)
|
||||
if(range > -1)
|
||||
return get_mobs_in_view(canhear_range, src)
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user