Skip to content

Conversation

@buttheadbob
Copy link
Contributor

MT Collections had a lot of issues

Delayed updates, ignoring updates, thread issues, etc.

  • New, modern, and stable .Net collections have been used in their place.
  • XML and JSON serialization compatable built in.
  • DispatcherObservableEvent for simplicity
  • Multiple list styles including Dictionary, Hashset, SortedList, etc which are Concurrent and Observable.

MT collections remain untouched for legacy support but are marked [Obsolete].

All uses in Torch should be switched over to the new collections.

Minor tweaks:

  • Column Virtualization and other miner tweaks were made.

… token

## Fix command argument parsing bug when token substring matches earlier token

### Changes
- **Bug Fix**: Revised `CommandTree.GetCommand` method to correctly extract arguments from command strings.
- **Minor Formatting**: Updated array initializer syntax for consistency.

### Bug Description
The previous implementation used `IndexOf(split[skip])` to locate the start of the arguments within the original command text. This approach fails when an earlier command token contains the argument token as a substring. For example, given the command `"qs storegrid ore 10000"`, the token `"ore"` appears inside the preceding token `"storegrid"`. `IndexOf` would then return the position inside `"storegrid"`, causing `argText` to incorrectly start at `"oregrid ore 10000"` rather than at the actual argument `"ore 10000"`.

### Solution
The fix tracks the position of each preceding token by iterating over the command tokens up to the argument start. For each token, we locate it in the original string using a case‑sensitive ordinal search, advance the position past the token and any trailing spaces, and finally take the substring from that position. This ensures the argument text begins exactly after the full command name.

### Code Changes
1. **Line 99**: Changed `new []{' '}` to `new[] { ' ' }` (cosmetic).
2. **Lines 106–145**: Replaced the faulty substring logic with a robust token‑position tracking algorithm. Added detailed inline comments explaining the bug and the fix.
3. **Line 147**: Added a blank line for readability.

### Impact
- Commands with overlapping token substrings will now parse arguments correctly.
- No breaking changes; the method signature and overall behavior remain unchanged.
- Improves reliability of command‑line parsing in Torch's command system.
…ry structure

Move dedicated server files to 'game' subdirectory

Add retry logic and error handling for SteamCMD updates

Remove unused using statements

Centralize path calculation with GetDedicatedServer64Path method
…evelopers

- Added EnsureDedicatedServer64Symlink method that creates a directory junction from ./DedicatedServer64 to ./game/DedicatedServer64 for backward compatibility with plugin development workflows.
- Ensure world list refreshes after new world creation by calling RefreshModel in InstanceManager.SelectWorld
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant