mirror of
https://github.com/1dot13/gamedir.git
synced 2026-07-22 13:40:25 +02:00
- Updated "Data-1.13/Scripts/initunderground.lua": Now it is possible to specify alternate loadscreens when loading a sector (by Realist)
git-svn-id: https://ja2svn.mooo.com/source/ja2_v1.13_data@1282 4f8fa57e-7814-0410-bad4-adc449f26b7c
This commit is contained in:
@@ -116,22 +116,22 @@ CreatureMusic = {
|
||||
local sectorList = {
|
||||
|
||||
-- Miguel's basement
|
||||
{ location = "A10-1", loadscreen = "LS_Basement", },
|
||||
{ location = "A10-1", loadscreens = { "LS_Basement", "LS_Upstairs" }, },
|
||||
|
||||
|
||||
-- Tixa
|
||||
{ location = "J9-1", loadscreen = "LS_Basement", },
|
||||
{ location = "J9-1", loadscreens = { "LS_Basement", "LS_Upstairs" }, },
|
||||
|
||||
-- feeding zone
|
||||
{ location = "J9-2", loadscreen = "LS_Cave", },
|
||||
|
||||
|
||||
-- Orta
|
||||
{ location = "K4-1", loadscreen = "LS_Basement", },
|
||||
{ location = "K4-1", loadscreens = { "LS_Basement", "LS_Upstairs" }, },
|
||||
|
||||
-- Meduna
|
||||
{ location = "O3-1", loadscreen = "LS_Basement", },
|
||||
{ location = "P3-1", loadscreen = "LS_Basement", },
|
||||
{ location = "O3-1", loadscreens = { "LS_Basement", "LS_Upstairs" }, },
|
||||
{ location = "P3-1", loadscreens = { "LS_Basement", "LS_Upstairs" }, },
|
||||
|
||||
|
||||
-- San Mona mine
|
||||
@@ -352,18 +352,34 @@ Return values
|
||||
|
||||
function GetLoadscreen(location, timeOfDay)
|
||||
|
||||
local function Return(name)
|
||||
return "Loadscreens\\" .. name, "sti"
|
||||
end
|
||||
|
||||
local s = sectorList[location]
|
||||
|
||||
if s ~= nil and s.loadscreen ~= nil then
|
||||
return "Loadscreens\\" .. s.loadscreen, "sti"
|
||||
else
|
||||
-- resorting to defaults
|
||||
if s ~= nil then
|
||||
|
||||
-- multiple screens to choose from?
|
||||
if s.loadscreens ~= nil and #s.loadscreens > 0 then
|
||||
local screen = s.loadscreens[math.random(#s.loadscreens)]
|
||||
return Return(screen)
|
||||
end
|
||||
|
||||
-- single screen?
|
||||
if s.loadscreen ~= nil then
|
||||
return Return(s.loadscreen)
|
||||
end
|
||||
end
|
||||
|
||||
-- resorting to defaults
|
||||
do
|
||||
-- get last character, aka z level
|
||||
level = location:sub(#location, #location)
|
||||
local level = location:sub(#location, #location)
|
||||
if level == "1" then
|
||||
return "Loadscreens\\LS_Mine", "sti"
|
||||
return Return("LS_Mine")
|
||||
else
|
||||
return "Loadscreens\\LS_Cave", "sti"
|
||||
return Return("LS_Cave")
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user