diff --git a/mods/1042_achievements/mod.conf b/mods/1042_achievements/mod.conf deleted file mode 100644 index 29f7fe9..0000000 --- a/mods/1042_achievements/mod.conf +++ /dev/null @@ -1 +0,0 @@ -name = 1042_achievements \ No newline at end of file diff --git a/mods/1042_ambiance/init.lua b/mods/1042_ambiance/init.lua deleted file mode 100644 index 7c6212a..0000000 --- a/mods/1042_ambiance/init.lua +++ /dev/null @@ -1,4 +0,0 @@ - -local path = core.get_modpath("1042_ambiance") - -dofile(path.."/player.lua") \ No newline at end of file diff --git a/mods/1042_ambiance/mod.conf b/mods/1042_ambiance/mod.conf deleted file mode 100644 index 2b3ccb7..0000000 --- a/mods/1042_ambiance/mod.conf +++ /dev/null @@ -1,2 +0,0 @@ -name = 1042_ambiance -depends = 1042_core \ No newline at end of file diff --git a/mods/1042_ambiance/player.lua b/mods/1042_ambiance/player.lua deleted file mode 100644 index 8b57c96..0000000 --- a/mods/1042_ambiance/player.lua +++ /dev/null @@ -1,80 +0,0 @@ - - -core.register_on_joinplayer(function(player, last_join) - local saturation = 1.8 - if core_1042.get("playersetting_"..player:get_player_name().."_greyscale") == "true" then - saturation = 0 - end - - player:set_lighting( - { - volumetric_light = { - strength = 0.1 - }, - shadows = { - intensity = 0.4, - tint = {r=0x99, g=0x99, b=0x99} - }, - bloom = { - intensity = 0.07, - strength_factor = 1.0, - radius = 1.0 - }, - saturation = saturation, - exposure = { - exposure_correction = 1 - } - } - ) - player:set_sky( - { - type = "regular", - clouds = true, - sky_color = { - night_sky = "#0066ff", - night_horizon = "#0088ff" - }, - fog = { - fog_start = 0 - } - } - ) - player:set_sun( - { - texture = "1042_plain_node.png^[colorize:#ddaa66:144", - scale = 0.5 - } - ) - player:set_moon( - { - texture = "1042_plain_node.png^[colorize:#aaaaaa:144", - visible = true, - scale = 0.3 - } - ) - player:set_stars( - { - visible = true, - day_opacity = 0.1, - count = 6000, - star_color = "#99aaffff", - scale = 0.3 - } - ) - - - local zoom_time = 0 - if last_join == nil then - zoom_time = 1 - - core.chat_send_player(player:get_player_name(), core.colorize("#00ff00", "It is the year 1042 and you are lost.")) - - else - core.chat_send_player(player:get_player_name(), "It is day " .. core.get_day_count() .. " of being lost.") - end - - player:set_fov(100, false, zoom_time) -end) - - --- Add sounds \ No newline at end of file diff --git a/mods/1042_core/init.lua b/mods/1042_core/init.lua index e1ba50c..dab2ba1 100644 --- a/mods/1042_core/init.lua +++ b/mods/1042_core/init.lua @@ -85,9 +85,10 @@ end local path = core.get_modpath("1042_core") -dofile(path.."/game_storage.lua") -dofile(path.."/funcs.lua") -dofile(path.."/player_inv.lua") -dofile(path.."/player.lua") -dofile(path.."/privs.lua") +dofile(path.."/src/game_storage.lua") +dofile(path.."/src/funcs.lua") +dofile(path.."/src/player_inv.lua") +dofile(path.."/src/player.lua") +dofile(path.."/src/privs.lua") +dofile(path.."/src/achievements.lua") diff --git a/mods/1042_achievements/init.lua b/mods/1042_core/src/achievements.lua similarity index 100% rename from mods/1042_achievements/init.lua rename to mods/1042_core/src/achievements.lua diff --git a/mods/1042_core/funcs.lua b/mods/1042_core/src/funcs.lua similarity index 100% rename from mods/1042_core/funcs.lua rename to mods/1042_core/src/funcs.lua diff --git a/mods/1042_core/game_storage.lua b/mods/1042_core/src/game_storage.lua similarity index 100% rename from mods/1042_core/game_storage.lua rename to mods/1042_core/src/game_storage.lua diff --git a/mods/1042_core/player.lua b/mods/1042_core/src/player.lua similarity index 80% rename from mods/1042_core/player.lua rename to mods/1042_core/src/player.lua index e5f78c8..c3b0efe 100644 --- a/mods/1042_core/player.lua +++ b/mods/1042_core/src/player.lua @@ -63,16 +63,18 @@ end) +-- Open player +core.register_on_rightclickplayer(function(player, clicker) + +end) + + + -- Join player core.register_on_joinplayer(function(player, last_join) local name = player:get_player_name() - - if last_join == nil then - spawn_player(player) - end - player:set_properties({ visual = "mesh", mesh = "player.gltf", @@ -96,7 +98,6 @@ core.register_on_joinplayer(function(player, last_join) nametag_color = "#00000000", }) - player:set_physics_override( { gravity = 1.5, @@ -105,7 +106,6 @@ core.register_on_joinplayer(function(player, last_join) liquid_sink = 2 } ) - player:hud_set_flags( { minimap = false, @@ -115,6 +115,83 @@ core.register_on_joinplayer(function(player, last_join) } ) + -- Ligthing and enviorment + local saturation = 1.8 + if core_1042.get("playersetting_"..name.."_greyscale") == "true" then + saturation = 0 + end + + player:set_lighting( + { + volumetric_light = { + strength = 0.1 + }, + shadows = { + intensity = 0.4, + tint = {r=0x99, g=0x99, b=0x99} + }, + bloom = { + intensity = 0.07, + strength_factor = 1.0, + radius = 1.0 + }, + saturation = saturation, + exposure = { + exposure_correction = 1 + } + } + ) + player:set_sky( + { + type = "regular", + clouds = true, + sky_color = { + night_sky = "#0066ff", + night_horizon = "#0088ff" + }, + fog = { + fog_start = 0 + } + } + ) + player:set_sun( + { + texture = "1042_plain_node.png^[colorize:#ddaa66:144", + scale = 0.5 + } + ) + player:set_moon( + { + texture = "1042_plain_node.png^[colorize:#aaaaaa:144", + visible = true, + scale = 0.3 + } + ) + player:set_stars( + { + visible = true, + day_opacity = 0.1, + count = 6000, + star_color = "#99aaffff", + scale = 0.3 + } + ) + + local zoom_time = 0 + if last_join == nil then + spawn_player(player) + zoom_time = 1 + + core.chat_send_player(name, core.colorize("#00ff00", "It is the year 1042 and you are lost.")) + + else + core.chat_send_player(name, "It is day " .. core.get_day_count() .. " of being lost.") + end + + player:set_fov(100, false, zoom_time) + + + diff --git a/mods/1042_core/player_inv.lua b/mods/1042_core/src/player_inv.lua similarity index 100% rename from mods/1042_core/player_inv.lua rename to mods/1042_core/src/player_inv.lua diff --git a/mods/1042_core/privs.lua b/mods/1042_core/src/privs.lua similarity index 100% rename from mods/1042_core/privs.lua rename to mods/1042_core/src/privs.lua diff --git a/mods/1042_nodes/init.lua b/mods/1042_nodes/init.lua index eeed9e9..a137905 100644 --- a/mods/1042_nodes/init.lua +++ b/mods/1042_nodes/init.lua @@ -7,8 +7,8 @@ local path = core.get_modpath("1042_nodes") -dofile(path.."/items.lua") -dofile(path.."/nodes.lua") -dofile(path.."/plants.lua") -dofile(path.."/liquids.lua") -dofile(path.."/abms.lua") \ No newline at end of file +dofile(path.."/src/items.lua") +dofile(path.."/src/nodes.lua") +dofile(path.."/src/plants.lua") +dofile(path.."/src/liquids.lua") +dofile(path.."/src/abms.lua") \ No newline at end of file diff --git a/mods/1042_nodes/abms.lua b/mods/1042_nodes/src/abms.lua similarity index 100% rename from mods/1042_nodes/abms.lua rename to mods/1042_nodes/src/abms.lua diff --git a/mods/1042_nodes/items.lua b/mods/1042_nodes/src/items.lua similarity index 100% rename from mods/1042_nodes/items.lua rename to mods/1042_nodes/src/items.lua diff --git a/mods/1042_nodes/liquids.lua b/mods/1042_nodes/src/liquids.lua similarity index 100% rename from mods/1042_nodes/liquids.lua rename to mods/1042_nodes/src/liquids.lua diff --git a/mods/1042_nodes/nodes.lua b/mods/1042_nodes/src/nodes.lua similarity index 100% rename from mods/1042_nodes/nodes.lua rename to mods/1042_nodes/src/nodes.lua diff --git a/mods/1042_nodes/plants.lua b/mods/1042_nodes/src/plants.lua similarity index 100% rename from mods/1042_nodes/plants.lua rename to mods/1042_nodes/src/plants.lua diff --git a/mods/1042_weather/mod.conf b/mods/1042_weather/mod.conf index c9bcfca..f110969 100644 --- a/mods/1042_weather/mod.conf +++ b/mods/1042_weather/mod.conf @@ -1,2 +1,2 @@ name = 1042_weather -depends = 1042_ambiance \ No newline at end of file +depends = 1042_core, 1042_nodes \ No newline at end of file