Skip to content

[WIP] Initial Blacktek support - groups, vocations, items#354

Open
slawkens wants to merge 19 commits intodevelopfrom
blacktek-toml
Open

[WIP] Initial Blacktek support - groups, vocations, items#354
slawkens wants to merge 19 commits intodevelopfrom
blacktek-toml

Conversation

@slawkens
Copy link
Owner

items.toml loading through custom parser - no .toml reader that I tested can read it

items.toml loading through custom parser - no .toml reader that I tested can read it
@slawkens slawkens marked this pull request as draft February 14, 2026 23:57
@Codinablack
Copy link

Codinablack commented Feb 15, 2026

items.toml loading through custom parser - no .toml reader that I tested can read it

Unfortunately, all the fields are custom tailored to the tfs item properties... and in general this will be the same for all our toml formats... I'm sorry, I know that some decisions I have made, have lead to making it harder on people for migration and or supporting my project via their own project designed to be compatible... but I very much feel the need to break any restraints that keep a person from programming to make the best software they can make.

Thank you very much for working to support blacktek with myaac

@slawkens
Copy link
Owner Author

No problem, I like the new format a lot. You did an awesome work here.

The items.toml problem is not the custom fields, the reader should read it anyway. The problem I occured was with PHP timeout due to size of the file - I think the reader has poor support for bigger files.

@slawkens slawkens requested a review from Copilot February 15, 2026 00:36
@slawkens slawkens marked this pull request as ready for review February 15, 2026 00:36
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This pull request adds initial Blacktek support by introducing TOML configuration file format support alongside the existing XML format for vocations, groups, and items. The PR refactors the existing architecture to support both formats through a factory pattern, with automatic detection of which format to use based on file existence.

Changes:

  • Refactored Vocations, Groups, and Items classes to support both XML and TOML formats with automatic format detection
  • Implemented custom TOML parser for items.toml due to limitations with existing TOML libraries
  • Added devium/toml dependency for parsing standard TOML configuration files

Reviewed changes

Copilot reviewed 16 out of 17 changed files in this pull request and generated 22 comments.

Show a summary per file
File Description
system/src/Server/Vocations.php New factory class that detects and loads vocations from either TOML or XML format
system/src/Server/Groups.php New factory class that detects and loads groups from either TOML or XML format
system/src/Server/XML/Vocations.php Refactored to instance-based implementation, delegates static methods to parent namespace
system/src/Server/XML/Groups.php New XML loader extracted from OTS_Groups_List.php
system/src/Server/XML/Items.php New XML loader extracted from Items class
system/src/Server/TOML/Vocations.php New TOML loader for vocations configuration
system/src/Server/TOML/Groups.php New TOML loader for groups configuration
system/src/Server/TOML/Items.php New TOML loader for items configuration
system/src/Server/TOML/ItemsParser.php Custom parser for items.toml format using parse_ini_string
system/src/Items.php Refactored to use factory pattern for loading items from XML or TOML
system/src/DataLoader.php Updated method call from loadFromXML to load
system/pages/online.php Updated import and added null safety check for getOriginal
system/pages/highscores.php Updated import to use refactored namespace
system/init.php Updated import to use refactored namespace
system/libs/pot/OTS_Groups_List.php Simplified to use new Groups factory class
composer.json Added devium/toml dependency
composer.lock Updated with new dependencies (devium/toml and php-ds/php-ds)

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

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.

3 participants