Skip to content

Conversation

@sparr
Copy link

@sparr sparr commented Nov 23, 2025

Brief Description

Update createConstructionSite param types to specify only buildable structures, allow all buildable structures, not just spawns. I'm not sure how calls for non-spawn structures were passing type checks previously. This seems like a correct update, but because tests weren't failing before I'm not sure how to verify that I haven't made some mistake here. I also made a few related corrections, narrowing one of the signatures from the overly broad type that includes non-buildable structures.

Checklists

  • Test passed
  • Coding style (indentation, etc)
  • Edits have been made to src/ files not index.d.ts
  • Run npm run compile to update index.d.ts

@tiennou
Copy link
Contributor

tiennou commented Nov 23, 2025

A couple of those createContructionSite are type-override to limit the applicability of the name parameter to only spawns. That's why it's either a structure constant with no name, or a STRUCTURE_SPAWN and an optional name.

@sparr sparr force-pushed the fix_create_construction_site_structure_type branch from a618152 to 8d8d7c7 Compare November 23, 2025 17:45
@sparr
Copy link
Author

sparr commented Nov 23, 2025

Thanks, I missed that. Updated commit and PR description with just the other fix.

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