Page Menu
Home
1F616EMO Bugtracker
Search
Configure Global Search
Log In
Files
F170456
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Size
5 KB
Referenced Files
None
Subscribers
None
View Options
diff --git a/twi_bgm/sounds_todo/bart_little_town.ogg b/twi_bgm/bgms/bart_little_town.ogg
similarity index 100%
rename from twi_bgm/sounds_todo/bart_little_town.ogg
rename to twi_bgm/bgms/bart_little_town.ogg
diff --git a/twi_bgm/sounds/cynicmusic_town_theme.ogg b/twi_bgm/bgms/cynicmusic_town_theme.ogg
similarity index 100%
rename from twi_bgm/sounds/cynicmusic_town_theme.ogg
rename to twi_bgm/bgms/cynicmusic_town_theme.ogg
diff --git a/twi_bgm/sounds/diminixed_nevergrowup.ogg b/twi_bgm/bgms/diminixed_nevergrowup.ogg
similarity index 100%
rename from twi_bgm/sounds/diminixed_nevergrowup.ogg
rename to twi_bgm/bgms/diminixed_nevergrowup.ogg
diff --git a/twi_bgm/sounds/john_ardune_07.ogg b/twi_bgm/bgms/john_ardune_07.ogg
similarity index 100%
rename from twi_bgm/sounds/john_ardune_07.ogg
rename to twi_bgm/bgms/john_ardune_07.ogg
diff --git a/twi_bgm/sounds/john_duskfire_07.ogg b/twi_bgm/bgms/john_duskfire_07.ogg
similarity index 100%
rename from twi_bgm/sounds/john_duskfire_07.ogg
rename to twi_bgm/bgms/john_duskfire_07.ogg
diff --git a/twi_bgm/sounds/john_leviathan_03.ogg b/twi_bgm/bgms/john_leviathan_03.ogg
similarity index 100%
rename from twi_bgm/sounds/john_leviathan_03.ogg
rename to twi_bgm/bgms/john_leviathan_03.ogg
diff --git a/twi_bgm/sounds/pixelsphere_25_new_town.ogg b/twi_bgm/bgms/pixelsphere_25_new_town.ogg
similarity index 100%
rename from twi_bgm/sounds/pixelsphere_25_new_town.ogg
rename to twi_bgm/bgms/pixelsphere_25_new_town.ogg
diff --git a/twi_bgm/sounds/radakan_del_erad.ogg b/twi_bgm/bgms/radakan_del_erad.ogg
similarity index 100%
rename from twi_bgm/sounds/radakan_del_erad.ogg
rename to twi_bgm/bgms/radakan_del_erad.ogg
diff --git a/twi_bgm/sounds/tom_fluffy_style.ogg b/twi_bgm/bgms/tom_fluffy_style.ogg
similarity index 100%
rename from twi_bgm/sounds/tom_fluffy_style.ogg
rename to twi_bgm/bgms/tom_fluffy_style.ogg
diff --git a/twi_bgm/sounds/tom_inca_pan_flute.ogg b/twi_bgm/bgms/tom_inca_pan_flute.ogg
similarity index 100%
rename from twi_bgm/sounds/tom_inca_pan_flute.ogg
rename to twi_bgm/bgms/tom_inca_pan_flute.ogg
diff --git a/twi_bgm/init.lua b/twi_bgm/init.lua
index c760cab..af05ead 100644
--- a/twi_bgm/init.lua
+++ b/twi_bgm/init.lua
@@ -1,116 +1,118 @@
-- twi_mods/twi_bgm/init.lua
-- Make background musics by area
-- Copyright (C) 2024 1F616EMO
-- SPDX-License-Identifier: LGPL-3.0-or-later
+local MP = minetest.get_modpath("twi_bgm")
+
-- Songs played around Spawnpoint in daytime
background_music.register_music("twi_bgm:spawn_day", {
-- Sun Cave Village
-- Soundworlds Histories: Chasing the Leviathan (John Oestmann)
-- License: CC0
{
- name = "john_leviathan_03",
+ file = MP .. "/bgms/john_leviathan_03.ogg",
gain = 0.4,
resend_time = 198.4,
},
-- Inca Pan Flute hip hop
-- Tom Peter
-- https://opengameart.org/content/inca-pan-flute-hip-hop
-- License: CC BY-SA 3.0 https://creativecommons.org/licenses/by-sa/3.0/
{
- name = "tom_inca_pan_flute",
+ file = MP .. "/bgms/tom_inca_pan_flute.ogg",
gain = 0.4,
resend_time = 146.4,
},
-- Fluffy style
-- Totraf
-- https://opengameart.org/content/fluffy-style
-- License: CC BY 3.0 https://creativecommons.org/licenses/by/3.0/
{
- name = "tom_fluffy_style",
+ file = MP .. "/bgms/tom_fluffy_style.ogg",
gain = 0.4,
resend_time = 161.9,
},
-- Town Themne
-- Pixelsphere OST? (cynicmusic)
-- https://opengameart.org/content/town-theme-rpg
-- License: CC0
{
- name = "cynicmusic_town_theme",
+ file = MP .. "/bgms/cynicmusic_town_theme.ogg",
gain = 0.4,
resend_time = 97.5,
},
-- Yuri, the Travelling Shoppe
-- Soundworlds Histories: Duskfire (John Oestmann)
-- License: CC0
{
- name = "john_duskfire_07",
+ file = MP .. "/bgms/john_duskfire_07.ogg",
gain = 0.4,
resend_time = 100.2,
},
-- Little Town [TODO]
-- bart (remix: 1F616EMO)
-- https://opengameart.org/content/little-town
-- License: CC BY-SA 3.0 https://creativecommons.org/licenses/by-sa/3.0/
-- {
- -- name = "1f616emo_little_town",
+ -- file = MP .. "/bgms/1f616emo_little_town",
-- },
})
-- Songs played around Spawnpoint at night
background_music.register_music("twi_bgm:spawn_night", {
-- Del Erad
-- Radakan OST (Janne Hanhisuanto for Radakan)
-- https://opengameart.org/content/radakan-del-erad
-- License: CC BY-SA 3.0 https://creativecommons.org/licenses/by-sa/3.0/
{
- name = "radakan_del_erad",
+ file = MP .. "/bgms/radakan_del_erad.ogg",
gain = 0.4,
resend_time = 300.8,
},
-- Never Grow Up
-- Diminixed
-- License:CC BY-SA 4.0 https://creativecommons.org/licenses/by-sa/4.0/
{
- name = "diminixed_nevergrowup",
+ file = MP .. "/bgms/diminixed_nevergrowup.ogg",
gain = 0.4,
resend_time = 71.4,
},
-- A New Town (RPG Theme)
-- Pixelsphere OST (cynicmusic)
-- https://pixelsphere.org/
-- License: CC0
{
- name = "pixelsphere_25_new_town",
+ file = MP .. "/bgms/pixelsphere_25_new_town.ogg",
gain = 0.4,
resend_time = 62.3,
},
-- Deadlands Forest Shrine
-- Soundworlds Datapedia: Ardune Ambient (John Oestmann)
-- License: CC0
{
- name = "john_ardune_07",
+ file = MP .. "/bgms/john_ardune_07.ogg",
gain = 0.4,
resend_time = 193.5,
},
})
background_music.register_on_decide_music(function(player)
local ppos = player:get_pos()
local timeofday = minetest.get_timeofday()
-- 0.23 < day < 0.78
local now_day = timeofday > 0.23 and timeofday < 0.78
if func_areas.is_in_func_area(ppos, 497) then
-- Spawn Island
return now_day and "twi_bgm:spawn_day" or "twi_bgm:spawn_night"
end
end)
File Metadata
Details
Attached
Mime Type
text/x-diff
Expires
Sat, Apr 11, 9:45 AM (1 w, 2 d ago)
Storage Engine
local-disk
Storage Format
Raw Data
Storage Handle
67/be/af81b7a1bca31a6fa45ba991f77e
Default Alt Text
(5 KB)
Attached To
Mode
rTWIMODS Survival Server Custom Modifications
Attached
Detach File
Event Timeline
Log In to Comment