diff --git a/tools/IconSplitter/!README.txt b/tools/IconSplitter/!README.txt new file mode 100644 index 0000000000..c4c8c35b1c --- /dev/null +++ b/tools/IconSplitter/!README.txt @@ -0,0 +1,5 @@ +This Byond program takes all the icons in DmiToSplit along with input from the user and +splits the icons from the original file into a new file based on the user's provided criteria. +It also produces a file that is the original file minus the icons split into the new file. + +-- Yoshax \ No newline at end of file diff --git a/tools/IconSplitter/DmiToSplit.dmi b/tools/IconSplitter/DmiToSplit.dmi new file mode 100644 index 0000000000..c2258efcc4 Binary files /dev/null and b/tools/IconSplitter/DmiToSplit.dmi differ diff --git a/tools/IconSplitter/IconSplitter.dm b/tools/IconSplitter/IconSplitter.dm new file mode 100644 index 0000000000..a13aad9b73 --- /dev/null +++ b/tools/IconSplitter/IconSplitter.dm @@ -0,0 +1,49 @@ +/* + These are simple defaults for your project. + */ + +world + fps = 25 // 25 frames per second + icon_size = 32 // 32x32 icon size by default + + view = 6 // show up to 6 tiles outward from center (13x13 view) + + +// Make objects move 8 pixels per tick when walking + +mob + step_size = 8 + +obj + step_size = 8 + + + + +client/verb/split_dmi() + set name = "Split Dmi" + set desc = "Loads DmiToSplit.dmi and removes the icon_states of user provided input into another .dmi." + set category = "Here" + + var/icon/DMIToSplit = icon('DmiToSplit.dmi') + + var/icon/RunningOutputCut = new() + var/icon/RunningOutput = new() + + var/user_input + while(!user_input) + user_input = input(usr, "Enter the criteria for the icon_states you wish to be split. For example, doing _d_s will remove all rolled down jumpsuits.","Split Criteria", "") + world << "Your split criteria is [user_input]" + + for(var/OriginalState in icon_states(DMIToSplit)) + if(findtext(OriginalState, user_input)) + var/icon/ToAdd = icon(DMIToSplit, OriginalState) + var/good_name = replacetext(OriginalState, user_input, "") + good_name = "[good_name]_s" + RunningOutputCut.Insert(ToAdd, good_name) + else + var/icon/ToAdd = icon(DMIToSplit, OriginalState) + RunningOutput.Insert(ToAdd, OriginalState) + + usr << ftp(RunningOutput,"CutUpDmi.dmi") + usr << ftp(RunningOutputCut, "CutUpDmiWithCriteria.dmi") \ No newline at end of file diff --git a/tools/IconSplitter/IconSplitter.dme b/tools/IconSplitter/IconSplitter.dme new file mode 100644 index 0000000000..2c3171b194 --- /dev/null +++ b/tools/IconSplitter/IconSplitter.dme @@ -0,0 +1,18 @@ +// DM Environment file for IconSplitter.dme. +// All manual changes should be made outside the BEGIN_ and END_ blocks. +// New source code should be placed in .dm files: choose File/New --> Code File. + +// BEGIN_INTERNALS +// END_INTERNALS + +// BEGIN_FILE_DIR +#define FILE_DIR . +// END_FILE_DIR + +// BEGIN_PREFERENCES +// END_PREFERENCES + +// BEGIN_INCLUDE +#include "IconSplitter.dm" +// END_INCLUDE +