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..1c5782f --- /dev/null +++ b/.luacheckrc @@ -0,0 +1,14 @@ +unused_args = false +allow_defined_top = true +max_line_length = 999 + +globals = { + "minetest", +} + +read_globals = { + string = {fields = {"split", "trim"}}, + table = {fields = {"copy", "getn"}}, + + "abs", +} diff --git a/LICENSE b/LICENSE.md similarity index 100% rename from LICENSE rename to LICENSE.md diff --git a/README.md b/README.md index aa08592..4333e31 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,23 @@ -# real_g +# Real Gravity [![](https://github.com/minetest-mods/real_g/workflows/build/badge.svg)](https://github.com/minetest-mods/real_g/actions) [![License](https://img.shields.io/badge/license-MIT-purple.svg)](https://mit-license.org/) Minetest mod that creates an imatation of real-world gravity. The farther away you get from sea level, the lower your gravity, and the closer you get to the sea, the higher your gravity. -*NOTE:* ***The mod should work for most versions of minetest.*** +## Dependencies +- `default` (included in [Minetest Game](https://github.com/minetest/minetest_game)). + +## Installation +- Unzip the archive, rename the folder to `real_g` and +place it in .. minetest/mods/ + +- GNU/Linux: If you use a system-wide installation place + it in ~/.minetest/mods/. + +- If you only want this to be used in a single world, place + the folder in .. worldmods/ in your world directory. + +For further information or help, see:\ +https://wiki.minetest.net/Installing_Mods + +## Requirements +- Recommended: MT 5.0.0+ +- Minimum: MT 0.4.16+ diff --git a/dependencies.txt b/depends.txt similarity index 100% rename from dependencies.txt rename to depends.txt diff --git a/init.lua b/init.lua index eacf733..ea35397 100644 --- a/init.lua +++ b/init.lua @@ -1,8 +1,13 @@ --[[ +Copyright (C) 2020 squiddible and contributors +This project is licensed under the MIT license. + +See https://mit-license.org/ for more information. + +-------------------------------------------------- Lowers gravity the higher (and lower) you get above (or below) sea level, max gravity at sea level. - ]]-- local action_timer = 0 @@ -17,7 +22,6 @@ local gravity_update = function() end end - local function gravity_globaltimer(dtime) action_timer = action_timer + dtime @@ -28,4 +32,3 @@ local function gravity_globaltimer(dtime) end minetest.register_globalstep(gravity_globaltimer) -