Skip to content
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

Update Game.market.deal documentation #256

Merged
merged 3 commits into from
Mar 31, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 10 additions & 1 deletion dist/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3133,8 +3133,17 @@ interface Market {
* You can use Game.market.calcTransactionCost method to estimate it.
*
* When multiple players try to execute the same deal, the one with the shortest distance takes precedence.
*
* You cannot execute more than 10 deals during one tick.
*
* @param orderId The order ID as provided in Game.market.orders
* @param amount The amount of resources to transfer.
* @param yourRoomName The name of your room which has to contain an active Terminal with enough amount of energy.
* This argument is not used when the order resource type is one of account-bound resources (@see {@link InterShardResourceConstant}).
*
* @returns Result Code: OK, ERR_NOT_OWNER, ERR_NOT_ENOUGH_RESOURCES, ERR_FULL, ERR_INVALID_ARGS, ERR_TIRED
*/
deal(orderId: string, amount: number, targetRoomName?: string): ScreepsReturnCode;
deal(orderId: string, amount: number, yourRoomName?: string): ScreepsReturnCode;
/**
* Add more capacity to an existing order. It will affect `remainingAmount` and `totalAmount` properties. You will be charged `price*addAmount*0.05` credits.
* Extending the order doesn't update its expiration time.
Expand Down
11 changes: 10 additions & 1 deletion src/market.ts
Original file line number Diff line number Diff line change
Expand Up @@ -67,8 +67,17 @@ interface Market {
* You can use Game.market.calcTransactionCost method to estimate it.
*
* When multiple players try to execute the same deal, the one with the shortest distance takes precedence.
*
* You cannot execute more than 10 deals during one tick.
*
* @param orderId The order ID as provided in Game.market.orders
* @param amount The amount of resources to transfer.
* @param yourRoomName The name of your room which has to contain an active Terminal with enough amount of energy.
* This argument is not used when the order resource type is one of account-bound resources (@see {@link InterShardResourceConstant}).
*
* @returns Result Code: OK, ERR_NOT_OWNER, ERR_NOT_ENOUGH_RESOURCES, ERR_FULL, ERR_INVALID_ARGS, ERR_TIRED
*/
deal(orderId: string, amount: number, targetRoomName?: string): ScreepsReturnCode;
deal(orderId: string, amount: number, yourRoomName?: string): ScreepsReturnCode;
/**
* Add more capacity to an existing order. It will affect `remainingAmount` and `totalAmount` properties. You will be charged `price*addAmount*0.05` credits.
* Extending the order doesn't update its expiration time.
Expand Down
Loading