code:
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
  <Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
  <PropertyGroup>
    <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
    <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
    <ProjectGuid>{BA95D3D9-1940-4183-8563-BE617D752D0B}</ProjectGuid>
    <OutputType>Exe</OutputType>
    <RootNamespace>CreditsTool</RootNamespace>
    <AssemblyName>CreditsTool</AssemblyName>
    <TargetFrameworkVersion>v4.6.1</TargetFrameworkVersion>
    <FileAlignment>512</FileAlignment>
    <AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
  </PropertyGroup>
  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
    <PlatformTarget>AnyCPU</PlatformTarget>
    <DebugSymbols>true</DebugSymbols>
    <DebugType>full</DebugType>
    <Optimize>false</Optimize>
    <OutputPath>bin\Debug\</OutputPath>
    <DefineConstants>DEBUG;TRACE</DefineConstants>
    <ErrorReport>prompt</ErrorReport>
    <WarningLevel>4</WarningLevel>
  </PropertyGroup>
  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
    <PlatformTarget>AnyCPU</PlatformTarget>
    <DebugType>pdbonly</DebugType>
    <Optimize>true</Optimize>
    <OutputPath>bin\Release\</OutputPath>
    <DefineConstants>TRACE</DefineConstants>
    <ErrorReport>prompt</ErrorReport>
    <WarningLevel>4</WarningLevel>
  </PropertyGroup>
  <ItemGroup>
    <Reference Include="System" />
    <Reference Include="System.Drawing" />
    <Reference Include="System.Net.Http" />
    <Reference Include="System.Web.Extensions" />
  </ItemGroup>
  <ItemGroup>
    <Compile Include="Program.cs" />
  </ItemGroup>
  <ItemGroup>
    <Folder Include="Properties\" />
  </ItemGroup>
  <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
</Project>

repo_name: AnalWerewolf/sundown

license: mit


code:
using System;
using System.Collections.Generic;
using System.Drawing;
using System.Drawing.Imaging;
using System.IO;
using System.Net;
using System.Web.Script.Serialization;

namespace CreditsTool
{
	class Program
	{
		const string ConfigPath = "remappings.txt";
		const string OutputLocation = "./credit_pngs";
		const int world_icon_size = 32;
		//this downloads all the user images of contributors of a passed github repository
		//usage ./CreditsTool <repo owner> <repo> [authToken (helps with github rate limiter)]
		static void Main(string[] args)
		{
			if (args.Length < 2)
			{
				Console.WriteLine("Usage: ./CreditsTool.exe <repo owner> <repo> [authToken]");
				return;
			}

			if (Directory.Exists(OutputLocation))
			{
				Console.WriteLine(String.Format("Aborted: {0} exists!", OutputLocation));
				return;
			}
			Directory.CreateDirectory(OutputLocation);

			string repoOwner = args[0],
				repoName = args[1],
				authToken = args.Length > 2 ? args[2] : null;

			Console.WriteLine("Querying contributors API...");

			var FirstResponse = GetPageResponse(repoOwner, repoName, authToken, 1);

			Console.WriteLine("Collecting avatar URLs...");

			var LoginAvatars = new Dictionary<string, string>();
			//now list the things we want: avatar urls and logins
			foreach (var I in LoadPages(FirstResponse, repoOwner, repoName, authToken)) {
				var avurl = (string)I["avatar_url"];
				LoginAvatars.Add((string)I["login"], String.Format("{0}{1}s={2}", avurl, avurl.Contains("?") ? "&" : "?", world_icon_size));
			}

			Console.WriteLine(String.Format("Collected info for {0} contributors.", LoginAvatars.Count));

			Console.WriteLine("Remapping github logins...");

			var remaps = LoadConfig();

			Console.WriteLine(String.Format("Downloading and converting avatars to {0} (this will take a while)...", OutputLocation));

			using (var client = new WebClient())
			{
				var count = 0;
				foreach (var I in LoginAvatars)
				{
					var writtenFilename = I.Key;
					if (remaps.TryGetValue(writtenFilename, out string tmp))
					{
						if (tmp == "__REMOVE__")
							continue;
						writtenFilename = tmp;
					}
					using (var stream = new MemoryStream(client.DownloadData(I.Value)))
					using (var originalBMP = new Bitmap(stream))
					{
						if (originalBMP.Width == world_icon_size && originalBMP.Height == world_icon_size)  //no need to resize
							SaveBMP(originalBMP, writtenFilename);
						else
							using (var resizedBMP = new Bitmap(originalBMP, new Size(world_icon_size, world_icon_size)))
								SaveBMP(resizedBMP, writtenFilename);
					}
					Console.WriteLine(String.Format("Done {0}.png! {1}%", writtenFilename, (int)((((float)(count + 1)) / LoginAvatars.Count) * 100)));
					++count;
				}
			}
		}

		static void SaveBMP(Bitmap bmp, string writtenFilename)
		{
			bmp.Save(String.Format("{0}{1}{2}.png", OutputLocation, Path.DirectorySeparatorChar, writtenFilename), ImageFormat.Png);
		}

		static IDictionary<string, string> LoadConfig()
		{
			var result = new Dictionary<string, string>();
			if (File.Exists(ConfigPath))
				foreach (var I in File.ReadAllLines(ConfigPath))
					if (!String.IsNullOrWhiteSpace(I) && I[0] != '#')
					{
						var splits = new List<string>(I.Split(' '));
						if (splits.Count >= 1 && !String.IsNullOrEmpty(splits[1]))
						{
							var key = splits[0];
							splits.RemoveAt(0);
							result.Add(key, String.Join(" ", splits));
						}
					}
			return result;
		}

		static IEnumerable<IDictionary<string, object>> LoadPages(WebResponse firstResponse, string repoOwner, string repoName, string authToken)
		{
			int numPages = GetNumPagesOfContributors(firstResponse);
			Console.WriteLine(String.Format("Downloading {0} pages of contributor info...", numPages));
			//load and combine json for all pages
			var jss = new JavaScriptSerializer();
			using (var sr = new StreamReader(firstResponse.GetResponseStream()))
				foreach (var J in jss.Deserialize<IEnumerable<IDictionary<string, object>>>(sr.ReadToEnd()))
					yield return J;

			//skip the first
			for (var I = 2; I <= numPages; ++I)
				using (var sr = new StreamReader(GetPageResponse(repoOwner, repoName, authToken, I).GetResponseStream()))
					foreach (var J in jss.Deserialize<IEnumerable<IDictionary<string, object>>>(sr.ReadToEnd()))
						yield return J;
		}

		static int GetNumPagesOfContributors(WebResponse response)
		{
			var splits = response.Headers["Link"].Split(',');
			foreach (var I in splits)
				if (I.Contains("rel=\"last\"")) //our boy
				{
					var pagestrIndex = I.IndexOf("&page=") + 6;
					var closingIndex = I.IndexOf('>', pagestrIndex + 1);
					var thedroidswerelookingfor = I.Substring(pagestrIndex, closingIndex - pagestrIndex);
					return Convert.ToInt32(thedroidswerelookingfor);
				}
			return 1;
		}

		static WebResponse GetPageResponse(string repoOwner, string repoName, string authToken, int pageNumber)
		{
			HttpWebRequest httpWebRequest = (HttpWebRequest)WebRequest.Create(String.Format("https://api.github.com/repos/{0}/{1}/contributors?per_page=100&page={2}", repoOwner, repoName, pageNumber));
			httpWebRequest.Method = WebRequestMethods.Http.Get;
			httpWebRequest.Accept = "application/json";
			httpWebRequest.UserAgent = "tgstation-13-credits-tool";
			if (authToken != null)
				httpWebRequest.Headers.Add(String.Format("Authorization: token {0}", authToken));
			return httpWebRequest.GetResponse();
		}
	}
}


code:
#!/bin/bash

#If you hit github's rate limit, add a 3rd parameter here that is a github personal access token
./CreditsTool tgstation tgstation

rm ../../icons/credits.dmi

