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; }
internal Structure(IGameServerConnection gameServerConnection, Playfield playfield, Eleon.Modding.GlobalStructureInfo info) : base(gameServerConnection, info.id, (EntityType)info.type, info.name) { Class = info.classNr; this.Position = new WorldPosition(playfield, info.pos.ToVector3(), info.rot.ToVector3()); this.MemberOfFaction = _gameServerConnection.GetFaction(info.factionId); this.Pilot = (info.pilotId == 0) ? null : _gameServerConnection.GetOnlinePlayers()[info.pilotId]; }