Commit graph

1929 commits

Author SHA1 Message Date
Tad Hardesty
213284aa51 Fix clippy::needless_late_init warning 2025-12-18 22:02:37 -08:00
Tad Hardesty
0db4298875 Add more #[rustfmt::skip]s 2025-12-18 21:22:18 -08:00
Tad Hardesty
1259ccd3a0 Apply most rustfmt suggestions 2025-12-18 21:22:18 -08:00
LemonInTheDark
70176ca27d
Implement compile time warning for datum[] (#397)
Lummox recently made this a RUNTIME error, but also irrespective of
that this tends to mask HELL vars[] security holes. We really should be
linting for it.

I had to implement operator overloading support for the builtin parser,
which was far more annoying then I expected. Bit scuffed, but it works.
(I am unsure of how to parse for "" though so I left that unimplemented)

This will likely throw errors on most codebases, I'm unsure of how to
handle that.
2025-12-18 16:32:08 -08:00
ZeWaka
660457818e
Fix parsing of alist for-k,v key type filtering (#447)
fix parsing of
```dm
var/alist/foo = list()
for (var/index as num, C in foo)
	world << index
```
currently `got ',', expected one of: '|', 'in', ')'`

also fixes two clippy warnings

ref: bottom of https://www.byond.com/docs/ref/#/proc/for/list
2025-12-18 16:04:08 -08:00
Krashly
ab4e94def1
Fix displace filter flags (#445)
The Displace filter has the ability to add an Overlay flag. It works
properly and as expected. Link to the Byond documentation:

https://www.byond.com/docs/ref/#/{notes}/filters/displace

> The optional FILTER_OVERLAY flag is supported for the flags argument,
> which will overlay the displaced image onto the original.
2025-12-17 22:57:10 -08:00
Tad Hardesty
b6125848e2 Add a missing integrity check for bundled DLLs 2025-10-30 00:36:13 -07:00
Tad Hardesty
b8bb72a543 Change default debug engine to Auxtools 2025-10-30 00:36:13 -07:00
Tad Hardesty
6087530e0d Move DAP and extools handler bodies outside the dispatch macro 2025-10-30 00:36:13 -07:00
Tad Hardesty
848352e671 Move LSP handler bodies outside the dispatch macro 2025-10-29 23:55:23 -07:00
Tad Hardesty
567e57b817 Move version, authors, edition into workspace Cargo.toml 2025-10-28 18:11:42 -07:00
Tad Hardesty
0290db5c75 Bump versions for suite 1.11 2025-08-30 14:47:12 -07:00
Tad Hardesty
1b930c0a80 Update foldhash and maud dependencies
Also run cargo update.
2025-08-30 13:22:23 -07:00
Tad Hardesty
38f570f04e Resolve 'hiding a lifetime' warnings from Rust 1.89 2025-08-18 23:43:52 -07:00
Tad Hardesty
873b75c9d5 Run cargo update 2025-08-18 23:35:14 -07:00
Tad Hardesty
63b34b6585 Typecheck fields on callee.proc 2025-08-18 23:35:00 -07:00
Tad Hardesty
98e69a4b4a Set /callee parent_type to none instead of /datum 2025-08-18 23:34:59 -07:00
Tad Hardesty
814f96a538 Fix missing completions for caller and callee vars 2025-08-18 23:34:59 -07:00
Zonespace
72ed2bce62
Fix alists not being marked as iterable (#442)
Trying to loop over values using `for(var/v in alist("a" = 2))` would
throw an "iterating over a /alist which cannot be iterated" error
despite working in DM.
2025-08-02 13:03:14 -07:00
ZeWaka
5fa2cbb4db
Fix missing pixloc vars (#441)
`undefined field: "x" on /pixloc`
`undefined field: "y" on /pixloc`
2025-07-31 22:04:18 -07:00
Tad Hardesty
8187b2e065 Identify as DM 516.1666 2025-07-31 19:53:03 -07:00
Tad Hardesty
b40d2176cd Use math instead of a loop when clipping sprites 2025-07-31 19:51:02 -07:00
Tad Hardesty
208c5bfac8 Run RenderPass::sprite_filter prior to sorting sprites 2025-07-31 19:51:02 -07:00
Tad Hardesty
3162794032 Rename subpath to ispath and allow no trailing slash 2025-07-31 19:50:39 -07:00
Tad Hardesty
7a1a990934 Remove unused category field on minimap::Sprite 2025-07-31 19:50:39 -07:00
Tad Hardesty
5c3ea44a99 Remove macro use-near-undef warning
This BYOND bug was fixed in 515.1607 in May 2023. It's no longer
necessary for SpacemanDMM to warn about it.

Fixes #423.
2025-07-22 23:13:34 -07:00
Joshua Kidder
442845ff48
Add a body_range field to ProcValue (#438)
I wasn't able to find a concise way to reference the range and/or
contents of proc bodies without also needing to reference the Annotation
tree. I haven't implemented any use case for the added information
outside of some experiments I'm doing with the deeper analysis
companion; I think it could be useful for determining return values and
types without the need for SpacemanDMM directives, at a later point.

It's an Option to account for built-ins not having any actual presence
in the syntax tree.
2025-07-22 23:11:21 -07:00
Anthony "Shifty Rail
936a5ee5a0
Add basic support for for (var/k, v in X) syntax (#431)
This adds a new arm to the parser for the `for (var/k, v in X)` 
dict-like syntax that was added in 516.

I have hijacked the arm that checks for this type of expressions : 

`for (init, test, inc)` or `for (init; test; inc)`

I have seperated it between `init; test; inc` (left untouched) and
`init, test, inc`.
If `inc` is not None, I then check if `test` in a `BinaryOp::In`
(something like `for(init, [x in y])`. If not I just assume it's a `for
(init, test)` which is valid DM syntax.

I then check if `init` is a `var/k` type of statement, using copypaste.
DM will not compile `for (k, v)` nor will it compile `for (var/k,
var/v)`. I check if v is an ident.

If we're all good, I create a new type of structure
`ForKeyValueStatement` and the lib.rs / findreferences.rs knows what to
do with it.

Both `for (i = 0, i < 10, i++)`, `for (i = 0, i < 10)` still pass.
2025-07-18 20:10:15 -07:00
Zonespace
e2c596a99b
Fix filter() not taking name as a kwarg (#436)
This fixes an issue where the "name" kwarg was erroring (see screenshot)
when filter() was called, despite being valid & correct DM.

![](https://github.com/user-attachments/assets/076f7048-d30f-4561-b768-9ac05f2d3b05)

Fixes #430.
2025-07-12 11:56:08 -07:00
Lucy
5a96f6bc22
Add support for call_ext(LoadedFunc) syntax (#433)
This adds support for 516's `call_ext(LoadedFunc)` syntax (allowing
either one or two args to `call_ext`).

The `call_ext_missing_arg` test is removed as a result, as `call_ext`
with a single arg is now valid syntax.
2025-06-26 21:32:53 -07:00
Tad Hardesty
8ef9761b8e Fix clippy lint about unnecessary boxing 2025-06-26 19:05:16 -07:00
Tad Hardesty
ed90d86e8f Run cargo clippy --fix 2025-06-26 19:05:16 -07:00
Tad Hardesty
56a699be34 Remove Dockerfile
It's slightly annoying to have to bump the Rust version here to keep it
working, and it rarely gets noticed when it's out of date anyways
because it isn't really used.
2025-06-26 19:04:34 -07:00
Drathek
7f2641466b
Lint for set SpacemanDMM_ statements that have no effect (#435)
Currently when a spaceman setting like `SHOULD_CALL_PARENT` comes after
some other statement other than possibly another setting, it is silently
ignored. This PR now errors in that situation. The checking is only
performed on spaceman settings and not built in settings (e.g.
`background`) because those can situationally be allowed in control
statements so long as they otherwise would be at the top of the proc,
but dreammaker will already warn for them if they would have no effect.

See below where red lined are the new lints, and yellow lined are the
existing dreammaker warnings.

![image](https://github.com/user-attachments/assets/4fe70a7f-819b-458a-9960-557b7c5bf6ab)
2025-06-23 00:14:56 -07:00
Lucy
68a0d9d5f8
Update git2 to 0.20.2 (#434)
This updates the `git2` crate to 0.20.2, as linking on Windows (except
win7) is broken in Rust 1.87+ due to
https://github.com/rust-lang/rust/pull/138233, which
https://github.com/rust-lang/git2-rs/pull/1143 fixed in `git2` 0.20.1.

I'd try to convert everything to gitoxide instead, but that's easier
said than done.
2025-06-18 21:52:55 -07:00
Tad Hardesty
c1101fb3ad Bump versions for suite 1.10 2025-05-11 22:48:05 -07:00
Lucy
a58420e0b7
Fix dreammaker.debugServerDll accepting empty strings (#428)
This makes it so blank strings are filtered out of
`dreammaker.debugServerDll` (and also `dreammaker.extoolsDLL`, but I
highly doubt that is still in use at all), so the config option being a
blank string will just be treated as if said config option were unset.
2025-05-01 15:06:02 -07:00
harry
d6bcdd50d1
Add <=>, update new(), stub bound_pixloc() (#425)
new() is updated for /alist, /vector, and /pixloc.

Co-authored-by: harryob <55142896+harryob@users.noreply.github.com>
2025-04-05 15:24:16 -07:00
harry
fcc814dfbd
Add 516 compatibility stubs + astype (#420)
we still need to do `for (k, v in list()/alist())` and `pragma syntax c`
but it'll do for now
2025-04-04 00:31:13 -07:00
Tad Hardesty
e447107f6c Update to auxtools debug server v2.3.5 2025-03-26 18:27:06 -07:00
Waterpig
4b77cd487d
Add pixel_w and pixel_z to image() (#424)
The image constructor accepts pixel_w and pixel_z as arguments. This is
not documented anywhere but seemingly works completely fine, as shown
below.

![image](https://github.com/user-attachments/assets/ea30e0bd-bf03-4092-86f6-77105818e332)

So I added it to lints
2025-03-17 20:06:30 -07:00
dependabot[bot]
039e8208c2
Bump ring from 0.17.8 to 0.17.13 (#422)
Bumps [ring](https://github.com/briansmith/ring) from 0.17.8 to 0.17.13.
- [Changelog](https://github.com/briansmith/ring/blob/main/RELEASES.md)
- [Commits](https://github.com/briansmith/ring/commits)

---
updated-dependencies:
- dependency-name: ring
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-03-07 17:24:09 -08:00
Tad Hardesty
18a5d84ba5 Update copyright years for 2025 2025-02-23 19:06:40 -08:00
Tad Hardesty
9fd698e2d6 Update to auxtools debug server v2.3.4 2025-02-23 14:36:22 -08:00
Tad Hardesty
fa715c9194 Allocate exact amount in read_ident 2025-01-11 15:11:58 -08:00
Tad Hardesty
76725c5681 Check for 'in' keyword directly, not by looping
Best case 4% speedup on lint example.
2025-01-11 15:08:18 -08:00
Tad Hardesty
c5e4b0b1e3 Simplify skipping of UTF-8 BOM 2025-01-11 15:04:19 -08:00
Tad Hardesty
db59a08003 Add LocationTracker::count_location helper 2025-01-11 14:01:20 -08:00
Tad Hardesty
b3eb12c128 Reduce allocation in FileList::get_path 2025-01-11 13:08:11 -08:00
Tad Hardesty
844ca6395a Run cargo update 2025-01-10 23:37:04 -08:00