public MyProjectorClipboard(MyProjectorBase projector, MyPlacementSettings settings) : base(settings) //Pasting Settings here ? { MyDebug.AssertDebug(projector != null); m_projector = projector; m_calculateVelocity = false; }
public MyProjectorClipboard(MyProjectorBase projector) : base(MyPerGameSettings.PastingSettings) { MyDebug.AssertDebug(projector != null); m_projector = projector; m_calculateVelocity = false; }
public ProjectionRaycastData(BuildCheckResult result, MySlimBlock cubeBlock, MyProjectorBase projector) { raycastResult = result; hitCube = cubeBlock; cubeProjector = projector; }
/// <summary> /// Determines whether the projected grid still fits within block limits set by server after a new block is added /// </summary> private bool IsWithinWorldLimits(MyProjectorBase projector, string name) { if (!MySession.Static.EnableBlockLimits) return true; bool withinLimits = true; var identity = MySession.Static.Players.TryGetIdentity(BuiltBy); if (MySession.Static.MaxBlocksPerPlayer > 0) { withinLimits &= BuiltBy == 0 || IDModule.GetUserRelationToOwner(BuiltBy) != MyRelationsBetweenPlayerAndBlock.Enemies; // Don't allow stolen enemy welders to build withinLimits &= projector.BuiltBy == 0 || IDModule.GetUserRelationToOwner(projector.BuiltBy) != MyRelationsBetweenPlayerAndBlock.Enemies; // Don't allow welders to build from enemy projectors withinLimits &= identity == null || identity.BlocksBuilt < MySession.Static.MaxBlocksPerPlayer + identity.BlockLimitModifier; } withinLimits &= MySession.Static.MaxGridSize == 0 || projector.CubeGrid.BlocksCount < MySession.Static.MaxGridSize; short typeLimit = MySession.Static.GetBlockTypeLimit(name); int typeBuilt; if (identity != null && typeLimit > 0) { withinLimits &= (identity.BlockTypeBuilt.TryGetValue(name, out typeBuilt) ? typeBuilt : 0) < typeLimit; } return withinLimits; }
public MySyncProjector(MyProjectorBase projector) { m_projector = projector; }