public bool HasSmiley(Smiley smiley) { var pack = BlockServices.GetPackage(smiley); if (pack == null) { return(true); } return(this._itemCounts.ContainsKey(pack)); }
private static bool IsBorderPlaceable(Foreground.Id id) { if (id == Foreground.Special.FullyBlack) { return(true); } var block = BlockServices.GetGroup((int)id); return(block == typeof(Foreground.Basic) || block == typeof(Foreground.Beta) || block == typeof(Foreground.Brick)); }
public bool HasBlock(int id, int count, bool isBuildersClub, bool isAdministrator) { var pack = BlockServices.GetPackageInternal(id); if (pack == null) { return(true); } //if (pack.BlocksPerPack > 0) //{ // int owned; // this._itemCounts.TryGetValue(pack.Package, out owned); // return (isBuildersClub && pack.Package != "brickdiamond") || // pack.BlocksPerPack * owned > count; //} switch (pack.Package) { case "admin": return(isAdministrator); case "bc": return(isBuildersClub); case "brickdiamond": case "brickhwthrophy": case "brickmagic": case "brickmagic2": case "brickmagic3": case "brickmagic4": case "brickmagic5": check: return(this._itemCounts.ContainsKey(pack.Package)); default: if (isBuildersClub) { return(true); } goto check; } }
public static ForegroundType GetForegroundType(Foreground.Id id) { var package = BlockServices.GetPackageInternal((int)id); return(package != null ? package.ForegroundType : ForegroundType.Normal); }