Commit Graph

86 Commits

Author SHA1 Message Date
SkyratBot
4f3f979834 [MIRROR] fixes sdql spell parsing (#8013)
* fixes sdql spell parsing (#61248)

* fixes sdql spell parsing

Co-authored-by: Y0SH1M4S73R <legoboyo@earthlink.net>
2021-09-06 07:54:43 -04:00
SkyratBot
5169789861 [MIRROR] Refactors and improves SDQL spells (#7854)
* Refactors and improves SDQL spells (#60972)

SDQL spells have been improved in several ways:

- The behavior of executing SDQL spell queries using datums has been migrated to a component
- Projectile SDQL spells can now fire any subtype of /obj/projectile
- Touch SDQL spells can use any subtype of /obj/item/melee/touch_attack
- More robust parse error detection
- Parse errors while loading a file from json are displayed in a modal window, with the option to load whatever parts of the spell were correctly parsed (be forewarned, scrollable sections are scuffed, and the ones that appear in the parse error modal can only be scrolled through by drag-selecting the text within them)
- Fixes a bug with the names of variables within lists
- Compartmentalizes SDQL spell code into several .dm files.

Co-authored-by: Aleksej Komarov <stylemistake@ gmail.com>

* Refactors and improves SDQL spells

Co-authored-by: Y0SH1M4S73R <legoboyo@earthlink.net>
Co-authored-by: Aleksej Komarov <stylemistake@ gmail.com>
2021-08-29 23:00:33 +01:00
SkyratBot
3a6687e5cc [MIRROR] adds list getter and text2num to sdql wrappers (#7351)
* adds list getter and text2num to sdql (#60654)

* adds list getter and text2num to sdql wrappers

Co-authored-by: Fikou <23585223+Fikou@users.noreply.github.com>
2021-08-03 20:06:37 +01:00
SkyratBot
7d1d0e1fad [MIRROR] Refactors most spans into span procs (#6315)
* Refactors most spans into span procs

* AA

* a

* AAAAAAAAAAAAAAAAAAAAAA

* Update species.dm

Co-authored-by: Watermelon914 <37270891+Watermelon914@users.noreply.github.com>
Co-authored-by: Gandalf <jzo123@hotmail.com>
2021-06-16 00:24:49 +01:00
SkyratBot
f8f2c8222f [MIRROR] moves sdql spell to vv dropdown (#5522)
* moves sdql spell to vv dropdown (#58911)

* moves sdql spell to vv dropdown

Co-authored-by: Fikou <piotrbryla@onet.pl>
2021-05-07 07:42:51 +01:00
SkyratBot
8670c29480 [MIRROR] Move give SDQL spell to Debug tab (#5436)
* Move give SDQL spell to Debug.Admin (#58825)

Co-authored-by: celotajstg <celotajstg@ users.noreply.github.com>

* Move give SDQL spell to Debug tab

Co-authored-by: Celotajs <81999976+celotajstg@users.noreply.github.com>
Co-authored-by: celotajstg <celotajstg@ users.noreply.github.com>
2021-05-03 22:29:29 +01:00
SkyratBot
b7cefa3986 [MIRROR] Adds SDQL Spells & a Menu to Give Them to Players - Take 2: Commit Cleanup (#5274)
* SDQL Spells & Menu to Give Them to Players (#58118)

SDQL spells are spells that execute an SDQL query. This requires a config flag to be enabled in game_options.txt. When enabled, admins with debug verbs have the ability to open a menu allowing them to define all the relevant vars for the spell, including icons and spell requirements.

It also fixes a bug with superuser SDQL queries always runtime if they try to call a proc.

Co-authored-by: Emmett Gaines <ninjanomnom@ gmail.com>
Co-authored-by: Aleksej Komarov <stylemistake@ gmail.com>

* Adds SDQL Spells & a Menu to Give Them to Players - Take 2: Commit Cleanup

Co-authored-by: Y0SH1M4S73R <legoboyo@earthlink.net>
Co-authored-by: Emmett Gaines <ninjanomnom@ gmail.com>
Co-authored-by: Aleksej Komarov <stylemistake@ gmail.com>
2021-04-29 00:30:19 +01:00
SkyratBot
b332b46b65 [MIRROR] Remove hideous inline tab indentation, and bans it in contributing guidelines (#3394)
* Remove hideous inline tab indentation, and bans it in contributing guidelines

* a

Co-authored-by: Mothblocks <35135081+Mothblocks@users.noreply.github.com>
Co-authored-by: Gandalf2k15 <jzo123@hotmail.com>
2021-02-15 15:32:02 +00:00
SkyratBot
e83e1b7d41 Standardizes area paths and area-based nomenclature (#3125)
Co-authored-by: Son-of-Space <63861499+Son-of-Space@users.noreply.github.com>
Co-authored-by: Gandalf2k15 <jzo123@hotmail.com>
2021-02-08 22:59:05 +00:00
SkyratBot
8bb94cd261 [MIRROR] Webedit fixing SDQL global proc calls (#2420)
* Webedit fixing SDQL global proc calls (#55734)

* Webedit fixing SDQK global proc calls

Co-authored-by: AnturK <AnturK@ users.noreply.github.com>

* Webedit fixing SDQL global proc calls

Co-authored-by: Ghom <42542238+Ghommie@users.noreply.github.com>
Co-authored-by: AnturK <AnturK@ users.noreply.github.com>
2021-01-01 14:43:16 +01:00
SkyratBot
d7f054b035 [MIRROR] Refactors monkeys into a species (#2379)
* Refactors monkeys into a species

* aaa

Co-authored-by: Qustinnus <Floydje123@hotmail.com>
Co-authored-by: Azarak <azarak10@gmail.com>
2020-12-31 21:08:07 +01:00
SkyratBot
496811ef6c [MIRROR] Optimize stat panel and fix guardian verbs (#804)
* Optimize stat panel and fix guardian verbs (#53463)

Optimizes stat panel code for better performance, including icon caching and removing some unnecessary processing
Also fixes #53432
fix #53381
fix #53724
Changelog

add: icons are back on alt clicks
fix: horrible performance from alt clicking turfs with multiple objects
tweak:browser should notify the SS when it's ready to receive data

* Update statbrowser.html

* Apply suggestions from code review

Co-authored-by: Jared-Fogle <35135081+Jared-Fogle@ users.noreply.github.com>

* hidden = TRUE

* almost ready

* Browser should notify when ready to receive data

* Apply MSO's suggestions

* reset cache if something in it gets deleted

* Fix runtime

* fix my stupid code

* send href_token when adding admin tabs

* fix an issue with cyborg suit topic

Co-authored-by: Jared-Fogle <35135081+Jared-Fogle@ users.noreply.github.com>

* Optimize stat panel and fix guardian verbs

Co-authored-by: Couls <coul422@gmail.com>
Co-authored-by: Jared-Fogle <35135081+Jared-Fogle@ users.noreply.github.com>
2020-09-15 09:17:31 +02:00
SkyratBot
1c1ce7b055 [MIRROR] Browser Status Panel (#548)
* Browser Status Panel (#53112)

* Browser Status Panel

Co-authored-by: Couls <coul422@gmail.com>
2020-08-29 20:26:27 +01:00
nemvar
b87f65d95e Converts ALL typepaths to lowercase (#51642)
* Case of lower

* More changes

* Ruins the nice 420 diff, brainfart when doing the second batch of conversions

* More changes

* Next batch. I think

* Converts even more paths

* Restarts bots

* Capital Free Zone

* Come on travis, do something

* Renames areas

* Bots, please stop dying

* Updates CONTRIBUTING.md and updates a few paths I missed.

* APC recgarftzfvas
/obj/item/computer_hardware/recharger/apc to /obj/item/computer_hardware/recharger/apc_recharger
2020-06-17 20:47:57 -03:00
Tad Hardesty
5e37952b81 Fix name of SDQL arccos wrapper (#51087) 2020-05-25 02:15:13 +08:00
spessman-007
ab84042f94 [READY] Improve spelling (#51134)
* Improve spelling

* Spell isn't, ain't, shouldn't, hasn't, wasn't correctly

Co-authored-by: NewSta <spessman-007@users.noreply.github.com>
2020-05-25 02:13:37 +08:00
Rob Bailey
c20a04543b Port of Replays from Yogstation (#48579)
* demos (ported from yogstation)

rustg update + write with no format

use external hook for logging

use proper log vars

fix + clarifying comment

don't start the log

release build of rust-g

fix something caught by the lint

Update code/__DEFINES/subsystems.dm

Co-Authored-By: Jordan Brown <Cyberboss@users.noreply.github.com>

Update code/controllers/subsystem/demo.dm

Co-Authored-By: JJRcop <jrubcop@gmail.com>

Update code/controllers/subsystem/demo.dm

Co-Authored-By: JJRcop <jrubcop@gmail.com>

moves hooks out of a dedicated file

len = 0 to Cut(), remove semicolons

untyped loop

* updated rust_g

* 513 updates
2020-04-06 13:15:48 -04:00
AnturK
52120c7728 Drops 512 support. 2020-02-17 15:01:14 +01:00
MrPerson
75133d1bc7 Fixes an SQDL2 runtime error (#49327)
If you tried to call SQDL with " at the end, it would throw eg WHERE var="something"
2020-02-14 18:38:08 +01:00
Emmett Gaines
2cf7728494 Removes the bitflag helpers (#49106) 2020-02-03 16:26:00 -05:00
MrPerson
f7eb2c905b Unicode awareness Part 2 -- copytext() (#48512)
* Unicode support Part 2 -- copytext()

This is the transition of all copytext() calls to be unicode aware and also some nearby calls in the same functions. Most things are just replacing copytext() with copytext_char() as a terrible character limiter but a few others were slightly more involved.

I replaced a ton of
````
var/something = sanitize(input())
something = copytext(something, 1, MAX_MESSAGE_LEN)
````

with a single stripped_input() call. stripped_input() already calls html_encode(), trim(), and some other sanitization so there shouldn't be any major issues there.

This is still VERY rough btw; DNA is a mess, the status displays are complete ass, there's a copytext() in code\datums\shuttles.dm that I'm not sure what to do with, and I didn't touch anything in the tools folder. I haven't tested this much at all yet, I only got it to compile earlier this morning. There's also likely to be weird bugs until I get around to fixing length(), findtext(), and the rest of the string procs.

* Makes the code functional

* Assume color hex strings are always # followed by ascii.
Properly encodes and decodes the stuff in mob_helpers.dm which fixes some issues there.

* Removes ninjaspeak since it's unused
2020-01-18 13:07:22 +13:00
nemvar
828ebb20cf Allows calling procs in SDQL update queries without storing the return anywhere. (#48690)
* Adds everything that's needed for SDQL varedit macros

* Removes unused proc

* Allows calling procs in update queries without setting the return anywhere.

* Readds a line

* Removes file wrapper
2020-01-13 19:52:20 -05:00
JJRcop
af4cb5ddc3 SDQL2 dynamically gets subsystems (#48335)
As opposed to a static switch statement
This means all present and future subsystems are supported
without needing to add them to the switch
2019-12-22 15:33:39 -05:00
spookydonut
6b5433eb23 Fixes new linter errors (#48126)
About The Pull Request

This fixes the errors raised by the new feature I'm adding to the linter: SpaceManiac/SpacemanDMM#119
2019-12-09 20:53:24 +13:00
nemvar
c38a7a3bb5 Removes a bunch of var/ in procs (#46946)
* Removes a bunch of /var in procs

* reset this

* Why wasn't this already?
2019-10-10 04:20:27 -07:00
AnturK
d979048a9f Fix sequential SDQL being default (#44476) 2019-06-13 19:25:11 -07:00
AnturK
cc88cc16ed I shouldn't code straight after waking up. 2019-06-06 21:53:30 +02:00
AnturK
652071d9c8 bluh 2019-06-06 21:48:02 +02:00
AnturK
116ea6c71f Adds sdql2 trait wrappers. 2019-06-06 21:46:05 +02:00
AnturK
4d0b44bbb2 Adds sequential mode to SDQL 2019-05-30 19:51:56 +02:00
Tad Hardesty
9183a6f66b Clean up workaround for fixed compiler bug (#43698) 2019-04-29 10:59:28 +02:00
JJRcop
1cf1df847c [READY] Adds selector lists to SDQL (#43383)
* [SDQL2] Adds selector arrays

* SDQL2 documentation spec updated slightly

* SDQL2 selector array docs + tweaks

If a single list is the only result of a MAP statement,
meaning objs.len == 1, AND it's a list, it will unwrap
the result from its containing list and return it directly.

The selector array logic keeps track of the state of the query
when it starts the first Search. It won't change the state back
to Execute until the top-level is reached, which sets a var
to keep track.

* SDQL2 MAP change from objs.len to length(objs)

* [SDQL2] Reverts MAP list unwrap

* [SDQL] Move (expr) from expr, unary_expr to var

This should result in the same functionality but instead of expressions and unary_expressions processing sub expressions, variables do
This means that expression->value->variable is now completely recursable

* [SDQL2] Update selector list documentation
2019-04-15 09:22:30 +02:00
kevinz000
a7e974f9d3 [READY]Ports yet another SDQL2 upgrade, refactors SDQL2 to a datum, adds SDQL2 options/more features (#42008)
Thanks to PJB3005
cl
experimental: SDQL2 has been refactored to a datum!
rscadd: A new SDQL2 panel has been added to admin tabs, for tracking, VVing, and halting SDQL2 queries.
rscadd: SDQL2 documentation is now available in SDQL_2.dm
rscadd: SDQL2 now has MAP added. MAP will cause the query to execute on whatever is specified in MAP, whether it's a variable or a procedure call (which will grab the return results), etc etc.
rscadd: SDQL2 now has a superuser mode, for uses outside of admin button pressing. This causes it to operate without admin protection wrapping.
rscadd: SDQL2 now supports options, including ignoring nulls in select or forcing it to operate in high priority mode, which lets it use 95% of the tick instead of obeying the Master Controller's tick limit. USE WITH CAUTION. Also includes a mode for blocking proccalls
rscadd: SDQL2 now supports TRUE/FALSE.
rscadd: To use options, append OPTIONS to the query. Available are "PRIORITY" = HIGH/NORMAL, "SELECT" = FORCE_NULLS/DISABLE or 0/FALSE, "PROCCALL" = ASYNC/BLOCKING.
/cl

Also displaytimetext is refactored.
2019-01-07 20:03:41 +13:00
oranges
ede3e0b4d7 Update the SDQL grammar comment
variable allows for proc calls and technically the call option just uses variable to parse out it's function (even if you provide something that makes no sense)
2018-12-15 08:42:35 +13:00
Purpose
648e5382af minor typo fix 2018-10-21 18:28:14 +01:00
ShizCalev
98a6b39cca Clean up mixed space & tab usage (#40121) 2018-09-05 22:51:20 -07:00
Jordie
0d7ef3ed65 Key instead of ckey for user facing logs and ui (#39009)
* converts to using key instead of ckey for user facing logs and ui

* more key_name for airlock wires

* futureproofing check for if key changes

* --onlyckeymatch script argument and fail/success counter

* fix
2018-08-11 02:15:50 +10:00
Jonathan (JJRcop)
1b57f50136 Fixes SDQL strings
This is done by partially reverting commit 503a8a3557
Also fixed explain not working well with goonchat
2018-08-04 05:03:21 -04:00
kevinz000
00f348c06f SDQL queries are now on statbus (#39141)
* Update SDQL_2.dm

* no need for manual escaping..
2018-07-19 21:17:10 -04:00
oranges
472c15da3a SDQL where filter message is now correct
Previously when no where filter was used it would incorrectly use the
filtered count when reporting what objects were executed against, this
lead to admins erroneously assuming that the where clause was required
2018-07-02 02:28:59 +00:00
Cyberboss
650a5eebe3 You can no longer SDQL select certain datums 2018-03-09 10:23:41 -05:00
Tad Hardesty
b3b3b38f34 Add JMP buttons to SDQL select results 2018-01-15 21:40:16 -08:00
Emmett Gaines
25080ff2c4 defines math (#33498) 2017-12-17 11:02:11 -05:00
Jordan Brown
59abcb8dc3 Adds SDQL chat command (#33366)
Allow's calling SDQL from bots supporting the CHAT system API
2017-12-15 10:43:54 +13:00
Emmett Gaines
7c69cdcb8a Revert math (#33059)
* Revert "all this wrapping and it's not even christmas (#33035)"

This reverts commit faaf151580.

* Revert "fuck me for forgetting to graph this one"

This reverts commit 45d7acea2f.

* Revert "defines math"

This reverts commit 2817a1737b.
2017-11-23 20:59:52 -05:00
ninjanomnom
2817a1737b defines math 2017-11-22 17:36:58 -05:00
Remie Richards
ec80c3747f animate sqdl wrapper works now. 2017-10-31 11:09:59 +00:00
Emmett Gaines
825ab4def4 [512] The great \ref purge (#31824)
* The great \ref purge

* cleanup
2017-10-28 17:20:04 -04:00
kevinz000
c10f2246a2 Adds walk and step SDQL2 wrappers (#31447)
* Update SDQL_2_wrappers.dm

* Update SDQL_2_wrappers.dm
2017-10-10 21:18:18 +13:00
ShizCalev
74f5a8c904 DisplayTimeText mk2 (#30969)
* Adds new helper, DisplayTimeText

* Removed unused define

Thought it would've been nice to have for the future, but I guess it's
fine to go without it.

* CBB

* Revamp

* Early returns

* More cleanup

* Proc cleanup

* Makes fraction only show if seconds is < 1

* Last cleanup

* Revert

* Corrected incorrect round time.

Dunno how nobody ever caught that it was incorrect on live servers, gg.
2017-09-24 19:58:58 -04:00