Skip to content

Correct coalition.addStaticObject parameter count and return type#16

Merged
YoloWingPixie merged 1 commit into
mainfrom
14-coalitionaddstaticobject-asserts-it-takes-3-parameters-it-takes-2
May 24, 2025
Merged

Correct coalition.addStaticObject parameter count and return type#16
YoloWingPixie merged 1 commit into
mainfrom
14-coalitionaddstaticobject-asserts-it-takes-3-parameters-it-takes-2

Conversation

@YoloWingPixie
Copy link
Copy Markdown
Owner

Resolve #14

  • Remove incorrect coalition.side parameter - DCS automatically infers coalition from country identifier
  • Update return type from function to StaticObject to documented actual DCS World API behavior
  • Update method description to clarify coalition is determined automatically

Fixes crash reported where function was defined with incorrect parameter count. The function should only take (country.id, StaticObjectSpawnData

#14)

- Remove incorrect coalition.side parameter - DCS automatically infers coalition from country identifier
- Update return type from function to StaticObject to match actual DCS World API behavior
- Update method description to clarify coalition is determined automatically

Fixes crash reported where function was defined with incorrect parameter count.
The function should only take (country.id, StaticObjectSpawnData
Copilot AI review requested due to automatic review settings May 24, 2025 23:15
@github-actions
Copy link
Copy Markdown

DCS Schema Stats

Metric Count
Types 1
Globals 1
Total Size 417974 bytes

✅ All validation checks passed!

Copy link
Copy Markdown
Contributor

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 PR aligns the coalition.addStaticObject schema with the actual DCS World API by removing an unused parameter and correcting its return type, then bumps the package version and updates the changelog.

  • Remove the incorrect coalition parameter from addStaticObject
  • Update return type from function to StaticObject
  • Bump version to 0.3.3 and document the fixes in CHANGELOG.md

Reviewed Changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.

File Description
dcs-world-schema/globals/coalition.singleton.yaml Removed the coalition param, updated the method description, and changed the return type to StaticObject.
VERSION Updated version number from 0.3.2 to 0.3.3.
CHANGELOG.md Added a new section for [0.3.3] with details on the removed parameter and return type update.
Comments suppressed due to low confidence (2)

dcs-world-schema/globals/coalition.singleton.yaml:52

  • No tests were updated to reflect the new addStaticObject signature and return type. Please add or update unit tests to cover the updated behavior of coalition.addStaticObject.
returns: StaticObject

dcs-world-schema/globals/coalition.singleton.yaml:53

  • [nitpick] Since the signature and return type of addStaticObject were updated in this release, consider adding a changedVersion: "0.3.3" or annotating the change in the schema to improve clarity.
addedVersion: "1.2.0"

@YoloWingPixie YoloWingPixie merged commit 569750a into main May 24, 2025
1 check passed
@YoloWingPixie YoloWingPixie deleted the 14-coalitionaddstaticobject-asserts-it-takes-3-parameters-it-takes-2 branch May 24, 2025 23:17
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.

coalition.addStaticObject asserts it takes 3 parameters, it takes 2.

2 participants