Remove POA needles indexing (#57)

Fixed: All instances of `GetReport%`
Fixed: Angle being updated to POA instead of the point
Fixed: Attachment ID to return extracted model second
Fixed: Correct return value of `entity:trackasmlibApplyPhysical%` and bodygroup/skin
Fixed: Create index crashing for phys-properties
Fixed: Decode trying to index missing attachments
Fixed: Draw color method not being logged
Fixed: E2 comment typos
Fixed: Empty count not provided when using default list
Fixed: Export AR does not trigger dummy entity update
Fixed: Flip over remove errors during spawn and validation
Fixed: Ghost elevation not calculated correctly
Fixed: Ghost synchronization with `Deploy` and `Holster`
Fixed: Ghosting now utilizes
Fixed: Ghosts not being ignored by the duplication
Fixed: Hook info returning empty toolin some cases
Fixed: Localizing `select` lua function
Fixed: Log runtime error crashing SQL index creation
Fixed: Matching may fail in DB LUA mode when exporting DSV
Fixed: Memory manager fail on one navigation step
Fixed: Processing DSV generating table indexing  errors
Fixed: Timer attach and restart methods
Fixed: Track is not spawned due to incorrect empty value pickup class N/A
Fixed: Various runtime errors affecting `ExportTypeAR`
Fixed: Various runtime erros in SQL mode
Fixed: `LUA` mode not exporting internal value of track name
Fixed: `POA:Export` does not use `NULL`
Fixed: `POA:IsSame` inversed logic
Fixed: `trackasmlibGetOffset` not indexing properly
Added: Active tool validation in some hooks
Added: Addition class defaults to physics prop
Added: Attachment support for piece additions
Added: Cascade dynamic `GetVacant` as `GetEmpty`
Added: Centralized way of handling attachments
Added: Chinese translation
Added: Dedicated function for disabled strings
Added: Extra log for model `X` when processing its attachments
Added: Extra log on timer navigation fail
Added: General check for forced DB vacancy
Added: Ghost entity shared release
Added: Initial revision
Added: Input parameters when generating POA
Added: Library method `asmlib.GetReport` supporting vararg
Added: Log control client-side in TM button
Added: More conversion methods to POA
Added: Readme for factory reset via Gmod GUI
Added: Skip POA attachment indexing when index is not present
Added: Source model for errors importing POA
Added: Timer management button right-click
Added: Unified method for POA update
Added: Unified version for empty string defaulting with vararg
Added: Use library unpack method for normal angle
Optimized: POA indexing to 3 instead of 9 requests.
Changed: Locate index logging
Changed: `Record not located` to `Error missing`
Removed: the rest of concatenation and replace with `GetReport`
Removed: The usage of square root were not really needed
Removed: Time stamp
Removed: `POA:IsZero`
Removed: Dynamically initialized angle/vector/wire indexing nonsense
Removed: Internal format values for `GetReport`
Removed: Library function `GetEmpty` vararg count loop argument
Removed: Rest of `sub(1,1)` checks
Removed: Third argument of `getPieceOffset` wire not needed anymore
Removed: Usage of Depricated STRING:Implode(TABLE)
Removed: Usage of `oPly:GetNWBool(gsToolPrefL.."enghost")`
Removed: `ARRAY_DECODEPOA` not needed anymore
Removed: `SubVectorXYZ`, `AddVectorXYZ`, `AddVector` and `SubVector` are not needed anymore
Removed: `TOOL:Deploy` as it is not needed anymore
Renamed: Log searcher
Renamed: `POA:Decode` to `Export`
Renamed: `Source` to `Raw` data
Renamed: Some local variables
Renamed: `MakePOA` to `NewPOA`
Renamed: `Make~` to `New~`
Renamed: `POA:Table` to `POA:Array`
Replaced: Other log concatenations and printouts with `GetReport`
Replaced: Rest of "Make" with "New"
Updated: Method `POA:Set` to support tables
Updated: All library concatenation to `GetReport`
Updated: Bail out the luapad option when not installed
Updated: Database storage `CL/SV` to `LUA/SQL`
Updated: Export DB manual mapped to right click
Updated: General purpose export and AR
Updated: Input arguments for `GetAttachmentByID`
Updated: Method `POA:Decode` to support empty values
Updated: POA export method
Updated: Pieces trigger/export micro-optimization
Updated: Point parameterization is not mandatory
Updated: Post-processing to force remove routine
Updated: Return the current status of model validation
Updated: Store snapshot of the database
Updated: Use library quick sort instead of Lua one
Updated: Use vararg when updating POA
Updated: Utilize log `GetReport` when creating tables
Updated: Varargs info for `GetReport`
Utilize: library functions for type checks
Utilize: Vector `IsZero`
This commit is contained in:
Deyan Dobromirov 2024-07-11 23:22:25 +03:00 committed by GitHub
parent 1c80a3bb41
commit 96f8942d11
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
25 changed files with 7173 additions and 4421 deletions

View File

@ -22,7 +22,7 @@ if(first() || dupefinished())
# How fast it will scan the piece edge
Delta = 0.1
# Local oriantation vectors
# Local orientation vectors
F = vec(0,0,1)
U = vec(1,0,0)
C = vec(0,0,0)
@ -31,8 +31,8 @@ if(first() || dupefinished())
# Automatic stuff
runOnTick(1)
Stage = 0 # Must start from zero ( initialization stage )
PntCount = 0 # Howm many points are registered for avarage
StepDistant = 0 # The current distrance while scanning. Resets in every stage
PntCount = 0 # How many points are registered for average
StepDistant = 0 # The current distance while scanning. Resets in every stage
Scanner = entity()
holoCreate(1), holoColor(1,vec(255,0,0)), holoScale(1,0.1*vec(1,1,1)) holoModel(1,"cone")

View File

@ -102,13 +102,13 @@ if(first() || dupefinished())
Prop = "models/sprops/cuboids/height06/size_1/cube_6x6x6.mdl"
# Piece type that you are using. It is mandatory
# It is usually derived from the addon mame
# It is usually derived from the addon name
# that you are exporting
PieceType = "#"
# Piece name that you are using. This is actually
# how the track piece will be called in the TA panel
# Put a hastag to be autogenerated from the model on import
# Put a hashtag to be auto generated from the model on import
PieceName = "#"
# Point ID to be exported
@ -121,14 +121,14 @@ if(first() || dupefinished())
# What segment type are we processing
# road > Roads ( PHX roads )
# monorail > PHX monorail
# general > The two beam tracks segmentnts that we all love and joy
# general > The two beam tracks segments that we all love and joy
TypeSegment = "road"
# Set this to <>0 for direct Z local offset
# This us used to override the Z axis magntude
# This us used to override the Z axis magnitude
OverrideZ = 0
# What mode will the point be exportet as
# What mode will the point be exported as
InsertTypeDB = "INS"
# Outage % Defines how sensitive the algorithm is
@ -159,9 +159,9 @@ if(first() || dupefinished())
# The higher the power the less error algorithm has
TrackOriginTolerance = "e-12"
# Must be positive and slaller than two for the binery search to work
# Defines how far does the sensor origin goes back anfter it goes out of bounds
# The higher the mumber the long time it will take and will be more accurate
# Must be positive and smaller than two for the binary search to work
# Defines how far does the sensor origin goes back after it goes out of bounds
# The higher the number the long time it will take and will be more accurate
TrackJumpBackMultiplier = 1.7
# Automatic value adjustment
@ -304,7 +304,7 @@ if(Interval > 0)
}
}else{
holoPos(1,Cen) holoColor(1,vec(0,255,255))
# BEGIN Defintition formulas
# BEGIN Definition formulas
if(TypeSegment == "road"){
PRL = clampTrace(Cen - TrackOriginInset * F ,TrackPieceW,F,R,TrackRangerMaxW,3,4)
@ -338,7 +338,7 @@ if(Interval > 0)
if(MOrigin:length() > 0 && (MOrigin - O):length() > 1)
{
print(_HUD_PRINTTALK,"Tollerance error: "+toString((MOrigin - O):length()))
print(_HUD_PRINTTALK,"Tolerance error: "+toString((MOrigin - O):length()))
print(_HUD_PRINTTALK,"Extra side : "+toString(MExtraSide)+" > "+toString(TrackExtraSide))
print(_HUD_PRINTTALK,"Extra depth: "+toString(MExtraDepth)+" > "+toString(TrackExtraDepth))
print(_HUD_PRINTTALK,"Extra inset: "+toString(TrackOriginInset))

View File

@ -77,7 +77,7 @@ if(first() || dupefinished())
print("Skin OK<"+B+">")
}else{ error("Skin fail "+B) }
E1 = E:trackasmlibMakePiece(E:pos(), E:angles():rotateAroundAxis(E:up(), 90))
E2 = E:trackasmlibMakePiece(E:pos(), E:angles():rotateAroundAxis(E:forward(), 90), 666, "0/0", vec(50, 150, 250))
E2 = E:trackasmlibMakePiece(E:pos(), E:angles():rotateAroundAxis(E:forward(), -90), 666, "0/0", vec(250, 150, 50))
E1 = E:trackasmlibNewPiece(E:pos(), E:angles():rotateAroundAxis(E:up(), 90))
E2 = E:trackasmlibNewPiece(E:pos(), E:angles():rotateAroundAxis(E:forward(), 90), 666, "0/0", vec(50, 150, 250))
E2 = E:trackasmlibNewPiece(E:pos(), E:angles():rotateAroundAxis(E:forward(), -90), 666, "0/0", vec(250, 150, 50))
}

View File

@ -72,7 +72,7 @@ if(first() || dupefinished())
Chip = entity()
# Piece type that you are using. It is mandatory
# It is usually derived from the addon mame
# It is usually derived from the addon name
# that you are exporting
PieceType = "AlexCookie's 2ft Track Pack"
@ -80,14 +80,14 @@ if(first() || dupefinished())
PieceMode = "INS"
# What segment type are we processing
# road > Roads, like the PHX roads or Stephentechno
# road > Roads, like the PHX roads or Stephen techno
# monorail > Monorail track beams like PHX monorail
# general > The two beam tracks segmentnts that we all love and joy
# general > The two beam tracks segments that we all love and joy
TypeSegment = "general"
# Piece name that you are using. This is actually
# how the track piece will be called in the TA panel
# Put a hastag to be autogenerated from the model on import
# Put a hashtag to be auto generated from the model on import
PieceName = "#"
# Point ID to be exported
@ -95,7 +95,7 @@ if(first() || dupefinished())
# This is automatically managed by the point ID selected
# Set the coefficient before the sign() to adjust the process speed
# The fighed the number the less iteration are made
# The weighed the number the less iteration are made
DX = 0.4
DY = 0.4
@ -113,7 +113,7 @@ if(first() || dupefinished())
PieceF = 0
# If this entity is not traced the process will not start
# This is our track oiece that we are generating the point for
# This is our track piece that we are generating the point for
Ranger = rangerOffset(PieceD,Chip:pos(),-Chip:forward())
# Make sure that all the parameters are correct
@ -125,7 +125,7 @@ if(first() || dupefinished())
DX = abs(DX)
DY = abs(DY)
# Make sure we hit someting otherwise it has no point of doing this
# Make sure we hit something otherwise it has no point of doing this
RangerHit = Ranger:hit()
if(RangerHit)
{

View File

@ -78,31 +78,31 @@ if(first() || dupefinished())
PieceMode = "LUA"
# What segment type are we processing
# road > Roads, like the PHX roads or Stephentechno
# road > Roads, like the PHX roads or Stephen techno
# monorail > Monorail track beams like PHX monorail
# general > The two beam tracks segmentnts that we all love and joy
# general > The two beam tracks segments that we all love and joy
TypeSegment = "general"
# Piece type that you are using. It is mandatory
# It is usually derived from the addon mame
# It is usually derived from the addon name
# that you are exporting
PieceType = "#"
# Piece name that you are using. This is actually
# how the track piece will be called in the TA panel
# Put a hastag to be autogenerated from the model on import
# Put a hashtag to be auto generated from the model on import
PieceName = "#"
# Point ID to be exported
PointID = 1
# Use this Override Z with acustom number if
# Use this Override Z with custom number if
# Some of the tracks are compatible
OverZ = 13.04688
# This is automatically managed by the point ID selected
# Set the coefficient before the sign() to adjust the process speed
# The fighed the number the less iteration are made
# The weighed the number the less iteration are made
DX = 0.1
DY = 0.1
@ -160,10 +160,10 @@ if(first() || dupefinished())
ExpEn = 1
# If this entity is not traced the process will not start
# This is our track oiece that we are generating the point for
# This is our track piece that we are generating the point for
Rng = rangerOffset(PieceD,P,-F)
# Make sure we hit someting otherwise it has no point of doing this
# Make sure we hit something otherwise it has no point of doing this
RngHit = Rng:hit()
if(RngHit)
{

View File

@ -20,11 +20,11 @@ if(first() || dupefinished())
O = vec(0, -147, 1.007)
# Point location as local vector
P = vec(0,-8.5,1.25098)
# How much amgle to apply
# How much angle to apply
D = 45
########## Formula for the local arm vector roatated ##########
########## Formula for the local arm vector rotated ##########
V = (P - O):rotate(EA)
########## Automatic part ! ##########

View File

@ -1,8 +1,8 @@
# ExportDSV:(cl_@ADDITIONS) 27-12-18 21:29:45 [ LUA ]
# Data settings:(MODELBASE MODELADD ENTCLASS LINEID POSOFF ANGOFF MOVETYPE PHYSINIT DRSHADOW PHMOTION PHYSLEEP SETSOLID)
TRACKASSEMBLY_ADDITIONS models/shinji85/train/rail_r_switch.mdl "models/shinji85/train/sw_lever.mdl" "buttonswitch" 1 "-100,125,0" "NULL" -1 -1 -1 0 -1 -1
TRACKASSEMBLY_ADDITIONS models/shinji85/train/rail_r_switch.mdl "models/shinji85/train/rail_r_switcher1.mdl" "prop_dynamic" 2 "NULL" "NULL" 6 6 -1 -1 1 6
TRACKASSEMBLY_ADDITIONS models/shinji85/train/rail_r_switch.mdl "models/shinji85/train/rail_r_switcher2.mdl" "prop_dynamic" 3 "NULL" "NULL" 6 6 -1 0 -1 0
#1 ExportDSV:(cl_@ADDITIONS) 24-07-10 18:14:09 [ LUA ]
#2 ADDITIONS:(MODELBASE MODELADD ENTCLASS LINEID POSOFF ANGOFF MOVETYPE PHYSINIT DRSHADOW PHMOTION PHYSLEEP SETSOLID)
TRACKASSEMBLY_ADDITIONS models/shinji85/train/rail_l_switch.mdl "models/shinji85/train/sw_lever.mdl" "buttonswitch" 1 "-100,-125,0" "0,180,0" -1 -1 -1 0 -1 -1
TRACKASSEMBLY_ADDITIONS models/shinji85/train/rail_l_switch.mdl "models/shinji85/train/rail_l_switcher1.mdl" "prop_dynamic" 2 "NULL" "NULL" 6 6 -1 -1 1 6
TRACKASSEMBLY_ADDITIONS models/shinji85/train/rail_l_switch.mdl "models/shinji85/train/rail_l_switcher2.mdl" "prop_dynamic" 3 "NULL" "NULL" 6 6 -1 0 -1 0
TRACKASSEMBLY_ADDITIONS models/shinji85/train/rail_r_switch.mdl "models/shinji85/train/sw_lever.mdl" "buttonswitch" 1 "-100,125,0" "NULL" -1 -1 -1 0 -1 -1
TRACKASSEMBLY_ADDITIONS models/shinji85/train/rail_r_switch.mdl "models/shinji85/train/rail_r_switcher1.mdl" "prop_dynamic" 2 "NULL" "NULL" 6 6 -1 -1 1 6
TRACKASSEMBLY_ADDITIONS models/shinji85/train/rail_r_switch.mdl "models/shinji85/train/rail_r_switcher2.mdl" "prop_dynamic" 3 "NULL" "NULL" 6 6 -1 0 -1 0

View File

@ -0,0 +1,191 @@
# ExportCategory:(3@cl_) 24-07-10 18:14:09 [ LUA ]
[===[Portal 2 Walkway UG===function(m)
local g = m:gsub("models/props_underground/", "") return g:match("%w+") end]===]
[===[Ron's 2ft track pack===function(m)
local function conv(x) return " "..x:sub(2,2):upper() end
local r = m:gsub("models/ron/2ft/","")
local s, o, n = r:find("/")
local g = s and r:sub(1,s-1) or "other"
if(g == "luajunctions") then
o = {g}; local e
n = m:gsub("models/ron/2ft/luajunctions/","")
n = n:gsub("/junction.mdl",""):gsub("junctions/","junction_")
e = n:find("/"); n = e and n:sub(1,e-1) or n
elseif(g == "straight") then
n, o = r:sub(s+1,-1):gsub("straight_",""):gsub("%.mdl",""), {g}
elseif(g == "embankment") then
local e = r:sub(s+1,-1):gsub("embankment_","")
local s = e:find("%A")
n, o = e:gsub("%.mdl",""), {g,((s > 1) and (e:sub(1,s-1)) or nil)}
elseif(g == "ramps") then
n, o = r:sub(s+1,-1):gsub("ramp_",""):gsub("%.mdl",""), {g}
elseif(g == "tram") then
n, o = r:sub(s+1,-1):gsub("tram_",""):gsub("%.mdl",""), {g}
elseif(g == "turntable") then
n, o = r:sub(s+1,-1):gsub("turntable_",""):gsub("%.mdl",""), {g}
elseif(g == "viaduct") then
n, o = r:sub(s+1,-1):gsub("viaduct_",""):gsub("%.mdl",""), {g}
elseif(g == "road_crossings") then
n, o = r:sub(s+1,-1):gsub("road_",""):gsub("%.mdl",""), {g}
elseif(g == "curves") then
n, o = r:sub(s+1,-1):gsub("curve_",""):gsub("%.mdl",""), {g}
else o = {g} end; n = n and ("_"..n):gsub("_%w",conv):sub(2,-1)
for i = 1, #o do o[i] = ("_"..o[i]):gsub("_%w", conv):sub(2,-1) end; return o, n end]===]
[===[SligWolf's Minitrains===function(m)
local r = m:gsub("models/minitrains/",""):gsub("%W.+$","")
if(r == "sw") then r = "buffer" end; return r; end]===]
[===[Magnum's Rails===function(m)
local g = m:gsub("models/magtrains1ga/",""):gsub("/","_")
local r = g:match(".-_"):sub(1, -2); g = g:gsub(r.."_", "")
local t, n = g:match(".-_"), g:gsub("%.mdl","")
if(t) then t = t:sub(1, -2); g = g:gsub(r.."_", "")
if(r:find(t)) then n = n:gsub(t.."_", "") end
end; if(r:find("switchbase")) then r = "switch" end; return r, n end]===]
[===[Ron's G Scale Track pack===function(m)
local function conv(x) return " "..x:sub(2,2):upper() end
local r = m:gsub("models/ron/gscale/",""):gsub("_","/")
local s = r:find("/"); r = (s and r:sub(1,s-1):gsub("^%l", string.upper) or nil);
return r and {r} or nil end]===]
[===[Battleship's abandoned rails===function(m)
local g = m:gsub("models/craptrax/","")
local r = g:match(".+/"):sub(1, -2)
local n = g:match("[\\/]([^\\/]+)$"):gsub("%.mdl","")
if(r:find("straight")) then r = "straight"
elseif(r:find("curve")) then r = "curve"
elseif(r:find("switch")) then r = "switch" end
local t = n:match(r.."_")
if(t) then n = n:gsub(t,"") end; return r, n; end]===]
[===[Ron's Minitrain Props===function(m)
local g = m:gsub("models/ron/minitrains/","")
local r = g:match(".-/"):sub(1, -2)
if(r == "elevations") then
local s = g:gsub(r.."/", ""):gsub("/.+$", "")
local n = g:match("[\\/]([^/\\]+)$"):gsub("%.mdl","")
local p = n:match(".-_")
if(p) then p = p:sub(1, -2)
if(r:find(p)) then n = n:gsub(p, ""):sub(2,-1) end
end; return {r, s}, n; end; return r; end]===]
[===[RockMan's Fortification===function(m)
local r = m:gsub(".+/", ""):gsub("_.*",""); return r end]===]
[===[StevenTechno's Buildings 2.0===function(m)
local g = m:gsub("models/","")
local r = g:match(".+/"):sub(1, -2)
local n = g:match("[\\/]([^\\/]+)$"):gsub("%.mdl","")
local t = r:find("/")
if(t) then r, g = r:sub(1, t-1), r:sub(t+1, -1)
if(r:find("road")) then r = "roads"
elseif(r:find("building")) then r = "buildings" end
return {r, g}, n end; return r, n; end]===]
[===[Shinji85's Rails===function(m) local c
local r = m:gsub("models/shinji85/train/rail_", "")
if(r:find("cross")) then c = "crossing"
elseif(r:find("switch")) then c = "switch"
elseif(r:find("curve")) then c = "curve"
elseif(r:find("bumper")) then c = "bumper"
elseif(r:find("junction")) then c = "junction"
elseif(r:find("%dx")) then c = "straight" end; return c end]===]
[===[Bobster's two feet rails===function(m) local o = {}
local n = m:gsub("models/bobsters_trains/rails/2ft/","")
local r = n:match("^%a+"); n = n:gsub("%.mdl","")
for w in n:gmatch("%a+") do
if(r:find(w)) then n = n:gsub(w.."%W+", "") end
end table.insert(o, r); local f = n:match("^%a+")
if(f) then table.insert(o, f); n = n:gsub(f.."%W+", "") end; return o, n; end]===]
[===[PHX Tubes Miscellaneous===function(m)
local g = m:gsub("models/props_phx/construct/",""):gsub("/","_")
local r = g:match(".-_"):sub(1, -2); g = g:gsub(r.."_", "")
local t, n = g:match(".-_"), g:gsub("%.mdl","")
if(t) then t = t:sub(1, -2); g = g:gsub(r.."_", "")
if(r:find(t)) then n = n:gsub(t.."_", "") end
end; return r, n; end]===]
[===[SligWolf's Minihover===function(m)
local n = m:gsub("models/sligwolf/minihover/hover_","")
local r = n:match("%a+"); n = n:gsub("%.mdl",""); return r, n; end]===]
[===[PHX Tubes Plastic===function(m)
local g = m:gsub("models/hunter/",""):gsub("/","_")
local r = g:match(".-_"):sub(1, -2); return r end]===]
[===[SProps===function(m)
local r = m:gsub("models/sprops/trans/train/",""):gsub("track_",""):sub(1,1)
if(r == "s") then return "straight" elseif(r == "t") then return "turn"
elseif(r == "h") then return "ramp" else return nil end end]===]
[===[Portal 2 High Walkway===function(m)
local g = m:gsub("^.*walkway",""):gsub("%.mdl$", "")
if(g:find("%d")) then return "straight"
elseif(g:find("%a+_*")) then local s = g:match("%a+_*")
if(s:len() <= 2) then return "turns" else return "special" end
else return nil end end]===]
[===[Anyone's Horrible Trackpack===function(m) local c
local r = m:gsub("anytracks/", "")
if(r:find("straight")) then c = "straight"
elseif(r:find("curve")) then c = "curve"
elseif(r:find("%dx")) then c = "straight"
end; c = (c and c:gsub("^%l", string.upper) or nil) return c end]===]
[===[Trackmania United Props===function(m)
local g = m:gsub("models/nokillnando/trackmania/ground/", "")
local r = g:match(".+/"):sub(1,-2); return r; end]===]
[===[XQM Coaster===function(m)
local g = m:gsub("models/xqm/coastertrack/",""):gsub("%.mdl","")
local r = g:match(".-_"):sub(1,-2)
local n = g:gsub(r.."_", ""); return r, n; end]===]
[===[Joe's track pack===function(m)
local g = m:gsub("models/joe/jtp/","")
local r = g:match(".+/"):sub(1, -2)
local n = g:match("[\\/]([^\\/]+)$"):gsub("%.mdl","")
local t = r:find("/")
if(t) then return {r:sub(1, t-1), r:sub(t+1, -1)}, n end; return r, n; end]===]
[===[Transrapid===function(m)
local g = m:gsub("models/ron/maglev/",""):gsub("/","_")
g = g:gsub("[\\/]([^\\/]+)$",""):gsub("%.mdl","")
local r = g:match(".-_"):sub(1, -2)
if(r == "track") then g = g:gsub(r.."_", "")
r = g:match(".-_"):sub(1, -2) else return nil end
local t, n = g:match(".-_"), g:gsub(r.."_", "")
if(t) then t = t:sub(1, -2); g = g:gsub(t.."_", "")
if(r:find(t)) then n = n:gsub(t.."_", "") end
end; return r, n; end]===]
[===[SligWolf's White Rails===function(m)
local g = m:gsub("models/sligwolf/rails/",""):gsub("/","_")
local r = g:match(".-_"):sub(1, -2); g = g:gsub(r.."_", "")
local t, n = g:match(".-_"), g:gsub("%.mdl","")
if(t) then t = t:sub(1, -2); g = g:gsub(r.."_", "")
if(r:find(t)) then n = n:gsub(t.."_", "") end
end; return r, n; end]===]
[===[Mr.Train's G-Gauge===function(m)
local r = m:gsub("models/props/g_gauge/track/g_gauge_track_","")
local n = r:gsub("%.mdl",""); r = r:gsub("%W.+$","")
n = n:gsub(r.."_", ""); if(r == "s") then r = "curves" end; return r, n end]===]
[===[Modular Canals===function(m)
local n = m:gsub("models/props_d47_canals/interior_","")
local r = n:match("%a+"); n = n:gsub("%.mdl",""); return r, n; end]===]
[===[AlexCookie's 2ft track pack===function(m)
local g = m:gsub("models/alexcookie/2ft/","")
local r = g:match(".+/"):sub(1, -2)
local n = g:match("[\\/]([^\\/]+)$"):gsub("%.mdl","")
local t = n:match(r.."_"); if(t) then n = n:gsub(t,"") end; return r, n; end]===]
[===[XQM Ball Rails===function(m)
local g = m:gsub("models/xqm/rails/",""):gsub("/","_")
local r = g:match(".-_"):sub(1, -2); g = g:gsub(r.."_", "")
local t, n = g:match(".-_"), g:gsub("%.mdl","")
if(t) then t = t:sub(1, -2); g = g:gsub(r.."_", "")
if(r:find(t)) then n = n:gsub(t.."_", "")
end; end; return r, n; end]===]
[===[StevenTechno's Buildings 1.0===function(m)
local r = m:gsub("models/buildingspack/",""):gsub("%W.+$","")
if (r:find("emptylots")) then r = "empty_lots"
elseif(r:find("roadsdw")) then r = r:gsub("roadsdw","double_")
elseif(r:find("roadsw" )) then r = r:gsub("roadsw" ,"single_") end; return r; end]===]
[===[Mr.Train's M-Gauge===function(m)
local r = m:gsub("models/props/m_gauge/track/m_gauge_","")
local n = r:gsub("%.mdl", ""); r = r:gsub("%W.+$","")
if(tonumber(r:sub(1,1))) then r = "straight" else n = n:gsub(r.."_", "") end; return r, n; end]===]
[===[G Scale Track Pack===function(m)
local g = m:gsub("models/gscale/","")
local r = g:match(".-/"):sub(1, -2)
if (r == "j") then r = "j switcher"
elseif(r == "s") then r = "s switcher"
elseif(r == "c0512") then r = "curve 512"
elseif(r == "ibeam") then r = "iron beam"
elseif(r == "ramp313") then r = "ramp 313" end; return r; end]===]
[===[CAP Walkway===function(m)
local g = m:gsub("models/boba_fett/catwalk_build/", "")
local p = g:match("%w+_"); return (p and p:sub(1,-2) or "other") end]===]

View File

@ -1,5 +1,5 @@
# ExportDSV:(cl_@PHYSPROPERTIES) 27-12-18 21:29:45 [ LUA ]
# Data settings:(TYPE LINEID NAME)
#1 ExportDSV:(cl_@PHYSPROPERTIES) 24-07-10 18:14:09 [ LUA ]
#2 PHYSPROPERTIES:(TYPE LINEID NAME)
TRACKASSEMBLY_PHYSPROPERTIES "Special" 1 "default"
TRACKASSEMBLY_PHYSPROPERTIES "Special" 2 "default_silent"
TRACKASSEMBLY_PHYSPROPERTIES "Special" 3 "floatingstandable"

File diff suppressed because it is too large Load Diff

View File

@ -1,6 +1,6 @@
# ExportDSV:(sv_@ADDITIONS) 28-12-18 20:39:21 [ SQL ]
# Data settings:(MODELBASE MODELADD ENTCLASS LINEID POSOFF ANGOFF MOVETYPE PHYSINIT DRSHADOW PHMOTION PHYSLEEP SETSOLID)
# Query ran: <SELECT * FROM TRACKASSEMBLY_ADDITIONS ORDER BY MODELBASE ASC, LINEID ASC;>
#1 ExportDSV:(cl_@ADDITIONS) 24-07-10 21:29:26 [ SQL ]
#2 ADDITIONS:(MODELBASE MODELADD ENTCLASS LINEID POSOFF ANGOFF MOVETYPE PHYSINIT DRSHADOW PHMOTION PHYSLEEP SETSOLID)
#3 Query:<SELECT * FROM TRACKASSEMBLY_ADDITIONS ORDER BY MODELBASE ASC, LINEID ASC;>
TRACKASSEMBLY_ADDITIONS "models/shinji85/train/rail_l_switch.mdl" "models/shinji85/train/sw_lever.mdl" "buttonswitch" 1 "-100,-125,0" "0,180,0" -1 -1 -1 0 -1 -1
TRACKASSEMBLY_ADDITIONS "models/shinji85/train/rail_l_switch.mdl" "models/shinji85/train/rail_l_switcher1.mdl" "prop_dynamic" 2 "NULL" "NULL" 6 6 -1 -1 1 6
TRACKASSEMBLY_ADDITIONS "models/shinji85/train/rail_l_switch.mdl" "models/shinji85/train/rail_l_switcher2.mdl" "prop_dynamic" 3 "NULL" "NULL" 6 6 -1 0 -1 0

View File

@ -0,0 +1,191 @@
# ExportCategory:(3@cl_) 24-07-10 21:29:26 [ SQL ]
[===[Portal 2 Walkway UG===function(m)
local g = m:gsub("models/props_underground/", "") return g:match("%w+") end]===]
[===[Ron's 2ft track pack===function(m)
local function conv(x) return " "..x:sub(2,2):upper() end
local r = m:gsub("models/ron/2ft/","")
local s, o, n = r:find("/")
local g = s and r:sub(1,s-1) or "other"
if(g == "luajunctions") then
o = {g}; local e
n = m:gsub("models/ron/2ft/luajunctions/","")
n = n:gsub("/junction.mdl",""):gsub("junctions/","junction_")
e = n:find("/"); n = e and n:sub(1,e-1) or n
elseif(g == "straight") then
n, o = r:sub(s+1,-1):gsub("straight_",""):gsub("%.mdl",""), {g}
elseif(g == "embankment") then
local e = r:sub(s+1,-1):gsub("embankment_","")
local s = e:find("%A")
n, o = e:gsub("%.mdl",""), {g,((s > 1) and (e:sub(1,s-1)) or nil)}
elseif(g == "ramps") then
n, o = r:sub(s+1,-1):gsub("ramp_",""):gsub("%.mdl",""), {g}
elseif(g == "tram") then
n, o = r:sub(s+1,-1):gsub("tram_",""):gsub("%.mdl",""), {g}
elseif(g == "turntable") then
n, o = r:sub(s+1,-1):gsub("turntable_",""):gsub("%.mdl",""), {g}
elseif(g == "viaduct") then
n, o = r:sub(s+1,-1):gsub("viaduct_",""):gsub("%.mdl",""), {g}
elseif(g == "road_crossings") then
n, o = r:sub(s+1,-1):gsub("road_",""):gsub("%.mdl",""), {g}
elseif(g == "curves") then
n, o = r:sub(s+1,-1):gsub("curve_",""):gsub("%.mdl",""), {g}
else o = {g} end; n = n and ("_"..n):gsub("_%w",conv):sub(2,-1)
for i = 1, #o do o[i] = ("_"..o[i]):gsub("_%w", conv):sub(2,-1) end; return o, n end]===]
[===[SligWolf's Minitrains===function(m)
local r = m:gsub("models/minitrains/",""):gsub("%W.+$","")
if(r == "sw") then r = "buffer" end; return r; end]===]
[===[Magnum's Rails===function(m)
local g = m:gsub("models/magtrains1ga/",""):gsub("/","_")
local r = g:match(".-_"):sub(1, -2); g = g:gsub(r.."_", "")
local t, n = g:match(".-_"), g:gsub("%.mdl","")
if(t) then t = t:sub(1, -2); g = g:gsub(r.."_", "")
if(r:find(t)) then n = n:gsub(t.."_", "") end
end; if(r:find("switchbase")) then r = "switch" end; return r, n end]===]
[===[Ron's G Scale Track pack===function(m)
local function conv(x) return " "..x:sub(2,2):upper() end
local r = m:gsub("models/ron/gscale/",""):gsub("_","/")
local s = r:find("/"); r = (s and r:sub(1,s-1):gsub("^%l", string.upper) or nil);
return r and {r} or nil end]===]
[===[Battleship's abandoned rails===function(m)
local g = m:gsub("models/craptrax/","")
local r = g:match(".+/"):sub(1, -2)
local n = g:match("[\\/]([^\\/]+)$"):gsub("%.mdl","")
if(r:find("straight")) then r = "straight"
elseif(r:find("curve")) then r = "curve"
elseif(r:find("switch")) then r = "switch" end
local t = n:match(r.."_")
if(t) then n = n:gsub(t,"") end; return r, n; end]===]
[===[Ron's Minitrain Props===function(m)
local g = m:gsub("models/ron/minitrains/","")
local r = g:match(".-/"):sub(1, -2)
if(r == "elevations") then
local s = g:gsub(r.."/", ""):gsub("/.+$", "")
local n = g:match("[\\/]([^/\\]+)$"):gsub("%.mdl","")
local p = n:match(".-_")
if(p) then p = p:sub(1, -2)
if(r:find(p)) then n = n:gsub(p, ""):sub(2,-1) end
end; return {r, s}, n; end; return r; end]===]
[===[RockMan's Fortification===function(m)
local r = m:gsub(".+/", ""):gsub("_.*",""); return r end]===]
[===[StevenTechno's Buildings 2.0===function(m)
local g = m:gsub("models/","")
local r = g:match(".+/"):sub(1, -2)
local n = g:match("[\\/]([^\\/]+)$"):gsub("%.mdl","")
local t = r:find("/")
if(t) then r, g = r:sub(1, t-1), r:sub(t+1, -1)
if(r:find("road")) then r = "roads"
elseif(r:find("building")) then r = "buildings" end
return {r, g}, n end; return r, n; end]===]
[===[Shinji85's Rails===function(m) local c
local r = m:gsub("models/shinji85/train/rail_", "")
if(r:find("cross")) then c = "crossing"
elseif(r:find("switch")) then c = "switch"
elseif(r:find("curve")) then c = "curve"
elseif(r:find("bumper")) then c = "bumper"
elseif(r:find("junction")) then c = "junction"
elseif(r:find("%dx")) then c = "straight" end; return c end]===]
[===[Bobster's two feet rails===function(m) local o = {}
local n = m:gsub("models/bobsters_trains/rails/2ft/","")
local r = n:match("^%a+"); n = n:gsub("%.mdl","")
for w in n:gmatch("%a+") do
if(r:find(w)) then n = n:gsub(w.."%W+", "") end
end table.insert(o, r); local f = n:match("^%a+")
if(f) then table.insert(o, f); n = n:gsub(f.."%W+", "") end; return o, n; end]===]
[===[PHX Tubes Miscellaneous===function(m)
local g = m:gsub("models/props_phx/construct/",""):gsub("/","_")
local r = g:match(".-_"):sub(1, -2); g = g:gsub(r.."_", "")
local t, n = g:match(".-_"), g:gsub("%.mdl","")
if(t) then t = t:sub(1, -2); g = g:gsub(r.."_", "")
if(r:find(t)) then n = n:gsub(t.."_", "") end
end; return r, n; end]===]
[===[SligWolf's Minihover===function(m)
local n = m:gsub("models/sligwolf/minihover/hover_","")
local r = n:match("%a+"); n = n:gsub("%.mdl",""); return r, n; end]===]
[===[PHX Tubes Plastic===function(m)
local g = m:gsub("models/hunter/",""):gsub("/","_")
local r = g:match(".-_"):sub(1, -2); return r end]===]
[===[SProps===function(m)
local r = m:gsub("models/sprops/trans/train/",""):gsub("track_",""):sub(1,1)
if(r == "s") then return "straight" elseif(r == "t") then return "turn"
elseif(r == "h") then return "ramp" else return nil end end]===]
[===[Portal 2 High Walkway===function(m)
local g = m:gsub("^.*walkway",""):gsub("%.mdl$", "")
if(g:find("%d")) then return "straight"
elseif(g:find("%a+_*")) then local s = g:match("%a+_*")
if(s:len() <= 2) then return "turns" else return "special" end
else return nil end end]===]
[===[Anyone's Horrible Trackpack===function(m) local c
local r = m:gsub("anytracks/", "")
if(r:find("straight")) then c = "straight"
elseif(r:find("curve")) then c = "curve"
elseif(r:find("%dx")) then c = "straight"
end; c = (c and c:gsub("^%l", string.upper) or nil) return c end]===]
[===[Trackmania United Props===function(m)
local g = m:gsub("models/nokillnando/trackmania/ground/", "")
local r = g:match(".+/"):sub(1,-2); return r; end]===]
[===[XQM Coaster===function(m)
local g = m:gsub("models/xqm/coastertrack/",""):gsub("%.mdl","")
local r = g:match(".-_"):sub(1,-2)
local n = g:gsub(r.."_", ""); return r, n; end]===]
[===[Joe's track pack===function(m)
local g = m:gsub("models/joe/jtp/","")
local r = g:match(".+/"):sub(1, -2)
local n = g:match("[\\/]([^\\/]+)$"):gsub("%.mdl","")
local t = r:find("/")
if(t) then return {r:sub(1, t-1), r:sub(t+1, -1)}, n end; return r, n; end]===]
[===[Transrapid===function(m)
local g = m:gsub("models/ron/maglev/",""):gsub("/","_")
g = g:gsub("[\\/]([^\\/]+)$",""):gsub("%.mdl","")
local r = g:match(".-_"):sub(1, -2)
if(r == "track") then g = g:gsub(r.."_", "")
r = g:match(".-_"):sub(1, -2) else return nil end
local t, n = g:match(".-_"), g:gsub(r.."_", "")
if(t) then t = t:sub(1, -2); g = g:gsub(t.."_", "")
if(r:find(t)) then n = n:gsub(t.."_", "") end
end; return r, n; end]===]
[===[SligWolf's White Rails===function(m)
local g = m:gsub("models/sligwolf/rails/",""):gsub("/","_")
local r = g:match(".-_"):sub(1, -2); g = g:gsub(r.."_", "")
local t, n = g:match(".-_"), g:gsub("%.mdl","")
if(t) then t = t:sub(1, -2); g = g:gsub(r.."_", "")
if(r:find(t)) then n = n:gsub(t.."_", "") end
end; return r, n; end]===]
[===[Mr.Train's G-Gauge===function(m)
local r = m:gsub("models/props/g_gauge/track/g_gauge_track_","")
local n = r:gsub("%.mdl",""); r = r:gsub("%W.+$","")
n = n:gsub(r.."_", ""); if(r == "s") then r = "curves" end; return r, n end]===]
[===[Modular Canals===function(m)
local n = m:gsub("models/props_d47_canals/interior_","")
local r = n:match("%a+"); n = n:gsub("%.mdl",""); return r, n; end]===]
[===[AlexCookie's 2ft track pack===function(m)
local g = m:gsub("models/alexcookie/2ft/","")
local r = g:match(".+/"):sub(1, -2)
local n = g:match("[\\/]([^\\/]+)$"):gsub("%.mdl","")
local t = n:match(r.."_"); if(t) then n = n:gsub(t,"") end; return r, n; end]===]
[===[XQM Ball Rails===function(m)
local g = m:gsub("models/xqm/rails/",""):gsub("/","_")
local r = g:match(".-_"):sub(1, -2); g = g:gsub(r.."_", "")
local t, n = g:match(".-_"), g:gsub("%.mdl","")
if(t) then t = t:sub(1, -2); g = g:gsub(r.."_", "")
if(r:find(t)) then n = n:gsub(t.."_", "")
end; end; return r, n; end]===]
[===[StevenTechno's Buildings 1.0===function(m)
local r = m:gsub("models/buildingspack/",""):gsub("%W.+$","")
if (r:find("emptylots")) then r = "empty_lots"
elseif(r:find("roadsdw")) then r = r:gsub("roadsdw","double_")
elseif(r:find("roadsw" )) then r = r:gsub("roadsw" ,"single_") end; return r; end]===]
[===[Mr.Train's M-Gauge===function(m)
local r = m:gsub("models/props/m_gauge/track/m_gauge_","")
local n = r:gsub("%.mdl", ""); r = r:gsub("%W.+$","")
if(tonumber(r:sub(1,1))) then r = "straight" else n = n:gsub(r.."_", "") end; return r, n; end]===]
[===[G Scale Track Pack===function(m)
local g = m:gsub("models/gscale/","")
local r = g:match(".-/"):sub(1, -2)
if (r == "j") then r = "j switcher"
elseif(r == "s") then r = "s switcher"
elseif(r == "c0512") then r = "curve 512"
elseif(r == "ibeam") then r = "iron beam"
elseif(r == "ramp313") then r = "ramp 313" end; return r; end]===]
[===[CAP Walkway===function(m)
local g = m:gsub("models/boba_fett/catwalk_build/", "")
local p = g:match("%w+_"); return (p and p:sub(1,-2) or "other") end]===]

View File

@ -1,6 +1,6 @@
# ExportDSV:(sv_@PHYSPROPERTIES) 28-12-18 20:39:21 [ SQL ]
# Data settings:(TYPE LINEID NAME)
# Query ran: <SELECT * FROM TRACKASSEMBLY_PHYSPROPERTIES ORDER BY TYPE ASC, LINEID ASC;>
#1 ExportDSV:(cl_@PHYSPROPERTIES) 24-07-10 21:29:26 [ SQL ]
#2 PHYSPROPERTIES:(TYPE LINEID NAME)
#3 Query:<SELECT * FROM TRACKASSEMBLY_PHYSPROPERTIES ORDER BY TYPE ASC, LINEID ASC;>
TRACKASSEMBLY_PHYSPROPERTIES "Concrete" 1 "brick"
TRACKASSEMBLY_PHYSPROPERTIES "Concrete" 2 "concrete"
TRACKASSEMBLY_PHYSPROPERTIES "Concrete" 3 "concrete_block"

View File

@ -1,132 +0,0 @@
# ExportCategory:(3@cl_) 27-12-18 21:29:45 [ LUA ]
[===[StephenTechno's Buildings===function(m)
local function conv(x) return " "..x:sub(2,2):upper() end
local r = m:gsub("models/buildingspack/",""):gsub("_","/")
local s = r:find("/"); r = (s and r:sub(1,s-1) or "")
if (r:find("emptylots")) then r = "empty_lots"
elseif(r:find("roadsdw")) then r = r:gsub("roadsdw","double_")
elseif(r:find("roadsw" )) then r = r:gsub("roadsw" ,"single_") end
if(r == "") then return nil end; local o = {r}
for i = 1, #o do o[i] = ("_"..o[i]):gsub("_%w", conv):sub(2,-1) end; return o end]===]
[===[Magnum's Rails===function(m)
local function conv(x) return " "..x:sub(2,2):upper() end
local r = m:gsub("models/magtrains1ga/","")
local s = r:find("_"); r = (s and r:sub(1,s-1) or nil)
r = (r and (r:find("switchbase") and "switch" or r):gsub("^%l", string.upper) or nil)
return (r and {r} or nil) end]===]
[===[Ron's G Scale Track pack===function(m)
local function conv(x) return " "..x:sub(2,2):upper() end
local r = m:gsub("models/ron/gscale/",""):gsub("_","/")
local s = r:find("/"); r = (s and r:sub(1,s-1):gsub("^%l", string.upper) or nil);
return r and {r} or nil end]===]
[===[Battleship's abandoned rails===function(m)
local function conv(x) return " "..x:sub(2,2):upper() end
local r = m:gsub("models/craptrax/","")
local s = r:find("[^%a]"); r = s and r:sub(1,s-1) or nil
return {(r and ("_"..r):gsub("_%w",conv):sub(2,-1) or nil)} end]===]
[===[Ron's Minitrain Props===function(m)
local function conv(x) return " "..x:sub(2,2):upper() end
local r = m:gsub("models/ron/minitrains/","")
local s = r:find("/"); o = {s and r:sub(1,s-1) or "other"}
for i = 1, #o do o[i] = ("_"..o[i]):gsub("_%w", conv):sub(2,-1) end; return o end]===]
[===[Shinji85's Rails===function(m) local c
local r = m:gsub("models/shinji85/train/rail_", "")
if(r:find("cross")) then c = "crossing"
elseif(r:find("switch")) then c = "switch"
elseif(r:find("curve")) then c = "curve"
elseif(r:find("bumper")) then c = "bumper"
elseif(r:find("junction")) then c = "junction"
elseif(r:find("%dx")) then c = "straight"
end; c = (c and c:gsub("^%l", string.upper) or nil) return c end]===]
[===[Bobster's two feet rails===function(m)
local function conv(x) return " "..x:sub(2,2):upper() end
local r, o = m:gsub("models/bobsters_trains/rails/2ft/",""):gsub("_","/")
local s = r:find("/"); g = (s and r:sub(1,s-1) or "");
if(g == "") then return nil end
if(g == "straight") then
local r = r:sub(s+1,-1)
local e = r:find("/"); r = e and r:sub(1,e-1) or nil; o = {g,r}
elseif(g == "curves") then
local r = r:sub(s+1,-1); r = r:gsub("curve/","")
local e = r:find("/"); r = (not tonumber(r:sub(1,1))) and (e and r:sub(1,e-1) or nil) or nil; o = {g,r}
elseif(g == "switches") then
local r = r:sub(s+1,-1); r = r:gsub("switch/","")
local e = r:find("/"); r = e and r:sub(1,e-1) or nil; o = {g,r}
else o = {g} end
for i = 1, #o do o[i] = ("_"..o[i]):gsub("_%w", conv):sub(2,-1) end; return o end]===]
[===[PHX Tubes Miscellaneous===function(m)
local function conv(x) return " "..x:sub(2,2):upper() end
local r = m:gsub("models/props_phx/construct/",""):gsub("_","/")
local s = r:find("/"); o = {s and r:sub(1,s-1) or "other"}
for i = 1, #o do o[i] = ("_"..o[i]):gsub("_%w", conv):sub(2,-1) end; return o end]===]
[===[SligWolf's Minihover===function(m)
local function conv(x) return " "..x:sub(2,2):upper() end
local r = m:gsub("models/sligwolf/minihover/hover_","")
local v = r:gmatch("%a+")(); local o = {(v and v or "other")}
for i = 1, #o do o[i] = ("_"..o[i]):gsub("_%w", conv):sub(2,-1) end; return o end]===]
[===[PHX Tubes Plastic===function(m)
local function conv(x) return " "..x:sub(2,2):upper() end
local r = m:gsub("models/hunter/","")
local s = r:find("/"); o = {s and r:sub(1,s-1) or "other"}
for i = 1, #o do o[i] = ("_"..o[i]):gsub("_%w", conv):sub(2,-1) end; return o end]===]
[===[SProps===function(m)
local r = m:gsub("models/sprops/trans/train/",""):gsub("_","/")
if(r:find("track/")) then r = r:gsub("track/","") end;
local s = r:sub(1,1); if(s == "s") then return {"Straight"}
elseif(s == "t") then return {"Turn"}
elseif(s == "h") then return {"Ramp"} else return nil end end]===]
[===[XQM Coaster===function(m)
local function conv(x) return " "..x:sub(2,2):upper() end
local r = m:gsub("models/xqm/coastertrack/",""):gsub("_","/")
local s = r:find("/"); r = (s and r:sub(1,s-1):gsub("^%l", string.upper) or nil);
return r and {r} end]===]
[===[Transrapid===function(m)
local function conv(x) return " "..x:sub(2,2):upper() end
local r = m:gsub("models/ron/maglev/",""):gsub("[\\/]([^\\/]+)$","");
if(r:find("track")) then r = r:gsub("track/","")
elseif(r:find("support")) then r = nil end; return r and {("_"..r):gsub("_%w",conv):sub(2,-1)} end]===]
[===[SligWolf's White Rails===function(m)
local function conv(x) return " "..x:sub(2,2):upper() end
local r = m:gsub("models/sligwolf/rails/","")
local v = r:gmatch("%a+")(); local o = {(v and v or "other")}
for i = 1, #o do o[i] = ("_"..o[i]):gsub("_%w", conv):sub(2,-1) end; return o end]===]
[===[Mr.Train's M-Gauge===function(m)
local function conv(x) return " "..x:sub(2,2):upper() end
local r = m:gsub("models/props/m_gauge/track/m_gauge_",""):gsub("_","/")
local s = r:find("/"); r = tonumber(r:sub(1,1)) and "straight" or (s and r:sub(1,s-1) or "")
if(r == "") then return nil end; local o = {r}
for i = 1, #o do o[i] = ("_"..o[i]):gsub("_%w", conv):sub(2,-1) end; return o end]===]
[===[AlexCookie's 2ft track pack===function(m)
local function conv(x) return " "..x:sub(2,2):upper() end
local r = m:gsub("models/alexcookie/2ft/",""):gsub("[\\/]([^\\/]+)$","");
return {(r and ("_"..r):gsub("_%w",conv):sub(2,-1))} end]===]
[===[XQM Ball Rails===function(m)
local function conv(x) return " "..x:sub(2,2):upper() end
local r = m:gsub("models/xqm/rails/",""):gsub("_","/")
local s = r:find("/"); r = (s and r:sub(1,s-1):gsub("^%l", string.upper) or nil);
return r and {r} or nil end]===]
[===[Mr.Train's G-Gauge===function(m)
local function conv(x) return " "..x:sub(2,2):upper() end
local r = m:gsub("models/props/g_gauge/track/g_gauge_track_",""):gsub("%.mdl","")
local s = r:find("_")
local o, n = {(s and r:sub(1,s-1) or "other")}, r:sub(s+1,-1)
if(o[1] == "s") then o[1] = "curves" end
n = n and ("_"..n):gsub("_%w",conv):sub(2,-1) or nil
for i = 1, #o do o[i] = ("_"..o[i]):gsub("_%w", conv):sub(2,-1) end; return o, n end]===]
[===[SligWolf's Minitrains===function(m)
local function conv(x) return " "..x:sub(2,2):upper() end
local r = m:gsub("models/minitrains/",""):gsub("_","/")
local s = r:find("/") or r:find("%.");
r = (s and r:sub(1,s-1) or "other"); o = {r}
if(r == "sw") then o = {"buffer"} end;
for i = 1, #o do o[i] = ("_"..o[i]):gsub("_%w", conv):sub(2,-1) end; return o end]===]
[===[G Scale Track Pack===function(m)
local function conv(x) return " "..x:sub(2,2):upper() end
local r = m:gsub("models/gscale/","")
local s = r:find("/"); r = s and r:sub(1,s-1) or nil
if (r == "j") then r = "J-Switcher"
elseif(r == "s") then r = "S-Switcher"
elseif(r == "c0512") then r = "Curve 512"
elseif(r == "ibeam") then r = "Iron Beam"
elseif(r == "ramp313") then r = "Ramp 313"
else r = ("_"..r):gsub("_%w", conv):sub(2,-1) end return {r} end]===]

File diff suppressed because it is too large Load Diff

View File

@ -143,7 +143,7 @@ end
local gsMissDB = asmlib.GetOpVar("MISS_NOSQL")
local gsToolPF = asmlib.GetOpVar("TOOLNAME_PU")
local gsSymOff = asmlib.GetOpVar("OPSYM_DISABLE")
local gsModeDB = asmlib.GetOpVar("MODE_DATABASE")
local gsModeDB = asmlib.GetOpVar("MODE_DATABASE")
local gsFormPF = asmlib.GetOpVar("FORM_PREFIXDSV")
-- This is the path to your DSV
@ -217,7 +217,7 @@ myExportCategory(myCategory)
* {MODEL, TYPE, NAME, LINEID, POINT, ORIGIN, ANGLE, CLASS}
* MODEL > This string contains the path to your /*.mdl/ file. It is mandatory and
* taken in pairs with LINEID, it forms the unique identifier of every record.
* When used in /DSV/ mode ( like seen below ) is is used as a hash index.
* When used in /DSV/ mode ( like seen below ) it is used as a hash index.
* TYPE > This string is the name of the type your stuff will reside in the panel.
* Disabling this, makes it use the value of the /DEFAULT_TYPE/ variable.
* If it is empty uses the string /TYPE/, so make sure you fill this.
@ -228,17 +228,19 @@ myExportCategory(myCategory)
* a given model key. Disabling this, makes it use the the index of the current line.
* Use that to swap the active points around by only moving the desired row up or down.
* For the example table definition below, the line ID in the database will be the same.
* POINT > This is the local position vector that TA searches and selects the related
* ORIGIN for. An empty or disabled string is treated as taking the ORIGIN.
* Disabling this using the disable event makes it hidden when the active point is searched for
* POINT > This is the location vector that TA searches and selects the related ORIGIN for.
* An empty string is treated as taking the ORIGIN when assuming player traces can hit the origin
* Disabling via /#/ makes it take the ORIGIN. Used to disable a point but keep original data
* You can also fill it with attachment event /!/ followed by your attachment name.
* ORIGIN > This is the origin relative to which the next track piece position is calculated
* An empty string is treated as {0,0,0}. Disabling this also makes it use {0,0,0}
* An empty string is treated as {0,0,0}. Disabling via /#/ also makes it use {0,0,0}
* You can also fill it with attachment event /!/ followed by your attachment name. It's mandatory
* ANGLE > This is the angle relative to which the forward and up vectors are calculated.
* An empty string is treated as {0,0,0}. Disabling this also makes it use {0,0,0}
* An empty string is treated as {0,0,0}. Disabling via /#/ also makes it use {0,0,0}
* You can also fill it with attachment event /!/ followed by your attachment name. It's mandatory
* CLASS > This string is populated up when your entity class is not /prop_physics/ but something else
* used by ents.Create of the gmod ents API library. Keep this empty if your stuff is a normal prop.
* Disabling via /#/ makes it take the NULL value. In this case the model is spawned as a prop
]]--
local myPieces = {
["models/props_phx/construct/metal_plate1x2.mdl"] = { -- Here goes the model of your pack
@ -264,7 +266,7 @@ mySyncTable("PIECES", myPieces, true)
* It is mandatory and taken in pairs with LINEID, it forms the unique identifier of every record.
* When used in /DSV/ mode ( like seen below ) is is used as a hash index.
* MODELADD > This is the /*.mdl/ path of the addition entity. It is mandatory and cannot be disabled.
* ENTCLASS > This is the class of the addition entity. It is mandatory and cannot be disabled.
* ENTCLASS > This is the class of the addition entity. When disabled or missing it defaults to a normal prop.
* LINEID > This is the ID of the point that can be selected for building. They must be
* sequential and mandatory. If provided, the ID must the same as the row index under
* a given model key. Disabling this, makes it use the the index of the current line.

View File

@ -2,28 +2,28 @@
2 [21-03-12 17:30:09] SERVER > TRACKASSEMBLY [N/A] SettingsLogs: Success <SKIP@trackassembly/set/trackasmlib_slskip.txt>
3 [21-03-12 17:30:09] SERVER > TRACKASSEMBLY [N/A] SettingsLogs: Missing <ONLY@trackassembly/set/trackasmlib_slonly.txt>
4 [21-03-12 17:30:09] SERVER > TRACKASSEMBLY [N/A] GetBorder: Entry missing {string}|trackassembly_modedb|
5 [21-03-12 17:30:09] SERVER > TRACKASSEMBLY [N/A] MakeAsmConvar: Create {trackassembly_modedb}|LUA|nil|nil|
6 [21-03-12 17:30:09] SERVER > TRACKASSEMBLY [N/A] MakeAsmConvar: Create {trackassembly_devmode}|0|0|1|
7 [21-03-12 17:30:09] SERVER > TRACKASSEMBLY [N/A] MakeAsmConvar: Create {trackassembly_maxtrmarg}|0.02|0|1|
8 [21-03-12 17:30:09] SERVER > TRACKASSEMBLY [N/A] MakeAsmConvar: Create {trackassembly_maxmenupr}|5|0|10|
5 [21-03-12 17:30:09] SERVER > TRACKASSEMBLY [N/A] NewAsmConvar: Create {trackassembly_modedb}|LUA|nil|nil|
6 [21-03-12 17:30:09] SERVER > TRACKASSEMBLY [N/A] NewAsmConvar: Create {trackassembly_devmode}|0|0|1|
7 [21-03-12 17:30:09] SERVER > TRACKASSEMBLY [N/A] NewAsmConvar: Create {trackassembly_maxtrmarg}|0.02|0|1|
8 [21-03-12 17:30:09] SERVER > TRACKASSEMBLY [N/A] NewAsmConvar: Create {trackassembly_maxmenupr}|5|0|10|
9 [21-03-12 17:30:09] SERVER > TRACKASSEMBLY [N/A] GetBorder: Entry missing {string}|trackassembly_timermode|
10 [21-03-12 17:30:09] SERVER > TRACKASSEMBLY [N/A] MakeAsmConvar: Create {trackassembly_timermode}|CQT@1800@1@1/CQT@900@1@1/CQT@600@1@1|nil|nil|
11 [21-03-12 17:30:09] SERVER > TRACKASSEMBLY [N/A] MakeAsmConvar: Create {trackassembly_maxmass}|50000|1|100000|
12 [21-03-12 17:30:09] SERVER > TRACKASSEMBLY [N/A] MakeAsmConvar: Create {trackassembly_maxlinear}|5000|0|10000|
13 [21-03-12 17:30:09] SERVER > TRACKASSEMBLY [N/A] MakeAsmConvar: Create {trackassembly_maxforce}|100000|0|200000|
14 [21-03-12 17:30:09] SERVER > TRACKASSEMBLY [N/A] MakeAsmConvar: Create {trackassembly_maxactrad}|200|1|200|
15 [21-03-12 17:30:09] SERVER > TRACKASSEMBLY [N/A] MakeAsmConvar: Create {trackassembly_maxstcnt}|200|1|400|
16 [21-03-12 17:30:09] SERVER > TRACKASSEMBLY [N/A] MakeAsmConvar: Create {trackassembly_enwiremod}|1|0|1|
17 [21-03-12 17:30:09] SERVER > TRACKASSEMBLY [N/A] MakeAsmConvar: Create {trackassembly_enctxmenu}|1|0|1|
18 [21-03-12 17:30:09] SERVER > TRACKASSEMBLY [N/A] MakeAsmConvar: Create {trackassembly_enctxmall}|0|0|1|
19 [21-03-12 17:30:09] SERVER > TRACKASSEMBLY [N/A] MakeAsmConvar: Create {trackassembly_endsvlock}|0|0|1|
20 [21-03-12 17:30:09] SERVER > TRACKASSEMBLY [N/A] MakeAsmConvar: Create {trackassembly_curvefact}|0.5|0|1|
21 [21-03-12 17:30:09] SERVER > TRACKASSEMBLY [N/A] MakeAsmConvar: Create {trackassembly_curvsmple}|50|0|200|
22 [21-03-12 17:30:09] SERVER > TRACKASSEMBLY [N/A] MakeAsmConvar: Create {trackassembly_spawnrate}|1|1|10|
10 [21-03-12 17:30:09] SERVER > TRACKASSEMBLY [N/A] NewAsmConvar: Create {trackassembly_timermode}|CQT@1800@1@1/CQT@900@1@1/CQT@600@1@1|nil|nil|
11 [21-03-12 17:30:09] SERVER > TRACKASSEMBLY [N/A] NewAsmConvar: Create {trackassembly_maxmass}|50000|1|100000|
12 [21-03-12 17:30:09] SERVER > TRACKASSEMBLY [N/A] NewAsmConvar: Create {trackassembly_maxlinear}|5000|0|10000|
13 [21-03-12 17:30:09] SERVER > TRACKASSEMBLY [N/A] NewAsmConvar: Create {trackassembly_maxforce}|100000|0|200000|
14 [21-03-12 17:30:09] SERVER > TRACKASSEMBLY [N/A] NewAsmConvar: Create {trackassembly_maxactrad}|200|1|200|
15 [21-03-12 17:30:09] SERVER > TRACKASSEMBLY [N/A] NewAsmConvar: Create {trackassembly_maxstcnt}|200|1|400|
16 [21-03-12 17:30:09] SERVER > TRACKASSEMBLY [N/A] NewAsmConvar: Create {trackassembly_enwiremod}|1|0|1|
17 [21-03-12 17:30:09] SERVER > TRACKASSEMBLY [N/A] NewAsmConvar: Create {trackassembly_enctxmenu}|1|0|1|
18 [21-03-12 17:30:09] SERVER > TRACKASSEMBLY [N/A] NewAsmConvar: Create {trackassembly_enctxmall}|0|0|1|
19 [21-03-12 17:30:09] SERVER > TRACKASSEMBLY [N/A] NewAsmConvar: Create {trackassembly_endsvlock}|0|0|1|
20 [21-03-12 17:30:09] SERVER > TRACKASSEMBLY [N/A] NewAsmConvar: Create {trackassembly_curvefact}|0.5|0|1|
21 [21-03-12 17:30:09] SERVER > TRACKASSEMBLY [N/A] NewAsmConvar: Create {trackassembly_curvsmple}|50|0|200|
22 [21-03-12 17:30:09] SERVER > TRACKASSEMBLY [N/A] NewAsmConvar: Create {trackassembly_spawnrate}|1|1|10|
23 [21-03-12 17:30:09] SERVER > TRACKASSEMBLY [N/A] GetBorder: Entry missing {string}|trackassembly_bnderrmod|
24 [21-03-12 17:30:09] SERVER > TRACKASSEMBLY [N/A] MakeAsmConvar: Create {trackassembly_bnderrmod}|LOG|nil|nil|
25 [21-03-12 17:30:09] SERVER > TRACKASSEMBLY [N/A] MakeAsmConvar: Create {trackassembly_maxfruse}|50|1|100|
26 [21-03-12 17:30:09] SERVER > TRACKASSEMBLY [N/A] MakeAsmConvar: Create {sbox_maxasmtracks}|1500|0|3000|
24 [21-03-12 17:30:09] SERVER > TRACKASSEMBLY [N/A] NewAsmConvar: Create {trackassembly_bnderrmod}|LOG|nil|nil|
25 [21-03-12 17:30:09] SERVER > TRACKASSEMBLY [N/A] NewAsmConvar: Create {trackassembly_maxfruse}|50|1|100|
26 [21-03-12 17:30:09] SERVER > TRACKASSEMBLY [N/A] NewAsmConvar: Create {sbox_maxasmtracks}|1500|0|3000|
27 [21-03-12 17:30:09] SERVER > TRACKASSEMBLY [LUA] GetContainer: Registered {string}|COLORS_LIST|
28 [21-03-12 17:30:09] SERVER > TRACKASSEMBLY [LUA] GetContainer: Registered {string}|LIST_VGUI|
29 [21-03-12 17:30:09] SERVER > TRACKASSEMBLY [LUA] GetContainer: Registered {string}|WORK_MODE|
@ -150,28 +150,28 @@
2 [21-03-12 17:34:22] SERVER > TRACKASSEMBLY [N/A] SettingsLogs: Success <SKIP@trackassembly/set/trackasmlib_slskip.txt>
3 [21-03-12 17:34:22] SERVER > TRACKASSEMBLY [N/A] SettingsLogs: Missing <ONLY@trackassembly/set/trackasmlib_slonly.txt>
4 [21-03-12 17:34:23] SERVER > TRACKASSEMBLY [N/A] GetBorder: Entry missing {string}|trackassembly_modedb|
5 [21-03-12 17:34:23] SERVER > TRACKASSEMBLY [N/A] MakeAsmConvar: Create {trackassembly_modedb}|LUA|nil|nil|
6 [21-03-12 17:34:23] SERVER > TRACKASSEMBLY [N/A] MakeAsmConvar: Create {trackassembly_devmode}|0|0|1|
7 [21-03-12 17:34:23] SERVER > TRACKASSEMBLY [N/A] MakeAsmConvar: Create {trackassembly_maxtrmarg}|0.02|0|1|
8 [21-03-12 17:34:23] SERVER > TRACKASSEMBLY [N/A] MakeAsmConvar: Create {trackassembly_maxmenupr}|5|0|10|
5 [21-03-12 17:34:23] SERVER > TRACKASSEMBLY [N/A] NewAsmConvar: Create {trackassembly_modedb}|LUA|nil|nil|
6 [21-03-12 17:34:23] SERVER > TRACKASSEMBLY [N/A] NewAsmConvar: Create {trackassembly_devmode}|0|0|1|
7 [21-03-12 17:34:23] SERVER > TRACKASSEMBLY [N/A] NewAsmConvar: Create {trackassembly_maxtrmarg}|0.02|0|1|
8 [21-03-12 17:34:23] SERVER > TRACKASSEMBLY [N/A] NewAsmConvar: Create {trackassembly_maxmenupr}|5|0|10|
9 [21-03-12 17:34:23] SERVER > TRACKASSEMBLY [N/A] GetBorder: Entry missing {string}|trackassembly_timermode|
10 [21-03-12 17:34:23] SERVER > TRACKASSEMBLY [N/A] MakeAsmConvar: Create {trackassembly_timermode}|CQT@1800@1@1/CQT@900@1@1/CQT@600@1@1|nil|nil|
11 [21-03-12 17:34:23] SERVER > TRACKASSEMBLY [N/A] MakeAsmConvar: Create {trackassembly_maxmass}|50000|1|100000|
12 [21-03-12 17:34:23] SERVER > TRACKASSEMBLY [N/A] MakeAsmConvar: Create {trackassembly_maxlinear}|5000|0|10000|
13 [21-03-12 17:34:23] SERVER > TRACKASSEMBLY [N/A] MakeAsmConvar: Create {trackassembly_maxforce}|100000|0|200000|
14 [21-03-12 17:34:23] SERVER > TRACKASSEMBLY [N/A] MakeAsmConvar: Create {trackassembly_maxactrad}|200|1|200|
15 [21-03-12 17:34:23] SERVER > TRACKASSEMBLY [N/A] MakeAsmConvar: Create {trackassembly_maxstcnt}|200|1|400|
16 [21-03-12 17:34:23] SERVER > TRACKASSEMBLY [N/A] MakeAsmConvar: Create {trackassembly_enwiremod}|1|0|1|
17 [21-03-12 17:34:23] SERVER > TRACKASSEMBLY [N/A] MakeAsmConvar: Create {trackassembly_enctxmenu}|1|0|1|
18 [21-03-12 17:34:23] SERVER > TRACKASSEMBLY [N/A] MakeAsmConvar: Create {trackassembly_enctxmall}|0|0|1|
19 [21-03-12 17:34:23] SERVER > TRACKASSEMBLY [N/A] MakeAsmConvar: Create {trackassembly_endsvlock}|0|0|1|
20 [21-03-12 17:34:23] SERVER > TRACKASSEMBLY [N/A] MakeAsmConvar: Create {trackassembly_curvefact}|0.5|0|1|
21 [21-03-12 17:34:23] SERVER > TRACKASSEMBLY [N/A] MakeAsmConvar: Create {trackassembly_curvsmple}|50|0|200|
22 [21-03-12 17:34:23] SERVER > TRACKASSEMBLY [N/A] MakeAsmConvar: Create {trackassembly_spawnrate}|1|1|10|
10 [21-03-12 17:34:23] SERVER > TRACKASSEMBLY [N/A] NewAsmConvar: Create {trackassembly_timermode}|CQT@1800@1@1/CQT@900@1@1/CQT@600@1@1|nil|nil|
11 [21-03-12 17:34:23] SERVER > TRACKASSEMBLY [N/A] NewAsmConvar: Create {trackassembly_maxmass}|50000|1|100000|
12 [21-03-12 17:34:23] SERVER > TRACKASSEMBLY [N/A] NewAsmConvar: Create {trackassembly_maxlinear}|5000|0|10000|
13 [21-03-12 17:34:23] SERVER > TRACKASSEMBLY [N/A] NewAsmConvar: Create {trackassembly_maxforce}|100000|0|200000|
14 [21-03-12 17:34:23] SERVER > TRACKASSEMBLY [N/A] NewAsmConvar: Create {trackassembly_maxactrad}|200|1|200|
15 [21-03-12 17:34:23] SERVER > TRACKASSEMBLY [N/A] NewAsmConvar: Create {trackassembly_maxstcnt}|200|1|400|
16 [21-03-12 17:34:23] SERVER > TRACKASSEMBLY [N/A] NewAsmConvar: Create {trackassembly_enwiremod}|1|0|1|
17 [21-03-12 17:34:23] SERVER > TRACKASSEMBLY [N/A] NewAsmConvar: Create {trackassembly_enctxmenu}|1|0|1|
18 [21-03-12 17:34:23] SERVER > TRACKASSEMBLY [N/A] NewAsmConvar: Create {trackassembly_enctxmall}|0|0|1|
19 [21-03-12 17:34:23] SERVER > TRACKASSEMBLY [N/A] NewAsmConvar: Create {trackassembly_endsvlock}|0|0|1|
20 [21-03-12 17:34:23] SERVER > TRACKASSEMBLY [N/A] NewAsmConvar: Create {trackassembly_curvefact}|0.5|0|1|
21 [21-03-12 17:34:23] SERVER > TRACKASSEMBLY [N/A] NewAsmConvar: Create {trackassembly_curvsmple}|50|0|200|
22 [21-03-12 17:34:23] SERVER > TRACKASSEMBLY [N/A] NewAsmConvar: Create {trackassembly_spawnrate}|1|1|10|
23 [21-03-12 17:34:23] SERVER > TRACKASSEMBLY [N/A] GetBorder: Entry missing {string}|trackassembly_bnderrmod|
24 [21-03-12 17:34:23] SERVER > TRACKASSEMBLY [N/A] MakeAsmConvar: Create {trackassembly_bnderrmod}|LOG|nil|nil|
25 [21-03-12 17:34:23] SERVER > TRACKASSEMBLY [N/A] MakeAsmConvar: Create {trackassembly_maxfruse}|50|1|100|
26 [21-03-12 17:34:23] SERVER > TRACKASSEMBLY [N/A] MakeAsmConvar: Create {sbox_maxasmtracks}|1500|0|3000|
24 [21-03-12 17:34:23] SERVER > TRACKASSEMBLY [N/A] NewAsmConvar: Create {trackassembly_bnderrmod}|LOG|nil|nil|
25 [21-03-12 17:34:23] SERVER > TRACKASSEMBLY [N/A] NewAsmConvar: Create {trackassembly_maxfruse}|50|1|100|
26 [21-03-12 17:34:23] SERVER > TRACKASSEMBLY [N/A] NewAsmConvar: Create {sbox_maxasmtracks}|1500|0|3000|
27 [21-03-12 17:34:23] SERVER > TRACKASSEMBLY [LUA] GetContainer: Registered {string}|COLORS_LIST|
28 [21-03-12 17:34:23] SERVER > TRACKASSEMBLY [LUA] GetContainer: Registered {string}|LIST_VGUI|
29 [21-03-12 17:34:23] SERVER > TRACKASSEMBLY [LUA] GetContainer: Registered {string}|WORK_MODE|
@ -316,23 +316,23 @@
2 [21-03-12 17:36:09] CLIENT > TRACKASSEMBLY [N/A] SettingsLogs: Success <SKIP@trackassembly/set/trackasmlib_slskip.txt>
3 [21-03-12 17:36:09] CLIENT > TRACKASSEMBLY [N/A] SettingsLogs: Missing <ONLY@trackassembly/set/trackasmlib_slonly.txt>
4 [21-03-12 17:36:09] CLIENT > TRACKASSEMBLY [N/A] GetBorder: Entry missing {string}|trackassembly_modedb|
5 [21-03-12 17:36:09] CLIENT > TRACKASSEMBLY [N/A] MakeAsmConvar: Create {trackassembly_modedb}|LUA|nil|nil|
6 [21-03-12 17:36:09] CLIENT > TRACKASSEMBLY [N/A] MakeAsmConvar: Create {trackassembly_devmode}|0|0|1|
7 [21-03-12 17:36:09] CLIENT > TRACKASSEMBLY [N/A] MakeAsmConvar: Create {trackassembly_maxtrmarg}|0.02|0|1|
8 [21-03-12 17:36:09] CLIENT > TRACKASSEMBLY [N/A] MakeAsmConvar: Create {trackassembly_maxmenupr}|5|0|10|
5 [21-03-12 17:36:09] CLIENT > TRACKASSEMBLY [N/A] NewAsmConvar: Create {trackassembly_modedb}|LUA|nil|nil|
6 [21-03-12 17:36:09] CLIENT > TRACKASSEMBLY [N/A] NewAsmConvar: Create {trackassembly_devmode}|0|0|1|
7 [21-03-12 17:36:09] CLIENT > TRACKASSEMBLY [N/A] NewAsmConvar: Create {trackassembly_maxtrmarg}|0.02|0|1|
8 [21-03-12 17:36:09] CLIENT > TRACKASSEMBLY [N/A] NewAsmConvar: Create {trackassembly_maxmenupr}|5|0|10|
9 [21-03-12 17:36:09] CLIENT > TRACKASSEMBLY [N/A] GetBorder: Entry missing {string}|trackassembly_timermode|
10 [21-03-12 17:36:09] CLIENT > TRACKASSEMBLY [N/A] MakeAsmConvar: Create {trackassembly_timermode}|CQT@1800@1@1/CQT@900@1@1/CQT@600@1@1|nil|nil|
11 [21-03-12 17:36:09] CLIENT > TRACKASSEMBLY [N/A] MakeAsmConvar: Create {trackassembly_maxmass}|50000|1|100000|
12 [21-03-12 17:36:09] CLIENT > TRACKASSEMBLY [N/A] MakeAsmConvar: Create {trackassembly_maxlinear}|5000|0|10000|
13 [21-03-12 17:36:09] CLIENT > TRACKASSEMBLY [N/A] MakeAsmConvar: Create {trackassembly_maxforce}|100000|0|200000|
14 [21-03-12 17:36:09] CLIENT > TRACKASSEMBLY [N/A] MakeAsmConvar: Create {trackassembly_maxactrad}|200|1|200|
15 [21-03-12 17:36:09] CLIENT > TRACKASSEMBLY [N/A] MakeAsmConvar: Create {trackassembly_maxstcnt}|200|1|400|
16 [21-03-12 17:36:09] CLIENT > TRACKASSEMBLY [N/A] MakeAsmConvar: Create {trackassembly_enwiremod}|1|0|1|
17 [21-03-12 17:36:09] CLIENT > TRACKASSEMBLY [N/A] MakeAsmConvar: Create {trackassembly_enctxmenu}|1|0|1|
18 [21-03-12 17:36:09] CLIENT > TRACKASSEMBLY [N/A] MakeAsmConvar: Create {trackassembly_enctxmall}|0|0|1|
19 [21-03-12 17:36:09] CLIENT > TRACKASSEMBLY [N/A] MakeAsmConvar: Create {trackassembly_endsvlock}|0|0|1|
20 [21-03-12 17:36:09] CLIENT > TRACKASSEMBLY [N/A] MakeAsmConvar: Create {trackassembly_curvefact}|0.5|0|1|
21 [21-03-12 17:36:09] CLIENT > TRACKASSEMBLY [N/A] MakeAsmConvar: Create {trackassembly_curvsmple}|50|0|200|
10 [21-03-12 17:36:09] CLIENT > TRACKASSEMBLY [N/A] NewAsmConvar: Create {trackassembly_timermode}|CQT@1800@1@1/CQT@900@1@1/CQT@600@1@1|nil|nil|
11 [21-03-12 17:36:09] CLIENT > TRACKASSEMBLY [N/A] NewAsmConvar: Create {trackassembly_maxmass}|50000|1|100000|
12 [21-03-12 17:36:09] CLIENT > TRACKASSEMBLY [N/A] NewAsmConvar: Create {trackassembly_maxlinear}|5000|0|10000|
13 [21-03-12 17:36:09] CLIENT > TRACKASSEMBLY [N/A] NewAsmConvar: Create {trackassembly_maxforce}|100000|0|200000|
14 [21-03-12 17:36:09] CLIENT > TRACKASSEMBLY [N/A] NewAsmConvar: Create {trackassembly_maxactrad}|200|1|200|
15 [21-03-12 17:36:09] CLIENT > TRACKASSEMBLY [N/A] NewAsmConvar: Create {trackassembly_maxstcnt}|200|1|400|
16 [21-03-12 17:36:09] CLIENT > TRACKASSEMBLY [N/A] NewAsmConvar: Create {trackassembly_enwiremod}|1|0|1|
17 [21-03-12 17:36:09] CLIENT > TRACKASSEMBLY [N/A] NewAsmConvar: Create {trackassembly_enctxmenu}|1|0|1|
18 [21-03-12 17:36:09] CLIENT > TRACKASSEMBLY [N/A] NewAsmConvar: Create {trackassembly_enctxmall}|0|0|1|
19 [21-03-12 17:36:09] CLIENT > TRACKASSEMBLY [N/A] NewAsmConvar: Create {trackassembly_endsvlock}|0|0|1|
20 [21-03-12 17:36:09] CLIENT > TRACKASSEMBLY [N/A] NewAsmConvar: Create {trackassembly_curvefact}|0.5|0|1|
21 [21-03-12 17:36:09] CLIENT > TRACKASSEMBLY [N/A] NewAsmConvar: Create {trackassembly_curvsmple}|50|0|200|
22 [21-03-12 17:36:09] CLIENT > TRACKASSEMBLY [LUA] GetContainer: Registered {string}|COLORS_LIST|
23 [21-03-12 17:36:09] CLIENT > TRACKASSEMBLY [LUA] GetContainer: Registered {string}|LIST_VGUI|
24 [21-03-12 17:36:09] CLIENT > TRACKASSEMBLY [LUA] GetContainer: Registered {string}|WORK_MODE|

View File

@ -4,6 +4,8 @@ local pcall = pcall
local Time = CurTime
local IsValid = IsValid
local tobool = tobool
local istable = istable
local isfunction = isfunction
local tonumber = tonumber
local tostring = tostring
local SetClipboardText = SetClipboardText
@ -84,11 +86,7 @@ local asmlib = trackasmlib; if(not asmlib) then -- Module present
------------ CONFIGURE ASMLIB ------------
asmlib.InitBase("track","assembly")
asmlib.SetOpVar("TOOL_VERSION","8.749")
asmlib.SetIndexes("V" ,1,2,3)
asmlib.SetIndexes("A" ,1,2,3)
asmlib.SetIndexes("WV",1,2,3)
asmlib.SetIndexes("WA",1,2,3)
asmlib.SetOpVar("TOOL_VERSION","8.801")
------------ CONFIGURE GLOBAL INIT OPVARS ------------
@ -156,40 +154,40 @@ asmlib.SetBorder(gsToolPrefL.."rtradmenu", -gnMaxRot, gnMaxRot)
------------ CONFIGURE LOGGING ------------
asmlib.SetOpVar("LOG_DEBUGEN",false)
asmlib.MakeAsmConvar("logsmax", 0, nil, gnIndependentUsed, "Maximum logging lines being written")
asmlib.MakeAsmConvar("logfile", 0, nil, gnIndependentUsed, "File logging output flag control")
asmlib.NewAsmConvar("logsmax", 0, nil, gnIndependentUsed, "Maximum logging lines being written")
asmlib.NewAsmConvar("logfile", 0, nil, gnIndependentUsed, "File logging output flag control")
asmlib.SetLogControl(asmlib.GetAsmConvar("logsmax","INT"), asmlib.GetAsmConvar("logfile","BUL"))
asmlib.SettingsLogs("SKIP"); asmlib.SettingsLogs("ONLY")
------------ CONFIGURE NON-REPLICATED CVARS ------------ Client's got a mind of its own
asmlib.MakeAsmConvar("modedb" , "LUA", nil, gnIndependentUsed, "Database storage operating mode LUA or SQL")
asmlib.MakeAsmConvar("devmode" , 0 , nil, gnIndependentUsed, "Toggle developer mode on/off server side")
asmlib.MakeAsmConvar("maxtrmarg", 0.02 , nil, gnIndependentUsed, "Maximum time to avoid performing new traces")
asmlib.MakeAsmConvar("maxmenupr", 5 , nil, gnIndependentUsed, "Maximum decimal places utilized in the control panel")
asmlib.MakeAsmConvar("timermode", "CQT@1800@1@1/CQT@900@1@1/CQT@600@1@1", nil, gnIndependentUsed, "Memory management setting when DB mode is SQL")
asmlib.NewAsmConvar("modedb" , "LUA", nil, gnIndependentUsed, "Database storage operating mode LUA or SQL")
asmlib.NewAsmConvar("devmode" , 0 , nil, gnIndependentUsed, "Toggle developer mode on/off server side")
asmlib.NewAsmConvar("maxtrmarg", 0.02 , nil, gnIndependentUsed, "Maximum time to avoid performing new traces")
asmlib.NewAsmConvar("maxmenupr", 5 , nil, gnIndependentUsed, "Maximum decimal places utilized in the control panel")
asmlib.NewAsmConvar("timermode", "CQT@1800@1@1/CQT@900@1@1/CQT@600@1@1", nil, gnIndependentUsed, "Memory management setting when DB mode is SQL")
------------ CONFIGURE REPLICATED CVARS ------------ Server tells the client what value to use
asmlib.MakeAsmConvar("maxmass" , 50000 , nil, gnServerControled, "Maximum mass that can be applied on a piece")
asmlib.MakeAsmConvar("maxlinear", 5000 , nil, gnServerControled, "Maximum linear offset of the piece")
asmlib.MakeAsmConvar("maxforce" , 100000, nil, gnServerControled, "Maximum force limit when creating welds")
asmlib.MakeAsmConvar("maxactrad", 200 , nil, gnServerControled, "Maximum active radius to search for a point ID")
asmlib.MakeAsmConvar("maxstcnt" , 200 , nil, gnServerControled, "Maximum spawned pieces in stacking mode")
asmlib.MakeAsmConvar("maxghcnt" , 1500 , nil, gnServerControled, "Maximum ghost pieces being spawned by client")
asmlib.MakeAsmConvar("enwiremod", 1 , nil, gnServerControled, "Toggle the wire extension on/off server side")
asmlib.MakeAsmConvar("enmultask", 1 , nil, gnServerControled, "Toggle the spawn multitasking on/off server side")
asmlib.MakeAsmConvar("enctxmenu", 1 , nil, gnServerControled, "Toggle the context menu on/off in general")
asmlib.MakeAsmConvar("enctxmall", 0 , nil, gnServerControled, "Toggle the context menu on/off for all props")
asmlib.MakeAsmConvar("endsvlock", 0 , nil, gnServerControled, "Toggle the DSV external database file update on/off")
asmlib.MakeAsmConvar("curvefact", 0.5 , nil, gnServerControled, "Parametric constant track curving factor")
asmlib.MakeAsmConvar("curvsmple", 50 , nil, gnServerControled, "Amount of samples between two curve nodes")
asmlib.MakeAsmConvar("spawnrate", 1 , nil, gnServerControled, "Maximum pieces spawned in every think tick")
asmlib.MakeAsmConvar("bnderrmod","LOG" , nil, gnServerControled, "Unreasonable position error handling mode")
asmlib.MakeAsmConvar("maxfruse" , 50 , nil, gnServerControled, "Maximum frequent pieces to be listed")
asmlib.MakeAsmConvar("maxspmarg", 0 , nil, gnServerControled, "Maximum spawn distance new piece created margin")
asmlib.MakeAsmConvar("dtmessage", 1 , nil, gnServerControled, "Time interval for server addressed messages")
asmlib.MakeAsmConvar("*sbox_max"..gsLimitName, 1500, nil, gnServerControled, "Maximum number of tracks to be spawned")
asmlib.NewAsmConvar("maxmass" , 50000 , nil, gnServerControled, "Maximum mass that can be applied on a piece")
asmlib.NewAsmConvar("maxlinear", 5000 , nil, gnServerControled, "Maximum linear offset of the piece")
asmlib.NewAsmConvar("maxforce" , 100000, nil, gnServerControled, "Maximum force limit when creating welds")
asmlib.NewAsmConvar("maxactrad", 200 , nil, gnServerControled, "Maximum active radius to search for a point ID")
asmlib.NewAsmConvar("maxstcnt" , 200 , nil, gnServerControled, "Maximum spawned pieces in stacking mode")
asmlib.NewAsmConvar("maxghcnt" , 1500 , nil, gnServerControled, "Maximum ghost pieces being spawned by client")
asmlib.NewAsmConvar("enwiremod", 1 , nil, gnServerControled, "Toggle the wire extension on/off server side")
asmlib.NewAsmConvar("enmultask", 1 , nil, gnServerControled, "Toggle the spawn multitasking on/off server side")
asmlib.NewAsmConvar("enctxmenu", 1 , nil, gnServerControled, "Toggle the context menu on/off in general")
asmlib.NewAsmConvar("enctxmall", 0 , nil, gnServerControled, "Toggle the context menu on/off for all props")
asmlib.NewAsmConvar("endsvlock", 0 , nil, gnServerControled, "Toggle the DSV external database file update on/off")
asmlib.NewAsmConvar("curvefact", 0.5 , nil, gnServerControled, "Parametric constant track curving factor")
asmlib.NewAsmConvar("curvsmple", 50 , nil, gnServerControled, "Amount of samples between two curve nodes")
asmlib.NewAsmConvar("spawnrate", 1 , nil, gnServerControled, "Maximum pieces spawned in every think tick")
asmlib.NewAsmConvar("bnderrmod","LOG" , nil, gnServerControled, "Unreasonable position error handling mode")
asmlib.NewAsmConvar("maxfruse" , 50 , nil, gnServerControled, "Maximum frequent pieces to be listed")
asmlib.NewAsmConvar("maxspmarg", 0 , nil, gnServerControled, "Maximum spawn distance new piece created margin")
asmlib.NewAsmConvar("dtmessage", 1 , nil, gnServerControled, "Time interval for server addressed messages")
asmlib.NewAsmConvar("*sbox_max"..gsLimitName, 1500, nil, gnServerControled, "Maximum number of tracks to be spawned")
------------ CONFIGURE INTERNALS ------------
@ -261,7 +259,7 @@ local conCallBack = asmlib.GetContainer("CALLBAC_FUNC")
local mkTab, ID = asmlib.GetBuilderID(1), 1
while(mkTab) do local sTim = arTim[ID]
local defTab = mkTab:GetDefinition(); mkTab:TimerSetup(sTim)
asmlib.LogInstance("Timer apply "..asmlib.GetReport2(defTab.Nick,sTim),gtInitLogs)
asmlib.LogInstance("Timer apply "..asmlib.GetReport(defTab.Nick,sTim),gtInitLogs)
ID = ID + 1; mkTab = asmlib.GetBuilderID(ID) -- Next table on the list
end; asmlib.LogInstance("Timer update "..asmlib.GetReport(vN),gtInitLogs)
end})
@ -297,7 +295,7 @@ asmlib.SetOpVar("STRUCT_SPAWN",{
local fmt = asmlib.GetOpVar("FORM_DRAWDBG")
local fky = asmlib.GetOpVar("FORM_DRWSPKY")
for iR = 1, 4 do
local out = asmlib.GetReport2(iR,tableConcat(tab[iR], ","))
local out = asmlib.GetReport(iR,tableConcat(tab[iR], ","))
scr:DrawText(fmt:format(fky:format(key), typ, out, inf))
end
end,
@ -594,21 +592,23 @@ if(CLIENT) then
asmlib.SetAction("BIND_PRESS", -- Must have the same parameters as the hook
function(oPly,sBind,bPress) local sLog = "*BIND_PRESS"
local oPly, actSwep, actTool = asmlib.GetHookInfo()
local oPly, acSw, acTo = asmlib.GetHookInfo()
if(not asmlib.IsPlayer(oPly)) then
asmlib.LogInstance("Hook mismatch",sLog); return nil end
if(not acTo) then -- Make sure we have a tool
asmlib.LogInstance("Tool missing",sLog); return nil end
if(((sBind == "invnext") or (sBind == "invprev")) and bPress) then
-- Switch functionality of the mouse wheel only for TA
if(not inputIsKeyDown(KEY_LALT)) then
asmlib.LogInstance("Active key missing",sLog); return nil end
if(not actTool:GetScrollMouse()) then
if(not acTo:GetScrollMouse()) then
asmlib.LogInstance("(SCROLL) Scrolling disabled",sLog); return nil end
local nDir = ((sBind == "invnext") and -1) or ((sBind == "invprev") and 1) or 0
actTool:SwitchPoint(nDir,inputIsKeyDown(KEY_LSHIFT))
acTo:SwitchPoint(nDir,inputIsKeyDown(KEY_LSHIFT))
asmlib.LogInstance("("..sBind..") Processed",sLog); return true
elseif((sBind == "+zoom") and bPress) then -- Work mode radial menu selection
if(inputIsMouseDown(MOUSE_MIDDLE)) then -- Reserve the mouse middle for radial menu
if(not actTool:GetRadialMenu()) then -- Zoom is bind on the middle mouse button
if(not acTo:GetRadialMenu()) then -- Zoom is bind on the middle mouse button
asmlib.LogInstance("("..sBind..") Menu disabled",sLog); return nil end
asmlib.LogInstance("("..sBind..") Processed",sLog); return true
end; return nil -- Need to disable the zoom when bind on the mouse middle
@ -618,10 +618,12 @@ if(CLIENT) then
asmlib.SetAction("DRAW_RADMENU", -- Must have the same parameters as the hook
function() local sLog = "*DRAW_RADMENU"
local oPly, actSwep, actTool = asmlib.GetHookInfo()
local oPly, acSw, acTo = asmlib.GetHookInfo()
if(not asmlib.IsPlayer(oPly)) then
asmlib.LogInstance("Hook mismatch",sLog) return nil end
if(not actTool:GetRadialMenu()) then
if(not acTo) then -- Make sure we have a tool
asmlib.LogInstance("Tool missing",sLog); return nil end
if(not acTo:GetRadialMenu()) then
asmlib.LogInstance("Menu disabled",sLog); return nil end
if(inputIsMouseDown(MOUSE_MIDDLE)) then guiEnableScreenClicker(true) else
guiEnableScreenClicker(false); asmlib.LogInstance("Release",sLog); return nil
@ -631,8 +633,8 @@ if(CLIENT) then
if(not actMonitor) then asmlib.LogInstance("Screen invalid",sLog); return nil end
local nMd = asmlib.GetOpVar("MAX_ROTATION")
local nDr, sM = asmlib.GetOpVar("DEG_RAD"), asmlib.GetOpVar("MISS_NOAV")
local nBr = (actTool:GetRadialAngle() * nDr)
local nK, nN = actTool:GetRadialSegm(), conWorkMode:GetSize()
local nBr = (acTo:GetRadialAngle() * nDr)
local nK, nN = acTo:GetRadialSegm(), conWorkMode:GetSize()
local nR = (mathMin(scrW, scrH) / (2 * gnRatio))
local mXY = asmlib.NewXY(guiMouseX(), guiMouseY())
local vCn = asmlib.NewXY(mathFloor(scrW/2), mathFloor(scrH/2))
@ -676,19 +678,20 @@ if(CLIENT) then
asmlib.SetAction("DRAW_GHOSTS", -- Must have the same parameters as the hook
function() local sLog = "*DRAW_GHOSTS"
local oPly, actSwep, actTool = asmlib.GetHookInfo()
local oPly, acSw, acTo = asmlib.GetHookInfo()
if(not asmlib.IsPlayer(oPly)) then
asmlib.LogInstance("Hook mismatch",sLog); return nil end
local model = actTool:GetModel()
local ghcnt = actTool:GetGhostsDepth()
if(not acTo) then -- Make sure we have a tool
asmlib.LogInstance("Tool missing",sLog); return nil end
local model = acTo:GetModel()
if(not asmlib.IsModel(model)) then return nil end
local ghcnt = acTo:GetGhostsDepth()
local atGho = asmlib.GetOpVar("ARRAY_GHOST")
if(asmlib.IsModel(model)) then
if(not (asmlib.HasGhosts() and ghcnt == atGho.Size and atGho.Slot == model)) then
if(not asmlib.MakeGhosts(ghcnt, model)) then
asmlib.LogInstance("Ghosting fail",sLog); return nil end
actTool:ElevateGhost(atGho[1], oPly) -- Elevate the properly created ghost
end; actTool:UpdateGhost(oPly) -- Update ghosts stack for the local player
end
if(not (asmlib.HasGhosts() and ghcnt == atGho.Size and atGho.Slot == model)) then
if(not asmlib.NewGhosts(ghcnt, model)) then
asmlib.LogInstance("Ghosting fail",sLog); return nil end
acTo:ElevateGhost(atGho[1], oPly) -- Elevate the properly created ghost
end; acTo:UpdateGhost(oPly) -- Update ghosts stack for the local player
end) -- Read client configuration
asmlib.SetAction("OPEN_EXTERNDB", -- Must have the same parameters as the hook
@ -717,7 +720,6 @@ if(CLIENT) then
asmlib.LogInstance("Sheet invalid",sLog); return nil end
pnSheet:SetParent(pnFrame)
pnSheet:Dock(FILL)
local sOff = asmlib.GetOpVar("OPSYM_DISABLE")
local sMis = asmlib.GetOpVar("MISS_NOAV")
local sLib = asmlib.GetOpVar("NAME_LIBRARY")
local sBas = asmlib.GetOpVar("DIRPATH_BAS")
@ -820,7 +822,7 @@ if(CLIENT) then
while(not bEOF) do
sLine, bEOF = asmlib.GetStringFile(oDSV)
if(not asmlib.IsBlank(sLine)) then local sKey, sPrg
if(sLine:sub(1,1) ~= sOff) then bAct = true else
if(not asmlib.IsDisable(sLine)) then bAct = true else
bAct, sLine = false, sLine:sub(2,-1):Trim() end
local nS, nE = sLine:find("%s+")
if(nS and nE) then
@ -848,6 +850,7 @@ if(CLIENT) then
if(not oDSV) then pnFrame:Close()
asmlib.LogInstance("DSV list missing",sLog..".ListView"); return nil end
local tLine = pnListView:GetLines()
local sOff = asmlib.GetOpVar("OPSYM_DISABLE")
for iK, pnCur in pairs(tLine) do
local sAct = ((pnCur:GetColumnText(1) == "V") and "" or sOff)
local sPrf = pnCur:GetColumnText(2)
@ -910,7 +913,7 @@ if(CLIENT) then
local tInfo = pnSheet:AddSheet(defTab.Nick, pnTable, asmlib.ToIcon(defTab.Name))
tInfo.Tab:SetTooltip(languageGetPhrase("tool."..gsToolNameL..".pn_externdb").." "..defTab.Nick)
local tFile = fileFind(fDSV:format("*", defTab.Nick), "DATA")
if(asmlib.IsTable(tFile) and tFile[1]) then
if(istable(tFile) and tFile[1]) then
local nF, nW, nH = #tFile, pnFrame:GetSize()
xySiz.x, xyPos.x, xyPos.y = (nW - 6 * xyDsz.x), xyDsz.x, xyDsz.y
xySiz.y = (((nH - 6 * xyDsz.y) - ((nF -1) * xyDsz.y) - 52) / nF)
@ -939,26 +942,25 @@ if(CLIENT) then
function() SetClipboardText(sFile) end,
function() SetClipboardText(asmlib.GetDateTime(fileTime(sFile, "DATA"))) end,
function() SetClipboardText(tostring(fileSize(sFile, "DATA")).."B") end,
function()
if(luapad) then
asmlib.LogInstance("Edit "..asmlib.GetReport1(sFile), sLog..".Button")
if(luapad.Frame) then luapad.Frame:SetVisible(true)
else asmlib.SetAsmConvar(oPly, "*luapad", gsToolNameL) end
luapad.AddTab("["..defTab.Nick.."]"..pnSelf:GetText(), fileRead(sFile, "DATA"), sDsv);
if(defTab.Nick == "PIECES") then -- Load the categoty provider for this DSV
local sCat = fDSV:format(sPref, "CATEGORY"); if(fileExists(sCat,"DATA")) then
luapad.AddTab("[CATEGORY]"..pnSelf:GetText(), fileRead(sCat, "DATA"), sDsv);
end -- This is done so we can distinguish between luapad and other panels
end -- Luapad is designed not to be closed so we need to make it invisible
luapad.Frame:SetVisible(true); luapad.Frame:Center()
luapad.Frame:MakePopup(); conElements:Push({luapad.Frame})
end
function() -- Edit the database contents using the Luapad addon
if(not luapad) then return end -- Luapad is not installed do nothing
asmlib.LogInstance("Edit "..asmlib.GetReport(sFile), sLog..".Button")
if(luapad.Frame) then luapad.Frame:SetVisible(true)
else asmlib.SetAsmConvar(oPly, "*luapad", gsToolNameL) end
luapad.AddTab("["..defTab.Nick.."]"..pnSelf:GetText(), fileRead(sFile, "DATA"), sDsv);
if(defTab.Nick == "PIECES") then -- Load the category provider for this DSV
local sCat = fDSV:format(sPref, "CATEGORY"); if(fileExists(sCat,"DATA")) then
luapad.AddTab("[CATEGORY]"..pnSelf:GetText(), fileRead(sCat, "DATA"), sDsv);
end -- This is done so we can distinguish between luapad and other panels
end -- Luapad is designed not to be closed so we need to make it invisible
luapad.Frame:SetVisible(true); luapad.Frame:Center()
luapad.Frame:MakePopup(); conElements:Push({luapad.Frame})
end,
function() fileDelete(sFile)
asmlib.LogInstance("Delete "..asmlib.GetReport1(sFile), sLog..".Button")
asmlib.LogInstance("Delete "..asmlib.GetReport(sFile), sLog..".Button")
if(defTab.Nick == "PIECES") then local sCat = fDSV:format(sPref, "CATEGORY")
if(fileExists(sCat,"DATA")) then fileDelete(sCat) -- Delete category when present
asmlib.LogInstance("Deleted "..asmlib.GetReport1(sCat), sLog..".Button") end
asmlib.LogInstance("Deleted "..asmlib.GetReport(sCat), sLog..".Button") end
end; pnManage:Remove()
end
}
@ -1050,7 +1052,7 @@ if(CLIENT) then
pnComboBox:AddChoice(languageGetPhrase("tool."..gsToolNameL..".pn_srchcol_lb3"), makTab:GetColumnName(3), false, asmlib.ToIcon("pn_srchcol_lb3"))
pnComboBox:AddChoice(languageGetPhrase("tool."..gsToolNameL..".pn_srchcol_lb4"), makTab:GetColumnName(4), false, asmlib.ToIcon("pn_srchcol_lb4"))
pnComboBox.OnSelect = function(pnSelf, nInd, sVal, anyData)
asmlib.LogInstance("Selected "..asmlib.GetReport3(nInd,sVal,anyData),sLog..".ComboBox")
asmlib.LogInstance("Selected "..asmlib.GetReport(nInd,sVal,anyData),sLog..".ComboBox")
pnSelf:SetValue(sVal)
end
------------ ModelPanel ------------
@ -1164,31 +1166,29 @@ if(CLIENT) then
-- The button database export by type uses the current active type in the ListView line
pnButton.DoClick = function(pnSelf)
asmlib.LogInstance("Click "..asmlib.GetReport(pnSelf:GetText()), sLog..".Button")
if(asmlib.GetAsmConvar("exportdb", "BUL")) then
if(inputIsKeyDown(KEY_LSHIFT)) then local sType
local iD, pnLine = pnListView:GetSelectedLine()
if(asmlib.IsHere(iD)) then sType = pnLine:GetColumnText(3)
else local model = asmlib.GetAsmConvar("model", "STR")
local oRec = asmlib.CacheQueryPiece(model)
if(asmlib.IsHere(oRec)) then sType = oRec.Type
else LogInstance("Not piece <"..model..">") end
end
asmlib.ExportTypeAR(sType)
asmlib.LogInstance("Export type "..asmlib.GetReport(sType), sLog..".Button")
else
asmlib.ExportCategory(3)
asmlib.ExportDSV("PIECES")
asmlib.ExportDSV("ADDITIONS")
asmlib.ExportDSV("PHYSPROPERTIES")
asmlib.LogInstance("Export instance", sLog..".Button")
if(not asmlib.GetAsmConvar("exportdb", "BUL")) then return end
if(inputIsKeyDown(KEY_LSHIFT)) then local sType
local iD, pnLine = pnListView:GetSelectedLine()
if(asmlib.IsHere(iD)) then sType = pnLine:GetColumnText(3)
else local model = asmlib.GetAsmConvar("model", "STR")
local oRec = asmlib.CacheQueryPiece(model)
if(asmlib.IsHere(oRec)) then sType = oRec.Type
else LogInstance("Not piece <"..model..">") end
end
asmlib.SetAsmConvar(oPly, "exportdb", 0)
asmlib.ExportTypeAR(sType)
asmlib.LogInstance("Export type "..asmlib.GetReport(sType), sLog..".Button")
else
if(inputIsKeyDown(KEY_LSHIFT)) then
local fW = asmlib.GetOpVar("FORM_GITWIKI")
guiOpenURL(fW:format("Additional-features"))
end
asmlib.ExportCategory(3)
asmlib.ExportDSV("PIECES")
asmlib.ExportDSV("ADDITIONS")
asmlib.ExportDSV("PHYSPROPERTIES")
asmlib.LogInstance("Export instance", sLog..".Button")
end
asmlib.SetAsmConvar(oPly, "exportdb", 0)
end
pnButton.DoRightClick = function(pnSelf)
local fW = asmlib.GetOpVar("FORM_GITWIKI")
guiOpenURL(fW:format("Additional-features"))
end
-- Leave the TextEntry here so it can access and update the local ListView reference
pnTextEntry.OnEnter = function(pnSelf)
@ -1196,7 +1196,7 @@ if(CLIENT) then
local sAbr, sCol = pnComboBox:GetSelected() -- Returns two values
sAbr, sCol = tostring(sAbr or ""), tostring(sCol or "")
if(not asmlib.UpdateListView(pnListView,frUsed,nCount,sCol,sPat)) then
asmlib.LogInstance("Update ListView fail"..asmlib.GetReport3(sAbr,sCol,sPat,sLog..".TextEntry")); return nil
asmlib.LogInstance("Update ListView fail"..asmlib.GetReport(sAbr,sCol,sPat,sLog..".TextEntry")); return nil
end
end
pnFrame:SetVisible(true); pnFrame:Center(); pnFrame:MakePopup()
@ -1210,7 +1210,7 @@ if(CLIENT) then
asmlib.LogInstance("Extension disabled",sLog); return nil end
if(not asmlib.GetAsmConvar("adviser", "BUL")) then
asmlib.LogInstance("Adviser disabled",sLog); return nil end
local oPly, actSwep = asmlib.GetHookInfo("weapon_physgun")
local oPly, acSw = asmlib.GetHookInfo("weapon_physgun")
if(not oPly) then asmlib.LogInstance("Hook mismatch",sLog); return nil end
local hasghost = asmlib.HasGhosts(); asmlib.FadeGhosts(true)
if(not inputIsMouseDown(MOUSE_LEFT)) then
@ -1261,7 +1261,7 @@ if(CLIENT) then
if(asmlib.IsModel(trRec.Slot)) then -- The model has valid pre-cache
if(ghostcnt > 0) then -- The ghosting is enabled
if(not (hasghost and atGhosts.Size == 1 and trRec.Slot == atGhosts.Slot)) then
if(not asmlib.MakeGhosts(1, trRec.Slot)) then
if(not asmlib.NewGhosts(1, trRec.Slot)) then
asmlib.LogInstance("Ghosting fail",sLog); return nil end
end local eGho = atGhosts[1]; eGho:SetNoDraw(false)
eGho:SetPos(actSpawn.SPos); eGho:SetAngles(actSpawn.SAng)
@ -1317,25 +1317,25 @@ if(CLIENT) then
local fFoo, sLog = tArg[3], "*TWEAK_PANEL"
local sDir, sSub = tostring(tArg[1]):lower(), tostring(tArg[2]):lower()
local bS, lDir = pcall(tDat.Foo, sDir); if(not bS) then
asmlib.LogInstance("Fail folder "..asmlib.GetReport2(sDir, lDir), sLog); return end
asmlib.LogInstance("Fail folder "..asmlib.GetReport(sDir, lDir), sLog); return end
local bS, lSub = pcall(tDat.Foo, sSub); if(not bS) then
asmlib.LogInstance("Fail subfolder "..asmlib.GetReport2(sSub, lSub), sLog); return end
asmlib.LogInstance("Fail subfolder "..asmlib.GetReport(sSub, lSub), sLog); return end
local sKey = tDat.Key:format(sDir, sSub)
if(asmlib.IsHere(fFoo)) then
if(not asmlib.IsFunction(fFoo)) then
asmlib.LogInstance("Miss function "..asmlib.GetReport3(sDir, sSub, fFoo), sLog); return end
if(not isfunction(fFoo)) then
asmlib.LogInstance("Miss function "..asmlib.GetReport(sDir, sSub, fFoo), sLog); return end
if(not asmlib.IsHere(tDat.Bar[sDir])) then tDat.Bar[sDir] = {} end; tDat.Bar[sDir][sSub] = fFoo
asmlib.LogInstance("Store "..asmlib.GetReport3(sDir, sSub, fFoo), sLog)
asmlib.LogInstance("Store "..asmlib.GetReport(sDir, sSub, fFoo), sLog)
hookRemove(tDat.Hoo, sKey); hookAdd(tDat.Hoo, sKey, function()
spawnmenuAddToolMenuOption(lDir, lSub, sKey, languageGetPhrase(tDat.Nam), "", "", fFoo) end)
else
if(not asmlib.IsHere(tDat.Bar[sDir])) then
asmlib.LogInstance("Miss folder "..asmlib.GetReport1(sDir), sLog); return end
asmlib.LogInstance("Miss folder "..asmlib.GetReport(sDir), sLog); return end
fFoo = tDat.Bar[sDir][sSub]; if(not asmlib.IsHere(fFoo)) then
asmlib.LogInstance("Miss subfolder "..asmlib.GetReport2(sDir, sSub), sLog); return end
if(not asmlib.IsFunction(fFoo)) then
asmlib.LogInstance("Miss function "..asmlib.GetReport3(sDir, sSub, fFoo), sLog); return end
asmlib.LogInstance("Cache "..asmlib.GetReport3(sDir, sSub, fFoo), sLog); return fFoo
asmlib.LogInstance("Miss subfolder "..asmlib.GetReport(sDir, sSub), sLog); return end
if(not isfunction(fFoo)) then
asmlib.LogInstance("Miss function "..asmlib.GetReport(sDir, sSub, fFoo), sLog); return end
asmlib.LogInstance("Cache "..asmlib.GetReport(sDir, sSub, fFoo), sLog); return fFoo
end
end,
{
@ -1461,7 +1461,7 @@ local conContextMenu = asmlib.GetContainer("CONTEXT_MENU")
local bSuc, cnW, cnN, cnG = asmlib.ApplyPhysicalAnchor(ePiece,eBase,true,false,false,forcelim)
if(bSuc and cnW and cnW:IsValid()) then
local sIde = ePiece:EntIndex()..gsSymDir..eBase:EntIndex()
asmlib.UndoCrate("TA Weld > "..asmlib.GetReport2(sIde,cnW:GetClass()))
asmlib.UndoCrate("TA Weld > "..asmlib.GetReport(sIde,cnW:GetClass()))
asmlib.UndoAddEntity(cnW); asmlib.UndoFinish(oPly); return true
end; return false
end
@ -1490,7 +1490,7 @@ local conContextMenu = asmlib.GetContainer("CONTEXT_MENU")
local bSuc, cnW, cnN, cnG = asmlib.ApplyPhysicalAnchor(ePiece,eBase,false,true,false,forcelim)
if(bSuc and cnN and cnN:IsValid()) then
local sIde = ePiece:EntIndex()..gsSymDir..eBase:EntIndex()
asmlib.UndoCrate("TA NoCollide > "..asmlib.GetReport2(sIde,cnN:GetClass()))
asmlib.UndoCrate("TA NoCollide > "..asmlib.GetReport(sIde,cnN:GetClass()))
asmlib.UndoAddEntity(cnN); asmlib.UndoFinish(oPly); return true
end; return false
end
@ -1512,7 +1512,7 @@ local conContextMenu = asmlib.GetContainer("CONTEXT_MENU")
local forcelim = mathClamp(oPly:GetInfoNum(gsToolPrefL.."forcelim", 0), 0, maxforce)
local bSuc, cnW, cnN, cnG = asmlib.ApplyPhysicalAnchor(ePiece,nil,false,false,true,forcelim)
if(bSuc and cnG and cnG:IsValid()) then
asmlib.UndoCrate("TA NoCollideWorld > "..asmlib.GetReport2(ePiece:EntIndex(),cnG:GetClass()))
asmlib.UndoCrate("TA NoCollideWorld > "..asmlib.GetReport(ePiece:EntIndex(),cnG:GetClass()))
asmlib.UndoAddEntity(cnG); asmlib.UndoFinish(oPly); return true
end; return false
end
@ -1543,9 +1543,9 @@ if(SERVER) then
if(type(wDraw) == "function") then -- Check when the value is function
local bS, vO = pcall(wDraw, oEnt); vO = tostring(vO) -- Always being string
if(not bS) then oEnt:SetNWString(sKey, sNoA)
asmlib.LogInstance("Populate:"..asmlib.GetReport2(sKey,iD).." fail: "..vO, sLog)
asmlib.LogInstance("Populate:"..asmlib.GetReport(sKey,iD).." fail: "..vO, sLog)
else
asmlib.LogInstance("Populate:"..asmlib.GetReport3(sKey,iD,vO), sLog)
asmlib.LogInstance("Populate:"..asmlib.GetReport(sKey,iD,vO), sLog)
oEnt:SetNWString(sKey, vO) -- Write networked value to the hover entity
end
end
@ -1577,7 +1577,7 @@ if(CLIENT) then
if(not asmlib.IsHere(oRec)) then return nil end
end -- If the menu is not enabled for all props ged-a-ud!
netStart(gsOptionsCV); netWriteEntity(oEnt); netSendToServer() -- Love message
asmlib.LogInstance("Entity "..asmlib.GetReport2(oEnt:GetClass(),oEnt:EntIndex()), sLog)
asmlib.LogInstance("Entity "..asmlib.GetReport(oEnt:GetClass(),oEnt:EntIndex()), sLog)
end) -- Read client configuration
end
@ -1603,15 +1603,15 @@ gtOptionsCM.MenuOpen = function(self, opt, ent, tr)
local sKey , fDraw = tLine[1], tLine[4]
local wDraw, sIcon = tLine[5], sKey:match(fHash)
local sName = languageGetPhrase(sKey.."_con"):Trim():Trim(":")
if(asmlib.IsFunction(fDraw)) then
if(isfunction(fDraw)) then
local bS, vE = pcall(fDraw, ent, oPly, tr, sKey); if(not bS) then
asmlib.LogInstance("Request "..asmlib.GetReport2(sKey,iD).." fail: "..vE,gsOptionsLG); return end
asmlib.LogInstance("Request "..asmlib.GetReport(sKey,iD).." fail: "..vE,gsOptionsLG); return end
sName = sName..": "..tostring(vE) -- Attach client value ( CLIENT )
elseif(asmlib.IsFunction(wDraw)) then
elseif(isfunction(wDraw)) then
sName = sName..": "..ent:GetNWString(sKey) -- Attach networked value ( SERVER )
end; local fEval = function() self:Evaluate(ent,iD,tr,sKey) end
local pnOpt = pnSub:AddOption(sName, fEval); if(not IsValid(pnOpt)) then
asmlib.LogInstance("Invalid "..asmlib.GetReport2(sKey,iD),gsOptionsLG); return end
asmlib.LogInstance("Invalid "..asmlib.GetReport(sKey,iD),gsOptionsLG); return end
if(not asmlib.IsBlank(sIcon)) then pnOpt:SetIcon(asmlib.ToIcon(sIcon)) end
end
end
@ -1631,8 +1631,8 @@ gtOptionsCM.Evaluate = function(self, ent, idx, key)
local oPly = LocalPlayer()
local oTr = oPly:GetEyeTrace()
local bS, vE = pcall(fHandle,ent,oPly,oTr,key); if(not bS) then
asmlib.LogInstance("Request "..asmlib.GetReport2(sKey,idx).." fail: "..vE,gsOptionsLG); return end
if(bS and not vE) then asmlib.LogInstance("Failure "..asmlib.GetReport2(sKey,idx),gsOptionsLG); return end
asmlib.LogInstance("Request "..asmlib.GetReport(sKey,idx).." fail: "..vE,gsOptionsLG); return end
if(bS and not vE) then asmlib.LogInstance("Failure "..asmlib.GetReport(sKey,idx),gsOptionsLG); return end
end
end
-- What to happen on the server with our entity
@ -1646,8 +1646,8 @@ gtOptionsCM.Receive = function(self, len, ply)
if(not propertiesCanBeTargeted(ent, ply)) then return end
local sKey, fHandle = tLine[1], tLine[3] -- Menu function handler
local bS, vE = pcall(fHandle, ent, ply, oTr, sKey); if(not bS) then
asmlib.LogInstance("Request "..asmlib.GetReport2(sKey,idx).." fail: "..vE,gsOptionsLG); return end
if(bS and not vE) then asmlib.LogInstance("Failure "..asmlib.GetReport2(sKey,idx),gsOptionsLG); return end
asmlib.LogInstance("Request "..asmlib.GetReport(sKey,idx).." fail: "..vE,gsOptionsLG); return end
if(bS and not vE) then asmlib.LogInstance("Failure "..asmlib.GetReport(sKey,idx),gsOptionsLG); return end
end
-- Register the track assembly setup options in the context menu
propertiesAdd(gsOptionsCM, gtOptionsCM)
@ -1663,11 +1663,12 @@ asmlib.CreateTable("PIECES",{
local noTY = asmlib.GetOpVar("MISS_NOTP")
local noSQL = asmlib.GetOpVar("MISS_NOSQL")
local trCls = asmlib.GetOpVar("TRACE_CLASS")
arLine[2] = asmlib.GetTerm(arLine[2], noTY, asmlib.Categorize())
arLine[3] = asmlib.GetTerm(arLine[3], noMD, asmlib.ModelToName(arLine[1]))
arLine[8] = asmlib.GetTerm(arLine[8], noSQL, noSQL)
if(not (asmlib.IsNull(arLine[8]) or trCls[arLine[8]] or asmlib.IsBlank(arLine[8]))) then
asmlib.LogInstance("Register trace "..asmlib.GetReport2(arLine[8],arLine[1]),vSrc)
local emFva = asmlib.GetOpVar("EMPTYSTR_BLDS")
arLine[2] = asmlib.GetEmpty(arLine[2], emFva, asmlib.Categorize(), noTY)
arLine[3] = asmlib.GetEmpty(arLine[3], emFva, asmlib.ModelToName(arLine[1]), noMD)
arLine[8] = asmlib.GetEmpty(arLine[8], emFva, noSQL)
if(not (asmlib.IsNull(arLine[8]) or asmlib.IsBlank(arLine[8]) or trCls[arLine[8]])) then
asmlib.LogInstance("Register trace "..asmlib.GetReport(arLine[8],arLine[1]),vSrc)
trCls[arLine[8]] = true; -- Register the class provided to the trace hit list
end; return true
end
@ -1683,14 +1684,12 @@ asmlib.CreateTable("PIECES",{
if(not asmlib.IsHere(stData.Size)) then stData.Size = 0 end
if(not asmlib.IsHere(stData.Slot)) then stData.Slot = snPK end
local nOffsID = makTab:Match(arLine[4],4); if(not asmlib.IsHere(nOffsID)) then
asmlib.LogInstance("Cannot match "..asmlib.GetReport3(4,arLine[4],snPK),vSrc); return false end
asmlib.LogInstance("Cannot match "..asmlib.GetReport(4,arLine[4],snPK),vSrc); return false end
local stPOA = asmlib.RegisterPOA(stData,nOffsID,arLine[5],arLine[6],arLine[7])
if(not asmlib.IsHere(stPOA)) then
asmlib.LogInstance("Cannot process offset #"..tostring(nOffsID).." for "..
tostring(snPK),vSrc); return false end
if(not asmlib.IsHere(stPOA)) then
asmlib.LogInstance("Cannot process "..asmlib.GetReport(nOffsID, snPK),vSrc); return false end
if(nOffsID > stData.Size) then stData.Size = nOffsID else
asmlib.LogInstance("Offset #"..tostring(nOffsID)..
" sequential mismatch",vSrc); return false end
asmlib.LogInstance("Sequential mismatch "..asmlib.GetReport(nOffsID),vSrc); return false end
return true
end,
ExportDSV = function(oFile, makTab, tCache, fPref, sDelim, vSrc)
@ -1700,17 +1699,23 @@ asmlib.CreateTable("PIECES",{
local tSort = asmlib.Sort(tData,{"KEY"})
if(not tSort) then oFile:Flush(); oFile:Close()
asmlib.LogInstance("("..fPref..") Cannot sort cache data",vSrc); return false end
for iIdx = 1, tSort.Size do local stRec = tSort[iIdx]
local noSQL = asmlib.GetOpVar("MISS_NOSQL")
local symOff = asmlib.GetOpVar("OPSYM_DISABLE")
local sClass = asmlib.GetOpVar("ENTITY_DEFCLASS")
for iR = 1, tSort.Size do
local stRec = tSort[iR]
local tData = tCache[stRec.Key]
local sData, tOffs = defTab.Name, tData.Offs
sData = sData..sDelim..makTab:Match(stRec.Key,1,true,"\"")..sDelim..
makTab:Match(tData.Type,2,true,"\"")..sDelim..
makTab:Match(((asmlib.ModelToName(stRec.Key) == tData.Name) and symOff or tData.Name),3,true,"\"")
makTab:Match(tData.Name,3,true,"\"")
-- Matching crashes only for numbers. The number is already inserted, so there will be no crash
for iInd = 1, #tOffs do local stPnt = tData.Offs[iInd]
local sP, sO, sA = asmlib.ExportPOA(stPnt, "")
local sC = (tData.Unit and tostring(tData.Unit or "") or "")
oFile:Write(sData..sDelim..makTab:Match(iInd,4,true,"\"")..sDelim..
for iD = 1, #tOffs do
local stPnt = tOffs[iD] -- Read current offsets from the model
local sP, sO, sA = stPnt.P:Export(stPnt.O), stPnt.O:Export(), stPnt.A:Export()
local sC = (asmlib.IsHere(tData.Unit) and tostring(tData.Unit) or noSQL)
sC = ((sC == sClass) and noSQL or sC) -- Export default class as noSQL
oFile:Write(sData..sDelim..makTab:Match(iD,4,true,"\"")..sDelim..
"\""..sP.."\""..sDelim.."\""..sO.."\""..sDelim.."\""..sA.."\""..sDelim.."\""..sC.."\"\n")
end
end; return true
@ -1746,12 +1751,12 @@ asmlib.CreateTable("ADDITIONS",{
if(not asmlib.IsHere(stData.Size)) then stData.Size = 0 end
if(not asmlib.IsHere(stData.Slot)) then stData.Slot = snPK end
local nCnt, iID = 2, makTab:Match(arLine[4],4); if(not asmlib.IsHere(iID)) then
asmlib.LogInstance("Cannot match "..asmlib.GetReport3(4,arLine[4],snPK),vSrc); return false end
asmlib.LogInstance("Cannot match "..asmlib.GetReport(4,arLine[4],snPK),vSrc); return false end
stData[iID] = {} -- LineID has to be set properly
while(nCnt <= defTab.Size) do sCol = makTab:GetColumnName(nCnt)
stData[iID][sCol] = makTab:Match(arLine[nCnt],nCnt)
if(not asmlib.IsHere(stData[iID][sCol])) then -- Check data conversion output
asmlib.LogInstance("Cannot match "..asmlib.GetReport3(nCnt,arLine[nCnt],snPK),vSrc); return false
asmlib.LogInstance("Cannot match "..asmlib.GetReport(nCnt,arLine[nCnt],snPK),vSrc); return false
end; nCnt = (nCnt + 1)
end; stData.Size = iID; return true
end,
@ -1762,7 +1767,7 @@ asmlib.CreateTable("ADDITIONS",{
for iIdx = 1, #rec do local tData = rec[iIdx]; oFile:Write(sData)
for iID = 2, defTab.Size do local vData = tData[makTab:GetColumnName(iID)]
local vM = makTab:Match(vData,iID,true,"\""); if(not asmlib.IsHere(vM)) then
asmlib.LogInstance("Cannot match "..asmlib.GetReport3()); return false
asmlib.LogInstance("Cannot match "..asmlib.GetReport(iID,vData)); return false
end; oFile:Write(sDelim..tostring(vM or ""))
end; oFile:Write("\n") -- Data is already inserted, there will be no crash
end
@ -1790,7 +1795,8 @@ asmlib.CreateTable("PHYSPROPERTIES",{
Trigs = {
Record = function(arLine, vSrc)
local noTY = asmlib.GetOpVar("MISS_NOTP")
arLine[1] = asmlib.GetTerm(arLine[1],noTY,asmlib.Categorize()); return true
local emFva = asmlib.GetOpVar("EMPTYSTR_BLDS")
arLine[1] = asmlib.GetEmpty(arLine[1], emFva, asmlib.Categorize(), noTY); return true
end
},
Cache = {
@ -1803,7 +1809,7 @@ asmlib.CreateTable("PHYSPROPERTIES",{
local tNames = tCache[skName]; if(not tNames) then
tCache[skName] = {}; tNames = tCache[skName] end
local iNameID = makTab:Match(arLine[2],2); if(not asmlib.IsHere(iNameID)) then
asmlib.LogInstance("Cannot match "..asmlib.GetReport3(2,arLine[2],snPK),vSrc); return false end
asmlib.LogInstance("Cannot match "..asmlib.GetReport(2,arLine[2],snPK),vSrc); return false end
if(not asmlib.IsHere(tNames[snPK])) then -- If a new type is inserted
tTypes.Size = (tTypes.Size + 1)
tTypes[tTypes.Size] = snPK; tNames[snPK] = {}
@ -1820,7 +1826,7 @@ asmlib.CreateTable("PHYSPROPERTIES",{
asmlib.LogInstance("("..fPref..") No data found",vSrc); return false end
for iInd = 1, tTypes.Size do local sType = tTypes[iInd]
local tType = tNames[sType]; if(not tType) then F:Flush(); F:Close()
asmlib.LogInstance("("..fPref..") Missing index #"..iInd.." on type <"..sType..">",vSrc); return false end
asmlib.LogInstance("("..fPref..") Missing index "..asmlib.GetReport(iInd, sType),vSrc); return false end
for iCnt = 1, tType.Size do local vType = tType[iCnt]
oFile:Write(defTab.Name..sDelim..makTab:Match(sType,1,true,"\"")..
sDelim..makTab:Match(iCnt ,2,true,"\"")..

View File

@ -212,7 +212,7 @@ myExportCategory(myCategory)
* {MODEL, TYPE, NAME, LINEID, POINT, ORIGIN, ANGLE, CLASS}
* MODEL > This string contains the path to your /*.mdl/ file. It is mandatory and
* taken in pairs with LINEID, it forms the unique identifier of every record.
* When used in /DSV/ mode ( like seen below ) is is used as a hash index.
* When used in /DSV/ mode ( like seen below ) it is used as a hash index.
* TYPE > This string is the name of the type your stuff will reside in the panel.
* Disabling this, makes it use the value of the /DEFAULT_TYPE/ variable.
* If it is empty uses the string /TYPE/, so make sure you fill this.
@ -223,17 +223,19 @@ myExportCategory(myCategory)
* a given model key. Disabling this, makes it use the the index of the current line.
* Use that to swap the active points around by only moving the desired row up or down.
* For the example table definition below, the line ID in the database will be the same.
* POINT > This is the local position vector that TA searches and selects the related
* ORIGIN for. An empty string is treated as taking the ORIGIN.
* Disabling this using the disable event makes it hidden when the active point is searched for
* POINT > This is the location vector that TA searches and selects the related ORIGIN for.
* An empty string is treated as taking the ORIGIN when assuming player traces can hit the origin
* Disabling via /#/ makes it take the ORIGIN. Used to disable a point but keep original data
* You can also fill it with attachment event /!/ followed by your attachment name.
* ORIGIN > This is the origin relative to which the next track piece position is calculated
* An empty string is treated as {0,0,0}. Disabling this also makes it use {0,0,0}
* An empty string is treated as {0,0,0}. Disabling via /#/ also makes it use {0,0,0}
* You can also fill it with attachment event /!/ followed by your attachment name. It's mandatory
* ANGLE > This is the angle relative to which the forward and up vectors are calculated.
* An empty string is treated as {0,0,0}. Disabling this also makes it use {0,0,0}
* An empty string is treated as {0,0,0}. Disabling via /#/ also makes it use {0,0,0}
* You can also fill it with attachment event /!/ followed by your attachment name. It's mandatory
* CLASS > This string is populated up when your entity class is not /prop_physics/ but something else
* used by ents.Create of the gmod ents API library. Keep this empty if your stuff is a normal prop.
* Disabling via /#/ makes it take the NULL value. In this case the model is spawned as a prop
]]--
local myPieces = {
["models/shinji85/train/rail_16x.mdl"] = {
@ -354,7 +356,7 @@ mySyncTable("PIECES", myPieces, true)
* It is mandatory and taken in pairs with LINEID, it forms the unique identifier of every record.
* When used in /DSV/ mode ( like seen below ) is is used as a hash index.
* MODELADD > This is the /*.mdl/ path of the addition entity. It is mandatory and cannot be disabled.
* ENTCLASS > This is the class of the addition entity. It is mandatory and cannot be disabled.
* ENTCLASS > This is the class of the addition entity. When disabled or missing it defaults to a normal prop.
* LINEID > This is the ID of the point that can be selected for building. They must be
* sequential and mandatory. If provided, the ID must the same as the row index under
* a given model key. Disabling this, makes it use the the index of the current line.

View File

@ -25,16 +25,16 @@ E2Helper.Descriptions["trackasmlibHasAdditions(e:)"] = "Returns 1 when the recor
E2Helper.Descriptions["trackasmlibHasAdditions(s)"] = "Returns 1 when the record has additions and 0 otherwise by model"
E2Helper.Descriptions["trackasmlibIsPiece(e:)"] = "Returns 1 when the record is actual track and 0 otherwise by entity"
E2Helper.Descriptions["trackasmlibIsPiece(s)"] = "Returns 1 when the record is actual track and 0 otherwise by model"
E2Helper.Descriptions["trackasmlibMakePiece(e:va)"] = "Duplicates the given track using the new position and angle"
E2Helper.Descriptions["trackasmlibMakePiece(e:van)"] = "Creates new track piece with position angle, mass by entity"
E2Helper.Descriptions["trackasmlibMakePiece(e:vans)"] = "Creates new track piece with position angle, mass and skin code by entity"
E2Helper.Descriptions["trackasmlibMakePiece(e:vansnnnn)"] = "Creates new track piece with position angle, mass, skin code, color and alpha as numbers by entity"
E2Helper.Descriptions["trackasmlibMakePiece(e:vansv)"] = "Creates new track piece with position angle, mass, skin code and color as vector alpha is 255 by entity"
E2Helper.Descriptions["trackasmlibMakePiece(e:vansvn)"] = "Creates new track piece with position angle, mass, skin code and color as vector alpha as number by entity"
E2Helper.Descriptions["trackasmlibMakePiece(svan)"] = "Creates new track piece with position angle, mass by model"
E2Helper.Descriptions["trackasmlibMakePiece(svans)"] = "Creates new track piece with position angle, mass and skin code by model"
E2Helper.Descriptions["trackasmlibMakePiece(svansnnnn)"] = "Creates new track piece with position angle, mass, skin code and color and alpha as numbers by model"
E2Helper.Descriptions["trackasmlibMakePiece(svansv)"] = "Creates new track piece with position angle, mass, skin code and color as vector alpha is 255 by model"
E2Helper.Descriptions["trackasmlibMakePiece(svansvn)"] = "Creates new track piece with position angle, mass, skin code and color as vector alpha by as number model"
E2Helper.Descriptions["trackasmlibNewPiece(e:va)"] = "Duplicates the given track using the new position and angle"
E2Helper.Descriptions["trackasmlibNewPiece(e:van)"] = "Creates new track piece with position angle, mass by entity"
E2Helper.Descriptions["trackasmlibNewPiece(e:vans)"] = "Creates new track piece with position angle, mass and skin code by entity"
E2Helper.Descriptions["trackasmlibNewPiece(e:vansnnnn)"] = "Creates new track piece with position angle, mass, skin code, color and alpha as numbers by entity"
E2Helper.Descriptions["trackasmlibNewPiece(e:vansv)"] = "Creates new track piece with position angle, mass, skin code and color as vector alpha is 255 by entity"
E2Helper.Descriptions["trackasmlibNewPiece(e:vansvn)"] = "Creates new track piece with position angle, mass, skin code and color as vector alpha as number by entity"
E2Helper.Descriptions["trackasmlibNewPiece(svan)"] = "Creates new track piece with position angle, mass by model"
E2Helper.Descriptions["trackasmlibNewPiece(svans)"] = "Creates new track piece with position angle, mass and skin code by model"
E2Helper.Descriptions["trackasmlibNewPiece(svansnnnn)"] = "Creates new track piece with position angle, mass, skin code and color and alpha as numbers by model"
E2Helper.Descriptions["trackasmlibNewPiece(svansv)"] = "Creates new track piece with position angle, mass, skin code and color as vector alpha is 255 by model"
E2Helper.Descriptions["trackasmlibNewPiece(svansvn)"] = "Creates new track piece with position angle, mass, skin code and color as vector alpha by as number model"
E2Helper.Descriptions["trackasmlibSnapEntity(e:vsnnnnva)"] = "Returns track entity snap position and angle array by holder model, point ID, active radius, flatten, ignore type, position offset and angle offset"
E2Helper.Descriptions["trackasmlibSnapNormal(vasnva)"] = "Returns track surface snap position and angle array by position, angle, model, point ID, position offset and angle offset"

View File

@ -16,6 +16,8 @@ local Angle = Angle
local Color = Color
local tonumber = tonumber
local tostring = tostring
local istable = istable
local isnumber = isnumber
local mathClamp = math and math.Clamp
local cvarsAddChangeCallback = cvars and cvars.AddChangeCallback
local cvarsRemoveChangeCallback = cvars and cvars.RemoveChangeCallback
@ -23,10 +25,6 @@ local cvarsRemoveChangeCallback = cvars and cvars.RemoveChangeCallback
--[[ **************************** CONFIGURATION **************************** ]]
local anyTrue, anyFalse = 1, 0
local cvX, cvY, cvZ = asmlib.GetIndexes("V")
local caP, caY, caR = asmlib.GetIndexes("A")
local wvX, wvY, wvZ = asmlib.GetIndexes("WV")
local waP, waY, waR = asmlib.GetIndexes("WA")
local gsBErr = asmlib.GetAsmConvar("bnderrmod","STR")
local enFlag = asmlib.GetAsmConvar("enwiremod","BUL")
local gnMaxMass = asmlib.GetAsmConvar("maxmass","FLT")
@ -62,10 +60,10 @@ local function getDataFormat(sForm, oEnt, ucsEnt, sType, sName, nPnt, sP)
if(not (oEnt and oEnt:IsValid() and enFlag)) then return "" end
if(not (ucsEnt and ucsEnt:IsValid())) then return "" end
local ucsPos, ucsAng, sM = ucsEnt:GetPos(), ucsEnt:GetAngles(), oEnt:GetModel()
local sO = ""; if(ucsPos[cvX] ~= 0 or ucsPos[cvY] ~= 0 or ucsPos[cvZ] ~= 0) then
sO = tostring(ucsPos[cvX])..","..tostring(ucsPos[cvY])..","..tostring(ucsPos[cvZ]) end
local sA = ""; if(ucsAng[caP] ~= 0 or ucsAng[caY] ~= 0 or ucsAng[caP] ~= 0) then
sA = tostring(ucsAng[caP])..","..tostring(ucsAng[caY])..","..tostring(ucsAng[caR]) end
local sO = ""; if(not ucsPos:IsZero()) then local nX, nY, nZ = ucsPos:Unpack()
sO = tostring(nX)..","..tostring(nY)..","..tostring(nZ) end
local sA = ""; if(not ucsAng:IsZero()) then local nP, nY, nR = ucsAng:Unpack()
sA = tostring(nP)..","..tostring(nY)..","..tostring(nR) end
local sC = (oEnt:GetClass() ~= "prop_physics" and oEnt:GetClass() or "")
local sN = asmlib.IsBlank(sName) and asmlib.ModelToName(sM) or sName
return sForm:format(sM, sType, sN, tonumber(nPnt or 0), sP, sO, sA, sC)
@ -88,10 +86,11 @@ e2function array entity:trackasmlibSnapEntity(vector trHitPos , string hdModel
number nActRadius, number enFlatten, number enIgnTyp,
vector ucsOffPos , angle ucsOffAng)
if(not (this and this:IsValid() and enFlag)) then return {} end
local nX, nY, nZ = ucsOffPos:Unpack()
local nP, nY, nR = ucsOffAng:Unpack()
local stSpawn = asmlib.GetEntitySpawn(self.player, this, trHitPos, hdModel, hdPoID,
nActRadius, (enFlatten ~= 0), (enIgnTyp ~= 0),
ucsOffPos[cvX], ucsOffPos[cvY], ucsOffPos[cvZ],
ucsOffAng[caP], ucsOffAng[caY], ucsOffAng[caR])
nX, nY, nZ, nP, nY, nR)
if(not stSpawn) then return {} end
return {Vector(stSpawn.SPos), Angle(stSpawn.SAng)}
end
@ -100,9 +99,10 @@ __e2setcost(80)
e2function array trackasmlibSnapNormal(vector ucsPos, angle ucsAng , string hdModel,
number hdPoID, vector ucsOffPos, angle ucsOffAng)
if(not enFlag) then return {} end
local nX, nY, nZ = ucsOffPos:Unpack()
local nP, nY, nR = ucsOffAng:Unpack()
local stSpawn = asmlib.GetNormalSpawn(self.player, ucsPos, ucsAng, hdModel, hdPoID,
ucsOffPos[cvX], ucsOffPos[cvY], ucsOffPos[cvZ],
ucsOffAng[caP], ucsOffAng[caY], ucsOffAng[caR])
nX, nY, nZ, nP, nY, nR)
if(not stSpawn) then return {} end
return {Vector(stSpawn.SPos), Angle(stSpawn.SAng)}
end
@ -123,27 +123,27 @@ e2function number entity:trackasmlibIsPiece()
if(stRec) then return anyTrue else return anyFalse end
end
local function getPieceOffset(sModel, nID, sPOA)
local stPOA = asmlib.LocatePOA(asmlib.CacheQueryPiece(sModel),nID)
if(not stPOA) then return {} end
local sPOA, arOut, C1, C2, C3 = tostring(sPOA):upper():sub(1,1), {0,0,0}
if (sPOA == "P") then C1, C2, C3 = cvX, cvY, cvZ
elseif(sPOA == "O") then C1, C2, C3 = cvX, cvY, cvZ
elseif(sPOA == "A") then C1, C2, C3 = caP, caY, caR else return arOut end
arOut[1], arOut[2], arOut[3] = stPOA[sPOA][C1] , stPOA[sPOA][C2] , stPOA[sPOA][C3]
return arOut
local function getPieceOffset(sModel, nID, sKey)
if(not enFlag) then return nil end
if(not sKey) then return nil end
local oRec = asmlib.CacheQueryPiece(sModel)
if(not oRec) then return nil end
local tPOA = asmlib.LocatePOA(oRec, nID)
if(not tPOA) then return nil end
return tPOA[sKey] -- The component
end
__e2setcost(80)
e2function array trackasmlibGetOffset(string sModel, number nID, string sPOA)
if(not enFlag) then return {} end
return getPieceOffset(sModel, nID, sPOA)
local oPOA = getPieceOffset(sModel, nID, sPOA)
return (oPOA and oPOA:Array() or {})
end
__e2setcost(80)
e2function array entity:trackasmlibGetOffset(number nID, string sPOA)
if(not (this and this:IsValid() and enFlag)) then return {} end
return getPieceOffset(this:GetModel(), nID, sPOA)
if(not (this and this:IsValid())) then return {} end
local oPOA = getPieceOffset(this:GetModel(), nID, sPOA)
return (oPOA and oPOA:Array() or {})
end
__e2setcost(30)
@ -271,7 +271,7 @@ end
--[[ **************************** CREATOR **************************** ]]
local function makePiece(oPly, oEnt, sModel, vPos, aAng, nMass, sBgpID, nR, nG, nB, nA)
local function newPiece(oPly, oEnt, sModel, vPos, aAng, nMass, sBgpID, nR, nG, nB, nA)
if(not enFlag) then return nil end
if(not asmlib.IsPlayer(oPly)) then return nil end
if(oEnt and not oEnt:IsValid()) then return nil end
@ -284,74 +284,74 @@ local function makePiece(oPly, oEnt, sModel, vPos, aAng, nMass, sBgpID, nR, nG,
if(not (oEnt and oEnt:IsValid())) then sBsID = "0/0" else -- Use bodygroup and skin
sBsID = asmlib.GetPropBodyGroup(oEnt)..sDir..asmlib.GetPropSkin(oEnt) end
end -- Color handling. Apply color based on the conditions
if(asmlib.IsNumber(oCol)) then -- Color specifier is a number
if(isnumber(oCol)) then -- Color specifier is a number
oCol = asmlib.GetColor(nR,nG,nB,nA) -- Try last 4 arguments as numbers
elseif(asmlib.IsTable(oCol)) then -- Attempt to extract keys information from the table
elseif(istable(oCol)) then -- Attempt to extract keys information from the table
oCol = asmlib.GetColor((oCol[1] or oCol["r"]), -- Numerical indices are with priority to hash
(oCol[2] or oCol["g"]), -- Numerical indices are with priority to hash
(oCol[3] or oCol["b"]), -- Numerical indices are with priority to hash
nA or (oCol[4] or oCol["a"])) -- Use argument alpha with priority
else oCol = asmlib.GetColor(255,255,255,nA) end -- Use white for default color value
return asmlib.MakePiece(oPly,stRec.Slot,vPos,aAng,mathClamp(nMs,1,gnMaxMass),sBsID,oCol,gsBErr)
return asmlib.NewPiece(oPly,stRec.Slot,vPos,aAng,mathClamp(nMs,1,gnMaxMass),sBsID,oCol,gsBErr)
end
__e2setcost(50)
e2function entity trackasmlibMakePiece(string sModel, vector vPos, angle aAng, number nMass, string sBgpID, number nR, number nG, number nB, number nA)
return makePiece(self.player, nil, sModel, vPos, aAng, nMass, sBgpID, nR, nG, nB, nA)
e2function entity trackasmlibNewPiece(string sModel, vector vPos, angle aAng, number nMass, string sBgpID, number nR, number nG, number nB, number nA)
return newPiece(self.player, nil, sModel, vPos, aAng, nMass, sBgpID, nR, nG, nB, nA)
end
__e2setcost(50)
e2function entity entity:trackasmlibMakePiece(vector vPos, angle aAng, number nMass, string sBgpID, number nR, number nG, number nB, number nA)
return makePiece(self.player, this, nil, vPos, aAng, nMass, sBgpID, nR, nG, nB, nA)
e2function entity entity:trackasmlibNewPiece(vector vPos, angle aAng, number nMass, string sBgpID, number nR, number nG, number nB, number nA)
return newPiece(self.player, this, nil, vPos, aAng, nMass, sBgpID, nR, nG, nB, nA)
end
__e2setcost(50)
e2function entity trackasmlibMakePiece(string sModel, vector vPos, angle aAng, number nMass, string sBgpID, vector vColor, number nA)
return makePiece(self.player, nil, sModel, vPos, aAng, nMass, sBgpID, vColor, nil, nil, nA)
e2function entity trackasmlibNewPiece(string sModel, vector vPos, angle aAng, number nMass, string sBgpID, vector vColor, number nA)
return newPiece(self.player, nil, sModel, vPos, aAng, nMass, sBgpID, vColor, nil, nil, nA)
end
__e2setcost(50)
e2function entity entity:trackasmlibMakePiece(vector vPos, angle aAng, number nMass, string sBgpID, vector vColor, number nA)
return makePiece(self.player, this, nil, vPos, aAng, nMass, sBgpID, vColor, nil, nil, nA)
e2function entity entity:trackasmlibNewPiece(vector vPos, angle aAng, number nMass, string sBgpID, vector vColor, number nA)
return newPiece(self.player, this, nil, vPos, aAng, nMass, sBgpID, vColor, nil, nil, nA)
end
__e2setcost(50)
e2function entity trackasmlibMakePiece(string sModel, vector vPos, angle aAng, number nMass, string sBgpID, vector vColor)
return makePiece(self.player, nil, sModel, vPos, aAng, nMass, sBgpID, vColor)
e2function entity trackasmlibNewPiece(string sModel, vector vPos, angle aAng, number nMass, string sBgpID, vector vColor)
return newPiece(self.player, nil, sModel, vPos, aAng, nMass, sBgpID, vColor)
end
__e2setcost(50)
e2function entity entity:trackasmlibMakePiece(vector vPos, angle aAng, number nMass, string sBgpID, vector vColor)
return makePiece(self.player, this, nil, vPos, aAng, nMass, sBgpID, vColor)
e2function entity entity:trackasmlibNewPiece(vector vPos, angle aAng, number nMass, string sBgpID, vector vColor)
return newPiece(self.player, this, nil, vPos, aAng, nMass, sBgpID, vColor)
end
__e2setcost(50)
e2function entity trackasmlibMakePiece(string sModel, vector vPos, angle aAng, number nMass, string sBgpID)
return makePiece(self.player, nil, sModel, vPos, aAng, nMass, sBgpID)
e2function entity trackasmlibNewPiece(string sModel, vector vPos, angle aAng, number nMass, string sBgpID)
return newPiece(self.player, nil, sModel, vPos, aAng, nMass, sBgpID)
end
__e2setcost(50)
e2function entity entity:trackasmlibMakePiece(vector vPos, angle aAng, number nMass, string sBgpID)
return makePiece(self.player, this, nil, vPos, aAng, nMass, sBgpID)
e2function entity entity:trackasmlibNewPiece(vector vPos, angle aAng, number nMass, string sBgpID)
return newPiece(self.player, this, nil, vPos, aAng, nMass, sBgpID)
end
__e2setcost(50)
e2function entity trackasmlibMakePiece(string sModel, vector vPos, angle aAng, number nMass)
return makePiece(self.player, nil, sModel, vPos, aAng, nMass)
e2function entity trackasmlibNewPiece(string sModel, vector vPos, angle aAng, number nMass)
return newPiece(self.player, nil, sModel, vPos, aAng, nMass)
end
__e2setcost(50)
e2function entity entity:trackasmlibMakePiece(vector vPos, angle aAng, number nMass)
return makePiece(self.player, this, nil, vPos, aAng, nMass)
e2function entity entity:trackasmlibNewPiece(vector vPos, angle aAng, number nMass)
return newPiece(self.player, this, nil, vPos, aAng, nMass)
end
__e2setcost(50)
e2function entity entity:trackasmlibMakePiece(vector vPos, angle aAng)
return makePiece(self.player, this, nil, vPos, aAng)
e2function entity entity:trackasmlibNewPiece(vector vPos, angle aAng)
return newPiece(self.player, this, nil, vPos, aAng)
end
__e2setcost(15)
e2function entity entity:trackasmlibApplyPhysicalAnchor(entity eBase, number nWe, number nNc, number nNw, number nFm)
e2function number entity:trackasmlibApplyPhysicalAnchor(entity eBase, number nWe, number nNc, number nNw, number nFm)
if(not (this and this:IsValid() and enFlag)) then return anyFalse end
if(not (eBase and eBase:IsValid())) then return anyFalse end
local stRec = asmlib.CacheQueryPiece(this:GetModel()); if(not stRec) then return anyFalse end
@ -359,7 +359,7 @@ e2function entity entity:trackasmlibApplyPhysicalAnchor(entity eBase, number nWe
end
__e2setcost(15)
e2function entity entity:trackasmlibApplyPhysicalSettings(number nPi, number nFr, number nGr, string sPh)
e2function number entity:trackasmlibApplyPhysicalSettings(number nPi, number nFr, number nGr, string sPh)
if(not (this and this:IsValid() and enFlag)) then return anyFalse end
local stRec = asmlib.CacheQueryPiece(this:GetModel()); if(not stRec) then return anyFalse end
return asmlib.ApplyPhysicalSettings(this,(nPi~=0),(nFr~=0),(nGr~=0),sPh) and anyTrue or anyFalse
@ -381,12 +381,12 @@ end
__e2setcost(20)
e2function string entity:trackasmlibGetBodyGroups()
if(not (this and this:IsValid() and enFlag)) then return 0 end
if(not (this and this:IsValid() and enFlag)) then return "" end
return asmlib.GetPropBodyGroup(this)
end
__e2setcost(20)
e2function string entity:trackasmlibGetSkin()
if(not (this and this:IsValid() and enFlag)) then return 0 end
if(not (this and this:IsValid() and enFlag)) then return "" end
return asmlib.GetPropSkin(this)
end

File diff suppressed because it is too large Load Diff

View File

@ -10,6 +10,7 @@ local IsValid = IsValid
local EntityID = Entity
local tostring = tostring
local tonumber = tonumber
local istable = istable
local GetConVar = GetConVar
local LocalPlayer = LocalPlayer
local SetClipboardText = SetClipboardText
@ -60,12 +61,6 @@ local asmlib = trackasmlib; if(not asmlib) then -- Module present
if(not asmlib.IsInit()) then -- Make sure the module is initialized
ErrorNoHalt("TOOL: Track assembly tool not initialized!\n"); return end
--- Vector Component indexes ---
local cvX, cvY, cvZ = asmlib.GetIndexes("V")
--- Angle Component indexes ---
local caP, caY, caR = asmlib.GetIndexes("A")
--- Global References
local gtLogs = {"TOOL"}
local gsLibName = asmlib.GetOpVar("NAME_LIBRARY")
@ -494,7 +489,7 @@ function TOOL:ClearAnchor(bMute)
asmlib.UpdateColor(svEnt, "anchor", "an", false) end
if(not bMute) then -- Notify the user when anchor is cleared
asmlib.Notify(user,"Anchor: Cleaned "..siAnc.." !","CLEANUP") end
asmlib.LogInstance("Cleared "..asmlib.GetReport1(bMute),gtLogs); return true
asmlib.LogInstance("Cleared "..asmlib.GetReport(bMute),gtLogs); return true
end
function TOOL:SetAnchor(stTrace)
@ -512,7 +507,7 @@ function TOOL:SetAnchor(stTrace)
self:SetObject(1,trEnt,stTrace.HitPos,phEnt,stTrace.PhysicsBone,stTrace.HitNormal)
asmlib.SetAsmConvar(user,"anchor",sAnchor)
asmlib.Notify(user,"Anchor: Set "..sAnchor.." !","UNDO")
asmlib.LogInstance("(WORLD) Set "..asmlib.GetReport1(sAnchor),gtLogs)
asmlib.LogInstance("(WORLD) Set "..asmlib.GetReport(sAnchor),gtLogs)
else
local trEnt = stTrace.Entity; if(not (trEnt and trEnt:IsValid())) then
asmlib.LogInstance("Trace no entity",gtLogs); return false end
@ -523,7 +518,7 @@ function TOOL:SetAnchor(stTrace)
self:SetObject(1,trEnt,stTrace.HitPos,phEnt,stTrace.PhysicsBone,stTrace.HitNormal)
asmlib.SetAsmConvar(user,"anchor",sAnchor)
asmlib.Notify(user,"Anchor: Set "..sAnchor.." !","UNDO")
asmlib.LogInstance("(PROP) Set "..asmlib.GetReport1(sAnchor),gtLogs)
asmlib.LogInstance("(PROP) Set "..asmlib.GetReport(sAnchor),gtLogs)
end; return true
end
@ -673,48 +668,54 @@ function TOOL:GetFlipOver(bEnt, bMute)
tF[iD] = (tonumber(tF[iD]) or 0)
if(bEnt) then
local eID = EntityID(tF[iD])
local bID = (not asmlib.IsOther(eID))
local bMR = eID:GetNWBool(gsToolPrefL.."flipover")
if(bID and bMR) then tF[iD] = eID else tF[iD] = nil
if(SERVER and not bMute) then
local sR, sE = asmlib.GetReport4(iD, eID, bID, bMR), tostring(tF[iD])
asmlib.LogInstance("Flip over mismatch ID "..sR, gtLogs)
asmlib.Notify(user, "Flip over mismatch ID ["..sE.."] !", "GENERIC")
if(eID and eID:IsValid()) then
local bID = (not asmlib.IsOther(eID))
local bMR = eID:GetNWBool(gsToolPrefL.."flipover")
if(bID and bMR) then tF[iD] = eID else tF[iD] = nil
if(SERVER and not bMute) then
local sR, sE = asmlib.GetReport(iD, eID, bID, bMR), tostring(tF[iD])
asmlib.LogInstance("Flip over mismatch ID "..sR, gtLogs)
asmlib.Notify(user, "Flip over mismatch ID ["..sE.."] !", "GENERIC")
end
end
end
end
end
-- Convert to number as other methods use the number data
end -- Convert to number as other methods use the number data
return tF, nF -- Return the table and elements count
end
function TOOL:SetFlipOver(trEnt)
function TOOL:SetFlipOver(trEnt, bBrs)
if(CLIENT) then return nil end
if(asmlib.IsOther(trEnt)) then return nil end
local trMod, user = trEnt:GetModel(), self:GetOwner()
local trRec = asmlib.CacheQueryPiece(trMod)
local user = self:GetOwner()
local trCss = trEnt:GetClass()
local trMoc = trEnt:GetModel()
if(not asmlib.IsHere(trMoc)) then return nil end
local trRec = asmlib.CacheQueryPiece(trMoc)
if(not asmlib.IsHere(trRec)) then
asmlib.Notify(user,"Flip over <"..trMod.."> not piece !","ERROR")
asmlib.LogInstance("Flip over <"..trMod.."> not piece",gtLogs)
asmlib.Notify(user,"Flip over not piece "..asmlib.GetReport(trCss,trMoc).." !","ERROR")
asmlib.LogInstance("Flip over not piece "..asmlib.GetReport(trCss,trMoc),gtLogs)
return nil -- Just disable overall flipping for the other models
end
local sYm = asmlib.GetOpVar("OPSYM_SEPARATOR")
local iID, bBr = trEnt:EntIndex(), false
local tF, nF = self:GetFlipOver()
if(nF <= 0) then tF = {} -- Create table
else -- Remove entity from the convar
for iD = 1, nF do nID = tF[iD]
if(nID == iID) then bBr = true
local eID = EntityID(nID)
asmlib.UpdateColor(eID, "flipover", "fo", false)
tableRemove(tF, iD); break
if(bBrs) then return trEnt else
local sYm = asmlib.GetOpVar("OPSYM_SEPARATOR")
local iID, bBr = trEnt:EntIndex(), false
local tF, nF = self:GetFlipOver()
if(nF <= 0) then tF = {} -- Create table
else -- Remove entity from the convar
for iD = 1, nF do nID = tF[iD]
if(nID == iID) then bBr = true
local eID = EntityID(nID)
asmlib.UpdateColor(eID, "flipover", "fo", false)
tableRemove(tF, iD); break
end
end
end
if(not bBr) then tableInsert(tF, tostring(iID))
asmlib.UpdateColor(trEnt, "flipover", "fo", true)
end
asmlib.SetAsmConvar(user, "flipoverid", tableConcat(tF, sYm))
end
if(not bBr) then tableInsert(tF, tostring(iID))
asmlib.UpdateColor(trEnt, "flipover", "fo", true)
end
asmlib.SetAsmConvar(user, "flipoverid", tableConcat(tF, sYm))
end
function TOOL:ClearFlipOver(bMute)
@ -745,21 +746,21 @@ function TOOL:GetFlipOverOrigin(stTrace, bPnt)
local pointid, pnextid = self:GetPointID()
local vXX, vO1, vO2 = asmlib.IntersectRayModel(trMod, pointid, pnextid)
if(vXX) then
wOrig:SetUnpacked(trPOA.O[cvX], trPOA.O[cvY], trPOA.O[cvZ])
wOrig:SetUnpacked(trPOA.O:Get())
wOrig:Set(trEnt:LocalToWorld(wOrig))
wOver:Set(trEnt:LocalToWorld(vXX))
vO1:Set(trEnt:LocalToWorld(vO1))
vO2:Set(trEnt:LocalToWorld(vO2))
wAucs:SetUnpacked(trPOA.A[caP], trPOA.A[caY], trPOA.A[caR])
wAucs:SetUnpacked(trPOA.A:Get())
wAucs:Set(trEnt:LocalToWorldAngles(wAucs))
wNorm:Set(wAucs:Up())
return wOver, wNorm, wOrig, vO1, vO2
end
else
if(trPOA) then
wOrig:SetUnpacked(trPOA.O[cvX], trPOA.O[cvY], trPOA.O[cvZ])
wOrig:SetUnpacked(trPOA.O:Get())
wOrig:Set(trEnt:LocalToWorld(wOrig))
wAucs:SetUnpacked(trPOA.A[caP], trPOA.A[caY], trPOA.A[caR])
wAucs:SetUnpacked(trPOA.A:Get())
wAucs:Set(trEnt:LocalToWorldAngles(wAucs))
wNorm:Set(wAucs:Up())
return wOver, wNorm, wOrig
@ -887,9 +888,9 @@ function TOOL:GetCurveTransform(stTrace, bPnt)
if(bPnt and eEnt and eEnt:IsValid()) then
local oID, oMin, oPOA, oRec = asmlib.GetEntityHitID(eEnt, tData.Hit, true)
if(oID and oMin and oPOA and oRec) then
tData.Org:SetUnpacked(oPOA.O[cvX], oPOA.O[cvY], oPOA.O[cvZ])
tData.Org:SetUnpacked(oPOA.O:Get())
tData.Org:Rotate(eEnt:GetAngles()); tData.Org:Add(eEnt:GetPos())
tData.Ang:SetUnpacked(oPOA.A[caP], oPOA.A[caY], oPOA.A[caR])
tData.Ang:SetUnpacked(oPOA.A:Get())
tData.Ang:Set(eEnt:LocalToWorldAngles(tData.Ang))
tData.Orw:Set(tData.Org); tData.Anw:Set(tData.Ang) -- Transform of POA
tData.ID = oID; tData.Min = oMin -- Point ID and minimum distance
@ -1011,12 +1012,12 @@ function TOOL:CurveCheck()
end
-- Read the active point and check piece shape
local sO, sA = tC.Info.Pos[1], tC.Info.Ang[1]
sO:SetUnpacked(sPOA.O[cvX], sPOA.O[cvY], sPOA.O[cvZ])
sA:SetUnpacked(sPOA.A[caP], sPOA.A[caY], sPOA.A[caR])
sO:SetUnpacked(sPOA.O:Get())
sA:SetUnpacked(sPOA.A:Get())
-- Read the next point to check the piece shape
local eO, eA = tC.Info.Pos[2], tC.Info.Ang[2]
eO:SetUnpacked(ePOA.O[cvX], ePOA.O[cvY], ePOA.O[cvZ])
eA:SetUnpacked(ePOA.A[caP], ePOA.A[caY], ePOA.A[caR])
eO:SetUnpacked(ePOA.O:Get())
eA:SetUnpacked(ePOA.A:Get())
-- Disable for active points with zero distance
local nD = eO:DistToSqr(sO); if(nD <= nEps) then
asmlib.Notify(user,"Segment tiny "..fnmodel.." !","ERROR")
@ -1094,7 +1095,7 @@ function TOOL:NormalSpawn(stTrace, oPly)
if(trEnt and trEnt:IsValid()) then anEnt = trEnt end -- Switch-a-roo
end -- If there is something wrong with the anchor entity use the trace
end -- When the flag is not enabled must not automatically update anchor
local ePiece = asmlib.MakePiece(oPly,model,vPos,aAng,mass,bgskids,conPalette:Select("w"),bnderrmod)
local ePiece = asmlib.NewPiece(oPly,model,vPos,aAng,mass,bgskids,conPalette:Select("w"),bnderrmod)
if(ePiece) then
if(spawncn) then -- Adjust the position when created correctly
asmlib.SetCenter(ePiece, vPos, aAng, nextx, -nexty, nextz)
@ -1187,18 +1188,18 @@ function TOOL:LeftClick(stTrace)
asmlib.LogInstance(self:GetStatus(stTrace,"("..oArg.wname..") "..sItr..": Cannot obtain spawn data"),gtLogs); return false end
if(crvturnlm > 0 or crvleanlm > 0) then local nF, nU = asmlib.GetTurningFactor(oPly, tS, iK)
if(nF and nF < crvturnlm) then
oArg.mundo = asmlib.GetReport3(iD, asmlib.GetNearest(tV[1], tC.Node), ("%4.3f"):format(nF))
oArg.mundo = asmlib.GetReport(iD, asmlib.GetNearest(tV[1], tC.Node), ("%4.3f"):format(nF))
asmlib.Notify(oPly, oArg.wname.." excessive turn at "..oArg.mundo.." !", "ERROR")
asmlib.LogInstance(self:GetStatus(stTrace,"("..oArg.wname..") "..oArg.mundo..": Turn excessive"), gtLogs); return false
end
if(nU and nU < crvleanlm) then
oArg.mundo = asmlib.GetReport3(iD, asmlib.GetNearest(tV[1], tC.Node),("%4.3f"):format(nU))
oArg.mundo = asmlib.GetReport(iD, asmlib.GetNearest(tV[1], tC.Node),("%4.3f"):format(nU))
asmlib.Notify(oPly, oArg.wname.." excessive lean at "..oArg.mundo.." !", "ERROR")
asmlib.LogInstance(self:GetStatus(stTrace,"("..oArg.wname..") "..oArg.mundo..": Lean excessive"), gtLogs); return false
end
end
while(oArg.itrys < maxstatts and not ePiece) do oArg.itrys = (oArg.itrys + 1)
ePiece = asmlib.MakePiece(oPly,model,oArg.spawn.SPos,oArg.spawn.SAng,mass,bgskids,conPalette:Select("w"),bnderrmod) end
ePiece = asmlib.NewPiece(oPly,model,oArg.spawn.SPos,oArg.spawn.SAng,mass,bgskids,conPalette:Select("w"),bnderrmod) end
if(stackcnt > 0) then if(oArg.istck < stackcnt) then oArg.istck = (oArg.istck + 1) else ePiece:Remove(); ePiece = nil end end
oArg.imake = (oArg.imake + (ePiece and 1 or 0)); sItr = fInt:format(oArg.imake)
oPly:SetNWFloat(gsToolPrefL.."progress", (oArg.imake / tC.SKept) * 100)
@ -1217,7 +1218,7 @@ function TOOL:LeftClick(stTrace)
else -- When there is more stuff to snap continue snapping the current
oArg.stark = (oArg.stark + 1) -- Move the snap cursor to the next snap
end -- Write the logs that snap rate per tick has been reached
asmlib.LogInstance("("..oArg.wname..") "..sItr..": Next "..asmlib.GetReport2(oArg.stard, oArg.stark), gtLogs)
asmlib.LogInstance("("..oArg.wname..") "..sItr..": Next "..asmlib.GetReport(oArg.stard, oArg.stark), gtLogs)
return true -- The server is still busy with the task
end
else oArg.mundo = sItr -- We still have enough memory to preform the stacking
@ -1273,18 +1274,18 @@ function TOOL:LeftClick(stTrace)
oArg.mundo, oArg.munid = eID:GetModel(), eID:EntIndex()
local spPos, spAng = asmlib.GetTransformOBB(eID, oArg.wover, oArg.wnorm, nextx, nexty, nextz, nextpic, nextyaw, nextrol)
while(oArg.itrys < maxstatts and not ePiece) do oArg.itrys = (oArg.itrys + 1)
ePiece = asmlib.MakePiece(oPly,oArg.mundo,spPos,spAng,mass,bgskids,conPalette:Select("w"),bnderrmod) end
ePiece = asmlib.NewPiece(oPly,oArg.mundo,spPos,spAng,mass,bgskids,conPalette:Select("w"),bnderrmod) end
if(ePiece) then
asmlib.RegConstraintOver(oArg.tcons, oArg.munid, ePiece)
oArg.itrys, oArg.srate = 0, (oArg.srate - 1) -- When the routine item is still busy
tableInsert(oArg.eundo, ePiece) -- Add the entity to the undo list created at the end
if(oArg.srate <= 0) then -- Renew the spawn rate and prepare for next spawn
oArg.start, oArg.srate = (iD + 1), spawnrate
asmlib.LogInstance("(Over) Next "..asmlib.GetReport2(oArg.stard, oArg.stark), gtLogs)
asmlib.LogInstance("(Over) Next "..asmlib.GetReport(oArg.stard, oArg.stark), gtLogs)
return true -- The server is still busy with the task
end
else
asmlib.Notify(user, "Spawn data invalid "..asmlib.GetReport2(iD, oArg.mundo).." !", "ERROR")
asmlib.Notify(user, "Spawn data invalid "..asmlib.GetReport(iD, oArg.mundo).." !", "ERROR")
asmlib.LogInstance(self:GetStatus(stTrace,"(Over) Spawn data invalid",trEnt),gtLogs); return false
end
end
@ -1298,7 +1299,7 @@ function TOOL:LeftClick(stTrace)
end)
poQueue:OnFinish(user, function(oPly, oArg)
local nU = #oArg.eundo
asmlib.UndoCrate(gsUndoPrefN..asmlib.GetReport2(oArg.ients, fnmodel).." ( Over )")
asmlib.UndoCrate(gsUndoPrefN..asmlib.GetReport(oArg.ients, fnmodel).." ( Over )")
for iD = 1, nU do asmlib.UndoAddEntity(oArg.eundo[iD]) end
asmlib.UndoFinish(oPly)
oPly:SetNWFloat(gsToolPrefL.."progress", 0)
@ -1352,7 +1353,7 @@ function TOOL:LeftClick(stTrace)
asmlib.LogInstance(self:GetStatus(stTrace,"(Over) Failed to apply physical settings",trEnt),gtLogs); return false end
local spPos, spAng = asmlib.GetTransformOBB(anEnt, trEnt:LocalToWorld(trEnt:OBBCenter()),
stTrace.HitNormal, nextx, nexty, nextz, nextpic, nextyaw, nextrol)
local ePiece = asmlib.MakePiece(user,anEnt:GetModel(),spPos,spAng,mass,bgskids,conPalette:Select("w"),bnderrmod)
local ePiece = asmlib.NewPiece(user,anEnt:GetModel(),spPos,spAng,mass,bgskids,conPalette:Select("w"),bnderrmod)
if(ePiece) then
if(not asmlib.ApplyPhysicalSettings(ePiece,ignphysgn,freeze,gravity,physmater)) then
asmlib.LogInstance(self:GetStatus(stTrace,"(Over) Apply physical settings fail"),gtLogs); return false end
@ -1392,7 +1393,7 @@ function TOOL:LeftClick(stTrace)
oPly:SetNWFloat(gsToolPrefL.."progress", 100 * (iD / stackcnt))
local sItr, ePiece = asmlib.GetOpVar("FORM_INTEGER"):format(iD), nil
while(oArg.itrys < maxstatts and not ePiece) do oArg.itrys = (oArg.itrys + 1)
ePiece = asmlib.MakePiece(oPly,model,oArg.sppos,oArg.spang,mass,bgskids,conPalette:Select("w"),bnderrmod) end
ePiece = asmlib.NewPiece(oPly,model,oArg.sppos,oArg.spang,mass,bgskids,conPalette:Select("w"),bnderrmod) end
if(ePiece) then -- Set position is valid and store reference to the track piece
if(not asmlib.ApplyPhysicalSettings(ePiece,ignphysgn,freeze,gravity,physmater)) then
asmlib.LogInstance(self:GetStatus(stTrace,"(Stack) "..sItr..": Apply physical settings fail"),gtLogs); return false end
@ -1400,7 +1401,7 @@ function TOOL:LeftClick(stTrace)
asmlib.LogInstance(self:GetStatus(stTrace,"(Stack) "..sItr..": Apply weld fail"),gtLogs); return false end
if(not asmlib.ApplyPhysicalAnchor(ePiece,oArg.entpo,nil,nocollide,nocollidew,forcelim)) then
asmlib.LogInstance(self:GetStatus(stTrace,"(Stack) "..sItr..": Apply no-collide fail"),gtLogs); return false end
oArg.vtemp:SetUnpacked(hdOffs.P[cvX], hdOffs.P[cvY], hdOffs.P[cvZ])
oArg.vtemp:SetUnpacked(hdOffs.P:Get())
oArg.vtemp:Rotate(oArg.spang); oArg.vtemp:Add(oArg.sppos)
if(appangfst) then nextpic, nextyaw, nextrol, appangfst = 0, 0, 0, false end
if(applinfst) then nextx , nexty , nextz , applinfst = 0, 0, 0, false end
@ -1445,7 +1446,7 @@ function TOOL:LeftClick(stTrace)
if(not self:IntersectSnap(trEnt, stTrace.HitPos, stSpawn)) then
asmlib.LogInstance("(Ray) Skip intersection sequence. Snapping",gtLogs) end
end
local ePiece = asmlib.MakePiece(user,model,stSpawn.SPos,stSpawn.SAng,mass,bgskids,conPalette:Select("w"),bnderrmod)
local ePiece = asmlib.NewPiece(user,model,stSpawn.SPos,stSpawn.SAng,mass,bgskids,conPalette:Select("w"),bnderrmod)
if(ePiece) then
if(not asmlib.ApplyPhysicalSettings(ePiece,ignphysgn,freeze,gravity,physmater)) then
asmlib.LogInstance(self:GetStatus(stTrace,"(Snap) Apply physical settings fail"),gtLogs); return false end
@ -1589,10 +1590,19 @@ function TOOL:Reload(stTrace)
end; return false
end
function TOOL:ReleaseGhostEntity()
if(CLIENT) then
asmlib.ClearGhosts()
else
local user = self:GetOwner()
if(not asmlib.IsPlayer(user)) then return end
netStart(gsLibName.."SendDeleteGhosts")
netSend(user)
end
end
function TOOL:Holster()
if(CLIENT) then return end
netStart(gsLibName.."SendDeleteGhosts")
netSend(self:GetOwner())
self:ReleaseGhostEntity()
end
function TOOL:UpdateGhostFlipOver(stTrace, sPos, sAng)
@ -1725,8 +1735,8 @@ function TOOL:UpdateGhost(oPly)
if(not hdOffs) then return end -- Validated existent next point ID
for iNdex = 1, atGho.Size do ePiece = atGho[iNdex]
if(not (ePiece and ePiece:IsValid())) then return end
ePiece:SetPos(stSpawn.SPos); ePiece:SetAngles(stSpawn.SAng); ePiece:SetNoDraw(false)
vTemp:SetUnpacked(hdOffs.P[cvX], hdOffs.P[cvY], hdOffs.P[cvZ])
ePiece:SetPos(stSpawn.SPos); ePiece:SetAngles(stSpawn.SAng)
ePiece:SetNoDraw(false); vTemp:SetUnpacked(hdOffs.P:Get())
vTemp:Rotate(stSpawn.SAng); vTemp:Add(ePiece:GetPos())
if(appangfst) then nextpic,nextyaw,nextrol, appangfst = 0,0,0,false end
if(applinfst) then nextx ,nexty ,nextz , applinfst = 0,0,0,false end
@ -1760,14 +1770,13 @@ end
function TOOL:ElevateGhost(oEnt, oPly)
if(not (oPly and oPly:IsValid() and oPly:IsPlayer())) then
asmlib.LogInstance("Player invalid <"..tostring(oPly)..">",gtLogs); return end
if(oEnt and oEnt:IsValid()) then
local pointid, pnextid = self:GetPointID()
local spawncn, elevpnt = self:GetSpawnCenter(), 0
if(not spawncn) then -- Distance for the piece spawned on the ground
elevpnt = (asmlib.GetPointElevation(oEnt, pointid) or 0); end
asmlib.LogInstance("("..tostring(spawncn)..") <"..tostring(elevpnt)..">",gtLogs)
asmlib.SetAsmConvar(oPly, "elevpnt", elevpnt)
end
if(not (oEnt and oEnt:IsValid())) then return end
local pointid, pnextid = self:GetPointID()
local spawncn, elevpnt = self:GetSpawnCenter(), 0
if(not spawncn) then -- Distance for the piece spawned on the ground
elevpnt = (asmlib.GetPointElevation(oEnt, pointid) or 0); end
asmlib.LogInstance("("..tostring(spawncn)..") <"..tostring(elevpnt)..">",gtLogs)
asmlib.SetAsmConvar(oPly, "elevpnt", elevpnt)
end
function TOOL:Think()
@ -1780,7 +1789,7 @@ function TOOL:Think()
local bN = asmlib.IsFlag("new_close_frame", inputIsKeyDown(KEY_E))
if(not bO and bN and inputIsKeyDown(KEY_LALT)) then
local oD = conElements:Pull() -- Retrieve a panel from the stack
if(asmlib.IsTable(oD)) then oD = oD[1] -- Extract panel from table
if(istable(oD)) then oD = oD[1] -- Extract panel from table
if(IsValid(oD)) then oD:SetVisible(false) end -- Make it invisible
else -- The temporary reference is not table then close it
if(IsValid(oD)) then oD:Close() end -- A `close` call, get it :D
@ -1849,15 +1858,15 @@ function TOOL:DrawRelateAssist(oScreen, oPly, stTrace)
for ID = 1, trRec.Size do
local stPOA = asmlib.LocatePOA(trRec,ID); if(not stPOA) then
asmlib.LogInstance("Cannot locate #"..tostring(ID),gtLogs); return end
vTmp:SetUnpacked(stPOA.O[cvX], stPOA.O[cvY], stPOA.O[cvZ])
vTmp:SetUnpacked(stPOA.O:Get())
vTmp:Rotate(trAng); vTmp:Add(trPos)
local nR, nM = asmlib.GetViewRadius(oPly, vTmp), vTmp:DistToSqr(trHit)
oScreen:DrawCircle(vTmp:ToScreen(), nR, "y", "SEGM", {35})
if(not rM or (nM < rM)) then rM, trPOA = nM, stPOA end
end
vTmp:SetUnpacked(trPOA.O[cvX], trPOA.O[cvY], trPOA.O[cvZ])
vTmp:SetUnpacked(trPOA.O:Get())
vTmp:Rotate(trAng); vTmp:Add(trPos)
aTmp:SetUnpacked(trPOA.A[caP], trPOA.A[caY], trPOA.A[caR])
aTmp:SetUnpacked(trPOA.A:Get())
aTmp:Set(trEnt:LocalToWorldAngles(aTmp))
local Hp, Op = trHit:ToScreen(), vTmp:ToScreen()
local vF, vU = aTmp:Forward(), aTmp:Up()
@ -1979,7 +1988,7 @@ function TOOL:DrawCurveNode(oScreen, oPly, stTrace)
end
end
if(tData.POA) then local trEnt = stTrace.Entity
tData.Org:SetUnpacked(tData.POA.P[cvX], tData.POA.P[cvY], tData.POA.P[cvZ])
tData.Org:SetUnpacked(tData.POA.P:Get())
tData.Org:Rotate(trEnt:GetAngles()); tData.Org:Add(trEnt:GetPos())
oScreen:DrawLine(xyH, tData.Org:ToScreen(), "g")
end
@ -1990,7 +1999,7 @@ function TOOL:DrawNextPoint(oScreen, oPly, stSpawn)
local oRec, vN = stSpawn.HRec, Vector()
local stPOA = asmlib.LocatePOA(oRec, pnextid)
if(stPOA and oRec.Size > 1) then
vN:SetUnpacked(stPOA.O[cvX], stPOA.O[cvY], stPOA.O[cvZ])
vN:SetUnpacked(stPOA.O:Get())
vN:Rotate(stSpawn.SAng); vN:Add(stSpawn.SPos)
local Np, Op = vN:ToScreen(), stSpawn.OPos:ToScreen()
oScreen:DrawLine(Op, Np, "g")
@ -2347,7 +2356,7 @@ function TOOL.BuildCPanel(CPanel)
pCateg[sTyp] = {}; pCurr = pCateg[sTyp] end
if(asmlib.IsBlank(ptCat)) then ptCat = nil end
if(asmlib.IsHere(ptCat)) then
if(not asmlib.IsTable(ptCat)) then ptCat = {ptCat} end
if(not istable(ptCat)) then ptCat = {ptCat} end
if(ptCat[1]) then local iD = 1
while(ptCat[iD]) do local sCat = tostring(ptCat[iD]):lower():Trim()
if(asmlib.IsBlank(sCat)) then sCat = "other" end
@ -2366,7 +2375,7 @@ function TOOL.BuildCPanel(CPanel)
end -- Register the node associated with the track piece when is intended for later
if(bNow) then asmlib.SetDirectoryNode(pItem, sNam, sMod) end
-- SnapReview is ignored because a query must be executed for points count
else asmlib.LogInstance("Ignoring item "..asmlib.GetReport3(sTyp, sNam, sMod),sLog) end
else asmlib.LogInstance("Ignoring item "..asmlib.GetReport(sTyp, sNam, sMod),sLog) end
iCnt = iCnt + 1
end
-- Attach the hanging items to the type root
@ -2375,7 +2384,7 @@ function TOOL.BuildCPanel(CPanel)
local pan = pTypes[typ]
local nam, mod = unpack(val[iD])
asmlib.SetDirectoryNode(pan, nam, mod)
asmlib.LogInstance("Rooting item "..asmlib.GetReport3(typ, nam, mod),sLog)
asmlib.LogInstance("Rooting item "..asmlib.GetReport(typ, nam, mod),sLog)
end
end -- Process all the items without category defined
asmlib.LogInstance("Found items #"..tostring(iCnt - 1), sLog)
@ -2408,7 +2417,7 @@ function TOOL.BuildCPanel(CPanel)
local pComboPhysName = CPanel:ComboBox(languageGetPhrase("tool."..gsToolNameL..".phyname_con"), sName)
pComboPhysName:SetTooltip(languageGetPhrase("tool."..gsToolNameL..".phyname"))
pComboPhysName:SetValue(asmlib.GetTerm(asmlib.GetAsmConvar("physmater","STR"),
pComboPhysName:SetValue(asmlib.GetEmpty(asmlib.GetAsmConvar("physmater","STR"), nil,
languageGetPhrase("tool."..gsToolNameL..".phyname_def")))
pComboPhysName.DoRightClick = function(pnSelf) asmlib.SetComboBoxClipboard(pnSelf) end
pComboPhysName:Dock(TOP) -- Setting tallness gets ignored otherwise
@ -2443,7 +2452,7 @@ function TOOL.BuildCPanel(CPanel)
local sName = asmlib.GetAsmConvar("bgskids", "NAM")
local pText = CPanel:TextEntry(languageGetPhrase("tool."..gsToolNameL..".bgskids_con"), sName)
pText:SetTooltip(languageGetPhrase("tool."..gsToolNameL..".bgskids"))
pText:SetText(asmlib.GetTerm(asmlib.GetAsmConvar("bgskids", "STR"),
pText:SetText(asmlib.GetEmpty(asmlib.GetAsmConvar("bgskids", "STR"), nil,
languageGetPhrase("tool."..gsToolNameL..".bgskids_def")))
pText:SetEnabled(false); pText:SetTall(22)
@ -2608,24 +2617,28 @@ if(CLIENT) then
-- Setup memory configuration export button
pItem = asmlib.SetButton(CPanel, "timermode_ap")
pItem.DoClick = function(pnSelf)
local tTim, sRev = {}, asmlib.GetOpVar("OPSYM_REVISION")
for iD = 1, #tPan do local vP, tS = tPan[iD], {}
local pM, pL = vP["MODE"], vP["LIFE"]
local pC, bG = vP["CLER"], vP["COLL"]
tS[1] = tostring(pM:GetOptionData(pM:GetSelectedID()) or "")
tS[2] = tostring(tonumber(pL:GetValue() or 0))
tS[3] = tostring(pC:GetChecked() and 1 or 0)
tS[4] = tostring(bG:GetChecked() and 1 or 0)
tTim[iD] = tableConcat(tS, sRev)
end
local sTim = tableConcat(tTim, gsSymDir)
asmlib.LogInstance("Memory manager "..asmlib.GetReport(sTim))
asmlib.SetAsmConvar(nil, "timermode", sTim)
end
pItem.DoRightClick = function(pnSelf)
if(inputIsKeyDown(KEY_LSHIFT)) then
asmlib.SetLogControl(asmlib.GetAsmConvar("logsmax","INT"),
asmlib.GetAsmConvar("logfile","BUL"))
else
local fW = asmlib.GetOpVar("FORM_GITWIKI")
guiOpenURL(fW:format("Memory-manager-configuration"))
else
local tTim, sRev = {}, asmlib.GetOpVar("OPSYM_REVISION")
for iD = 1, #tPan do local vP, tS = tPan[iD], {}
local pM, pL = vP["MODE"], vP["LIFE"]
local pC, bG = vP["CLER"], vP["COLL"]
tS[1] = tostring(pM:GetOptionData(pM:GetSelectedID()) or "")
tS[2] = tostring(tonumber(pL:GetValue() or 0))
tS[3] = tostring(pC:GetChecked() and 1 or 0)
tS[4] = tostring(bG:GetChecked() and 1 or 0)
tTim[iD] = tableConcat(tS, sRev)
end
asmlib.SetAsmConvar(nil, "timermode", tableConcat(tTim, gsSymDir))
end
asmlib.SetLogControl(asmlib.GetAsmConvar("logsmax","INT"),
asmlib.GetAsmConvar("logfile","BUL"))
end
pItem:Dock(TOP); pItem:SetTall(30)
-- Setup factory reset variables button
@ -2667,6 +2680,10 @@ if(CLIENT) then
asmlib.LogInstance("Factory reset complete", sLog)
end
end
pItem.DoRightClick = function(pnSelf)
local fW = asmlib.GetOpVar("FORM_GITWIKI")
guiOpenURL(fW:format("Factory-reset"))
end
pItem:Dock(TOP); pItem:SetTall(30)
asmlib.LogInstance("Registered as "..asmlib.GetReport(CPanel.Name), sLog)
end

View File

@ -0,0 +1,268 @@
tool.trackassembly.workmode.1=一般生成/固定
tool.trackassembly.workmode.2=活动点交点
tool.trackassembly.workmode.3=曲线线段拟合
tool.trackassembly.workmode.4=表面法线翻转
tool.trackassembly.workmode.5=切线过渡弯
tool.trackassembly.info.1=在地图上生成部件或将部件对齐
tool.trackassembly.info.2=将轨道部分与为此设计的专用路段连接起来
tool.trackassembly.info.3=创建通过给定检查点的连续轨道布局
tool.trackassembly.info.4=跨给定原点和法线翻转选定的实体列表
tool.trackassembly.info.5=在转弯时半径发生变化的地方,能产生更平滑的过渡转弯
tool.trackassembly.left.1=生成/固定轨道部件。按住SHIFT键堆叠。
tool.trackassembly.left.2=在交叉点生成轨道部件
tool.trackassembly.left.3=生成分段轨迹插值曲线
tool.trackassembly.left.4=在所选轨道浏览列表上生成
tool.trackassembly.left.5=生成分段轨迹插值曲线
tool.trackassembly.right.1=复制轨道件模型或打开常用部件对话框
tool.trackassembly.right.2=复制轨道件模型或打开常用部件对话框
tool.trackassembly.right.3=为分段曲线创建节点。按住SHIFT进行更新。
tool.trackassembly.right.4=将实体注册到浏览列表中。按住SHIFT更改模型。
tool.trackassembly.right.5=为分段曲线创建节点。按住SHIFT进行更新。
tool.trackassembly.right_use.1=禁用滚动。复制轨道件模型或打开常用组件对话框。
tool.trackassembly.right_use.2=禁用滚动。复制轨道件模型或打开常用组件对话框。
tool.trackassembly.right_use.3=从最近的轨道组件活动点生成节点。
tool.trackassembly.right_use.4=禁用滚动。复制轨道件模型或打开常用组件对话框。
tool.trackassembly.right_use.5=从最近的轨道组件活动点生成节点。
tool.trackassembly.reload.1=移除轨道部件。按住SHIFT键选择锚点。
tool.trackassembly.reload.2=移除一个轨道。按住SHIFT键选择关系射线。
tool.trackassembly.reload.3=删除曲线插值节点。按住SHIFT清除堆栈。
tool.trackassembly.reload.4=清除浏览实体选择列表。当空缺时移除组件
tool.trackassembly.reload.5=删除曲线插值节点。按住SHIFT清除堆栈。
tool.trackassembly.reload_use.1=启用数据库导出以打开DSV管理器
tool.trackassembly.reload_use.2=启用数据库导出以打开DSV管理器
tool.trackassembly.reload_use.3=启用数据库导出以打开DSV管理器
tool.trackassembly.reload_use.4=启用数据库导出以打开DSV管理器
tool.trackassembly.reload_use.5=启用数据库导出以打开DSV管理器
tool.trackassembly.desc=组装供载具行驶的轨道|汉化:轻骑兵涅普,本人水平有限,若有语法、翻译错误还请指出
tool.trackassembly.name=轨道组件
tool.trackassembly.phytype=选择此处列出的物理属性类型
tool.trackassembly.phytype_con=材料类型\:
tool.trackassembly.phytype_def=<选择表面材料类型>
tool.trackassembly.phyname=选择创建轨道时要使用的物理属性名称,因为这会影响表面摩擦力
tool.trackassembly.phyname_con=材料名称\:
tool.trackassembly.phyname_def=<选择表面材料名称>
tool.trackassembly.bgskids=以逗号分隔的Bodygroup的选择代码/皮肤ID
tool.trackassembly.bgskids_con=Bodygroup/皮肤\:
tool.trackassembly.bgskids_def=在此编写选择代码。例如 1,0,0,2,1/3
tool.trackassembly.mass=生成的组件有多重
tool.trackassembly.mass_con=组件质量\:
tool.trackassembly.model=通过展开类型并单击节点来选择要开始/追踪轨道的组件
tool.trackassembly.model_con=组件模型\:
tool.trackassembly.activrad=选择活动点所需的最小距离
tool.trackassembly.activrad_con=活动半径\:
tool.trackassembly.stackcnt=堆叠时创建的最大组件数量
tool.trackassembly.stackcnt_con=组件数量\:
tool.trackassembly.angsnap=固定在这个度数下产生的第一组件
tool.trackassembly.angsnap_con=角度校准\:
tool.trackassembly.resetvars=单击以重置附加值
tool.trackassembly.resetvars_con=V 重置变量 V
tool.trackassembly.nextpic=额外的原点角节距偏移
tool.trackassembly.nextpic_con=原点间距\:
tool.trackassembly.nextyaw=附加原点偏航角偏移
tool.trackassembly.nextyaw_con=原点偏航\:
tool.trackassembly.nextrol=附加原点角滚动偏移
tool.trackassembly.nextrol_con=原点滚动\:
tool.trackassembly.nextx=附加原点线性 X 支距
tool.trackassembly.nextx_con=支距 X\:
tool.trackassembly.nexty=附加原点线性 Y 支距
tool.trackassembly.nexty_con=支距 Y\:
tool.trackassembly.nextz=附加原点线性 Z 支距
tool.trackassembly.nextz_con=支距 Z\:
tool.trackassembly.gravity=控制生成的组件的重力
tool.trackassembly.gravity_con=应用组件重力
tool.trackassembly.weld=在组件或组件/锚点之间创建焊接
tool.trackassembly.weld_con=焊接
tool.trackassembly.forcelim=控制破坏焊缝所需的力
tool.trackassembly.forcelim_con=力限制\:
tool.trackassembly.ignphysgn=忽略物理枪对生成/固定/堆叠组件的抓取
tool.trackassembly.ignphysgn_con=忽略物理枪
tool.trackassembly.nocollide=在组件/锚点之间创建无碰撞
tool.trackassembly.nocollide_con=无碰撞
tool.trackassembly.nocollidew=在组件和世界之间创建无碰撞
tool.trackassembly.nocollidew_con=无碰撞世界
tool.trackassembly.freeze=使该组件在冻结状态下生成
tool.trackassembly.freeze_con=冻结组件
tool.trackassembly.igntype=使工具忽略固定/堆叠时的不同组件类型
tool.trackassembly.igntype_con=忽略轨道类型
tool.trackassembly.spnflat=下一组件将水平生成/固定/堆叠
tool.trackassembly.spnflat_con=水平生成
tool.trackassembly.spawncn=在中心点生成组件,否则相对于所选的活动点生成组件
tool.trackassembly.spawncn_con=中心原点
tool.trackassembly.surfsnap=将组件固定在玩家指向的表面上
tool.trackassembly.surfsnap_con=固定到轨迹表面
tool.trackassembly.appangfst=仅在第一个组件上应用角度偏移
tool.trackassembly.appangfst_con=首先应用角度
tool.trackassembly.applinfst=仅在第一个组件上应用线性偏移
tool.trackassembly.applinfst_con=首先应用线性
tool.trackassembly.adviser=控制渲染工具位置/角度顾问
tool.trackassembly.adviser_con=绘图顾问
tool.trackassembly.pntasist=控制渲染工具固定点助手
tool.trackassembly.pntasist_con=绘图助手
tool.trackassembly.ghostcnt=控件显示工具重影支架件组件数量数
tool.trackassembly.ghostcnt_con=重影数量\:
tool.trackassembly.ghostblnd=控制重影透明度混合。值越低越透明
tool.trackassembly.ghostblnd_con=重影透明度\:
tool.trackassembly.dtmessage=控制上下文菜单服务器消息之间的时间间隔
tool.trackassembly.dtmessage_con=信息延迟\:
tool.trackassembly.engunsnap=通过玩家物理枪控制固定,当组件掉落
tool.trackassembly.engunsnap_con=启用物理枪固定
tool.trackassembly.upspanchor=启用在每次生成时更新锚点(非固定状态)
tool.trackassembly.upspanchor_con=更新生成时的锚点
tool.trackassembly.type=通过展开文件夹选择要使用的轨道类型
tool.trackassembly.type_con=轨道类型\:
tool.trackassembly.subfolder=通过展开文件夹选择要使用的轨道类别
tool.trackassembly.subfolder_con=轨道类别\:
tool.trackassembly.workmode=更改此选项以选择不同的工作模式
tool.trackassembly.workmode_con=工作模式\:
tool.trackassembly.pn_export=单击可将客户端数据库导出为文件
tool.trackassembly.pn_export_lb=导出数据库
tool.trackassembly.pn_routine=您经常使用的轨道列表
tool.trackassembly.pn_routine_hd=常用组件\:
tool.trackassembly.pn_externdb=外部数据库可用于\:
tool.trackassembly.pn_externdb_hd=外部数据库由\:
tool.trackassembly.pn_externdb_lb=右键单击选项\:
tool.trackassembly.pn_externdb_ttt=当前修改的配置值\:
tool.trackassembly.pn_externdb_bti=输入
tool.trackassembly.pn_externdb_bti_tp=将文件列表中的信息导入面板中进行编辑
tool.trackassembly.pn_externdb_bte=输出
tool.trackassembly.pn_externdb_bte_tp=将信息从面板导出到文件列表并应用
tool.trackassembly.pn_externdb_bt1=复制唯一前缀
tool.trackassembly.pn_externdb_bt2=复制 DSV 文件夹路径
tool.trackassembly.pn_externdb_bt3=复制表缺口
tool.trackassembly.pn_externdb_bt4=复制表路径
tool.trackassembly.pn_externdb_bt5=复制表时间
tool.trackassembly.pn_externdb_bt6=复制表尺寸
tool.trackassembly.pn_externdb_bt7=编辑表格内容Luapad
tool.trackassembly.pn_externdb_bt8=删除数据库条目
tool.trackassembly.pn_externdb_cm1=复制单元格值
tool.trackassembly.pn_externdb_cm2=复制整行
tool.trackassembly.pn_externdb_cm3=启用/禁用
tool.trackassembly.pn_externdb_cm4=更改线路
tool.trackassembly.pn_externdb_cm5=创造线路
tool.trackassembly.pn_externdb_cm6=移除线路
tool.trackassembly.pn_ext_dsv_lb=外部 DSV 列表
tool.trackassembly.pn_ext_dsv_hd=此处显示外部 DSV 数据库列表
tool.trackassembly.pn_ext_dsv_1=活动的
tool.trackassembly.pn_ext_dsv_2=数据库唯一前缀
tool.trackassembly.pn_ext_dsv_3=附加信息
tool.trackassembly.pn_display=您的轨道组件的模型显示在此处
tool.trackassembly.pn_pattern=在此写入模式并按 ENTER 执行搜索
tool.trackassembly.pn_srchcol=选择您要执行搜索的列表列
tool.trackassembly.pn_srchcol_lb=<搜索>
tool.trackassembly.pn_srchcol_lb1=模型
tool.trackassembly.pn_srchcol_lb2=类型
tool.trackassembly.pn_srchcol_lb3=名称
tool.trackassembly.pn_srchcol_lb4=结束
tool.trackassembly.pn_routine_lb=常规项目
tool.trackassembly.pn_routine_lb1=使用
tool.trackassembly.pn_routine_lb2=结束
tool.trackassembly.pn_routine_lb3=类型
tool.trackassembly.pn_routine_lb4=名称
tool.trackassembly.pn_display_lb=组件展示
tool.trackassembly.pn_pattern_lb=写入模式
tool.trackassembly.sizeucs=为显示的坐标系设置的比例
tool.trackassembly.sizeucs_con=缩放 UCS\:
tool.trackassembly.maxstatts=定义脚本在失败之前将尝试的堆栈尝试次数
tool.trackassembly.maxstatts_con=堆栈尝试\:
tool.trackassembly.incsnpang=定义使用按钮滑块时的角度增量步长
tool.trackassembly.incsnpang_con=角度步进\:
tool.trackassembly.incsnplin=定义使用按钮滑块时的线性增量步骤
tool.trackassembly.incsnplin_con=线性步长\:
tool.trackassembly.enradmenu=启用后,将打开工作模式径向菜单的使用功能
tool.trackassembly.enradmenu_con=启用径向菜单
tool.trackassembly.sgradmenu=更改此设置以使径向菜单更加圆形。越高越平滑
tool.trackassembly.sgradmenu_con=径向段\:
tool.trackassembly.rtradmenu=更改此设置可调整径向菜单基角并重新定位其选项
tool.trackassembly.rtradmenu_con=径向旋转\:
tool.trackassembly.enpntmscr=启用后,通过鼠标滚动打开切换活动点
tool.trackassembly.enpntmscr_con=启用点滚动
tool.trackassembly.exportdb=启用后,会将数据库导出为一个大文件
tool.trackassembly.exportdb_con=启用数据库导出
tool.trackassembly.modedb=将其更改为定义轨道数据库的存储行为
tool.trackassembly.modedb_con=数据库模式\:
tool.trackassembly.devmode=启用后,将打开开发人员模式以进行跟踪和调试
tool.trackassembly.devmode_con=启用开发者模式
tool.trackassembly.maxtrmarg=更改此设置以调整工具轨迹之间的时间
tool.trackassembly.maxtrmarg_con=迹线余量\:
tool.trackassembly.maxmenupr=更改此项以调整菜单中的小数位数
tool.trackassembly.maxmenupr_con=小数位\:
tool.trackassembly.maxmass=更改此设置可调整可应用于组件的最大质量
tool.trackassembly.maxmass_con=最大质量\:
tool.trackassembly.maxlinear=更改此设置以调整组件上的最大线性偏移
tool.trackassembly.maxlinear_con=偏移限制\:
tool.trackassembly.maxforce=更改此设置以调整创建焊缝时的最大力限制
tool.trackassembly.maxforce_con=力限制\:
tool.trackassembly.maxactrad=更改此项可调整获取点ID的最大活动半径
tool.trackassembly.maxactrad_con=半径限制\:
tool.trackassembly.maxstcnt=更改此设置可调整堆叠模式下创建的最大件数
tool.trackassembly.maxstcnt_con=堆栈限制\:
tool.trackassembly.enwiremod=启用后将打开wiremod拓展
tool.trackassembly.enwiremod_con=启用wire拓展
tool.trackassembly.enmultask=启用后,会在堆叠模式下开启多任务处理
tool.trackassembly.enmultask_con=启用多任务处理
tool.trackassembly.enctxmenu=启用后,将打开工具专用的上下文菜单
tool.trackassembly.enctxmenu_con=启用上下文菜单
tool.trackassembly.enctxmall=启用后,将打开所有道具的工具专用上下文菜单
tool.trackassembly.enctxmall_con=为所有道具启用上下文菜单
tool.trackassembly.endsvlock=启用后将打开外部可插拔的DSV数据库文件锁
tool.trackassembly.endsvlock_con=启用 DSV 数据库锁
tool.trackassembly.curvefact=更改此值以调整曲线因子正切系数
tool.trackassembly.curvefact_con=曲线系数\:
tool.trackassembly.curvsmple=更改此设置以调整曲线插值样本
tool.trackassembly.curvsmple_con=曲线样本\:
tool.trackassembly.crvturnlm=更改此设置以调整该段的转弯弯曲锐度限制
tool.trackassembly.crvturnlm_con=曲率转弯\:
tool.trackassembly.crvleanlm=更改此设置以调整该段的倾斜弯曲锐度限制
tool.trackassembly.crvleanlm_con=曲率倾斜\:
tool.trackassembly.spawnrate=更改此设置以调整每个服务器刻度生成的轨道段的数量
tool.trackassembly.spawnrate_con=生成率\:
tool.trackassembly.bnderrmod=更改此设置以定义客户端在地图边界之外生成组件时的行为
tool.trackassembly.bnderrmod_off=允许无限制地堆叠/生成
tool.trackassembly.bnderrmod_log=拒绝堆栈/生成错误被记录
tool.trackassembly.bnderrmod_hint=显示拒绝堆栈/生成提示消息
tool.trackassembly.bnderrmod_generic=显示拒绝堆栈/生成通用消息
tool.trackassembly.bnderrmod_error=显示拒绝堆栈/生成错误消息
tool.trackassembly.bnderrmod_con=边界模式\:
tool.trackassembly.modedb=更改此项以定义轨道数据库的存储行为
tool.trackassembly.modedb_lua=利用直接缓存存储
tool.trackassembly.modedb_sql=仅缓存请求的记录
tool.trackassembly.modedb_con=数据库模式\:
tool.trackassembly.maxfruse=更改此设置以调整有多少常用组件的深度
tool.trackassembly.maxfruse_con=常用组件\:
tool.trackassembly.timermode_ap=单击此按钮可将更改应用到 SQL 内存管理器配置
tool.trackassembly.timermode_ap_con=应用内存设置
tool.trackassembly.timermode_md=更改此项可调整 SQL 内存管理器的计时器算法
tool.trackassembly.timermode_lf=更改此项可调整记录在缓存中的停留时间
tool.trackassembly.timermode_lf_con=Record life\:
tool.trackassembly.timermode_rd=启用后,通过强制 nil 值从缓存中擦除记录
tool.trackassembly.timermode_rd_con=启用记录删除
tool.trackassembly.timermode_ct=启用后,删除记录时强制运行垃圾回收
tool.trackassembly.timermode_ct_con=启用垃圾收集
tool.trackassembly.timermode_mem=SQL表的内存管理器\:
tool.trackassembly.timermode_cqt=通过记录请求缓存查询计时器
tool.trackassembly.timermode_obj=附加到缓存记录的对象计时器
tool.trackassembly.factory_reset=单击此按钮应用控制台变量出厂设置
tool.trackassembly.factory_reset_con=应用出厂设置
tool.trackassembly.logfile=启用后开始将日志流式传输到专用文件中
tool.trackassembly.logfile_con=启用日志文件
tool.trackassembly.logsmax=更改此项以调整日志流写入的最大输出行数
tool.trackassembly.logsmax_con=记录线路\:
tool.trackassembly.client_var=客户端玩家偏好。在工具客户端配置中创建的Convar
tool.trackassembly.nonrep_var=非复制convar控件。它们在服务器和客户端上有不同的值
tool.trackassembly.relica_var=复制convar控件。服务器值发送给所有客户端使用
tool.trackassembly.utilities_user=用户设置
tool.trackassembly.utilities_admin=管理员设置
tool.trackassembly.buttonas<>=Decrement/Increment
tool.trackassembly.buttonas+/-=Negate value
tool.trackassembly.buttonas@M=Memorize value
tool.trackassembly.buttonas@D=Default value
tool.trackassembly.buttonas@45=Update 45
tool.trackassembly.buttonas@90=Update 90
tool.trackassembly.buttonas@135=Update 135
tool.trackassembly.buttonas@180=Update 180
sbox_maxasmtracks=更改此项以调整服务器上通过轨道工具生成的东西
sbox_maxasmtracks_con=总段数\:
Cleanup_asmtracks=组装好的轨道组件
Cleaned_asmtracks=清理了所有轨道组件
SBoxLimit_asmtracks=You've hit the spawned tracks limit!