@@ -55,7 +55,13 @@ function MinionListClass:AddValueTooltip(tooltip, index, minionId)
5555 for _ , location in ipairs (minion .spawnLocation ) do
5656 table.insert (coloredLocations , colorCodes .RELIC .. location )
5757 end
58- tooltip :AddLine (14 , s_format (" ^7Spawn: %s" , table.concat (coloredLocations , " , " )))
58+ for i , spawn in ipairs (coloredLocations ) do
59+ if i == 1 then
60+ tooltip :AddLine (14 , s_format (" ^7Spawn: %s" , spawn ))
61+ else
62+ tooltip :AddLine (14 , s_format (" ^7%s%s" , " " , spawn )) -- Indented so all locations line up vertically in toolip
63+ end
64+ end
5965 end
6066 tooltip :AddLine (14 , s_format (" ^7Spectre Reservation: %s%d" , colorCodes .SPIRIT , tostring (minion .spectreReservation )))
6167 tooltip :AddLine (14 , s_format (" ^7Companion Reservation: %s%s%%" , colorCodes .SPIRIT , tostring (minion .companionReservation )))
@@ -112,3 +118,58 @@ function MinionListClass:OnSelDelete(index, minionId)
112118 self .selValue = nil
113119 end
114120end
121+
122+ local SpawnListClass = newClass (" SpawnListControl" , " ListControl" , function (self , anchor , rect , data , list , label )
123+ self .ListControl (anchor , rect , 16 , " VERTICAL" , false )
124+ self .data = data
125+ self .label = label or " ^7Available Items:"
126+ end )
127+
128+ function SpawnListClass :GetRowValue (column , index , spawnLocation )
129+ return spawnLocation
130+ end
131+ function SpawnListClass :AddValueTooltip (tooltip , index , value )
132+ if tooltip :CheckForUpdate (value ) then
133+ local foundArea = nil
134+ for _ , area in pairs (data .worldAreas ) do
135+ if area .name == value then
136+ foundArea = area
137+ break
138+ end
139+ end
140+ if foundArea then
141+ tooltip :AddLine (18 , foundArea .name )
142+ tooltip :AddLine (14 , " Level: " .. foundArea .level )
143+ local biomeNameMap = {
144+ water_biome = " Water" ,
145+ mountain_biome = " Mountain" ,
146+ grass_biome = " Grass" ,
147+ forest_biome = " Forest" ,
148+ swamp_biome = " Swamp" ,
149+ desert_biome = " Desert" ,
150+ }
151+ if # foundArea .tags > 0 then
152+ local friendlyTags = {}
153+ for _ , tag in ipairs (foundArea .tags ) do
154+ local friendlyName = biomeNameMap [tag ]
155+ if friendlyName then
156+ table.insert (friendlyTags , friendlyName )
157+ end
158+ end
159+ if # friendlyTags > 0 then
160+ tooltip :AddLine (14 , " Biome: " .. table.concat (friendlyTags , " , " ))
161+ end
162+ end
163+ if # foundArea .monsterVarieties > 0 and foundArea .baseName ~= " The Ziggurat Refuge" then
164+ tooltip :AddLine (14 , " Spectres:" )
165+ for _ , monsterName in ipairs (foundArea .monsterVarieties ) do
166+ tooltip :AddLine (14 , " - " .. monsterName )
167+ end
168+ else
169+ tooltip :AddLine (14 , " No monsters listed" )
170+ end
171+ else
172+ tooltip :AddLine (18 , " World area not found: " .. tostring (value ))
173+ end
174+ end
175+ end
0 commit comments