-
Notifications
You must be signed in to change notification settings - Fork 677
Implement boat unit details #2359
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
a7a5b5c
9d419ce
d05415f
74b54e8
32fe9b5
94cf0b1
66c30aa
c23b46f
18c1d97
02c73dc
cf79de0
69f361c
6eab83c
578e970
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -253,7 +253,9 @@ export interface UnitParamsMap { | |||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
| [UnitType.TradeShip]: { | ||||||||||||||||||||||||||
| targetUnit: Unit; | ||||||||||||||||||||||||||
| sourceUnit: Unit; | ||||||||||||||||||||||||||
| lastSetSafeFromPirates?: number; | ||||||||||||||||||||||||||
| distanceTraveled?: number; | ||||||||||||||||||||||||||
| }; | ||||||||||||||||||||||||||
|
Comment on lines
254
to
259
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Fix type consistency between params and interface methods. The param types don't match the interface method signatures:
Either:
Based on the context that TradeShips are created with a source Port and track distance as they travel, the recommended fix is: [UnitType.TradeShip]: {
targetUnit: Unit;
- sourceUnit: Unit;
+ sourceUnit?: Unit;
lastSetSafeFromPirates?: number;
distanceTraveled?: number;
};📝 Committable suggestion
Suggested change
🤖 Prompt for AI Agents |
||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
| [UnitType.Train]: { | ||||||||||||||||||||||||||
|
|
@@ -495,6 +497,9 @@ export interface Unit { | |||||||||||||||||||||||||
| // Trade Ships | ||||||||||||||||||||||||||
| setSafeFromPirates(): void; // Only for trade ships | ||||||||||||||||||||||||||
| isSafeFromPirates(): boolean; // Only for trade ships | ||||||||||||||||||||||||||
| sourceUnit(): Unit | undefined; // Only for trade ships | ||||||||||||||||||||||||||
| distanceTraveled(): number; // Only for trade ships | ||||||||||||||||||||||||||
| setDistanceTraveled(distance: number): void; // Only for trade ships | ||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
| // Construction | ||||||||||||||||||||||||||
| constructionType(): UnitType | null; | ||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
Uh oh!
There was an error while loading. Please reload this page.