forked from mtcontrib/scifi_nodes
Compare commits
1 Commits
b88b7349a5
...
mtinfo
Author | SHA1 | Date | |
---|---|---|---|
896b150f82 |
21
.github/workflows/mtinfo.yml
vendored
Normal file
21
.github/workflows/mtinfo.yml
vendored
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
name: mtinfo
|
||||||
|
|
||||||
|
on: [push, pull_request]
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build:
|
||||||
|
|
||||||
|
runs-on: ubuntu-20.04
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v1
|
||||||
|
|
||||||
|
- name: generate
|
||||||
|
run: ./generate-mtinfo.sh
|
||||||
|
|
||||||
|
- name: deploy
|
||||||
|
if: github.ref == 'refs/heads/master'
|
||||||
|
uses: peaceiris/actions-gh-pages@v3
|
||||||
|
with:
|
||||||
|
github_token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
publish_dir: ./output
|
3
.gitignore
vendored
3
.gitignore
vendored
@ -45,3 +45,6 @@ $RECYCLE.BIN/
|
|||||||
Network Trash Folder
|
Network Trash Folder
|
||||||
Temporary Items
|
Temporary Items
|
||||||
.apdisk
|
.apdisk
|
||||||
|
|
||||||
|
# generated sources
|
||||||
|
output
|
||||||
|
@ -122,7 +122,7 @@ minetest.register_node("scifi_nodes:digicode_on", {
|
|||||||
paramtype2 = "wallmounted",
|
paramtype2 = "wallmounted",
|
||||||
light_source = 5,
|
light_source = 5,
|
||||||
groups = {cracky=1, oddly_breakable_by_hand=1, not_in_creative_inventory=1, mesecon_needs_receiver = 1},
|
groups = {cracky=1, oddly_breakable_by_hand=1, not_in_creative_inventory=1, mesecon_needs_receiver = 1},
|
||||||
drop = "scifi_nodes:digicode_off",
|
drop = {items = {"scifi_nodes:digicode_off"}},
|
||||||
mesecons = {
|
mesecons = {
|
||||||
receptor = {
|
receptor = {
|
||||||
state = (has_mesecons and mesecon.state.on)
|
state = (has_mesecons and mesecon.state.on)
|
||||||
|
27
generate-mtinfo.sh
Executable file
27
generate-mtinfo.sh
Executable file
@ -0,0 +1,27 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
# prepare config
|
||||||
|
CONFIG=/tmp/scifi_nodes_minetest.conf
|
||||||
|
echo "mtinfo.autoshutdown = true" > ${CONFIG}
|
||||||
|
echo "moreblocks.stairsplus_in_creative_inventory = false" >> ${CONFIG}
|
||||||
|
|
||||||
|
# prepare dependent mods
|
||||||
|
WORLDMODS_DIR=/tmp/scifi_nodes_worldmods
|
||||||
|
git clone --depth=1 https://gitlab.com/VanessaE/unifieddyes.git ${WORLDMODS_DIR}/unifieddyes
|
||||||
|
git clone --depth=1 https://gitlab.com/VanessaE/basic_materials.git ${WORLDMODS_DIR}/basic_materials
|
||||||
|
git clone --depth=1 https://github.com/minetest-mods/mesecons.git ${WORLDMODS_DIR}/mesecons
|
||||||
|
git clone --depth=1 https://github.com/minetest-mods/moreblocks.git ${WORLDMODS_DIR}/moreblocks
|
||||||
|
git clone --depth=1 https://github.com/BuckarooBanzay/mtinfo.git ${WORLDMODS_DIR}/mtinfo
|
||||||
|
cp . ${WORLDMODS_DIR}/scifi_nodes -R
|
||||||
|
|
||||||
|
# start container with mtinfo
|
||||||
|
docker run --rm -i \
|
||||||
|
--user root \
|
||||||
|
-v ${CONFIG}:/etc/minetest/minetest.conf:ro \
|
||||||
|
-v ${WORLDMODS_DIR}/:/root/.minetest/worlds/world/worldmods \
|
||||||
|
-v $(pwd)/output:/root/.minetest/worlds/world/mtinfo \
|
||||||
|
registry.gitlab.com/minetest/minetest/server:5.4.0
|
||||||
|
|
||||||
|
test -f $(pwd)/output/index.html || exit 1
|
||||||
|
test -f $(pwd)/output/data/items.js || exit 1
|
||||||
|
test -d $(pwd)/output/textures || exit 1
|
1
init.lua
1
init.lua
@ -22,4 +22,3 @@ dofile(MP.."/digicode.lua")
|
|||||||
dofile(MP.."/models.lua")
|
dofile(MP.."/models.lua")
|
||||||
dofile(MP.."/octagon_panes.lua")
|
dofile(MP.."/octagon_panes.lua")
|
||||||
dofile(MP.."/crafts.lua")
|
dofile(MP.."/crafts.lua")
|
||||||
minetest.log("action", "[scifi_nodes] loaded.")
|
|
||||||
|
@ -22,8 +22,6 @@ local function activate_palm_scanner(pos, node, player)
|
|||||||
|
|
||||||
-- check protection
|
-- check protection
|
||||||
minetest.after(2, function()
|
minetest.after(2, function()
|
||||||
if minetest.get_node(pos).name ~= node.name then return end
|
|
||||||
|
|
||||||
if minetest.is_protected(pos, name or "") then
|
if minetest.is_protected(pos, name or "") then
|
||||||
-- clicker has no access to area
|
-- clicker has no access to area
|
||||||
minetest.chat_send_player(name, "Access denied !")
|
minetest.chat_send_player(name, "Access denied !")
|
||||||
@ -38,7 +36,6 @@ local function activate_palm_scanner(pos, node, player)
|
|||||||
|
|
||||||
-- reset state
|
-- reset state
|
||||||
minetest.after(1, function()
|
minetest.after(1, function()
|
||||||
if minetest.get_node(pos).name ~= node.name then return end
|
|
||||||
node.name = "scifi_nodes:palm_scanner_off"
|
node.name = "scifi_nodes:palm_scanner_off"
|
||||||
minetest.swap_node(pos, node)
|
minetest.swap_node(pos, node)
|
||||||
mesecon.receptor_off(pos, scifi_nodes.get_switch_rules(node.param2))
|
mesecon.receptor_off(pos, scifi_nodes.get_switch_rules(node.param2))
|
||||||
|
Reference in New Issue
Block a user