mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-11 18:53:06 +00:00
Bit of blob work.
Moved the radio defines into the actual radio code files. Fixed a few runtimes. git-svn-id: http://tgstation13.googlecode.com/svn/trunk@2229 316c924e-a436-60f5-8080-3fe189b3f50e
This commit is contained in:
@@ -1,185 +0,0 @@
|
||||
/obj/item/device/radio
|
||||
icon = 'radio.dmi'
|
||||
name = "station bounced radio"
|
||||
suffix = "\[3\]"
|
||||
icon_state = "walkietalkie"
|
||||
item_state = "walkietalkie"
|
||||
var
|
||||
last_transmission
|
||||
frequency = 1459 //common chat
|
||||
traitor_frequency = 0 //tune to frequency to unlock traitor supplies
|
||||
obj/item/device/radio/patch_link = null
|
||||
obj/item/weapon/syndicate_uplink/traitorradio = null
|
||||
wires = WIRE_SIGNAL | WIRE_RECEIVE | WIRE_TRANSMIT
|
||||
b_stat = 0
|
||||
broadcasting = 0
|
||||
listening = 1
|
||||
freerange = 0 // 0 - Sanitize frequencies, 1 - Full range
|
||||
list/channels = list() //see communications.dm for full list. First channes is a "default" for :h
|
||||
// "Example" = FREQ_LISTENING|FREQ_BROADCASTING
|
||||
flags = 450
|
||||
throw_speed = 2
|
||||
throw_range = 9
|
||||
w_class = 2
|
||||
g_amt = 25
|
||||
m_amt = 75
|
||||
var/const
|
||||
WIRE_SIGNAL = 1 //sends a signal, like to set off a bomb or electrocute someone
|
||||
WIRE_RECEIVE = 2
|
||||
WIRE_TRANSMIT = 4
|
||||
TRANSMISSION_DELAY = 5 // only 2/second/radio
|
||||
FREQ_LISTENING = 1
|
||||
//FREQ_BROADCASTING = 2
|
||||
|
||||
/obj/item/device/radio/beacon
|
||||
name = "Tracking Beacon"
|
||||
desc = "A beacon used by a teleporter."
|
||||
icon_state = "beacon"
|
||||
item_state = "signaler"
|
||||
var/code = "electronic"
|
||||
origin_tech = "bluespace=1"
|
||||
|
||||
/obj/item/device/radio/courtroom_beacon
|
||||
name = "Tracking Beacon"
|
||||
desc = "A more useless beacon in the courtroom."
|
||||
icon_state = "beacon"
|
||||
item_state = "signaler"
|
||||
var/code = "electronic"
|
||||
|
||||
/obj/item/device/radio/intercom
|
||||
name = "Station Intercom (Radio)"
|
||||
desc = "Talk through this."
|
||||
icon_state = "intercom"
|
||||
anchored = 1
|
||||
var/number = 0
|
||||
var/anyai = 1
|
||||
var/mob/living/silicon/ai/ai = list()
|
||||
|
||||
/obj/item/device/radio/headset
|
||||
name = "Radio Headset"
|
||||
desc = "An intercom that fits over the head."
|
||||
icon_state = "headset"
|
||||
item_state = "headset"
|
||||
g_amt = 0
|
||||
m_amt = 75
|
||||
var
|
||||
protective_temperature = 0
|
||||
translate_binary = 0
|
||||
translate_hive = 0
|
||||
|
||||
/obj/item/device/radio/headset/traitor
|
||||
translate_binary = 1
|
||||
channels = list("Syndicate" = 1)
|
||||
origin_tech = "syndicate=3"
|
||||
|
||||
/obj/item/device/radio/headset/headset_sec // -- TLE
|
||||
name = "Security Radio Headset"
|
||||
desc = "This is used by your elite security force. To access the security channel, use :s."
|
||||
icon_state = "sec_headset"
|
||||
item_state = "headset"
|
||||
channels = list("Security" = 1)
|
||||
|
||||
/obj/item/device/radio/headset/headset_eng // -- TLE
|
||||
name = "Engineering Radio Headset"
|
||||
desc = "When the engineers wish to chat like girls. To access the engineering channel, use :e. "
|
||||
icon_state = "eng_headset"
|
||||
item_state = "headset"
|
||||
channels = list("Engineering" = 1)
|
||||
|
||||
/obj/item/device/radio/headset/headset_rob // -- DH
|
||||
name = "Robotics Radio Headset"
|
||||
desc = "Made specifically for the roboticists who cannot decide between departments. To access the engineering channel, use :e. For research, use :n."
|
||||
icon_state = "rob_headset"
|
||||
item_state = "headset"
|
||||
channels = list("Engineering" = 1, "Science" = 1)
|
||||
|
||||
/obj/item/device/radio/headset/headset_med // -- TLE
|
||||
name = "Medical Radio Headset"
|
||||
desc = "A headset for the trained staff of the medbay. To access the medical channel, use :m."
|
||||
icon_state = "med_headset"
|
||||
item_state = "headset"
|
||||
channels = list("Medical" = 1)
|
||||
|
||||
/obj/item/device/radio/headset/headset_sci // -- Bar
|
||||
name = "Science Radio Headset"
|
||||
desc = "A sciency headset. Like usual. To access the science channel, use :n."
|
||||
icon_state = "com_headset"
|
||||
item_state = "headset"
|
||||
channels = list("Science" = 1)
|
||||
|
||||
/obj/item/device/radio/headset/headset_medsci // -- Micro
|
||||
name = "Medical Research Radio Headset"
|
||||
desc = "A headset that is a result of the mating between medical and science. To access the medical channel, use :m. For science, use :n."
|
||||
icon_state = "med_headset"
|
||||
item_state = "headset"
|
||||
channels = list("Medical" = 1, "Science" = 1)
|
||||
|
||||
/obj/item/device/radio/headset/headset_com // -- TLE
|
||||
name = "Command Radio Headset"
|
||||
desc = "A headset with a commanding channel. To access the command channel, use :c."
|
||||
icon_state = "com_headset"
|
||||
item_state = "headset"
|
||||
channels = list("Command" = 1)
|
||||
|
||||
/obj/item/device/radio/headset/heads/captain // -- Bar
|
||||
name = "Captain's Headset"
|
||||
desc = "The headset of the boss. Channels are as follows: :c - command, :s - security, :e - engineering, :d - mining, :q - cargo, :m - medical, :n - science."
|
||||
icon_state = "com_headset"
|
||||
item_state = "headset"
|
||||
channels = list("Command" = 1, "Science" = 0, "Medical" = 0, "Security" = 1, "Engineering" = 0, "Mining" = 0, "Cargo" = 0)
|
||||
|
||||
/obj/item/device/radio/headset/heads/rd // -- Bar
|
||||
name = "Research Director's Headset"
|
||||
desc = "Headset of the researching God. To access the science channel, use :n. For command, use :c."
|
||||
icon_state = "com_headset"
|
||||
item_state = "headset"
|
||||
channels = list("Science" = 1, "Command" = 1)
|
||||
|
||||
/obj/item/device/radio/headset/heads/hos // -- Bar
|
||||
name = "Head of Security's Headset"
|
||||
desc = "The headset of the man who protects your worthless lifes. To access the security channel, use :s. For command, use :c."
|
||||
icon_state = "com_headset"
|
||||
item_state = "headset"
|
||||
channels = list("Security" = 1, "Command" = 1)
|
||||
|
||||
/obj/item/device/radio/headset/heads/ce // -- Bar
|
||||
name = "Chief Engineer's Headset"
|
||||
desc = "The headset of the guy who is in charge of morons. To access the engineering channel, use :e. For command, use :c."
|
||||
icon_state = "com_headset"
|
||||
item_state = "headset"
|
||||
channels = list("Engineering" = 1, "Command" = 1)
|
||||
|
||||
/obj/item/device/radio/headset/heads/cmo // -- Bar
|
||||
name = "Chief Medical Officer's Headset"
|
||||
desc = "The headset of the highly trained medical chief. To access the medical channel, use :m. For command, use :c."
|
||||
icon_state = "com_headset"
|
||||
item_state = "headset"
|
||||
channels = list("Medical" = 1, "Command" = 1)
|
||||
|
||||
/obj/item/device/radio/headset/heads/hop // -- rastaf0
|
||||
name = "Head of Personnel's Headset"
|
||||
desc = "The headset of the guy who will one day be captain. Channels are as follows: :c - command, :s - security, :q - cargo, :d - mining."
|
||||
icon_state = "com_headset"
|
||||
item_state = "headset"
|
||||
channels = list("Command" = 1, "Security" = 0, "Cargo" = 1, "Mining" = 0)
|
||||
|
||||
/obj/item/device/radio/headset/headset_mine // -- rastaf0
|
||||
name = "Mining Radio Headset"
|
||||
desc = "Headset used by miners. How useless. To access the mining channel, use :d."
|
||||
icon_state = "mine_headset"
|
||||
item_state = "headset"
|
||||
channels = list("Mining" = 1)
|
||||
|
||||
/obj/item/device/radio/headset/headset_cargo // -- rastaf0
|
||||
name = "Cargo Radio Headset"
|
||||
desc = "Headset used by the QM's slaves. To access the cargo channel, use :q."
|
||||
icon_state = "cargo_headset"
|
||||
item_state = "headset"
|
||||
channels = list("Cargo" = 1)
|
||||
|
||||
/obj/item/device/radio/headset/heads/qm // -- rastaf0
|
||||
name = "Quartermaster's Headset"
|
||||
desc = "The headset of the man who control your toiletpaper supply. To access the cargo channel, use :q. For mining, use :d."
|
||||
icon_state = "cargo_headset"
|
||||
item_state = "headset"
|
||||
channels = list("Cargo" = 1, "Mining" = 1)
|
||||
|
||||
@@ -87,7 +87,7 @@
|
||||
if (1)
|
||||
command_alert("Confirmed outbreak of level 5 biohazard aboard [station_name()]. All personnel must contain the outbreak.", "Biohazard Alert")
|
||||
world << sound('outbreak5.ogg')
|
||||
autoexpand = 0//The blob now has to live on its own
|
||||
// autoexpand = 0//The blob now has to live on its own
|
||||
stage = 2
|
||||
// now check every minute
|
||||
next_stage = world.timeofday + 600
|
||||
@@ -169,17 +169,17 @@
|
||||
intercepttext += "Your orders are as follows:<BR>"
|
||||
intercepttext += "1. Secure the Nuclear Authentication Disk.<BR>"
|
||||
intercepttext += "2. Detonate the Nuke located in the Station's Vault.<BR>"
|
||||
intercepttext += "Nuclear Authentication Code: [nukecode]"
|
||||
intercepttext += "Nuclear Authentication Code: [nukecode] <BR>"
|
||||
intercepttext += "Message ends."
|
||||
|
||||
for(var/obj/machinery/computer/communications/comm in world)
|
||||
if (!(comm.stat & (BROKEN | NOPOWER)) && comm.prints_intercept)
|
||||
comm.messagetitle.Add(interceptname)
|
||||
comm.messagetext.Add(intercepttext)
|
||||
if(!(comm.stat & (BROKEN | NOPOWER)) && comm.prints_intercept)
|
||||
var/obj/item/weapon/paper/intercept = new /obj/item/weapon/paper( comm.loc )
|
||||
intercept.name = "paper- [interceptname]"
|
||||
intercept.info = intercepttext
|
||||
|
||||
comm.messagetitle.Add(interceptname)
|
||||
comm.messagetext.Add(intercepttext)
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -154,7 +154,7 @@
|
||||
if(T.Enter(B,src))
|
||||
B.loc = T
|
||||
else
|
||||
for(var/atom/A in T)//This might be killing the spores
|
||||
for(var/atom/A in T)//This might be killing the spores, it IS killing the spores
|
||||
A.blob_act()
|
||||
T.blob_act()
|
||||
del(B)
|
||||
|
||||
@@ -8,16 +8,24 @@
|
||||
bl.Life()
|
||||
bl.Life()
|
||||
bl.Life()
|
||||
bl.blobdebug = 1
|
||||
bl.Life()
|
||||
blobevent = 1
|
||||
dotheblobbaby()
|
||||
spawn(0)
|
||||
dotheblobbaby()
|
||||
spawn(3000)
|
||||
blobevent = 0
|
||||
|
||||
/proc/dotheblobbaby()
|
||||
if (blobevent)
|
||||
for(var/obj/blob/B in world)
|
||||
if (prob (40))
|
||||
if (blobs.len > 0)
|
||||
for(var/i = 1 to 10)
|
||||
sleep(-1)
|
||||
if (blobs.len == 0)
|
||||
break
|
||||
var/obj/blob/B = pick(active_blobs)
|
||||
if(B.z != 1)
|
||||
continue
|
||||
B.Life()
|
||||
spawn(30)
|
||||
dotheblobbaby()
|
||||
@@ -204,7 +204,7 @@
|
||||
as it will return null). Leaving this for you since you apparently plan to work this further. /N
|
||||
*/
|
||||
|
||||
if(!ticker.mode.check_win())//If the mode does not deal with the nuke going off so just reboot because everyone is stuck as is
|
||||
if(!ticker.mode.check_finished())//If the mode does not deal with the nuke going off so just reboot because everyone is stuck as is
|
||||
world << "<B>Resetting in 30 seconds!</B>"
|
||||
sleep(300)
|
||||
log_game("Rebooting due to nuclear detonation")
|
||||
|
||||
@@ -101,30 +101,6 @@
|
||||
if(!T || istype(T, /area)) return null
|
||||
return T
|
||||
|
||||
/obj/machinery/computer/teleporter/security/attack_hand()
|
||||
if(stat & (NOPOWER|BROKEN))
|
||||
return
|
||||
|
||||
var/list/L = list()
|
||||
var/list/areaindex = list()
|
||||
|
||||
for(var/obj/item/device/radio/courtroom_beacon/R in world)
|
||||
var/turf/T = find_loc(R)
|
||||
if (!T) continue
|
||||
var/tmpname = T.loc.name
|
||||
if(areaindex[tmpname])
|
||||
tmpname = "[tmpname] ([++areaindex[tmpname]])"
|
||||
else
|
||||
areaindex[tmpname] = 1
|
||||
L[tmpname] = R
|
||||
|
||||
var/desc = input("Please select a location to lock in.", "Locking Computer") in L
|
||||
src.locked = L[desc]
|
||||
for(var/mob/O in hearers(src, null))
|
||||
O.show_message("\blue Locked In", 2)
|
||||
src.add_fingerprint(usr)
|
||||
return
|
||||
|
||||
/obj/machinery/teleport/hub/Bumped(M as mob|obj)
|
||||
spawn( 0 )
|
||||
if (src.icon_state == "tele1")
|
||||
|
||||
@@ -103,7 +103,7 @@ Frequency:
|
||||
|
||||
/obj/item/weapon/hand_tele/attack_self(mob/user as mob)
|
||||
var/turf/current_location = get_turf(user)//What turf is the user on?
|
||||
if(!current_location||current_location.z==2)//If turf was not found or they're on z level 2.
|
||||
if(!current_location||current_location.z==2||current_location.z>=7)//If turf was not found or they're on z level 2 or >7 which does not currently exist.
|
||||
user << "The [src] is malfunctioning."
|
||||
return
|
||||
var/list/L = list( )
|
||||
@@ -119,7 +119,8 @@ Frequency:
|
||||
if(T.x>world.maxx-4 || T.x<4) continue //putting them at the edge is dumb
|
||||
if(T.y>world.maxy-4 || T.y<4) continue
|
||||
turfs += T
|
||||
L["None (Dangerous)"] = pick(turfs)
|
||||
if(turfs.len)
|
||||
L["None (Dangerous)"] = pick(turfs)
|
||||
var/t1 = input(user, "Please select a teleporter to lock in on.", "Hand Teleporter") in L
|
||||
if ((user.equipped() != src || user.stat || user.restrained()))
|
||||
return
|
||||
|
||||
@@ -1,9 +1,20 @@
|
||||
/obj/item/device/radio/beacon
|
||||
name = "Tracking Beacon"
|
||||
desc = "A beacon used by a teleporter."
|
||||
icon_state = "beacon"
|
||||
item_state = "signaler"
|
||||
var/code = "electronic"
|
||||
origin_tech = "bluespace=1"
|
||||
|
||||
|
||||
/obj/item/device/radio/beacon/hear_talk()
|
||||
return
|
||||
|
||||
|
||||
/obj/item/device/radio/beacon/send_hear()
|
||||
return null
|
||||
|
||||
|
||||
/obj/item/device/radio/beacon/verb/alter_signal(t as text)
|
||||
set name = "Alter Beacon's Signal"
|
||||
set category = "Object"
|
||||
@@ -16,6 +27,7 @@
|
||||
src.add_fingerprint(usr)
|
||||
return
|
||||
|
||||
|
||||
/obj/item/device/radio/beacon/bacon //Probably a better way of doing this, I'm lazy.
|
||||
proc/digest_delay()
|
||||
spawn(600)
|
||||
|
||||
132
code/game/objects/radio/headset.dm
Normal file
132
code/game/objects/radio/headset.dm
Normal file
@@ -0,0 +1,132 @@
|
||||
/obj/item/device/radio/headset
|
||||
name = "Radio Headset"
|
||||
desc = "An intercom that fits over the head."
|
||||
icon_state = "headset"
|
||||
item_state = "headset"
|
||||
g_amt = 0
|
||||
m_amt = 75
|
||||
var
|
||||
protective_temperature = 0
|
||||
translate_binary = 0
|
||||
translate_hive = 0
|
||||
|
||||
/obj/item/device/radio/headset/traitor
|
||||
translate_binary = 1
|
||||
channels = list("Syndicate" = 1)
|
||||
origin_tech = "syndicate=3"
|
||||
|
||||
/obj/item/device/radio/headset/headset_sec
|
||||
name = "Security Radio Headset"
|
||||
desc = "This is used by your elite security force. To access the security channel, use :s."
|
||||
icon_state = "sec_headset"
|
||||
item_state = "headset"
|
||||
channels = list("Security" = 1)
|
||||
|
||||
/obj/item/device/radio/headset/headset_eng
|
||||
name = "Engineering Radio Headset"
|
||||
desc = "When the engineers wish to chat like girls. To access the engineering channel, use :e. "
|
||||
icon_state = "eng_headset"
|
||||
item_state = "headset"
|
||||
channels = list("Engineering" = 1)
|
||||
|
||||
/obj/item/device/radio/headset/headset_rob
|
||||
name = "Robotics Radio Headset"
|
||||
desc = "Made specifically for the roboticists who cannot decide between departments. To access the engineering channel, use :e. For research, use :n."
|
||||
icon_state = "rob_headset"
|
||||
item_state = "headset"
|
||||
channels = list("Engineering" = 1, "Science" = 1)
|
||||
|
||||
/obj/item/device/radio/headset/headset_med
|
||||
name = "Medical Radio Headset"
|
||||
desc = "A headset for the trained staff of the medbay. To access the medical channel, use :m."
|
||||
icon_state = "med_headset"
|
||||
item_state = "headset"
|
||||
channels = list("Medical" = 1)
|
||||
|
||||
/obj/item/device/radio/headset/headset_sci
|
||||
name = "Science Radio Headset"
|
||||
desc = "A sciency headset. Like usual. To access the science channel, use :n."
|
||||
icon_state = "com_headset"
|
||||
item_state = "headset"
|
||||
channels = list("Science" = 1)
|
||||
|
||||
/obj/item/device/radio/headset/headset_medsci
|
||||
name = "Medical Research Radio Headset"
|
||||
desc = "A headset that is a result of the mating between medical and science. To access the medical channel, use :m. For science, use :n."
|
||||
icon_state = "med_headset"
|
||||
item_state = "headset"
|
||||
channels = list("Medical" = 1, "Science" = 1)
|
||||
|
||||
/obj/item/device/radio/headset/headset_com
|
||||
name = "Command Radio Headset"
|
||||
desc = "A headset with a commanding channel. To access the command channel, use :c."
|
||||
icon_state = "com_headset"
|
||||
item_state = "headset"
|
||||
channels = list("Command" = 1)
|
||||
|
||||
/obj/item/device/radio/headset/heads/captain
|
||||
name = "Captain's Headset"
|
||||
desc = "The headset of the boss. Channels are as follows: :c - command, :s - security, :e - engineering, :d - mining, :q - cargo, :m - medical, :n - science."
|
||||
icon_state = "com_headset"
|
||||
item_state = "headset"
|
||||
channels = list("Command" = 1, "Science" = 0, "Medical" = 0, "Security" = 1, "Engineering" = 0, "Mining" = 0, "Cargo" = 0)
|
||||
|
||||
/obj/item/device/radio/headset/heads/rd
|
||||
name = "Research Director's Headset"
|
||||
desc = "Headset of the researching God. To access the science channel, use :n. For command, use :c."
|
||||
icon_state = "com_headset"
|
||||
item_state = "headset"
|
||||
channels = list("Science" = 1, "Command" = 1)
|
||||
|
||||
/obj/item/device/radio/headset/heads/hos
|
||||
name = "Head of Security's Headset"
|
||||
desc = "The headset of the man who protects your worthless lifes. To access the security channel, use :s. For command, use :c."
|
||||
icon_state = "com_headset"
|
||||
item_state = "headset"
|
||||
channels = list("Security" = 1, "Command" = 1)
|
||||
|
||||
/obj/item/device/radio/headset/heads/ce
|
||||
name = "Chief Engineer's Headset"
|
||||
desc = "The headset of the guy who is in charge of morons. To access the engineering channel, use :e. For command, use :c."
|
||||
icon_state = "com_headset"
|
||||
item_state = "headset"
|
||||
channels = list("Engineering" = 1, "Command" = 1)
|
||||
|
||||
/obj/item/device/radio/headset/heads/cmo
|
||||
name = "Chief Medical Officer's Headset"
|
||||
desc = "The headset of the highly trained medical chief. To access the medical channel, use :m. For command, use :c."
|
||||
icon_state = "com_headset"
|
||||
item_state = "headset"
|
||||
channels = list("Medical" = 1, "Command" = 1)
|
||||
|
||||
/obj/item/device/radio/headset/heads/hop
|
||||
name = "Head of Personnel's Headset"
|
||||
desc = "The headset of the guy who will one day be captain. Channels are as follows: :c - command, :s - security, :q - cargo, :d - mining."
|
||||
icon_state = "com_headset"
|
||||
item_state = "headset"
|
||||
channels = list("Command" = 1, "Security" = 0, "Cargo" = 1, "Mining" = 0)
|
||||
|
||||
|
||||
/obj/item/device/radio/headset/headset_mine
|
||||
name = "Mining Radio Headset"
|
||||
desc = "Headset used by miners. How useless. To access the mining channel, use :d."
|
||||
icon_state = "mine_headset"
|
||||
item_state = "headset"
|
||||
channels = list("Mining" = 1)
|
||||
|
||||
|
||||
|
||||
/obj/item/device/radio/headset/heads/qm
|
||||
name = "Quartermaster's Headset"
|
||||
desc = "The headset of the man who control your toiletpaper supply. To access the cargo channel, use :q. For mining, use :d."
|
||||
icon_state = "cargo_headset"
|
||||
item_state = "headset"
|
||||
channels = list("Cargo" = 1, "Mining" = 1)
|
||||
|
||||
|
||||
/obj/item/device/radio/headset/headset_cargo
|
||||
name = "Cargo Radio Headset"
|
||||
desc = "Headset used by the QM's slaves. To access the cargo channel, use :q."
|
||||
icon_state = "cargo_headset"
|
||||
item_state = "headset"
|
||||
channels = list("Cargo" = 1)
|
||||
@@ -1,39 +1,52 @@
|
||||
/obj/item/device/radio/intercom/attack_ai(mob/user as mob)
|
||||
src.add_fingerprint(user)
|
||||
spawn (0)
|
||||
attack_self(user)
|
||||
/obj/item/device/radio/intercom
|
||||
name = "Station Intercom (Radio)"
|
||||
desc = "Talk through this."
|
||||
icon_state = "intercom"
|
||||
anchored = 1
|
||||
var/number = 0
|
||||
var/anyai = 1
|
||||
var/mob/living/silicon/ai/ai = list()
|
||||
|
||||
/obj/item/device/radio/intercom/attack_paw(mob/user as mob)
|
||||
if ((ticker && ticker.mode.name == "monkey"))
|
||||
return src.attack_hand(user)
|
||||
|
||||
/obj/item/device/radio/intercom/attack_hand(mob/user as mob)
|
||||
src.add_fingerprint(user)
|
||||
spawn (0)
|
||||
attack_self(user)
|
||||
attack_ai(mob/user as mob)
|
||||
src.add_fingerprint(user)
|
||||
spawn (0)
|
||||
attack_self(user)
|
||||
|
||||
/obj/item/device/radio/intercom/send_hear()
|
||||
if (!(src.wires & WIRE_RECEIVE))
|
||||
return
|
||||
if (!src.listening)
|
||||
return
|
||||
attack_paw(mob/user as mob)
|
||||
if ((ticker && ticker.mode.name == "monkey"))
|
||||
return src.attack_hand(user)
|
||||
|
||||
var/turf/T = get_turf(src)
|
||||
var/list/hear = hearers(7, T)
|
||||
var/list/V
|
||||
//find mobs in lockers, cryo and intellycards
|
||||
for (var/mob/M in world)
|
||||
if (isturf(M.loc))
|
||||
continue //if M can hear us it is already was found by hearers()
|
||||
if (!M.client)
|
||||
continue //skip monkeys and leavers
|
||||
if (!V) //lasy initialisation
|
||||
V = view(7, T)
|
||||
if (get_turf(M) in V) //this slow, but I don't think we'd have a lot of wardrobewhores every round --rastaf0
|
||||
hear+=M
|
||||
return hear
|
||||
|
||||
/obj/item/device/radio/intercom/hear_talk(mob/M as mob, msg)
|
||||
if(!src.anyai && !(M in src.ai))
|
||||
return
|
||||
..()
|
||||
attack_hand(mob/user as mob)
|
||||
src.add_fingerprint(user)
|
||||
spawn (0)
|
||||
attack_self(user)
|
||||
|
||||
|
||||
send_hear()
|
||||
if (!(src.wires & WIRE_RECEIVE))
|
||||
return
|
||||
if (!src.listening)
|
||||
return
|
||||
|
||||
var/turf/T = get_turf(src)
|
||||
var/list/hear = hearers(7, T)
|
||||
var/list/V
|
||||
//find mobs in lockers, cryo and intellycards
|
||||
for(var/mob/M in world)
|
||||
if (isturf(M.loc))
|
||||
continue //if M can hear us it is already was found by hearers()
|
||||
if (!M.client)
|
||||
continue //skip monkeys and leavers
|
||||
if (!V) //lasy initialisation
|
||||
V = view(7, T)
|
||||
if (get_turf(M) in V) //this slow, but I don't think we'd have a lot of wardrobewhores every round --rastaf0
|
||||
hear+=M
|
||||
return hear
|
||||
|
||||
|
||||
hear_talk(mob/M as mob, msg)
|
||||
if(!src.anyai && !(M in src.ai))
|
||||
return
|
||||
..()
|
||||
@@ -1,3 +1,49 @@
|
||||
/obj/item/device/radio
|
||||
icon = 'radio.dmi'
|
||||
name = "station bounced radio"
|
||||
suffix = "\[3\]"
|
||||
icon_state = "walkietalkie"
|
||||
item_state = "walkietalkie"
|
||||
var
|
||||
last_transmission
|
||||
frequency = 1459 //common chat
|
||||
traitor_frequency = 0 //tune to frequency to unlock traitor supplies
|
||||
obj/item/device/radio/patch_link = null
|
||||
obj/item/weapon/syndicate_uplink/traitorradio = null
|
||||
wires = WIRE_SIGNAL | WIRE_RECEIVE | WIRE_TRANSMIT
|
||||
b_stat = 0
|
||||
broadcasting = 0
|
||||
listening = 1
|
||||
freerange = 0 // 0 - Sanitize frequencies, 1 - Full range
|
||||
list/channels = list() //see communications.dm for full list. First channes is a "default" for :h
|
||||
// "Example" = FREQ_LISTENING|FREQ_BROADCASTING
|
||||
flags = 450
|
||||
throw_speed = 2
|
||||
throw_range = 9
|
||||
w_class = 2
|
||||
g_amt = 25
|
||||
m_amt = 75
|
||||
var/const
|
||||
WIRE_SIGNAL = 1 //sends a signal, like to set off a bomb or electrocute someone
|
||||
WIRE_RECEIVE = 2
|
||||
WIRE_TRANSMIT = 4
|
||||
TRANSMISSION_DELAY = 5 // only 2/second/radio
|
||||
FREQ_LISTENING = 1
|
||||
//FREQ_BROADCASTING = 2
|
||||
|
||||
|
||||
/obj/item/device/radio
|
||||
var
|
||||
datum/radio_frequency/radio_connection
|
||||
list/datum/radio_frequency/secure_radio_connections = new
|
||||
proc
|
||||
set_frequency(new_frequency)
|
||||
radio_controller.remove_object(src, frequency)
|
||||
frequency = new_frequency
|
||||
radio_connection = radio_controller.add_object(src, frequency, RADIO_CHAT)
|
||||
|
||||
|
||||
|
||||
/obj/item/device/radio/New()
|
||||
..()
|
||||
if(radio_controller)
|
||||
@@ -16,15 +62,6 @@
|
||||
for (var/ch_name in channels)
|
||||
secure_radio_connections[ch_name] = radio_controller.add_object(src, radiochannels[ch_name], RADIO_CHAT)
|
||||
|
||||
/obj/item/device/radio
|
||||
var
|
||||
datum/radio_frequency/radio_connection
|
||||
list/datum/radio_frequency/secure_radio_connections = new
|
||||
proc
|
||||
set_frequency(new_frequency)
|
||||
radio_controller.remove_object(src, frequency)
|
||||
frequency = new_frequency
|
||||
radio_connection = radio_controller.add_object(src, frequency, RADIO_CHAT)
|
||||
|
||||
/obj/item/device/radio/attack_self(mob/user as mob)
|
||||
user.machine = src
|
||||
@@ -62,11 +99,7 @@
|
||||
|
||||
|
||||
/obj/item/device/radio/proc/text_sec_channel(var/chan_name, var/chan_stat)
|
||||
//var/broad = (chan_stat&FREQ_BROADCASTING)!=0
|
||||
var/list = !!(chan_stat&FREQ_LISTENING)!=0
|
||||
/*
|
||||
Microphone:"<A href='byond://?src=\ref[src];ch_name=[chan_name];talk=[!broad]'> [broad ? "Engaged" : "Disengaged"]</A>"
|
||||
*/
|
||||
return {"
|
||||
<B>[chan_name]</B><br>
|
||||
Speaker: <A href='byond://?src=\ref[src];ch_name=[chan_name];listen=[!list]'>[list ? "Engaged" : "Disengaged"]</A><BR>
|
||||
@@ -406,8 +439,3 @@ Microphone:"<A href='byond://?src=\ref[src];ch_name=[chan_name];talk=[!broad]'>
|
||||
for (var/ch_name in channels)
|
||||
channels[ch_name] = 0
|
||||
..()
|
||||
|
||||
/obj/item/device/radio/banana //Why is this even needed? So that it shows up as a banana in the chat log.
|
||||
name = "Banana Phone"
|
||||
icon = 'items.dmi'
|
||||
icon_state = "banana" //needs a new icon.
|
||||
@@ -143,7 +143,7 @@ Code:
|
||||
spawn(0)
|
||||
holder:Process_Activation(src)
|
||||
return
|
||||
// src.holder.receive_signal(signal)
|
||||
|
||||
|
||||
for(var/mob/O in hearers(1, src.loc))
|
||||
O.show_message(text("\icon[] *beep* *beep*", src), 3, "*beep* *beep*", 2)
|
||||
|
||||
@@ -73,16 +73,20 @@
|
||||
if(!src.attack)
|
||||
for(var/obj/critter/C in view(src.seekrange,src))
|
||||
if(istype(C, /obj/critter) && !src.atkcritter) continue
|
||||
if(istype(C, /obj/mecha) && !src.atkmech) continue
|
||||
if(C.health <= 0) continue
|
||||
if(istype(C, /obj/critter) && src.atkcritter)
|
||||
if((istype(C, /obj/critter/hivebot) && !src.atksame) || (C == src)) continue
|
||||
src.attack = 1
|
||||
if(istype(C, /obj/mecha) && src.atkmech) src.attack = 1
|
||||
if(src.attack)
|
||||
T = C
|
||||
break
|
||||
|
||||
for(var/obj/mecha/M in view(src.seekrange,src))
|
||||
if(istype(M, /obj/mecha) && !src.atkmech) continue
|
||||
if(M.health <= 0) continue
|
||||
if(istype(M, /obj/mecha) && src.atkmech) src.attack = 1
|
||||
if(src.attack)
|
||||
T = M
|
||||
break
|
||||
|
||||
if(src.attack)
|
||||
src.target = T
|
||||
src.oldtarget_name = T:name
|
||||
|
||||
@@ -88,10 +88,10 @@
|
||||
|
||||
handle_regular_status_updates()
|
||||
|
||||
//Stop AI using us as a camera
|
||||
src.camera.status = 1//bluh bluh ugly fix but it will work till this whole thing gets recoded
|
||||
if(src.stat)
|
||||
src.camera.status = 0
|
||||
if(camera)
|
||||
src.camera.status = 1//bluh bluh ugly fix but it will work till this whole thing gets recoded
|
||||
if(src.stat)
|
||||
src.camera.status = 0
|
||||
|
||||
health = 300 - (oxyloss + fireloss + bruteloss)
|
||||
|
||||
|
||||
@@ -150,7 +150,6 @@
|
||||
#define FILE_DIR "icons/turf"
|
||||
#define FILE_DIR "interface"
|
||||
#define FILE_DIR "maps"
|
||||
#define FILE_DIR "maps/backup"
|
||||
#define FILE_DIR "sound"
|
||||
#define FILE_DIR "sound/ambience"
|
||||
#define FILE_DIR "sound/announcer"
|
||||
@@ -624,6 +623,7 @@
|
||||
#include "code\game\objects\items\weapons\implants\implantpad.dm"
|
||||
#include "code\game\objects\radio\beacon.dm"
|
||||
#include "code\game\objects\radio\electropack.dm"
|
||||
#include "code\game\objects\radio\headset.dm"
|
||||
#include "code\game\objects\radio\intercom.dm"
|
||||
#include "code\game\objects\radio\radio.dm"
|
||||
#include "code\game\objects\radio\signaler.dm"
|
||||
|
||||
Reference in New Issue
Block a user