How jazzylucas/calculatescrapforquota works
Main Components
a. Core Mod Component:
• Main Plugin.cs as the entry point
• Config.cs for mod configuration handling
b. Patch System:
• GrabbableObjectPatch.cs
• HudManagerPatch.cs
These handle the game's code modifications
c. Utility Layer:
• Utils directory containing:
• MathUtil.cs
• DebugUtil.cs
d. Visual/Material System:
• Scripts directory with:
• MaterialSwapper.cs
• Materials.cs
• [Game: Lethal Company]
• ↑
• [Mod Core (Plugin.cs)]
• ↓
• v v v
• [Patches] [Scripts] [Utils]
Key Relationships
a. Data Flow:
• How the scanning feature triggers the calculation system
• Demonstrate how optimal scrap calculation flows through the components
• Highlight system's interaction with the game's rendering
b. Dependencies:
• How Patches interact with the base game
• How MaterialSwapper depends on Materials
• Utility class usage across components
Integration Points
• Where the mod hooks into the game's scanning system
• HUD modification points
• Object interaction points for scrap calculation
Testing Component
• CalculateScrapForQuota.Tests section
• Relationship to MathUtilTest.cs
• → Direct method calls
• ⇢ Event-based communication
• ⟲ Game hook points
• ⚡ Patch injection points
• 🔍 Scanning functionality
• 💰 Quota calculation points
This will give other developers a clear understanding of:
• How the mod integrates with the game
• The flow of scrap calculation logic
• The visual feedback system
• The patch system's modification points
• The utility system's support role
Remember to keep the focus on the mod's core functionality of scanning, calculating optimal scrap for quota, and providing visual feedback, while showing how these systems interact with the base game.