Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
Civ-V-Modpack-UI-Converter
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Analyze
Contributor analytics
CI/CD analytics
Repository analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Gohrbandt, Jan
Civ-V-Modpack-UI-Converter
Commits
18e23dc9
Commit
18e23dc9
authored
3 years ago
by
Rsge
Browse files
Options
Downloads
Patches
Plain Diff
Fixed small mistake in UnitPanel mod compat
parent
dc64fdd9
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
EUI_Modpack_Converter/converter.py
+6
-6
6 additions, 6 deletions
EUI_Modpack_Converter/converter.py
EUI_Modpack_Converter/converter_legacy.py
+2
-1
2 additions, 1 deletion
EUI_Modpack_Converter/converter_legacy.py
with
8 additions
and
7 deletions
EUI_Modpack_Converter/converter.py
+
6
−
6
View file @
18e23dc9
########################################################################
# #
# © 2021 - MPL 2.0 - Rsge - v2.1.
0
#
# © 2021 - MPL 2.0 - Rsge - v2.1.
1
#
# https://github.com/Rsge/Civ-V-EUI-Modpack-Converter #
# #
# WINDOWS ONLY! #
...
...
@@ -84,7 +84,7 @@ print("Configuring variables...")
# Names
modpack_folder_name
=
"
MP_MODSPACK
"
preservation_extension
=
"
.orig
"
load_tag
=
"
ContextPtr:LoadNewContext
"
load_tag
_marker
=
"
ContextPtr:LoadNewContext
"
unit_panel_tag
=
"
LuaEvents.UnitPanelActionAddin
"
unit_panel_insert_marker
=
"
--Insert ContextPtr for modded unit panel buttons here
\n
"
eui_cuc_file_names
=
[
"
CityBannerManager.lua
"
,
...
...
@@ -191,7 +191,7 @@ for mod_file in g(mod_files, recursive = True):
shutil
.
copyfile
(
g
(
j
(
modsave_path
,
ige_compat_file_name
+
"
*
"
))[
0
],
mod_file
)
# Delete UI overwrite duplicates
elif
mod_file_name
in
vanilla_ui_file_names
:
print
(
"
\t
Removing overwriting file
\
"
{}
\
"
...
"
.
format
(
mod_file_short_path
))
print
(
'
\t
Removing overwriting file
"
{}
"
...
'
.
format
(
mod_file_short_path
))
os
.
remove
(
mod_file
)
# Get unit panel addon files
else
:
...
...
@@ -199,7 +199,7 @@ for mod_file in g(mod_files, recursive = True):
lines
=
file
.
readlines
()
for
line
in
lines
:
if
unit_panel_tag
in
line
:
print
(
"
\t
Detecting unit panel addon in file
\
"
{}
\
"
...
"
.
format
(
mod_file_short_path
))
print
(
'
\t
Detecting unit panel addon in file
"
{}
"
...
'
.
format
(
mod_file_short_path
))
unit_panel_addon_file_names
.
append
(
mod_file_name
)
break
...
...
@@ -221,7 +221,7 @@ for ui_file in g(ui_files):
with
open
(
ui_file
,
'
r
'
)
as
file
:
lines
=
file
.
readlines
()
for
line
in
lines
:
if
line
.
startswith
(
load_tag
):
if
line
.
startswith
(
load_tag
_marker
):
load_tags
[
ui_file_name
].
append
(
line
)
# Insert stuff into EUI files
...
...
@@ -239,7 +239,7 @@ for eui_file in g(eui_files):
print
(
"
Providing EUI-UnitPanel-Modcompat...
"
)
unit_panel_load_tags
=
""
for
unit_panel_addon_file_name
in
unit_panel_addon_file_names
:
unit_panel_load_tags
+=
"
{}(
\
"
{}
\
"
)
\n
"
.
format
(
load_tag
,
p
.
splitext
(
unit_panel_addon_file_name
)[
0
])
unit_panel_load_tags
+=
'
{}(
"
{}
"
)
\n
'
.
format
(
load_tag
_marker
,
p
.
splitext
(
unit_panel_addon_file_name
)[
0
])
shutil
.
move
(
eui_file
,
eui_file
+
preservation_extension
)
shutil
.
copyfile
(
g
(
j
(
modsave_path
,
unit_panel_file_name
+
"
*
"
))[
0
],
eui_file
)
with
open
(
eui_file
,
'
r
'
)
as
file
:
...
...
This diff is collapsed.
Click to expand it.
EUI_Modpack_Converter/converter_legacy.py
+
2
−
1
View file @
18e23dc9
########################################################################
# #
# © 2021 - MPL 2.0 - Rsge - v1.0.
1
#
# © 2021 - MPL 2.0 - Rsge - v1.0.
2
#
# https://github.com/Rsge/Civ-V-EUI-Modpack-Converter #
# #
# WINDOWS ONLY! #
...
...
@@ -22,6 +22,7 @@ vanilla_eui_zip = "!EUI.7z"
modded_eui_zip
=
"
!EUI_CUC.7z
"
# Folder containing this scripts project folder and it's needed edited files
# (Sid Meier's Civilization V\Assets\DLC\ThisVariableAsFolderName)
modsave_folder
=
"
zzz_Modsaves
"
# Folder containing the vanilla packs
...
...
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