Commit Graph

100 Commits

Author SHA1 Message Date
LemonInTheDark
15e9d0485f Adds a seperate pick proc to work on lists (#65178)
Because of how arglist() works, _pick was only working on args matching
the format pick(1, 2 ,3)

Because this is logic that happens inside pick itself, and I can't
figure out the proper way to actually pass things in, I've created
_pick_list so admins have a sane way to pick from lists.
2022-02-27 13:16:38 +00:00
Iamgoofball
95801c7035 Fixes some code style issues for more free GBP (#65133) 2022-02-25 00:36:17 -08:00
Iamgoofball
cbeaa81e60 Implements some missing SDQL 2 wrappers. (#65132)
Adds _winset and _winget as byond proc wrappers.
2022-02-25 06:30:40 +00:00
Timberpoes
f9428e07c6 Fix BYOND-related runtime in SDQL2 _new wrapper (#64895) 2022-02-18 01:03:47 -08:00
John Willard
63ae8829d4 Fire breath can be used without the ability to speak (+ code improvement) (#64796) 2022-02-09 21:24:34 -06:00
LemonInTheDark
f8aad14ae8 Harddel Fix Pack #42 + Better Live Reftracking Support (#63877)
* Hard Del Fixes, Ref Tracking Changes
2022-01-12 22:46:13 +01:00
Jeremiah
9c6fdb567d TGUI list conversions + bug fixes (#63354)
About The Pull Request

    Converts more inputs to TGUI. Possibly all user-facing input lists in the game.
    Did any surrounding text/number inputs as well
    Added null choice support so users can press cancel.
    Added some misc TGUI input fixes
    Fixed custom vendors while I was there

I refactored a lot of code while just poking around.
Primarily, usage of .len in files where I was already working on lists.
Some code was just awful - look at guardian.dm and its non use of early returns
If there are any disputes, I can revert it just fine, those changes are not integral to the PR.
Why It's Good For The Game

Fixes #63629
Fixes #63307
Fixes custom vendors /again/
Text input is more performant.
Part of a long series of TGUI conversion to make the game more visually appealing
Changelog

cl
refactor: The majority of user facing input lists have been converted to TGUI.
refactor: Tgui text inputs now scale with entered input.
fix: Many inputs now properly accept cancelling out of the menu.
fix: Fixes an edge case where users could not press enter on number inputs.
fix: Custom vendor bluescreen.
fix: You can now press ENTER on text inputs without an entry to cancel.
/cl
2021-12-31 11:07:28 +13:00
Fikou
7b38dd4ff7 MODsuits (#59109) 2021-12-24 12:00:24 -08:00
Ghom
b79dd74fd0 Replaces a portion of C-style for loops with the more commonplace for loops, which are faster. (#62624)
Co-authored-by: Kyle Spier-Swenson <kyleshome@gmail.com>
2021-11-07 16:42:41 -08:00
Y0SH1M4S73R
a30395c49d adds silent var to sdql spells (#62217)
Adds a suppress_message_admins var to SDQL spells, which makes the query not appear in chat, while still writing it to the game log.
2021-10-21 16:17:26 +01:00
Mothblocks
3be6f04b5c Add missing SIGNAL_HANDLERs (#62115)
Add missing SIGNAL_HANDLERs
2021-10-15 07:01:02 +01:00
Ghilker
95c8e00af7 cleanup _HELPERS/_lists.dm and all the necessary files (#61827)
Bring _HELPERS/_lists.dm to latest standards by:
-Adding proper documentation and fixing existing one
-Giving vars proper names
-Procs now use snake case as per standard (many files that use those procs will be affected)
2021-10-12 14:48:51 +01:00
Jordan Brown
765c7840e2 [s] Cleanup escalation unsafe procs (#61905)
Fixes admins spawning in atoms and datums without the DF_VAR_EDITED flag
2021-10-06 13:12:50 +01:00
Mothblocks
5a60e6bc67 Removes a useless but very hilarious define and really I just want to show the rest of you that this used to be here (#61866)
Removes SDQL_qdel_datum and please just click files changed okay
2021-10-04 15:03:33 +01:00
Y0SH1M4S73R
ff974b82d1 fixes sdql spell parsing (#61248) 2021-09-06 02:35:15 -07:00
Y0SH1M4S73R
d00c721638 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>
2021-08-30 00:03:01 +03:00
Fikou
8baff61c5f adds list getter and text2num to sdql (#60654) 2021-08-02 22:57:40 -07:00
Watermelon914
375a20e49b Refactors most spans into span procs (#59645)
Converts most spans into span procs. Mostly used regex for this and sorted out any compile time errors afterwards so there could be some bugs.
Was initially going to do defines, but ninja said to make it into a proc, and if there's any overhead, they can easily be changed to defines.

Makes it easier to control the formatting and prevents typos when creating spans as it'll runtime if you misspell instead of silently failing.
Reduces the code you need to write when writing spans, as you don't need to close the span as that's automatically handled by the proc.

(Note from Lemon: This should be converted to defines once we update the minimum version to 514. Didn't do it now because byond pain and such)
2021-06-14 13:03:53 -07:00
Fikou
241ce53d37 moves sdql spell to vv dropdown (#58911) 2021-05-06 23:17:09 -07:00
Celotajs
489d47a4b1 Move give SDQL spell to Debug.Admin (#58825)
Co-authored-by: celotajstg <celotajstg@users.noreply.github.com>
2021-05-03 21:53:44 +01:00
Y0SH1M4S73R
3bd7a0db6b 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>
2021-04-28 03:23:51 +03:00
Mothblocks
0f435d5dff Remove hideous inline tab indentation, and bans it in contributing guidelines (#56912)
Done using this command sed -Ei 's/(\s*\S+)\s*\t+/\1 /g' code/**/*.dm

We have countless examples in the codebase with this style gone wrong, and defines and such being on hideously different levels of indentation. Fixing this to keep the alignment involves tainting the blames of code your PR doesn't need to be touching at all. And ultimately, it's hideous.

There are some files that this sed makes uglier. I can fix these when they are pointed out, but I believe this is ultimately for the greater good of readability. I'm more concerned with if any strings relied on this.

Hi codeowners!

Co-authored-by: Jared-Fogle <35135081+Jared-Fogle@users.noreply.github.com>
2021-02-14 16:53:29 -08:00
Son-of-Space
c54bd59e7a Standardizes area paths and area-based nomenclature (#56430)
This PR repaths areas to follow a department - purpose - room formula (just department - room if purpose is unnecessary), reorganizes the area file to properly sort by department, removes some unused areas, and better utilizes child subtypes for areas. It fixes several problems with areas which were previously improperly subtyped causing problems like the lack of AI monitoring on vault areas and the inability to use the civilian door remote on most service areas.

Properly organizing our areas will make mistakes in adding areas or duplicates harder to do. By organizing each department in this way, it also provides better infrastructure for autoname devices and any future code that has to reference areas by department.
2021-02-05 13:36:25 -08:00
Ghom
6e90fe68a8 Webedit fixing SDQL global proc calls (#55734)
* Webedit fixing SDQK global proc calls

Co-authored-by: AnturK <AnturK@users.noreply.github.com>
2020-12-31 17:53:52 -08:00
Qustinnus
f66ca34626 Refactors monkeys into a species (#55614)
Changes monkeys from carbon subtype to species.
2020-12-30 16:30:15 +01:00
Couls
75cdfc88f6 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>
2020-09-14 23:36:46 -07:00
Couls
e7f99e3b8b Browser Status Panel (#53112) 2020-08-27 15:28:03 -07: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