Commit Graph

4216 Commits

Author SHA1 Message Date
Vurv
b0fa290438
Update material blacklist
* Remove `pp/copy` - Fixed in https://github.com/Facepunch/garrysmod-issues/issues/5157
* Add `debug/debugluxels` since it apparently crashes linux clients
2023-12-14 18:58:21 -08:00
Denneisk
8097737b48
Mitigate nil addition in EGP.umsg.End (#2934)
* Mitigate nil addition in EGP.umsg.End

* Don't broadcast on fail
2023-12-14 17:27:17 -05:00
Denneisk
8ab3bc17df
Fix wirelink issues (#2942)
* Fix wirelinks

- Add createWirelink
- Fixed validWirelink expected ent.extended

* Fix EGP wirelink

* Fix EGP HUD wirelink output
2023-12-14 14:55:47 -05:00
Sandalot
77e1423722
Add setClipboardText(s) (#2922)
* Add setClipboardText(s)

Add function to set clipboard text

* Moved setClipboardText(s) into debug

Moved setClipboardText(s) from its own extension to debug.

Also moved e2helper description to a more appropriate location

* Add setClipboardText limit convar and fixed error

Added a convar to limit the amount of characters the server is willing to send.

Made use of `#` operator

Limit check now returns nil

* Add setClipboardText cooldown

Added a cooldown convar and fixed limit test

* Correcting linting mistakes

* Removed print

 oops forgot to remove that

* Changed E2 helper description

Change to some less confusing

* Add setClipboardText toggle convar

* Change convar check to use boolean

minor nitpicks, I agree its nicer.

* Change clipboard access toggle from server side to client side

* Changed setClipboardText cooldown

Removed timer as suggested and added table to track when last called.

* Simplify

---------

Co-authored-by: Vurv <56230599+Vurv78@users.noreply.github.com>
2023-12-11 16:59:09 -05:00
Vurv
33d3fac257
Add quick fixes for E2 warnings and errors (#2871)
* Add quick fixes for warnings

* Support for multiple changes, Error fixes

* Support multiple replacements
* Quick fix support for Error, although none currently implemented.
* Add (Quick fix available) at the end of a problem instead of changing icon. It's more clear and works for errors too.

* Parser, Preprocessor, Tokenizer support

* Preprocessor rewritten to use traces instead of mostly columns
* Quick fixes to convert `normal` -> `number` for preprocessor
* Quick fixes to convert non CamelCase variables to camelCase in preprocessor
* Parser supports quick fixes now
* Add warning for use of `normal` type in parser (this should really be handled in analyzer, though..)
* Add quick fix for normal use in parser
* Tokenizer supports quick fixes now
* Added invalid escape quick fix (deletes the \)
2023-12-09 15:54:05 -08:00
Fasteroid
715f62a726
Improve compressed materials + (#2931)
* Up Gps, Sd, Cd materials to 256x256

* Target finder mat to 256x256

* Gyroscope mat to 256x256

* Use DTX1 for textures with 255 alpha

* delete unused

* hammy smart textures

* shrink single-color cheeze

* fix stupid cheeze ram

* increase quality for these two

+ move "polar cds" to its own branch

* fix cog

* fix neglected thrusteraddon textures

---------

Co-authored-by: Redox <mail@redox.to>
2023-12-09 03:43:58 -05:00
Denneisk
95adeb437e
Improve user-generated entity/wirelink outputs (#2891)
* Improve user-generated entity/wirelink outputs
- Add output remover
- Made adding entity and wirelink outputs more sensible
- Cleaned up port assignment to not give bad indices
- Removed using CreateWirelinkOutput when it's not necessary
- Removed E2 `entity:wirelink()` creates a wirelink output
- ??? other magic to make this work

* Move link removal to wire_adv
Refactored wire_adv netcode to use a single networkstring

* Small lints
2023-12-09 03:29:18 -05:00
Vurv
4edf127222
Speed up compiler slightly, Lua tests (#2923) 2023-12-06 19:00:13 -08:00
Vurv
8fa7912254 Fix log2
Fixes #2924
2023-12-04 15:00:26 -08:00
Vurv
c903981357 Mark index set as using variable
Resolves #2906
2023-12-03 17:28:16 -08:00
Denneisk
d23019bc32
Reintroduce bezier polyfill (#2920) 2023-12-01 13:00:46 -08:00
Redox
d562d60377
Compress materials (#2917)
* Compress materials

* Revert cog icon for toolgun
2023-11-30 21:51:34 -05:00
Vurv
a5ff4ba321
Rewrite number library (#2903)
* Rewrite number library

* Fixes, more tests

* Fix using incorrect arguments in functions
* Tag more functions as explicitly `number` parameters
* More test coverage
2023-11-27 16:03:01 -08:00
Aws0me
d8b8af94ab
Prevent entity gates from being used on players (#2908)
* prevent entity gates from being used on players

* move checks to isAllowed()
2023-11-27 18:23:32 -05:00
Denneisk
0643eabefa
Vector cleanups (#2895)
* Vector cleanup

* Fix indentation
2023-11-27 04:20:10 -05:00
Vurv
3764d10f6b
Add canary to readme (#2904)
Parity with wiki
2023-11-24 16:39:25 -08:00
Divran
0fa4d00f11
Update player.lua
fix variable spelling mistake
2023-11-23 15:46:51 +01:00
Vurv
ec7e2d266e
Change preprocessor duplicate error to warning (#2869)
* Change preprocessor duplicate error to warning

* Fix differing types oversight
2023-11-22 17:17:15 -08:00
Denneisk
6f2c24f50d
Fix constraintcore convars (#2892) 2023-11-22 14:14:55 -08:00
thegrb93
da9ef93c1e
fix lua error 2023-11-22 14:21:24 -05:00
Denneisk
f2f87c5e28
Prettify function tostring (#2870)
* Prettify function tostring

* E2Descriptions

* Change definition style

* Change

* Add function to table print
2023-11-22 00:24:25 -08:00
Vurv
ed5908d00e Better error message for dyncall without type 2023-11-21 16:08:03 -08:00
Denneisk
817e473394
Fix EGP would create objects on remove (#2879) 2023-11-20 17:44:11 -05:00
Denneisk
553aabfeee
Naive fix for TextLayout TopLeft (#2875) 2023-11-20 17:43:37 -05:00
Vurv
b5d10b97ea Fix #2883 2023-11-19 21:51:50 -08:00
Vurv
9add762165
Allow implicit function return types (#2866)
Resolves #2865
2023-11-18 22:00:42 -08:00
Vurv
2fdfd382a3 Don't reset variables in events inside @strict 2023-11-18 21:57:05 -08:00
Vurv
28be0186f8 Fix changed(a)
Fixes #2876
2023-11-18 00:26:38 -08:00
DerelictDrone
872272ce32
Address busses can now have offsets to read/writes (#2852)
* Address busses can now have offsets to read/writes

A feature previously only possible with the extended bus

* offset to internal offset, read/write to external offset

* Excessive parenthesis removed
2023-11-17 18:23:56 -05:00
Vurv
52f823f9a6
Blind fix of delta operators (#2863) 2023-11-16 18:44:27 -08:00
Vurv
6d40b57d00 Don't allow functions to be named function
They would be useless anyway since you can't call it.
2023-11-16 18:31:00 -08:00
Vurv
7ba37430da Fix #2864 2023-11-16 18:22:49 -08:00
Vurv
f63f88fcd0
Add tests for #2860 (#2861)
Should've included these in the commit
2023-11-16 12:55:06 -08:00
Denneisk
f5a97e1f28
Embed commit hash in Workshop uploads (#2859)
* Embed commit hash in Workshop uploads

* Typo

* Embed directly into wirelib

* Add newline

* Fix Canary
2023-11-16 12:40:42 -08:00
Vurv
c83ae32ad6 Fix vec4 and quaternion indexing
Fixes #2860
2023-11-16 12:39:32 -08:00
Vurv
84f1f54065
Improve E2 Constants (#2846)
* Better constants

* Update vector.lua
2023-11-15 13:59:07 -08:00
Vurv
3f565458fd Fix my reviews in #2856 2023-11-15 13:45:27 -08:00
Bryan Cardwell
ee352674bc
Add holoAng(n), holoPos(n) getters (#2856) 2023-11-15 15:30:28 -05:00
Smiggy
a87323318f
Add ctrl+backspace and fix ctrl+l (#2851) 2023-11-15 13:59:39 -05:00
Denneisk
4bdb050596
Make setname play nicely with E2 timers (#2845)
* Make the GC timer a tick below a second

* Remove SHORT_SECOND
2023-11-14 17:02:58 -05:00
Denneisk
e889b89f55
Fix EGP wedges (#2850)
* Fix wedges
I guess I just overlooked them

* Remove unused
2023-11-14 16:15:30 -05:00
Denneisk
1bcb2cf3fe
Update CanTopLeft for certain EGP Objects (#2844) 2023-11-12 18:43:44 -08:00
Vurv
e11064be7f Fix unused variable regression
Shouldn't be marking variables as used by assigning to them
2023-11-12 18:42:22 -08:00
Vurv
3522df956e
Add lambdas to E2 (#2829)
* Initial lambda implementation

* Add ops on creation

* New implementation

* Functions are now tables, containing parameter signature, return type and inner function
* function:getParameterTypes()
* function:getReturnType()
* Don't reset global variables on `@strict`, fixing issue with top level locals not working as upvalues since they'd be reset by the runtime. I don't think this would actually affect anyone since you shouldn't be able to use variables before they're assigned, but it's `@strict` only behavior anyway.

* Fix missing parity change

I'd already fixed this bug with functions that have return values but this was not fixed for functions without return values. Also added a test case for this.

* More tests, enforce returns at compile time

* Add tests to ensure variadic parameters, void parameters and implicit parameters aren't allowed

* Fix lambdas potentially not returning at all codepaths like functions now are expected to do. Added a test for that.

* Fix early returns

I should stop prematurely optimizing this.. This is like the third or second time I've made this mistake lol

* Fix highlighting

Actually a really easy fix. Surprising

* Fix merge regression
2023-11-12 16:16:38 -08:00
Vurv
a4e6c4f78d
Make functions a compile time construct on @strict (#2789)
* Don't allow overriding functions with `@strict`

* Add nested function warning

* Lower base op cost

5 ops on `@strict`, 8 without

* Remove extra 4 ops

* Add tests and fix methods
2023-11-12 15:43:09 -08:00
Denneisk
10731c43e3
Add selfaware functions for E2 extensions (#2823)
* Add selfaware functions for E2 extensions

* Optimize

* Lessons in futility
2023-11-11 21:11:53 -08:00
Denneisk
14d7d07f58
Fix bad parented poly position (#2838)
Mitigate globalpos error if object does not have angle
Add forgotten network string
2023-11-11 16:20:41 -05:00
Vurv
cec20c6a26
Add let keyword as an alternative to local (#2832) 2023-11-09 19:22:36 -08:00
Denneisk
5316d8b41c
Extend E2 Tokenizer String Escapes (#2754)
* Use ParseEscapes in Tokenizer

* Lints

* Store sequence before escaping

* Rewrite the thing

* Handle case for \u{\u{x}}
to parse as "\u{", "\u{x}" instead of "\u{\u{x}}" or "\u{", "\u{x}}"

* Cooler error handling

* Fix oversight in hex escapes

* lol. lmao

* Add tests

* Implement Vurv's toUnicodeChar implementation
Fix unicode escape could be less than 0
Harden unicode escapes against bad input strings
2023-11-09 17:08:03 -05:00
Vurv
04d275f25e
Revert new $ behavior, deprecate $ (#2794) 2023-11-09 14:01:19 -08:00