public void FromStructureInfo(Eleon.Modding.GlobalStructureInfo structureInfo, string _playfield)
 {
     id           = structureInfo.id;
     type         = structureInfo.type;
     factionGroup = structureInfo.factionGroup;
     factionId    = structureInfo.factionId;
     playfield    = _playfield;
     name         = structureInfo.name;
     lastVisited  = structureInfo.lastVisitedUTC;
     pos          = new PVector3();
     pos.x        = structureInfo.pos.x;
     pos.y        = structureInfo.pos.y;
     pos.z        = structureInfo.pos.z;
     OnPropertyChanged("pos");
     rot   = new PVector3();
     rot.x = structureInfo.rot.x;
     rot.y = structureInfo.rot.y;
     rot.z = structureInfo.rot.z;
     OnPropertyChanged("rot");
     cntDevices   = structureInfo.cntDevices;
     cntBlocks    = structureInfo.cntBlocks;
     cntLights    = structureInfo.cntLights;
     cntTriangles = structureInfo.cntTriangles;
     classNr      = structureInfo.classNr;
     fuel         = structureInfo.fuel;
     powered      = structureInfo.powered;
     dockedShips  = structureInfo.dockedShips;
     coreType     = structureInfo.coreType;
     pilotId      = structureInfo.pilotId;
 }
 public void FromEntityInfo(Eleon.Modding.EntityInfo entityInfo, string _playfield)
 {
     id        = entityInfo.id;
     type      = entityInfo.type;
     playfield = _playfield;
     pos       = new PVector3();
     pos.x     = entityInfo.pos.x;
     pos.y     = entityInfo.pos.y;
     pos.z     = entityInfo.pos.z;
     OnPropertyChanged("pos");
 }
        public void FromPlayerInfo(Eleon.Modding.PlayerInfo playerinfo)
        {
            clientId       = playerinfo.clientId;
            entityId       = playerinfo.entityId;
            steamId        = playerinfo.steamId;
            steamOwnerId   = playerinfo.steamOwnerId;
            playerName     = playerinfo.playerName;
            playfield      = playerinfo.playfield;
            startPlayfield = playerinfo.startPlayfield;
            pos            = new PVector3();
            pos.x          = playerinfo.pos.x;
            pos.y          = playerinfo.pos.y;
            pos.z          = playerinfo.pos.z;
            OnPropertyChanged("pos");
            rot   = new PVector3();
            rot.x = playerinfo.rot.x;
            rot.y = playerinfo.rot.y;
            rot.z = playerinfo.rot.z;
            OnPropertyChanged("rot");
            factionGroup = playerinfo.factionGroup;
            factionId    = playerinfo.factionId;
            factionRole  = playerinfo.factionRole;
            origin       = playerinfo.origin;
            health       = playerinfo.health;
            healthMax    = playerinfo.healthMax;
            oxygen       = playerinfo.oxygen;
            oxygenMax    = playerinfo.oxygenMax;
            stamina      = playerinfo.stamina;
            staminaMax   = playerinfo.staminaMax;
            kills        = playerinfo.kills;
            died         = playerinfo.died;
            credits      = playerinfo.credits;

            if (playerinfo.toolbar != null)
            {
                toolbar = new List <ItemStack>();
                ItemStack iSt;
                foreach (Eleon.Modding.ItemStack itemStack in playerinfo.toolbar)
                {
                    iSt = new ItemStack();
                    iSt.FromItemStack(itemStack);
                    toolbar.Add(iSt);
                }
            }

            if (playerinfo.bag != null)
            {
                bag = new List <ItemStack>();
                ItemStack iSt;
                foreach (Eleon.Modding.ItemStack itemStack in playerinfo.bag)
                {
                    iSt = new ItemStack();
                    iSt.FromItemStack(itemStack);
                    bag.Add(iSt);
                }
            }

            exp                  = playerinfo.exp;
            upgrade              = playerinfo.upgrade;
            bpRemainingTime      = playerinfo.bpRemainingTime;
            bpResourcesInFactory = playerinfo.bpResourcesInFactory;
            bpInFactory          = playerinfo.bpInFactory;
            producedPrefabs      = playerinfo.producedPrefabs;
            ping                 = playerinfo.ping;
        }