EntityOwner

Moved

Total Downloads: 7,293 - First Release: Jul 23, 2015 - Last Update: Dec 8, 2017

5/5, 25 likes
  1. I know this is more of a RemoverTool issue however it tends to time itself out when it's used in conjunction with toolcupboard removal is enabled. For EntityOwner, people get stuck in a permanent Building Blocked limbo until relogged or until they manage to auth another cabinet. Is there a way to fix that?

    EDIT:
    To be more specific since this sounds unintelligible. Removing a cupboard without having authorization to the cupboard causes you to get stuck with permanent building block until you auth yourself on a cabinet someone else placed who wasn't within the influence of the previous one. Never thought this would've been such a common issue that people /remove a cupboard they just placed or had /remove running. Unsure if this is the right thread to be asking this in and dunno what the solution would be except for having a cooldown once placing a cupboard to avoid removing it. Or perhaps block removing them entirely.

    I wish garry would remove them from the game already.
     
    Last edited by a moderator: Nov 6, 2015
  2. Calytic

    Calytic Community Admin Community Mod

    Thanks for this report Samsonite.

    I will talk with Reneb, creator of RemoverTool, about this issue. I'll put out a patch ASAP if we need it. I'd prefer not to ignore cupboards with EntityOwner (given that would defeat the purpose of EntityOwner). However, I will address this if necessary.
     
  3. Calytic

    Calytic Community Admin Community Mod

    Calytic updated EntityOwner with a new update entry:

    1.0.41

     
  4. Did you ever get /owner to work on your buildings? I am getting "no target found" - last few weeks.
     
  5. @squaresarah, try to replace 2199-2210 lines on this:
    Code:
    foreach (var hit in hits)
    {
        /*if (hit.collider.GetComponentInParent<T>() != null)
        {*/
            if (hit.distance < distance)
            {
                distance = hit.distance;
                target = hit.GetEntity();
                break;
            }
        //}
    }
    
    It works for enabled batching colliders.
     
    Last edited by a moderator: Nov 6, 2015
  6. For the record, /cleanauth or /authclean (I don't remember which one is the correct command) fixes the building area issue after destroying a cabinet.
     
    Last edited by a moderator: Nov 7, 2015
  7. @Calytic, center pillar have same position as the foundation/ceiling.
     
  8. why does this plugin mess up the help text? it seems to display something but it's invisible transparent. anyone know how to solve this?
     
  9. It's a color/text limitation from unity UI. Write your own /help commands. There's a help plugin.
     
  10. Well, it didnt work. I just got a blank, no response from /owner.
     
  11. @squaresarah, truly. I forgot to delete break;. Without it works fine.
    Also edit line 898 to if (owner == null).
     
  12. Calytic

    Calytic Community Admin Community Mod

    Calytic updated EntityOwner with a new update entry:

    1.0.42

     
  13. All fixed! Thank You
     
  14. @Calytic - I really want to switch over from BuildingOwners to EntityOwners all together, I like the idea of this plugin and I love the idea of using TurretConfig for the clan override. However, I use BuildingOwners for Remove, Teleport and I think that's about it. Do you plan on keeping this plugin up-to-date? And how hard would it be to make those plugins use EntityOwners rather than BuildingOwners? I know you said BuildingOwners wouldn't mess with EntityOwners I just don't want two plugins doing the same thing ya know?

    In advanced, thanks!
     
  15. Calytic

    Calytic Community Admin Community Mod

    There are details in this thread for changing both RemoverTool and Teleport, start from the first page. It only requires some very minor code changes as the EntityOwner api is very similar to the Building Owners api.

    I do plan on keeping the plugin up to date, I have another version scheduled to be released soon. Though the current version does appear to be working, there are some things that could work better =)

    As far as Building Owners, I was very careful to make sure EntityOwner did not conflict with it in any way (or prod, for that matter). It won't hurt anything except performance to use them both.
     
  16. Perfect, exactly my concern. I'll load this up on my test server and see about moving all the plugins over to it. And hopefully getting rid of BuildingOwners. Performance is sort of lacking on our server lately and we can't track it down we thought it was BetterLoot so we removed it for 24 hours with no change. BuildingOwners is a big plugin so I am a little excited to try a new combination of things.
    [DOUBLEPOST=1449297242,1449289227][/DOUBLEPOST]Quick question: This option in RemoverTool

    Will I need to set this to False? I kinda want remove to only be for Owners. I'm not seeing the RemoveTool changes in this thread, so I'm confused.
     
  17. Calytic

    Calytic Community Admin Community Mod

    No, you want to keep that setting turned on and simply change CanRemoveEntity (here is a working version as of right now)

    Code:
    static object CanRemoveEntity(BasePlayer player, BaseEntity entity, RemoveType removeType)
    {
        if (entity.isDestroyed) return "Entity is already destroyed";
        if (removeType == RemoveType.Admin || removeType == RemoveType.All) return true;
        var externalPlugins = Interface.CallHook("canRemove", player);
        if (externalPlugins != null)
            return externalPlugins is string ? (string)externalPlugins : MessageErrorExternalBlock;
        if (raidBlockedPlayers[player] != null)
        {
            if (raidBlockedPlayers[player] > UnityEngine.Time.realtimeSinceStartup)
                return string.Format(MessageRaidBlocked, Mathf.Ceil(raidBlockedPlayers[player] - UnityEngine.Time.realtimeSinceStartup).ToString());
            raidBlockedPlayers.Remove(player);
        }
        if (entity is BaseEntity && useBuildingOwners)
        {
            var returnhook = Interface.GetMod().CallHook("FindEntityData", new object[] { entity as BaseEntity });
            if (returnhook is string)
            {
                string ownerid = (string)returnhook;
                if (player.userID.ToString() == ownerid) return true;
                if (useRustIO)
                    if (HasFriend(ownerid, player.userID.ToString()))
                        return true;
            }
        }
        if (useToolCupboard)
            if (hasTotalAccess(player))
                return true;    return MessageErrorNotAllowedToRemove;
    }
     
  18. On a busy server with large data file, it will lag with /remove, maybe a future feature suggestion, organize the data file by coordinates, so lookup is much faster, for example, using playrust.io's coordinate system, A to Z and 1 to 26, so if someone is querying at say B7 then it would query from data file B7.json or something along these lines. I think it would greatly reduce lag.
     
  19. Calytic

    Calytic Community Admin Community Mod

    @Rusty

    How long have you been running EntityOwner, if it was since before the last wipe - did you run /wipeowners?

    If the answer it no, try running /expireowners

    This will clear out any offline players from the master list (without deleting their entity profile) and should significantly speed up queries.
     
    Last edited: Dec 8, 2015
  20. Calytic

    Calytic Community Admin Community Mod

    Calytic updated EntityOwner with a new update entry:

    1.0.5