Upload via GUI (43 Dateien)
This commit is contained in:
@@ -75,9 +75,12 @@ const DEFAULT_SETTINGS = {
|
||||
sortBy: 'lastPlayed', // lastPlayed | name
|
||||
iso3dIcons: true, // Block-Symbole räumlich darstellen
|
||||
bedrockEnabled: true, // Bedrock-Bereich anzeigen (nur wenn auch installiert)
|
||||
desktopNotifications: true, // Windows-Meldung bei fertigem Hintergrund-Download/-Backup
|
||||
bgSkin: '', // '' = aus, 'active' = aktives Konto, sonst Konto-UUID
|
||||
bgSkinOpacity: 55, // Deckkraft des Hintergrund-Skins in %
|
||||
bgSkinPose: 'walking', // Pose des 3D-Renders (falls der Pose-Dienst erreichbar ist)
|
||||
bgSkinCycle: false, // bei 2+ angemeldeten Konten automatisch durchwechseln
|
||||
bgSkinCycleSeconds: 30, // Sekunden zwischen zwei Kontowechseln
|
||||
wrapperCommand: '', // Externe Programme: Startprogramm, das Java umschließt
|
||||
proxyEnabled: false, // HTTP-Proxy für Downloads/Netzwerk
|
||||
proxyHost: '',
|
||||
@@ -232,6 +235,24 @@ function addMod(id, entry, art = 'mod') {
|
||||
return list;
|
||||
}
|
||||
|
||||
/*
|
||||
* Findet installierte Mods, die den per "filename" identifizierten Mod als
|
||||
* Pflicht-Abhängigkeit brauchen (requiredDeps wird beim Installieren über
|
||||
* AeroMC gesetzt – von Hand hinzugefügte oder vor diesem Feature installierte
|
||||
* Mods haben keine requiredDeps und werden daher nicht als Ziel erkannt,
|
||||
* können aber selbst weiterhin als Abhängiger auftauchen).
|
||||
* -> [Titel, Titel, ...] der abhängigen Mods
|
||||
*/
|
||||
function findDependents(id, filename, art = 'mod') {
|
||||
const list = listMods(id, art);
|
||||
const target = list.find((m) => m.filename === filename);
|
||||
if (!target || !target.projectId) return [];
|
||||
return list
|
||||
.filter((m) => m.filename !== filename
|
||||
&& Array.isArray(m.requiredDeps) && m.requiredDeps.includes(target.projectId))
|
||||
.map((m) => m.title || m.filename);
|
||||
}
|
||||
|
||||
function removeMod(id, filename, art = 'mod') {
|
||||
const list = listMods(id, art).filter((m) => m.filename !== filename);
|
||||
writeJson(modsIndexFile(id, art), list);
|
||||
@@ -443,6 +464,7 @@ module.exports = {
|
||||
listMods,
|
||||
addMod,
|
||||
removeMod,
|
||||
findDependents,
|
||||
setModEnabled,
|
||||
listInstances,
|
||||
getInstance,
|
||||
|
||||
Reference in New Issue
Block a user