Offline raid prevention based on TC (Rust)
Doldak

...... The primer function of plugin doesnt work, this i mean is plugin are broken...

Try the donation button.

QIt0jly0nX7xso2.png krunghcrow

maybe easyer to contact the maker of the offlineraid plugin

No response from him.

Well, it's rather simple, depending on the scope and such.
But if you just want something like a 15 min timeout, you need to keep track of the disconnect timestamps for each player, you only have to enable this plugin to check DecayEntity and IOEntity objects.

BaseEntity has a very neat function called "GetBuildingPrivilege()" which contains a list of all the authed players (Player name + Steam64ID). :)
DecayEntity and AppIOEntity have a little override for this for domminant TC and caching respectively.

You do need to exclude things like traps, as these should still get damaged when triggered (mines explode and such).

Here a small snippet of a test I did to find the most suitable base type for checking.

Oh, here a freeby snippet for that inheritance tree:

string GetInheritanceHierarchy(BaseEntity entity)
{
    string indent = "|";
    string result = $"Prefab: \"{entity.ShortPrefabName}\" inheritance hierarchy:\n";

    for (var current = entity.GetType(); current != null; current = current.BaseType) {
        result += $"{indent} {current.Name}\n";
        indent += "__";
    }

    return result;
}