NTSL2++ sucessor to NTSL2+ (#9321)

This drastcly is meant to rework DM and Daemon code to allow further expansion and replacement of custom engine with JavaScript language based engine.

Daemon PR - Aurorastation/ByondInterpretedLanguage#7

Forums topic for discussion - https://forums.aurorastation.org/topic/14570-ntsl2-and-its-future/

Superseeds #8817
This commit is contained in:
Karolis
2021-02-05 16:05:21 +02:00
committed by GitHub
parent 12bb01ad57
commit 607b0eeeb8
38 changed files with 762 additions and 557 deletions

View File

@@ -236,61 +236,5 @@ datum/signal
S.memory[address] = value
proc/tcombroadcast(var/message, var/freq, var/source, var/job, var/verb, var/language)
var/datum/signal/newsign = new
var/obj/machinery/telecomms/server/S = data["server"]
var/obj/item/device/radio/hradio = S.server_radio
if(!hradio)
error("[src] has no radio.")
return
if((!message || message == "") && message != 0)
message = "*beep*"
if(!source)
source = "[html_encode(uppertext(S.id))]"
hradio = new // sets the hradio as a radio intercom
if(!freq)
freq = PUB_FREQ
if(findtext(num2text(freq), ".")) // if the frequency has been set as a decimal
freq *= 10 // shift the decimal one place
if(!job)
job = "?"
if(!language || language == "")
language = LANGUAGE_TCB
var/datum/language/L = all_languages[language]
if(!L || !(L.flags & TCOMSSIM))
L = all_languages[LANGUAGE_TCB]
newsign.data["mob"] = null
newsign.data["mobtype"] = /mob/living/carbon/human
newsign.data["name"] = source
newsign.data["realname"] = newsign.data["name"]
newsign.data["job"] = job
newsign.data["compression"] = 0
newsign.data["message"] = message
newsign.data["language"] = L
newsign.data["type"] = 2 // artificial broadcast
if(!isnum(freq))
freq = text2num(freq)
newsign.frequency = freq
var/datum/radio_frequency/connection = SSradio.return_frequency(freq)
newsign.data["connection"] = connection
newsign.data["radio"] = hradio
newsign.data["vmessage"] = message
newsign.data["vname"] = source
newsign.data["vmask"] = 0
newsign.data["level"] = list()
newsign.data["verb"] = verb
var/pass = S.relay_information(newsign, "/obj/machinery/telecomms/hub")
if(!pass)
S.relay_information(newsign, "/obj/machinery/telecomms/broadcaster") // send this simple message to broadcasters