Commit Graph

4085 Commits

Author SHA1 Message Date
Grocel
e5257b030e
Removed @include "garrysmod.fgd" from wiremod.fgd (#3078)
It is not needed and actually interferes with loading order and can cause conflicts with other included fgd files.
2024-06-03 18:57:40 -04:00
LiddulBOFH
7d6a99d751
Change GetContraption meta function to something different (#3077)
Renamed from ENT:GetContraption() to ENT:GetCameraFilterEntities()

Fixes a conflict with Contraption Framework
- CFW adds a meta function to all entities, ENT:GetContraption, which returns the contraption an entity is a part of
- Prior to this PR, Wire Camera Controllers have a function of the same name that is called nowhere else within wire, and hopefully nowhere outside of wire either. This function serves as a way to get all of the entities part of a vehicle the camera pod is attached to, and then adds on whatever FilterEntities has.
2024-05-30 02:55:57 +00:00
Redox
6477912829
Properly pass the chip entity instead of the runtimecontext (#3076) 2024-05-23 17:13:25 +00:00
Denneisk
9b600edb6c
Make Wiremod use Canary version for load (#3074)
Remove UWSVN code
Change Wiremod version print to use fancy string
2024-05-22 17:06:48 -04:00
Bonyoze
bf89b48d9c
Change instances of Entity:Use to use the correct caller (#3069)
* Change caller of Wire User entity

* Change caller of Expression 2 entity:use()
2024-05-22 17:06:35 -04:00
Redox
22b28e7db7
Fix NULL error in wire_adv tool (#3075)
* Fix NULL error

* Use tab indentation

* Fix linter warning
2024-05-22 14:51:41 +00:00
Redox
e88e3179f0
Add Expression2Reloaded hook and use it to reload CPPI wrap (#3064)
* Add Expression2Reloaded hook and use it to reload CPPI wrap

* Use tabs
2024-05-16 23:26:50 +00:00
Redox
3ca8282589
Add option to disable GetOwner() check in E2 (#3061)
* Add option to disable GetOwner() check in E2

* Fix lint warnings

* Use tabs

* Undo left over code
2024-05-16 23:26:30 +00:00
Redox
39d00be60b
Fix teleporter error and use cvar object (#3065)
* Fix teleporter error and use ipairs

* Fix lint warn, use cvar object

* Unset key instead and use pairs

* Use tabs

* Style suggestion

Co-authored-by: Denneisk <20892685+Denneisk@users.noreply.github.com>

* Style suggestion

Co-authored-by: Denneisk <20892685+Denneisk@users.noreply.github.com>

* Style

* Fix indentation

---------

Co-authored-by: Denneisk <20892685+Denneisk@users.noreply.github.com>
2024-05-13 18:27:42 +00:00
Redox
4079111f68
Fix error when building RuntimeContext with invalid player (#3063)
* Fix E2Lib NULL error

* Apply suggestions
2024-05-13 04:35:05 +00:00
Redox
a32066ce90
Use placeholder for E2 search text (#3066)
* Fix searchbar error

* Remove unused functions

* Use non deprecated version of func for linter

* Style suggestion

Co-authored-by: Denneisk <20892685+Denneisk@users.noreply.github.com>

---------

Co-authored-by: Denneisk <20892685+Denneisk@users.noreply.github.com>
2024-05-13 04:31:28 +00:00
Redox
a6c72a01e1
Check if registered_events exists (#3062)
* Check if registered_events exists

* Use tabs
2024-05-13 03:20:17 +00:00
Denneisk
337214d938
Fix issues involving math.tau (#3054)
* Tau fallback value

* Change error to WireLib.Notify and add context

* Add antispam to WireLib.Notify on the client

* Change tau to use mathematically calculated always
1. It's defined like this in the math extension
2. Since I'm already going through the effort of reincluding its literal definition I may as well have it by default

* fix time calc

Co-authored-by: thegrb93 <grbrown93@sbcglobal.net>

---------

Co-authored-by: thegrb93 <grbrown93@sbcglobal.net>
2024-04-30 22:38:56 -04:00
Denneisk
6917a31eb9
Fix includes with errors in main file would lock the E2 editor (#3052) 2024-04-26 21:15:39 +00:00
Denneisk
8995594ec2
Move playerWasLookingAtMe to be a property of self (#3047) 2024-04-18 22:43:26 -04:00
Denneisk
92ecf2be54
Add detour to initialize beingLookedAtByLocalPlayer (#3046) 2024-04-17 18:42:02 -04:00
Denneisk
42a2ab18ef
Rewrite to EGPLib objectcontrol.lua (#3038)
* Refactor objectcontrol.lua
Rewrote EGPLib init
Moved EGP to a subtable of E2Lib(?)
Modified E2Lib init to merge any preexisting value

* Rename objectcontrol.lua to objects.lua

* Update API usage

* Somehow removed this by accident

* Fix improper function call

* Add missing `isAllowed` local

* Possibly insufficient check if error is legitimate

* Add nil checks

* Change EGP postinit handling
2024-04-15 17:42:12 -04:00
thecraftianman
bdb3ee6e48
Even more __index call reduction (#3012)
* Reduce E2 __index calls

* Update name usage

* Even more __index call reduction

* Quick linter complaint fix

* Variable cleanup

* Further caching

This also caches the lookup in base_wire_entity for being looked at because that seems to give a decent performance improvement.
2024-04-15 17:41:45 -04:00
Redox
9bf911c74d
Optimise wire holograms (#3041)
* Optimise wire holograms

* Use GetColor4Part

* Style

* Use tab indentation

* Use locals instead
2024-04-14 18:42:10 -04:00
Denneisk
10ecf90f5f
Fix removing and readding items in EGP (#3040)
* Fix global leak

* Fix removing items definitively hopefully
Reduce additional prf cost of removing (redundant??)

* Remove label
2024-04-14 22:37:49 +00:00
Denneisk
bc746679a6
Update WireLib.GetVersion (#3032)
Add WIREVERSION and WIREVESRION_STR E2 constants
2024-04-10 16:22:22 -04:00
thecraftianman
4178d2ee37
Pod controller refactoring (#3011)
* Pod controller refactoring

* Further cleanup

* Modify output caching method

This also removes a few other sources of __index calls in the Think method and moves the Team output to occur only once upon entering the pod.
2024-04-10 16:21:22 -04:00
Denneisk
4303f798f6
Fix Friends List would limit to 4 outputted friends (#3033)
* Inline Connected to avoid calling UpdateOutputs

* Fix logic
2024-04-10 16:20:59 -04:00
Denneisk
3179a4270b
Add fallback to use typename in debugger when no format defined (#3035)
* Add fallback to use typename in debugger when no format defined
Fixed bug with table cutting off a single character
Removed ranger debugger format (was just "ranger")

* Remove redundancy
2024-04-10 16:20:46 -04:00
Denneisk
bc614debe8
Add string compression functions (#3020)
* Add compression functions

* Add throw for invalid decompression

* Add size limit
2024-04-05 14:46:27 -04:00
Denneisk
b17217125e
Add tau (#3025) 2024-04-05 14:46:11 -04:00
Denneisk
ae63083e59
More miscellaneous EGP fixes (#3022)
* Harden against case where ret can be erroneously set to false

* Avoid EGP:CreateObject mutating original object

* Fix Poly contains/GetGlobalVertices functions
+ Minor optimizations

* Remove redundant egpobject getter function(???)

* Remove debug print

* Fix egp draw again
2024-04-05 18:37:03 +00:00
Grocel
c5bbf67de0
Fixed Wire Map Interfaces not working on new maps (#3028)
* Fixed Wire Map Interfaces not working on new maps

The way GMod handles Hammer input/outputs has been changed and no longer conflicts with Wiremod's self.Output. So we can remove the override workaround.

* Removed dead code and uneeded parentheses
2024-04-04 20:16:53 -04:00
Redox
d0c4bf5c28
Use setPos/setAng directly on the entity instead of phys (#3026)
* Use setPos/setAng directly on the entity instead of phys

* Use WireLib.setAng

* Use existing locals

* Fix linting issues
2024-04-04 22:25:20 +00:00
AshleyJamesy
26323969bb
Remove player restriction from entity:setSkin(number) (#2988)
* removed player restriction from entity:setSkin(number)

* remove unnecessary checks for setSkin
2024-04-03 04:33:46 +00:00
Redox
30518024dd
Fix RT Camera OnRemove detection (#3027)
* Fix OnRemove detection

* Fix trailing whitespace
2024-04-02 23:02:22 +00:00
thegrb93
c889b71c3c
Add regex check to gates and e2 find (#3023) 2024-03-30 14:01:06 -04:00
Denneisk
6d7f570479
Fix EGP Line SetPos and Poly Movement with 3D Tracker (#3021)
* Clamp poly and line position

* Fix line didn't nil check setpos
2024-03-26 13:18:40 -04:00
stepa2
60b23aa599
RT Camera fixes and improvements (#3019)
* Added FPS limiter to RT Cameras, refactored code a bit

* Changed RT Camera FPS limiter algorithm

* Actually made good RT Camera FPS limiter

* Changed ActiveCameras to be set-like array instead of set-like table.

* Fixed undefined behavior in RT Camera ENT:SetIsObserved

* Linter pass

* Removed debug print

* Fixed undefined behavior on `ObservedCameras` iteration

* Removed debug print *again*

* Removed unused `table.SeqCount` function
2024-03-26 13:18:20 -04:00
Smiggy
1c5f5a0cb0
Update vector2 to use e2function syntax (#3013)
* Update vector2

* Remove trailing whitespace
2024-03-07 00:30:22 +00:00
thecraftianman
3d61ee677e
Reduce E2 __index calls (#3006)
* Reduce E2 __index calls

* Update name usage
2024-02-29 23:57:15 -05:00
Denneisk
2eed1c1397
Remove "self" from ModelPlug_AddToCPanel (#3007) 2024-02-29 23:57:03 -05:00
Bonyoze
41612db244
Add more CPPI functions to WireLib and Expression 2 (#2985)
* add more wirelib CPPI functions

* add e2 cppi 'e:can*' functions

* fix entity:setEditProperty not lowercasing key
2024-02-24 14:02:51 -05:00
Fasteroid
bb6346949f
Faster wire rendering (#2955)
* remove: useless list referenced nowhere

* remove more stupid bloat

* cache funcs, move blink outside render func

* remove more pointless logic

* vector optimizations, fix scroll

* use rawequal instead

Revert "use rawequal instead"

This reverts commit 67a3a5d5fd9c26c775dfa98aa424e5023e76b50d.

Revert "Revert "use rawequal instead""

This reverts commit 5be50acf2fe22e7049a1cd514bd49c2a30c8e360.

* micro optimizations and slight code cleanup

* misc fixes

* don't use rawequal

GetPos and GetAngles return new objects every time they are called.

* File extension patches (#2996)

Fix error on destruct with nil streams
Fix client to server sending

* Fix model error (#2997)

* Clamp force. Fixes: #2994 (#3000)

* Cleanup and hopefully more optimal. Need to perf test

* fix

* whitespace

* Use improved struct

---------

Co-authored-by: Denneisk <20892685+Denneisk@users.noreply.github.com>
Co-authored-by: thegrb93 <grbrown93@sbcglobal.net>
2024-02-24 14:01:23 -05:00
thegrb93
93cd4f826b
Clamp force. Fixes: #2994 (#3000) 2024-02-12 15:17:30 -05:00
thegrb93
12186a3281
Fix model error (#2997) 2024-02-12 15:17:17 -05:00
Denneisk
4f2677a423
File extension patches (#2996)
Fix error on destruct with nil streams
Fix client to server sending
2024-02-10 23:34:12 +00:00
Denneisk
5cc3ad0f8b
Convert file extension to use netstream (#2991)
* Convert file extension to use netstream

* Fix bad ref

* Lint

* Remove redundant CRC

* Remove SP direct loading

* Increase file size limit

---------

Co-authored-by: thegrb93 <grbrown93@sbcglobal.net>
2024-02-07 19:04:06 -05:00
Fasteroid
687bc16e10
index should be incremented here (#2990) 2024-02-07 19:02:17 -05:00
Denneisk
f34152eb63
Fix getBone not working (#2984) 2024-01-29 00:57:15 +00:00
Redox
da33312808
Move spawnmenu icons (#2980) 2024-01-21 15:01:41 -05:00
Nexeonenn
aaeb1d7187
Global to local (#2982)
Fixed a bug with inability to pick up with physgun any objects after explosion.
2024-01-21 12:53:04 -05:00
thegrb93
16e6a84a37
Fix wheel take two (#2971)
* fix wheel take two

* Unneeded code
2024-01-16 17:58:22 -05:00
Denneisk
93bb7cc4e9
Add array:indexOf (#2939)
* Update array functions
Add array:indexOf

* Remove remainder of C nots

* Update description

* Change loop
2024-01-16 22:37:47 +00:00
DerelictDrone
842f5a1e40
Sanitize CD Disk dupe information (#2978)
* Sanitize CD Disk dupe information

* Update gmod_wire_cd_disk.lua

* Update gmod_wire_cd_disk.lua
2024-01-10 11:10:35 -05:00