Compare commits

...

10 Commits

Author SHA1 Message Date
Wuzzy
5f0b6a4056 Version 1.1.2 2024-09-16 20:46:10 +02:00
Wuzzy
c795422bdf Reset boss arena on player respawn 2024-09-15 22:23:02 +02:00
Wuzzy
39a66dee63 Merge pull request 'Translate game description to spanish' (#41) from megustanlosfrijoles/Frijoles_Forest:master into master
Reviewed-on: https://codeberg.org/Wuzzy/Shadow_Forest/pulls/41
2024-09-15 19:56:08 +00:00
José Miguel Muñoz Z
0883ef7802 Fix a small typo 2024-09-12 08:17:10 -06:00
José Miguel Muñoz Z
0e920c0a55 Translate game description to spanish 2024-09-12 08:14:16 -06:00
Wuzzy
20fd9f6c22 Fix hud_elem_type deprecation warning (MT 5.9.0) 2024-09-04 20:40:53 +02:00
Wuzzy
15c8cbb63e Add missing dependency in sf_doors 2024-09-04 20:35:15 +02:00
Wuzzy
28a9c9149d Translate game description 2024-03-24 21:27:41 +01:00
Wuzzy
dc24e3dadd Version 1.1.1 2024-02-06 11:49:56 +01:00
Wuzzy
bcfc0f4074 Add ladders to allow to escape wastewater pit 2024-02-06 11:44:17 +01:00
48 changed files with 91 additions and 10 deletions

View File

@ -6,7 +6,7 @@ Find and destroy the source of darkness and bring back the light!
A game by Wuzzy made for the 2023 Minetest Game Jam.
This is version 1.1.0.
This is version 1.1.2.
Historical note: The version submitted for the game jam was 1.0.1.

View File

@ -1,5 +1,6 @@
title = Shadow Forest
description = The forest has been overrun by the Shadows and is under eternal darkness. Youre the Wizard of Light; youre the only hope to break this terrible curse.
textdomain = sf_game_meta
allowed_mapgens = singlenode
disabled_settings = enable_server, !enable_damage, creative_mode
disallowed_mapgen_settings = seed

View File

@ -1 +1,2 @@
name = sf_doors
depends = sf_sounds

View File

View File

@ -0,0 +1,4 @@
# textdomain: sf_game_meta
Shadow Forest=Shadow Forest
The forest has been overrun by the Shadows and is under eternal darkness. Youre the Wizard of Light; youre the only hope to break this terrible curse.=Der Wald wurde von den Schatten überrannt und steht unter ewiger Finsternis. Sie sind der Magier des Lichts; Sie sind die letzte Hoffnung, den schrecklichen Fluch zu brechen.

View File

@ -0,0 +1,4 @@
# textdomain: sf_game_meta
Shadow Forest=Bosque de Sombras
The forest has been overrun by the Shadows and is under eternal darkness. Youre the Wizard of Light; youre the only hope to break this terrible curse.=El bosque ha sido invadido por las Sombras y está bajo oscuridad eterna. Eres el Mago de Luz; eres la única esperanza de romper esta terrible maldición.

View File

@ -0,0 +1,4 @@
# textdomain: sf_game_meta
Shadow Forest=
The forest has been overrun by the Shadows and is under eternal darkness. Youre the Wizard of Light; youre the only hope to break this terrible curse.=

View File

@ -0,0 +1,2 @@
name = sf_game_meta
description = This mod contains translation files for the game metadata

View File

@ -1,5 +1,15 @@
sf_hud = {}
-- Legacy support: Name of the HUD type field for 'hud_add'.
local hud_type_field_name
if minetest.features.hud_def_type_field then
-- Minetest 5.9.0 and later
hud_type_field_name = "type"
else
-- All Minetest versions before 5.9.0
hud_type_field_name = "hud_elem_type"
end
-- experimental dirty/shadowy screen when damaged
local USE_DAMAGE_SCREEN = false
local EDITOR = minetest.settings:get_bool("sf_editor", false) or minetest.settings:get_bool("creative_mode", false)
@ -82,7 +92,7 @@ sf_hud.show_damage_indicator = function(player, angle)
local base_texture = angles[min_diff_index].texture
local hud_id = player:hud_add({
hud_elem_type = "compass",
[hud_type_field_name] = "compass",
size = { x = 256, y = 256 },
text = "("..base_texture..")^[multiply:"..DAMAGE_INDICATOR_COLOR..":100",
alignment = { x = 0, y = 0 },
@ -162,7 +172,7 @@ local update_damage_screen = function(player, hp)
for d=1, damage do
if not damage_screens[pname][d] then
local hud_id = player:hud_add({
hud_elem_type = "image",
[hud_type_field_name] = "image",
position = damage_screen_positions[d],
scale = { x = -30, y = -30 },
text = "sf_player_damage_screen.png",
@ -202,7 +212,7 @@ local update_hp_display = function(player, hp)
local hp_max = player:get_properties().hp_max
if not hp_indicators[pname] then
local hud_id = player:hud_add({
hud_elem_type = "statbar",
[hud_type_field_name] = "statbar",
position = { x=0,y=1},
text = "heart.png",
text2 = "heart_gone.png",

View File

@ -1,6 +1,16 @@
local S = minetest.get_translator("sf_loot")
local EDITOR = minetest.settings:get_bool("sf_editor", false) or minetest.settings:get_bool("creative_mode", false)
-- Legacy support: Name of the HUD type field for 'hud_add'.
local hud_type_field_name
if minetest.features.hud_def_type_field then
-- Minetest 5.9.0 and later
hud_type_field_name = "type"
else
-- All Minetest versions before 5.9.0
hud_type_field_name = "hud_elem_type"
end
-- CHEAT: If enabled, shows vases near you
local vase_radar = false
@ -86,7 +96,7 @@ minetest.register_globalstep(function(dtime)
for v=1, #vases do
local vnode = minetest.get_node(vases[v])
local id = players[p]:hud_add({
hud_elem_type = "waypoint",
[hud_type_field_name] = "waypoint",
name = S("Vase (@1)", vnode.param2),
precision = 1,
text = S("m"),

View File

@ -18,6 +18,16 @@ local BUBBLE_OFFSET_X_TOTAL = BUBBLE_OFFSET_X
local SPEAKER_OFFSET_X_TOTAL = BUBBLE_OFFSET_X + SPEAKER_OFFSET_X
local TEXT_OFFSET_X_TOTAL = BUBBLE_OFFSET_X + SPEAKER_OFFSET_X + TEXT_OFFSET_X
-- Legacy support: Name of the HUD type field for 'hud_add'.
local hud_type_field_name
if minetest.features.hud_def_type_field then
-- Minetest 5.9.0 and later
hud_type_field_name = "type"
else
-- All Minetest versions before 5.9.0
hud_type_field_name = "hud_elem_type"
end
-- HACK:
-- Word-wrap a translatable string
-- * player: player to wrap the text for
@ -92,7 +102,7 @@ sf_messages.show_speech = function(to_player, text, icon, sound, duration)
end
local id_bg = to_player:hud_add({
hud_elem_type = "image",
[hud_type_field_name] = "image",
position = { x = 1, y = 0 },
scale = { x = -41, y = 10 },
text = "sf_messages_speech_bubble.png",
@ -103,7 +113,7 @@ sf_messages.show_speech = function(to_player, text, icon, sound, duration)
local id_icon
if icon then
id_icon = to_player:hud_add({
hud_elem_type = "image",
[hud_type_field_name] = "image",
position = { x = 1, y = 0 },
scale = { x = 2, y = 2 },
text = "sf_messages_portrait_bg.png^("..icon..")",
@ -124,7 +134,7 @@ sf_messages.show_speech = function(to_player, text, icon, sound, duration)
text = hacky_word_wrap(to_player, text, chars)
local id_text = to_player:hud_add({
hud_elem_type = "text",
[hud_type_field_name] = "text",
position = { x = 1, y = 0 },
scale = { x = 100, y = 100 },
text = text,

View File

@ -2,6 +2,16 @@ local S = minetest.get_translator("sf_resources")
sf_resources = {}
-- Legacy support: Name of the HUD type field for 'hud_add'.
local hud_type_field_name
if minetest.features.hud_def_type_field then
-- Minetest 5.9.0 and later
hud_type_field_name = "type"
else
-- All Minetest versions before 5.9.0
hud_type_field_name = "hud_elem_type"
end
local GRAVITY = 9.81
local LIFE_TIMER = 300
local MAGNET_RANGE = 0.8
@ -198,7 +208,7 @@ end
local init_hud = function(player)
local pname = player:get_player_name()
local id_icon = player:hud_add({
hud_elem_type = "image",
[hud_type_field_name] = "image",
position = { x = 0, y = 1 },
scale = { x = 4, y = 4 },
text = "blank.png",
@ -207,7 +217,7 @@ local init_hud = function(player)
z_index = 101,
})
local id_num = player:hud_add({
hud_elem_type = "text",
[hud_type_field_name] = "text",
position = { x = 0, y = 1 },
scale = { x = 100, y = 100 },
text = "",

View File

@ -376,3 +376,28 @@ sf_zones.register_zone("forest_shrine", {
}},
music = "crystal",
})
-- Remove flyershooters and boss in boss arena if player
-- respawns from boss arena.
-- Done to reset the arena state properly so the player
-- can start from a clean slate on a retry.
minetest.register_on_respawnplayer(function(player)
if not sf_zones.is_in_zone(player:get_pos(), "boss_arena") then
return
end
local zone = sf_zones.get_zone("boss_arena")
local objs = sf_zones.get_objects_in_zone(zone)
for o=1, #objs do
local lua = objs[o]:get_luaentity()
if lua then
if lua.name == "sf_mobs:shadow_orb" then
minetest.log("action", "[sf_zones] Boss arena: Removing shadow orb at "..minetest.pos_to_string(objs[o]:get_pos()).." on player respawn")
objs[o]:remove()
elseif lua.name == "sf_mobs:flyershooter" then
minetest.log("action", "[sf_zones] Boss arena: Removing flyershooter at "..minetest.pos_to_string(objs[o]:get_pos()).." on player respawn")
objs[o]:remove()
end
end
end
end)