You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Jul 21, 2026. It is now read-only.
Currently there is no way to make Player A pay Player B depending on its balance (ex: a percentage of Player A) without causing a race condition. I would suggest having some parameter where it accepts a promise and that in the first argument it has the player A balance. Example:
$promise = function(int$balance) use($percentage){
return$balance * $percentage / 100;
};
yieldfrom$capital->payWithBalance(
"SellHeads",
$player1,
$player2,
$this->selector,
$promise, //This could also be async just like `Capital::api()`newLabelSet(["reason" => "Claimed head"])
);
Currently there is no way to make Player A pay Player B depending on its balance (ex: a percentage of Player A) without causing a race condition. I would suggest having some parameter where it accepts a promise and that in the first argument it has the player A balance. Example: