Conversation
timeutills V1
|
there is no block for deleting vectors? |
|
also please run !format |
|
!format |
Yes, just stop using a vector |
|
!format |
|
@fath11 there is now |
yuri-kiss
left a comment
There was a problem hiding this comment.
this seems to literally just be a weird way of storing 2 dictionary's, what is the point of this extension, you can't even do any operations?
| opcode: "vectorCreate", | ||
| blockType: Scratch.BlockType.COMMAND, | ||
| text: Scratch.translate( | ||
| "create vector with ID [ID], direction [DIRECTION] and magnitude [MAGNITUDE]" |
This comment was marked as abuse.
This comment was marked as abuse.
Sorry, something went wrong.
| } | ||
|
|
||
| vectorCreate(args) { | ||
| const id = args.ID; |
This comment was marked as abuse.
This comment was marked as abuse.
Sorry, something went wrong.
There was a problem hiding this comment.
aren't they numbers, you can not put strings in there, and if you could, who would?
There was a problem hiding this comment.
I see now, attempted to fix, fucked up the code
There was a problem hiding this comment.
fixed the fuck up, now works better
| } | ||
|
|
||
| // Vectors storage | ||
| const ids = []; |
This comment was marked as abuse.
This comment was marked as abuse.
Sorry, something went wrong.
|
|
||
| // Vectors storage | ||
| const ids = []; | ||
| const directions = {}; |
This comment was marked as abuse.
This comment was marked as abuse.
Sorry, something went wrong.
|
|
||
| vectorMag(args) { | ||
| const id = args.ID; | ||
| return magnitudes[id] ?? Scratch.translate("vector not found"); |
This comment was marked as abuse.
This comment was marked as abuse.
Sorry, something went wrong.
There was a problem hiding this comment.
do I want people to wonder why their shit isn't working? if you said yes then you are wrong, the answer is no.
There was a problem hiding this comment.
do I want people to wonder why their shit isn't working? if you said yes then you are wrong, the answer is no.
@GarboMuffin said to chill the language
There was a problem hiding this comment.
decided upon making it "null"
|
|
||
| vectorDir(args) { | ||
| const id = args.ID; | ||
| return directions[id] ?? Scratch.translate("vector not found"); |
This comment was marked as abuse.
This comment was marked as abuse.
Sorry, something went wrong.
|
Maps are < >, it does what it needs to do very well |
|
!format |
|
it would be wonderful if you would be more reasonable with your language on this issue tracker |
|
it already does what it needs to do, I don't want to spend multiple hours rewriting the entire extension |
|
!format |
Change the return value for undefined magnitudes from a translation to an empty string.
|
!format |
|
!format |
you can now |
Vectors is a extension for Vectors
Blocks: Create vector with ID,direction and magnitude: creates a vector, vector direction, returns direction of the vector based on ID, vector magnitude, returns magnitude of the vector based on ID, Change Magnitude and direction, changes magnitude and direction of the vector based on ID, and List of IDs, lists all elements in IDs