for filename in credit_pngs/*.png; do
	realname=$(basename "$filename")
	java -jar ../dmitool/dmitool.jar import ../../icons/credits.dmi "${realname%.*}" "$filename"
done

rm -rf credit_pngs


code:
# To make your name something other than your github name type it in the format "<github name> <credited name>
# e.g.
# Cyberboss Jordan Brown
# To suppress your name from appearing in the credits do "<github name> __REMOVE__
# e.g.
# Cyberboss __REMOVE__

tgstation-server Thanks for playing!

optimumtact oranges
qustinnus Floyd / Qustinnus
catalystfd __REMOVE__
TheVekter Vekter
ChangelingRain Joan
NewSta1 NewSta
theOperand Miauw
PraiseRatvar Frozenguy5
FuryMcFlurry Fury McFlurry
vuonojenmustaturska Naksu
praisenarsie Frozenguy5
MrDoomBringer Mr. DoomBringer
Fikou Dr. Fikou
TiviPlus Tivi Plus
tralezab Trale Zab
Iamgoofball goofball
Tharcoonvagh Tharcoon
Rectification itseasytosee
ATHATH ATH1909
trollbreeder troll breeder
BuffEngineering Buff Engineering


code:
@call "%~dp0\..\bootstrap\python" -m HitboxExpander %*
@pause


code:
Usage: tools/bootstrap/python -m HitboxExpander <path_to_file.dmi or png>

This tool expands the hitbox of the given image by 1 pixel.
Works by changing some of the fully-transparent pixels to alpha=1 black pixels.
Naked human eye usually cannot notice the difference.

No space carps or corgis have been used or injured in the production of this tool.


code:
import os
import sys
import inspect
import shutil
import PIL.Image as Image

current_dir = os.path.split(inspect.getfile(inspect.currentframe()))[0]

def PngSave(im, file):
  # From http://blog.client9.com/2007/08/28/python-pil-and-png-metadata-take-2.html

  # these can be automatically added to Image.info dict
  # they are not user-added metadata
  reserved = ('interlace', 'gamma', 'dpi', 'transparency', 'aspect')

  # undocumented class
  import PIL.PngImagePlugin as PngImagePlugin
  meta = PngImagePlugin.PngInfo()

  # copy metadata into new object
  for k,v in im.info.items():
      if k in reserved: continue
      meta.add_text(k, str(v), 0)

  # and save
  im.save(file, "PNG", pnginfo=meta)

def ProcessFile(path):
  name, ext = os.path.splitext(path)
  ext = ext.lower()
  if (ext != ".dmi" and ext != ".png") or os.path.splitext(name)[1] == ".new":
    return

  try:
    im = Image.open(path)
    print(name + ": " + im.format, im.size, im.mode)
    if im.mode != "RGBA":
      return
    width, height = im.size
    pix = im.load()

    n_transparent = 0

    make_opaque = []

    def add(x, y):
      if pix[x, y][3] == 0:
        make_opaque.append((x, y))

    for x in range(0, width):
      for y in range(0, height):
        if pix[x, y][3] > 0:
          if x > 0:
            add(x - 1, y)
          if x < width - 1:
            add(x + 1, y)
          if y > 0:
            add(x, y - 1)
          if y < height - 1:
            add(x, y + 1)
        else:
          n_transparent += 1

    for coords in make_opaque:
      pix[coords] = (0, 0, 0, 1)

    PngSave(im, path)
  except Exception as e:
    print("Could not process " + name)
    print(e)

root_dir = os.path.abspath(os.path.join(current_dir, "../../"))
icons_dir = os.path.join(root_dir, "icons")

def Main():
  if len(sys.argv) != 2:
    if os.name == 'nt':
      print("Usage: drag-and-drop a .dmi onto `Hitbox Expander.bat`\n  or")
    with open(os.path.join(current_dir, "README.txt")) as f:
      print(f.read())
    return 0

  try:
    with open(sys.argv[1]):
      ProcessFile(os.path.abspath(sys.argv[1]))
      return 0
  except IOError:
    pass

  for root, subdirs, files in os.walk(icons_dir):
    for file in files:
      if file == sys.argv[1]:
        path = os.path.join(root, file)
        ProcessFile(path)
        return 0

  print("File not found: " + sys.argv[1])

if __name__ == "__main__":
  Main()


code:
#!/bin/sh
set -e
exec "$(dirname "$0")/../bootstrap/python" -m HitboxExpander "$@"


code:
//Misc Medal hub IDs
#define MEDAL_METEOR 			"Your Life Before Your Eyes"
#define MEDAL_PULSE 			"Jackpot"
#define MEDAL_TIMEWASTE 		"Overextended The Joke"
#define MEDAL_RODSUPLEX 		"Feat of Strength"
#define MEDAL_CLOWNCARKING 		"Round and Full"
#define MEDAL_THANKSALOT 		"The Best Driver"
#define MEDAL_HELBITALJANKEN	"Hel-bent on Winning"
#define MEDAL_MATERIALCRAFT 	"Getting an Upgrade"

//Boss medals

// Medal hub IDs for boss medals (Pre-fixes)
#define BOSS_MEDAL_ANY		  "Boss Killer"
#define BOSS_MEDAL_MINER	  "Blood-drunk Miner Killer"
#define BOSS_MEDAL_BUBBLEGUM  "Bubblegum Killer"
#define BOSS_MEDAL_COLOSSUS	  "Colossus Killer"
#define BOSS_MEDAL_DRAKE	  "Drake Killer"
#define BOSS_MEDAL_HIEROPHANT "Hierophant Killer"
#define BOSS_MEDAL_LEGION	  "Legion Killer"
#define BOSS_MEDAL_TENDRIL	  "Tendril Exterminator"
#define BOSS_MEDAL_SWARMERS   "Swarmer Beacon Killer"

#define BOSS_MEDAL_MINER_CRUSHER	  	"Blood-drunk Miner Crusher"
#define BOSS_MEDAL_BUBBLEGUM_CRUSHER  	"Bubblegum Crusher"
#define BOSS_MEDAL_COLOSSUS_CRUSHER	  	"Colossus Crusher"
#define BOSS_MEDAL_DRAKE_CRUSHER	  	"Drake Crusher"
#define BOSS_MEDAL_HIEROPHANT_CRUSHER 	"Hierophant Crusher"
#define BOSS_MEDAL_LEGION_CRUSHER	 	"Legion Crusher"
#define BOSS_MEDAL_SWARMERS_CRUSHER		"Swarmer Beacon Crusher"

// Medal hub IDs for boss-kill scores
#define BOSS_SCORE 	         "Bosses Killed"
#define MINER_SCORE 		 "BDMs Killed"
#define BUBBLEGUM_SCORE 	 "Bubblegum Killed"
#define COLOSSUS_SCORE 	     "Colossus Killed"
#define DRAKE_SCORE 	     "Drakes Killed"
#define HIEROPHANT_SCORE 	 "Hierophants Killed"
#define LEGION_SCORE 	     "Legion Killed"
#define SWARMER_BEACON_SCORE "Swarmer Beacs Killed"
#define TENDRIL_CLEAR_SCORE	 "Tendrils Killed"

//Migration script generation
//Replace hub information and fire to generate hub_migration.sql script to use.
/mob/verb/generate_migration_script()
	set name = "Generate Hub Migration Script"

	var/hub_address = "REPLACEME"
	var/hub_password = "REPLACEME"

	var/list/valid_medals = list(
						MEDAL_METEOR,
						MEDAL_PULSE,
						MEDAL_TIMEWASTE,
						MEDAL_RODSUPLEX,
						MEDAL_CLOWNCARKING,
						MEDAL_THANKSALOT,
						MEDAL_HELBITALJANKEN,
						MEDAL_MATERIALCRAFT,
						BOSS_MEDAL_ANY,
						BOSS_MEDAL_MINER,
						BOSS_MEDAL_BUBBLEGUM,
						BOSS_MEDAL_COLOSSUS,
						BOSS_MEDAL_DRAKE,
						BOSS_MEDAL_HIEROPHANT,
						BOSS_MEDAL_LEGION,
						BOSS_MEDAL_TENDRIL,
						BOSS_MEDAL_SWARMERS,
						BOSS_MEDAL_MINER_CRUSHER,
						BOSS_MEDAL_BUBBLEGUM_CRUSHER,
						BOSS_MEDAL_COLOSSUS_CRUSHER,
						BOSS_MEDAL_DRAKE_CRUSHER,
						BOSS_MEDAL_HIEROPHANT_CRUSHER,
						BOSS_MEDAL_LEGION_CRUSHER,
						BOSS_MEDAL_SWARMERS_CRUSHER)

	var/list/valid_scores = list(
						BOSS_SCORE,
						MINER_SCORE,
						BUBBLEGUM_SCORE,
						COLOSSUS_SCORE,
						DRAKE_SCORE,
						HIEROPHANT_SCORE,
						LEGION_SCORE,
						SWARMER_BEACON_SCORE,
						TENDRIL_CLEAR_SCORE)

	var/ach = "achievements" //IMPORTANT : ADD PREFIX HERE IF YOU'RE USING PREFIXED SCHEMA

	var/outfile = file("hub_migration.sql")
	fdel(outfile)
	outfile << "BEGIN;"

	var/perpage = 100
	var/requested_page = 1
	var/hub_url = replacetext(hub_address,".","/")
	var/list/medal_data = list()
	var/regex/datepart_regex = regex(@"[/\s]")
	while(1)
		world << "Fetching page [requested_page]"
		var/list/result = world.Export("http://www.byond.com/games/[hub_url]?format=text&command=view_medals&per_page=[perpage]&page=[requested_page]")
		if(!result)
			return
		var/data = file2text(result["CONTENT"])
		var/regex/page_info = regex(@"page = (\d*)")
		page_info.Find(data)
		var/recieved_page = text2num(page_info.group[1])
		if(recieved_page != requested_page) //out of entries
			break
		else
			requested_page++
		var/regex/R = regex(@'medal/\d+[\s\n]*key = "(.*)"[\s\n]*name = "(.*)"[\s\n]*desc = ".*"[\s\n]*icon = ".*"[\s\n]*earned = "(.*)"',"gm")
		while(R.Find(data))
			var/key = ckey(R.group[1])
			var/medal = R.group[2]
			var/list/dateparts = splittext(R.group[3],datepart_regex)
			var/list/out_date = list(dateparts[3],dateparts[1],dateparts[2]) // YYYY/MM/DD
			if(!valid_medals.Find(medal))
				continue
			if(!medal_data[key])
				medal_data[key] = list()
			medal_data[key][medal] = out_date.Join("/")

	var/list/giant_list_of_ckeys = params2list(world.GetScores(null,null,hub_address,hub_password))
	world << "Found [giant_list_of_ckeys.len] as upper scores count."

	var/list/scores_data = list()
	for(var/score in valid_scores)
		var/recieved_count = 0
		while(1)
			world << "Fetching [score] scores, offset :[recieved_count] of [score]"
			var/list/batch = params2list(world.GetScores(giant_list_of_ckeys.len,recieved_count,score,hub_address,hub_password))
			world << "Fetched [batch.len] scores for [score]."
			recieved_count += batch.len
			if(!batch.len)
				break
			for(var/value in batch)
				var/key = ckey(value)
				if(!scores_data[key])
					scores_data[key] = list()
				if(isnum(batch[value]))
					world << "NUMBER"
					return
				scores_data[key][score] = batch[value]
			if(batch.len < 1000) //Out of scores anyway
				break

	var/i = 1
	for(var/key in giant_list_of_ckeys)
		world << "Generating entries for [key] [i]/[giant_list_of_ckeys.len]"
		var/keyv = ckey(key) //Checkinf if you don't have any manually entered drop tables; juniors on your hub is good idea.
		var/list/values = list()
		for(var/cheevo in medal_data[keyv])
			values += "('[keyv]','[cheevo]',1, '[medal_data[keyv][cheevo]]')"
		for(var/score in scores_data[keyv])
			values += "('[keyv]','[score]',[scores_data[keyv][score]],now())"
		if(values.len)
			var/list/keyline = list("INSERT INTO [ach](ckey,achievement_key,value,last_updated) VALUES")
			keyline += values.Join(",")
			keyline += ";"
			outfile << keyline.Join()
		i++
	outfile << "END"


code:
// DM Environment file for HubMigrator.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
#define DEBUG
// END_PREFERENCES

// BEGIN_INCLUDE
#include "HubMigrator.dm"
// END_INCLUDE


code:
// BEGIN_INTERNALS
// END_INTERNALS
// BEGIN_FILE_DIR
#define FILE_DIR .
// END_FILE_DIR
// BEGIN_PREFERENCES
// END_PREFERENCES
// BEGIN_INCLUDE
#include "HumanButcherer.dm"
// END_INCLUDE


code:
/*
	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)

//Actual important code
/client/verb/butcher_humans()
	set name = "Butcher Humans"
	set desc = "Cut them up nice."
	set category = "Butcher"

	var/inputfile = input(usr, "Select an icon to butcher. Cancel for default icon.", "Slaughterhouse", null) as file|null
	if(isnull(inputfile))
		return

	var/icon/human
	if(isnull(inputfile))
		human = icon('icons/Human.dmi')
	else
		human = icon(inputfile)
	//All body zones tg has
	var/static/list/all_bodyzones = list("head", "chest", "r_arm", "l_arm", "r_leg", "l_leg")

	var/icon/scissors = icon('icons/Scissors.dmi')
	var/list/scissors_states = icon_states(scissors)

	var/icon/output = new()

	//For each original icon
	var/list/icon_states = icon_states(human)
	for(var/icon_state in icon_states)
		//We don't care about digitards
		//If digitard located, move on
		if(findtext(icon_state, "digitigrade"))
			output.Insert(icon(human, icon_state), icon_state)
			continue
		var/genderless_state = icon_state
		if(findtext(genderless_state, "_m", -2) || findtext(genderless_state, "_f", -2))
			genderless_state = copytext(genderless_state, 1, -2)
		usr << "gendered icon: [icon_state]"
		usr << "ungendered icon: [genderless_state]"

		var/unparsed_body_zone
		var/current_body_zone
		for(var/zone in all_bodyzones)
			if(findtext(genderless_state, zone))
				current_body_zone = zone
				break
		if(!current_body_zone)
			usr << "Unable to find associated body zone for [icon_state]"
		else
			usr << "current body zone: [current_body_zone]"
			var/after_zone = copytext(genderless_state, findtext(genderless_state, current_body_zone))
			unparsed_body_zone = "[current_body_zone][after_zone]"
			usr << "unparsed body zone: [unparsed_body_zone]"

		//Skip this body zone if there is no associated cookie cutter sprite -
		//Literally just throw the original in
		if(!current_body_zone || !(current_body_zone in scissors_states))
			output.Insert(icon(human, icon_state), icon_state)
			continue

		var/zoneless_state = copytext(icon_state, 1, findtext(icon_state, current_body_zone))
		usr << "zoneless state: [zoneless_state]"
		//For each piece we're going to cut
		for(var/cutterstate in scissors_states)
			//Skip if necessary
			if((findtext(cutterstate, "r_foot") || findtext(cutterstate, "r_leg")) && !findtext(genderless_state, "r_leg"))
				continue
			if((findtext(cutterstate, "l_foot") || findtext(cutterstate, "l_leg")) && !findtext(genderless_state, "l_leg"))
				continue
			if((findtext(cutterstate, "groin") || findtext(cutterstate, "chest")) && !findtext(genderless_state, "chest"))
				continue
			var/found_state = FALSE
			var/list/check_redundacy = list("r_hand", "l_hand", "r_foot", "l_foot")
			if(cutterstate in check_redundacy)
				for(var/this_icon_state in icon_states)
					if(findtext(this_icon_state, cutterstate))
						found_state = TRUE
						break
			if(found_state)
				continue

			//The fully assembled icon to cut
			var/icon/tobecut = icon(human, icon_state)

			//Our cookie cutter sprite
			var/icon/cutter = icon(scissors, cutterstate)

			//We have to make these all black to cut with
			cutter.Blend(rgb(0,0,0),ICON_MULTIPLY)

			//Blend with AND to cut
			tobecut.Blend(cutter,ICON_AND) //AND, not ADD

			//Make a useful name
			var/good_name = "[zoneless_state][cutterstate]"
			if(findtext(icon_state, "_m", -2) || findtext(icon_state, "_f", -2))
				good_name += copytext(icon_state, -2)

			//Add to the output with the good name
			output.Insert(tobecut, good_name)
			usr << "current cutter: [cutterstate]"
			usr << "final icon_state: [good_name]"

	//Give the output
	usr << ftp(output, "[inputfile]")


code:
This is a tool for cutting TG humanoid sprites into Septic Shock/Bay bodyparts.
It's basically altered HumanScissors by Arokha/Aronai.
That's it.
- Bob Joga


code:
/* Runtime Condenser by Nodrak
 * Cleaned up and refactored by MrStonedOne
 * This will sum up identical runtimes into one, giving a total of how many times it occured. The first occurance
 * of the runtime will log the source, usr and src, the rest will just add to the total. Infinite loops will
 * also be caught and displayed (if any) above the list of runtimes.
 *
 * How to use:
 * 1) Copy and paste your list of runtimes from Dream Daemon into input.exe
 * 2) Run RuntimeCondenser.exe
 * 3) Open output.txt for a condensed report of the runtimes
 *
 * How to compile:
 * Requires visual c++ compiler 2012 or any linux compiler with c++11 support.
 * Windows:
 *	Normal: cl.exe /EHsc /Ox /Qpar Main.cpp
 *	Debug: cl.exe /EHsc /Zi Main.cpp
 * Linux:
 *	Normal: g++ -O3 -std=c++11 Main.cpp -o rc
 *	Debug: g++ -g -Og -std=c++11 Main.cpp -o rc
 * Any Compile errors most likely indicate lack of c++11 support. Google how to upgrade or nag coderbus for help..
 */

#include <iostream>
#include <fstream>
#include <cstring>
#include <cstdio>
#include <string>
#include <sstream>
#include <unordered_map>
#include <vector>
#include <algorithm>
#include <ctime>

#define PROGRESS_FPS 10
#define PROGRESS_BAR_INNER_WIDTH 50
#define LINEBUFFER (32*1024) //32KiB

using namespace std;

struct runtime {
	string text;
	string proc;
	string source;
	string usr;
	string src;
	string loc;
	unsigned int count;
};
struct harddel {
	string type;
	unsigned int count;
};
//What we use to read input
string * lastLine = new string();
string * currentLine = new string();
string * nextLine = new string();

//Stores lines we want to keep to print out
unordered_map<string,runtime> storedRuntime;
unordered_map<string,runtime> storedInfiniteLoop;
unordered_map<string,harddel> storedHardDel;

//Stat tracking stuff for output
unsigned int totalRuntimes = 0;
unsigned int totalInfiniteLoops = 0;
unsigned int totalHardDels = 0;

bool endofbuffer = false;
//like substr, but returns an empty string if the string is smaller then start, rather then an exception.
inline string safe_substr(string * S, size_t start = 0, size_t end = string::npos) {
	if (start > S->length())
		start = S->length();
	return S->substr(start, end);
}
//get_line() is slow as fucking balls. this is quicker because we prefill a buffer rather then read 1 byte at a time searching for newlines, lowering on i/o calls and overhead. (110MB/s vs 40MB/s on a 1.8GB file pre-filled into the disk cache)
//if i wanted to make it even faster, I'd use a reading thread, a new line searching thread, another thread or four for searching for runtimes in the list to see if they are unique, and finally the main thread for displaying the progress bar. but fuck that noise.
inline string * readline(FILE * f) {
	static char buf[LINEBUFFER];
	static size_t pos = 0;
	static size_t size = 0;

	for (size_t i = pos; i < LINEBUFFER; i++) {
		char c = buf[i];
		if (i >= size && (pos || i < LINEBUFFER-1)) {
			if (feof(f) || ferror(f))
				break;
			if (size && pos) { //move current stuff to start of buffer
				size -= pos;
				i -= pos;
				memmove(buf, &buf[pos], size);
			}
			//fill remaining buffer
			size += fread(&buf[i], 1, LINEBUFFER-size-1, f);
			pos = 0;
			c = buf[i];
		}
		if (c == '\n') {
			//trim off any newlines from the start
			while (i > pos && (buf[pos] == '\r' || buf[pos] == '\n'))
				pos++;
			string * s = new string(&buf[pos], i-pos);
			pos = i+1;
			return s;
		}

	}
	string * s = new string(&buf[pos], size-pos);
	pos = 0;
	size = 0;
	endofbuffer = true;
	return s;
}

inline void forward_progress(FILE * inputFile) {
	delete(lastLine);
	lastLine = currentLine;
	currentLine	= nextLine;
	do {
		nextLine = readline(inputFile);
		//strip out rustg continuing line markers
		if (safe_substr(nextLine, 0, 3) == " - ") {
			nextLine->erase(0, 3);
		}

		//strip out any timestamps.
		if (nextLine->length() >= 10) {
			if ((*nextLine)[0] == '[' && (*nextLine)[3] == ':' && (*nextLine)[6] == ':' && (*nextLine)[9] == ']')
				nextLine->erase(0, 10);
			else if (nextLine->length() >= 26 && ((*nextLine)[0] == '[' && (*nextLine)[5] == '-' && (*nextLine)[14] == ':' && (*nextLine)[20] == '.' && (*nextLine)[24] == ']'))
				nextLine->erase(0, 26);
		}
	} while (!endofbuffer && nextLine->length() < 1);

}
//deallocates to, copys from to to.
inline void string_send(string * &from, string * &to) {
	delete(to);
	to = new string(*from);
}
inline void printprogressbar(unsigned short progress /*as percent*/) {
	double const modifer = 100.0L/(double)PROGRESS_BAR_INNER_WIDTH;
	size_t bars = (double)progress/modifer;
	cerr << "\r[" << string(bars, '=') << ((progress < 100) ? ">" : "") << string(PROGRESS_BAR_INNER_WIDTH-(bars+((progress < 100) ? 1 : 0)), ' ') << "] " << progress << "%";
	cerr.flush();
}

bool readFromFile(bool isstdin) {
	//Open file to read
	FILE * inputFile = stdin;
	if (!isstdin)
		inputFile = fopen("Input.txt", "r");

	if (ferror(inputFile))
		return false;
	long long fileLength = 0;
	clock_t nextupdate = 0;
	if (!isstdin) {
		fseek(inputFile, 0, SEEK_END);
		fileLength = ftell(inputFile);
		fseek(inputFile, 0, SEEK_SET);
		nextupdate = clock();
	}

	if (feof(inputFile))
		return false; //empty file
	do {
		//Update our lines
		forward_progress(inputFile);
		//progress bar

		if (!isstdin && clock() >= nextupdate) {
			int dProgress = (int)(((long double)ftell(inputFile) / (long double)fileLength) * 100.0L);
			printprogressbar(dProgress);
			nextupdate = clock() + (CLOCKS_PER_SEC/PROGRESS_FPS);
		}
		//Found a runtime!
		if (safe_substr(currentLine, 0, 14) == "runtime error:") {
			if (currentLine->length() <= 17) { //empty runtime, check next line.
				//runtime is on the line before this one. (byond bug)
				if (nextLine->length() < 2) {
					string_send(lastLine, nextLine);
				}
				forward_progress(inputFile);
				string * tmp = new string("runtime error: " + *currentLine);
				string_send(tmp, currentLine);
				delete(tmp);
			}
			//we assign this to the right container in a moment.
			unordered_map<string,runtime> * storage_container;

			//runtime is actually an infinite loop
			if (safe_substr(currentLine, 15, 23) == "Infinite loop suspected" || safe_substr(currentLine, 15, 31) == "Maximum recursion level reached") {
				//use our infinite loop container.
				storage_container = &storedInfiniteLoop;
				totalInfiniteLoops++;
				// skip the line about world.loop_checks
				forward_progress(inputFile);
				string_send(lastLine, currentLine);
			} else {
				//use the runtime container
				storage_container = &storedRuntime;
				totalRuntimes++;
			}

			string key = *currentLine;
			bool procfound = false; //so other things don't have to bother checking for this again.
			if (safe_substr(nextLine, 0, 10) == "proc name:") {
				key += *nextLine;
				procfound = true;
			}

			//(get the address of a runtime from (a pointer to a container of runtimes)) to then store in a pointer to a runtime.
			//(and who said pointers were hard.)
			runtime* R = &((*storage_container)[key]);

			//new
			if (R->text != *currentLine) {
				R->text = *currentLine;
				if (procfound) {
					R->proc = *nextLine;
					forward_progress(inputFile);
				}
				R->count = 1;

				//search for source file info
				if (safe_substr(nextLine, 2, 12) == "source file:") {
					R->source = *nextLine;
					//skip again
					forward_progress(inputFile);
				}
				//If we find this, we have new stuff to store
				if (safe_substr(nextLine, 2, 4) == "usr:") {
					forward_progress(inputFile);
					forward_progress(inputFile);
					//Store more info
					R->usr = *lastLine;
					R->src = *currentLine;
					if (safe_substr(nextLine, 2, 8) == "src.loc:") {
						R->loc = *nextLine;
						forward_progress(inputFile);
					}
				}

			} else { //existed already
				R->count++;
				if (procfound)
					forward_progress(inputFile);
			}

		} else if (safe_substr(currentLine, 0, 7) == "Path : ") {
			string deltype = safe_substr(currentLine, 7);
			if (deltype.substr(deltype.size()-1,1) == " ") //some times they have a single trailing space.
				deltype = deltype.substr(0, deltype.size()-1);

			unsigned int failures = strtoul(safe_substr(nextLine, 11).c_str(), NULL, 10);
			if (failures <= 0)
				continue;

			totalHardDels += failures;
			harddel* D = &storedHardDel[deltype];
			if (D->type != deltype) {
				D->type = deltype;
				D->count = failures;
			} else {
				D->count += failures;
			}
		}
	} while (!feof(inputFile) || !endofbuffer); //Until end of file
	if (!isstdin)
		printprogressbar(100);
	cerr << endl;
	return true;
}

bool runtimeComp(const runtime &a, const runtime &b) {
    return a.count > b.count;
}

bool hardDelComp(const harddel &a, const harddel &b) {
    return a.count > b.count;
}

bool writeToFile(bool usestdio) {
	//Open and clear the file
	ostream * output = &cout;
	ofstream * outputFile;
	if (!usestdio)
		output = outputFile = new ofstream("Output.txt", ios::trunc);

	if(usestdio || outputFile->is_open()) {
		*output << "Note: The source file, src and usr are all from the FIRST of the identical runtimes. Everything else is cropped.\n\n";
		if(storedInfiniteLoop.size() > 0)
			*output << "Total unique infinite loops: " << storedInfiniteLoop.size() << endl;

		if(totalInfiniteLoops > 0)
			*output << "Total infinite loops: " << totalInfiniteLoops << endl << endl;

		*output << "Total unique runtimes: " << storedRuntime.size() << endl;
		*output << "Total runtimes: " << totalRuntimes << endl << endl;
		if(storedHardDel.size() > 0)
			*output << "Total unique hard deletions: " << storedHardDel.size() << endl;

		if(totalHardDels > 0)
			*output << "Total hard deletions: " << totalHardDels << endl << endl;

		//If we have infinite loops, display them first.
		if(storedInfiniteLoop.size() > 0) {
			vector<runtime> infiniteLoops;
			infiniteLoops.reserve(storedInfiniteLoop.size());
			for (unordered_map<string,runtime>::iterator it=storedInfiniteLoop.begin(); it != storedInfiniteLoop.end(); it++)
				infiniteLoops.push_back(it->second);
			storedInfiniteLoop.clear();
			sort(infiniteLoops.begin(), infiniteLoops.end(), runtimeComp);
			*output << "** Infinite loops **";
			for (int i=0; i < infiniteLoops.size(); i++) {
				runtime* R = &infiniteLoops[i];
				*output << endl << endl << "The following infinite loop has occurred " << R->count << " time(s).\n";
				*output << R->text << endl;
				if(R->proc.length())
					*output << R->proc << endl;
				if(R->source.length())
					*output << R->source << endl;
				if(R->usr.length())
					*output << R->usr << endl;
				if(R->src.length())
					*output << R->src << endl;
				if(R->loc.length())
					*output << R->loc << endl;
			}
			*output << endl << endl; //For spacing
		}

		//Do runtimes next
		*output << "** Runtimes **";
		vector<runtime> runtimes;
		runtimes.reserve(storedRuntime.size());
		for (unordered_map<string,runtime>::iterator it=storedRuntime.begin(); it != storedRuntime.end(); it++)
			runtimes.push_back(it->second);
		storedRuntime.clear();
		sort(runtimes.begin(), runtimes.end(), runtimeComp);
		for (int i=0; i < runtimes.size(); i++) {
			runtime* R = &runtimes[i];
			*output << endl << endl << "The following runtime has occurred " << R->count << " time(s).\n";
			*output << R->text << endl;
			if(R->proc.length())
				*output << R->proc << endl;
			if(R->source.length())
				*output << R->source << endl;
			if(R->usr.length())
				*output << R->usr << endl;
			if(R->src.length())
				*output << R->src << endl;
			if(R->loc.length())
				*output << R->loc << endl;
		}
		*output << endl << endl; //For spacing

		//and finally, hard deletes
		if(totalHardDels > 0) {
			*output << endl << "** Hard deletions **";
			vector<harddel> hardDels;
			hardDels.reserve(storedHardDel.size());
			for (unordered_map<string,harddel>::iterator it=storedHardDel.begin(); it != storedHardDel.end(); it++)
				hardDels.push_back(it->second);
			storedHardDel.clear();
			sort(hardDels.begin(), hardDels.end(), hardDelComp);
			for(int i=0; i < hardDels.size(); i++) {
				harddel* D = &hardDels[i];
				*output << endl << D->type << " - " << D->count << " time(s).\n";
			}
		}
		if (!usestdio) {
			outputFile->close();
			delete outputFile;
		}
	} else {
		return false;
	}
	return true;
}

int main(int argc, const char * argv[]) {
	ios_base::sync_with_stdio(false);
	ios::sync_with_stdio(false);
	bool usestdio = false;
	if (argc >= 2 && !strcmp(argv[1], "-s"))
		usestdio = true;

	char exit; //Used to stop the program from immediately exiting
	cerr << "Reading input.\n";
	if(readFromFile(usestdio)) {
		cerr << "Input read successfully!\n";
	} else {
		cerr << "Input failed to open, shutting down.\n";
		if (!usestdio) {
			cerr << "\nEnter any letter to quit.\n";
			exit = cin.get();
		}
		return 1;
	}

	cerr << "Writing output.\n";
	if(writeToFile(usestdio)) {
		cerr << "Output was successful!\n";
		if (!usestdio) {
			cerr << "\nEnter any letter to quit.\n";
			exit = cin.get();
		}
		return 0;
	} else {
		cerr << "The output file could not be opened, shutting down.\n";
		if (!usestdio) {
			cerr << "\nEnter any letter to quit.\n";
			exit = cin.get();
		}
		return 1;
	}

	return 0;
}

path: tools/Runtime Condenser/Main.cpp


code:
$Path = '..\..\data\logs\' #Server directory up to the year folder, this can be a relative or absolute path; remember the trailing \
$StringToMatch = 'SQL:'
$From = 'admin@server.com'
[string[]]$To = 'email@address.com', 'a_different@address.org' #Email will be sent to each address listed here, you can have as many as you want
$Subject = 'SS13 server SQL error'
$Body = 'A SQL error was found in the following files:' #This parameter is optional, set it as '' if you want it gone
#SMTP server details; If you don't have one you can use the defaults provided here for Gmail's, provided you have a Google account
$SMTPServer = 'smtp.gmail.com'
$SMTPPort = '587'
$Account = "username" #SMTP server account name, excluding the domain address (this part: @domain.com)
$Password = 'password' #SMTP server password, if you're using Gmail's and have 2-factor authentication you'll have to use an App Password (Google for how)


code:
<#
This is a script designed to parse through your server logs and locate any SQL errors reported.
If found an email is sent to addresses specified in the configuration file: email_config.ps1.
A SMTP server is required, if you don't have one the defaults for Gmail's can be used.

Suggested use is to schedule this task to be executed daily at server-time midnight so all the day's logs are checked.
You will likely find it helpful to set the configuration file to be untracked by git.
#>
. .\email_config.ps1
$Date = Get-Date -format "yyyy\\MM\\dd"
$Matches = Get-ChildItem "$Path$Date" -recurse -include *.log | Select-String "$StringToMatch" -List | Select Path, Line

$email = New-Object System.Net.Mail.MailMessage
$email.From = $From
foreach($i in $To) {$email.To.Add($i)}
$email.Subject = $Subject
$MatchList = foreach($m in $Matches) {"`t$m`n"}
$email.Body = $Body+"`n"+$MatchList

$smtp = New-Object System.Net.Mail.SmtpClient($SMTPServer, $SMTPPort);
$smtp.Credentials = New-Object System.Net.NetworkCredential($Account, $Password);
$smtp.EnableSSL = $true
$smtp.Send($email);


code:
#define A_BIG_NUMBER			9999999
#define STATE_COUNT_NORMAL		4
#define STATE_COUNT_DIAGONAL	7

/mob/verb/ChooseDMI(dmi as file)
	var/dmifile = file(dmi)
	if(isfile(dmifile) && (copytext("[dmifile]",-4) == ".dmi"))
		SliceNDice(dmifile)
	else
		world << "\red Bad DMI file '[dmifile]'"

/proc/SliceNDice(dmifile as file)
	var/icon/sourceIcon = icon(dmifile)
	var/list/states = sourceIcon.IconStates()
	world << "<B>[dmifile] - states: [states.len]</B>"

	switch(states.len)
		if(0 to (STATE_COUNT_NORMAL - 1))
			var/cont = alert(usr, "Too few states: [states.len],  expected [STATE_COUNT_NORMAL] (Non-Diagonal) or [STATE_COUNT_DIAGONAL] (Diagonal), Continue?", "Unexpected Amount of States", "Yes", "No")
			if(cont == "No")
				return
		if(STATE_COUNT_NORMAL)
			world << "4 States, running in Non-Diagonal mode"
		if(STATE_COUNT_DIAGONAL)
			world << "5 States, running in Diagonal mode"
		if((STATE_COUNT_DIAGONAL + 1) to A_BIG_NUMBER)
			var/cont = alert(usr, "Too many states: [states.len],  expected [STATE_COUNT_NORMAL] (Non-Diagonal) or [STATE_COUNT_DIAGONAL] (Diagonal), Continue?", "Unexpected Amount of States", "Yes", "No")
			if(cont == "No")
				return

	var/icon/outputIcon = new /icon()

	var/filename = "[copytext("[dmifile]", 1, -4)]-smooth.dmi"
	fdel(filename) //force refresh

	for(var/state in states)
		var/statename = lowertext(state)
		outputIcon = icon(filename) //open the icon again each iteration, to work around byond memory limits

		switch(statename)
			if("box")
				var/icon/box = icon(sourceIcon, state)

				var/icon/corner1i = icon(box)
				corner1i.DrawBox(null, 1, 1, 32, 16)
				corner1i.DrawBox(null, 17, 1, 32, 32)
				outputIcon.Insert(corner1i, "1-i")

				var/icon/corner2i = icon(box)
				corner2i.DrawBox(null, 1, 1, 16, 32)
				corner2i.DrawBox(null, 17, 1, 32, 16)
				outputIcon.Insert(corner2i, "2-i")

				var/icon/corner3i = icon(box)
				corner3i.DrawBox(null, 1, 32, 32, 17)
				corner3i.DrawBox(null, 17, 32, 32, 1)
				outputIcon.Insert(corner3i, "3-i")

				var/icon/corner4i = icon(box)
				corner4i.DrawBox(null, 1, 1, 16, 32)
				corner4i.DrawBox(null, 17, 17, 32, 32)
				outputIcon.Insert(corner4i, "4-i")

				world << "Box: \icon[box] -> \icon[corner1i] \icon[corner2i] \icon[corner3i] \icon[corner4i]"

			if("line")
				var/icon/line = icon(sourceIcon, state)

				//Vertical
				var/icon/line1n = icon(line)
				line1n.DrawBox(null, 1, 1, 32, 16)
				line1n.DrawBox(null, 17, 1, 32, 32)
				outputIcon.Insert(line1n, "1-n")

				var/icon/line2n = icon(line)
				line2n.DrawBox(null, 1, 1, 16, 32)
				line2n.DrawBox(null, 17, 1, 32, 16)
				outputIcon.Insert(line2n, "2-n")

				var/icon/line3s = icon(line)
				line3s.DrawBox(null, 1, 32, 32, 17)
				line3s.DrawBox(null, 17, 32, 32, 1)
				outputIcon.Insert(line3s, "3-s")

				var/icon/line4s = icon(line)
				line4s.DrawBox(null, 1, 1, 16, 32)
				line4s.DrawBox(null, 17, 17, 32, 32)
				outputIcon.Insert(line4s, "4-s")

				//Horizontal
				var/icon/line1w = icon(line3s) //Correct
				line1w.Turn(90)
				outputIcon.Insert(line1w, "1-w")

				var/icon/line2e = icon(line1n)
				line2e.Turn(90)
				outputIcon.Insert(line2e, "2-e")

				var/icon/line3w = icon(line4s)
				line3w.Turn(90)
				outputIcon.Insert(line3w, "3-w")

				var/icon/line4e = icon(line2n)
				line4e.Turn(90)
				outputIcon.Insert(line4e, "4-e")

				world << "Line: \icon[line] -> \icon[line1n] \icon[line2n] \icon[line3s] \icon[line4s] \icon[line1w] \icon[line2e] \icon[line3w] \icon[line4e]"

			if("center_4")
				var/icon/center4 = icon(sourceIcon, state)

				var/icon/corner1nw = icon(center4)
				corner1nw.DrawBox(null, 1, 1, 32, 16)
				corner1nw.DrawBox(null, 17, 1, 32, 32)
				outputIcon.Insert(corner1nw, "1-nw")

				var/icon/corner2ne = icon(center4)
				corner2ne.DrawBox(null, 1, 1, 16, 32)
				corner2ne.DrawBox(null, 17, 1, 32, 16)
				outputIcon.Insert(corner2ne, "2-ne")

				var/icon/corner3sw = icon(center4)
				corner3sw.DrawBox(null, 1, 32, 32, 17)
				corner3sw.DrawBox(null, 17, 32, 32, 1)
				outputIcon.Insert(corner3sw, "3-sw")

				var/icon/corner4se = icon(center4)
				corner4se.DrawBox(null, 1, 1, 16, 32)
				corner4se.DrawBox(null, 17, 17, 32, 32)
				outputIcon.Insert(corner4se, "4-se")

				world << "Center4: \icon[center4] -> \icon[corner1nw] \icon[corner2ne] \icon[corner3sw] \icon[corner4se]"

			if("center_8")
				var/icon/center8 = icon(sourceIcon, state)

				var/icon/corner1f = icon(center8)
				corner1f.DrawBox(null, 1, 1, 32, 16)
				corner1f.DrawBox(null, 17, 1, 32, 32)
				outputIcon.Insert(corner1f, "1-f")

				var/icon/corner2f = icon(center8)
				corner2f.DrawBox(null, 1, 1, 16, 32)
				corner2f.DrawBox(null, 17, 1, 32, 16)
				outputIcon.Insert(corner2f, "2-f")

				var/icon/corner3f = icon(center8)
				corner3f.DrawBox(null, 1, 32, 32, 17)
				corner3f.DrawBox(null, 17, 32, 32, 1)
				outputIcon.Insert(corner3f, "3-f")

				var/icon/corner4f = icon(center8)
				corner4f.DrawBox(null, 1, 1, 16, 32)
				corner4f.DrawBox(null, 17, 17, 32, 32)
				outputIcon.Insert(corner4f, "4-f")

				world << "Center8: \icon[center8] -> \icon[corner1f] \icon[corner2f] \icon[corner3f] \icon[corner4f]"

			if("diag")
				var/icon/diag = icon(sourceIcon, state)

				var/icon/diagse = icon(diag) //No work
				outputIcon.Insert(diagse, "d-se")

				var/icon/diagsw = icon(diag)
				diagsw.Turn(90)
				outputIcon.Insert(diagsw, "d-sw")

				var/icon/diagne = icon(diag)
				diagne.Turn(-90)
				outputIcon.Insert(diagne, "d-ne")

				var/icon/diagnw = icon(diag)
				diagnw.Turn(180)
				outputIcon.Insert(diagnw, "d-nw")

				world << "Diag: \icon[diag] -> \icon[diagse] \icon[diagsw] \icon[diagne] \icon[diagnw]"

			if("diag_corner_a")
				var/icon/diag_corner_a = icon(sourceIcon, state)

				var/icon/diagse0 = icon(diag_corner_a) //No work
				outputIcon.Insert(diagse0, "d-se-0")

				var/icon/diagsw0 = icon(diag_corner_a)
				diagsw0.Turn(90)
				outputIcon.Insert(diagsw0, "d-sw-0")

				var/icon/diagne0 = icon(diag_corner_a)
				diagne0.Turn(-90)
				outputIcon.Insert(diagne0, "d-ne-0")

				var/icon/diagnw0 = icon(diag_corner_a)
				diagnw0.Turn(180)
				outputIcon.Insert(diagnw0, "d-nw-0")

				world << "Diag_Corner_A: \icon[diag_corner_a] -> \icon[diagse0] \icon[diagsw0] \icon[diagne0] \icon[diagnw0]"

			if("diag_corner_b")
				var/icon/diag_corner_b = icon(sourceIcon, state)

				var/icon/diagse1 = icon(diag_corner_b) //No work
				outputIcon.Insert(diagse1, "d-se-0")

				var/icon/diagsw1 = icon(diag_corner_b)
				diagsw1.Turn(90)
				outputIcon.Insert(diagsw1, "d-sw-0")

				var/icon/diagne1 = icon(diag_corner_b)
				diagne1.Turn(-90)
				outputIcon.Insert(diagne1, "d-ne-0")

				var/icon/diagnw1 = icon(diag_corner_b)
				diagnw1.Turn(180)
				outputIcon.Insert(diagnw1, "d-nw-0")

				world << "Diag_Corner_B: \icon[diag_corner_b] -> \icon[diagse1] \icon[diagsw1] \icon[diagne1] \icon[diagnw1]"

		fcopy(outputIcon, filename)	//Update output icon each iteration
	world << "Finished [filename]!"


code:
// DM Environment file for SS13SmoothingCutter.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
#define DEBUG
// END_PREFERENCES

// BEGIN_INCLUDE
#include "Cutter.dm"
// END_INCLUDE


code:
// BEGIN_INTERNALS
// END_INTERNALS
// BEGIN_FILE_DIR
#define FILE_DIR .
// END_FILE_DIR
// BEGIN_PREFERENCES
// END_PREFERENCES
// BEGIN_INCLUDE
#include "TurfConverter.dm"
// END_INCLUDE


code:
The tool Rohesie made for converting turfs to the new system uses rust.
I decided to make my own system to avoid changing the file from png to dmi and other tedious crap.
- Bob Joga


code:
@echo off
call "%~dp0\..\bootstrap\python" -m UpdatePaths %*
pause

path: tools/UpdatePaths/Update Paths.bat


code:
# A script and syntax for applying path updates to maps.
import re
import os
import sys
import argparse
from mapmerge2 import frontend
from mapmerge2.dmm import *

desc = """
Update dmm files given update file/string.
Replacement syntax example:
    /turf/open/floor/iron/warningline : /obj/effect/turf_decal {dir = @OLD ;tag = @SKIP;icon_state = @SKIP}
    /turf/open/floor/iron/warningline : /obj/effect/turf_decal {@OLD} , /obj/thing {icon_state = @OLD:name; name = "meme"}
    /turf/open/floor/iron/warningline{dir=2} : /obj/thing
New paths properties:
    @OLD - if used as property name copies all modified properties from original path to this one
    property = @SKIP - will not copy this property through when global @OLD is used.
    property = @OLD - will copy this modified property from original object even if global @OLD is not used
    property = @OLD:name - will copy [name] property from original object even if global @OLD is not used
    Anything else is copied as written.
Old paths properties:
    Will be used as a filter.
    property = @UNSET - will apply the rule only if the property is not mapedited
"""

default_map_directory = "../../_maps"
replacement_re = re.compile(r'\s*(?P<path>[^{]*)\s*(\{(?P<props>.*)\})?')

#urgent todo: replace with actual parser, this is slow as janitor in crit
split_re = re.compile(r'((?:[A-Za-z0-9_\-$]+)\s*=\s*(?:"(?:.+?)"|[^";]*)|@OLD)')

def props_to_string(props):
    return "{{{}}}".format(";".join([f"{k} = {v}" for k, v in props.items()]))

