Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
Synchronet
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Main
Synchronet
Commits
87bbc1e9
Commit
87bbc1e9
authored
4 years ago
by
Deucе
Browse files
Options
Downloads
Patches
Plain Diff
More svar fixes, and fix &money and &gold in hard-coded strings.
parent
1d472da3
No related branches found
No related tags found
1 merge request
!463
MRC mods by Codefenix (2024-10-20)
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
xtrn/lord2/l2lib.js
+4
-1
4 additions, 1 deletion
xtrn/lord2/l2lib.js
xtrn/lord2/lord2.js
+5
-5
5 additions, 5 deletions
xtrn/lord2/lord2.js
with
9 additions
and
6 deletions
xtrn/lord2/l2lib.js
+
4
−
1
View file @
87bbc1e9
...
@@ -1292,7 +1292,10 @@ function getsvar(args, offset, vname)
...
@@ -1292,7 +1292,10 @@ function getsvar(args, offset, vname)
if
(
typeof
fv
===
'
string
'
)
{
if
(
typeof
fv
===
'
string
'
)
{
if
(
typeof
v
!==
'
string
'
)
if
(
typeof
v
!==
'
string
'
)
return
replace_vars
(
args
.
splice
(
offset
-
1
).
join
(
'
'
));
return
replace_vars
(
args
.
slice
(
offset
).
join
(
'
'
));
// TODO: Not really sure how variable replacements with spces work.
// DAMN YOU SETH!!!
args
[
offset
]
=
v
;
return
replace_vars
(
args
.
slice
(
offset
).
join
(
'
'
));
return
replace_vars
(
args
.
slice
(
offset
).
join
(
'
'
));
}
}
return
v
;
return
v
;
...
...
This diff is collapsed.
Click to expand it.
xtrn/lord2/lord2.js
+
5
−
5
View file @
87bbc1e9
...
@@ -484,7 +484,7 @@ function insane_run_ref(sec, fname, refret)
...
@@ -484,7 +484,7 @@ function insane_run_ref(sec, fname, refret)
if
(
args
.
length
>
1
)
{
if
(
args
.
length
>
1
)
{
// Note that this seems to be the only place NIL is actually documented *sigh*
// Note that this seems to be the only place NIL is actually documented *sigh*
val
=
replace_vars
(
args
[
1
]);
val
=
replace_vars
(
args
[
1
]);
if
(
val
.
toLowerCase
()
===
'
nil
'
)
if
(
typeof
val
===
'
string
'
&&
val
.
toLowerCase
()
===
'
nil
'
)
val
=
''
;
val
=
''
;
if
(
args
.
length
>
2
)
{
if
(
args
.
length
>
2
)
{
svar
=
args
[
2
];
svar
=
args
[
2
];
...
@@ -742,7 +742,7 @@ function insane_run_ref(sec, fname, refret)
...
@@ -742,7 +742,7 @@ function insane_run_ref(sec, fname, refret)
dk
.
console
.
gotoxy
(
0
,
23
);
dk
.
console
.
gotoxy
(
0
,
23
);
lw
(
'
`r5
'
);
lw
(
'
`r5
'
);
dk
.
console
.
gotoxy
(
2
,
23
);
dk
.
console
.
gotoxy
(
2
,
23
);
lw
(
'
`$Q `2to quit, `$ENTER `2to buy item. You have `$
&gold
`2gold.`r0
'
);
lw
(
'
`$Q `2to quit, `$ENTER `2to buy item. You have `$
'
+
pretty_int
(
player
.
money
)
+
'
`2gold.`r0
'
);
if
(
items
.
length
===
0
)
{
if
(
items
.
length
===
0
)
{
dk
.
console
.
gotoxy
(
0
,
10
);
dk
.
console
.
gotoxy
(
0
,
10
);
...
@@ -777,7 +777,7 @@ function insane_run_ref(sec, fname, refret)
...
@@ -777,7 +777,7 @@ function insane_run_ref(sec, fname, refret)
dk
.
console
.
gotoxy
(
0
,
23
);
dk
.
console
.
gotoxy
(
0
,
23
);
lw
(
'
`r5
'
);
lw
(
'
`r5
'
);
dk
.
console
.
gotoxy
(
2
,
23
);
dk
.
console
.
gotoxy
(
2
,
23
);
lw
(
'
`$Q `2to quit, `$ENTER `2to buy item. You have `$
&gold
`2gold.`r0
'
);
lw
(
'
`$Q `2to quit, `$ENTER `2to buy item. You have `$
'
+
pretty_int
(
player
.
money
)
+
'
`2gold.`r0
'
);
break
;
break
;
}
}
}
}
...
@@ -1387,7 +1387,7 @@ function insane_run_ref(sec, fname, refret)
...
@@ -1387,7 +1387,7 @@ function insane_run_ref(sec, fname, refret)
tmp
=
getvar
(
args
[
++
tmp2
]).
length
;
tmp
=
getvar
(
args
[
++
tmp2
]).
length
;
}
}
else
else
tmp
=
getsvar1
(
args
,
tmp2
,
args
[
0
]);
tmp
=
getsvar1
(
args
[
tmp2
]
,
args
[
0
]);
tmp2
++
;
tmp2
++
;
if
(
getvar
(
args
[
0
]).
toString
().
toLowerCase
()
===
tmp
.
toString
().
toLowerCase
())
if
(
getvar
(
args
[
0
]).
toString
().
toLowerCase
()
===
tmp
.
toString
().
toLowerCase
())
handlers
.
do
(
args
.
slice
(
tmp2
+
1
));
handlers
.
do
(
args
.
slice
(
tmp2
+
1
));
...
@@ -1654,7 +1654,7 @@ function insane_run_ref(sec, fname, refret)
...
@@ -1654,7 +1654,7 @@ function insane_run_ref(sec, fname, refret)
rescan
:
rescan
:
while
(
1
)
{
while
(
1
)
{
dk
.
console
.
gotoxy
(
39
,
23
);
dk
.
console
.
gotoxy
(
39
,
23
);
lw
(
'
`2`r5You have `$
&
money `2gold.`r0
'
);
lw
(
'
`2`r5You have `$
'
+
pretty_int
(
player
.
money
)
+
'
`2gold.`r0
'
);
inv
=
get_inventory
();
inv
=
get_inventory
();
if
(
inv
.
length
===
0
)
{
if
(
inv
.
length
===
0
)
{
dk
.
console
.
gotoxy
(
0
,
6
);
dk
.
console
.
gotoxy
(
0
,
6
);
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment