]> git.lizzy.rs Git - Crafter.git/commitdiff
Added Seasons master
authorElias Fleckenstein <eliasfleckenstein@web.de>
Mon, 14 Dec 2020 16:23:44 +0000 (17:23 +0100)
committerElias Fleckenstein <eliasfleckenstein@web.de>
Mon, 14 Dec 2020 16:23:44 +0000 (17:23 +0100)
21 files changed:
README.md
mods/farming/depends.txt [new file with mode: 0644]
mods/farming/registers.lua
mods/farming/textures/tallgrass_autumn.png [new file with mode: 0644]
mods/farming/textures/tallgrass_spring.png [new file with mode: 0644]
mods/farming/textures/tallgrass_winter.png [new file with mode: 0644]
mods/main/depends.txt
mods/main/nodes.lua
mods/main/textures/Untitled.png [new file with mode: 0644]
mods/main/textures/branches.png [new file with mode: 0644]
mods/main/textures/grass_spring.png [new file with mode: 0644]
mods/main/textures/leaves_dry.png [new file with mode: 0644]
mods/main/textures/leaves_ground.png [new file with mode: 0644]
mods/main/textures/leaves_spring.png [new file with mode: 0644]
mods/main/textures/snow.png [new file with mode: 0644]
mods/player_api/init.lua
mods/season/init.lua
mods/weather/init.lua
mods/weather/textures/snow_block.png [deleted file]
settingtypes.txt [new file with mode: 0644]
todo.txt

index 12dd70ef925993f8ed1066716f6c5a2a7c34f21a..f8110de4e26adcb9137b6feca9c7ea09269851f7 100644 (file)
--- a/README.md
+++ b/README.md
@@ -1,6 +1,6 @@
 <img src="https://github.com/EliasFleckenstein03/Crafter/blob/master/menu/header.png">
 
-> Designed for Minetest 5.3.0-DEV
+> Designed for Minetest 5.3.0
 
 >Built using textures from <a href="https://forum.minetest.net/viewtopic.php?t=16407">Mineclone 2</a> 
 
@@ -35,6 +35,8 @@ max_packets_per_iteration = 10096
 ## Alpha 0.07
 > RailRoad Tech
 
+- Seasons
+- Better 3rd persion visuals
 - Warning when clientmod is not installed
 - Bucket sounds
 - Inventory improvements
