-
-
Notifications
You must be signed in to change notification settings - Fork 282
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
sometimes the best solution is to stop using byond
- Loading branch information
silicons
committed
Jun 23, 2023
1 parent
d879984
commit 51aec90
Showing
5 changed files
with
163 additions
and
4 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
/** | ||
* icon_states() but faster and better, basically | ||
*/ | ||
/proc/fast_icon_states(what) | ||
if(isicon(what) || isfile(what)) | ||
// uh oh | ||
// gotta fcopy | ||
if(!fcopy(what, "data/tmp/rustg_icon_states.dmi")) | ||
. = list() | ||
CRASH("failed to fcopy a passed in icon/file to scratch destination for rustg invoke") | ||
// invoke | ||
. = rustg_dmi_icon_states("data/tmp/rustg_icon_states.dmi") | ||
if(!fdel("data/tmp/rustg_icon_states.dmi")) | ||
CRASH("failed to fdel temporary scratch file") | ||
else if(istext(what)) | ||
// can invoke directly | ||
. = rustg_dmi_icon_states(what) | ||
if(!length(.)) | ||
. = list() | ||
CRASH("failed to run icon states; please check the input / source.") | ||
. = json_decode(.) |
This file contains 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
Binary file not shown.