tangled
alpha
login
or
join now
clxxiii.dev
/
osu-bingo
0
fork
atom
Two teams try and fill in any horizontal, vertical, or diagonal line on a bingo board by playing maps on osu!
osu.bingo
osu
0
fork
atom
overview
issues
pulls
pipelines
change claim condition over time
clxxiii
11 months ago
5b483ced
a4dbec90
+15
-1
1 changed file
expand all
collapse all
unified
split
src
lib
gamerules
get_rules.ts
+15
-1
src/lib/gamerules/get_rules.ts
···
20
20
rules.rank = options.setup.rank;
21
21
}
22
22
23
23
+
// TODO: Change rules if square is in a block
24
24
+
25
25
+
if (!game.start_time) return rules;
26
26
+
23
27
// TODO: Get current Claim Condition according to events
28
28
+
const seconds_into_game = (Date.now() - new Date(game.start_time).valueOf()) / 1000
29
29
+
30
30
+
for (const event of options.event) {
31
31
+
if (event.seconds_after_start < seconds_into_game) {
32
32
+
if (event.event == 'claimchange') {
33
33
+
rules.claim_condition = event.detail;
34
34
+
} else if (event.event == 'reclaimchange') {
35
35
+
rules.reclaim_condition = event.detail;
36
36
+
}
37
37
+
}
38
38
+
}
24
39
25
40
if (!squareIdx) return rules
26
41
27
27
-
// TODO: Change rules if square is in a block
28
42
29
43
return rules;
30
44
}