Commit Graph

48 Commits

Author SHA1 Message Date
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
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
Emmett Gaines
825ab4def4 [512] The great \ref purge (#31824)
* The great \ref purge

* cleanup
2017-10-28 17:20:04 -04: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
ShizCalev
39380d5b03 Removes old debug text 2017-09-19 18:56:39 -04:00
Jordan Brown
84b1e3d71e [s] Adds a security token to all admin hrefs (#29839)
There's a certain issue of people spoofing real byond links to admins. Now all links should come with a generated key that is validated when the Topic is run.

Added DEBUG_ADMIN_HREFS to debug this system while we test it (Allows hrefs without tokens and complains about it in the logs)

Just add [HrefToken()] as a parameter to all admin hrefs. Anything that ends up running through VV or Holder will be verified
2017-09-09 12:15:53 +10:00
Jordan Brown
af4d9a85c9 Repaths /obj/item/weapon to /obj/item (#29929) 2017-08-16 10:38:51 -03:00
kevinz000
e7047572f6 Update SDQL_2.dm 2017-07-26 22:30:23 -07:00
kevinz000
8dd52c80d2 Update SDQL_2.dm 2017-07-26 06:53:47 -07:00
kevinz000
d0d351f0b0 SDQL_runtimes 2017-07-26 05:57:16 -07:00
kevinz000
7a26305498 Replaces ex_act and emp_act numbers with defines (#29215)
* defines

* defines

* explode_none
2017-07-13 08:56:26 -03:00
Cyberboss
1c4cd11c55 SDQL cleanup (#27118) 2017-05-11 12:34:42 -03:00
Cyberboss
4a49086849 Patches SDQL exploits that can return world ref (#26689) 2017-04-29 23:59:03 +02:00
Cyberboss
520bcbdfe6 Fix SDQL vars again 2017-04-28 10:29:16 -04:00
Cyberboss
02ff34b14f Fixes SDQL global procs 2017-04-26 09:52:04 -04:00
Cyberboss
6a9fa3d35a Adds a proc to check if the current thread is from an admin advanced proc call (#26191)
* Admin proc call guards

* Adds a db warning

* Better this way

* leftover

* )=

* Fix

* Wew

* Better runtime handling

* Make callback use it if var_edited
2017-04-15 11:24:35 -06:00
Cyberboss
a8cc3cd6c2 [s] Fixes datum var hiding (#26027)
* .

* Buildmode

* SDQL global. now refers to GLOB

@kevinz000

* Another SDQL thing

* Fix
2017-04-12 11:20:46 +12:00
kevinz000
2bab78ed75 [READY]Removes the runtime stop from SDQL2, adds a catcher for them to show, and total operations counter (#25597)
* Update SDQL_2.dm

* runtime catcher
2017-04-05 15:48:22 +02:00
kevinz000
3156b3c5e6 [READY]More SDQL stuff from /vg/ (#24970)
* sdql3

* wups
2017-03-16 20:24:10 +13:00
Lzimann
5a618297ce Replaces the default output with the to_chat wrapper. 2017-03-10 01:32:05 -03:00
Cyberboss
07e917109a Makes SDQL use vv_edit_var (#24854)
* Makes SDQL use vv_edit_var

* Fix shit
2017-03-10 11:01:12 +13:00
kevinz000
7e93035613 [READY]SDQL2 update: In which admins get more power than they deserve. (#23694)
* ABSOLUTE PATHING!!

* absolutely fucking pathed

* stuffs

* oh that was there for a reason.

* fixes

* stuffs

* my fucking identation >:[

* double no

* no delayed global proccalls.

* /var/s

* /var/s/2

* catch(vars)

* var/expression/e broke without the var/

* lists and wrappers!

* Update SDQL_2.dm

* Update SDQL_2.dm

* Update SDQL_2.dm
2017-02-06 18:37:39 +13:00
kevinz000
959aa30715 Update SDQL_2.dm 2017-01-20 16:16:51 -08:00
Cheridan
fd337f0741 Merge pull request #22658 from MrStonedOne/patch-277
Updates sdql2 to work on datums much quicker by ignoring atoms
2017-01-03 18:57:50 -06:00
Kyle Spier-Swenson
e9b7bfb389 Fixes sdql2 applying comparison operators to lists incorrectly (#22627)
* Fixes sdql2 applying comparison operators to lists incorrectly

* Add a comment to prevent future reverts

Just in case

* Removes oranges comment

I'm fucking sick and tired of this shit where people touch code they don't understand.

By adding the comment, you imply that every bit of code thats the same without the same comment is safe to change, but thats not true.

These landmines are important for teaching new coders not to fuck with shit they don't understand.

When you see something and go "why is it doing it that way". the answer is not to go "fuck it, it seems to still work when i change it" the answer is to leave it the fuck alone until it doing it that way is actually an issue.

How many god damn bugs have we had this last year from non-changes like that. I'm sick of them.
2017-01-04 10:11:36 +13:00
Kyle Spier-Swenson
e105e72065 Updates sqdl2 to work on datums much quicker by ignoring atoms
Also makes it use a typecache for more speed.
2017-01-02 06:51:59 -08:00
Joan Lung
ce13143d9d Replaces yet more istypes with helpers (#20806)
* uses more istype helpers

* oranges is inefficient
2016-10-10 17:48:35 +13:00
MrStonedOne
71ae9d13aa Adds lag checks to massedit, sdql2, del-all, and the map loader 2016-03-15 03:39:42 -07:00
Kyle Spier-Swenson
675b0bc500 Removes comment that is no longer needed 2016-01-02 20:04:54 -08:00
MrStonedOne
b50e8d2a63 removes a bunch of unneeded spawns
spawns have a high overhead.

I only went for easy targets, almost every spawn could be removed with a few subsystems in place to handle delays or cooldowns
2016-01-02 18:23:02 -08:00
Firecage
dfae1e0b53 Changes a lot of del() to qdel() 2015-08-16 23:33:22 +02:00
Aranclanos
2a338abd58 Added NOTICE() for world.log messages that aren't errors or warnings.
The message that SDQL2 query outputs will now properly state the ckey of the user.
2014-10-14 20:06:37 -03:00
Cheridan
08be1b34eb Revert "Changes a few green crosses to blue on sprites that I missed last time" 2014-10-04 19:22:10 -05:00
Firecage
6c7af5eb32 SPANCLASSES!!!!! 2014-08-26 09:52:13 +02:00
Giacomand
3811c9af05 Added world.log and log_game() to the SQDL logging. 2014-03-25 10:27:03 +00:00
Giacomand
3d509f84e3 Added examples.
Removed a now unnecessary workaround.
2014-03-23 23:07:52 +00:00
Giacomand
b9011097a4 Added support for calling procs via SQDL.
Moved the verb category to "Debug".
Added the verb to the "Debug verbs" button.
2014-01-18 18:59:02 +00:00
Giacomand
1aa4cf3648 Ported /bay/station's SQDL2 which can be used to help debug code and features, by using queries to select and filter objects, and then make changes to them. 2014-01-18 00:31:44 +00:00