Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Updated library control statements #59

Merged
merged 116 commits into from
Dec 27, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
116 commits
Select commit Hold shift + click to select a range
80e79f8
Updated: Library control statements
dvdvideo1234 Aug 1, 2024
ce0f36f
Fixed: Close generated files on sort fail
dvdvideo1234 Aug 1, 2024
5a65385
Utilize: Addition.Size
dvdvideo1234 Aug 1, 2024
200ef1b
Fixed: Phys property size being bound to sequential records
dvdvideo1234 Aug 1, 2024
c1ba6d4
Fixed: Node name is always overridden by category
dvdvideo1234 Aug 1, 2024
64d4508
Updated: SQL build statement library
dvdvideo1234 Aug 2, 2024
14200a1
Fixed: Primary table validation proper build error report
dvdvideo1234 Aug 2, 2024
091987f
Added: Centralized function to copy from list view
dvdvideo1234 Aug 20, 2024
7f37c09
Added: Sequential checks for all tables in SQL/LUA mode
dvdvideo1234 Aug 20, 2024
93eb6c6
Added: Some micro-optimizations
dvdvideo1234 Aug 20, 2024
a3d6aeb
Utilize integer-for loop
dvdvideo1234 Aug 20, 2024
ce3083d
Updated: Micro-optimization when calling `GetColumnName`
dvdvideo1234 Aug 22, 2024
d6db112
Added: Varargs to custom sorting
dvdvideo1234 Aug 22, 2024
282bb32
Added: Query store and format as table method
dvdvideo1234 Aug 23, 2024
6e677f1
Fixed: Some runtime errors
dvdvideo1234 Aug 26, 2024
bf87072
Fixed: Where clause failing with parameter missing
dvdvideo1234 Aug 26, 2024
367a28e
Fixed: Reduce the select columns count for additions
dvdvideo1234 Aug 26, 2024
95e2671
Updated: Query store selection operator
dvdvideo1234 Aug 27, 2024
788b21c
Updated: Chose the unique index for all tables
dvdvideo1234 Aug 28, 2024
943913c
Fixed: Matching forcing errors in LUA mode
dvdvideo1234 Aug 30, 2024
63dcf71
Added: Timer definition as table support
dvdvideo1234 Aug 30, 2024
4aa84d8
Fixed: `isstring` global being defined two times
dvdvideo1234 Aug 30, 2024
577bdd5
Added: Synchronization commit from the master branch
dvdvideo1234 Sep 11, 2024
48139fe
Merge branch 'master' into contr-stmt
dvdvideo1234 Sep 11, 2024
13c09bf
Improved: Reduce memory for indices (1) is the same as (1,2) unique
dvdvideo1234 Sep 12, 2024
73c0c9f
Fixed: Direct value injection in `tA = {}`
dvdvideo1234 Sep 13, 2024
9f1d43d
Optimized: `asmlib.GetWrap` being 50% faster. Removed loop
dvdvideo1234 Sep 13, 2024
88704e8
Merge branch 'master' into contr-stmt
dvdvideo1234 Sep 14, 2024
f01972d
Changed: Reduce wrap arguments count
dvdvideo1234 Sep 18, 2024
deaa333
Updated: Better sorting algorithm
dvdvideo1234 Sep 18, 2024
061e9f0
Added: Sorting when exporting data in Lua mode
dvdvideo1234 Sep 18, 2024
851af2a
Removed: Function `GetWrap` not needed anymore
dvdvideo1234 Sep 20, 2024
f0563e9
Fixed: Panel runtime errors
dvdvideo1234 Sep 27, 2024
0e04c0c
Added: General structure for tool panel with category
dvdvideo1234 Oct 10, 2024
3b9c81f
Fixed: Some runtime errors
dvdvideo1234 Oct 16, 2024
82e6d98
Fixed: Use different placeholders for tool panel item rooting. Utiliz…
dvdvideo1234 Oct 16, 2024
d55e96b
Optimized: `SettingsLog` bail early when conditions are not met
dvdvideo1234 Oct 16, 2024
5d97ab0
Fixed: Log settings return proper value
dvdvideo1234 Oct 17, 2024
a52fe71
Removed: Category hash table and current category reference
dvdvideo1234 Oct 21, 2024
d722951
Fixed: Runtime error file exists missing the second argument
dvdvideo1234 Oct 21, 2024
01e8ae6
Fixed: Data selection sequential errors due to comparing different da…
dvdvideo1234 Oct 22, 2024
dbb27f6
Renamed: `Element` to `Content`
dvdvideo1234 Oct 22, 2024
d755569
Fixed: Incorrect indexing for DSV synchronization raises errors in tr…
dvdvideo1234 Oct 22, 2024
89338d8
Updated: General usage of one error function preserving the stack
dvdvideo1234 Oct 23, 2024
1578ca9
Fixed: Frequent pieces panel not working
dvdvideo1234 Oct 23, 2024
8e7fe4f
Optimized: Frequent pieces. Do not loop if no need to
dvdvideo1234 Oct 23, 2024
81cec5d
Fixed: Lua mode exports being more accurate
dvdvideo1234 Oct 24, 2024
9880f7b
Removed: Needless table/columns indexing in `AddLineListView`
dvdvideo1234 Oct 24, 2024
581eced
Fixed: DSV manager buttons get squished when many DSV are present
dvdvideo1234 Oct 25, 2024
ce5af04
Fixed: Context menu icons not being displayed correctly
dvdvideo1234 Oct 25, 2024
b2c7e34
Removed: Translation `pn_externdb_lb` not needed anymore
dvdvideo1234 Oct 28, 2024
03644d7
Reverted: Expand panel location
dvdvideo1234 Oct 28, 2024
89348d9
Fixed: Context menu `box` copy returning the incorrect row due to dif…
dvdvideo1234 Oct 28, 2024
cc8ed97
Fixed: Tool panel runtime errors `asmlib.*`
dvdvideo1234 Oct 28, 2024
c6f3869
Fixed: File fore-close for `ExportDSV` on some fail cases
dvdvideo1234 Oct 29, 2024
1474ce0
Updated: Query parameters at the top
dvdvideo1234 Oct 29, 2024
49f160e
Fixed: Exporting DSV process triggering error due to query store missing
dvdvideo1234 Oct 29, 2024
d17d5e0
TODO: `Categorize` calls results in empty categody exports
dvdvideo1234 Oct 29, 2024
42f4d2c
Added: Test if the file is present before opening
dvdvideo1234 Oct 30, 2024
90aaacd
Fixed: DSV registration existence check crash when source not provided
dvdvideo1234 Oct 30, 2024
cb8dd5b
Added: Import/Export category being forced from/to the EXP folder
dvdvideo1234 Oct 30, 2024
1ea595e
Added: Attachment extraction via unique entity index and log per type
dvdvideo1234 Oct 30, 2024
c8bb08f
Updated: Log proper data when navigation is missing
dvdvideo1234 Oct 30, 2024
aa5db08
Fixed: Categories not being exported due to one-liners
dvdvideo1234 Oct 30, 2024
35e1903
Update: Import/Export category
dvdvideo1234 Oct 31, 2024
a354030
Fixed: Registering a DSV does not show source script in the logs
dvdvideo1234 Oct 31, 2024
1b51334
Fixed: Provide the context menu tables option if such are available a…
dvdvideo1234 Nov 1, 2024
a03dac2
Added: Dedicated prefix for generic ( whole DB containers )
dvdvideo1234 Nov 1, 2024
a42bd15
Changed: Utilize global file value
dvdvideo1234 Nov 1, 2024
9968665
Renamed: Generic prefix local variable
dvdvideo1234 Nov 1, 2024
099d65b
Fixed: DSV manager properly showing generic database
dvdvideo1234 Nov 3, 2024
ce9f634
Fixed: General sorting when values are missing. Nil is less than ever…
dvdvideo1234 Nov 4, 2024
68641ac
Fixed: Equalize export column order for SQL/LUA mode
dvdvideo1234 Nov 7, 2024
cfb6148
Fixed: Failed routine `ExportTypeDSV` cannot index files P/A
dvdvideo1234 Nov 8, 2024
b06f292
Updated: Routine pieces translation in one place
dvdvideo1234 Nov 8, 2024
0898eb6
Fixed: Export auto-run failing due to the new control statement
dvdvideo1234 Nov 9, 2024
23161b9
Fixed: Export track type as DSV in SQL mode
dvdvideo1234 Nov 10, 2024
8e302c5
Fixed: Physical properties table exports PK without quotes
dvdvideo1234 Nov 10, 2024
5d01d28
Fixed: DB export flag not being reset on menu error
dvdvideo1234 Nov 12, 2024
6f85f81
Added: Some missing translations
dvdvideo1234 Nov 12, 2024
6b31ff3
Updated: Routine pieces search and list vie use the same column names
dvdvideo1234 Nov 12, 2024
3221991
Updated: DSV manager now uses hash notation as well
dvdvideo1234 Nov 12, 2024
fa96c2b
Rename: `ext_dsv` localization to `extdsv`
dvdvideo1234 Nov 13, 2024
cad6d01
Updated: Add translation to be removed after a sync
dvdvideo1234 Nov 13, 2024
244f803
Apply: UTF-8 BOM to the Chinese translations
dvdvideo1234 Nov 13, 2024
bea1f82
Finished: French translations
dvdvideo1234 Nov 13, 2024
dbceb13
Fixed: Panel content not sorted correctly due to missing local reference
dvdvideo1234 Nov 13, 2024
b69a709
Fixed: Reduce the network overhead for `CREATE_CURVE_NODE`
dvdvideo1234 Nov 14, 2024
1bfb85f
Fixed: Curve node remove reverts the value of the last node
dvdvideo1234 Nov 15, 2024
0b25f2e
Fixed: Apply super-elevation when spawn flat is not checked
dvdvideo1234 Nov 15, 2024
6c24515
Added: Check of the modified normal exists
dvdvideo1234 Nov 15, 2024
36601bd
Fixed: Wrong storage of grater-equals
dvdvideo1234 Nov 15, 2024
abec33b
Added: Load the node into tool offsets
dvdvideo1234 Nov 15, 2024
68ede4d
Fixed: Runtime missing bracket in `ApplySuperElevation`
dvdvideo1234 Nov 16, 2024
70c3f83
Fixed: Super-elevation auto update not working on node update
dvdvideo1234 Nov 17, 2024
99f48e6
Added: Category for `Scene Builder`
dvdvideo1234 Nov 17, 2024
d9e72f4
Renamed: `CacheQueryPanel` to `CacheQueryInventory`
dvdvideo1234 Nov 17, 2024
a724751
Fixed: Inventory export runtime errors with library self-reference
dvdvideo1234 Nov 18, 2024
f36b312
Fixed: Exporting content for sync inventory missing new added models …
dvdvideo1234 Nov 19, 2024
b57db54
Fixed: Runtime error due to missed bracket in `CacheQueryAdditions`
dvdvideo1234 Nov 21, 2024
aa6fc11
Fixed table definition runtime error for `ExportSyncDB`
dvdvideo1234 Nov 24, 2024
0443b31
Updated: Use library path instead of `FORM_PREFIXDSV`
dvdvideo1234 Nov 24, 2024
19a5973
Fixed: Runtime errors in `ProcessDSV` using old folder path
dvdvideo1234 Nov 25, 2024
6ad690e
Added: More checks when importing a DSV file
dvdvideo1234 Nov 26, 2024
09a90bb
Added: Usage of `PATTEM_EXDSVHED` in the rest of the places
dvdvideo1234 Nov 27, 2024
4e0a222
Removed: Numbers from comments
dvdvideo1234 Nov 27, 2024
70ae559
Added: Export DSV header configurations
dvdvideo1234 Nov 27, 2024
62a14d7
Fixed: When less values are provided in the DSV do not trigger length…
dvdvideo1234 Nov 27, 2024
1ad0aa1
Updated: Category header internal pattern
dvdvideo1234 Nov 27, 2024
e37f23a
Removed: Some unused variables from `AttachAdditions`
dvdvideo1234 Nov 28, 2024
cef3e07
Fixed: Runtime error in `ImportDSV` relative to `DATA`
dvdvideo1234 Nov 29, 2024
94de9ac
Updated: Auto-run export function headers
dvdvideo1234 Nov 30, 2024
73553eb
Added: Some `Scene builder` but not being validated yet
dvdvideo1234 Nov 30, 2024
1dc5128
Fixed: Runtime errors in `ExportSyncDB` and `ExportTypeDSV` for SQL mode
dvdvideo1234 Dec 27, 2024
26712c7
Fixed: Wire-mod extension tester
dvdvideo1234 Dec 27, 2024
fedd0b0
Equalize and mark the version
dvdvideo1234 Dec 27, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
136 changes: 136 additions & 0 deletions data/expression2/TA_Pipe_Generator.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,136 @@
@name TA Pipe Generator
@model models/props_lab/huladoll.mdl
@persist [Scanner Pipe]:entity [F U R,C MP]:vector [TU TD TL TR]:ftrace
@persist [Delta Iter Raun]:number [ScanCenter SizeCenter]:vector2 MA:angle
@outputs

if(first() || dupefinished())
{
# Scan size. Most rails are more wider than higher
# For PHX two bean rails W > H
ScanR = 500 # Scan radius must be bigger then pipe radius

# Amount of iterations to lower delta
Iter = 10

# Rouding
Raun = 4

# Align center to prop center
ScanCenter = vec2(0, 3)
SizeCenter = vec2(3, 3)

# How fast it will scan the piece edge
Delta = 1

# Local oriantation vectors
F = vec(1,0,0)
U = vec(0,0,1)

# Automatic stuff
Scanner = entity()
Pipe = noentity()
U = U:normalized()
R = F:cross(U)
MP = Scanner:pos()
MA = Scanner:angles()
C = U * ScanCenter:y() + R * ScanCenter:x()

holoCreate(1), holoColor(1,vec(255,0,0)), holoScale(1,0.1*vec(1,1,1)) holoModel(1,"cone")
holoCreate(2), holoColor(2,vec(0,0,255)), holoScale(2,0.1*vec(1,1,1)) holoModel(2,"cone")
holoCreate(3), holoColor(3,vec(255,255,0)), holoScale(3,0.1*vec(1,1,1)) holoModel(3,"cone")
holoCreate(4), holoColor(4,vec(0,255,255)), holoScale(4,0.1*vec(1,1,1)) holoModel(4,"cone")
holoCreate(5), holoColor(5,vec(0,255,0)), holoScale(5,0.1*vec(1,1,1)) holoModel(5,"cube")
holoCreate(6), holoColor(6,vec(255,0,255)), holoScale(6,0.1*vec(1,1,1)) holoModel(6,"cube")

TU = Scanner:setFTrace(C + SizeCenter:x() * U, U, ScanR):useArray():putArray(Scanner)
TD = Scanner:setFTrace(C - SizeCenter:x() * U, U, -ScanR):useArray():putArray(Scanner)
TR = Scanner:setFTrace(C + SizeCenter:y() * R, R, ScanR):useArray():putArray(Scanner)
TL = Scanner:setFTrace(C - SizeCenter:y() * R, R, -ScanR):useArray():putArray(Scanner)
}

