Skip to content

Make CraftType values a default value instead of a static value. #745

@goodroach

Description

@goodroach

Is your feature request related to a problem? Please describe.
Currently, the CraftType class acts as a shared configuration for all crafts of that type. This means that values like maxHeight or other numeric settings are static across all crafts of the same type. However, in more dynamic systems or gameplay scenarios, it would be beneficial to allow per-craft customization of certain parameters, using the values defined in the CraftType as defaults rather than enforced constants.

Describe the solution you'd like

  • Refactor CraftType to support per-craft instances, or alternatively, allow an override layer for individual crafts.
  • Add set methods to modify parameters (e.g., maxHeight, speed, acceleration) to the CraftType object as it will now be copied instead of being the singular instance in each craft.
  • Restrict mutability to only numerical parameters (double, float, int) for now, to avoid breaking changes or inconsistent behavior.
  • Keep immutable properties like the name or other identity-critical values unchanged per craft.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions