Esempio n. 1
0
        public static void HandleOutput(PZOutput c)
        {
            bool found = false;

            foreach (var converter in clist)
            {
                if (converter.input.ID == c.outputitem && !converter.doing && c.client.CountItem(converter.input.ID) >= converter.input.amount)
                {
                    found = true;
                    PZItem item = new PZItem(c.outputitem, converter.input.amount);
                    GiveItem(c.client, converter.client, item);
                    converter.Input(item);
                }
            }

            if (!found)
            {
                foreach (var storage in slist)
                {
                    if (storage.inputitem == c.outputitem)
                    {
                        found = true;
                        PZItem item = new PZItem(c.outputitem, 1);
                        GiveItem(c.client, storage.client, item);
                        //c.doing = false;
                    }
                }
            }
        }
Esempio n. 2
0
 public SnapshotOutput(PZOutput o)
 {
     try
     {
         client = new SnapshotClient(o.client);
     }
     catch { }
     outputitem = o.outputitem;
 }