summaryrefslogtreecommitdiff
path: root/permflightpotion
diff options
context:
space:
mode:
authorcheapie <no-email-for-you@example.com>2025-08-30 02:38:18 +0000
committercheapie <no-email-for-you@example.com>2025-08-30 02:38:18 +0000
commit459b286e81631e674c9446fafb41044c7a987026 (patch)
tree0554fb0bb546f743c49752315a0317f4059de401 /permflightpotion
parentb29960e8465a79b66fd17347493eaf859938383b (diff)
downloadc-techage-mods-459b286e81631e674c9446fafb41044c7a987026.tar
c-techage-mods-459b286e81631e674c9446fafb41044c7a987026.tar.gz
c-techage-mods-459b286e81631e674c9446fafb41044c7a987026.tar.bz2
c-techage-mods-459b286e81631e674c9446fafb41044c7a987026.tar.xz
c-techage-mods-459b286e81631e674c9446fafb41044c7a987026.zip
Add replacement plastic box craft and permanent flight potion
Diffstat (limited to 'permflightpotion')
-rw-r--r--permflightpotion/init.lua23
-rw-r--r--permflightpotion/mod.conf3
2 files changed, 26 insertions, 0 deletions
diff --git a/permflightpotion/init.lua b/permflightpotion/init.lua
new file mode 100644
index 0000000..253277d
--- /dev/null
+++ b/permflightpotion/init.lua
@@ -0,0 +1,23 @@
+core.register_node("permflightpotion:permflightpotion",{
+ description = "Permanent Flight Potion",
+ drawtype = "plantlike",
+ tiles = {"ethereal_flight_potion.png"},
+ inventory_image = "ethereal_flight_potion.png",
+ wield_image = "ethereal_flight_potion.png",
+ paramtype = "light",
+ sunlight_propagates = true,
+ selection_box = {
+ type = "fixed", fixed = {-0.2, -0.37, -0.2, 0.2, 0.31, 0.2}
+ },
+ groups = {dig_immediate = 3, vessel = 1},
+ sounds = default.node_sound_glass_defaults(),
+ on_use = function(stack,player)
+ local name = player:get_player_name()
+ local privs = core.get_player_privs(name)
+ if privs.fly then return end
+ privs.fly = true
+ core.set_player_privs(name,privs)
+ stack:take_item(1)
+ return stack
+ end,
+})
diff --git a/permflightpotion/mod.conf b/permflightpotion/mod.conf
new file mode 100644
index 0000000..8759c40
--- /dev/null
+++ b/permflightpotion/mod.conf
@@ -0,0 +1,3 @@
+name = permflightpotion
+depends = ethereal
+description = Flight potion with no expiration