Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Catty 718 support bricks in multiple categories #1829

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,9 @@

@implementation ArduinoSendDigitalValueBrick

- (kBrickCategoryType)category
- (NSArray<NSNumber *> *)category
{
return kArduinoBrick;
return @[@(kArduinoBrick)];
}

- (Formula*)formulaForLineNumber:(NSInteger)lineNumber andParameterNumber:(NSInteger)paramNumber
Expand Down
4 changes: 2 additions & 2 deletions src/Catty/DataModel/Bricks/Arduino/ArduinoSendPWMValueBrick.m
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,9 @@

@implementation ArduinoSendPWMValueBrick

- (kBrickCategoryType)category
- (NSArray<NSNumber *> *)category
{
return kArduinoBrick;
return @[@(kArduinoBrick)];
}

- (Formula*)formulaForLineNumber:(NSInteger)lineNumber andParameterNumber:(NSInteger)paramNumber
Expand Down
4 changes: 2 additions & 2 deletions src/Catty/DataModel/Bricks/Control/BroadcastBrick.m
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,9 @@

@implementation BroadcastBrick

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

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

@implementation BroadcastWaitBrick

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

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

@implementation ForeverBrick

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

- (BOOL)isAnimateable
Expand Down
4 changes: 2 additions & 2 deletions src/Catty/DataModel/Bricks/Control/IfLogicBeginBrick.m
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,9 @@

@implementation IfLogicBeginBrick

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

- (BOOL)isAnimateable
Expand Down
4 changes: 2 additions & 2 deletions src/Catty/DataModel/Bricks/Control/IfLogicElseBrick.m
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,9 @@

@implementation IfLogicElseBrick

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

- (BOOL)isSelectableForObject
Expand Down
4 changes: 2 additions & 2 deletions src/Catty/DataModel/Bricks/Control/IfLogicEndBrick.m
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,9 @@

@implementation IfLogicEndBrick

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

- (BOOL)isSelectableForObject
Expand Down
4 changes: 2 additions & 2 deletions src/Catty/DataModel/Bricks/Control/IfThenLogicBeginBrick.m
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,9 @@

@implementation IfThenLogicBeginBrick

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

- (BOOL)isAnimateable
Expand Down
4 changes: 2 additions & 2 deletions src/Catty/DataModel/Bricks/Control/IfThenLogicEndBrick.m
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,9 @@

@implementation IfThenLogicEndBrick

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

- (BOOL)isSelectableForObject
Expand Down
4 changes: 2 additions & 2 deletions src/Catty/DataModel/Bricks/Control/LoopEndBrick.m
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,9 @@

@implementation LoopEndBrick

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

- (BOOL)isSelectableForObject
Expand Down
4 changes: 2 additions & 2 deletions src/Catty/DataModel/Bricks/Control/NoteBrick.m
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,9 @@

@implementation NoteBrick

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

- (void)setDefaultValuesForObject:(SpriteObject*)spriteObject
Expand Down
4 changes: 2 additions & 2 deletions src/Catty/DataModel/Bricks/Control/RepeatBrick.m
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,9 @@

@implementation RepeatBrick

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

- (BOOL)isLoopBrick
Expand Down
4 changes: 2 additions & 2 deletions src/Catty/DataModel/Bricks/Control/RepeatUntilBrick.m
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,9 @@ @interface RepeatUntilBrick()

@implementation RepeatUntilBrick

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

- (BOOL)isAnimateable
Expand Down
4 changes: 2 additions & 2 deletions src/Catty/DataModel/Bricks/Control/WaitBrick.m
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,9 @@

@implementation WaitBrick

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

- (Formula*)formulaForLineNumber:(NSInteger)lineNumber andParameterNumber:(NSInteger)paramNumber
Expand Down
4 changes: 2 additions & 2 deletions src/Catty/DataModel/Bricks/Control/WaitUntilBrick.m
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,9 @@ @interface WaitUntilBrick()

@implementation WaitUntilBrick

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

- (BOOL)isAnimateable
Expand Down
4 changes: 2 additions & 2 deletions src/Catty/DataModel/Bricks/Data/AddItemToUserListBrick.m
Original file line number Diff line number Diff line change
Expand Up @@ -65,9 +65,9 @@ - (void)setDefaultValuesForObject:(SpriteObject*)spriteObject
}
}

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

- (BOOL)allowsStringFormula
Expand Down
4 changes: 2 additions & 2 deletions src/Catty/DataModel/Bricks/Data/ChangeVariableBrick.m
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,9 @@

@implementation ChangeVariableBrick

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

- (Formula*)formulaForLineNumber:(NSInteger)lineNumber andParameterNumber:(NSInteger)paramNumber
Expand Down
4 changes: 2 additions & 2 deletions src/Catty/DataModel/Bricks/Data/DeleteItemOfUserListBrick.m
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,9 @@

@implementation DeleteItemOfUserListBrick

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

