mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-10 18:22:39 +00:00
A couple more bugfixes and tweaks.
Changed the way radio range works. Headsets have a range of 1, intercoms 3. If a person is in this range, they get to hear incoming messages. Fixed the disposal bug; items were dropping on the floor when placed in disposals... Changed the way NTSL::TCS broadcast() generates a dummy radio. git-svn-id: http://tgstation13.googlecode.com/svn/trunk@3206 316c924e-a436-60f5-8080-3fe189b3f50e
This commit is contained in:
@@ -6,6 +6,7 @@
|
||||
g_amt = 0
|
||||
m_amt = 75
|
||||
subspace_transmission = 1
|
||||
canhear_range = 1 // can't hear headsets from very far away
|
||||
|
||||
var/protective_temperature = 0
|
||||
var/translate_binary = 0
|
||||
|
||||
@@ -14,6 +14,7 @@ var/GLOBAL_RADIO_TYPE = 1 // radio type to use
|
||||
last_transmission
|
||||
frequency = 1459 //common chat
|
||||
traitor_frequency = 0 //tune to frequency to unlock traitor supplies
|
||||
canhear_range = 3 // the range which mobs can hear this radio from
|
||||
obj/item/device/radio/patch_link = null
|
||||
obj/item/weapon/syndicate_uplink/traitorradio = null
|
||||
wires = WIRE_SIGNAL | WIRE_RECEIVE | WIRE_TRANSMIT
|
||||
@@ -62,6 +63,7 @@ var/GLOBAL_RADIO_TYPE = 1 // radio type to use
|
||||
checkpower()
|
||||
|
||||
/obj/item/device/radio/initialize()
|
||||
|
||||
if(freerange)
|
||||
if(frequency < 1200 || frequency > 1600)
|
||||
frequency = sanitize_frequency(frequency)
|
||||
@@ -660,7 +662,7 @@ var/GLOBAL_RADIO_TYPE = 1 // radio type to use
|
||||
/* Instead, let's individually search potential containers for mobs! More verbose but a LOT more efficient and less laggy */
|
||||
// Check gamehelpers.dm for the proc definition:
|
||||
|
||||
return get_mobs_in_view(3, src)
|
||||
return get_mobs_in_view(canhear_range, src)
|
||||
|
||||
/obj/item/device/radio/examine()
|
||||
set src in view()
|
||||
|
||||
@@ -78,8 +78,9 @@
|
||||
|
||||
if(!I) return
|
||||
|
||||
I.loc = src
|
||||
user.drop_item()
|
||||
if(I)
|
||||
I.loc = src
|
||||
|
||||
user << "You place \the [I] into the [src]."
|
||||
for(var/mob/M in viewers(src))
|
||||
|
||||
@@ -222,16 +222,10 @@ datum/signal
|
||||
var/datum/radio_frequency/connection = radio_controller.return_frequency(freq)
|
||||
newsign.data["connection"] = connection
|
||||
|
||||
// This is a really hacky way of finding a source radio - but it works, i suppose.
|
||||
// The radio is a radio headset!
|
||||
|
||||
if(!hradio)
|
||||
for(var/obj/item/device/radio/headset/r in world)
|
||||
hradio = r
|
||||
break
|
||||
|
||||
// There are no radios in the world! Oh no! Just make a new one and pray to baby jesus
|
||||
if(!hradio)
|
||||
hradio = new
|
||||
hradio = new /obj/item/device/radio/headset
|
||||
|
||||
newsign.data["radio"] = hradio
|
||||
newsign.data["vmessage"] = H.voice_message
|
||||
|
||||
Reference in New Issue
Block a user