Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Tales of MajEyal
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
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
tome
Tales of MajEyal
Commits
78c05e12
Commit
78c05e12
authored
10 years ago
by
DarkGod
Browse files
Options
Downloads
Patches
Plain Diff
auto compute md5
parent
05f0baf5
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
game/engines/default/engine/Module.lua
+18
-2
18 additions, 2 deletions
game/engines/default/engine/Module.lua
with
18 additions
and
2 deletions
game/engines/default/engine/Module.lua
+
18
−
2
View file @
78c05e12
...
...
@@ -459,6 +459,13 @@ function _M:addonMD5(add, base)
table
.
print
(
md5s
)
local
fmd5
=
md5
.
sumhexa
(
table.concat
(
md5s
))
print
(
"[MODULE LOADER] addon "
,
add
.
short_name
,
" MD5"
,
fmd5
,
"computed in "
,
core
.
game
.
getTime
()
-
t
,
vbase
)
if
__module_extra_info
.
compute_md5_only
then
local
f
=
io.open
(
__module_extra_info
.
compute_md5_only
,
"a"
)
f
:
write
((
"%s : addon[%s] md5\n"
):
format
(
fmd5
,
add
.
version_name
))
f
:
close
()
end
return
fmd5
end
...
...
@@ -579,7 +586,7 @@ You may try to force loading if you are sure the savefile does not use that addo
-- Compute addon md5
local
hash_valid
,
hash_err
if
config
.
settings
.
cheat
then
if
config
.
settings
.
cheat
and
not
__module_extra_info
.
compute_md5_only
then
hash_valid
,
hash_err
=
false
,
"cheat mode skipping addon validation"
else
local
fmd5
=
self
:
addonMD5
(
add
)
...
...
@@ -878,7 +885,7 @@ function _M:instanciate(mod, name, new_game, no_reboot, extra_module_info)
local
hash_valid
,
hash_err
local
t
=
core
.
game
.
getTime
()
local
module_md5
=
"--"
if
config
.
settings
.
cheat
then
if
config
.
settings
.
cheat
and
not
__module_extra_info
.
compute_md5_only
then
hash_valid
,
hash_err
=
false
,
"cheat mode skipping validation"
else
if
mod
.
short_name
~=
"boot"
then
...
...
@@ -888,6 +895,12 @@ function _M:instanciate(mod, name, new_game, no_reboot, extra_module_info)
table.sort
(
md5s
)
module_md5
=
md5
.
sumhexa
(
table.concat
(
md5s
))
print
(
"[MODULE LOADER] module MD5"
,
module_md5
,
"computed in "
,
core
.
game
.
getTime
()
-
t
)
if
__module_extra_info
.
compute_md5_only
then
local
f
=
io.open
(
__module_extra_info
.
compute_md5_only
,
"w"
)
f
:
write
((
"%s : module[%s] md5\n"
):
format
(
module_md5
,
mod
.
version_string
))
f
:
close
()
end
end
end
...
...
@@ -898,6 +911,9 @@ function _M:instanciate(mod, name, new_game, no_reboot, extra_module_info)
hash_valid
,
hash_err
=
profile
:
checkBatchHash
(
hashlist
)
print
(
"[MODULE] All hashes validation: "
,
hash_valid
,
hash_err
)
-- Finish now
if
__module_extra_info
.
compute_md5_only
then
os
.
crash
()
end
-- Now that addons are loaded we can load UI definitions
for
_
,
file
in
ipairs
(
fs
.
list
(
"/data/gfx/ui/definitions"
))
do
if
file
:
find
(
"%.lua$"
)
then
UIBase
:
loadUIDefinitions
(
"/data/gfx/ui/definitions/"
..
file
)
end
...
...
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