diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 0000000..817e409 --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,11 @@ +on: [push, pull_request] +name: build +jobs: + lint: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@master + - name: lint + uses: Roang-zero1/factorio-mod-luacheck@master + with: + luacheckrc_url: "" diff --git a/.luacheckrc b/.luacheckrc new file mode 100644 index 0000000..14397b2 --- /dev/null +++ b/.luacheckrc @@ -0,0 +1,15 @@ +unused_args = false +allow_defined_top = true +max_line_length = 999 + +read_globals = { + string = {fields = {"split", "trim"}}, + table = {fields = {"copy", "getn", "indexof"}}, + + "minetest", "DIR_DELIM", + "vector", "VoxelArea", +} + +ignore = { + "vertList", +} diff --git a/README.md b/README.md index e6d0902..73a9a27 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,8 @@ # Meshport (Minetest Mesh Exporter) +[![Build status](https://github.com/random-geek/meshport/workflows/build/badge.svg)](https://github.com/random-geek/meshport/actions) +[![License](https://img.shields.io/badge/license-LGPLv3.0%2B-blue.svg)](https://www.gnu.org/licenses/lgpl-3.0.en.html) + ![screenshot](screenshot.png) Meshport is a mod which allows easy exporting of scenes from Minetest to `.obj` files, complete with materials and textures. These models can be imported directly into Blender or another 3D program for rendering and animation. diff --git a/nodebox.lua b/nodebox.lua index af9d537..b566a00 100644 --- a/nodebox.lua +++ b/nodebox.lua @@ -98,7 +98,7 @@ function meshport.Boxes:to_faces(nodeTiles, pos, facedir) {{x = b[4], y = b[2]}, {x = b[4], y = b[5]}, {x = b[1], y = b[5]}, {x = b[1], y = b[2]}}, -- Z- } - local tileIdx, vertNorm + local vertNorm for i = 1, 6 do -- Fix offset texture coordinates.