From 6e5b98bb168fcd754f33120847bac49e05595c67 Mon Sep 17 00:00:00 2001 From: IamPyu Date: Mon, 21 Oct 2024 18:38:19 -0600 Subject: [PATCH] Add Time Device --- CHANGELOG.md | 1 + mods/ITEMS/pyutest_electricity/devices.lua | 12 ++++++++++++ mods/WORLD/pyutest_worlds/ice.lua | 2 +- textures/pyutest-time-device.png | Bin 0 -> 139 bytes 4 files changed, 14 insertions(+), 1 deletion(-) create mode 100644 textures/pyutest-time-device.png diff --git a/CHANGELOG.md b/CHANGELOG.md index 474d2a4..6439776 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,7 @@ - Lava - Water freezes in cold biomes if not neighbouring heat emiting nodes - New lily pad texture +- Add Time Device, it is not craftable in Survival mode and is only for Creative mode. ## [Oct 19th 2024] Bugfix Update diff --git a/mods/ITEMS/pyutest_electricity/devices.lua b/mods/ITEMS/pyutest_electricity/devices.lua index a3a6071..e573eaf 100644 --- a/mods/ITEMS/pyutest_electricity/devices.lua +++ b/mods/ITEMS/pyutest_electricity/devices.lua @@ -50,3 +50,15 @@ PyuTest.make_electricity_device("pyutest_electricity:lamp_device_on", "Lamp Devi }, function (pos, node, sender_pos) minetest.set_node(pos, {name = "pyutest_electricity:lamp_device"}) end) + +PyuTest.make_electricity_device("pyutest_electricity:time_device", "Time Device", { + cracky = PyuTest.BLOCK_FAST +}, {"pyutest-time-device.png"}, nil, nil, function (pos, node) + local time = minetest.get_timeofday() + + if math.round(time) ~= 1 then + minetest.set_timeofday(0.5) + else + minetest.set_timeofday(1) + end +end) diff --git a/mods/WORLD/pyutest_worlds/ice.lua b/mods/WORLD/pyutest_worlds/ice.lua index 83ef53f..7eb4a0c 100644 --- a/mods/WORLD/pyutest_worlds/ice.lua +++ b/mods/WORLD/pyutest_worlds/ice.lua @@ -8,7 +8,7 @@ PyuTest.IceWorld:create_token("pyutest_worlds:ice_world_token", "Ice World", "#c local icy_cavern = PyuTest.IceWorld:register_biome({ name = "icy_cavern", node_stone = "pyutest_blocks:ice_block", - heat_point = 0, + heat_point = 1, humidity_point = 0 }) diff --git a/textures/pyutest-time-device.png b/textures/pyutest-time-device.png new file mode 100644 index 0000000000000000000000000000000000000000..ce3d9c84327b3439fd7f6cfebe50a598829d7493 GIT binary patch literal 139 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`L7py-Ar`&KSFVKoJMX}lkeHB= zARs2D?EU%n_Vp4oG&ahMI_zCVgfwV_=xRl%FkEYTg;3=?tE(elF{r5}E)~`7S5` literal 0 HcmV?d00001