adds hopefully working macro size toggle#1
Draft
silicons wants to merge 6 commits intowewman222:mainfrom
Conversation
silicons
commented
Aug 5, 2025
| if(LAZYLEN(po)){\ | ||
| A.overlays |= po;\ | ||
| }\ | ||
| SEND_SIGNAL(A, COMSIG_ATOM_COMPILED_OVERLAYS);\ |
Author
There was a problem hiding this comment.
needed a signal hook to know when to re-render
silicons
commented
Aug 5, 2025
Comment on lines
-40
to
+50
| // COMPARE: The variable on the objects to compare | ||
| #define BINARY_INSERT(IN, LIST, TYPECONT, COMPARE) \ | ||
| var/__BIN_CTTL = length(LIST);\ | ||
| if(!__BIN_CTTL) {\ | ||
| LIST += IN;\ | ||
| } else {\ | ||
| var/__BIN_LEFT = 1;\ | ||
| var/__BIN_RIGHT = __BIN_CTTL;\ | ||
| var/__BIN_MID = (__BIN_LEFT + __BIN_RIGHT) >> 1;\ | ||
| var/##TYPECONT/__BIN_ITEM;\ | ||
| while(__BIN_LEFT < __BIN_RIGHT) {\ | ||
| __BIN_ITEM = LIST[__BIN_MID];\ | ||
| if(__BIN_ITEM.##COMPARE <= IN.##COMPARE) {\ | ||
| __BIN_LEFT = __BIN_MID + 1;\ | ||
| } else {\ | ||
| __BIN_RIGHT = __BIN_MID;\ | ||
| /// Passed into BINARY_INSERT to compare keys | ||
| #define COMPARE_KEY __BIN_LIST[__BIN_MID] | ||
| /// Passed into BINARY_INSERT to compare values | ||
| #define COMPARE_VALUE __BIN_LIST[__BIN_LIST[__BIN_MID]] | ||
|
|
||
| /**** | ||
| * Binary search sorted insert | ||
| * Sorts low to high. | ||
| * | ||
| * * INPUT: Object to be inserted | ||
| * * LIST: List to insert object into | ||
| * * TYPECONT: The typepath of the contents of the list | ||
| * * COMPARE: The object to compare against, usualy the same as INPUT | ||
| * * COMPARISON: The variable on the objects to compare | ||
| * * COMPTYPE: How should the values be compared? Either COMPARE_KEY or COMPARE_VALUE. |
Author
There was a problem hiding this comment.
your binary insert was out of date
silicons
commented
Aug 5, 2025
Comment on lines
+179
to
+190
| /datum/callback/proc/invoke_no_sleep(...) | ||
| #define CALLBACK_SLEEP_SENTINEL "---!!SOMEBULLSHITSTRINGYOUDEFINITELYWONTSEEANYWHEREELSE----!!!" | ||
| . = CALLBACK_SLEEP_SENTINEL | ||
| . = invoke_no_sleep_call(arglist(args)) | ||
| if(. == CALLBACK_SLEEP_SENTINEL) | ||
| . = null | ||
| CRASH("Callback [src] slept on a no-sleeping invoke.") | ||
| #undef CALLBACK_SLEEP_SENTINEL | ||
|
|
||
| /datum/callback/proc/invoke_no_sleep_call(...) | ||
| PRIVATE_PROC(TRUE) | ||
| set waitfor = FALSE |
Author
There was a problem hiding this comment.
protective sentinel call to prevent sleeping; if the hooks used in the component slept it would literally detonate SSoverlays, you do not want this
Author
|
i'm going to bed i didn't test this pr because i literally can't figure out how to observe on this codebase 💀 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
this is a bit of a nightmare
read the comments for the down low on why it's done this way, but tl;dr: