-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
10 changed files
with
11,097 additions
and
3 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
import type { BlockBreakForceConfig } from "./blockbreak"; | ||
|
||
export interface ForcesConfig { | ||
blockBreakForce?: BlockBreakForceConfig | ||
} | ||
|
||
export interface BaseForceConfig { | ||
/** | ||
* The lower bound that is used to determine the time for the next forcing. In seconds. | ||
* | ||
* @minimum 1 | ||
* @maximum 3600 | ||
* @TJS-type integer | ||
*/ | ||
minTime?: number | ||
|
||
/** | ||
* The upper bound that is used to determine the time for the next forcing. In seconds. | ||
* | ||
* @minimum 1 | ||
* @maximum 3600 | ||
* @TJS-type integer | ||
*/ | ||
maxTime?: number | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
import type { BaseForceConfig } from "./forces" | ||
import type { BaseGoalConfig, Orderable, CollectableEntryConfig } from "./goals" | ||
import type { PunishableRuleConfig } from "./rules" | ||
|
||
export interface NoItemCollectRuleConfig extends PunishableRuleConfig { | ||
/** | ||
* List of materials that are exempted from the rule. | ||
* @default [] | ||
*/ | ||
exemptions?: string[] | ||
} | ||
|
||
export interface ItemForceConfig extends BaseForceConfig, Omit<ItemGoalConfig, 'fixedOrder'> { | ||
|
||
} | ||
|
||
export interface ItemGoalConfig extends BaseGoalConfig, Orderable { | ||
/** | ||
* The items that need to be collected to beat this goal. | ||
* | ||
* @default [] | ||
*/ | ||
items?: CollectableEntryConfig[] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
export function shuffleArray(array) { | ||
let currentIndex = array.length, randomIndex; | ||
|
||
// While there remain elements to shuffle... | ||
while (currentIndex !== 0) { | ||
|
||
// Pick a remaining element... | ||
randomIndex = Math.floor(Math.random() * currentIndex); | ||
currentIndex--; | ||
|
||
// And swap it with the current element. | ||
[array[currentIndex], array[randomIndex]] = [ | ||
array[randomIndex], array[currentIndex]]; | ||
} | ||
|
||
return array; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
.idea/ | ||
Challenges.iml | ||
server/ | ||
server/ | ||
resourcepack/ |
Oops, something went wrong.