Include requested existing NPC features in the combined release

This commit is contained in:
unimatrixgit 2026-11-28 23:01:53 +01:00
commit 955424b42c
3 changed files with 6 additions and 5 deletions

View file

@ -20,7 +20,7 @@ pack=out/'DuneRealms-Network-Artwork-v7.zip'
with zipfile.ZipFile(pack,'w',zipfile.ZIP_DEFLATED,compresslevel=9) as z:
for name,data in sorted(entries.items()):
zi=zipfile.ZipInfo(name,(2026,11,28,0,0,0));zi.compress_type=zipfile.ZIP_DEFLATED;z.writestr(zi,data)
for module,name in [('DuneMenus','DuneMenus.jar'),('DuneEss','DuneRealms-Essentials.jar'),('DuneLobby','DuneRealms-Lobby.jar'),('DuneRealms-minecraft-only','DuneRealms-Core.jar'),('JarvisConnector','jarvistranslator.jar')]:
for module,name in [('DuneMenus','DuneMenus.jar'),('DuneEss','DuneRealms-Essentials.jar'),('DuneLobby','DuneRealms-Lobby.jar'),('DuneRealms-minecraft-only','DuneRealms-Core.jar'),('DuneNPC','DuneRealms-NPC.jar'),('JarvisConnector','jarvistranslator.jar')]:
shutil.copy2(root/module/'build/libs'/name,out/name)
shutil.copy2(root/'tools/install-dunemenus-release.py',out/'install-dunemenus-release.py')
shutil.copy2(root/'network/resource-pack/dunemenus-v7.nginx.conf',out/'dunemenus-v7.nginx.conf')

View file

@ -7,13 +7,13 @@ ALLOWED = {'/opt/dunerealms/lobby': 'dune-lobby.service', **{
f'/opt/dunerealms/servers/{x}': f'dune-{x}.service'
for x in ['arrakis', 'caladan', 'giedi_prime', 'kaitain', 'sigma_draconis_iv']}}
JARS = {'DuneMenus.jar', 'DuneRealms-Essentials.jar', 'DuneRealms-Lobby.jar',
'DuneRealms-Core.jar', 'jarvistranslator.jar'}
'DuneRealms-Core.jar', 'DuneRealms-NPC.jar', 'jarvistranslator.jar'}
LEGACY = ('DunerealmsGUI.jar', 'DuneRealmsGUI.jar', 'DuneFullscreenPaper.jar', 'MCGUI.jar',
'DunerealmsGUI', 'DuneRealmsGUI', 'DuneFullscreenPaper', 'MCGUI')
PACK = 'DuneRealms-Network-Artwork-v7.zip'
IDENTITIES = {'DuneMenus.jar': 'DuneMenus', 'DuneRealms-Essentials.jar': 'DuneEss',
'DuneRealms-Lobby.jar': 'DuneLobby', 'DuneRealms-Core.jar': 'DuneCore',
'jarvistranslator.jar': 'JarvisTranslator'}
'DuneRealms-NPC.jar': 'DuneNPC', 'jarvistranslator.jar': 'JarvisTranslator'}
def plugin_name(path):
with ZipFile(path) as archive:
@ -74,7 +74,7 @@ def install(bundle, root, unit, backup_base=Path('/root'), runner=run):
identity = plugin_name(jar)
except Exception:
require(not any(jar.name.lower().startswith(prefix) for prefix in
('dunemenus', 'dunecore', 'duneess', 'dunelobby', 'dunerealms-core',
('dunemenus', 'dunecore', 'duneess', 'dunelobby', 'dunenpc', 'dunerealms-npc', 'dunerealms-core',
'dunerealms-essentials', 'dunerealms-lobby', 'jarvistranslator')),
'Unreadable first-party plugin: '+jar.name)
continue

View file

@ -149,7 +149,8 @@ class InstallerTests(unittest.TestCase):
def test_legacy_versioned_filenames_are_replaced_without_duplicates(self):
aliases = {'DuneRealms-Core.jar': 'DuneCore-1.0.10.jar',
'DuneRealms-Essentials.jar': 'DuneEss-1.0.2.jar'}
'DuneRealms-Essentials.jar': 'DuneEss-1.0.2.jar',
'DuneRealms-NPC.jar': 'DuneNPC-1.0.0.jar'}
for source, target in aliases.items():
(self.plugins / source).rename(self.plugins / target)
result = self.invoke()