Commit graph

1647 commits

Author SHA1 Message Date
Tad Hardesty
2dbdeb855f Improve readability of rgb() tests 2021-03-18 22:07:32 -07:00
ZeWaka
7e3731ea92
Add 514 rgb() support (#254)
Allows for `rgb()` with arguments of form 
`[r,g,b|h,s,[v|l|y]],(a),(space)`

Also allows the full names of the arguments. Technically, BYOND 
supports just the first letter so `halifax` works for `hue` but fuck 
that.

Also now lints to see if the values are in the valid ranges.

Co-authored-by: Tad Hardesty <tad@platymuus.com>
2021-03-18 21:56:05 -07:00
ZeWaka
0a108b69af
panic! supports formatting (#255) 2021-03-16 03:39:03 +08:00
spookydonut
3d798cee8c Remove debugging println macro. 2021-03-12 14:36:05 +08:00
Tad Hardesty
d2b3f61032 Track disk I/O time separately from parse time 2021-03-11 19:24:14 -08:00
spookydonut
f8641c71e8 Remove duplicate particle grow var 2021-03-11 17:05:06 +08:00
spookydonut
42163b5d91
Add detection of sleeping client procs (#252)
* This should work but doesn't.

* bugfix maybe?

* working now
2021-03-11 17:00:18 +08:00
spookydonut
8999f1cc63 Add new 514.1549 features and increment DM version constants to match 2021-03-10 16:01:12 +08:00
Tad Hardesty
635434f8ee Add /world/var/movement_mode to builtins 2021-02-18 17:04:35 -08:00
Pieter-Jan Briers
e07801070e
Optimize map rendering (#242)
It is much faster now, way less terrible blitting code.

---
SpaceManiac's benchmarks indicate about 9% speedup when rendering MetaStation with `--release` on.
2021-02-16 18:00:18 -08:00
Tad Hardesty
0b95746cb8 Add a ConstFn entry for generator()
Fixes #244.
2021-02-16 17:51:30 -08:00
ZeWaka
2826cb3af3
Add new particle variable added by 514.1547 (#246)
Supporting new `particles/var/grow` variable.

http://www.byond.com/forum/?forum=6&command=search&scope=local&text=resolved%3a514.1547
2021-02-16 17:43:22 -08:00
Tad Hardesty
366f14aadd Disable forbidding of unreachable_patterns in editor keychord handler 2021-02-16 17:41:58 -08:00
Tad Hardesty
58e6e7f6fd Fix broken use of syn private re-exports 2021-02-08 12:52:19 -08:00
Tad Hardesty
3e8021087a Run 'cargo update' 2021-02-08 12:50:35 -08:00
ZeWaka
6729f4e9d5
Fix flag names for 'layer' and 'rays' filters (#243) 2021-02-05 18:15:05 -08:00
Tad Hardesty
75eb2df5f9 Order operators properly, add test to enforce this 2021-02-02 17:00:10 -08:00
ZeWaka
244509ce85
Add most 514 builtins support (#240)
Don't know if you want to put this based on a 514 branch or something, 
for full support. Here's the bulk of the work done for the builtins 
though.

- gradient()
- animate(space) // weird form
- rgb(space) // weird form
- rgb2num()
- filter(type="bloom")
- load_resource()
- splicetext()
- list.Splice()
- time2text()
- world.timezone
- client.timezone
- ||=
- &&=
- world.movement_mode + enums
- := walrus/assign-into/expression assign
- world.map_cpu
- particles/
- generator/
- embedded winget syntax // don't think we need to add anything
- mouse actions // don't think we need to add anything

note: uncovered http://www.byond.com/forum/post/2652280

Tested the produced executable:
![image](https://user-images.githubusercontent.com/4741640/106538107-8d2
58480-64b0-11eb-9d65-0020229647d7.png)
2021-02-02 16:59:11 -08:00
Tad Hardesty
591b404075 Show stdout/stderr of launched process in Debug Console 2021-01-21 20:42:36 -08:00
Tad Hardesty
8a07b193ae Set LD_LIBRARY_PATH in case of launching DreamDaemon 2021-01-21 20:09:22 -08:00
William Wallace
4ea806047c
Offload eval (disassemble/help commands) processing to auxtools (#238)
This requires an update to 
https://github.com/willox/auxtools/releases/tag/debug-v1.0.0. 

Basically, this'll let me add new debug console commands without having 
to touch SpacemanDMM. I'm gonna be adding some as I push my way through 
some DM bytecode related stuff so this'll save me a bunch of effort.

There's no new functionality here, it's still only `#help` and `#dis`.

The DLL is starting to get a bit big (it's still much smaller than a 
tiny example implementing maptick which for some reason comes out at 
2.5MB) so I'll try to get them smaller before making any new releases.
2021-01-21 20:09:15 -08:00
Tad Hardesty
809bdceb5f Add FALSE and TRUE as macros
Many other builtin global consts should also double as macros, but
documentation attributes will need to be supported for them.
2021-01-13 20:35:14 -08:00
Tad Hardesty
299f142b05 Add variable name to const-evaluation error 2021-01-13 20:33:36 -08:00
Tad Hardesty
a01f4116d6 Add first version of ref linking to dmdoc 2020-12-14 21:58:07 -08:00
Tad Hardesty
23270e6aeb Use manually specified hash in langserver go-to-def 2020-12-13 16:24:18 -08:00
Tad Hardesty
1dd4c21c4e Add dm_ref attributes to some builtins 2020-12-13 15:47:16 -08:00
Tad Hardesty
e35c23eefa Allow brace nesting in builtins table 2020-12-13 15:33:13 -08:00
Tad Hardesty
9f45b40eb1 Convert builtin attributes to .docs method calls 2020-12-13 14:19:54 -08:00
Tad Hardesty
a121ad1599 Change add_builtin_entry to add_builtin_type 2020-12-12 21:30:25 -08:00
Tad Hardesty
0ef0188cc5 Remove use of '?' from register_builtins
Reduces this function's code size from ~110KiB to ~30KiB.
2020-12-12 21:19:10 -08:00
Tad Hardesty
8501c960e6 Directly pass 'None' to add_builtin_var 2020-12-12 21:14:27 -08:00
Tad Hardesty
9221beb291 Add missing #[allow(unused_mut)] 2020-12-12 21:11:49 -08:00
Tad Hardesty
2614c453f0 Expand parsing capabilities of entries! proc macro 2020-12-12 20:28:16 -08:00
Tad Hardesty
d60e2161e5 Skip default-open 'code' node when calculating Toggle All 2020-12-12 14:42:14 -08:00
Tad Hardesty
bce6937a0d Fix warning when building in release mode 2020-12-10 20:19:02 -08:00
Tad Hardesty
395e1efe93 Fix auxtools bundle code 2020-12-10 20:18:52 -08:00
Tad Hardesty
b6cf638086 Stop giving fix hints which point to builtins 2020-12-10 20:03:30 -08:00
Tad Hardesty
a5857a9cd8 Allow configuring dmdoc module directories 2020-12-09 20:32:46 -08:00
Tad Hardesty
18c02d980e Add configuration option for dmdoc index file 2020-12-08 23:14:45 -08:00
William Wallace
00edac18cb
Add #dis, wait-for-configure, other tweaks to Auxtools (#233)
This fulfils some auxtool debugger requests you had.

1) All connection modes except for `BACKGROUND` wait for the DAP client 
   to be configured before continuing.
2) stddef.dm contents are sent to the debug client
3) disassemble eval command works (with the added benefit of being able 
   to disassemble procs that aren't currently running)

The updated auxtools also does some other stuff you wanted:

1) src/usr moved to arguments
2) your PR https://github.com/willox/auxtools/pull/11
3) arguments with no formal parameter in a proc that is being debugged 
   should show up
2020-12-08 22:34:18 -08:00
Tad Hardesty
86899bfd54 Add ref location notes to some builtins 2020-12-06 16:10:26 -08:00
Tad Hardesty
730ce571fd Use object instead of array in dmdoc tree view 2020-12-01 18:15:40 -08:00
Tad Hardesty
4a177c0919 Expand the first level of the Modules tree by default 2020-11-30 20:54:26 -08:00
Tad Hardesty
ab9c425569 Add a hanging indent and bottom padding to summary table headers 2020-11-30 20:47:53 -08:00
Tad Hardesty
1dc27b789a Add global vars to the module tree 2020-11-30 20:39:05 -08:00
Tad Hardesty
7c37211691 Add global procs to the modules tree 2020-11-30 20:34:53 -08:00
Tad Hardesty
ef78e8b8e3 Always add documented types to the modules tree 2020-11-30 20:19:20 -08:00
Tad Hardesty
ba5dde55df Handle duplicate variable names (Auxtools) 2020-11-27 17:44:13 -08:00
Tad Hardesty
c93661f3d1 Move Locals before Arguments in the scopes list (Auxtools) 2020-11-27 17:44:05 -08:00
William Wallace
2737e5d352
Add Auxtools debugging support (#230)
This adds support for a debug server written in auxtools (currently 
located at https://github.com/willox/auxtools).

The dependency is similar to extools, where SpacemanDMM's 
`auxtools_types.rs` has to be up-to-date with the `server_types.rs` 
file located in whichever version of debug server is used. In the 
future this could change to be some shared dependency, or maybe the 
debug server could just be moved into SpacemanDMM.

There's a bunch of repeated code in `mod.rs` where there's match 
statements where one branch is for the extools client and one branch is 
for auxtools client. It's a bit iffy, but they all have minor 
differences and wouldn't be super easy to merge.

I accidentally ran a `cargo fmt` on the files I was working with at 
some point, so there's a few formatting changes about. I don't think 
it's too much to read over.

I haven't edited any documentation yet, so here's how it works:
In your DM project:
```dm
// Currently needed for auxtools' error reporting. TG code already has this defined.
/proc/stack_trace(msg)
	CRASH(msg)

/proc/enable_debugging(mode, port)
	CRASH("auxtools not loaded")

/world/New()
	var/debug_server = world.GetConfig("env", "AUXTOOLS_DEBUG_DLL")
	if (debug_server)
		call(debug_server, "auxtools_init")()
		enable_debugging()
	. = ..()

/world/Del()
	var/debug_server = world.GetConfig("env", "AUXTOOLS_DEBUG_DLL")
	if (debug_server)
		call(debug_server, "auxtools_shutdown")()
	. = ..()
```

In your project's SpacemanDMM.toml
```toml
[debugger]
engine = "auxtools"
```

The extension doesn't have a way to override the DLL being used (and I 
don't think it should), so if you're testing stuff I suggest you set 
the env vars to something like below and use the attach mode:
```
AUXTOOLS_DEBUG_DLL=path_to_your_build
AUXTOOLS_DEBUG_MODE=BLOCK
```
2020-11-27 17:34:52 -08:00