def string_to_props(propstring, verbose = False):
    props = dict()
    for raw_prop in re.split(split_re, propstring):
        if not raw_prop or raw_prop.strip() == ';':
            continue
        prop = raw_prop.split('=', maxsplit=1)
        props[prop[0].strip()] = prop[1].strip() if len(prop) > 1 else None
    if verbose:
        print("{0} to {1}".format(propstring, props))
    return props

def parse_rep_string(replacement_string, verbose = False):
    # translates /blah/blah {meme = "test",} into path,prop dictionary tuple
    match = re.match(replacement_re, replacement_string)
    path = match['path']
    props = match['props']
    if props:
        prop_dict = string_to_props(props, verbose)
    else:
        prop_dict = dict()
    return path.strip(), prop_dict

def update_path(dmm_data, replacement_string, verbose=False):
    old_path_part, new_path_part = replacement_string.split(':', maxsplit=1)
    old_path, old_path_props = parse_rep_string(old_path_part, verbose)
    new_paths = list()
    for replacement_def in new_path_part.split(','):
        new_path, new_path_props = parse_rep_string(replacement_def, verbose)
        new_paths.append((new_path, new_path_props))

    subtypes = ""
    if old_path.endswith("/@SUBTYPES"):
        old_path = old_path[:-len("/@SUBTYPES")]
        if verbose:
            print("Looking for subtypes of", old_path)
        subtypes = r"(?:/\w+)*"

    replacement_pattern = re.compile(rf"(?P<path>{re.escape(old_path)}{subtypes})\s*(:?{{(?P<props>.*)}})?$")

    def replace_def(match):
        if match['props']:
            old_props = string_to_props(match['props'], verbose)
        else:
            old_props = dict()
        for filter_prop in old_path_props:
            if filter_prop not in old_props:
                if old_path_props[filter_prop] == "@UNSET":
                    continue
                else:
                    return [match.group(0)]
            else:
                if old_props[filter_prop] != old_path_props[filter_prop] or old_path_props[filter_prop] == "@UNSET":
                    return [match.group(0)] #does not match current filter, skip the change.
        if verbose:
            print("Found match : {0}".format(match.group(0)))
        out_paths = []
        for new_path, new_props in new_paths:
            if new_path == "@OLD":
                out = match.group('path')
            else:
                out = new_path
            out_props = dict()
            for prop_name, prop_value in new_props.items():
                if prop_name == "@OLD":
                    out_props = dict(old_props)
                    continue
                if prop_value == "@SKIP":
                    out_props.pop(prop_name, None)
                    continue
                if prop_value.startswith("@OLD"):
                    params = prop_value.split(":")
                    if prop_name in old_props:
                        out_props[prop_name] = old_props[params[1]] if len(params) > 1 else old_props[prop_name]
                    continue
                out_props[prop_name] = prop_value
            if out_props:
                out += props_to_string(out_props)
            out_paths.append(out)
        if verbose:
            print("Replacing with: {0}".format(out_paths))
        return out_paths

    def get_result(element):
        match = replacement_pattern.match(element)
        if match:
            return replace_def(match)
        else:
            return [element]

    bad_keys = {}
    keys = list(dmm_data.dictionary.keys())
    for definition_key in keys:
        def_value = dmm_data.dictionary[definition_key]
        new_value = tuple(y for x in def_value for y in get_result(x))
        if new_value != def_value:
            dmm_data.overwrite_key(definition_key, new_value, bad_keys)
    dmm_data.reassign_bad_keys(bad_keys)

def update_map(map_filepath, updates, verbose=False):
    print("Updating: {0}".format(map_filepath))
    dmm_data = DMM.from_file(map_filepath)
    for update_string in updates:
        update_path(dmm_data, update_string, verbose)
    dmm_data.to_file(map_filepath)

def update_all_maps(map_directory, updates, verbose=False):
    for root, _, files in os.walk(map_directory):
        for filepath in files:
            if filepath.endswith(".dmm"):
                path = os.path.join(root, filepath)
                update_map(path, updates, verbose)

def main(args):
    if args.inline:
        print("Using replacement:", args.update_source)
        updates = [args.update_source]
    else:
        with open(args.update_source) as f:
            updates = [line for line in f if line and not line.startswith("#") and not line.isspace()]
        print(f"Using {len(updates)} replacements from file:", args.update_source)

    if args.map:
        update_map(args.map, updates, verbose=args.verbose)
    else:
        map_directory = args.directory or frontend.read_settings().map_folder
        update_all_maps(map_directory, updates, verbose=args.verbose)

if __name__ == "__main__":
    prog = __spec__.name.replace('.__main__', '')
    if os.name == 'nt' and len(sys.argv) <= 1:
        print("usage: drag-and-drop a path script .txt onto `Update Paths.bat`\n  or")

    parser = argparse.ArgumentParser(prog=prog, description=desc, formatter_class=argparse.RawTextHelpFormatter)
    parser.add_argument("update_source", help="update file path / line of update notation")
    parser.add_argument("--map", "-m", help="path to update, defaults to all maps in maps directory")
    parser.add_argument("--directory", "-d", help="path to maps directory, defaults to _maps/")
    parser.add_argument("--inline", "-i", help="treat update source as update string instead of path", action="store_true")
    parser.add_argument("--verbose", "-v", help="toggle detailed update information", action="store_true")
    main(parser.parse_args())


code:
/obj/machinery/power/apc/@SUBTYPES{dir = 1} : @OLD{@OLD; pixel_y = 23}
/obj/machinery/power/apc/@SUBTYPES{dir = 2} : @OLD{@OLD; pixel_y = -23}
/obj/machinery/power/apc/@SUBTYPES{dir = 4} : @OLD{@OLD; pixel_x = 24}
/obj/machinery/power/apc/@SUBTYPES{dir = 8} : @OLD{@OLD; pixel_x = -25}


code:
/obj/item/clothing/under/rank/vice : /obj/item/clothing/under/misc/vice_officer
/obj/item/clothing/under/durathread : /obj/item/cloning/under/misc/durathread
/obj/item/clothing/under/burial : /obj/item/clothing/under/misc/burial
/obj/item/clothing/under/overalls : /obj/item/clothing/under/misc/overalls
/obj/item/clothing/under/assistantformal : /obj/item/clothing/under/misc/assistantformal
/obj/item/clothing/under/pj/red : /obj/item/clothing/under/misc/pj
/obj/item/clothing/under/pj/blue : /obj/item/clothing/under/misc/pj/blue
/obj/item/clothing/under/patriotsuit : /obj/item/clothing/under/misc/patriotsuit
/obj/item/clothing/under/rank/mailman : /obj/item/clothing/under/misc/mailman
/obj/item/clothing/under/rank/psyche : /obj/item/clothing/under/misc/psyche
/obj/item/clothing/under/acj : /obj/item/clothing/under/misc/adminsuit

/obj/item/clothing/under/scratch : /obj/item/clothing/under/suit/white_on_white
/obj/item/clothing/under/scratch/skirt : /obj/item/clothing/under/suit/white/skirt
/obj/item/clothing/under/sl_suit : /obj/item/clothing/under/suit/sl
/obj/item/clothing/under/waiter : /obj/item/clothing/under/suit/waiter
/obj/item/clothing/under/suit_jacket : /obj/item/clothing/under/suit/black
/obj/item/clothing/under/suit_jacket/female : /obj/item/clothing/under/suit/black/skirt
/obj/item/clothing/under/suit_jacket/really_black : /obj/item/clothing/under/suit/black_really
/obj/item/clothing/under/suit_jacket/green : /obj/item/clothing/under/suit/green
/obj/item/clothing/under/suit_jacket/red : /obj/item/clothing/under/suit/red
/obj/item/clothing/under/suit_jacket/charcoal : /obj/item/clothing/under/suit/charcoal
/obj/item/clothing/under/suit_jacket/navy : /obj/item/clothing/under/suit/navy
/obj/item/clothing/under/suit_jacket/burgundy : /obj/item/clothing/under/suit/burgundy
/obj/item/clothing/under/suit_jacket/checkered : /obj/item/clothing/under/suit/checkered
/obj/item/clothing/under/suit_jacket/tan : /obj/item/clothing/under/suit/tan
/obj/item/clothing/under/suit_jacket/white : /obj/item/clothing/under/suit/white

/obj/item/clothing/under/skirt/black : /obj/item/clothing/under/dress/skirt
/obj/item/clothing/under/skirt/blue : /obj/item/clothing/under/dress/skirt/blue
/obj/item/clothing/under/skirt/red : /obj/item/clothing/under/dress/skirt/red
/obj/item/clothing/under/skirt/purple : /obj/item/clothing/under/dress/skirt/purple
/obj/item/clothing/under/sundress : /obj/item/clothing/under/dress/sundress
/obj/item/clothing/under/blacktango : /obj/item/clothing/under/dress/blacktango
/obj/item/clothing/under/stripeddress : /obj/item/clothing/under/dress/striped
/obj/item/clothing/under/sailordress : /obj/item/clothing/under/dress/sailor
/obj/item/clothing/under/redeveninggown : /obj/item/clothing/under/dress/redeveninggown
/obj/item/clothing/under/plaid_skirt : /obj/item/clothing/under/dress/skirt/plaid
/obj/item/clothing/under/plaid_skirt/blue : /obj/item/clothing/under/dress/skirt/plaid/blue
/obj/item/clothing/under/plaid_skirt/purple : /obj/item/clothing/under/dress/skirt/plaid/purple
/obj/item/clothing/under/plaid_skirt/green : /obj/item/clothing/under/dress/skirt/plaid/green

/obj/item/clothing/under/roman : /obj/item/clothing/under/costume/roman
/obj/item/clothing/under/jabroni : /obj/item/clothing/under/costume/jabroni
/obj/item/clothing/under/owl : /obj/item/clothing/under/costume/owl
/obj/item/clothing/under/griffin : /obj/item/clothing/under/costume/griffin
/obj/item/clothing/under/schoolgirl : /obj/item/clothing/under/costume/schoolgirl
/obj/item/clothing/under/schoolgirl/red : /obj/item/clothing/under/costume/schoolgirl/red
/obj/item/clothing/under/schoolgirl/green : /obj/item/clothing/under/costume/schoolgirl/green
/obj/item/clothing/under/schoolgirl/orange : /obj/item/clothing/under/costume/schoolgirl/orange
/obj/item/clothing/under/pirate : /obj/item/clothing/under/costume/pirate
/obj/item/clothing/under/soviet : /obj/item/clothing/under/costume/soviet
/obj/item/clothing/under/redcoat : /obj/item/clothing/under/costume/redcoat
/obj/item/clothing/under/kilt : /obj/item/clothing/under/costume/kilt
/obj/item/clothing/under/kilt/highlander : /obj/item/clothing/under/costume/kilt/highlander
/obj/item/clothing/under/gladiator : /obj/item/clothing/under/costume/gladiator
/obj/item/clothing/under/gladiator/ash_walker : /obj/item/clothing/under/costume/gladiator/ash_walker
/obj/item/clothing/under/maid : /obj/item/clothing/under/costume/maid
/obj/item/clothing/under/singery : /obj/item/clothing/under/costume/singer/yellow
/obj/item/clothing/under/singerb : /obj/item/clothing/under/costume/singer/blue
/obj/item/clothing/under/geisha : /obj/item/clothing/under/costume/geisha
/obj/item/clothing/under/villain : /obj/item/clothing/under/costume/villain
/obj/item/clothing/under/sailor : /obj/item/clothing/under/costume/sailor
/obj/item/clothing/under/rank/security/navyblue/russian : /obj/item/clothing/under/costume/russian_officer
/obj/item/clothing/under/mummy : /obj/item/clothing/under/costume/mummy
/obj/item/clothing/under/scarecrow : /obj/item/clothing/under/costume/scarecrow
/obj/item/clothing/under/draculass : /obj/item/clothing/under/costume/draculass
/obj/item/clothing/under/drfreeze : /obj/item/clothing/under/costume/drfreeze
/obj/item/clothing/under/lobster : /obj/item/clothing/under/costume/lobster
/obj/item/clothing/under/skeleton : /obj/item/clothing/under/costume/skeleton
/obj/item/clothing/under/mech_suit : /obj/item/clothing/under/costume/mech_suit
/obj/item/clothing/under/mech_suit/white : /obj/item/clothing/under/costume/mech_suit/white
/obj/item/clothing/under/mech_suit/blue : /obj/item/clothing/under/costume/mech_suit/blue
/obj/item/clothing/under/gondola : /obj/item/clothing/under/costume/gondola

/obj/item/clothing/under/rank/bartender : /obj/item/clothing/under/rank/civilian/bartender
/obj/item/clothing/under/rank/bartender/purple : /obj/item/clothing/under/rank/civilian/bartender/purple
/obj/item/clothing/under/rank/bartender/skirt : /obj/item/clothing/under/rank/civilian/bartender/skirt
/obj/item/clothing/under/rank/chaplain : /obj/item/clothing/under/rank/civilian/chaplain
/obj/item/clothing/under/rank/chaplain/skirt : /obj/item/clothing/under/rank/civilian/chaplain/skirt
/obj/item/clothing/under/rank/chef : /obj/item/clothing/under/rank/civilian/chef
/obj/item/clothing/under/rank/chef/skirt : /obj/item/clothing/under/rank/civilian/chef/skirt
/obj/item/clothing/under/rank/curator : /obj/item/clothing/under/rank/civilian/curator
/obj/item/clothing/under/rank/curator/skirt: /obj/item/clothing/under/rank/civilian/curator/skirt
/obj/item/clothing/under/rank/curator/treasure_hunter : /obj/item/clothing/under/rank/civilian/curator/treasure_hunter
/obj/item/clothing/under/space : /obj/item/clothing/under/rank/civilian/curator/nasa
/obj/item/clothing/under/rank/hydroponics : /obj/item/clothing/under/rank/civilian/hydroponics
/obj/item/clothing/under/rank/hydroponics/skirt : /obj/item/clothing/under/rank/civilian/hydroponics/skirt
/obj/item/clothing/under/rank/janitor : /obj/item/clothing/under/rank/civilian/janitor
/obj/item/clothing/under/rank/janitor/skirt : /obj/item/clothing/under/rank/civilian/janitor/skirt
/obj/item/clothing/under/janimaid : /obj/item/clothing/under/rank/civilian/janitor/maid
/obj/item/clothing/under/rank/mime : /obj/item/clothing/under/rank/civilian/mime
/obj/item/clothing/under/rank/mime/skirt : /obj/item/clothing/under/rank/civilian/mime/skirt
/obj/item/clothing/under/sexymime : /obj/item/clothing/under/rank/civilian/mime/sexy
/obj/item/clothing/under/rank/clown : /obj/item/clothing/under/rank/civilian/clown
/obj/item/clothing/under/rank/blueclown : /obj/item/clothing/under/rank/civilian/clown/blue
/obj/item/clothing/under/rank/greenclown : /obj/item/clothing/under/rank/civilian/clown/green
/obj/item/clothing/under/rank/yellowclown : /obj/item/clothing/under/rank/civilian/clown/yellow
/obj/item/clothing/under/rank/purpleclown : /obj/item/clothing/under/rank/civilian/clown/purple
/obj/item/clothing/under/rank/orangeclown : /obj/item/clothing/under/rank/civilian/clown/orange
/obj/item/clothing/under/rank/rainbowclown : /obj/item/clothing/under/rank/civilian/clown/rainbow
/obj/item/clothing/under/jester : /obj/item/clothing/under/rank/civilian/clown/jester
/obj/item/clothing/under/jester/alt : /obj/item/clothing/under/rank/civilian/clown/jester/alt
/obj/item/clothing/under/rank/clown/sexy : /obj/item/clothing/under/rank/civilian/clown/sexy
/obj/item/clothing/under/lawyer : /obj/item/clothing/under/rank/civilian/lawyer
/obj/item/clothing/under/lawyer/black : /obj/item/clothing/under/rank/civilian/lawyer/black
/obj/item/clothing/under/lawyer/black/skirt : /obj/item/clothing/under/rank/civilian/lawyer/black/skirt
/obj/item/clothing/under/lawyer/female : /obj/item/clothing/under/rank/civilian/lawyer/female
/obj/item/clothing/under/lawyer/female/skirt : /obj/item/clothing/under/rank/civilian/lawyer/female/skirt
/obj/item/clothing/under/lawyer/red : /obj/item/clothing/under/rank/civilian/lawyer/red
/obj/item/clothing/under/lawyer/red/skirt : /obj/item/clothing/under/rank/civilian/lawyer/red/skirt
/obj/item/clothing/under/lawyer/blue : /obj/item/clothing/under/rank/civilian/lawyer/blue
/obj/item/clothing/under/lawyer/blue/skirt : /obj/item/clothing/under/rank/civilian/lawyer/blue/skirt
/obj/item/clothing/under/lawyer/bluesuit : /obj/item/clothing/under/rank/civilian/lawyer/bluesuit
/obj/item/clothing/under/lawyer/bluesuit/skirt : /obj/item/clothing/under/rank/civilian/lawyer/bluesuit/skirt
/obj/item/clothing/under/lawyer/purpsuit : /obj/item/clothing/under/rank/civilian/lawyer/purpsuit
/obj/item/clothing/under/lawyer/purpsuit/skirt : /obj/item/clothing/under/rank/civilian/lawyer/purpsuit/skirt
/obj/item/clothing/under/lawyer/blacksuit : /obj/item/clothing/under/suit/black
/obj/item/clothing/under/lawyer/blacksuit/skirt : /obj/item/clothing/under/suit/black/skirt
/obj/item/clothing/under/lawyer/really_black : /obj/item/clothing/under/suit/black_really
/obj/item/clothing/under/lawyer/really_black/skirt : /obj/item/clothing/under/suit/black_really/skirt
/obj/item/clothing/under/rank/head_of_personnel : /obj/item/clothing/under/rank/civilian/head_of_personnel
/obj/item/clothing/under/rank/head_of_personnel/skirt : /obj/item/clothing/under/rank/civilian/head_of_personnel/skirt
/obj/item/clothing/under/gimmick/rank/head_of_personnel/suit : /obj/item/clothing/under/rank/civilian/head_of_personnel/suit
/obj/item/clothing/under/gimmick/rank/head_of_personnel/suit/skirt : /obj/item/clothing/under/rank/civilian/head_of_personnel/suit/skirt

/obj/item/clothing/under/rank/cargo : /obj/item/clothing/under/rank/cargo/qm
/obj/item/clothing/under/rank/cargo/skirt : /obj/item/clothing/under/rank/cargo/qm/skirt
/obj/item/clothing/under/rank/cargotech : /obj/item/clothing/under/rank/cargo/tech
/obj/item/clothing/under/rank/cargotech/skirt : /obj/item/clothing/under/rank/cargo/tech/skirt
/obj/item/clothing/under/rank/miner : /obj/item/clothing/under/rank/cargo/miner
/obj/item/clothing/under/rank/miner/lavaland : /obj/item/clothing/under/rank/cargo/miner/lavaland

/obj/item/clothing/under/rank/research_director : /obj/item/clothing/under/rank/rnd/research_director
/obj/item/clothing/under/rank/research_director/skirt : /obj/item/clothing/under/rank/rnd/research_director/skirt
/obj/item/clothing/under/rank/research_director/alt : /obj/item/clothing/under/rank/rnd/research_director/alt
/obj/item/clothing/under/rank/research_director/alt/skirt : /obj/item/clothing/under/rank/rnd/research_director/alt/skirt
/obj/item/clothing/under/rank/research_director/turtleneck : /obj/item/clothing/under/rank/rnd/research_director/turtleneck
/obj/item/clothing/under/rank/research_director/turtleneck/skirt : /obj/item/clothing/under/rank/rnd/research_director/turtleneck/skirt
/obj/item/clothing/under/rank/scientist : /obj/item/clothing/under/rank/rnd/scientist
/obj/item/clothing/under/rank/scientist/skirt : /obj/item/clothing/under/rank/rnd/scientist/skirt
/obj/item/clothing/under/rank/roboticist : /obj/item/clothing/under/rank/rnd/roboticist
/obj/item/clothing/under/rank/roboticist/skirt : /obj/item/clothing/under/rank/rnd/roboticist/skirt

/obj/item/clothing/under/rank/chief_medical_officer : /obj/item/clothing/under/rank/medical/chief_medical_officer
/obj/item/clothing/under/rank/chief_medical_officer/skirt : /obj/item/clothing/under/rank/medical/chief_medical_officer/skirt
/obj/item/clothing/under/rank/medical : /obj/item/clothing/under/rank/medical/doctor
/obj/item/clothing/under/rank/medical/blue : /obj/item/clothing/under/rank/medical/doctor/blue
/obj/item/clothing/under/rank/medical/green : /obj/item/clothing/under/rank/medical/doctor/green
/obj/item/clothing/under/rank/medical/purple : /obj/item/clothing/under/rank/medical/doctor/purple
/obj/item/clothing/under/rank/medical/skirt : /obj/item/clothing/under/rank/medical/doctor/skirt
/obj/item/clothing/under/rank/nursesuit : /obj/item/clothing/under/rank/medical/doctor/nurse
/obj/item/clothing/under/rank/geneticist : /obj/item/clothing/under/rank/rnd/geneticist
/obj/item/clothing/under/rank/geneticist/skirt : /obj/item/clothing/under/rank/rnd/geneticist/skirt
/obj/item/clothing/under/rank/virologist : /obj/item/clothing/under/rank/medical/virologist
/obj/item/clothing/under/rank/virologist/skirt : /obj/item/clothing/under/rank/medical/virologist/skirt
/obj/item/clothing/under/rank/chemist : /obj/item/clothing/under/rank/medical/chemist
/obj/item/clothing/under/rank/chemist/skirt : /obj/item/clothing/under/rank/medical/chemist/skirt

/obj/item/clothing/under/rank/chief_engineer : /obj/item/clothing/under/rank/engineering/chief_engineer
/obj/item/clothing/under/rank/chief_engineer/skirt : /obj/item/clothing/under/rank/engineering/chief_engineer/skirt
/obj/item/clothing/under/rank/atmospheric_technician : /obj/item/clothing/under/rank/engineering/atmospheric_technician
/obj/item/clothing/under/rank/atmospheric_technician/skirt : /obj/item/clothing/under/rank/engineering/atmospheric_technician/skirt
/obj/item/clothing/under/rank/engineer : /obj/item/clothing/under/rank/engineering/engineer
/obj/item/clothing/under/rank/engineer/hazard : /obj/item/clothing/under/rank/engineering/engineer/hazard
/obj/item/clothing/under/rank/engineer/skirt : /obj/item/clothing/under/rank/engineering/engineer/skirt

/obj/item/clothing/under/rank/centcom_officer : /obj/item/clothing/under/rank/centcom/officer
/obj/item/clothing/under/rank/centcom_commander : /obj/item/clothing/under/rank/centcom/commander

/obj/item/clothing/under/gimmick/rank/captain/suit : /obj/item/clothing/under/rank/captain/suit
/obj/item/clothing/under/gimmick/rank/captain/suit/skirt : /obj/item/clothing/under/rank/captain/suit/skirt
/obj/item/clothing/under/captainparade : /obj/item/clothing/under/rank/captain/parade

/obj/item/clothing/under/rank/security : /obj/item/clothing/under/rank/security/officer
/obj/item/clothing/under/rank/security/grey : /obj/item/clothing/under/rank/security/officer/grey
/obj/item/clothing/under/rank/security/skirt : /obj/item/clothing/under/rank/security/officer/skirt
/obj/item/clothing/under/rank/security/blueshirt : /obj/item/clothing/under/rank/security/officer/blueshirt
/obj/item/clothing/under/rank/security/navyblue : /obj/item/clothing/under/rank/security/officer/formal
/obj/item/clothing/under/rank/warden : /obj/item/clothing/under/rank/security/warden
/obj/item/clothing/under/rank/warden/grey : /obj/item/clothing/under/rank/security/warden/grey
/obj/item/clothing/under/rank/warden/skirt : /obj/item/clothing/under/rank/security/warden/skirt
/obj/item/clothing/under/rank/warden/navyblue : /obj/item/clothing/under/rank/security/warden/formal
/obj/item/clothing/under/rank/det : /obj/item/clothing/under/rank/security/detective
/obj/item/clothing/under/rank/det/skirt : /obj/item/clothing/under/rank/security/detective/skirt
/obj/item/clothing/under/rank/det/grey : /obj/item/clothing/under/rank/security/detective/grey
/obj/item/clothing/under/rank/det/grey/skirt : /obj/item/clothing/under/rank/security/detective/grey/skirt
/obj/item/clothing/under/rank/head_of_security : /obj/item/clothing/under/rank/security/head_of_security
/obj/item/clothing/under/rank/head_of_security/skirt : /obj/item/clothing/under/rank/security/head_of_security/skirt
/obj/item/clothing/under/rank/head_of_security/grey : /obj/item/clothing/under/rank/security/head_of_security/grey
/obj/item/clothing/under/rank/head_of_security/alt : /obj/item/clothing/under/rank/security/head_of_security/alt
/obj/item/clothing/under/rank/head_of_security/alt/skirt : /obj/item/clothing/under/rank/security/head_of_security/alt/skirt
/obj/item/clothing/under/rank/head_of_security/navyblue : /obj/item/clothing/under/rank/security/head_of_security/formal
/obj/item/clothing/under/hosparademale : /obj/item/clothing/under/rank/security/head_of_security/parade
/obj/item/clothing/under/hosparadefem : /obj/item/clothing/under/rank/security/head_of_security/parade/female
/obj/item/clothing/under/rank/security/spacepol : /obj/item/clothing/under/rank/security/officer/spacepol


