feat: add dependency
This commit is contained in:
@@ -0,0 +1,55 @@
|
|||||||
|
name: Bug Report
|
||||||
|
description: Create a report to help us improve
|
||||||
|
title: "[Bug]: "
|
||||||
|
labels: ["bug"]
|
||||||
|
body:
|
||||||
|
- type: textarea
|
||||||
|
attributes:
|
||||||
|
label: Describe the bug
|
||||||
|
description: A clear and concise description of what the bug is.
|
||||||
|
validations:
|
||||||
|
required: true
|
||||||
|
|
||||||
|
- type: textarea
|
||||||
|
attributes:
|
||||||
|
label: To Reproduce
|
||||||
|
description: Steps to reproduce the behavior.
|
||||||
|
validations:
|
||||||
|
required: true
|
||||||
|
|
||||||
|
- type: textarea
|
||||||
|
attributes:
|
||||||
|
label: Expected behavior
|
||||||
|
description: A clear and concise description of what you expected to happen.
|
||||||
|
validations:
|
||||||
|
required: true
|
||||||
|
|
||||||
|
- type: textarea
|
||||||
|
attributes:
|
||||||
|
label: Screenshots
|
||||||
|
description: If applicable, add screenshots to help explain your problem.
|
||||||
|
|
||||||
|
- type: input
|
||||||
|
attributes:
|
||||||
|
label: Platform
|
||||||
|
description: The platform you are using. (e.g. Windows 10)
|
||||||
|
|
||||||
|
- type: input
|
||||||
|
attributes:
|
||||||
|
label: BDS Version
|
||||||
|
description: The version of BDS you are using. (e.g. 1.20.32.1)
|
||||||
|
|
||||||
|
- type: input
|
||||||
|
attributes:
|
||||||
|
label: LeviLamina Version
|
||||||
|
description: The version of LeviLamina you are using. (e.g. 1.0.0)
|
||||||
|
|
||||||
|
- type: input
|
||||||
|
attributes:
|
||||||
|
label: Version
|
||||||
|
description: The version of the plugin you are using. (e.g. 1.0.0)
|
||||||
|
|
||||||
|
- type: textarea
|
||||||
|
attributes:
|
||||||
|
label: Additional context
|
||||||
|
description: Add any other context about the problem here.
|
||||||
@@ -0,0 +1,55 @@
|
|||||||
|
name: 漏洞反馈
|
||||||
|
description: 如果插件存在漏洞,请在此反馈。
|
||||||
|
title: "标题:漏洞反馈"
|
||||||
|
labels: ["type: bug"]
|
||||||
|
body:
|
||||||
|
- type: textarea
|
||||||
|
attributes:
|
||||||
|
label: 简述漏洞
|
||||||
|
description: 发生了什么问题?
|
||||||
|
validations:
|
||||||
|
required: true
|
||||||
|
|
||||||
|
- type: textarea
|
||||||
|
attributes:
|
||||||
|
label: 复现方案
|
||||||
|
description: 给出具体的复现步骤。
|
||||||
|
validations:
|
||||||
|
required: true
|
||||||
|
|
||||||
|
- type: textarea
|
||||||
|
attributes:
|
||||||
|
label: 预期结果
|
||||||
|
description: 简述预期结果是什么!
|
||||||
|
validations:
|
||||||
|
required: true
|
||||||
|
|
||||||
|
- type: textarea
|
||||||
|
attributes:
|
||||||
|
label: 日志或截图
|
||||||
|
description: 如果有条件请给出日志或截图来帮助我们修复漏洞
|
||||||
|
|
||||||
|
- type: input
|
||||||
|
attributes:
|
||||||
|
label: 操作系统
|
||||||
|
description: 你所使用的操作系统 (例如: Windows 10)
|
||||||
|
|
||||||
|
- type: input
|
||||||
|
attributes:
|
||||||
|
label: BDS 版本
|
||||||
|
description: 你所使用的 BDS 版本 (例如: 1.20.32.1)
|
||||||
|
|
||||||
|
- type: input
|
||||||
|
attributes:
|
||||||
|
label: LeviLamina 版本
|
||||||
|
description: 你所使用的 LeviLamina 版本 (例如: 1.0.0)
|
||||||
|
|
||||||
|
- type: input
|
||||||
|
attributes:
|
||||||
|
label: GMLIB 版本
|
||||||
|
description: 你所使用的 GMLIB 版本 (例如: 1.0.0)
|
||||||
|
|
||||||
|
- type: textarea
|
||||||
|
attributes:
|
||||||
|
label: 更多信息
|
||||||
|
description: 如果还有更多相关信息,请提供。
|
||||||
@@ -0,0 +1,28 @@
|
|||||||
|
name: Feature request
|
||||||
|
description: Suggest an idea for this project
|
||||||
|
title: "[Feature]: "
|
||||||
|
labels: ["enhancement"]
|
||||||
|
body:
|
||||||
|
- type: textarea
|
||||||
|
attributes:
|
||||||
|
label: Is your feature request related to a problem? Please describe.
|
||||||
|
description: A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
|
||||||
|
validations:
|
||||||
|
required: true
|
||||||
|
|
||||||
|
- type: textarea
|
||||||
|
attributes:
|
||||||
|
label: Describe the solution you'd like
|
||||||
|
description: A clear and concise description of what you want to happen.
|
||||||
|
validations:
|
||||||
|
required: true
|
||||||
|
|
||||||
|
- type: textarea
|
||||||
|
attributes:
|
||||||
|
label: Describe alternatives you've considered
|
||||||
|
description: A clear and concise description of any alternative solutions or features you've considered.
|
||||||
|
|
||||||
|
- type: textarea
|
||||||
|
attributes:
|
||||||
|
label: Additional context
|
||||||
|
description: Add any other context or screenshots about the feature request here.
|
||||||
@@ -0,0 +1,28 @@
|
|||||||
|
name: 新功能建议
|
||||||
|
description: 如果需要更多API,请给出你的建议。
|
||||||
|
title: "标题:新功能建议"
|
||||||
|
labels: ["type: enhancement"]
|
||||||
|
body:
|
||||||
|
- type: textarea
|
||||||
|
attributes:
|
||||||
|
label: 您的新功能建议是否与问题有关?请描述。
|
||||||
|
description: 简述你在开发过程中遇到了什么问题?
|
||||||
|
validations:
|
||||||
|
required: true
|
||||||
|
|
||||||
|
- type: textarea
|
||||||
|
attributes:
|
||||||
|
label: 你想要的接口
|
||||||
|
description: 简述你需要的API,以及具体功能。
|
||||||
|
validations:
|
||||||
|
required: true
|
||||||
|
|
||||||
|
- type: textarea
|
||||||
|
attributes:
|
||||||
|
label: 你曾经使用过的替代方案
|
||||||
|
description: 简述你对于此问题使用过的替代方案。
|
||||||
|
|
||||||
|
- type: textarea
|
||||||
|
attributes:
|
||||||
|
label: 更多信息
|
||||||
|
description: 给出更多信息帮助我们解决你的问题。
|
||||||
@@ -0,0 +1,18 @@
|
|||||||
|
## What does this PR do?
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
## Which issues does this PR resolve?
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
## Checklist before merging
|
||||||
|
|
||||||
|
Thank you for your contribution to the repository.
|
||||||
|
Before submitting this PR, please make sure:
|
||||||
|
|
||||||
|
- [ ] Your code builds clean without any errors or warnings
|
||||||
|
- [ ] Your code follows [LeviLamina C++ Style Guide](https://github.com/LiteLDev/LeviLamina/wiki/CPP-Style-Guide)
|
||||||
|
- [ ] You have tested all functions
|
||||||
|
- [ ] You have not used code without license
|
||||||
|
- [ ] You have added statement for third-party code
|
||||||
@@ -0,0 +1,27 @@
|
|||||||
|
on:
|
||||||
|
pull_request:
|
||||||
|
push:
|
||||||
|
workflow_dispatch:
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build:
|
||||||
|
runs-on: windows-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
|
||||||
|
- uses: xmake-io/github-action-setup-xmake@v1
|
||||||
|
|
||||||
|
- run: |
|
||||||
|
xmake repo -u
|
||||||
|
|
||||||
|
- run: |
|
||||||
|
xmake f -a x64 -m release -p windows -v -y
|
||||||
|
|
||||||
|
- run: |
|
||||||
|
xmake -w -y
|
||||||
|
|
||||||
|
- uses: actions/upload-artifact@v3
|
||||||
|
with:
|
||||||
|
name: ${{ github.event.repository.name }}-windows-x64-${{ github.sha }}
|
||||||
|
path: |
|
||||||
|
bin/
|
||||||
@@ -0,0 +1,56 @@
|
|||||||
|
on:
|
||||||
|
release:
|
||||||
|
types:
|
||||||
|
- published
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build:
|
||||||
|
runs-on: windows-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
|
||||||
|
- uses: xmake-io/github-action-setup-xmake@v1
|
||||||
|
|
||||||
|
- run: |
|
||||||
|
xmake repo -u
|
||||||
|
|
||||||
|
- run: |
|
||||||
|
xmake f -a x64 -m release -p windows -v -y
|
||||||
|
|
||||||
|
- run: |
|
||||||
|
xmake -w -y
|
||||||
|
|
||||||
|
- uses: actions/upload-artifact@v3
|
||||||
|
with:
|
||||||
|
name: ${{ github.event.repository.name }}-windows-x64-${{ github.sha }}
|
||||||
|
path: |
|
||||||
|
bin/
|
||||||
|
|
||||||
|
upload-to-release:
|
||||||
|
needs:
|
||||||
|
- build
|
||||||
|
permissions:
|
||||||
|
contents: write
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
|
||||||
|
- uses: actions/download-artifact@v3
|
||||||
|
with:
|
||||||
|
name: ${{ github.event.repository.name }}-windows-x64-${{ github.sha }}
|
||||||
|
path: release/
|
||||||
|
|
||||||
|
- run: |
|
||||||
|
cp LICENSE README.md release/
|
||||||
|
|
||||||
|
- name: Archive release
|
||||||
|
run: |
|
||||||
|
cd release
|
||||||
|
zip -r ../${{ github.event.repository.name }}-windows-x64.zip *
|
||||||
|
cd ..
|
||||||
|
|
||||||
|
- uses: softprops/action-gh-release@v1
|
||||||
|
with:
|
||||||
|
append_body: true
|
||||||
|
files: |
|
||||||
|
${{ github.event.repository.name }}-windows-x64.zip
|
||||||
@@ -5,6 +5,9 @@
|
|||||||
"dependencies": [
|
"dependencies": [
|
||||||
{
|
{
|
||||||
"name": "GMLIB"
|
"name": "GMLIB"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "LegacyRemoteCall"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
+26
-21
@@ -1,8 +1,10 @@
|
|||||||
#include "Global.h"
|
#include "Global.h"
|
||||||
|
|
||||||
void ExportGMLib_ModAPI() {
|
void ExportGMLib_ModAPI() {
|
||||||
|
/*
|
||||||
//合成表部分
|
//合成表部分
|
||||||
RemoteCall::exportAs("GMLib_ModAPI", "registerShapelessRecipe", [](std::string recipe_id, std::vector<std::string> ingredients, std::string result, int count, std::string unlock) -> void {
|
RemoteCall::exportAs("GMLib_ModAPI", "registerShapelessRecipe", [](std::string recipe_id,
|
||||||
|
std::vector<std::string> ingredients, std::string result, int count, std::string unlock) -> void {
|
||||||
std::vector<RecipeItem> types;
|
std::vector<RecipeItem> types;
|
||||||
for (auto ing : ingredients) {
|
for (auto ing : ingredients) {
|
||||||
RecipeItem key = {ing};
|
RecipeItem key = {ing};
|
||||||
@@ -12,7 +14,8 @@ void ExportGMLib_ModAPI() {
|
|||||||
RecipeItem unl = {unlock};
|
RecipeItem unl = {unlock};
|
||||||
GMLib_Mod::addShapelessCraftingTableRecipe(recipe_id, types, res, {unl});
|
GMLib_Mod::addShapelessCraftingTableRecipe(recipe_id, types, res, {unl});
|
||||||
});
|
});
|
||||||
RemoteCall::exportAs("GMLib_ModAPI", "registerShapedRecipe", [](std::string recipe_id, std::vector<std::string> shape, std::vector<std::string> ingredients, std::string result, int count, std::string unlock) -> void {
|
RemoteCall::exportAs("GMLib_ModAPI", "registerShapedRecipe", [](std::string recipe_id, std::vector<std::string>
|
||||||
|
shape, std::vector<std::string> ingredients, std::string result, int count, std::string unlock) -> void {
|
||||||
std::vector<RecipeItem> types;
|
std::vector<RecipeItem> types;
|
||||||
for (auto ing : ingredients) {
|
for (auto ing : ingredients) {
|
||||||
RecipeItem key = {ing};
|
RecipeItem key = {ing};
|
||||||
@@ -22,39 +25,40 @@ void ExportGMLib_ModAPI() {
|
|||||||
RecipeItem unl = {unlock};
|
RecipeItem unl = {unlock};
|
||||||
GMLib_Mod::addShapedCraftingTableRecipe(recipe_id, shape, types, res, {unl});
|
GMLib_Mod::addShapedCraftingTableRecipe(recipe_id, shape, types, res, {unl});
|
||||||
});
|
});
|
||||||
RemoteCall::exportAs("GMLib_ModAPI", "registerFurnaceRecipe", [](std::string recipe_id, std::string input, std::string output, std::vector<std::string> tags) -> void {
|
RemoteCall::exportAs("GMLib_ModAPI", "registerFurnaceRecipe", [](std::string recipe_id, std::string input,
|
||||||
RecipeItem inp = {input};
|
std::string output, std::vector<std::string> tags) -> void { RecipeItem inp = {input}; RecipeItem outp =
|
||||||
RecipeItem outp = {output};
|
{output}; GMLib_Mod::addFurnaceRecipe(recipe_id, inp, outp, tags);
|
||||||
GMLib_Mod::addFurnaceRecipe(recipe_id, inp, outp, tags);
|
|
||||||
});
|
});
|
||||||
RemoteCall::exportAs("GMLib_ModAPI", "registerBrewingMixRecipe", [](std::string recipe_id, std::string input, std::string output, std::string reagent) -> void {
|
RemoteCall::exportAs("GMLib_ModAPI", "registerBrewingMixRecipe", [](std::string recipe_id, std::string input,
|
||||||
RecipeItem rea = {reagent};
|
std::string output, std::string reagent) -> void { RecipeItem rea = {reagent};
|
||||||
GMLib_Mod::addBrewingMixRecipe(recipe_id, input, output, rea);
|
GMLib_Mod::addBrewingMixRecipe(recipe_id, input, output, rea);
|
||||||
});
|
});
|
||||||
RemoteCall::exportAs("GMLib_ModAPI", "registerBrewingContainerRecipe", [](std::string recipe_id, std::string input, std::string output, std::string reagent) -> void {
|
RemoteCall::exportAs("GMLib_ModAPI", "registerBrewingContainerRecipe", [](std::string recipe_id, std::string
|
||||||
RecipeItem inp = {input};
|
input, std::string output, std::string reagent) -> void { RecipeItem inp = {input}; RecipeItem outp = {output};
|
||||||
RecipeItem outp = {output};
|
|
||||||
RecipeItem rea = {reagent};
|
RecipeItem rea = {reagent};
|
||||||
GMLib_Mod::addBrewingContainerRecipe(recipe_id, inp, outp, rea);
|
GMLib_Mod::addBrewingContainerRecipe(recipe_id, inp, outp, rea);
|
||||||
});
|
});
|
||||||
RemoteCall::exportAs("GMLib_ModAPI", "registerSmithingTransformRecipe", [](std::string recipe_id, std::string smithing_template, std::string base, std::string addition, std::string result) -> void {
|
RemoteCall::exportAs("GMLib_ModAPI", "registerSmithingTransformRecipe", [](std::string recipe_id, std::string
|
||||||
|
smithing_template, std::string base, std::string addition, std::string result) -> void {
|
||||||
GMLib_Mod::addSmithingTransformRecipe(recipe_id, smithing_template, base, addition, result);
|
GMLib_Mod::addSmithingTransformRecipe(recipe_id, smithing_template, base, addition, result);
|
||||||
});
|
});
|
||||||
RemoteCall::exportAs("GMLib_ModAPI", "registerSmithingTrimRecipe", [](std::string recipe_id, std::string smithing_template, std::string base, std::string addition) -> void {
|
RemoteCall::exportAs("GMLib_ModAPI", "registerSmithingTrimRecipe", [](std::string recipe_id, std::string
|
||||||
GMLib_Mod::addSmithingTrimRecipe(recipe_id, smithing_template, base, addition);
|
smithing_template, std::string base, std::string addition) -> void { GMLib_Mod::addSmithingTrimRecipe(recipe_id,
|
||||||
|
smithing_template, base, addition);
|
||||||
});
|
});
|
||||||
RemoteCall::exportAs("GMLib_ModAPI", "registerStoneCutterRecipe", [](std::string recipe_id, std::string input, int input_data, std::string output, int output_data, int output_count) -> void {
|
RemoteCall::exportAs("GMLib_ModAPI", "registerStoneCutterRecipe", [](std::string recipe_id, std::string input,
|
||||||
RecipeItem inp = {input, input_data};
|
int input_data, std::string output, int output_data, int output_count) -> void { RecipeItem inp = {input,
|
||||||
RecipeItem outp = {output, output_data, output_count};
|
input_data}; RecipeItem outp = {output, output_data, output_count}; GMLib_Mod::addStoneCutterRecipe(recipe_id,
|
||||||
GMLib_Mod::addStoneCutterRecipe(recipe_id, inp, outp);
|
inp, outp);
|
||||||
});
|
});
|
||||||
|
|
||||||
//伤害类型
|
//伤害类型
|
||||||
RemoteCall::exportAs("GMLib_ModAPI", "registerDamageCause", [](int vanilla_cause, std::string cause_name, std::string direct_killer_type, std::string die_type) -> void {
|
RemoteCall::exportAs("GMLib_ModAPI", "registerDamageCause", [](int vanilla_cause, std::string cause_name,
|
||||||
|
std::string direct_killer_type, std::string die_type) -> void {
|
||||||
GMLib_Mod::addDamageCause((ActorDamageCause)vanilla_cause, cause_name, direct_killer_type, die_type);
|
GMLib_Mod::addDamageCause((ActorDamageCause)vanilla_cause, cause_name, direct_killer_type, die_type);
|
||||||
});
|
});
|
||||||
RemoteCall::exportAs("GMLib_ModAPI", "translateResourcePack", [](std::string key1, std::vector<std::string> key2) -> std::string {
|
RemoteCall::exportAs("GMLib_ModAPI", "translateResourcePack", [](std::string key1, std::vector<std::string> key2)
|
||||||
return GMLib_Mod::i18nTranslate(key1, key2);
|
-> std::string { return GMLib_Mod::i18nTranslate(key1, key2);
|
||||||
});
|
});
|
||||||
|
|
||||||
//物品定义
|
//物品定义
|
||||||
@@ -100,4 +104,5 @@ void ExportGMLib_ModAPI() {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
*/
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user