Skip to content

Commit

Permalink
Remove POA needles indexing (#57)
Browse files Browse the repository at this point in the history
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`
  • Loading branch information
dvdvideo1234 authored Jul 11, 2024
1 parent 1c80a3b commit 96f8942
Show file tree
Hide file tree
Showing 25 changed files with 7,164 additions and 4,412 deletions.
6 changes: 3 additions & 3 deletions data/expression2/TA_Active_point_scanner.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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")
Expand Down
20 changes: 10 additions & 10 deletions data/expression2/TA_Exporter_Generator.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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)
Expand Down Expand Up @@ -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))
Expand Down
6 changes: 3 additions & 3 deletions data/expression2/TA_ExtensionTest.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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))
}
14 changes: 7 additions & 7 deletions data/expression2/TA_Scan_Export_Generator.txt
Original file line number Diff line number Diff line change
Expand Up @@ -72,30 +72,30 @@ 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"

# Export mode. This can be /DSV/ or /INS/
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
PointID = 1

# 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

Expand All @@ -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
Expand All @@ -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)
{
Expand Down
16 changes: 8 additions & 8 deletions data/expression2/TA_Scan_Generator.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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)
{
Expand Down
4 changes: 2 additions & 2 deletions data/expression2/TA_curve_rotator.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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 ! ##########
Expand Down
Original file line number Diff line number Diff line change
@@ -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
Loading

0 comments on commit 96f8942

Please sign in to comment.