code:
/obj/effect/turf_decal/stripes/corner {dir=1} : /obj/item/bear_armor {@OLD;dir=8}
/obj/effect/turf_decal/stripes/corner {dir=2} : /obj/effect/turf_decal/stripes/corner {@OLD;dir=@SKIP}
/obj/effect/turf_decal/stripes/corner {dir=4} : /obj/effect/turf_decal/stripes/corner {@OLD;dir=1}
/obj/effect/turf_decal/stripes/corner {dir=8} : /obj/effect/turf_decal/stripes/corner {@OLD;dir=4}
/obj/item/bear_armor {dir=8} : /obj/effect/turf_decal/stripes/corner {@OLD}
/obj/effect/turf_decal/stripes/red/corner {dir=1} : /obj/item/bear_armor {@OLD;dir=8}
/obj/effect/turf_decal/stripes/red/corner {dir=2} : /obj/effect/turf_decal/stripes/red/corner {@OLD;dir=@SKIP}
/obj/effect/turf_decal/stripes/red/corner {dir=4} : /obj/effect/turf_decal/stripes/red/corner {@OLD;dir=1}
/obj/effect/turf_decal/stripes/red/corner {dir=8} : /obj/effect/turf_decal/stripes/red/corner {@OLD;dir=4}
/obj/item/bear_armor {dir=8} : /obj/effect/turf_decal/stripes/red/corner {@OLD}
/obj/effect/turf_decal/stripes/white/corner {dir=1} : /obj/item/bear_armor {@OLD;dir=8}
/obj/effect/turf_decal/stripes/white/corner {dir=2} : /obj/effect/turf_decal/stripes/white/corner {@OLD;dir=@SKIP}
/obj/effect/turf_decal/stripes/white/corner {dir=4} : /obj/effect/turf_decal/stripes/white/corner {@OLD;dir=1}
/obj/effect/turf_decal/stripes/white/corner {dir=8} : /obj/effect/turf_decal/stripes/white/corner {@OLD;dir=4}
/obj/item/bear_armor {dir=8} : /obj/effect/turf_decal/stripes/white/corner {@OLD}
/obj/effect/turf_decal/box/corners {dir=1} : /obj/item/bear_armor {@OLD;dir=8}
/obj/effect/turf_decal/box/corners {dir=2} : /obj/effect/turf_decal/box/corners {@OLD;dir=@SKIP}
/obj/effect/turf_decal/box/corners {dir=4} : /obj/effect/turf_decal/box/corners {@OLD;dir=1}
/obj/effect/turf_decal/box/corners {dir=8} : /obj/effect/turf_decal/box/corners {@OLD;dir=4}
/obj/item/bear_armor {dir=8} : /obj/effect/turf_decal/box/corners {@OLD}
/obj/effect/turf_decal/box/red/corners {dir=1} : /obj/item/bear_armor {@OLD;dir=8}
/obj/effect/turf_decal/box/red/corners {dir=2} : /obj/effect/turf_decal/box/red/corners {@OLD;dir=@SKIP}
/obj/effect/turf_decal/box/red/corners {dir=4} : /obj/effect/turf_decal/box/red/corners {@OLD;dir=1}
/obj/effect/turf_decal/box/red/corners {dir=8} : /obj/effect/turf_decal/box/red/corners {@OLD;dir=4}
/obj/item/bear_armor {dir=8} : /obj/effect/turf_decal/box/red/corners {@OLD}
/obj/effect/turf_decal/box/white/corners {dir=1} : /obj/item/bear_armor {@OLD;dir=8}
/obj/effect/turf_decal/box/white/corners {dir=2} : /obj/effect/turf_decal/box/white/corners {@OLD;dir=@SKIP}
/obj/effect/turf_decal/box/white/corners {dir=4} : /obj/effect/turf_decal/box/white/corners {@OLD;dir=1}
/obj/effect/turf_decal/box/white/corners {dir=8} : /obj/effect/turf_decal/box/white/corners {@OLD;dir=4}
/obj/item/bear_armor {dir=8} : /obj/effect/turf_decal/box/white/corners {@OLD}


code:
#This replaces the window/shuttle and window/plasma/reinforced with the refactors from https://github.com/tgstation/tgstation/pull/61694#pullrequestreview-763648844

/obj/structure/window/plasma/reinforced : /obj/structure/window/reinforced/plasma
/obj/structure/window/plasma/reinforced/fulltile : /obj/structure/window/reinforced/plasma/fulltile
/obj/structure/window/plasma/reinforced/unanchored : /obj/structure/window/reinforced/plasma/unanchored
/obj/structure/window/plasma/reinforced/fulltile/unanchored : /obj/structure/window/reinforced/plasma/fulltile/unanchored
/obj/structure/window/plasma/reinforced/plastitanium : /obj/structure/window/reinforced/plasma/plastitanium
/obj/structure/window/plasma/reinforced/plastitanium/unanchored : /obj/structure/window/reinforced/plasma/plastitanium/unanchored

/obj/structure/window/shuttle : /obj/structure/window/reinforced/shuttle
/obj/structure/window/shuttle/unanchored : /obj/structure/window/reinforced/shuttle/unanchored
/obj/structure/window/shuttle/tinted : /obj/structure/window/reinforced/shuttle/tinted
/obj/structure/window/shuttle/survival_pod : /obj/structure/window/reinforced/shuttle/survival_pod

/obj/structure/window/shuttle/survival_pod/spawner/east : /obj/structure/window/reinforced/shuttle/survival_pod/spawner/east
/obj/structure/window/shuttle/survival_pod/spawner/west : /obj/structure/window/reinforced/shuttle/survival_pod/spawner/west
/obj/structure/window/shuttle/survival_pod/spawner/north : /obj/structure/window/reinforced/shuttle/survival_pod/spawner/north

/obj/structure/window/plasma/reinforced/spawner/north : /obj/structure/window/reinforced/plasma/spawner/north
/obj/structure/window/plasma/reinforced/spawner/east : /obj/structure/window/reinforced/plasma/spawner/east
/obj/structure/window/plasma/reinforced/spawner/west : /obj/structure/window/reinforced/plasma/spawner/west
/obj/effect/spawner/structure/window/shuttle : /obj/effect/spawner/structure/window/reinforced/shuttle

/obj/effect/spawner/structure/window/hollow/plasma/reinforced : /obj/effect/spawner/structure/window/hollow/reinforced/plasma
/obj/effect/spawner/structure/window/hollow/plasma/reinforced/end : /obj/effect/spawner/structure/window/hollow/reinforced/plasma/end
/obj/effect/spawner/structure/window/hollow/plasma/reinforced/middle : /obj/effect/spawner/structure/window/hollow/reinforced/plasma/middle
/obj/effect/spawner/structure/window/hollow/plasma/reinforced/directional : /obj/effect/spawner/structure/window/hollow/reinforced/plasma/directional
/obj/effect/spawner/structure/window/plasma/reinforced : /obj/effect/spawner/structure/window/reinforced/plasma/reinforced
/obj/effect/spawner/structure/window/plasma/reinforced/plastitanium : /obj/effect/spawner/structure/window/reinforced/plasma/plastitanium

/obj/structure/window/plasma/reinforced/spawner/east : /obj/structure/window/reinforced/plasma/spawner/east
/obj/structure/window/plasma/reinforced/spawner/west : /obj/structure/window/reinforced/plasma/spawner/west
/obj/structure/window/plasma/reinforced/spawner/north : /obj/structure/window/reinforced/plasma/spawner/north


code:
#comment This replaces the effect/spawner paths to the new refactored paths https://github.com/tgstation/tgstation/pull/60522

/obj/effect/loot_site_spawner : /obj/effect/spawner/random/structure/crate
/obj/effect/spawner/lootdrop/costume : /obj/effect/spawner/random/clothing/costume
/obj/effect/spawner/lootdrop/mafia_outfit : /obj/effect/spawner/random/clothing/mafia_outfit
/obj/effect/spawner/lootdrop/minor/twentyfive_percent_cyborg_mask : /obj/effect/spawner/random/clothing/twentyfive_percent_cyborg_mask
/obj/effect/spawner/lootdrop/minor/pirate_or_bandana : /obj/effect/spawner/random/clothing/pirate_or_bandana
/obj/effect/spawner/lootdrop/minor/kittyears_or_rabbitears : /obj/effect/spawner/random/clothing/kittyears_or_rabbitears
/obj/effect/spawner/lootdrop/minor/bowler_or_that : /obj/effect/spawner/random/clothing/bowler_or_that
/obj/effect/spawner/lootdrop/minor/beret_or_rabbitears : /obj/effect/spawner/random/clothing/beret_or_rabbitears
/obj/effect/spawner/bundle/hobo_squat : /obj/effect/spawner/random/trash/hobo_squat
/obj/effect/spawner/bundle/moisture_trap : /obj/effect/spawner/random/trash/moisture_trap
/obj/effect/spawner/lootdrop/maint_drugs : /obj/effect/spawner/random/entertainment/drugs
/obj/effect/spawner/lootdrop/grille_or_trash : /obj/effect/spawner/random/trash/grille_or_waste
/obj/effect/spawner/lootdrop/botanical_waste : /obj/effect/spawner/random/trash/botanical_waste
/obj/effect/spawner/lootdrop/food_packaging : /obj/effect/spawner/random/trash/food_packaging
/obj/effect/spawner/lootdrop/cigbutt : /obj/effect/spawner/random/trash/cigbutt
/obj/effect/spawner/lootdrop/garbage_spawner : /obj/effect/spawner/random/trash/garbage
/obj/effect/spawner/lootdrop/gambling : /obj/effect/spawner/random/entertainment/gambling
/obj/effect/spawner/lootdrop/wallet_loot : /obj/effect/spawner/random/entertainment/wallet_storage
/obj/effect/spawner/lootdrop/organ_spawner : /obj/effect/spawner/random/medical/organs
/obj/effect/spawner/lootdrop/memeorgans : /obj/effect/spawner/random/medical/memeorgans
/obj/effect/spawner/lootdrop/two_percent_xeno_egg_spawner : /obj/effect/spawner/random/medical/two_percent_xeno_egg_spawner
/obj/effect/spawner/lootdrop/three_course_meal : /obj/effect/spawner/random/food_or_drink/three_course_meal
/obj/effect/spawner/lootdrop/refreshing_beverage : /obj/effect/spawner/random/food_or_drink/refreshing_beverage
/obj/effect/spawner/lootdrop/donkpockets : /obj/effect/spawner/random/food_or_drink/donkpockets
/obj/effect/spawner/lootdrop/space/rareseed : /obj/effect/spawner/random/food_or_drink/seed_rare
/obj/effect/spawner/lootdrop/space/cashmoney : /obj/effect/spawner/random/entertainment/money_large
/obj/effect/spawner/lootdrop/space/fancytool/raremedicalonly : /obj/effect/spawner/random/medical/surgery_tool_alien
/obj/effect/spawner/lootdrop/space/fancytool/advmedicalonly : /obj/effect/spawner/random/medical/surgery_tool_advanced
/obj/effect/spawner/lootdrop/space/fancytool/engineonly : /obj/effect/spawner/random/engineering/tool_advanced
/obj/effect/spawner/lootdrop/space/material : /obj/effect/spawner/random/engineering/material_rare
/obj/effect/spawner/lootdrop/decorative_material : /obj/effect/spawner/random/decoration/material
/obj/effect/spawner/lootdrop/maintenance_carpet : /obj/effect/spawner/random/decoration/carpet
/obj/effect/spawner/lootdrop/decorations_spawner : /obj/effect/spawner/random/decoration/generic
/obj/effect/spawner/lootdrop/aimodule_harmless : /obj/effect/spawner/random/aimodule/harmless
/obj/effect/spawner/lootdrop/aimodule_neutral : /obj/effect/spawner/random/aimodule/neutral
/obj/effect/spawner/lootdrop/aimodule_harmful : /obj/effect/spawner/random/aimodule/harmful
/obj/effect/spawner/lootdrop/techstorage/service : /obj/effect/spawner/random/techstorage/service_all
/obj/effect/spawner/lootdrop/techstorage/rnd : /obj/effect/spawner/random/techstorage/rnd_all
/obj/effect/spawner/lootdrop/techstorage/security : /obj/effect/spawner/random/techstorage/security_all
/obj/effect/spawner/lootdrop/techstorage/engineering : /obj/effect/spawner/random/techstorage/engineering_all
/obj/effect/spawner/lootdrop/techstorage/tcomms : /obj/effect/spawner/random/techstorage/tcomms_all
/obj/effect/spawner/lootdrop/techstorage/medical : /obj/effect/spawner/random/techstorage/medical_all
/obj/effect/spawner/lootdrop/techstorage/ai : /obj/effect/spawner/random/techstorage/ai_all
/obj/effect/spawner/lootdrop/techstorage/command : /obj/effect/spawner/random/techstorage/command_all
/obj/effect/spawner/lootdrop/techstorage/rnd_secure : /obj/effect/spawner/random/techstorage/rnd_secure_all
/obj/effect/spawner/lootdrop/prison_contraband : /obj/effect/spawner/random/contraband/prison
/obj/effect/spawner/lootdrop/armory_contraband : /obj/effect/spawner/random/contraband/armory
/obj/effect/spawner/lootdrop/armory_contraband/metastation : /obj/effect/spawner/random/contraband/armory
/obj/effect/spawner/lootdrop/armory_contraband/donutstation : /obj/effect/spawner/random/contraband/armory
/obj/effect/spawner/lootdrop/gross_decal_spawner : /obj/effect/spawner/random/trash/mess
/obj/effect/spawner/scatter/grime : /obj/effect/spawner/random/trash/grime
/obj/effect/spawner/scatter/moisture : /obj/effect/spawner/random/trash/moisture
/obj/effect/spawner/lootdrop/space/fancytech : /obj/effect/spawner/random/exotic/technology
/obj/effect/spawner/lootdrop/space/languagebook : /obj/effect/spawner/random/exotic/languagebook
/obj/effect/spawner/lootdrop/space/syndiecosmetic : /obj/effect/spawner/random/exotic/syndie
/obj/effect/spawner/lootdrop/space/fancytool : /obj/effect/spawner/random/exotic/tool
/obj/effect/spawner/randomarcade : /obj/effect/spawner/random/entertainment/arcade
/obj/effect/spawner/randomsnackvend : /obj/effect/spawner/random/vending/snackvend
/obj/effect/spawner/randomcolavend : /obj/effect/spawner/random/vending/colavend
/obj/effect/spawner/lootdrop/arcade_boards : /obj/effect/spawner/random/techstorage/arcade_boards
/obj/effect/spawner/lootdrop/crate_spawner : /obj/effect/spawner/random/structure/crate_abandoned
/obj/effect/spawner/lootdrop/maintenance : /obj/effect/spawner/random/maintenance
/obj/effect/spawner/lootdrop/maintenance/two : /obj/effect/spawner/random/maintenance/two
/obj/effect/spawner/lootdrop/maintenance/three : /obj/effect/spawner/random/maintenance/three
/obj/effect/spawner/lootdrop/maintenance/four : /obj/effect/spawner/random/maintenance/four
/obj/effect/spawner/lootdrop/maintenance/five : /obj/effect/spawner/random/maintenance/five
/obj/effect/spawner/lootdrop/maintenance/six : /obj/effect/spawner/random/maintenance/six
/obj/effect/spawner/lootdrop/maintenance/seven : /obj/effect/spawner/random/maintenance/seven
/obj/effect/spawner/lootdrop/maintenance/eight : /obj/effect/spawner/random/maintenance/eight
/obj/effect/spawner/lootdrop/gloves : /obj/effect/spawner/random/clothing/gloves
/obj/effect/spawner/lootdrop/glowstick : /obj/effect/spawner/random/decoration/glowstick
/obj/effect/spawner/lootdrop/lizardboots : /obj/effect/spawner/random/clothing/lizardboots
/obj/effect/spawner/lootdrop/pizzaparty : /obj/effect/spawner/random/food_or_drink/pizzaparty
/obj/effect/spawner/lootdrop/snowdin/dungeonlite : /obj/effect/spawner/random/exotic/antag_gear_weak
/obj/effect/spawner/lootdrop/snowdin/dungeonmid : /obj/effect/spawner/random/exotic/antag_gear
/obj/effect/spawner/lootdrop/snowdin/dungeonheavy : /obj/effect/spawner/random/exotic/antag_gear_strong
/obj/effect/spawner/lootdrop/snowdin/dungeonmisc : /obj/effect/spawner/random/exotic/snow_gear
/obj/effect/spawner/lootdrop/seed_vault : /obj/effect/spawner/random/food_or_drink/seed_vault
/obj/effect/spawner/lootdrop/whiteship_cere_ripley : /obj/effect/spawner/random/exotic/ripley


