Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
P
proview
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Esteban Blanc
proview
Commits
7af93228
Commit
7af93228
authored
May 15, 2019
by
Christoffer Ackelman
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Web: Added DynDigScript
parent
bb7eeb89
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
83 additions
and
0 deletions
+83
-0
java/jsw/ge/src/ge_dyn.ts
java/jsw/ge/src/ge_dyn.ts
+83
-0
No files found.
java/jsw/ge/src/ge_dyn.ts
View file @
7af93228
...
...
@@ -6083,6 +6083,89 @@ class DynDigCommand extends DynElem {
}
}
class
DynDigScript
extends
DynElem
{
script
=
""
;
a
=
null
;
first_scan
=
true
;
level
=
0
;
constructor
(
dyn
)
{
super
(
dyn
,
DynPrio
.
DigScript
);
this
.
dyn_type2
=
DynType2
.
DigScript
;
}
connect
(
object
)
{
this
.
a
=
new
DynReference
(
this
.
dyn
,
this
.
attribute
);
this
.
a
.
connect
(
this
.
dyn
);
if
(
!
this
.
a
.
sts
)
{
console
.
log
(
"
DigScript:
"
+
this
.
attribute
);
return
1
;
}
return
1
;
}
disconnect
()
{
if
(
this
.
a
)
{
this
.
a
.
disconnect
();
}
}
scan
(
object
)
{
if
(
this
.
a
===
null
||
!
this
.
a
.
sts
)
{
return
;
}
let
value
=
this
.
dyn
.
getDig
(
this
.
a
.
p
,
this
.
a
.
typeid
,
this
.
a
.
bitmask
,
this
.
a
.
database
);
value
=
(
this
.
a
.
inverted
)
?
!
value
:
value
;
if
(
this
.
first_scan
)
{
this
.
a
.
oldValue
=
value
;
this
.
first_scan
=
false
;
return
;
}
if
((
!
this
.
level
&&
value
&&
!
this
.
a
.
oldValue
)
||
(
this
.
level
&&
value
))
{
this
.
dyn
.
graph
.
script
(
this
.
script
);
}
this
.
a
.
oldValue
=
value
;
}
open
(
lines
,
row
)
{
let
i
;
for
(
i
=
row
;
i
<
lines
.
length
;
i
++
)
{
let
tokens
=
lines
[
i
].
split
(
'
'
);
let
key
=
parseInt
(
tokens
[
0
],
10
);
switch
(
key
)
{
case
DynSave
.
DigScript
:
break
;
case
DynSave
.
DigScript_attribute
:
if
(
tokens
.
length
>
1
)
{
this
.
attribute
=
tokens
[
1
];
}
break
;
case
DynSave
.
DigScript_level
:
this
.
level
=
parseInt
(
tokens
[
1
],
10
);
break
;
case
DynSave
.
DigScript_script_len
:
break
;
case
DynSave
.
DigScript_script
:
this
.
script
=
lines
.
join
(
"
\n
"
).
split
(
/
[^\\]
"/
)[
0
];
break
;
case
DynSave
.
End
:
return
i
;
default
:
console
.
log
(
"
Syntax error in DynDigScript
"
);
break
;
}
}
return
i
;
}
}
class
DynSetDig
extends
DynElem
{
constructor
(
dyn
)
{
super
(
dyn
,
DynPrio
.
SetDig
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment