diff --git a/.github/workflows/validate.yml b/.github/workflows/validate.yml new file mode 100644 index 000000000..66b9529b7 --- /dev/null +++ b/.github/workflows/validate.yml @@ -0,0 +1,13 @@ +name: validate + +on: [push, workflow_dispatch] + +# TODO: add linting +jobs: + test: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: CarbonSmasher/packtest_runner@9d13d673bf9d3f2fad2b833d036e5e12ff65e056 + with: + packs: 'datapacks/omega-flowey' diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 000000000..e69de29bb diff --git a/README.md b/README.md index fffe1f8cc..044a85a86 100644 --- a/README.md +++ b/README.md @@ -6,3 +6,13 @@ Back in early 2016 I released `Omega Flowey in Minecraft`. - [original thread](https://www.reddit.com/r/Undertale/comments/4a9jht/spoilers_omega_flowey_boss_fight_in_minecraft/) Since then I've gained a lot of skills both in Minecraft map development and in programming generally. This repo will store any and everything relating to development of a remaster of the original map for modern Minecraft version(s) with better gameplay, performance, and visuals. + +## Contributing + +### Setup + +1. Configure git to automatically update submodules with `git pull`s by defaulting the `submodule.recurse` flag to `true`: + +```bash +git config --global submodule.recurse true +``` diff --git a/datapacks/omega-flowey/data/utils/functions/math/max.mcfunction b/datapacks/omega-flowey/data/utils/functions/math/max.mcfunction index 8a80dffb5..e133a9204 100644 --- a/datapacks/omega-flowey/data/utils/functions/math/max.mcfunction +++ b/datapacks/omega-flowey/data/utils/functions/math/max.mcfunction @@ -3,7 +3,7 @@ # b: int # outputs: # out: the higher value between `a` and `b` (Math.max(a, b)) -execute store result score @s math.0 run data get storage utils:math.max a -execute store result score @s math.1 run data get storage utils:math.max b -execute store result storage utils:math.max out int 1 run scoreboard players get @s math.0 -execute if score @s math.0 < @s math.1 store result storage utils:math.max out int 1 run scoreboard players get @s math.1 +execute store result score #utils:math.max math.0 run data get storage utils:math.max a +execute store result score #utils:math.max math.1 run data get storage utils:math.max b +execute store result storage utils:math.max out int 1 run scoreboard players get #utils:math.max math.0 +execute if score #utils:math.max math.0 < #utils:math.max math.1 store result storage utils:math.max out int 1 run scoreboard players get #utils:math.max math.1 diff --git a/datapacks/omega-flowey/data/utils/functions/math/min.mcfunction b/datapacks/omega-flowey/data/utils/functions/math/min.mcfunction index 03750166f..02ac31718 100644 --- a/datapacks/omega-flowey/data/utils/functions/math/min.mcfunction +++ b/datapacks/omega-flowey/data/utils/functions/math/min.mcfunction @@ -3,7 +3,7 @@ # b: int # outputs: # out: the lower value between `a` and `b` (Math.min(a, b)) -execute store result score @s math.0 run data get storage utils:math.min a -execute store result score @s math.1 run data get storage utils:math.min b -execute store result storage utils:math.min out int 1 run scoreboard players get @s math.0 -execute if score @s math.0 > @s math.1 store result storage utils:math.min out int 1 run scoreboard players get @s math.1 +execute store result score #utils:math.min math.0 run data get storage utils:math.min a +execute store result score #utils:math.min math.1 run data get storage utils:math.min b +execute store result storage utils:math.min out int 1 run scoreboard players get #utils:math.min math.0 +execute if score #utils:math.min math.0 > #utils:math.min math.1 store result storage utils:math.min out int 1 run scoreboard players get #utils:math.min math.1 diff --git a/datapacks/omega-flowey/data/utils/tests/math/max.mcfunction b/datapacks/omega-flowey/data/utils/tests/math/max.mcfunction new file mode 100644 index 000000000..18cd8ae5e --- /dev/null +++ b/datapacks/omega-flowey/data/utils/tests/math/max.mcfunction @@ -0,0 +1,27 @@ +# @batch utils:math + +# setup +data remove storage utils:math.max a +data remove storage utils:math.max b +data remove storage utils:math.max out +scoreboard players reset * +function omega-flowey:setup + +# cases +data merge storage utils:math.max { a: 10, b: 10 } +function utils:math/max +execute store result score #utils:math.max math.0 run data get storage utils:math.max out + +assert score #utils:math.max math.0 matches 10 + +data merge storage utils:math.max { a: 0, b: 1 } +function utils:math/max +execute store result score #utils:math.max math.0 run data get storage utils:math.max out + +assert score #utils:math.max math.0 matches 1 + +data merge storage utils:math.max { a: 2, b: 1 } +function utils:math/max +execute store result score #utils:math.max math.0 run data get storage utils:math.max out + +assert score #utils:math.max math.0 matches 2 diff --git a/datapacks/omega-flowey/data/utils/tests/math/min.mcfunction b/datapacks/omega-flowey/data/utils/tests/math/min.mcfunction new file mode 100644 index 000000000..88e1cc2dd --- /dev/null +++ b/datapacks/omega-flowey/data/utils/tests/math/min.mcfunction @@ -0,0 +1,27 @@ +# @batch utils:math + +# setup +data remove storage utils:math.min a +data remove storage utils:math.min b +data remove storage utils:math.min out +scoreboard players reset * +function omega-flowey:setup + +# cases +data merge storage utils:math.min { a: 10, b: 10 } +function utils:math/min +execute store result score #utils:math.min math.0 run data get storage utils:math.min out + +assert score #utils:math.min math.0 matches 10 + +data merge storage utils:math.min { a: 0, b: 1 } +function utils:math/min +execute store result score #utils:math.min math.0 run data get storage utils:math.min out + +assert score #utils:math.min math.0 matches 0 + +data merge storage utils:math.min { a: 2, b: 1 } +function utils:math/min +execute store result score #utils:math.min math.0 run data get storage utils:math.min out + +assert score #utils:math.min math.0 matches 1 diff --git a/pull_request_template.md b/pull_request_template.md index faf617b3d..4de7ebafe 100644 --- a/pull_request_template.md +++ b/pull_request_template.md @@ -7,6 +7,13 @@ what is the primary purpose of this PR? --- +## Test plan + + ## Reproducing in-game