function drawFTrace(T:ftrace, N:number)
{
P = T:getPosWorld()
D = T:getDirWorld()
A = D:toAngle()
A = A:rotateAroundAxis(A:right(), -90)
holoPos(N, P)
holoAng(N, A)
}

event tick()
{
holoPos(5, Scanner:toWorld(C))
drawFTrace(TU:smpLocal(), 1)
drawFTrace(TD:smpLocal(), 2)
drawFTrace(TR:smpLocal(), 3)
drawFTrace(TL:smpLocal(), 4)

if(Scanner != noentity())
{
if(TU:isHit() && TD:isHit() && TR:isHit() && TL:isHit())
{
VU = (TU:getFractionLen() - TD:getFractionLen())
VR = (TR:getFractionLen() - TL:getFractionLen())
DL = U * VU + R * VR

MP = (TU:getPosWorld() + TD:getPosWorld() +
TR:getPosWorld() + TL:getPosWorld()) / 4

#print("Move:", DL)

holoPos(6, MP)

if(Pipe == noentity())
{
Pipe = TU:getEntity()
print("Pipe:", Pipe)
}

C = C + F * Delta
TU:rayMove(F + DL, Delta)
TD:rayMove(F + DL, Delta)
TR:rayMove(F + DL, Delta)
TL:rayMove(F + DL, Delta)
}
else
{
# print("Iteration:", Iter)
if(Iter <= 0)
{
Scanner = noentity()
}
C = C - F * Delta
TU:rayMove(F, -Delta)
TD:rayMove(F, -Delta)
TR:rayMove(F, -Delta)
TL:rayMove(F, -Delta)
Delta = Delta / 2
Iter = Iter - 1
}
}
else
{
if(Pipe != noentity())
{
Mo = Pipe:model()
Or = Pipe:toLocal(MP)
OrX = toString(round(Or:x(), Raun))
OrY = toString(round(Or:y(), Raun))
OrZ = toString(round(Or:z(), Raun))
OrS = OrX+","+OrY+","+OrZ
An = Pipe:toLocal(MA)
AnP = toString(round(An:pitch(), Raun))
AnY = toString(round(An:yaw(), Raun))
AnR = toString(round(An:roll(), Raun))
AnS = AnP+","+AnY+","+AnR

if(OrS == "0,0,0") { OrS = "" }
if(AnS == "0,0,0") { AnS = "" } else { AnS = ", \""+AnS+"\"" }

print("PIECES:Record({\""+Mo+"\", \"#\", \"#\", 0, \"\", \""+OrS+"\""+AnS+"})")
Pipe = noentity()
}
}
}
4 changes: 2 additions & 2 deletions data/expression2/TA_Wire_Test.txt
Original file line number Diff line number Diff line change
Expand Up @@ -57,10 +57,10 @@ if(first() || dupefinished())
}else{ error("Additions line fail "+M) }

P1 = trackasmlibGetProperty()
if(P1[3,string] == "Metal")
if(P1[3,string] == "Liquid")
{
P2 = trackasmlibGetProperty(P1[3,string])
if(P2[5, string] == "crowbar")
if(P2[1, string] == "slime")
{
print("Property type OK <"+P2[5, string]+">")
}else{ error("Property type fail <"+P2[5, string]+">")}
Expand Down
8 changes: 0 additions & 8 deletions data/trackassembly/exp/cl_TRACKASSEMBLY_ADDITIONS.txt

This file was deleted.

91 changes: 0 additions & 91 deletions data/trackassembly/exp/cl_TRACKASSEMBLY_PHYSPROPERTIES.txt

This file was deleted.

Loading
Loading