-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feature(actions): Initial Implementation
- Loading branch information
1 parent
9e788e3
commit 8477331
Showing
7 changed files
with
255 additions
and
0 deletions.
There are no files selected for viewing
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,3 @@ | ||
# @skyblock-finance/actions | ||
|
||
This package contains actions players can take in Hypixel Skyblock |
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,131 @@ | ||
{ | ||
"$schema": "https://json-schema.org/draft-07/schema", | ||
"additionalProperties": false, | ||
"definitions": { | ||
"currencyAction": { | ||
"additionalProperties": false, | ||
"properties": { | ||
"amount": { | ||
"type": "number" | ||
}, | ||
"type": { | ||
"enum": ["bit", "coin", "mote", "north-star"], | ||
"type": "string" | ||
} | ||
}, | ||
"required": ["amount", "type"] | ||
}, | ||
"itemAction": { | ||
"additionalProperties": false, | ||
"properties": { | ||
"amount": { | ||
"type": "number" | ||
}, | ||
"id": { | ||
"type": "string" | ||
}, | ||
"type": { | ||
"const": "item" | ||
} | ||
}, | ||
"required": ["id", "amount", "type"], | ||
"type": "object" | ||
} | ||
}, | ||
"properties": { | ||
"$schema": { | ||
"type": "string" | ||
}, | ||
"actions": { | ||
"items": { | ||
"additionalProperties": false, | ||
"properties": { | ||
"inputs": { | ||
"items": { | ||
"oneOf": [ | ||
{ "$ref": "#/definitions/currencyAction" }, | ||
{ "$ref": "#/definitions/itemAction" } | ||
], | ||
"type": "object" | ||
}, | ||
"type": "array" | ||
}, | ||
"outputs": { | ||
"items": { | ||
"oneOf": [ | ||
{ "$ref": "#/definitions/currencyAction" }, | ||
{ "$ref": "#/definitions/itemAction" } | ||
], | ||
"type": "object" | ||
}, | ||
"type": "array" | ||
}, | ||
"place": { | ||
"items": { | ||
"oneOf": [ | ||
{ | ||
"additionalProperties": false, | ||
"properties": { | ||
"id": { | ||
"type": "string" | ||
}, | ||
"type": { | ||
"const": "item" | ||
} | ||
}, | ||
"required": ["id", "type"], | ||
"type": "object" | ||
}, | ||
{ | ||
"additionalProperties": false, | ||
"properties": { | ||
"grid": { | ||
"items": { | ||
"maxLength": 9, | ||
"minLength": 9, | ||
"oneOf": [ | ||
{ "$ref": "#/definitions/itemAction" }, | ||
{ "type": "null" } | ||
] | ||
}, | ||
"type": "array" | ||
}, | ||
"type": { | ||
"const": "workbench" | ||
} | ||
}, | ||
"required": ["type"], | ||
"type": "object" | ||
}, | ||
{ | ||
"additionalProperties": false, | ||
"properties": { | ||
"id": { | ||
"type": "string" | ||
}, | ||
"type": { | ||
"const": "npc" | ||
} | ||
}, | ||
"required": ["id", "type"], | ||
"type": "object" | ||
} | ||
], | ||
"type": "object" | ||
}, | ||
"type": "array" | ||
}, | ||
"requirements": { | ||
"items": {}, | ||
"type": "array" | ||
} | ||
}, | ||
"required": ["inputs", "outputs", "place"], | ||
"type": "object" | ||
}, | ||
"type": "array" | ||
} | ||
}, | ||
"required": ["actions"], | ||
"type": "object" | ||
} |
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,60 @@ | ||
{ | ||
"$schema": "./$schema.json", | ||
"actions": [ | ||
{ | ||
"inputs": [ | ||
{ "amount": 16, "id": "ENCHANTED_COAL", "type": "item" }, | ||
{ "amount": 1, "id": "ENCHANTED_SULPHUR", "type": "item" } | ||
], | ||
"outputs": [{ "amount": 4, "id": "SULPHURIC_COAL", "type": "item" }], | ||
"place": [ | ||
{ | ||
"grid": [ | ||
null, | ||
{ "amount": 4, "id": "COAL", "type": "item" }, | ||
null, | ||
{ "amount": 4, "id": "COAL", "type": "item" }, | ||
{ "amount": 1, "id": "ENCHANTED_SULPHUR", "type": "item" }, | ||
{ "amount": 4, "id": "COAL", "type": "item" }, | ||
null, | ||
{ "amount": 4, "id": "COAL", "type": "item" }, | ||
null | ||
], | ||
"type": "workbench" | ||
} | ||
], | ||
"requirements": [] | ||
}, | ||
{ | ||
"inputs": [ | ||
{ "amount": 16, "id": "ENCHANTED_COAL", "type": "item" }, | ||
{ "amount": 4, "id": "CHILI_PEPPER", "type": "item" }, | ||
{ "amount": 1, "id": "ENCHANTED_SULPHUR", "type": "item" } | ||
], | ||
"outputs": [{ "amount": 12, "id": "SULPHURIC_COAL", "type": "item" }], | ||
"place": [ | ||
{ | ||
"grid": [ | ||
{ "amount": 1, "id": "CHILI_PEPPER", "type": "item" }, | ||
{ "amount": 4, "id": "COAL", "type": "item" }, | ||
{ "amount": 1, "id": "CHILI_PEPPER", "type": "item" }, | ||
{ "amount": 4, "id": "COAL", "type": "item" }, | ||
{ "amount": 1, "id": "ENCHANTED_SULPHUR", "type": "item" }, | ||
{ "amount": 4, "id": "COAL", "type": "item" }, | ||
{ "amount": 1, "id": "CHILI_PEPPER", "type": "item" }, | ||
{ "amount": 4, "id": "COAL", "type": "item" }, | ||
{ "amount": 1, "id": "CHILI_PEPPER", "type": "item" } | ||
], | ||
"type": "workbench" | ||
} | ||
], | ||
"requirements": [ | ||
{ | ||
"collection": "CHILI_PEPPER", | ||
"tier": 2, | ||
"type": "COLLECTION" | ||
} | ||
] | ||
} | ||
] | ||
} |
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,42 @@ | ||
{ | ||
"bugs": { | ||
"url": "https://github.com/skyblock-finance/skyblock-finance-opensource/issues" | ||
}, | ||
"dependencies": {}, | ||
"devDependencies": { | ||
"@types/bun": "latest" | ||
}, | ||
"files": [ | ||
"dist", | ||
"source" | ||
], | ||
"keywords": [ | ||
"hypixel-skyblock", | ||
"hypixel", | ||
"skyblock-finance" | ||
], | ||
"license": "MIT", | ||
"main": "dist/index.js", | ||
"name": "@skyblock-finance/actions", | ||
"peerDependencies": { | ||
"typescript": ">= 4" | ||
}, | ||
"repository": { | ||
"type": "git", | ||
"url": "git+https://github.com/skyblock-finance/skyblock-finance-opensource" | ||
}, | ||
"scripts": { | ||
"build": "rm -rf dist && tsc --build", | ||
"check:arethetypeswrong": "bun run attw --pack .", | ||
"check:eslint": "bun run eslint --max-warnings=0 .", | ||
"check:prettier": "bun --bun run --cwd ../.. prettier --check packages/actions", | ||
"check:publint": "bun --bun run publint", | ||
"fix:eslint": "bun run check:eslint --fix", | ||
"fix:prettier": "bun --bun run check:prettier --write", | ||
"publish-package": "npm publish --access public --provenance" | ||
}, | ||
"sideEffects": false, | ||
"type": "commonjs", | ||
"types": "dist/index.d.ts", | ||
"version": "0.0.1" | ||
} |
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,13 @@ | ||
{ | ||
"compilerOptions": { | ||
"module": "commonjs", | ||
"moduleResolution": "Node", | ||
"outDir": "./dist", | ||
"rootDir": "./source", | ||
"tsBuildInfoFile": "./dist/.tsbuildinfo", | ||
"types": ["bun"] | ||
}, | ||
"exclude": ["source/**/*.test.ts"], | ||
"extends": "../../tsconfig.json", | ||
"include": ["source/**/*.ts"] | ||
} |
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,5 @@ | ||
{ | ||
"$schema": "https://turbo.build/schema.json", | ||
"extends": ["//"], | ||
"pipeline": {} | ||
} |