Add files via upload #3
Open
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
This PR introduces a complete overhaul of the Handling Flags system. It modularizes core logic, enhances the user experience, and introduces dynamic XML parsing, sub-array support, and raw XML value editing. The system is now more maintainable, flexible, and ready for future enhancements.
What's New?
New Files & Structure
🆕 flags.js — Core logic for dynamic flag handling, input validation, and state updates.
🆕 handling.js — Handles XML parsing, raw input updates, and integration with the UI.
🆕 2 JSON Files — Metadata files for GTAV flags from Plebs and ikt.
📁 File Separation — Extracted CSS and JS logic from flags.html and handling.html into standalone modules.
Feature Enhancements
🖱️ Flag System Overhaul — Unified flag handling logic between handling.html and flags.html.
✍️ Editable XML UI — Users can directly edit raw XML values for:
strModelFlags
strHandlingFlags
strDamageFlags
handlingName
AIHandling
📐 Dynamic Sub-Array Support — Support for vecCentreOfMassOffset and vecInertiaMultiplier for X, Y, Z adjustments.
📊 Mass Comparer Overhaul — Streamlined for flattened views and dynamic column selection.
📁 File Upload Enhancements — Uploaded file names are now stored and referenced for mass composer and comparison logic.
User Interface
🖥️ Interactive Flags UI — Users can toggle, calculate, and edit flags with ease.
🔥 Live XML Parsing — View and edit key XML nodes and sub-array data.
🖼️ Dynamic Tab Support — Handling and Flags tabs now share the same modular logic.
⚡ Real-time Calculations — Flag updates are displayed in real-time, with support for hexadecimal input validation.
Key Changes
File Type Description
flags.js 🆕 New Handles flag toggling, input listeners, and dynamic state updates.
handling.js 🆕 New Parses and updates key XML nodes and inline elements.
flags.html ✍️ Updated Modularized to support shared logic with flags.js.
handling.html ✍️ Updated Supports dynamic tabs, raw XML editing, and sub-array parsing.
flags.json 🆕 New Metadata from Plebs and ikt for GTAV flag definitions.
CSS Updates 🎨 Improved Added styles for XML editing, flags toggles, and mass comparer.
Bugs / Issues Addressed
🚫 Input Restrictions — Hex input validation logic improved. Supports copy-paste while maintaining constraints.
🐛 UI Consistency — Refactored logic to support tabs in flags.html and handling.html using shared components.
🔥 Sub-Array Support — Improved support for nested items like:
TODO / Future Enhancements
📋 Complete sub-array support — Handle all sub-handling elements and nested items.
⚖️ Remove 'miles' from internal logic — Store data in KM/H and only convert to MPH when required.
📊 Mass Comparer Improvements — Full support for flattening and dynamic column selection.
🚦 Testing & QA — Full review of XML parsing logic, flag toggling, and mass comparer values.
How to Test
Toggling Flags — Ensure flags toggle on and off properly.
Input Validation — Type hexadecimal values into editable fields and ensure input is constrained to 8 characters.
File Upload — Test XML file uploads and verify that the file name is referenced correctly.
Mass Comparer — Test flattened structure, dynamic columns, and file comparisons.
Sub-Array Support — Verify vecCentreOfMassOffset and vecInertiaMultiplier support.
Notes for Reviewers
This PR introduces significant changes to the structure and logic. Please review the changes to flags.js, handling.js, and the mass comparer logic. Special attention should be paid to:
Input Validation — Ensure user input validation logic works properly.
Sub-Array Handling — Verify XML sub-array parsing is accurate.
Flag Calculation — Review flag calculation logic for consistency.