Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can i made some PR ? #60

Open
cyberbobjr opened this issue Aug 6, 2024 · 0 comments
Open

Can i made some PR ? #60

cyberbobjr opened this issue Aug 6, 2024 · 0 comments

Comments

@cyberbobjr
Copy link

cyberbobjr commented Aug 6, 2024

Hello,
I updated the tooltipAPI to be more flexible : with my modification you can now use predicate for tooltip like this :

local function predicateItem(item)
    if item.getFabricType then
        local fabric = item:getFabricType()
        if item:getTags():contains("zReRepairableVest") then
            fabric = "Kevlar"
        end
        if item:getTags():contains("zReRepairableChemsuit") then
            fabric = "zReRubberizedFabrics"
        end
        return fabric ~= nil
    end
    return false
end

local ItemTooltipPredicate = ItemTooltipAPI.CreateToolTipByPredicate("fabricType", predicateItem)
ItemTooltipPredicate:addField(getText("IGUI_SM_Fabric"), getMaterialText) -- Fixed field value

And i made some modification to fix the compatibility with the latest version of PZ (41.78.16).

Are you open to PR ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant