From 6d3e33bf9ff449c965bd053f3ebdb42f05634537 Mon Sep 17 00:00:00 2001 From: Till Affeldt Date: Thu, 16 Apr 2020 10:04:34 +0200 Subject: [PATCH] Update file structure --- README.md | 5 +++-- {ca_effects => abms}/puddles.lua | 0 {ca_effects => abms}/snow_layers.lua | 0 {ca_effects => abms}/soil.lua | 0 ca_effects/lightning.lua | 6 ++++-- ca_effects/speed_buff.lua | 12 +++++++----- 6 files changed, 14 insertions(+), 9 deletions(-) rename {ca_effects => abms}/puddles.lua (100%) rename {ca_effects => abms}/snow_layers.lua (100%) rename {ca_effects => abms}/soil.lua (100%) diff --git a/README.md b/README.md index 0a9cace..6edd9c7 100644 --- a/README.md +++ b/README.md @@ -20,8 +20,9 @@ Experience the humid air of the rain forest and harsh desert sandstorms. - Wind sound: *CC BY (3.0)* by InspectorJ from https://freesound.org/people/InspectorJ/sounds/376415/ - Hail sound: *CC0* by ikayuka from https://freesound.org/people/ikayuka/sounds/240742/ -### Other -- Original ice hud overlay: *CC0* by Simon Matzinger from https://freestocktextures.com/texture/winter-snow-frozen,995.html, edits by me under *CC0* as well +### HUD Overlays +- Original texture for frost hud: *CC0* by Simon Matzinger from https://freestocktextures.com/texture/winter-snow-frozen,995.html, edits by me under *CC0* as well +- Original texture for sandstorm hud: *CC0* from https://freestocktextures.com/texture/dirty-baking-paper,1202.html, edits by me under *CC0* as well ### Assets in screenshots - All screenshots and editing by me: *CC BY-SA (4.0)* diff --git a/ca_effects/puddles.lua b/abms/puddles.lua similarity index 100% rename from ca_effects/puddles.lua rename to abms/puddles.lua diff --git a/ca_effects/snow_layers.lua b/abms/snow_layers.lua similarity index 100% rename from ca_effects/snow_layers.lua rename to abms/snow_layers.lua diff --git a/ca_effects/soil.lua b/abms/soil.lua similarity index 100% rename from ca_effects/soil.lua rename to abms/soil.lua diff --git a/ca_effects/lightning.lua b/ca_effects/lightning.lua index ed51def..2d0ec1e 100644 --- a/ca_effects/lightning.lua +++ b/ca_effects/lightning.lua @@ -1,5 +1,7 @@ if not minetest.get_modpath("lightning") then return end +local EFFECT_NAME = "regional_weather:lightning" + local LIGHTNING_CHANCE = 20 lightning.auto = false @@ -42,5 +44,5 @@ local function handle_effect(player_data) end end -climate_api.register_effect("regional_weather:lightning", handle_effect, "tick") -climate_api.set_effect_cycle("regional_weather:lightning", climate_api.LONG_CYCLE) \ No newline at end of file +climate_api.register_effect(EFFECT_NAME, handle_effect, "tick") +climate_api.set_effect_cycle(EFFECT_NAME, climate_api.LONG_CYCLE) \ No newline at end of file diff --git a/ca_effects/speed_buff.lua b/ca_effects/speed_buff.lua index e6cd811..7b5f7bd 100644 --- a/ca_effects/speed_buff.lua +++ b/ca_effects/speed_buff.lua @@ -1,3 +1,5 @@ +local EFFECT_NAME = "regional_weather:speed_buff" + local function handle_effect(player_data) for playername, data in ipairs(player_data) do local player = minetest.get_player_by_name(playername) @@ -5,17 +7,17 @@ local function handle_effect(player_data) for weather, value in pairs(data) do product = product * value end - climate_api.utility.add_physics("regional_weather:speed_buff", player, "speed", product) + climate_api.utility.add_physics(EFFECT_NAME, player, "speed", product) end end local function remove_effect(player_data) for playername, data in ipairs(player_data) do local player = minetest.get_player_by_name(playername) - climate_api.utility.remove_physics("regional_weather:speed_buff", player, "speed") + climate_api.utility.remove_physics(EFFECT_NAME, player, "speed") end end -climate_api.register_effect("regional_weather:speed_buff", handle_effect, "tick") -climate_api.register_effect("regional_weather:speed_buff", remove_effect, "stop") -climate_api.set_effect_cycle("regional_weather:speed_buff", climate_api.SHORT_CYCLE) \ No newline at end of file +climate_api.register_effect(EFFECT_NAME, handle_effect, "tick") +climate_api.register_effect(EFFECT_NAME, remove_effect, "stop") +climate_api.set_effect_cycle(EFFECT_NAME, climate_api.SHORT_CYCLE) \ No newline at end of file