Jump to content
Sign in to follow this  
Sanchez

addSafeHouse doesn't work for more than 1 safehouse claim

Recommended Posts

Hello, after the last patch (40.40+) SafeHouse.addSafeHouse (ISWorldObjectContextMenu.lua) works only for the first safehouse claim, so player/admin can capture only the single one safehouse.
Before that patch if you disable that limit with some simple lua. changes, player/admin can capture more than one safehouse. For example change ISWorldObjectContextMenu.lua:

    if not safehouse and clickedSquare:getBuilding() and clickedSquare:getBuilding():getDef() then
        local reason = SafeHouse.canBeSafehouse(clickedSquare, playerObj);
        if reason then
            local option = context:addOption(getText("ContextMenu_SafehouseClaim"), worldobjects, ISWorldObjectContextMenu.onTakeSafeHouse, clickedSquare, player);
            if not (getPlayer():getAccessLevel() == "Admin") and reason ~= "" then
                local toolTip = ISToolTip:new();
                toolTip:initialise();
                toolTip:setVisible(false);
                toolTip.description = reason;
                option.notAvailable = true;
                option.toolTip = toolTip;
            end
        end
    end

I have added

not (getPlayer():getAccessLevel() == "Admin")

it allows admin capture more than 1 safehouse.

Now i can't capture more than one safehouse even if i exceed this limit with lua, "Claim Safehouse" option is available and clickable, but when i click it nothing happens.
Can anyone help me to solve this problem, please?

Edited by Sanchez

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
Sign in to follow this  

×
×
  • Create New...