-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* whitespace and minetest. -> core. - use same whitespace style throughout and fix some indents. - change from minetest. to core. namespace. * Update Readme: Minetest -> Luanti * add luacheck * update optional depends * luacheck cleanups - unused arguments - shaddowed vars - var redeclarations - some whitespace involved in above lines * clean close of file after reading * avoid duplicate code save some lines and some extra method calls. * avoid error: "unknown global" * stray whitespace fixups * whitespace: switch all files to same indent character tabs -> spaces * refactor weird declaration * whitespace: two stray spaces ...that slipped through the cracks on previous whitespace edit * fix shaddowing global table * reduce amount of times transformation string is calculated * use ipairs feature or use the faster repeat-until-loop * cap max amount of layers fixes #5 * fix #5 make transform history non-global fixes #5 transformation history was shared by all users and kept growing as it was never truely reset. Every time a user used a banner a white background was dumped on top of the stack making it possible to crash the server through an overflow to core.serialize() function. * minimize metadata size also changed banners.max_transformations to banners.max_undo_levels and lowered the value substantially. * add versioning * add recoverable per player history with saved colour * rename update_all -> update_preview_inv since it isn't updating everything, only the preview and the inventory item * dynamically update masks to reflect the currently selected colour.
- Loading branch information
Showing
10 changed files
with
1,129 additions
and
1,063 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
name: luacheck | ||
on: [push, pull_request] | ||
jobs: | ||
luacheck: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@master | ||
- name: Luacheck | ||
uses: lunarmodules/luacheck@master |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
globals = { | ||
"banners", | ||
"smartfs", | ||
} | ||
|
||
read_globals = { | ||
"core", | ||
"dump", | ||
"factions", | ||
"inventory_plus", | ||
"unified_inventory", | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
###Banners mod for Minetest | ||
This is the banner mod for minetest. | ||
###Banners mod for Luanti (formerly Minetest) | ||
This is a banner mod for Luanti. | ||
The source code is licensed under GPLv3, and the game assets are licensed under Creative Commons 0 (CC0, [https://wiki.creativecommons.org/wiki/CC0](see here)). | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,78 +1,73 @@ | ||
|
||
-- craft recipes | ||
minetest.register_craft( -- wooden flag pole | ||
{ | ||
output = "banners:wooden_pole 1", | ||
recipe = { | ||
{"", "", "default:stick"}, | ||
{"", "default:stick", ""}, | ||
{"default:stick", "", ""} | ||
} | ||
|
||
-- wooden flag pole | ||
core.register_craft({ | ||
output = "banners:wooden_pole 1", | ||
recipe = { | ||
{ "", "", "default:stick" }, | ||
{ "", "default:stick", "" }, | ||
{ "default:stick", "", "" } | ||
} | ||
) | ||
}) | ||
|
||
minetest.register_craft( -- steel flag pole | ||
{ | ||
output = "banners:steel_pole 1", | ||
recipe = { | ||
{"", "", "default:steel_ingot"}, | ||
{"default:stick", "default:steel_ingot", "default:stick"}, | ||
{"default:steel_ingot", "", ""} | ||
} | ||
-- steel flag pole | ||
core.register_craft({ | ||
output = "banners:steel_pole 1", | ||
recipe = { | ||
{ "", "", "default:steel_ingot" }, | ||
{ "default:stick", "default:steel_ingot", "default:stick" }, | ||
{ "default:steel_ingot", "", "" } | ||
} | ||
) | ||
}) | ||
|
||
minetest.register_craft( -- wooden flag support base | ||
{ | ||
output = "banners:wooden_base 1", | ||
recipe = { | ||
{"", "default:stick", ""}, | ||
{"default:stick", "", "default:stick"}, | ||
{"group:wood", "group:wood", "group:wood"} | ||
} | ||
-- wooden flag support base | ||
core.register_craft({ | ||
output = "banners:wooden_base 1", | ||
recipe = { | ||
{ "", "default:stick", "" }, | ||
{ "default:stick", "", "default:stick" }, | ||
{ "group:wood", "group:wood", "group:wood" } | ||
} | ||
) | ||
}) | ||
|
||
minetest.register_craft( -- steel support | ||
{ | ||
output = "banners:steel_base", | ||
recipe = { | ||
{"", "default:steel_ingot", ""}, | ||
{"default:steel_ingot", "", "default:steel_ingot"}, | ||
{"", "default:steelblock", ""} | ||
} | ||
-- steel support | ||
core.register_craft({ | ||
output = "banners:steel_base", | ||
recipe = { | ||
{ "", "default:steel_ingot", "" }, | ||
{ "default:steel_ingot", "", "default:steel_ingot" }, | ||
{ "", "default:steelblock", "" } | ||
} | ||
) | ||
}) | ||
|
||
minetest.register_craft( -- banner sheet | ||
{ | ||
output = "banners:banner_sheet 1", | ||
recipe = { | ||
{"", "", ""}, | ||
{"farming:cotton", "farming:cotton", "farming:cotton"}, | ||
{"farming:cotton", "farming:cotton", "farming:cotton"} | ||
} | ||
-- banner sheet | ||
core.register_craft({ | ||
output = "banners:banner_sheet 1", | ||
recipe = { | ||
{ "", "", "" }, | ||
{ "farming:cotton", "farming:cotton", "farming:cotton" }, | ||
{ "farming:cotton", "farming:cotton", "farming:cotton" } | ||
} | ||
) | ||
}) | ||
|
||
minetest.register_craft( -- wooden support | ||
{ | ||
output = "banners:wooden_banner 1", | ||
recipe = { | ||
{"", "banners:banner_sheet", ""}, | ||
{"", "banners:wooden_pole", ""}, | ||
{"", "banners:wooden_base", ""} | ||
} | ||
-- wooden support | ||
core.register_craft({ | ||
output = "banners:wooden_banner 1", | ||
recipe = { | ||
{ "", "banners:banner_sheet", "" }, | ||
{ "", "banners:wooden_pole", "" }, | ||
{ "", "banners:wooden_base", "" } | ||
} | ||
) | ||
}) | ||
|
||
minetest.register_craft( -- steel support | ||
{ | ||
output = "banners:steel_banner 1", | ||
recipe = { | ||
{"", "banners:banner_sheet", ""}, | ||
{"", "banners:steel_pole", ""}, | ||
{"", "banners:steel_base", ""} | ||
} | ||
-- steel support | ||
core.register_craft({ | ||
output = "banners:steel_banner 1", | ||
recipe = { | ||
{ "", "banners:banner_sheet", "" }, | ||
{ "", "banners:steel_pole", "" }, | ||
{ "", "banners:steel_base", "" } | ||
} | ||
) | ||
}) | ||
|
Oops, something went wrong.