Jump to content

Fishes and Bait


halomantis

Recommended Posts

Ok so I have gotten new Fish and New bait to work, meaning they are added to the Fishing.fishes and Fishing.lure but the problem I am having is getting to the new fish to show up when caught.  What is happening is that when you catch them they are showing up as Medium IGUI_LongnoseGar 12cm blah blah.  Now my guess is that it has something to do with the translate file.  I am trying to find a way to fix this without having to edit any of the main files.

if not fish.noNameChange then        fishToCreate:setName(getText("IGUI_Fish_" .. fishType.size) .. " " .. getText("IGUI_Fish_" .. string.gsub(fish.name, "%s+", "")) .. " - " .. size .. "cm");    end

This is the line I think is causing the problem in ISFishingAction to create the fish.

 

Not that anything is wrong with it, obviously just what is making the IGUI_Fish_ appear.  In IG_UI_EN translate you can see 

 

IGUI_Fish_Medium = "Medium", 

IGUI_Fish_Pike = "Pike",

 

So this looks like where they build the fish name and whatnot off the data from the fish.

 

Ok lots of info probably not needed, but there we go.

Link to comment
Share on other sites

Ok so I have been delving deeper.  I added a line to the translate file in the main media folder IG_UI_EN

 

IGUI_Fish_LongnoseGar = "Longnose Gar",

 

Everything ran just perfect, I used my new "lure" to catch the new fish.  Sooooooo.... really the question comes to something really simple or harder depending on the answer.  How do I add an item to the translation table without editing the main file in the media/lua/shared/translate folder.  

Link to comment
Share on other sites

Why not just skip the getText() call entirely and just use a string? The only purpose that call serves is to pull information from the various languages. If you are not planning on providing translation entries for multiple languages, there's no point in using getText() anyway.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...