Skip to content
This repository has been archived by the owner on Apr 11, 2020. It is now read-only.

Commit

Permalink
initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
BuckarooBanzay authored and BuckarooBanzay committed Dec 12, 2019
0 parents commit dcef971
Show file tree
Hide file tree
Showing 6 changed files with 112 additions and 0 deletions.
17 changes: 17 additions & 0 deletions .github/workflows/luacheck.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
name: luacheck

on: [push]

jobs:
build:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v1
- name: apt
run: sudo apt-get install -y luarocks
- name: luacheck install
run: luarocks install --local luacheck
- name: luacheck run
run: $HOME/.luarocks/bin/luacheck ./
24 changes: 24 additions & 0 deletions .luacheckrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
unused_args = false
allow_defined_top = true

globals = {
"radioactive_gas"
}

read_globals = {
-- Stdlib
string = {fields = {"split"}},
table = {fields = {"copy", "getn"}},

-- Minetest
"minetest",
"vector", "ItemStack",
"dump", "VoxelArea",

-- Deps
"unified_inventory", "default",
"vacuum",

-- optional mods
"planetoidgen"
}
2 changes: 2 additions & 0 deletions depends.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
default?
vacuum?
54 changes: 54 additions & 0 deletions gas.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
-- radioactive outgasing of ores in vacuum

-- gas definition, drowns and is slightly radioactive
minetest.register_node("radioactive_gas:gas", {
description = "Moon gas",
walkable = false,
pointable = false,
diggable = false,
buildable_to = true,
drawtype = "glasslike",
drowning = 1,
post_effect_color = {a = 20, r = 20, g = 250, b = 20},
tiles = {"planet_moon_gas.png^[colorize:#E0F0E033"},
alpha = 0.1,
groups = {
not_in_creative_inventory = 1,
not_blocking_trains = 1,
cools_lava = 1,
radioactive = 3
},
drop = {},
sunlight_propagates = true
})

-- ores gas out in vacuum
minetest.register_abm({
label = "moon ore outgasing",
nodenames = {"vacuum:vacuum"},
neighbors = {
"default:stone_with_diamond",
"default:stone_with_mese",
"default:stone_with_gold",
"default:stone_with_iron",
"default:stone_with_coal",
"default:mineral_uranium"
},
interval = 5,
chance = 10,
action = function(pos)
minetest.set_node(pos, {name = "radioactive_gas:gas"})
end
})

-- radioactive gas removal if near air
minetest.register_abm({
label = "radioactive gas removal",
nodenames = {"radioactive_gas:gas"},
neighbors = {"air"},
interval = 5,
chance = 5,
action = function(pos)
minetest.set_node(pos, {name = "air"})
end
})
5 changes: 5 additions & 0 deletions init.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
local MP = minetest.get_modpath("radioactive_gas")
dofile(MP.."/gas.lua")


print("[OK] Radioactive gas")
10 changes: 10 additions & 0 deletions readme.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@

# Radioactive gas mod for minetest

Spawns radioactive gas around ore and vacuum nodes
The gas disappears again if in contact with air

## Dependencies

* default?
* vacuum?

0 comments on commit dcef971

Please sign in to comment.