Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added: Pull request for "fsensor" and "contrtrol" dedicated control theory OOP #75

Merged
merged 39 commits into from
Nov 18, 2019
Merged
Changes from 1 commit
Commits
Show all changes
39 commits
Select commit Hold shift + click to select a range
326cf63
Added: Pull request for "fsensor" and "contrtrol" dedicated control t…
dvdvideo1234 Aug 1, 2019
48c3786
Updated: Readme with related author information
dvdvideo1234 Aug 1, 2019
fa2a7a7
Direct-replace of wire related description
dvdvideo1234 Aug 2, 2019
b5e582a
Renamed: FSensor to FTracer
dvdvideo1234 Aug 6, 2019
c820dc3
Updated: CS E2 having dedicated logging options
dvdvideo1234 Aug 8, 2019
09b0fbe
Fixed: Convar description
dvdvideo1234 Aug 8, 2019
e1e96ec
Fixed: Description for controller dump
dvdvideo1234 Aug 8, 2019
f461bf8
Updated: Manipulation methods to match current internals
dvdvideo1234 Aug 9, 2019
9113292
Added: Sampling method overloading
dvdvideo1234 Aug 9, 2019
2d9b2d9
Fixed: Description typo
dvdvideo1234 Aug 9, 2019
367c078
Fixed: Flash traces assign operator having the old internal class type
dvdvideo1234 Aug 11, 2019
273b806
Removed: Is string function as its not used.
dvdvideo1234 Aug 12, 2019
5d59348
Removed: String check and string metatable as it is not used
dvdvideo1234 Aug 12, 2019
10c89d7
Removed: String metatable as it is not used.
dvdvideo1234 Aug 12, 2019
4e05af2
Removed: All collect garbages by request.
dvdvideo1234 Aug 12, 2019
89820cf
Updared: Wiki now corresponds to ftracer.
dvdvideo1234 Aug 15, 2019
e7736f4
Removed: As is not used anymore
dvdvideo1234 Aug 17, 2019
c802b91
Removed: Metatable is not used
dvdvideo1234 Aug 17, 2019
01380d3
Removed: `isHere`, `remValue`
dvdvideo1234 Sep 19, 2019
1007020
Removed: Count and limit tracking from tracers/controllers
dvdvideo1234 Sep 26, 2019
53a704f
Removed: Global storage of controllers/tracers
dvdvideo1234 Oct 2, 2019
9a097b6
Removed: Description for `xsc:remSelf()`
dvdvideo1234 Oct 2, 2019
79c1a24
If the Hit entry is removed, remove also the ID storage
dvdvideo1234 Oct 28, 2019
e03e602
Changed: Controllers and traces space to tab
dvdvideo1234 Oct 29, 2019
1885ad8
Added: Handler `remHitFilter` micro-optimization
dvdvideo1234 Oct 29, 2019
a8f4115
Factorized: fsensor:dumpItem(...)
dvdvideo1234 Oct 29, 2019
5cc96c7
Added: Convar for storing the default status output destination key
dvdvideo1234 Oct 29, 2019
9c1468d
Updated: `FTracer` to `FTrace` for consistency with `StControl` inste…
dvdvideo1234 Oct 29, 2019
e052645
Updated: Flash tracer instance creator being consistent with the cont…
dvdvideo1234 Oct 29, 2019
d00b530
Added: Tracer ray origin nudge
dvdvideo1234 Oct 30, 2019
b814469
Added: Missing overloading methods for `ftrace:getCopy`
dvdvideo1234 Oct 30, 2019
4f069fb
Added: Create a copy from dynamic sampling time controller
dvdvideo1234 Oct 31, 2019
4538cdf
Updated: E2 flash trace copy description
dvdvideo1234 Oct 31, 2019
d5fd455
Added: Flash tracer direction expansion and contraction
dvdvideo1234 Oct 31, 2019
682601d
Updated: Apply code-base to `vectorScale`
dvdvideo1234 Oct 31, 2019
eff556e
Fectorized `vectorMul` and `vectorDiv`
dvdvideo1234 Oct 31, 2019
45b24da
Removed: Variable for tracking max tracers count `varMaxTotal`
dvdvideo1234 Nov 5, 2019
feae592
Added: Comment borders to blocks of code
dvdvideo1234 Nov 6, 2019
3876cc0
Fixed: Raising error when the requested hit filter is invalid
dvdvideo1234 Nov 14, 2019
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Added: Convar for storing the default status output destination key
  • Loading branch information
