Skip to content

Commit

Permalink
CATTY-718 Support Bricks in multiple categories
Browse files Browse the repository at this point in the history
Assigned Bricks to multiple categories like already implemented in the android version
  • Loading branch information
lucatp committed Jul 12, 2023
1 parent 8fb9597 commit 4749e10
Show file tree
Hide file tree
Showing 104 changed files with 6 additions and 427 deletions.
4 changes: 0 additions & 4 deletions src/Catty.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -1751,7 +1751,6 @@
AAF6D9DE1BC0C1F300686849 /* PlaceAtBrick+Instruction.swift in Sources */ = {isa = PBXBuildFile; fileRef = AAF6D9DD1BC0C1F300686849 /* PlaceAtBrick+Instruction.swift */; };
AAF6D9E01BC0C2AA00686849 /* PointInDirectionBrick+Instruction.swift in Sources */ = {isa = PBXBuildFile; fileRef = AAF6D9DF1BC0C2AA00686849 /* PointInDirectionBrick+Instruction.swift */; };
AAF6D9E21BC0C48300686849 /* PointToBrick+Instruction.swift in Sources */ = {isa = PBXBuildFile; fileRef = AAF6D9E11BC0C48300686849 /* PointToBrick+Instruction.swift */; };
B0A14DCC2A5C03A800F812A6 /* BrickCategoryProtocol.swift in Sources */ = {isa = PBXBuildFile; fileRef = B0A14DCB2A5C03A800F812A6 /* BrickCategoryProtocol.swift */; };
BA1FA9981F02AD770084184D /* InsertItemIntoUserListBrick+CBXMLHandler.m in Sources */ = {isa = PBXBuildFile; fileRef = BA1FA9971F02AD770084184D /* InsertItemIntoUserListBrick+CBXMLHandler.m */; };
BA1FA99D1F02AEDC0084184D /* InsertItemIntoUserListBrick.m in Sources */ = {isa = PBXBuildFile; fileRef = BA1FA99C1F02AEDC0084184D /* InsertItemIntoUserListBrick.m */; };
BA1FA9A01F02B0020084184D /* InsertItemIntoUserListBrickCell.m in Sources */ = {isa = PBXBuildFile; fileRef = BA1FA99F1F02B0020084184D /* InsertItemIntoUserListBrickCell.m */; };
Expand Down Expand Up @@ -4396,7 +4395,6 @@
AAF6D9DF1BC0C2AA00686849 /* PointInDirectionBrick+Instruction.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = "PointInDirectionBrick+Instruction.swift"; path = "PlayerEngine/Instructions/Motion/PointInDirectionBrick+Instruction.swift"; sourceTree = "<group>"; };
AAF6D9E11BC0C48300686849 /* PointToBrick+Instruction.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = "PointToBrick+Instruction.swift"; path = "PlayerEngine/Instructions/Motion/PointToBrick+Instruction.swift"; sourceTree = "<group>"; };
ABD74577198FBC2984BDDE56 /* hu */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.strings; name = hu; path = hu.lproj/Localizable.strings; sourceTree = "<group>"; };
B0A14DCB2A5C03A800F812A6 /* BrickCategoryProtocol.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = BrickCategoryProtocol.swift; sourceTree = "<group>"; };
B11EA657D0D5E2E348790671 /* ta */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.strings; name = ta; path = ta.lproj/Localizable.strings; sourceTree = "<group>"; };
B46B270517703F9400172837 /* CattyTests-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "CattyTests-Info.plist"; sourceTree = "<group>"; };
B46B270717703F9400172837 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = "<group>"; };
Expand Down Expand Up @@ -6522,7 +6520,6 @@
4C5517C41ABC300800A52FF4 /* BrickCellProtocol.h */,
4C3AE2991B03526C005E1F57 /* BrickCellDataProtocol.h */,
4C5517C61ABC300800A52FF4 /* BrickProtocol.h */,
B0A14DCB2A5C03A800F812A6 /* BrickCategoryProtocol.swift */,
);
path = Bricks;
sourceTree = "<group>";
Expand Down Expand Up @@ -13299,7 +13296,6 @@
AA74EF001BC057C900D1E954 /* ShowBrick+CBXMLHandler.m in Sources */,
AA74EFE41BC05B5F00D1E954 /* IfLogicBeginBrick.m in Sources */,
9218B20E1CC4AB75007B4C60 /* LineTool.m in Sources */,
B0A14DCC2A5C03A800F812A6 /* BrickCategoryProtocol.swift in Sources */,
AAAF22841BC0CA0F0076F11E /* SetXBrick+Instruction.swift in Sources */,
97D015912553392A00B6967D /* RoundedImageView.swift in Sources */,
4C5076D22578DBDC00650440 /* SetInstrumentBrick+CBXMLHandler.swift in Sources */,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,6 @@

@implementation ArduinoSendDigitalValueBrick

//- (kBrickCategoryType)category
//{
// return kArduinoBrick;
//}
- (NSArray<NSNumber *> *)category
{
return @[@(kArduinoBrick)];
Expand Down
4 changes: 0 additions & 4 deletions src/Catty/DataModel/Bricks/Arduino/ArduinoSendPWMValueBrick.m
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,6 @@

@implementation ArduinoSendPWMValueBrick

//- (kBrickCategoryType)category
//{
// return kArduinoBrick;
//}
- (NSArray<NSNumber *> *)category
{
return @[@(kArduinoBrick)];
Expand Down
6 changes: 1 addition & 5 deletions src/Catty/DataModel/Bricks/Control/BroadcastBrick.m
Original file line number Diff line number Diff line change
Expand Up @@ -26,13 +26,9 @@

@implementation BroadcastBrick

//- (kBrickCategoryType)category
//{
// return kEventBrick;
//}
- (NSArray<NSNumber *> *)category
{
return @[@(kEventBrick)];
return @[@(kControlBrick),@(kEventBrick)];
}

- (id)initWithMessage:(NSString *)message
Expand Down
6 changes: 1 addition & 5 deletions src/Catty/DataModel/Bricks/Control/BroadcastWaitBrick.m
Original file line number Diff line number Diff line change
Expand Up @@ -26,13 +26,9 @@

@implementation BroadcastWaitBrick

//- (kBrickCategoryType)category
//{
// return kEventBrick;
//}
- (NSArray<NSNumber *> *)category
{
return @[@(kEventBrick)];
return @[@(kControlBrick),@(kEventBrick)];
}

- (id)initWithMessage:(NSString*)message
Expand Down
4 changes: 0 additions & 4 deletions src/Catty/DataModel/Bricks/Control/ForeverBrick.m
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,6 @@

@implementation ForeverBrick

//- (kBrickCategoryType)category
//{
// return kControlBrick;
//}
- (NSArray<NSNumber *> *)category
{
return @[@(kControlBrick)];
Expand Down
4 changes: 0 additions & 4 deletions src/Catty/DataModel/Bricks/Control/IfLogicBeginBrick.m
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,6 @@

@implementation IfLogicBeginBrick

//- (kBrickCategoryType)category
//{
// return kControlBrick;
//}
- (NSArray<NSNumber *> *)category
{
return @[@(kControlBrick)];
Expand Down
4 changes: 0 additions & 4 deletions src/Catty/DataModel/Bricks/Control/IfLogicElseBrick.m
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,6 @@

@implementation IfLogicElseBrick

//- (kBrickCategoryType)category
//{
// return kControlBrick;
//}
- (NSArray<NSNumber *> *)category
{
return @[@(kControlBrick)];
Expand Down
4 changes: 0 additions & 4 deletions src/Catty/DataModel/Bricks/Control/IfLogicEndBrick.m
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,6 @@

@implementation IfLogicEndBrick

//- (kBrickCategoryType)category
//{
// return kControlBrick;
//}
- (NSArray<NSNumber *> *)category
{
return @[@(kControlBrick)];
Expand Down
4 changes: 0 additions & 4 deletions src/Catty/DataModel/Bricks/Control/IfThenLogicBeginBrick.m
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,6 @@

@implementation IfThenLogicBeginBrick

//- (kBrickCategoryType)category
//{
// return kControlBrick;
//}
- (NSArray<NSNumber *> *)category
{
return @[@(kControlBrick)];
Expand Down
4 changes: 0 additions & 4 deletions src/Catty/DataModel/Bricks/Control/IfThenLogicEndBrick.m
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,6 @@

@implementation IfThenLogicEndBrick

//- (kBrickCategoryType)category
//{
// return kControlBrick;
//}
- (NSArray<NSNumber *> *)category
{
return @[@(kControlBrick)];
Expand Down
4 changes: 0 additions & 4 deletions src/Catty/DataModel/Bricks/Control/LoopEndBrick.m
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,6 @@

@implementation LoopEndBrick

//- (kBrickCategoryType)category
//{
// return kControlBrick;
//}
- (NSArray<NSNumber *> *)category
{
return @[@(kControlBrick)];
Expand Down
4 changes: 0 additions & 4 deletions src/Catty/DataModel/Bricks/Control/NoteBrick.m
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,6 @@

@implementation NoteBrick

//- (kBrickCategoryType)category
//{
// return kControlBrick;
//}
- (NSArray<NSNumber *> *)category
{
return @[@(kControlBrick)];
Expand Down
4 changes: 0 additions & 4 deletions src/Catty/DataModel/Bricks/Control/RepeatBrick.m
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,6 @@

@implementation RepeatBrick

//- (kBrickCategoryType)category
//{
// return kControlBrick;
//}
- (NSArray<NSNumber *> *)category
{
return @[@(kControlBrick)];
Expand Down
4 changes: 0 additions & 4 deletions src/Catty/DataModel/Bricks/Control/RepeatUntilBrick.m
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,6 @@ @interface RepeatUntilBrick()

@implementation RepeatUntilBrick

//- (kBrickCategoryType)category
//{
// return kControlBrick;
//}
- (NSArray<NSNumber *> *)category
{
return @[@(kControlBrick)];
Expand Down
4 changes: 0 additions & 4 deletions src/Catty/DataModel/Bricks/Control/WaitBrick.m
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,6 @@

@implementation WaitBrick

//- (kBrickCategoryType)category
//{
// return kControlBrick;
//}
- (NSArray<NSNumber *> *)category
{
return @[@(kControlBrick)];
Expand Down
4 changes: 0 additions & 4 deletions src/Catty/DataModel/Bricks/Control/WaitUntilBrick.m
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,6 @@ @interface WaitUntilBrick()

@implementation WaitUntilBrick

//- (kBrickCategoryType)category
//{
// return kControlBrick;
//}
- (NSArray<NSNumber *> *)category
{
return @[@(kControlBrick)];
Expand Down
4 changes: 0 additions & 4 deletions src/Catty/DataModel/Bricks/Data/AddItemToUserListBrick.m
Original file line number Diff line number Diff line change
Expand Up @@ -65,10 +65,6 @@ - (void)setDefaultValuesForObject:(SpriteObject*)spriteObject
}
}

//- (kBrickCategoryType)category
//{
// return kDataBrick;
//}
- (NSArray<NSNumber *> *)category
{
return @[@(kDataBrick)];
Expand Down
4 changes: 0 additions & 4 deletions src/Catty/DataModel/Bricks/Data/ChangeVariableBrick.m
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,6 @@

@implementation ChangeVariableBrick

//- (kBrickCategoryType)category
//{
// return kDataBrick;
//}
- (NSArray<NSNumber *> *)category
{
return @[@(kDataBrick)];
Expand Down
4 changes: 0 additions & 4 deletions src/Catty/DataModel/Bricks/Data/DeleteItemOfUserListBrick.m
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,6 @@

@implementation DeleteItemOfUserListBrick

//- (kBrickCategoryType)category
//{
// return kDataBrick;
//}
- (NSArray<NSNumber *> *)category
{
return @[@(kDataBrick)];
Expand Down
4 changes: 0 additions & 4 deletions src/Catty/DataModel/Bricks/Data/HideTextBrick.m
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,6 @@

@implementation HideTextBrick

//- (kBrickCategoryType)category
//{
// return kDataBrick;
//}
- (NSArray<NSNumber *> *)category
{
return @[@(kDataBrick)];
Expand Down
4 changes: 0 additions & 4 deletions src/Catty/DataModel/Bricks/Data/InsertItemIntoUserListBrick.m
Original file line number Diff line number Diff line change
Expand Up @@ -74,10 +74,6 @@ - (void)setDefaultValuesForObject:(SpriteObject*)spriteObject
}
}

//- (kBrickCategoryType)category
//{
// return kDataBrick;
//}
- (NSArray<NSNumber *> *)category
{
return @[@(kDataBrick)];
Expand Down
4 changes: 0 additions & 4 deletions src/Catty/DataModel/Bricks/Data/ReplaceItemInUserListBrick.m
Original file line number Diff line number Diff line change
Expand Up @@ -74,10 +74,6 @@ - (void)setDefaultValuesForObject:(SpriteObject*)spriteObject
}
}

//- (kBrickCategoryType)category
//{
// return kDataBrick;
//}
- (NSArray<NSNumber *> *)category
{
return @[@(kDataBrick)];
Expand Down
4 changes: 0 additions & 4 deletions src/Catty/DataModel/Bricks/Data/SetVariableBrick.m
Original file line number Diff line number Diff line change
Expand Up @@ -63,10 +63,6 @@ - (void)setDefaultValuesForObject:(SpriteObject*)spriteObject
}
}

//- (kBrickCategoryType)category
//{
// return kDataBrick;
//}
- (NSArray<NSNumber *> *)category
{
return @[@(kDataBrick)];
Expand Down
2 changes: 1 addition & 1 deletion src/Catty/DataModel/Bricks/Data/ShowTextBrick.m
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ - (BOOL)allowsStringFormula{

- (NSArray<NSNumber *> *)category
{
return @[@(kDataBrick)];
return @[@(kDataBrick),@(kLookBrick)];
}

#pragma mark - Description
Expand Down
3 changes: 0 additions & 3 deletions src/Catty/DataModel/Bricks/Data/WebRequestBrick.swift
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,6 @@
self.script = script
}

// func category() -> kBrickCategoryType {
// kBrickCategoryType.dataBrick
// }
func category() -> [NSNumber]! {
[NSNumber(value: kBrickCategoryType.dataBrick.rawValue)]
}
Expand Down
4 changes: 0 additions & 4 deletions src/Catty/DataModel/Bricks/Embroidery/SewUpBrick.swift
Original file line number Diff line number Diff line change
Expand Up @@ -23,14 +23,10 @@
@objc(SewUpBrick)
@objcMembers class SewUpBrick: Brick, BrickProtocol {


override required init() {
super.init()
}

// func category() -> kBrickCategoryType {
// kBrickCategoryType.embroideryBrick
// }
func category() -> [NSNumber] {
[NSNumber(value: kBrickCategoryType.embroideryBrick.rawValue)]
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,6 @@ import Foundation
super.init()
}

// func category() -> kBrickCategoryType {
// kBrickCategoryType.embroideryBrick
// }
func category() -> [NSNumber]! {
[NSNumber(value: kBrickCategoryType.embroideryBrick.rawValue)]
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,6 @@ import Foundation
super.init()
}

// func category() -> kBrickCategoryType {
// kBrickCategoryType.embroideryBrick
// }
func category() -> [NSNumber]! {
[NSNumber(value: kBrickCategoryType.embroideryBrick.rawValue)]
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,6 @@ import Foundation
super.init()
}

// func category() -> kBrickCategoryType {
// kBrickCategoryType.embroideryBrick
// }
func category() -> [NSNumber]! {
[NSNumber(value: kBrickCategoryType.embroideryBrick.rawValue)]
}
Expand Down
3 changes: 0 additions & 3 deletions src/Catty/DataModel/Bricks/Embroidery/StitchBrick.swift
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,6 @@
super.init()
}

// func category() -> kBrickCategoryType {
// kBrickCategoryType.embroideryBrick
// }
func category() -> [NSNumber]! {
[NSNumber(value: kBrickCategoryType.embroideryBrick.rawValue)]
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,6 @@
super.init()
}

// func category() -> kBrickCategoryType {
// kBrickCategoryType.embroideryBrick
// }
func category() -> [NSNumber]! {
[NSNumber(value: kBrickCategoryType.embroideryBrick.rawValue)]
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,6 @@ import Foundation
super.init()
}

// func category() -> kBrickCategoryType {
// kBrickCategoryType.embroideryBrick
// }
func category() -> [NSNumber]! {
[NSNumber(value: kBrickCategoryType.embroideryBrick.rawValue)]
}
Expand Down
4 changes: 0 additions & 4 deletions src/Catty/DataModel/Bricks/IO/FlashBrick.m
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,6 @@

@implementation FlashBrick

//- (kBrickCategoryType)category
//{
// return kLookBrick;
//}
- (NSArray<NSNumber *> *)category
{
return @[@(kLookBrick)];
Expand Down
Loading

0 comments on commit 4749e10

Please sign in to comment.