From f1e9d071e6092e6f54430bff33996aa9692c1048 Mon Sep 17 00:00:00 2001 From: Astralcircle <142503363+Astralcircle@users.noreply.github.com> Date: Sun, 31 May 2026 20:09:59 +0300 Subject: [PATCH 1/9] Add more entity getters/setters --- .../gmod_wire_expression2/core/color.lua | 61 +++++++++++++- .../gmod_wire_expression2/core/entity.lua | 80 ++++++++++++++++++- .../gmod_wire_expression2/core/hologram.lua | 9 ++- 3 files changed, 143 insertions(+), 7 deletions(-) diff --git a/lua/entities/gmod_wire_expression2/core/color.lua b/lua/entities/gmod_wire_expression2/core/color.lua index 767ef96dbe..65e3d74bdc 100644 --- a/lua/entities/gmod_wire_expression2/core/color.lua +++ b/lua/entities/gmod_wire_expression2/core/color.lua @@ -84,6 +84,18 @@ e2function void entity:setAlpha(a) WireLib.SetColor(this, color) end +E2Lib.registerConstant("RENDERMODE_NORMAL", RENDERMODE_NORMAL) +E2Lib.registerConstant("RENDERMODE_TRANSCOLOR", RENDERMODE_TRANSCOLOR) +E2Lib.registerConstant("RENDERMODE_TRANSTEXTURE", RENDERMODE_TRANSTEXTURE) +E2Lib.registerConstant("RENDERMODE_GLOW", RENDERMODE_GLOW) +E2Lib.registerConstant("RENDERMODE_TRANSALPHA", RENDERMODE_TRANSALPHA) +E2Lib.registerConstant("RENDERMODE_TRANSADD", RENDERMODE_TRANSADD) +E2Lib.registerConstant("RENDERMODE_ENVIROMENTAL", RENDERMODE_ENVIROMENTAL) +E2Lib.registerConstant("RENDERMODE_TRANSADDFRAMEBLEND", RENDERMODE_TRANSADDFRAMEBLEND) +E2Lib.registerConstant("RENDERMODE_TRANSALPHADD", RENDERMODE_TRANSALPHADD) +E2Lib.registerConstant("RENDERMODE_WORLDGLOW", RENDERMODE_WORLDGLOW) +E2Lib.registerConstant("RENDERMODE_NONE", RENDERMODE_NONE) + e2function void entity:setRenderMode(mode) if not IsValid(this) then return self:throw("Invalid entity!", nil) end if not isOwner(self, this) then return self:throw("You do not own this entity!", nil) end @@ -93,6 +105,53 @@ e2function void entity:setRenderMode(mode) duplicator.StoreEntityModifier(this, "colour", { RenderMode = mode }) end +e2function number entity:getRenderMode() + if not IsValid(this) then return self:throw("Invalid entity!", 0) end + return this:GetRenderMode() +end + +E2Lib.registerConstant("RENDERFX_NONE", kRenderFxNone) +E2Lib.registerConstant("RENDERFX_PULSE_SLOW", kRenderFxPulseSlow) +E2Lib.registerConstant("RENDERFX_PULSE_FAST", kRenderFxPulseFast) +E2Lib.registerConstant("RENDERFX_PULSE_SLOW_WIDE", kRenderFxPulseSlowWide) +E2Lib.registerConstant("RENDERFX_PULSE_FAST_WIDE", kRenderFxPulseFastWide) +E2Lib.registerConstant("RENDERFX_FADE_SLOW", kRenderFxFadeSlow) +E2Lib.registerConstant("RENDERFX_FADE_FAST", kRenderFxFadeFast) +E2Lib.registerConstant("RENDERFX_SOLID_SLOW", kRenderFxSolidSlow) +E2Lib.registerConstant("RENDERFX_SOLID_FAST", kRenderFxSolidFast) +E2Lib.registerConstant("RENDERFX_STROBE_SLOW", kRenderFxStrobeSlow) +E2Lib.registerConstant("RENDERFX_STROBE_FAST", kRenderFxStrobeFast) +E2Lib.registerConstant("RENDERFX_STROBE_FASTER", kRenderFxStrobeFaster) +E2Lib.registerConstant("RENDERFX_FLICKER_SLOW", kRenderFxFlickerSlow) +E2Lib.registerConstant("RENDERFX_FLICKER_FAST", kRenderFxFlickerFast) +E2Lib.registerConstant("RENDERFX_NO_DISSIPATION", kRenderFxNoDissipation) +E2Lib.registerConstant("RENDERFX_DISTORT", kRenderFxDistort) +E2Lib.registerConstant("RENDERFX_HOLOGRAM", kRenderFxHologram) +E2Lib.registerConstant("RENDERFX_EXPLODE", kRenderFxExplode) +E2Lib.registerConstant("RENDERFX_GLOW_SHELL", kRenderFxGlowShell) +E2Lib.registerConstant("RENDERFX_CLAMP_MIN_SCALE", kRenderFxClampMinScale) +E2Lib.registerConstant("RENDERFX_ENV_RAIN", kRenderFxEnvRain) +E2Lib.registerConstant("RENDERFX_ENV_SNOW", kRenderFxEnvSnow) +E2Lib.registerConstant("RENDERFX_SPOTLIGHT", kRenderFxSpotlight) +E2Lib.registerConstant("RENDERFX_RAGDOLL", kRenderFxRagdoll) +E2Lib.registerConstant("RENDERFX_PULSE_FAST_WIDER", kRenderFxPulseFastWider) + +e2function void entity:setRenderFX(number fx) + if not IsValid(this) then return self:throw("Invalid entity!", nil) end + if not isOwner(self, this) then return self:throw("You do not own this entity!", nil) end + if this:IsPlayer() then return self:throw("You cannot set the RenderFX of a player!", nil) end + + fx = math.floor(fx) + if (fx < 0 or fx > 16) and fx ~= 24 then self:throw("Cannot use that RenderFX!", nil) end + + this:SetRenderFX(fx) +end + +e2function number entity:getRenderFX() + if not IsValid(this) then return self:throw("Invalid entity!", 0) end + return this:GetRenderFX() +end + e2function vector entity:getPlayerColor() if not IsValid(this) then return self:throw("Invalid entity!", Vector(0, 0, 0)) end if not this:IsPlayer() then return self:throw("Expected player but got an entity", Vector(0, 0, 0)) end @@ -124,7 +183,7 @@ e2function void entity:setPlayerColor(vector c) if not isOwner(self, this) then return self:throw("You cannot set other player's colors!", nil) end if not this:IsPlayer() then return self:throw("You cannot set the player color of non-players!", nil) end - local r, g, b = RGBClamp(c[1], c[2], c[3]) + local r, g, b = RGBClamp(c[1], c[2], c[3]) this:SetPlayerColor( Vector(r / 255, g / 255, b / 255) ) end diff --git a/lua/entities/gmod_wire_expression2/core/entity.lua b/lua/entities/gmod_wire_expression2/core/entity.lua index ed22863aa1..b474cde37f 100644 --- a/lua/entities/gmod_wire_expression2/core/entity.lua +++ b/lua/entities/gmod_wire_expression2/core/entity.lua @@ -77,6 +77,11 @@ e2function number entity:id() return this:EntIndex() end +e2function number entity:mapCreationID() + if not IsValid(this) then return self:throw("Invalid entity!", 0) end + return this:MapCreationID() +end + e2function number entity:creationID() if not IsValid(this) then return self:throw("Invalid entity!", 0) end return this:GetCreationID() @@ -231,6 +236,11 @@ e2function vector entity:velL() return this:WorldToLocal(this:GetVelocity() + this:GetPos()) end +e2function vector entity:getGroundSpeedVelocity() + if not IsValid(this) then return self:throw("Invalid entity!", Vector(0, 0, 0)) end + return this:GetGroundSpeedVelocity() +end + [nodiscard] e2function vector entity:velAtPoint(vector worldPosition) local physobj = this:GetPhysicsObject() @@ -525,6 +535,11 @@ e2function string entity:getMaterial() return this:GetMaterial() or "" end +e2function number entity:getMaterialType() + if not IsValid(this) then return self:throw("Invalid entity!", 0) end + return this:GetMaterialType() +end + e2function string entity:getSubMaterial(index) if not IsValid(this) then return self:throw("Invalid entity!", "") end return this:GetSubMaterial(index-1) or "" @@ -540,6 +555,11 @@ e2function number entity:getModelScale() return this:GetModelScale() end +e2function number entity:getMoveType() + if not IsValid(this) then return self:throw("Invalid entity!", -1) end + return this:GetMoveType() +end + __e2setcost(20) e2function array entity:getMaterials() @@ -666,6 +686,34 @@ e2function number entity:isPenetrating() if phys:IsPenetrating() then return 1 else return 0 end end +E2Lib.registerConstant("EF_BONEMERGE", EF_BONEMERGE) +E2Lib.registerConstant("EF_BONEMERGE_FASTCULL", EF_BONEMERGE_FASTCULL) +E2Lib.registerConstant("EF_BRIGHTLIGHT", EF_BRIGHTLIGHT) +E2Lib.registerConstant("EF_DIMLIGHT", EF_DIMLIGHT) +E2Lib.registerConstant("EF_NOINTERP", EF_NOINTERP) +E2Lib.registerConstant("EF_NOSHADOW", EF_NOSHADOW) +E2Lib.registerConstant("EF_NODRAW", EF_NODRAW) +E2Lib.registerConstant("EF_NORECEIVESHADOW", EF_NORECEIVESHADOW) +E2Lib.registerConstant("EF_ITEM_BLINK", EF_ITEM_BLINK) +E2Lib.registerConstant("EF_PARENT_ANIMATES", EF_PARENT_ANIMATES) +E2Lib.registerConstant("EF_FOLLOWBONE", EF_FOLLOWBONE) +E2Lib.registerConstant("EF_NOFLASHLIGHT", EF_NOFLASHLIGHT) + +e2function number entity:getEffects() + if not IsValid(this) then return self:throw("Invalid entity!", -1) end + return this:GetEffects() +end + +e2function number entity:getNoDraw() + if not IsValid(this) then return self:throw("Invalid entity!", 0) end + return this:GetNoDraw() and 1 or 0 +end + +e2function number entity:isEffectActive(effect) + if not IsValid(this) then return self:throw("Invalid entity!", 0) end + return this:IsEffectActive(effect) +end + --[[******************************************************************************]] __e2setcost(30) -- temporary @@ -1247,11 +1295,39 @@ e2function void entity:noCollideAll(number state) this:SetCollisionGroup(state == 0 and COLLISION_GROUP_NONE or COLLISION_GROUP_WORLD) end +__e2setcost(5) + +E2Lib.registerConstant("SOLID_NONE", SOLID_NONE) +E2Lib.registerConstant("SOLID_BSP", SOLID_BSP) +E2Lib.registerConstant("SOLID_BBOX", SOLID_BBOX) +E2Lib.registerConstant("SOLID_OBB", SOLID_OBB) +E2Lib.registerConstant("SOLID_OBB_YAW", SOLID_OBB_YAW) +E2Lib.registerConstant("SOLID_CUSTOM", SOLID_CUSTOM) +E2Lib.registerConstant("SOLID_VPHYSICS", SOLID_VPHYSICS) + +e2function number entity:getSolid() + if not IsValid(this) then return self:throw("Invalid entity!", -1) end + return this:GetSolid() +end + +e2function number entity:isSolid() + if not IsValid(this) then return self:throw("Invalid entity!", 0) end + return this:IsSolid() and 1 or 0 +end + +e2function number entity:getGravity() + if not IsValid(this) then return self:throw("Invalid entity!", -1) end + return this:GetGravity() +end + +e2function entity entity:getGroundEntity() + if not IsValid(this) then return self:throw("Invalid entity!", NULL) end + return this:GetGroundEntity() +end + --[[******************************************************************************]] -- Flexes -__e2setcost(5) - e2function array entity:getFlexBounds(number flex) if not IsValid(this) then return self:throw("Invalid entity!", {}) end return { this:GetFlexBounds(flex) } diff --git a/lua/entities/gmod_wire_expression2/core/hologram.lua b/lua/entities/gmod_wire_expression2/core/hologram.lua index 2711b6a285..ced13b8907 100644 --- a/lua/entities/gmod_wire_expression2/core/hologram.lua +++ b/lua/entities/gmod_wire_expression2/core/hologram.lua @@ -1163,13 +1163,14 @@ e2function void holoPlayerColor(index, vector color) set_player_color(Holo, Vector(r, g, b)) end -e2function void holoRenderFX(index, effect) +e2function void holoRenderFX(index, fx) local Holo = CheckIndex(self, index) if not Holo then return end - effect = effect - effect % 1 - if effect == 23 then return self:throw("Cannot use kRenderFxRagdoll renderfx!", nil) end - Holo.ent:SetKeyValue("renderfx",effect) + fx = math.floor(fx) + if (fx < 0 or fx > 16) and fx ~= 24 then self:throw("Cannot use that RenderFX!", nil) end + + Holo.ent:SetRenderFX(fx) end e2function void holoBodygroup(index, bgrp_id, bgrp_subid) From 2521f97b23fe221ad060a348a214cff4c94e9c35 Mon Sep 17 00:00:00 2001 From: Astralcircle <142503363+Astralcircle@users.noreply.github.com> Date: Sun, 31 May 2026 20:13:25 +0300 Subject: [PATCH 2/9] Return number --- lua/entities/gmod_wire_expression2/core/entity.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/entities/gmod_wire_expression2/core/entity.lua b/lua/entities/gmod_wire_expression2/core/entity.lua index b474cde37f..8fb626b3f4 100644 --- a/lua/entities/gmod_wire_expression2/core/entity.lua +++ b/lua/entities/gmod_wire_expression2/core/entity.lua @@ -711,7 +711,7 @@ end e2function number entity:isEffectActive(effect) if not IsValid(this) then return self:throw("Invalid entity!", 0) end - return this:IsEffectActive(effect) + return this:IsEffectActive(effect) and 1 or 0 end --[[******************************************************************************]] From 961f665ca4415b3cae3bcb69144b780bebd0bbac Mon Sep 17 00:00:00 2001 From: Astralcircle <142503363+Astralcircle@users.noreply.github.com> Date: Sun, 31 May 2026 20:35:35 +0300 Subject: [PATCH 3/9] Add docs + rename a bit --- lua/entities/gmod_wire_expression2/core/entity.lua | 2 +- lua/wire/client/e2descriptions.lua | 13 ++++++++++++- 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/lua/entities/gmod_wire_expression2/core/entity.lua b/lua/entities/gmod_wire_expression2/core/entity.lua index 8fb626b3f4..6ed762e88f 100644 --- a/lua/entities/gmod_wire_expression2/core/entity.lua +++ b/lua/entities/gmod_wire_expression2/core/entity.lua @@ -236,7 +236,7 @@ e2function vector entity:velL() return this:WorldToLocal(this:GetVelocity() + this:GetPos()) end -e2function vector entity:getGroundSpeedVelocity() +e2function vector entity:velGroundSpeed() if not IsValid(this) then return self:throw("Invalid entity!", Vector(0, 0, 0)) end return this:GetGroundSpeedVelocity() end diff --git a/lua/wire/client/e2descriptions.lua b/lua/wire/client/e2descriptions.lua index 39fb3f5fa5..197b5a6809 100644 --- a/lua/wire/client/e2descriptions.lua +++ b/lua/wire/client/e2descriptions.lua @@ -239,6 +239,7 @@ E2Helper.Descriptions["right(e:)"] = "Gets the right direction of the entity" E2Helper.Descriptions["up(e:)"] = "Gets the up direction of the entity" E2Helper.Descriptions["vel(e:)"] = "Gets the velocity of the entity" E2Helper.Descriptions["velL(e:)"] = "Gets the local velocity of the entity" +E2Helper.Descriptions["velGroundSpeed(e:)"] = "Gets the entity's ground speed velocity, which is based on the entity's walk/run speed and/or the ground speed of their sequence" E2Helper.Descriptions["velAtPoint(e:v)"] = "Gets the world velocity of a point in world coordinates attached to the entity" E2Helper.Descriptions["boxCenter(e:)"] = "Gets the center of the entity's bounding box, as a local position vector" E2Helper.Descriptions["boxMax(e:)"] = "Gets the maximum local XYZ of the entity's bounding box (the \"highest\" corner), as a local position vector" @@ -267,6 +268,8 @@ E2Helper.Descriptions["stress(e:)"] = "Gets the stress of the entity" E2Helper.Descriptions["frictionSnapshot(e:)"] = "Returns current friction events of the entity as a table of tables [https://wiki.facepunch.com/gmod/PhysObj:GetFrictionSnapshot]" E2Helper.Descriptions["mass(e:)"] = "Gets the mass of the entity" E2Helper.Descriptions["timeConnected(e:)"] = "Returns a players time connected to a server" +E2Helper.Descriptions["mapCreationID(e:)"] = "Returns the map creation id of the map entity, which is always the same between sessions." +E2Helper.Descriptions["creationID(e:)"] = "Returns the entity creation id, which always increments to 10 million and then resets to 0." E2Helper.Descriptions["creationTime(e:)"] = "Returns the time the entity was created on, relative to curtime." E2Helper.Descriptions["massCenter(e:)"] = "Gets the Center of Mass of the entity" E2Helper.Descriptions["massCenterL(e:)"] = "Gets the center of mass as a local vector" @@ -290,6 +293,9 @@ E2Helper.Descriptions["isRagdoll(e:)"] = "Is the entity a ragdoll?" E2Helper.Descriptions["isFrozen(e:)"] = "Is the entity frozen?" E2Helper.Descriptions["isAsleep(e:)"] = "Is the entity asleep?" E2Helper.Descriptions["isPenetrating(e:)"] = "Is the entity penetrating another entity?" +E2Helper.Descriptions["getEffects(e:)"] = "Returns a bit flag of all engine effect flags of an entity (_EF)" +E2Helper.Descriptions["getNoDraw(e:)"] = "Returns if the entity's rendering and transmitting has been disabled" +E2Helper.Descriptions["isEffectActive(e:)"] = "Returns whether an entity has engine effect applied or not (_EF)" E2Helper.Descriptions["isGravityEnabled(e:)"] = "Is gravity enabled for the entity?" E2Helper.Descriptions["isVehicle(e:)"] = "Is the entity a vehicle?" E2Helper.Descriptions["inVehicle(e:)"] = "Is the player in a vehicle?" @@ -1112,13 +1118,18 @@ E2Helper.Descriptions["setAlpha(e:n)"] = "Sets the alpha of an entity" E2Helper.Descriptions["getAlpha(e:)"] = "Returns the alpha of an entity" E2Helper.Descriptions["setMaterial(e:s)"] = "Sets the material of an entity" E2Helper.Descriptions["getMaterial(e:)"] = "Returns the material of an entity" +E2Helper.Descriptions["getMaterialType(e:)"] = "Returns the surface material type of an entity" E2Helper.Descriptions["getSubMaterial(e:n)"] = "Returns the sub-material of an entity" E2Helper.Descriptions["getModelRadius(e:)"] = "Returns the model radius of an entity" E2Helper.Descriptions["getModelScale(e:)"] = "Returns the model scale of an entity" +E2Helper.Descriptions["getMoveType(e:)"] = "Returns the movetype of an entity" E2Helper.Descriptions["setSkin(e:n)"] = "Sets the skin of an entity" E2Helper.Descriptions["getSkin(e:)"] = "Gets Es current skin number" E2Helper.Descriptions["getSkinCount(e:)"] = "Gets Es number of skins" -E2Helper.Descriptions["setRenderMode(e:n)"] = "Sets the render mode of the entity (0 = Normal, 1 = TransColor, 2 = TransTexture, 3 = Glow, 4 = TransAlpha, 5 = TransAdd, 6 = Enviromental, 7 = TransAddFrameBlend, 8 = TransAlphaAdd, 9 = WorldGlow, 10 = None)" +E2Helper.Descriptions["setRenderMode(e:n)"] = "Sets the render mode of the entity (_RENDERMODE)" +E2Helper.Descriptions["getRenderMode(e:)"] = "Returns the render mode of the entity (_RENDERMODE)" +E2Helper.Descriptions["setRenderFX(e:n)"] = "Sets the renderfx of the entity (_RENDERFX)" +E2Helper.Descriptions["getRenderFX(e:)"] = "Returns the renderfx of the entity (_RENDERFX)" E2Helper.Descriptions["getPlayerColor(e:)"] = "Returns the player's model color as a vector (R,G,B)" E2Helper.Descriptions["getWeaponColor(e:)"] = "Returns the player's weapon color as a vector (R,G,B)" E2Helper.Descriptions["hsl2rgb(v)"] = "Converts V from the HSL color space to the RGB color space" From 870202bd8b350f7fbaa50375ece6348e828ee577 Mon Sep 17 00:00:00 2001 From: Astralcircle <142503363+Astralcircle@users.noreply.github.com> Date: Wed, 3 Jun 2026 21:08:29 +0300 Subject: [PATCH 4/9] Add only usable constants --- lua/entities/gmod_wire_expression2/core/color.lua | 7 ------- 1 file changed, 7 deletions(-) diff --git a/lua/entities/gmod_wire_expression2/core/color.lua b/lua/entities/gmod_wire_expression2/core/color.lua index 65e3d74bdc..40af995240 100644 --- a/lua/entities/gmod_wire_expression2/core/color.lua +++ b/lua/entities/gmod_wire_expression2/core/color.lua @@ -127,13 +127,6 @@ E2Lib.registerConstant("RENDERFX_FLICKER_FAST", kRenderFxFlickerFast) E2Lib.registerConstant("RENDERFX_NO_DISSIPATION", kRenderFxNoDissipation) E2Lib.registerConstant("RENDERFX_DISTORT", kRenderFxDistort) E2Lib.registerConstant("RENDERFX_HOLOGRAM", kRenderFxHologram) -E2Lib.registerConstant("RENDERFX_EXPLODE", kRenderFxExplode) -E2Lib.registerConstant("RENDERFX_GLOW_SHELL", kRenderFxGlowShell) -E2Lib.registerConstant("RENDERFX_CLAMP_MIN_SCALE", kRenderFxClampMinScale) -E2Lib.registerConstant("RENDERFX_ENV_RAIN", kRenderFxEnvRain) -E2Lib.registerConstant("RENDERFX_ENV_SNOW", kRenderFxEnvSnow) -E2Lib.registerConstant("RENDERFX_SPOTLIGHT", kRenderFxSpotlight) -E2Lib.registerConstant("RENDERFX_RAGDOLL", kRenderFxRagdoll) E2Lib.registerConstant("RENDERFX_PULSE_FAST_WIDER", kRenderFxPulseFastWider) e2function void entity:setRenderFX(number fx) From bb5283e347f14645e908cec28b3b62b21c0e7641 Mon Sep 17 00:00:00 2001 From: Astralcircle <142503363+Astralcircle@users.noreply.github.com> Date: Wed, 3 Jun 2026 21:10:01 +0300 Subject: [PATCH 5/9] Duplicator support --- lua/entities/gmod_wire_expression2/core/color.lua | 1 + 1 file changed, 1 insertion(+) diff --git a/lua/entities/gmod_wire_expression2/core/color.lua b/lua/entities/gmod_wire_expression2/core/color.lua index 40af995240..ace1206614 100644 --- a/lua/entities/gmod_wire_expression2/core/color.lua +++ b/lua/entities/gmod_wire_expression2/core/color.lua @@ -138,6 +138,7 @@ e2function void entity:setRenderFX(number fx) if (fx < 0 or fx > 16) and fx ~= 24 then self:throw("Cannot use that RenderFX!", nil) end this:SetRenderFX(fx) + duplicator.StoreEntityModifier(this, "colour", { RenderFX = fx }) end e2function number entity:getRenderFX() From 11a773c7c552fa7387651c3053599d2c1eccc5d2 Mon Sep 17 00:00:00 2001 From: Astralcircle <142503363+Astralcircle@users.noreply.github.com> Date: Wed, 3 Jun 2026 21:12:45 +0300 Subject: [PATCH 6/9] Change some invalid returns to -1 + small desc changes --- lua/entities/gmod_wire_expression2/core/color.lua | 4 ++-- lua/entities/gmod_wire_expression2/core/entity.lua | 2 +- lua/wire/client/e2descriptions.lua | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/lua/entities/gmod_wire_expression2/core/color.lua b/lua/entities/gmod_wire_expression2/core/color.lua index ace1206614..1b9ad82f59 100644 --- a/lua/entities/gmod_wire_expression2/core/color.lua +++ b/lua/entities/gmod_wire_expression2/core/color.lua @@ -106,7 +106,7 @@ e2function void entity:setRenderMode(mode) end e2function number entity:getRenderMode() - if not IsValid(this) then return self:throw("Invalid entity!", 0) end + if not IsValid(this) then return self:throw("Invalid entity!", -1) end return this:GetRenderMode() end @@ -142,7 +142,7 @@ e2function void entity:setRenderFX(number fx) end e2function number entity:getRenderFX() - if not IsValid(this) then return self:throw("Invalid entity!", 0) end + if not IsValid(this) then return self:throw("Invalid entity!", -1) end return this:GetRenderFX() end diff --git a/lua/entities/gmod_wire_expression2/core/entity.lua b/lua/entities/gmod_wire_expression2/core/entity.lua index 6ed762e88f..0f62b16435 100644 --- a/lua/entities/gmod_wire_expression2/core/entity.lua +++ b/lua/entities/gmod_wire_expression2/core/entity.lua @@ -536,7 +536,7 @@ e2function string entity:getMaterial() end e2function number entity:getMaterialType() - if not IsValid(this) then return self:throw("Invalid entity!", 0) end + if not IsValid(this) then return self:throw("Invalid entity!", -1) end return this:GetMaterialType() end diff --git a/lua/wire/client/e2descriptions.lua b/lua/wire/client/e2descriptions.lua index 197b5a6809..3922f405d6 100644 --- a/lua/wire/client/e2descriptions.lua +++ b/lua/wire/client/e2descriptions.lua @@ -1371,7 +1371,7 @@ E2Helper.Descriptions["holoClipEnabled(nn)"] = "Enables / disables clipping for E2Helper.Descriptions["holoClipEnabled(nnn)"] = "Enables / disables clipping for a hologram with specified index. Clip index is for use with multiple clipping planes" E2Helper.Descriptions["holoClipsAvailable()"] = "Returns the maximum number of clipping planes allowed per hologram" E2Helper.Descriptions["holoInvertModel(nn)"] = "If not 0, inverts the model of the hologram" -E2Helper.Descriptions["holoRenderFX(nn)"] = "Changes the RenderFX for a hologram" +E2Helper.Descriptions["holoRenderFX(nn)"] = "Changes the RenderFX for a hologram (_RENDERFX)" E2Helper.Descriptions["holoSkin(nn)"] = "Changes the skin of a hologram" E2Helper.Descriptions["holoAnim(nsnn)"] = "Plays animation on the hologram specified by the index, the speed and starting point of which is determined by frame (ranging from 0 to 1) and rate (ranging from -12 to 12) values respectively" E2Helper.Descriptions["holoAnim(nnnn)"] = "Plays animation on the hologram specified by the index, the speed and starting point of which is determined by frame (ranging from 0 to 1) and rate (ranging from -12 to 12) values respectively" From 09a8eec1a62c1d4bbc169e29161abf1b46df4a4f Mon Sep 17 00:00:00 2001 From: Astralcircle <142503363+Astralcircle@users.noreply.github.com> Date: Wed, 3 Jun 2026 21:17:51 +0300 Subject: [PATCH 7/9] Missing descriptions --- lua/wire/client/e2descriptions.lua | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lua/wire/client/e2descriptions.lua b/lua/wire/client/e2descriptions.lua index 3922f405d6..07153471c1 100644 --- a/lua/wire/client/e2descriptions.lua +++ b/lua/wire/client/e2descriptions.lua @@ -296,7 +296,11 @@ E2Helper.Descriptions["isPenetrating(e:)"] = "Is the entity penetrating another E2Helper.Descriptions["getEffects(e:)"] = "Returns a bit flag of all engine effect flags of an entity (_EF)" E2Helper.Descriptions["getNoDraw(e:)"] = "Returns if the entity's rendering and transmitting has been disabled" E2Helper.Descriptions["isEffectActive(e:)"] = "Returns whether an entity has engine effect applied or not (_EF)" +E2Helper.Descriptions["getGravity(e:)"] = "Return the gravity multiplier of the entity" +E2Helper.Descriptions["getGroundEntity(e:)"] = "Returns the object the entity is standing on" +E2Helper.Descriptions["getSolid(e:)"] = "Returns solid type of an entity (_SOLID)" E2Helper.Descriptions["isGravityEnabled(e:)"] = "Is gravity enabled for the entity?" +E2Helper.Descriptions["isSolid(e:)"] = "Returns if the entity is solid or not. Very useful for determining if the entity is a trigger or not" E2Helper.Descriptions["isVehicle(e:)"] = "Is the entity a vehicle?" E2Helper.Descriptions["inVehicle(e:)"] = "Is the player in a vehicle?" E2Helper.Descriptions["isWorld(e:)"] = "Is the entity the world?" From d08b26733001cc599ec80f0125819496ac047b01 Mon Sep 17 00:00:00 2001 From: Astralcircle <142503363+Astralcircle@users.noreply.github.com> Date: Wed, 3 Jun 2026 21:19:52 +0300 Subject: [PATCH 8/9] Fix broken desc --- lua/wire/client/e2descriptions.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/wire/client/e2descriptions.lua b/lua/wire/client/e2descriptions.lua index 07153471c1..c0794cf209 100644 --- a/lua/wire/client/e2descriptions.lua +++ b/lua/wire/client/e2descriptions.lua @@ -295,7 +295,7 @@ E2Helper.Descriptions["isAsleep(e:)"] = "Is the entity asleep?" E2Helper.Descriptions["isPenetrating(e:)"] = "Is the entity penetrating another entity?" E2Helper.Descriptions["getEffects(e:)"] = "Returns a bit flag of all engine effect flags of an entity (_EF)" E2Helper.Descriptions["getNoDraw(e:)"] = "Returns if the entity's rendering and transmitting has been disabled" -E2Helper.Descriptions["isEffectActive(e:)"] = "Returns whether an entity has engine effect applied or not (_EF)" +E2Helper.Descriptions["isEffectActive(e:n)"] = "Returns whether an entity has engine effect applied or not (_EF)" E2Helper.Descriptions["getGravity(e:)"] = "Return the gravity multiplier of the entity" E2Helper.Descriptions["getGroundEntity(e:)"] = "Returns the object the entity is standing on" E2Helper.Descriptions["getSolid(e:)"] = "Returns solid type of an entity (_SOLID)" From 86421283d4a2edc2c2a15d14b8e6ea99662b55a2 Mon Sep 17 00:00:00 2001 From: Astralcircle <142503363+Astralcircle@users.noreply.github.com> Date: Wed, 3 Jun 2026 21:21:27 +0300 Subject: [PATCH 9/9] Missing returns --- lua/entities/gmod_wire_expression2/core/color.lua | 2 +- lua/entities/gmod_wire_expression2/core/hologram.lua | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lua/entities/gmod_wire_expression2/core/color.lua b/lua/entities/gmod_wire_expression2/core/color.lua index 1b9ad82f59..e3bfdb4164 100644 --- a/lua/entities/gmod_wire_expression2/core/color.lua +++ b/lua/entities/gmod_wire_expression2/core/color.lua @@ -135,7 +135,7 @@ e2function void entity:setRenderFX(number fx) if this:IsPlayer() then return self:throw("You cannot set the RenderFX of a player!", nil) end fx = math.floor(fx) - if (fx < 0 or fx > 16) and fx ~= 24 then self:throw("Cannot use that RenderFX!", nil) end + if (fx < 0 or fx > 16) and fx ~= 24 then return self:throw("Cannot use that RenderFX!", nil) end this:SetRenderFX(fx) duplicator.StoreEntityModifier(this, "colour", { RenderFX = fx }) diff --git a/lua/entities/gmod_wire_expression2/core/hologram.lua b/lua/entities/gmod_wire_expression2/core/hologram.lua index ced13b8907..4fb3219570 100644 --- a/lua/entities/gmod_wire_expression2/core/hologram.lua +++ b/lua/entities/gmod_wire_expression2/core/hologram.lua @@ -1168,7 +1168,7 @@ e2function void holoRenderFX(index, fx) if not Holo then return end fx = math.floor(fx) - if (fx < 0 or fx > 16) and fx ~= 24 then self:throw("Cannot use that RenderFX!", nil) end + if (fx < 0 or fx > 16) and fx ~= 24 then return self:throw("Cannot use that RenderFX!", nil) end Holo.ent:SetRenderFX(fx) end