code:
#comment This replaces the monkeys pre-species refactor to the monkeys post-species refactor https://github.com/tgstation/tgstation/pull/55614

/mob/living/carbon/monkey : /mob/living/carbon/human/species/monkey
/mob/living/carbon/monkey/angry : /mob/living/carbon/human/species/monkey/angry
/mob/living/carbon/monkey/punpun : /mob/living/carbon/human/species/monkey/punpun


code:
/turf/open/floor/plasteel : /turf/open/floor/iron {@OLD}
/turf/open/floor/plasteel/airless : /turf/open/floor/iron/airless {@OLD}
/turf/open/floor/plasteel/airless/cafeteria : /turf/open/floor/iron/cafeteria/airless {@OLD}
/turf/open/floor/plasteel/airless/dark : /turf/open/floor/iron/dark/airless {@OLD}
/turf/open/floor/plasteel/airless/showroomfloor : /turf/open/floor/iron/showroomfloor/airless {@OLD}
/turf/open/floor/plasteel/airless/solarpanel : /turf/open/floor/iron/solarpanel/airless {@OLD}
/turf/open/floor/plasteel/airless/white : /turf/open/floor/iron/white/airless {@OLD}
/turf/open/floor/plasteel/airless/white/corner : /turf/open/floor/iron/white/corner/airless {@OLD}
/turf/open/floor/plasteel/airless/white/side : /turf/open/floor/iron/white/side/airless {@OLD}
/turf/open/floor/plasteel/bluespace : /turf/open/floor/iron/bluespace {@OLD}
/turf/open/floor/plasteel/cafeteria : /turf/open/floor/iron/cafeteria {@OLD}
/turf/open/floor/plasteel/chapel : /turf/open/floor/iron/chapel {@OLD}
/turf/open/floor/plasteel/checker : /turf/open/floor/iron/checker {@OLD}
/turf/open/floor/plasteel/cult : /turf/open/floor/cult {@OLD}
/turf/open/floor/plasteel/cult/airless : /turf/open/floor/cult/airless {@OLD}
/turf/open/floor/plasteel/dark : /turf/open/floor/iron/dark {@OLD}
/turf/open/floor/plasteel/dark/airless : /turf/open/floor/iron/dark/airless {@OLD}
/turf/open/floor/plasteel/dark/corner : /turf/open/floor/iron/dark/corner {@OLD}
/turf/open/floor/plasteel/dark/side : /turf/open/floor/iron/dark/side {@OLD}
/turf/open/floor/plasteel/dark/snowdin : /turf/open/floor/iron/dark/snowdin {@OLD}
/turf/open/floor/plasteel/dark/telecomms : /turf/open/floor/iron/dark/telecomms {@OLD}
/turf/open/floor/plasteel/elevatorshaft : /turf/open/floor/plating/elevatorshaft {@OLD}
/turf/open/floor/plasteel/freezer : /turf/open/floor/iron/freezer {@OLD}
/turf/open/floor/plasteel/freezer/airless : /turf/open/floor/iron/freezer/airless {@OLD}
/turf/open/floor/plasteel/goonplaque : /turf/open/floor/iron/goonplaque {@OLD}
/turf/open/floor/plasteel/grimy : /turf/open/floor/iron/grimy {@OLD}
/turf/open/floor/plasteel/icemoon : /turf/open/floor/iron/icemoon {@OLD}
/turf/open/floor/plasteel/kitchen_coldroom : /turf/open/floor/iron/kitchen_coldroom {@OLD}
/turf/open/floor/plasteel/kitchen_coldroom/freezerfloor : /turf/open/floor/iron/kitchen_coldroom/freezerfloor {@OLD}
/turf/open/floor/plasteel/recharge_floor : /turf/open/floor/iron/recharge_floor {@OLD}
/turf/open/floor/plasteel/recharge_floor/asteroid : /turf/open/floor/iron/recharge_floor/asteroid {@OLD}
/turf/open/floor/plasteel/rockvault : /turf/open/floor/vault/rock {@OLD}
/turf/open/floor/plasteel/rockvault/alien : /turf/open/floor/vault/alien {@OLD}
/turf/open/floor/plasteel/rockvault/sandstone : /turf/open/floor/vault/sandstone {@OLD}
/turf/open/floor/plasteel/sepia : /turf/open/floor/iron/sepia {@OLD}
/turf/open/floor/plasteel/showroomfloor : /turf/open/floor/iron/showroomfloor {@OLD}
/turf/open/floor/plasteel/solarpanel : /turf/open/floor/iron/solarpanel {@OLD}
/turf/open/floor/plasteel/stairs : /turf/open/floor/iron/stairs {@OLD}
/turf/open/floor/plasteel/stairs/left : /turf/open/floor/iron/stairs/left {@OLD}
/turf/open/floor/plasteel/stairs/medium : /turf/open/floor/iron/stairs/medium {@OLD}
/turf/open/floor/plasteel/stairs/old : /turf/open/floor/iron/stairs/old {@OLD}
/turf/open/floor/plasteel/stairs/right : /turf/open/floor/iron/stairs/right {@OLD}
/turf/open/floor/plasteel/telecomms : /turf/open/floor/iron/telecomms {@OLD}
/turf/open/floor/plasteel/vaporwave : /turf/open/floor/iron/vaporwave {@OLD}
/turf/open/floor/plasteel/white : /turf/open/floor/iron/white {@OLD}
/turf/open/floor/plasteel/white/corner : /turf/open/floor/iron/white/corner {@OLD}
/turf/open/floor/plasteel/white/side : /turf/open/floor/iron/white/side {@OLD}
/turf/open/floor/plasteel/white/telecomms : /turf/open/floor/iron/white/telecomms {@OLD}
/turf/open/floor/plasteel/yellowsiding : /turf/open/floor/iron/yellowsiding, /obj/effect/turf_decal/siding/yellow {@OLD}
/turf/open/floor/plasteel/yellowsiding/corner : /turf/open/floor/iron/yellowsiding/corner, /obj/effect/turf_decal/siding/yellow/corner {@OLD}


code:
/obj/machinery/airlock_sensor/incinerator_toxmix : /obj/machinery/airlock_sensor/incinerator_ordmix
/obj/machinery/button/door/incinerator_vent_toxmix : /obj/machinery/button/door/incinerator_vent_ordmix
/obj/machinery/button/ignition/incinerator/toxmix : /obj/machinery/button/ignition/incinerator/ordmix
/obj/machinery/camera/preset/toxins : /obj/machinery/camera/preset/ordnance
/obj/machinery/air_sensor/atmos/toxins_mixing_tank : /obj/machinery/air_sensor/atmos/ordnance_mixing_tank
/obj/machinery/computer/atmos_control/toxinsmix : /obj/machinery/computer/atmos_control/ordnancemix
/obj/machinery/computer/security/telescreen/toxins : /obj/machinery/computer/security/telescreen/ordnance
/obj/machinery/computer/pod/old/mass_driver_controller/toxinsdriver : /obj/machinery/computer/pod/old/mass_driver_controller/ordnancedriver
/obj/machinery/computer/pod/old/mass_driver_controller/toxinsdriver/longrange : /obj/machinery/computer/pod/old/mass_driver_controller/ordnancedriver/longrange
/obj/machinery/door/airlock/research/glass/incinerator/toxmix_interior : /obj/machinery/door/airlock/research/glass/incinerator/ordmix_interior
/obj/machinery/door/airlock/research/glass/incinerator/toxmix_exterior : /obj/machinery/door/airlock/research/glass/incinerator/ordmix_exterior
/obj/machinery/door/poddoor/incinerator_toxmix : /obj/machinery/door/poddoor/incinerator_ordmix
/obj/machinery/door/poddoor/massdriver_toxins : /obj/machinery/door/poddoor/massdriver_ordnance
/obj/machinery/embedded_controller/radio/airlock_controller/incinerator_toxmix : /obj/machinery/embedded_controller/radio/airlock_controller/incinerator_ordmix
/obj/machinery/igniter/incinerator_toxmix : /obj/machinery/igniter/incinerator_ordmix
/obj/machinery/sparker/toxmix : /obj/machinery/sparker/ordmix
/obj/machinery/mass_driver/toxins : /obj/machinery/mass_driver/ordnance
/obj/item/circuitboard/computer/atmos_control/toxinsmix : /obj/item/circuitboard/computer/atmos_control/ordnancemix
/obj/item/circuitboard/computer/atmos_control/tank/toxin_tank : /obj/item/circuitboard/computer/atmos_control/tank/plasma_tank
/obj/machinery/computer/atmos_control/tank/toxin_tank : /obj/machinery/computer/atmos_control/tank/plasma_tank
/obj/machinery/atmospherics/components/binary/dp_vent_pump/high_volume/incinerator_toxmix : /obj/machinery/atmospherics/components/binary/dp_vent_pump/high_volume/incinerator_ordmix
/obj/machinery/atmospherics/components/unary/outlet_injector/atmos/toxins_mixing_input : /obj/machinery/atmospherics/components/unary/outlet_injector/atmos/ordnance_mixing_input
/obj/machinery/atmospherics/components/unary/vent_pump/siphon/atmos/toxins_mixing_output : /obj/machinery/atmospherics/components/unary/vent_pump/siphon/atmos/ordnance_mixing_output

/obj/machinery/portable_atmospherics/canister/toxins : /obj/machinery/portable_atmospherics/canister/plasma
/obj/machinery/air_sensor/atmos/toxin_tank : /obj/machinery/air_sensor/atmos/plasma_tank
/obj/machinery/computer/atmos_control/tank/toxin_tank : /obj/machinery/computer/atmos_control/tank/plasma_tank
/obj/machinery/atmospherics/components/tank/toxins : /obj/machinery/atmospherics/components/tank/plasma
/obj/machinery/atmospherics/components/unary/outlet_injector/atmos/toxin_input : /obj/machinery/atmospherics/components/unary/outlet_injector/atmos/plasma_input
/obj/machinery/atmospherics/components/unary/vent_pump/siphon/atmos/toxin_output : /obj/machinery/atmospherics/components/unary/vent_pump/siphon/atmos/plasma_output
/obj/machinery/atmospherics/miner/toxins : /obj/machinery/atmospherics/miner/plasma

/obj/item/storage/backpack/satchel/tox : /obj/item/storage/backpack/satchel/science
/obj/item/cartridge/signal/toxins : /obj/item/cartridge/signal/ordnance
/obj/item/pda/toxins : /obj/item/pda/science
/obj/item/book/manual/wiki/toxins : /obj/item/book/manual/wiki/ordnance
/obj/item/storage/backpack/duffelbag/toxins : /obj/item/storage/backpack/duffelbag/science
/obj/item/paper/fluff/jobs/toxins/chemical_info : /obj/item/paper/fluff/jobs/ordnance/chemical_info