Skip to content

Add minimal Godot export surface and restore build by implementing RespiratorySystem#1

Draft
Copilot wants to merge 3 commits into
masterfrom
copilot/implement-visualization-in-godot
Draft

Add minimal Godot export surface and restore build by implementing RespiratorySystem#1
Copilot wants to merge 3 commits into
masterfrom
copilot/implement-visualization-in-godot

Conversation

Copy link
Copy Markdown

Copilot AI commented Feb 17, 2026

The simulation could not be used for Godot visualization because Body referenced a non-existent RespiratorySystem, and there was no stable payload for external rendering. This change adds the missing respiratory system and a JSON snapshot API designed for Godot consumption.

  • Body initialization + system completeness

    • Added RespiratorySystem so Body can construct all currently referenced systems.
    • Implemented minimal respiratory nodes/components and handling for SuffocateEvent / ClearAirwayEvent.
  • Godot-facing state export

    • Added Body.ExportForGodotJson(bool indented = false).
    • Export includes:
      • global resource pool (resources)
      • per-system body-part state (systems)
      • node status + component metrics (current, max, regenRate)
  • Serialization access point in system base

    • Added BodySystemBase.GetNodes() to expose node state as a read-only map for export without changing existing system behavior.
  • Focused coverage for new contract

    • Added BodyTests validating:
      • respiratory system is initialized in Body
      • exported JSON includes expected systems/resources/component fields for visualization clients
var body = new Body();
string snapshot = body.ExportForGodotJson(indented: true);
// snapshot["systems"]["Respiratory"]["Chest"]["components"]["AirFlow"]["current"]

💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

Copilot AI and others added 2 commits February 17, 2026 11:40
Co-authored-by: Uggeli <55832075+Uggeli@users.noreply.github.com>
Co-authored-by: Uggeli <55832075+Uggeli@users.noreply.github.com>
Copilot AI changed the title [WIP] Implement body visualization in Godot Add minimal Godot export surface and restore build by implementing RespiratorySystem Feb 17, 2026
Copilot AI requested a review from Uggeli February 17, 2026 11:44
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.

2 participants