From 32b864549faa50eb0dd2ce00b126d3b98254115a Mon Sep 17 00:00:00 2001 From: Panquesito7 Date: Sun, 21 Jun 2020 13:20:49 -0500 Subject: [PATCH 1/5] Add LuaCheck and GitHub workflow --- .github/workflows/build.yml | 11 +++++++++++ .luacheckrc | 14 ++++++++++++++ 2 files changed, 25 insertions(+) create mode 100644 .github/workflows/build.yml create mode 100644 .luacheckrc 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", +} From 9177629707bb7439185285a866309a3d0b3d5dc2 Mon Sep 17 00:00:00 2001 From: Panquesito7 Date: Sun, 21 Jun 2020 13:21:48 -0500 Subject: [PATCH 2/5] Improve README.md --- README.md | 22 ++++++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-) 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+ From 9f77382abe368d131f48389a9134909cff860ecb Mon Sep 17 00:00:00 2001 From: Panquesito7 Date: Sun, 21 Jun 2020 13:23:21 -0500 Subject: [PATCH 3/5] Change license file format to markdown For better readability. --- LICENSE => LICENSE.md | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename LICENSE => LICENSE.md (100%) diff --git a/LICENSE b/LICENSE.md similarity index 100% rename from LICENSE rename to LICENSE.md From 69dbdbed2bfdab9c936fd6552644852f7109be88 Mon Sep 17 00:00:00 2001 From: Panquesito7 Date: Sun, 21 Jun 2020 13:25:56 -0500 Subject: [PATCH 4/5] Fix depends not working on... ...older versions of Minetest. --- dependencies.txt => depends.txt | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename dependencies.txt => depends.txt (100%) diff --git a/dependencies.txt b/depends.txt similarity index 100% rename from dependencies.txt rename to depends.txt From 6b886edad171b4f37d37a4ec9104f964b1c719e9 Mon Sep 17 00:00:00 2001 From: Panquesito7 Date: Sun, 21 Jun 2020 13:28:17 -0500 Subject: [PATCH 5/5] Add license notice on `init.lua` --- init.lua | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) 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) -