It's rim(W!)orld
This commit is contained in:
@@ -46,7 +46,7 @@ B) which ones we've already tried and which we have not
|
|||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
Hello! These are fascinating problems related to mod management for Rimworld. Let's think through both issues carefully.
|
Hello! These are fascinating problems related to mod management for RimWorld. Let's think through both issues carefully.
|
||||||
|
|
||||||
## Problem 1: Sorting Mods Based on Dependencies
|
## Problem 1: Sorting Mods Based on Dependencies
|
||||||
|
|
||||||
|
@@ -41,7 +41,7 @@ Interesting children are:
|
|||||||
|
|
||||||
In addition to *About.xml* *preview.png* might also be interesting
|
In addition to *About.xml* *preview.png* might also be interesting
|
||||||
|
|
||||||
To enable or disable mods we look at *~/AppData/.../Rimworld/Config/ModsConfig.xml*
|
To enable or disable mods we look at *~/AppData/.../RimWorld/Config/ModsConfig.xml*
|
||||||
The structure of this xml is:
|
The structure of this xml is:
|
||||||
- ModsConfigData
|
- ModsConfigData
|
||||||
- As the root element
|
- As the root element
|
||||||
|
@@ -5,7 +5,7 @@
|
|||||||
<key>CFBundleDevelopmentRegion</key>
|
<key>CFBundleDevelopmentRegion</key>
|
||||||
<string>$(DEVELOPMENT_LANGUAGE)</string>
|
<string>$(DEVELOPMENT_LANGUAGE)</string>
|
||||||
<key>CFBundleDisplayName</key>
|
<key>CFBundleDisplayName</key>
|
||||||
<string>Rimworld Modman</string>
|
<string>RimWorld Modman</string>
|
||||||
<key>CFBundleExecutable</key>
|
<key>CFBundleExecutable</key>
|
||||||
<string>$(EXECUTABLE_NAME)</string>
|
<string>$(EXECUTABLE_NAME)</string>
|
||||||
<key>CFBundleIdentifier</key>
|
<key>CFBundleIdentifier</key>
|
||||||
|
@@ -10,7 +10,7 @@ void main() {
|
|||||||
|
|
||||||
// Get a reference to the logger (now auto-initializes)
|
// Get a reference to the logger (now auto-initializes)
|
||||||
final logger = Logger.instance;
|
final logger = Logger.instance;
|
||||||
logger.info('Rimworld Mod Manager starting...');
|
logger.info('RimWorld Mod Manager starting...');
|
||||||
|
|
||||||
// Initialize the mod manager
|
// Initialize the mod manager
|
||||||
modManager = ModList(path: modsRoot);
|
modManager = ModList(path: modsRoot);
|
||||||
@@ -25,7 +25,7 @@ class RimWorldModManager extends StatelessWidget {
|
|||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
return MaterialApp(
|
return MaterialApp(
|
||||||
title: 'Rimworld Mod Manager',
|
title: 'RimWorld Mod Manager',
|
||||||
theme: ThemeData.dark().copyWith(
|
theme: ThemeData.dark().copyWith(
|
||||||
primaryColor: const Color(0xFF3D4A59),
|
primaryColor: const Color(0xFF3D4A59),
|
||||||
colorScheme: ColorScheme.fromSeed(
|
colorScheme: ColorScheme.fromSeed(
|
||||||
@@ -62,7 +62,7 @@ class _ModManagerHomePageState extends State<ModManagerHomePage> {
|
|||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
return Scaffold(
|
return Scaffold(
|
||||||
appBar: AppBar(title: const Text('Rimworld Mod Manager')),
|
appBar: AppBar(title: const Text('RimWorld Mod Manager')),
|
||||||
body: _pages[_selectedIndex],
|
body: _pages[_selectedIndex],
|
||||||
bottomNavigationBar: BottomNavigationBar(
|
bottomNavigationBar: BottomNavigationBar(
|
||||||
currentIndex: _selectedIndex,
|
currentIndex: _selectedIndex,
|
||||||
@@ -186,7 +186,7 @@ class _ModManagerPageState extends State<ModManagerPage> {
|
|||||||
),
|
),
|
||||||
const SizedBox(height: 16),
|
const SizedBox(height: 16),
|
||||||
Text(
|
Text(
|
||||||
'Ready to scan for Rimworld mods.',
|
'Ready to scan for RimWorld mods.',
|
||||||
style: Theme.of(context).textTheme.bodyLarge,
|
style: Theme.of(context).textTheme.bodyLarge,
|
||||||
),
|
),
|
||||||
const SizedBox(height: 12),
|
const SizedBox(height: 12),
|
||||||
|
@@ -133,9 +133,9 @@ class ModList {
|
|||||||
name:
|
name:
|
||||||
existingMod?.name ??
|
existingMod?.name ??
|
||||||
(isBaseGame
|
(isBaseGame
|
||||||
? "Rimworld"
|
? "RimWorld"
|
||||||
: isExpansion
|
: isExpansion
|
||||||
? "Rimworld ${_expansionNameFromId(modId)}"
|
? "RimWorld ${_expansionNameFromId(modId)}"
|
||||||
: modId),
|
: modId),
|
||||||
id: existingMod?.id ?? modId,
|
id: existingMod?.id ?? modId,
|
||||||
path: existingMod?.path ?? '',
|
path: existingMod?.path ?? '',
|
||||||
|
@@ -4,7 +4,7 @@ import 'package:rimworld_modman/logger.dart';
|
|||||||
import 'package:rimworld_modman/mod.dart';
|
import 'package:rimworld_modman/mod.dart';
|
||||||
import 'package:xml/xml.dart';
|
import 'package:xml/xml.dart';
|
||||||
|
|
||||||
const root = r'C:/Users/Administrator/Seafile/Games-Rimworld';
|
const root = r'C:/Users/Administrator/Seafile/Games-RimWorld';
|
||||||
const modsRoot = '$root/294100';
|
const modsRoot = '$root/294100';
|
||||||
const configRoot = '$root/AppData/RimWorld by Ludeon Studios/Config';
|
const configRoot = '$root/AppData/RimWorld by Ludeon Studios/Config';
|
||||||
const configPath = '$configRoot/ModsConfig.xml';
|
const configPath = '$configRoot/ModsConfig.xml';
|
||||||
|
@@ -2,7 +2,7 @@ import 'package:rimworld_modman/mod.dart';
|
|||||||
import 'package:rimworld_modman/mod_list.dart';
|
import 'package:rimworld_modman/mod_list.dart';
|
||||||
import 'package:test/test.dart';
|
import 'package:test/test.dart';
|
||||||
|
|
||||||
const root = r'C:/Users/Administrator/Seafile/Games-Rimworld';
|
const root = r'C:/Users/Administrator/Seafile/Games-RimWorld';
|
||||||
const modsRoot = '$root/294100';
|
const modsRoot = '$root/294100';
|
||||||
const configRoot = '$root/AppData/RimWorld by Ludeon Studios/Config';
|
const configRoot = '$root/AppData/RimWorld by Ludeon Studios/Config';
|
||||||
const configPath = '$configRoot/ModsConfig.xml';
|
const configPath = '$configRoot/ModsConfig.xml';
|
||||||
@@ -66,7 +66,7 @@ void main() {
|
|||||||
final rimworldIndex = sortedMods.indexOf('ludeon.rimworld');
|
final rimworldIndex = sortedMods.indexOf('ludeon.rimworld');
|
||||||
expect(harmonyIndex, lessThan(rimworldIndex));
|
expect(harmonyIndex, lessThan(rimworldIndex));
|
||||||
});
|
});
|
||||||
test('Rimworld should load before Anomaly', () {
|
test('RimWorld should load before Anomaly', () {
|
||||||
final rimworldIndex = sortedMods.indexOf('ludeon.rimworld');
|
final rimworldIndex = sortedMods.indexOf('ludeon.rimworld');
|
||||||
final anomalyIndex = sortedMods.indexOf('ludeon.rimworld.anomaly');
|
final anomalyIndex = sortedMods.indexOf('ludeon.rimworld.anomaly');
|
||||||
expect(rimworldIndex, lessThan(anomalyIndex));
|
expect(rimworldIndex, lessThan(anomalyIndex));
|
||||||
|
Reference in New Issue
Block a user