TG: More work done on Telecomms:

▫ Signals can now be rejected by Subspace broadcasters through a specific data[]
parameter.
▫ Improved the log browser.
▫ Log browsers and telecommunication monitors no longer require access to use.
You do need access to delete logs, however.
▫ Intercoms need power to work. They don't drain power, they just need a
constant flow of equipment power. As such, that offline intercom sprite's now
finally being put to use.

Scripting language:

▫ Sorry about all the files; they're all necessary! It's important to notice
that the basic structure of the scripting language code is not mine; I
cannibalized the base structure from some obscure BYOND project. It's pretty
well documented, and I'd say easier to browse through than atmos. Here's the
basic deal:

A compiler datum manages the relationships between the three main subsystems of
a scripting language: the Scanner, the Parser, and the Interpreter. The Scanner
splits raw text into token datums that the Parser can read. The Parser
transforms the otherwise random bits and strings into ordered AST Trees and
nodes for the Interpreter to read. The interpreter actually executes the code
and handles scope/functions/code blocks.
Revision: r3193
Author: 	 vageyenaman
This commit is contained in:
Ren Erthilo
2012-04-24 21:13:55 +01:00
parent 757b76c456
commit f8dd926ca5
14 changed files with 350 additions and 99 deletions
+9 -2
View File
@@ -14,7 +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
canhear_range = 3 // the range which mobs can hear this radio from
obj/item/device/radio/patch_link = null
obj/item/device/uplink/radio/traitorradio = null
wires = WIRE_SIGNAL | WIRE_RECEIVE | WIRE_TRANSMIT
@@ -63,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)
@@ -145,6 +146,7 @@ var/GLOBAL_RADIO_TYPE = 1 // radio type to use
//..()
if (usr.stat || !on)
return
if (!(issilicon(usr) || (usr.contents.Find(src) || ( in_range(src, usr) && istype(loc, /turf) ))))
usr << browse(null, "window=radio")
return
@@ -155,6 +157,7 @@ var/GLOBAL_RADIO_TYPE = 1 // radio type to use
if(A && target)
A.ai_actual_track(target)
return
else if (href_list["faketrack"])
var/mob/target = locate(href_list["track"])
var/mob/living/silicon/ai/A = locate(href_list["track2"])
@@ -169,7 +172,9 @@ var/GLOBAL_RADIO_TYPE = 1 // radio type to use
usr << "Target is not on or near any active cameras on the station. We'll check again in 5 seconds (unless you use the cancel-camera verb)."
sleep(40)
continue
return
else if (href_list["freq"])
var/new_frequency = (frequency + text2num(href_list["freq"]))
if (!freerange || (frequency < 1200 || frequency > 1600))
@@ -248,6 +253,7 @@ var/GLOBAL_RADIO_TYPE = 1 // radio type to use
return
/obj/item/device/radio/talk_into(mob/M as mob, message, channel)
if(!on) return // the device has to be on
if(GLOBAL_RADIO_TYPE == 1) // NEW RADIO SYSTEMS: By Doohl
@@ -424,7 +430,7 @@ var/GLOBAL_RADIO_TYPE = 1 // radio type to use
sleep(rand(10,25)) // wait a little...
if(signal.data["done"])
//we're done here.
// we're done here.
return
// Oh my god; the comms are down or something because the signal hasn't been broadcasted yet.
@@ -615,6 +621,7 @@ var/GLOBAL_RADIO_TYPE = 1 // radio type to use
R.show_message(rendered, 2)
/obj/item/device/radio/hear_talk(mob/M as mob, msg)
if (broadcasting)
talk_into(M, msg)
/*