mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-01-02 21:11:57 +00:00
Spess Networking Technology:
▪ The machines are located in Centcom near the cargo shuttle.
▪ A new admin debug verb "Change Radio Type". Using this will toggle between old (current) radio code and the new radio code. ADMINS: I recommend only doing this if Doohl (me) is around to take note of anything that happens.
▪ The whole thing works, in theory, but hasn't been stress-tested with the usual 60+ players. I will write up a Tgstation Wiki article and/or explain what some of the stuff does in IRC or ingame.
One last thing to point out: this is a PROTOTYPE. I have tested it myself and optimized the code very well. In theory, this new radio system is significantly less laggy AND has many more features. However, because of it's a prototype, it can at any time destroy the server. The reason I am committing this and not updating the changelog is because it's not an actual feature YET. I want to stress test this on the servers to see how it fairs, then add some more stuff to it like the ability to link machines and repair networks.
git-svn-id: http://tgstation13.googlecode.com/svn/trunk@2807 316c924e-a436-60f5-8080-3fe189b3f50e
57 lines
1.3 KiB
Plaintext
57 lines
1.3 KiB
Plaintext
/obj/item/device/radio/intercom
|
|
name = "Station Intercom (Radio)"
|
|
desc = "Talk through this."
|
|
icon_state = "intercom"
|
|
anchored = 1
|
|
w_class = 4.0
|
|
var/number = 0
|
|
var/anyai = 1
|
|
var/mob/living/silicon/ai/ai = list()
|
|
|
|
|
|
attack_ai(mob/user as mob)
|
|
src.add_fingerprint(user)
|
|
spawn (0)
|
|
attack_self(user)
|
|
|
|
attack_paw(mob/user as mob)
|
|
if ((ticker && ticker.mode.name == "monkey"))
|
|
return src.attack_hand(user)
|
|
|
|
|
|
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
|
|
|
|
return get_mobs_in_view(4, src)
|
|
|
|
|
|
hear_talk(mob/M as mob, msg)
|
|
if(!src.anyai && !(M in src.ai))
|
|
return
|
|
..() |