- (Formula*)formulaForLineNumber:(NSInteger)lineNumber andParameterNumber:(NSInteger)paramNumber
Expand Down
4 changes: 2 additions & 2 deletions src/Catty/DataModel/Bricks/Data/HideTextBrick.m
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,9 @@

@implementation HideTextBrick

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

- (UserVariable*)variableForLineNumber:(NSInteger)lineNumber andParameterNumber:(NSInteger)paramNumber
Expand Down
4 changes: 2 additions & 2 deletions src/Catty/DataModel/Bricks/Data/InsertItemIntoUserListBrick.m
Original file line number Diff line number Diff line change
Expand Up @@ -74,9 +74,9 @@ - (void)setDefaultValuesForObject:(SpriteObject*)spriteObject
}
}

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

- (BOOL)allowsStringFormula
Expand Down
4 changes: 2 additions & 2 deletions src/Catty/DataModel/Bricks/Data/ReplaceItemInUserListBrick.m
Original file line number Diff line number Diff line change
Expand Up @@ -74,9 +74,9 @@ - (void)setDefaultValuesForObject:(SpriteObject*)spriteObject
}
}

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

- (BOOL)allowsStringFormula
Expand Down
4 changes: 2 additions & 2 deletions src/Catty/DataModel/Bricks/Data/SetVariableBrick.m
Original file line number Diff line number Diff line change
Expand Up @@ -63,9 +63,9 @@ - (void)setDefaultValuesForObject:(SpriteObject*)spriteObject
}
}

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

- (BOOL)allowsStringFormula
Expand Down
4 changes: 2 additions & 2 deletions src/Catty/DataModel/Bricks/Data/ShowTextBrick.m
Original file line number Diff line number Diff line change
Expand Up @@ -76,9 +76,9 @@ - (BOOL)allowsStringFormula{
return NO;
}

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

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

func category() -> kBrickCategoryType {
kBrickCategoryType.dataBrick
func category() -> [NSNumber]! {
[NSNumber(value: kBrickCategoryType.dataBrick.rawValue)]
}

override class func description() -> String {
Expand Down
4 changes: 2 additions & 2 deletions src/Catty/DataModel/Bricks/Embroidery/SewUpBrick.swift
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@
super.init()
}

func category() -> kBrickCategoryType {
kBrickCategoryType.embroideryBrick
func category() -> [NSNumber] {
[NSNumber(value: kBrickCategoryType.embroideryBrick.rawValue)]
}

override class func description() -> String {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@ import Foundation
super.init()
}

func category() -> kBrickCategoryType {
kBrickCategoryType.embroideryBrick
func category() -> [NSNumber]! {
[NSNumber(value: kBrickCategoryType.embroideryBrick.rawValue)]
}

override class func description() -> String {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@ import Foundation
super.init()
}

func category() -> kBrickCategoryType {
kBrickCategoryType.embroideryBrick
func category() -> [NSNumber]! {
[NSNumber(value: kBrickCategoryType.embroideryBrick.rawValue)]
}

override class func description() -> String {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@ import Foundation
super.init()
}

func category() -> kBrickCategoryType {
kBrickCategoryType.embroideryBrick
func category() -> [NSNumber]! {
[NSNumber(value: kBrickCategoryType.embroideryBrick.rawValue)]
}

override class func description() -> String {
Expand Down
4 changes: 2 additions & 2 deletions src/Catty/DataModel/Bricks/Embroidery/StitchBrick.swift
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@
super.init()
}

func category() -> kBrickCategoryType {
kBrickCategoryType.embroideryBrick
func category() -> [NSNumber]! {
[NSNumber(value: kBrickCategoryType.embroideryBrick.rawValue)]
}

override class func description() -> String {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,8 @@
super.init()
}

func category() -> kBrickCategoryType {
kBrickCategoryType.embroideryBrick
func category() -> [NSNumber]! {
[NSNumber(value: kBrickCategoryType.embroideryBrick.rawValue)]
}

override class func description() -> String {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@ import Foundation
super.init()
}

func category() -> kBrickCategoryType {
kBrickCategoryType.embroideryBrick
func category() -> [NSNumber]! {
[NSNumber(value: kBrickCategoryType.embroideryBrick.rawValue)]
}

override class func description() -> String {
Expand Down
4 changes: 2 additions & 2 deletions src/Catty/DataModel/Bricks/IO/FlashBrick.m
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,9 @@

@implementation FlashBrick

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

- (id)initWithChoice:(int)choice
Expand Down
4 changes: 2 additions & 2 deletions src/Catty/DataModel/Bricks/IO/VibrationBrick.m
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,9 @@

@implementation VibrationBrick

- (kBrickCategoryType)category
- (NSArray<NSNumber *> *)category
{
return kMotionBrick;
return @[@(kMotionBrick)];
}

- (Formula*)formulaForLineNumber:(NSInteger)lineNumber andParameterNumber:(NSInteger)paramNumber
Expand Down
Loading