mirror of
https://github.com/legop3/MultiRoombaRover.git
synced 2026-09-15 17:12:59 -04:00
event popup!!
This commit is contained in:
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -11,8 +11,8 @@
|
||||
<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent" />
|
||||
<meta name="apple-mobile-web-app-title" content="Multi Roomba Rover" />
|
||||
<title>Multi Roomba Rover</title>
|
||||
<script type="module" crossorigin src="/assets/index-CCaG2_WI.js"></script>
|
||||
<link rel="stylesheet" crossorigin href="/assets/index-C3BucANX.css">
|
||||
<script type="module" crossorigin src="/assets/index-Cxe8USDb.js"></script>
|
||||
<link rel="stylesheet" crossorigin href="/assets/index-BquPV0pG.css">
|
||||
</head>
|
||||
<body>
|
||||
<div id="root"></div>
|
||||
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 8.7 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 2.7 KiB |
Binary file not shown.
@@ -242,12 +242,22 @@ async function runRewardForButton(button) {
|
||||
assignNewReward(button);
|
||||
return;
|
||||
}
|
||||
const completedCount = Number.isFinite(button.count) ? button.count : 0;
|
||||
const completedGoal = Number.isFinite(button.goal) ? button.goal : 0;
|
||||
const ctx = buildRewardContext();
|
||||
try {
|
||||
await reward.run(ctx);
|
||||
} catch (err) {
|
||||
logger.warn('Reward execution failed', { rewardId: reward.id, error: err.message });
|
||||
}
|
||||
io.emit('buttonBox:rewardRun', {
|
||||
buttonId: button.id,
|
||||
rewardId: reward.id,
|
||||
rewardName: reward.name || reward.id,
|
||||
count: completedCount,
|
||||
goal: completedGoal,
|
||||
ts: Date.now(),
|
||||
});
|
||||
button.lastRewardAt = Date.now();
|
||||
button.count = 0;
|
||||
assignNewReward(button);
|
||||
|
||||
Reference in New Issue
Block a user