Skip to content

Commit

Permalink
Trim product name off recommended paths.
Browse files Browse the repository at this point in the history
  • Loading branch information
icculus committed Jul 30, 2009
1 parent 40e13c4 commit b619620
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions examples/postal2aw/scripts/config.lua
Expand Up @@ -8,6 +8,16 @@ local _ = MojoSetup.translate
-- this behaviour!
local origdestfn = MojoSetup.gui.destination
MojoSetup.gui.destination = function(recommend, thisstage, maxstage)
-- Trim the game id off of the recommends...
local newrec = nil
if recommend ~= nil then
newrec = {}
for i,v in ipairs(recommend) do
newrec[i] = string.gsub(recommend[i], "/postal2aw$", "")
end
recommend = newrec
end

while true do
local rc, dst = origdestfn(recommend, thisstage, maxstage)
if rc ~= 1 then
Expand Down

0 comments on commit b619620

Please sign in to comment.