* Validate I/O in case addons pass incorrect values
* Make Zero a function to avoid mutating default value
* Remove redundant parenthesis
* Remove unused variable
* Better print function
* Add perf check in array toString
* Add hard serverside limit
* Tweak opcosts & Remove arg limit
Removed that 256 limit on number of arguments passed. I doubt anyone will go over it but that limit was pointless now that you can print more than 256 chars.
toString methods that are called now have their initial opcosts added upon being used inside print(...)
print(...) has base cost of 40 ops now.
* Add type check to array tostring
To avoid ugly unquoted string, and default angle/vector output
* Use %g for vec/ang repr
* Fix lints
Could pass nan into `times` and break prf.
Annoying. Probably want to make division by zero hard error your chip as to not deal with these possibilities.
* Add ignite and extinguish
* Fix lints
Removed unused variables and converted C comments to Lua ones.
* Fix wirelib lints
* Ignite forever by default
* Default overload use 360 seconds and maximum 100 hours
No server should be running that long anyway.
* Add stack limit of 150 to E2 executions
* Default to 0 and remove assignment in tick
Shouldn't need to reassign to 1 on tick.
Also should start at 0 since we check the limit after incrementing it.
* Add new functions and events to e2 weapons
* Added permission checks and cvars
* Add convar requiored to E2helper and check isFriend
* Fixed lint
* Change perm checks and add weapon/ammo checks
Added check to stripWeapon to throw a runtime error in case the weapon class is invalid.
Changed logic for permissions to AND, so you could be either a friend or have cppi perms rather than needing both to access the functions.
Added check to the ammo functions to ensure the ammo type is valid, or else throw a runtime error
self.entity.player -> self.player
Changed invalid weapon error message for giveWeapon functions
Fix checkGive using incorrect variable (this) instead of (target)
---------
Co-authored-by: Vurv <56230599+Vurv78@users.noreply.github.com>
* refactor: adjust cost of string functions
Removed "temporary" cost of 20 ops for some string functions which was pretty outrageous.
Reduce n:toChar, s:toByte costs to 1 op.
Reduce s:toNumber to 2 ops.
Reduce toUnicodeChar and toUnicodeByte to 3 ops.
Reduce base cost of non pattern s:explode to 3 ops
Reduce cost of s:reverse() to 6 ops
Reduce base cost of format() to 3 ops.
Make format() cost an additional 2 ops per argument.
Match functions cost 10 ops now. Gmatch 12. matchFirst is cheaper.
Raise cost of remaining unicode functions to 3 ops.
* fix: add base check to `toNumber`
Prevents a lua error.
* feat: add strict error on invalid character range for `toChar` and `toUnicodeChar`
* feat: runtime error instead of just printing to chat
Now `format`, `match*`, `find*`, `replaceRE` and `explodeRE` throw strict errors upon failing, instead of just printing their message in the chat.
* refactor!: remove chatprints in case of e2function error
Removed in favor of `@strict` runtime errors.
* refactor: convert operators to e2function syntax
* refactor: move vec/ang concat operators to respective files
* fix: incorrect arguments passed to format
* perf: localize string method calls
Localize functions used for better performance.
Also lower op cost of basic operations to 1 from 2.
* fix: error with using incorrect e2function vararg type
* style: enforce consistent casing
* refactor!: more expensive unicode functions
these functions were ridiculously cheap, no idea who thought giving a **single** op for running utf8.len on a thousand character long string was a good idea.
* 1 op per length of string in unicodeLength
* 3 ops per codepoint returned in toUnicodeByte
* 4 ops per argument passed to toUnicodeChar
* refactor: remove pointless optimization & comments
Unfortunately the developer hasn't been active for the past decade or so, and it's been causing a lot more harm than good recently.
Currently trying to plan a new chip to replace it.
* refactor this terribleness
like actually who wrote this
* add epic led model
* less redundant file-exists checks
* minor syntax error
* cursed model
* more leds!
* I'm a huge fan!
(add computer fan model)
* remove big LED
(this was way too large)
* inductor model :)
* pick one damn it
tabs OR spaces, NOT BOTH!
* unspaghetti this crap
data plug has been missing models for years!
* more antispaghetti shennanigans
* several things
add usb-c plug and socket
fix bugs from unspaghetti commit
plugs play confirmation sound when linked
* shared modelplug
* improve lua autorefresh compatibility
* finally remove redundant angle offset code
* SD card & socket
* microusb :)
* all lint fixes
* more lint fixes
* Workshop deployment via github actions
* Lua 5.4 `string.pack` implementation
Also fixed reference to wiremod/workshop-upload, since we don't have it on the github market. Need anticept to agree to some licensing thing
* Use new gmod-upload action
Includes the gma packer inside.
Much more minimal implementation from scratch that doesn't use docker, just a composite action running bash scripts.
* Add entityDamage event and `damage` type
* Fix lints
* getDamage -> getAmount
Also extended description to warn that the extension may support dealing damage in the future too.
* Add E2Helper descriptions