NanoTrasen Scripting Language [READY-ER THAN PREVIOUSLY] (#4217)

* First go at /machinery/telecomms/

* Dumps in /modules/scripting/

* Fixes most of the compiletimes in traffic_control.dm

Except for the ones about the server not having all these NTSL-ly procs; that I'll handle in the next commits.

* Fixes most of the compiletimes in /scripting/

Again, the other compiletimes are related to the tcomm servers. Next commit.

* Fixed server stuff, plus other misc bullshit. IT COMPILES!!!!

HOLY FUCK IT COMPILES

* Fixes the Traffic Control computer's UI

* Makes NTSL actually run on the server and work

This is a blessed day

* Makes Travis complacent

Apparently he was complaining about all the var/const 's there are in this code, so, I dealt with them.

* Fixes ``broadcast()``, hopefully

* Cleans up the interal code, clears out more const's

The majority of the code in /scripting/ is not at all within the tg guidelines, which is fuckin garbo

If Ling forces me to convert the all of this to be tg-CONTRIBUTING compliant I'm deleting this PR

* Fixes bug involving $content

Fixes a bug where the message would not be broadcasted if $content were set to a number value.

* Makes broadcast() work slightly more than it did before

Fixes a bug where broadcast() was not sending its message to any machine.

This doesn't apparently fix broadcast(), but it gets closer.

This also makes it so that broadcast() returns how many machines heard the broadcast directly.

* Makes the IDE dark-themed

So edgy

* Makes broadcast() work! For real!

We're GETTING SOMEWHERE, ladies and gentlemen!

That only took, y'know, 6 hours of on-and-off labour, by itself.

* Fixes $source and $sector

I... guess this fixes $source? I'll do more tests on this later.

Also, this makes $sector a vector now, I think. Was it one before? I'unno. It's 5 in the morning.

* Adds clearmem(), tweaks mem()

mem() now, when used to set a value, now returns TRUE if it worked and FALSE if it didn't.

* Fixes $say, $ask, $yell, & $exclaim

That GetSource thing is going to bite me in the ass eventually, I just don't know exactly when.

* Re-adds Signal Technician

* Makes $language work

So in NTSL the languages are set by bitflags.

That isn't really how language works anymore in the game, so I've put some wrapping around that so that the scripter can still treat them like they're still bitflags, sorta.

This should generally maintain backwards compatibility while also making all this actually work.

* MODULARIZATION!

If you want to actually see a play-by-play on what I've done to make NTSL work, look at the diffs of the earlier commits.

* Fixes the dme, puts script computer in Yogstation map

* Removes UUID

Can I be merged now

* First Hotfix

-Fixes Signal Techs not being able to get out/into Engineering
-Fixes the HoP's computer not being able to give out the Signal Tech job
-Adds an admin verb that lets +ADMINs kill all NTSL scripts

* Fixes SecHUD w/ Signal Techs

* Fixes language, adds Clown span

- Non-Common languages can now be spoken on NTSL-enabled comms channels
-SPAN_CLOWN is now an allowed span, although I am not adding a variable for that in NTSL.

* Pretty filter for variables output by NTSL

Also implements isnotpretty() , a boolean version of pretty_filter().

* Fixes Signal Techs not being able to leave, again.

* First attempt at fixing AI tracking

We would be merged by now but nooooo gotta merge me some file changes says ol' nich

* I don't know how to fix this

* Update YogStation.dmm

* Mostly fixes the .dmm

One of the doors that lead to telecomms is part of the randomly-changing engine area, so, gimme a sec on that.

* What the fuck happened

* I DON'T UNDERSTAND

* Fixes my isnotpretty proc

* ?????

* Alphabetizes the .dme

* Fully fixes Signal Techs not being able to leave the satellite

So one of these doors *is* part of the engine sector, so, just saying.

* Fixes runtime @ CheckToken(), fixes MaxCPU

I dunno exactly why it even got to this point in the first place, but, *shrug

Also, this makes the runtime about not having enough CPU cycles actually say exactly what the maximum number of lines is, instead of just spouting a (wrong) magic number.

* Changes newlines from \r\n to \n

Maybe this'll fix the conflict, maybe?
This commit is contained in:
Gary Lafortune
2019-02-10 17:59:52 -06:00
committed by monster860
parent d2ed81d237
commit 97b4119780
41 changed files with 4114 additions and 22 deletions

View File

@@ -324,3 +324,97 @@ window "statwindow"
is-default = true
saved-params = ""
window "Telecomms IDE"
elem "Telecomms IDE"
type = MAIN
pos = 281,0
size = 569x582
anchor1 = none
anchor2 = none
background-color = #222222
text-color = #eeeeee
is-visible = false
saved-params = "pos;size;is-minimized;is-maximized"
title = "TCS IDE"
statusbar = false
on-close = "exittcs"
elem "button5"
type = BUTTON
pos = 209,464
size = 70x20
anchor1 = 37,80
anchor2 = 49,83
background-color = #555555
text-color = #eeeeee
saved-params = "is-checked"
text = "Clear Memory"
command = "tcsclearmem"
elem "button4"
type = BUTTON
pos = 157,464
size = 52x20
anchor1 = 28,80
anchor2 = 37,83
background-color = #555555
text-color = #eeeeee
saved-params = "is-checked"
text = "Revert"
command = "tcsrevert"
elem "button3"
type = BUTTON
pos = 105,464
size = 52x20
anchor1 = 18,80
anchor2 = 28,83
background-color = #555555
text-color = #eeeeee
saved-params = "is-checked"
text = "Execute"
command = "tcsrun"
elem "tcserror"
type = OUTPUT
pos = 0,488
size = 566x94
anchor1 = 0,84
anchor2 = 99,100
background-color = #333334
text-color = #eeeeee
font-family = "sans-serif"
font-size = 9
saved-params = "max-lines"
elem "button2"
type = BUTTON
pos = 53,464
size = 52x20
anchor1 = 9,80
anchor2 = 18,83
background-color = #555555
text-color = #eeeeee
saved-params = "is-checked"
text = "Compile"
command = "tcscompile"
elem "button1"
type = BUTTON
pos = 0,464
size = 53x20
anchor1 = 0,80
anchor2 = 9,83
background-color = #555555
text-color = #eeeeee
saved-params = "is-checked"
text = "Save"
command = "tcssave"
elem "tcscode"
type = INPUT
pos = 0,0
size = 569x464
anchor1 = 0,0
anchor2 = 100,80
background-color = #333334
text-color = #eeeeee
font-family = "Courier"
font-size = 10
saved-params = ""
command = "cancel"
multi-line = true
no-command = true