mirror of
https://github.com/D00Med/scifi_nodes.git
synced 2024-12-23 00:20:17 +01:00
stricter luacheck (no globals) / travis ci file
This commit is contained in:
parent
caa98d98b1
commit
285473d4fc
11
.luacheckrc
11
.luacheckrc
@ -1,9 +1,7 @@
|
|||||||
unused_args = false
|
unused_args = false
|
||||||
allow_defined_top = true
|
|
||||||
|
|
||||||
globals = {
|
globals = {
|
||||||
"minetest",
|
"scifi_nodes"
|
||||||
"mesecon"
|
|
||||||
}
|
}
|
||||||
|
|
||||||
read_globals = {
|
read_globals = {
|
||||||
@ -16,6 +14,11 @@ read_globals = {
|
|||||||
"dump",
|
"dump",
|
||||||
|
|
||||||
-- optional deps
|
-- optional deps
|
||||||
"default", "stairsplus", "xpanes", "screwdriver"
|
"default",
|
||||||
|
"stairsplus",
|
||||||
|
"xpanes",
|
||||||
|
"screwdriver",
|
||||||
|
"minetest",
|
||||||
|
"mesecon"
|
||||||
|
|
||||||
}
|
}
|
||||||
|
12
.travis.yml
Normal file
12
.travis.yml
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
language: generic
|
||||||
|
sudo: false
|
||||||
|
addons:
|
||||||
|
apt:
|
||||||
|
packages:
|
||||||
|
- luarocks
|
||||||
|
before_install:
|
||||||
|
- luarocks install --local luacheck
|
||||||
|
script:
|
||||||
|
- $HOME/.luarocks/bin/luacheck --no-color .
|
||||||
|
notifications:
|
||||||
|
email: false
|
10
doors.lua
10
doors.lua
@ -66,7 +66,7 @@ for _, current_door in ipairs(doors) do
|
|||||||
})
|
})
|
||||||
|
|
||||||
|
|
||||||
function onplace(itemstack, placer, pointed_thing)
|
local function onplace(itemstack, placer, pointed_thing)
|
||||||
-- Is there room enough ?
|
-- Is there room enough ?
|
||||||
local pos1 = pointed_thing.above
|
local pos1 = pointed_thing.above
|
||||||
local pos2 = {x=pos1.x, y=pos1.y, z=pos1.z}
|
local pos2 = {x=pos1.x, y=pos1.y, z=pos1.z}
|
||||||
@ -120,11 +120,11 @@ for _, current_door in ipairs(doors) do
|
|||||||
return itemstack;
|
return itemstack;
|
||||||
end
|
end
|
||||||
|
|
||||||
function afterdestruct(pos, oldnode)
|
local function afterdestruct(pos, oldnode)
|
||||||
minetest.set_node({x=pos.x,y=pos.y+1,z=pos.z},{name="air"})
|
minetest.set_node({x=pos.x,y=pos.y+1,z=pos.z},{name="air"})
|
||||||
end
|
end
|
||||||
|
|
||||||
function open_door(pos, node, player, itemstack, pointed_thing)
|
local function open_door(pos, node, player, itemstack, pointed_thing)
|
||||||
-- play sound
|
-- play sound
|
||||||
minetest.sound_play(sound,{
|
minetest.sound_play(sound,{
|
||||||
max_hear_distance = 16,
|
max_hear_distance = 16,
|
||||||
@ -181,12 +181,12 @@ for _, current_door in ipairs(doors) do
|
|||||||
timer:start(3)
|
timer:start(3)
|
||||||
end
|
end
|
||||||
|
|
||||||
function afterplace(pos, placer, itemstack, pointed_thing)
|
local function afterplace(pos, placer, itemstack, pointed_thing)
|
||||||
local node = minetest.get_node(pos)
|
local node = minetest.get_node(pos)
|
||||||
minetest.set_node({x=pos.x,y=pos.y+1,z=pos.z},{name=opened_top,param2=node.param2})
|
minetest.set_node({x=pos.x,y=pos.y+1,z=pos.z},{name=opened_top,param2=node.param2})
|
||||||
end
|
end
|
||||||
|
|
||||||
function ontimer(pos, elapsed)
|
local function ontimer(pos, elapsed)
|
||||||
-- play sound
|
-- play sound
|
||||||
minetest.sound_play(sound,{
|
minetest.sound_play(sound,{
|
||||||
max_hear_distance = 16,
|
max_hear_distance = 16,
|
||||||
|
@ -2,8 +2,8 @@
|
|||||||
-- GENERATED CODE
|
-- GENERATED CODE
|
||||||
-- Node Box Editor, version 0.9.0
|
-- Node Box Editor, version 0.9.0
|
||||||
|
|
||||||
position1 = nil
|
local position1 = nil
|
||||||
position2 = nil
|
local position2 = nil
|
||||||
|
|
||||||
minetest.register_node("scifi_nodes:alienslope", {
|
minetest.register_node("scifi_nodes:alienslope", {
|
||||||
description = "Alien Platform",
|
description = "Alien Platform",
|
||||||
|
@ -10,7 +10,7 @@
|
|||||||
local has_mesecons = minetest.get_modpath("mesecons")
|
local has_mesecons = minetest.get_modpath("mesecons")
|
||||||
|
|
||||||
|
|
||||||
function activate_palm_scanner(pos, node, player)
|
local function activate_palm_scanner(pos, node, player)
|
||||||
local name = player and player:get_player_name()
|
local name = player and player:get_player_name()
|
||||||
name = name or ""
|
name = name or ""
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user