Skip to content

Commit

Permalink
Merge pull request #36 from xrandox/dev_SotO
Browse files Browse the repository at this point in the history
SotO Map Comp
  • Loading branch information
xrandox authored Aug 28, 2023
2 parents 04bc62e + 4d3c6a8 commit 5efbf5d
Show file tree
Hide file tree
Showing 20 changed files with 473 additions and 4 deletions.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion TehsTrails/Data/TehsTrails/Scripts/alternatemounts.lua
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ local MOUNT_IDS = {
["griffon"] = 1824207
}

local PARENT_CATEGORIES = { "tt.mc.cm.mm.", "tt.hot.cm.mm.", "tt.pof.cm.mm.", "tt.eod.cm.mm." }
local PARENT_CATEGORIES = { "tt.mc.cm.mm.", "tt.hot.cm.mm.", "tt.pof.cm.mm.", "tt.eod.cm.mm.", "tt.soto.cm.mm." }
local PARENT_PATH = "Data/TehsTrails/Markers/"
local PATH_END = ".png"

Expand Down
82 changes: 82 additions & 0 deletions TehsTrails/Data/TehsTrails/Scripts/choosewaypoint.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
Teh.choosewaypoint = {
chooseableWaypoints = {},
isRunning = false,
currentSize = 75,
sizeGrowing = true
}

Debug:Watch("Teh_ChooseWaypoint", Teh.choosewaypoint)
local MAX_SIZE = 150
local MIN_SIZE = 75

local function startWatcher(marker)
if (next(Teh.choosewaypoint.chooseableWaypoints) == nil) then
marker:GetBehavior("InfoModifier").InfoValue = "You're done! (Hopefully...)"
return
end
Teh.choosewaypoint.isRunning = true
end

local function stopWatcher(marker)
Teh.choosewaypoint.isRunning = false
Teh.choosewaypoint.currentSize = MIN_SIZE
Teh.choosewaypoint.sizeGrowing = true
Teh.choosewaypoint.chooseableWaypoints[marker.Guid] = nil
marker:Remove()

for _, m in pairs(Teh.choosewaypoint.chooseableWaypoints) do
m.MapDisplaySize = MIN_SIZE * Mumble.UI.MapScale
m.MapVisibility = false
end
end

local function waypointWatcher()
for _, marker in pairs(Teh.choosewaypoint.chooseableWaypoints) do
if marker.Focused then
stopWatcher(marker)
return
end
end
end

local function waypointAnimator(gameTime)
local elapsedSeconds = gameTime.ElapsedGameTime.TotalSeconds
local size = Teh.choosewaypoint.currentSize
local growing = Teh.choosewaypoint.sizeGrowing
local INTERVAL = 180 * elapsedSeconds

if (growing) then
size = size + INTERVAL;
else
size = size - INTERVAL;
end
Teh.choosewaypoint.currentSize = size

if (size > MAX_SIZE) then growing = false end
if (size < MIN_SIZE) then growing = true end
Teh.choosewaypoint.sizeGrowing = growing

for _, marker in pairs(Teh.choosewaypoint.chooseableWaypoints) do
marker.MapVisibility = true
marker.MapDisplaySize = size * Mumble.UI.MapScale
end
end

local function chooseWaypointTickHandler(gameTime)
if (Teh.choosewaypoint.isRunning) then
waypointAnimator(gameTime)
waypointWatcher()
end
end

function Teh_ChooseWaypointMarker(marker)
Teh.choosewaypoint.chooseableWaypoints[marker.Guid] = marker
end

function Teh_ChooseWaypointTrigger(marker, isfocused)
if (isfocused and Teh.choosewaypoint.isRunning == false) then
startWatcher(marker)
end
end

Event:OnTick(chooseWaypointTickHandler)
48 changes: 48 additions & 0 deletions TehsTrails/Data/TehsTrails/Scripts/disappearingtrail.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
Teh.disappearingtrails = {
trailGuids = {
"c16VPxgSL0yytSwws/y+Vg==",
"c26VPxgSL0yytSwws/y+Vg==",
"c36VPxgSL0yytSwws/y+Vg==",
"c46VPxgSL0yytSwws/y+Vg==",
},
colors = {}
}

Debug:Watch("Teh_DisappearingTrails", Teh.disappearingtrails)

function Teh_DisappearingTrailTrigger(marker, isfocused, guid)
if (isfocused == true) then
local trail = World:TrailByGuid(guid)
if (trail ~= nil) then
trail:Remove()
Debug:Warn("Removed trail with guid " .. guid)
else
Debug:Warn("Could not find trail to make disappear")
end
end
end

function Teh_ColorizeDisappearingTrails()
local colorIndex = 1;
for i, guid in ipairs(Teh.disappearingtrails.trailGuids) do
local trail = World:TrailByGuid(guid)
local mainColor = Teh.storage.trailColor
if (trail ~= nil) then
local thisColor = Teh.trailcolors.colors[colorIndex]

if (thisColor[1] == mainColor) then
colorIndex = colorIndex + 1
thisColor = Teh.trailcolors.colors[colorIndex]
end

trail.Tint = thisColor[2]
trail.Texture = I:Texture(Pack, "Data/TehsTrails/Markers/trailwhite.png")
trail.TrailSampleColor = thisColor[2]
trail.InGameVisibility = true
Teh.disappearingtrails.colors[i] = thisColor
colorIndex = colorIndex + 1
end
end
end

Teh_ColorizeDisappearingTrails()
11 changes: 10 additions & 1 deletion TehsTrails/Data/TehsTrails/Scripts/staticcategories.lua
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@ Teh.static = {
eod = { 1422, 1428, 1438, 1442, 1452 },
hot = { 1043, 1045, 1052 },
pof = { 1210, 1211, 1226, 1228 },
all = { 15, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 34, 35, 39, 50, 51, 53, 54, 62, 65, 73, 91, 139, 218, 326, 1043, 1045, 1052, 1210, 1211, 1226, 1228, 1422, 1428, 1438, 1442, 1452 }
soto = { 1510, 1517 },
all = { 15, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 34, 35, 39, 50, 51, 53, 54, 62, 65, 73, 91, 139, 218, 326, 1043, 1045, 1052, 1210, 1211, 1226, 1228, 1422, 1428, 1438, 1442, 1452, 1510, 1517 }
},
-- Category types we want shown always, according to which areas they should be shown in
categories = {
Expand Down Expand Up @@ -39,6 +40,9 @@ Teh.static = {
},
pof = {

},
soto = {

}
}
}
Expand Down Expand Up @@ -105,4 +109,9 @@ elseif (mapIsIn(maps.hot, mapID)) then
elseif (mapIsIn(maps.pof, mapID)) then
markerFromTable(categories.pof)
markerFromTable(categories.all)

-- SotO maps
elseif (mapIsIn(maps.soto, mapID)) then
markerFromTable(categories.soto)
markerFromTable(categories.all)
end
2 changes: 1 addition & 1 deletion TehsTrails/Data/TehsTrails/Scripts/tutorial.lua
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ Teh.tutorial = {
shown = false
}

Debug:Watch("tutorial", Teh.tutorial)
Debug:Watch("Teh_Tutorial", Teh.tutorial)

local function showTutorial()
-- First we make the outer markers
Expand Down
Binary file added TehsTrails/Data/TehsTrails/SotOTrails/A.trl
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file added TehsTrails/Data/TehsTrails/SotOTrails/AHoops.trl
Binary file not shown.
Binary file added TehsTrails/Data/TehsTrails/SotOTrails/AToS.trl
Binary file not shown.
Binary file added TehsTrails/Data/TehsTrails/SotOTrails/SA.trl
Binary file not shown.
Binary file added TehsTrails/Data/TehsTrails/SotOTrails/SAHoops.trl
Binary file not shown.
Binary file added TehsTrails/Data/TehsTrails/SotOTrails/SAToS.trl
Binary file not shown.
Binary file added TehsTrails/Data/TehsTrails/SotOTrails/SAwarning.trl
Binary file not shown.
4 changes: 3 additions & 1 deletion TehsTrails/Pack.lua
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
Teh = {}
TehsTrailsVersion = "Release v4.0.1"
TehsTrailsVersion = "Beta v5.0.0"

Debug:Print("Pathing Version: v" .. PathingVersion)
Debug:Print("TehsTrails Version: " .. TehsTrailsVersion)
Expand Down Expand Up @@ -28,13 +28,15 @@ if (Teh_VersionCheck()) then
Pack:Require("Data/TehsTrails/Scripts/lookups.lua")
Pack:Require("Data/TehsTrails/Scripts/bounce.lua")
Pack:Require("Data/TehsTrails/Scripts/highlight.lua")
Pack:Require("Data/TehsTrails/Scripts/choosewaypoint.lua")
Pack:Require("Data/TehsTrails/Scripts/globalmarker.lua")
Pack:Require("Data/TehsTrails/Scripts/copy.lua")
Pack:Require("Data/TehsTrails/Scripts/skyscaleinfo.lua")
Pack:Require("Data/TehsTrails/Scripts/hpmarker.lua")
Pack:Require("Data/TehsTrails/Scripts/follower.lua")
Pack:Require("Data/TehsTrails/Scripts/tutorial.lua")
Pack:Require("Data/TehsTrails/Scripts/shoppinglist.lua")
Pack:Require("Data/TehsTrails/Scripts/disappearingtrail.lua")
Pack:Require("Data/TehsTrails/Scripts/tehmenu.lua")
--Pack:Require("Data/TehsTrails/Scripts/globalconverter.lua") used only when generating lookups

Expand Down
Binary file modified TehsTrails/TehsTrails.taco
Binary file not shown.
Loading

0 comments on commit 5efbf5d

Please sign in to comment.