dvdvideo1234 committed Oct 29, 2019
commit 5cc96c72c82a827cccf5ccf338a8ba3e6a9cf75e
10 changes: 8 additions & 2 deletions lua/entities/gmod_wire_expression2/core/custom/ftracer.lua
Original file line number Diff line number Diff line change
@@ -57,9 +57,10 @@ local varMethSkip = CreateConVar(gsVarPrefx.."_skip", gsZeroStr, gnServerControl
local varMethOnly = CreateConVar(gsVarPrefx.."_only", gsZeroStr, gnServerControled, "E2 FTracer entity method white list")
local varMaxTotal = CreateConVar(gsVarPrefx.."_max" , 30, gnServerControled, "FTracer items maximum count")
local varEnStatus = CreateConVar(gsVarPrefx.."_enst", 0, gnIndependentUsed, "Enables status output messages")
local gsVNS, gsVNO = varMethSkip:GetName(), varMethOnly:GetName()
local varDefPrint = CreateConVar(gsVarPrefx.."_dprn", "TALK", gnServerControled, "FTracer default status output")
local gsVNS, gsVNO, gsVDP = varMethSkip:GetName(), varMethOnly:GetName(), varDefPrint:GetName()
local gsFormLogs = "E2{%s}{%s}:ftracer: %s" -- Contains the logs format of the addon
local gsDefPrint = "TALK" -- Default print location
local gsDefPrint = varDefPrint:GetString() -- Default print location
local gtPrintName = {} -- Contains the print location specification
gtPrintName["NOTIFY" ] = HUD_PRINTNOTIFY
gtPrintName["CONSOLE"] = HUD_PRINTCONSOLE
@@ -110,6 +111,11 @@ cvars.AddChangeCallback(gsVNO, function(sVar, vOld, vNew)
gtMethList.ONLY = convArrayKeys(("/"):Explode(tostring(vNew or gsZeroStr)))
end, gsVNO.."_call")

cvars.RemoveChangeCallback(gsVDP, gsVDP.."_call")
cvars.AddChangeCallback(gsVDP, function(sVar, vOld, vNew)
local sK = tostring(vNew):upper(); if(gtPrintName[sK]) then gsDefPrint = sK end
end, gsVDP.."_call")

local function convDirLocal(oFTrc, vE, vA)
if(not oFTrc) then return {0,0,0} end
local oD, oE = oFTrc.mDir, (vE or oFTrc.mEnt)
9 changes: 8 additions & 1 deletion lua/entities/gmod_wire_expression2/core/custom/stcontrol.lua
Original file line number Diff line number Diff line change
@@ -41,14 +41,21 @@ local gsFormatPID = "(%s%s%s)" -- The general type format for the control power
local gtMissName = {"Xx", "X", "Nr"} -- This is a place holder for missing/default type
local gsVarPrefx = "wire_expression2_stcontrol" -- This is used for variable prefix
local varEnStatus = CreateConVar(gsVarPrefx.."_enst", 0, gnIndependentUsed, "Enables status output messages")
local gsDefPrint = "TALK" -- Default print location
local varDefPrint = CreateConVar(gsVarPrefx.."_dprn", "TALK", gnServerControled, "FTracer default status output")
local gsDefPrint = varDefPrint:GetString() -- Default print location
local gsFormLogs = "E2{%s}{%s}:stcontrol: %s" -- Contains the logs format of the addon
local gtPrintName = {} -- Contains the print location specification
gtPrintName["NOTIFY" ] = HUD_PRINTNOTIFY
gtPrintName["CONSOLE"] = HUD_PRINTCONSOLE
gtPrintName["TALK" ] = HUD_PRINTTALK
gtPrintName["CENTER" ] = HUD_PRINTCENTER

local gsVDP = varDefPrint:GetName()
cvars.RemoveChangeCallback(gsVDP, gsVDP.."_call")
cvars.AddChangeCallback(gsVDP, function(sVar, vOld, vNew)
local sK = tostring(vNew):upper(); if(gtPrintName[sK]) then gsDefPrint = sK end
end, gsVDP.."_call")

local function isValid(vE)
return (vE and vE:IsValid())
end