Compare commits
10 Commits
685dc39367
...
5f0b6a4056
Author | SHA1 | Date | |
---|---|---|---|
|
5f0b6a4056 | ||
|
c795422bdf | ||
|
39a66dee63 | ||
|
0883ef7802 | ||
|
0e920c0a55 | ||
|
20fd9f6c22 | ||
|
15c8cbb63e | ||
|
28a9c9149d | ||
|
dc24e3dadd | ||
|
bcfc0f4074 |
@ -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.
|
||||
|
||||
|
@ -1,5 +1,6 @@
|
||||
title = Shadow Forest
|
||||
description = The forest has been overrun by the Shadows and is under eternal darkness. You’re the Wizard of Light; you’re 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
|
||||
|
@ -1 +1,2 @@
|
||||
name = sf_doors
|
||||
depends = sf_sounds
|
||||
|
0
mods/sf_game_meta/init.lua
Normal file
0
mods/sf_game_meta/init.lua
Normal file
4
mods/sf_game_meta/locale/sf_game_meta.de.tr
Normal file
4
mods/sf_game_meta/locale/sf_game_meta.de.tr
Normal 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. You’re the Wizard of Light; you’re 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.
|
||||
|
4
mods/sf_game_meta/locale/sf_game_meta.es.tr
Normal file
4
mods/sf_game_meta/locale/sf_game_meta.es.tr
Normal 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. You’re the Wizard of Light; you’re 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.
|
||||
|
4
mods/sf_game_meta/locale/template.txt
Normal file
4
mods/sf_game_meta/locale/template.txt
Normal file
@ -0,0 +1,4 @@
|
||||
# textdomain: sf_game_meta
|
||||
Shadow Forest=
|
||||
The forest has been overrun by the Shadows and is under eternal darkness. You’re the Wizard of Light; you’re the only hope to break this terrible curse.=
|
||||
|
2
mods/sf_game_meta/mod.conf
Normal file
2
mods/sf_game_meta/mod.conf
Normal file
@ -0,0 +1,2 @@
|
||||
name = sf_game_meta
|
||||
description = This mod contains translation files for the game metadata
|
@ -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",
|
||||
|
@ -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"),
|
||||
|
@ -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,
|
||||
|
@ -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 = "",
|
||||
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -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)
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user