diff --git a/mods/farming/depends.txt b/mods/farming/depends.txt
new file mode 100644 (file)
index 0000000..d162441
--- /dev/null
@@ -0,0 +1,2 @@
+season
+main
index 7146d0fda732852c30af356e2689c0685d90d560..efc4ec24a65b4ae43e2e9dfd4b9ba3fc3f73a11f 100644 (file)
@@ -81,7 +81,7 @@ minetest.register_plant("grass", {
        climbable = false,
        paramtype = "light",
        is_ground_content = false,
-    tiles = {"tallgrass.png"},
+    tiles = {season.pick("tallgrass_spring.png", "tallgrass.png", "tallgrass_autumn.png", "tallgrass_winter.png")},
     paramtype2 = "degrotate",
     buildable_to = true,
     sunlight_propagates = true,
diff --git a/mods/farming/textures/tallgrass_autumn.png b/mods/farming/textures/tallgrass_autumn.png
new file mode 100644 (file)
index 0000000..77202ee
Binary files /dev/null and b/mods/farming/textures/tallgrass_autumn.png differ
diff --git a/mods/farming/textures/tallgrass_spring.png b/mods/farming/textures/tallgrass_spring.png
new file mode 100644 (file)
index 0000000..0afd0af
Binary files /dev/null and b/mods/farming/textures/tallgrass_spring.png differ
diff --git a/mods/farming/textures/tallgrass_winter.png b/mods/farming/textures/tallgrass_winter.png
new file mode 100644 (file)
index 0000000..0b79d03
Binary files /dev/null and b/mods/farming/textures/tallgrass_winter.png differ
index f2c5b2640b1a74273a3ccdb967c501b5359d418b..1c59a89bc28226e8e018e6f208a5c9d56af8a80e 100644 (file)
@@ -1 +1,2 @@
-hunger
\ No newline at end of file
+hunger
+season
index 05af3bc98746fa6958478d95d57a235976d914f2..d44cde8c6dc6a27f13a9e38280485408eed6b7a4 100644 (file)
@@ -220,7 +220,7 @@ minetest.register_node("main:dirt", {
 
 minetest.register_node("main:grass", {
     description = "Grass",
-    tiles = {"grass.png"},
+    tiles = season.pick({"grass_spring.png", "grass.png"}, {"grass.png"}, {"leaves_ground.png"}, {"snow.png"}),
     groups = {grass = 1, soil=1,pathable = 1, farm_tillable=1},
     sounds = main.dirtSound(),
     drop="main:dirt",
@@ -364,7 +364,7 @@ minetest.register_node("main:leaves", {
        climbable = true,
        paramtype = "light",
        is_ground_content = false,      
-    tiles = {"leaves.png"},
+    tiles = {season.pick("leaves_spring.png", "leaves.png", "leaves_dry.png", "branches.png")},
     groups = {leaves = 1, leafdecay = 1,flammable=1},
     sounds = main.grassSound(),
     drop = {
diff --git a/mods/main/textures/Untitled.png b/mods/main/textures/Untitled.png
new file mode 100644 (file)
index 0000000..a851d7e
Binary files /dev/null and b/mods/main/textures/Untitled.png differ
diff --git a/mods/main/textures/branches.png b/mods/main/textures/branches.png
new file mode 100644 (file)
index 0000000..49c01f3
Binary files /dev/null and b/mods/main/textures/branches.png differ
diff --git a/mods/main/textures/grass_spring.png b/mods/main/textures/grass_spring.png
new file mode 100644 (file)
index 0000000..f82532f
Binary files /dev/null and b/mods/main/textures/grass_spring.png differ
diff --git a/mods/main/textures/leaves_dry.png b/mods/main/textures/leaves_dry.png
new file mode 100644 (file)
index 0000000..58d1d34
Binary files /dev/null and b/mods/main/textures/leaves_dry.png differ
diff --git a/mods/main/textures/leaves_ground.png b/mods/main/textures/leaves_ground.png
new file mode 100644 (file)
index 0000000..777f236
Binary files /dev/null and b/mods/main/textures/leaves_ground.png differ
diff --git a/mods/main/textures/leaves_spring.png b/mods/main/textures/leaves_spring.png
new file mode 100644 (file)
index 0000000..42b5858
Binary files /dev/null and b/mods/main/textures/leaves_spring.png differ
diff --git a/mods/main/textures/snow.png b/mods/main/textures/snow.png
new file mode 100644 (file)
index 0000000..81526cb
Binary files /dev/null and b/mods/main/textures/snow.png differ
index 3632ef0f2e055ff505581738f1220bb73d8aabfb..432d20af5288f796f3792a41e1e912a2c7c4a93c 100644 (file)
@@ -422,7 +422,7 @@ local set_item = function(self, item)
        itemname = stack:is_known() and stack:get_name() or "unknown"
 
        def = minetest.registered_nodes[itemname]
-       tooldef = minetest.registered_tools[itemname]
+       local tooldef = minetest.registered_tools[itemname]
 
        self.object:set_properties({
                textures = {itemname},
index d39831c4c9aaf55e0a49f25038824cfda675b1be..e420e9abe4369c9ce6b8869a901a6b6fadea2da1 100644 (file)
@@ -1,11 +1,26 @@
-local dayofyear = os.date("*t").yday
+season = {}
 
-if dayofyear >= 79 and dayofyear < 172 then
-       season = "spring"
-elseif dayofyear < 266 then
-       season = "summer"
-elseif dayofyear < 355 then
-       season = "autumn"
-else
-       season = "winter"
+season.which = minetest.settings:get("season") or "reallife"
+
+if season.which == "reallife" then
+       local dayofyear = os.date("*t").yday
+       if dayofyear >= 79 and dayofyear < 172 then
+               season.which = "spring"
+       elseif dayofyear < 266 then
+               season.which = "summer"
+       elseif dayofyear < 355 then
+               season.which = "autumn"
+       else
+               season.which = "winter"
+       end
+end
+
+function season.pick(spring, summer, autumn, winter)
+       local t =  {
+               spring = spring,
+               summer = summer,
+               autumn = autumn,
+               winter = winter
+       }
+       return t[season.which]
 end
index 24a8ad82cf262610414d4585ac1c74e2fe7f4efe..27f8a67d8c1561861af738910a45276378114196 100644 (file)
@@ -417,7 +417,7 @@ end
 
 minetest.register_node("weather:snow", {
     description = "Snow",
-    tiles = {"snow_block.png"},
+    tiles = {"snow.png"},
     groups = {pathable = 1,snow = 1, falling_node=1},
     sounds = main.woolSound(),
     paramtype = "light",
@@ -456,7 +456,7 @@ minetest.register_node("weather:snow", {
 
 minetest.register_node("weather:snow_block", {
     description = "Snow",
-    tiles = {"snow_block.png"},
+    tiles = {"snow.png"},
     groups = {pathable = 1,snow = 1},
     sounds = main.woolSound(),
     drop = {
diff --git a/mods/weather/textures/snow_block.png b/mods/weather/textures/snow_block.png
deleted file mode 100644 (file)
index 81526cb..0000000
Binary files a/mods/weather/textures/snow_block.png and /dev/null differ
diff --git a/settingtypes.txt b/settingtypes.txt
new file mode 100644 (file)
index 0000000..74cbfc3
--- /dev/null
@@ -0,0 +1,2 @@
+# The season to be used ingame (only affects audiovisuals). If set to reallife the season will be set to the real life season when the server starts. Set to summer to disable season effects.
+season (Season) enum reallife reallife,spring,summer,autumn,winter
index a0050d47950e5687d1fdd80b6a123cb86b333579..94aaadc18a54084958bdb4ff39d233e981a2bdf3 100644 (file)
--- a/todo.txt
+++ b/todo.txt
@@ -1,11 +1,9 @@
+- Music depending on season
 - Equip armor with rightclick
 - Shift-click fuel into furnace
 - Throwing eggs
 - Rebalancing of ore generation probabilities and tool speeds
 - More sophisticated particle effects
-- Season effects (only affecting audiovisuals like textures and music)
 - Add two new biomes, each with individual trees, exclusive mobs and structures and a boss fight
-- Fix creative inventory to not overstack items
 - Add Oil
-- Add Redstone Breaker
 - Rework enchanting system