BlueprintManager

Moved

Total Downloads: 5,650 - First Release: Oct 6, 2017 - Last Update: Feb 19, 2018

5/5, 23 likes
  1. try this , u need add this "
    Code:
    {
    "Settings": {
    "Default blueprints": [
    "shirt.collared",
    "shirt.tanktop",
    "tshirt",
    "tshirt.long",
    ....
     
  2. How do i remove blueprints from vanilla barrels loot? I use BetterLoot on all except barrels...
     
  3. does this plugin still work after the update?
     
  4. BluePrintmanager is no longer getting updated i see. And this my friend causes issues, For example, players gets kicked everytime a new player joins due to packet flooding... how to fix?
     
  5. The privilege does not work - blueprintmanager.noworkbench, always requires workbench
     
  6. @Kappasaurus
    So Im way new at this. Im just trying to give all blueprints to everyone when they join. From the commands it looks like I have to give them all to each player by name when they join. I have all the perms just the command read /blueprints unlockall (player)
     
  7. players gets kicked everytime a new player joins due to packet flooding... how to fix?
     
  8. Blueprint Manager it does not work well for the players
     
  9. @Kappasaurus, heyo!
    Idk what happaned, but it looks like PlayerBlueprints.UnlockAll causes the server to freese, due to the hight execution time...

    Here is my workaround:
    Code:
    IEnumerator UnlockAll(BasePlayer player)
            {
                if(!player.IsConnected)
                    yield break;
                if(Available.All(bp => player.blueprints.IsUnlocked(bp)))
                    yield break;
                foreach (var def in Available)
                {
                    PersistantPlayer playerInfo = ServerMgr.Instance.persistance.GetPlayerInfo(player.userID);
                    if (!playerInfo.unlockedItems.Contains(def.itemid))
                    {
                        playerInfo.unlockedItems.Add(def.itemid);
                        ServerMgr.Instance.persistance.SetPlayerInfo(player.userID, playerInfo);
                    }
                    yield return new WaitForFixedUpdate();            }
                player.SendNetworkUpdateImmediate();
                player.ClientRPCPlayer(null, player, "UnlockedBlueprint", 0);
            }
    Code:
                    if (permission.UserHasPermission(player.UserIDString, config.All))
                        ServerMgr.Instance.StartCoroutine(UnlockAll(player));
     
  10. still not fully optimized, due to this calls on every loop step an new instance of WaitForFixedUpdate into memory ;)

    Using this is the right way:
    Code:
    // UnityEngine.CoroutineEx
    public static WaitForFixedUpdate waitForFixedUpdate = new WaitForFixedUpdate();
     
  11. ty, as I'm not working with enumerable much...

    Btw - do you have any idea of what this can be?
    Why calling an in-game method causes such behaviour?
     
  12. Anyway, @Kappasaurus, I was a bit wrong. The code above doesn't work that well.
    It looks like the problem is in the storing part -
    Code:
    ServerMgr.Instance.persistance.SetPlayerInfo(player.userID, playerInfo);
    I've moved it out of the loop + add a queue, wich would work only if the no bps is being unlocked for players atm:

    Code:
    ----
            private readonly Queue<ulong> _order = new Queue<ulong>();
            private bool _inProgress;
    ----
     if (_order.Any() && !_inProgress)
                    {
                        _inProgress = true;
                        ServerMgr.Instance.StartCoroutine(Unlock(_order.Dequeue()));
                    }
    ---
                List<ItemDefinition> list = GetBpist(player);
                if (list.All(player.blueprints.IsUnlocked))
                {
                    _inProgress = false;
                    yield break;
                }
                PersistantPlayer playerInfo = ServerMgr.Instance.persistance.GetPlayerInfo(player.userID);
                foreach (var def in list)
                {
                    if (!playerInfo.unlockedItems.Contains(def.itemid))
                    {
                        playerInfo.unlockedItems.Add(def.itemid);
                    }
                    //yield return WaitForFixedUpdate;
                }
                ServerMgr.Instance.persistance.SetPlayerInfo(player.userID, playerInfo);
                player?.SendNetworkUpdateImmediate();
                player?.ClientRPCPlayer(null, player, "UnlockedBlueprint", 0);
                _inProgress = false;
     
  13. Hey, Kappasaurus I just recently installed your mod but I'm unsure why it isn't working I believe I've taken all the steps I've needed for it to work properly but still not luck. Anyway you could screen share with me or help in anther way? The file shows up in the "config" folder as a .JSON and I edited the way I wanted it but nothing happens in the server?
     

    Attached Files:

  14. blueprintmanager.noworkbench

    no run
     
    Last edited by a moderator: Jul 11, 2018
  15. i have added The plugin and its in my folder but it wont load on my server. It always says "Blue printManager (1) - Unloaded" Please help thanks!
     
  16. plugin name is BlueprintManager.cs not BlueprintManager(1).cs remove the (1) and when downloading a plugin again make sure you delete all old copies from your pc
     
  17. Ok ill try that thanks!
    [DOUBLEPOST=1531335139][/DOUBLEPOST]
    Ive done that but it says you dont have the permissions to use the blueprint commands when im the owner of the server? How do i give my self permission? where do i go?
     
    Last edited by a moderator: Jul 11, 2018
  18. read overview
     
  19. I have but it doesnt tell you where to put the command into. Like where it should go e.g Console, Config, Ingame Chat or Ingame console? pls help
     
  20. all commands are rcon commands so you can use rusty, rustadmin even the rust:10 map has rcon and in game f1 console