code:
"a" = (/turf/template_noop,/area/template_noop)
"b" = (/obj/structure/alien/weeds{icon_state = "weeds1"},/obj/structure/alien/resin/wall,/turf/open/floor/plating/asteroid{initial_gas_mix = "co2=48.7;n2=13.2;o2=32.4;TEMP=251" heat_capacity = 1e+006;   },/area/awaycontent/a5{always_unpowered = 1; has_gravity = 1; name = "The Hive"; power_environ = 0; power_equip = 0; power_light = 0; poweralm = 0})
"c" = (/obj/structure/alien/weeds{icon_state = "weeds2"},/obj/structure/alien/resin/wall,/turf/open/floor/plating/asteroid{initial_gas_mix = "co2=48.7;n2=13.2;o2=32.4;TEMP=251" heat_capacity = 1e+006;   },/area/awaycontent/a5{always_unpowered = 1; has_gravity = 1; name = "The Hive"; power_environ = 0; power_equip = 0; power_light = 0; poweralm = 0})
"d" = (/obj/structure/alien/resin/wall,/obj/structure/alien/weeds{icon_state = "weeds2"},/turf/open/floor/plating/asteroid{initial_gas_mix = "co2=48.7;n2=13.2;o2=32.4;TEMP=251" heat_capacity = 1e+006;   },/area/awaycontent/a5{always_unpowered = 1; has_gravity = 1; name = "The Hive"; power_environ = 0; power_equip = 0; power_light = 0; poweralm = 0})
"e" = (/obj/structure/alien/weeds{icon_state = "weeds1"},/obj/structure/alien/weeds{desc = "A large mottled egg."; health = 100; icon_state = "egg_hatched"; name = "egg"},/turf/open/floor/plating/asteroid{initial_gas_mix = "co2=48.7;n2=13.2;o2=32.4;TEMP=251" heat_capacity = 1e+006;   },/area/awaycontent/a5{always_unpowered = 1; has_gravity = 1; name = "The Hive"; power_environ = 0; power_equip = 0; power_light = 0; poweralm = 0})
"f" = (/obj/structure/alien/weeds,/obj/structure/alien/weeds{icon_state = "weeds2"},/turf/open/floor/plating/asteroid{initial_gas_mix = "co2=48.7;n2=13.2;o2=32.4;TEMP=251" heat_capacity = 1e+006;   },/area/awaycontent/a5{always_unpowered = 1; has_gravity = 1; name = "The Hive"; power_environ = 0; power_equip = 0; power_light = 0; poweralm = 0})
"g" = (/obj/structure/alien/weeds,/turf/open/floor/plating/asteroid{initial_gas_mix = "co2=48.7;n2=13.2;o2=32.4;TEMP=251" heat_capacity = 1e+006;   },/area/awaycontent/a5{always_unpowered = 1; has_gravity = 1; name = "The Hive"; power_environ = 0; power_equip = 0; power_light = 0; poweralm = 0})
"h" = (/obj/structure/alien/weeds,/obj/structure/alien/resin/wall,/turf/open/floor/plating/asteroid{initial_gas_mix = "co2=48.7;n2=13.2;o2=32.4;TEMP=251" heat_capacity = 1e+006;   },/area/awaycontent/a5{always_unpowered = 1; has_gravity = 1; name = "The Hive"; power_environ = 0; power_equip = 0; power_light = 0; poweralm = 0})
"i" = (/obj/structure/alien/weeds,/obj/structure/bed/nest,/turf/open/floor/plating/asteroid{initial_gas_mix = "co2=48.7;n2=13.2;o2=32.4;TEMP=251" heat_capacity = 1e+006;   },/area/awaycontent/a5{always_unpowered = 1; has_gravity = 1; name = "The Hive"; power_environ = 0; power_equip = 0; power_light = 0; poweralm = 0})
"j" = (/obj/structure/alien/weeds{icon_state = "weeds2"},/mob/living/simple_animal/hostile/alien,/turf/open/floor/plating/asteroid{initial_gas_mix = "co2=48.7;n2=13.2;o2=32.4;TEMP=251" heat_capacity = 1e+006;   },/area/awaycontent/a5{always_unpowered = 1; has_gravity = 1; name = "The Hive"; power_environ = 0; power_equip = 0; power_light = 0; poweralm = 0})
"k" = (/obj/structure/alien/weeds{icon_state = "weeds2"},/obj/structure/alien/weeds{desc = "A large mottled egg."; health = 100; icon_state = "egg_hatched"; name = "egg"},/turf/open/floor/plating/asteroid{initial_gas_mix = "co2=48.7;n2=13.2;o2=32.4;TEMP=251" heat_capacity = 1e+006;   },/area/awaycontent/a5{always_unpowered = 1; has_gravity = 1; name = "The Hive"; power_environ = 0; power_equip = 0; power_light = 0; poweralm = 0})
"l" = (/obj/structure/alien/weeds/node,/turf/open/floor/plating/asteroid{initial_gas_mix = "co2=48.7;n2=13.2;o2=32.4;TEMP=251" heat_capacity = 1e+006;   },/area/awaycontent/a5{always_unpowered = 1; has_gravity = 1; name = "The Hive"; power_environ = 0; power_equip = 0; power_light = 0; poweralm = 0})
"m" = (/obj/structure/alien/weeds{icon_state = "weeds1"},/obj/structure/bed/nest,/turf/open/floor/plating/asteroid{initial_gas_mix = "co2=48.7;n2=13.2;o2=32.4;TEMP=251" heat_capacity = 1e+006;   },/area/awaycontent/a5{always_unpowered = 1; has_gravity = 1; name = "The Hive"; power_environ = 0; power_equip = 0; power_light = 0; poweralm = 0})
"n" = (/obj/structure/alien/weeds{icon_state = "weeds2"},/obj/structure/bed/nest,/turf/open/floor/plating/asteroid{initial_gas_mix = "co2=48.7;n2=13.2;o2=32.4;TEMP=251" heat_capacity = 1e+006;   },/area/awaycontent/a5{always_unpowered = 1; has_gravity = 1; name = "The Hive"; power_environ = 0; power_equip = 0; power_light = 0; poweralm = 0})
"o" = (/obj/structure/alien/weeds,/obj/structure/bed/nest,/obj/effect/decal/cleanable/blood/gibs,/obj/item/clothing/mask/facehugger{icon_state = "facehugger_impregnated"; item_state = "facehugger_impregnated"; stat = 2},/obj/item/weapon/gun/projectile/automatic/pistol,/turf/open/floor/plating/asteroid{initial_gas_mix = "co2=48.7;n2=13.2;o2=32.4;TEMP=251" heat_capacity = 1e+006;   },/area/awaycontent/a5{always_unpowered = 1; has_gravity = 1; name = "The Hive"; power_environ = 0; power_equip = 0; power_light = 0; poweralm = 0})
"p" = (/obj/structure/alien/weeds{icon_state = "weeds1"},/turf/open/floor/plating/asteroid{initial_gas_mix = "co2=48.7;n2=13.2;o2=32.4;TEMP=251" heat_capacity = 1e+006;   },/area/awaycontent/a5{always_unpowered = 1; has_gravity = 1; name = "The Hive"; power_environ = 0; power_equip = 0; power_light = 0; poweralm = 0})
"q" = (/obj/structure/alien/weeds{icon_state = "weeds2"},/turf/open/floor/plating/asteroid{initial_gas_mix = "co2=48.7;n2=13.2;o2=32.4;TEMP=251" heat_capacity = 1e+006;   },/area/awaycontent/a5{always_unpowered = 1; has_gravity = 1; name = "The Hive"; power_environ = 0; power_equip = 0; power_light = 0; poweralm = 0})
"r" = (/obj/structure/alien/weeds{icon_state = "weeds1"},/obj/structure/alien/resin/wall,/obj/structure/alien/resin/wall,/turf/open/floor/plating/asteroid{initial_gas_mix = "co2=48.7;n2=13.2;o2=32.4;TEMP=251" heat_capacity = 1e+006;   },/area/awaycontent/a5{always_unpowered = 1; has_gravity = 1; name = "The Hive"; power_environ = 0; power_equip = 0; power_light = 0; poweralm = 0})
"s" = (/obj/structure/alien/weeds{icon_state = "weeds2"},/obj/structure/alien/egg,/turf/open/floor/plating/asteroid{initial_gas_mix = "co2=48.7;n2=13.2;o2=32.4;TEMP=251" heat_capacity = 1e+006;   },/area/awaycontent/a5{always_unpowered = 1; has_gravity = 1; name = "The Hive"; power_environ = 0; power_equip = 0; power_light = 0; poweralm = 0})
"t" = (/obj/structure/alien/weeds{icon_state = "weeds2"},/mob/living/simple_animal/hostile/alien/sentinel,/turf/open/floor/plating/asteroid{initial_gas_mix = "co2=48.7;n2=13.2;o2=32.4;TEMP=251" heat_capacity = 1e+006;   },/area/awaycontent/a5{always_unpowered = 1; has_gravity = 1; name = "The Hive"; power_environ = 0; power_equip = 0; power_light = 0; poweralm = 0})
"u" = (/obj/structure/alien/weeds{icon_state = "weeds1"},/obj/effect/decal/cleanable/blood/gibs,/turf/open/floor/plating/asteroid{initial_gas_mix = "co2=48.7;n2=13.2;o2=32.4;TEMP=251" heat_capacity = 1e+006;   },/area/awaycontent/a5{always_unpowered = 1; has_gravity = 1; name = "The Hive"; power_environ = 0; power_equip = 0; power_light = 0; poweralm = 0})
"v" = (/obj/structure/alien/weeds/node,/obj/effect/decal/cleanable/blood,/turf/open/floor/plating/asteroid{initial_gas_mix = "co2=48.7;n2=13.2;o2=32.4;TEMP=251" heat_capacity = 1e+006;   },/area/awaycontent/a5{always_unpowered = 1; has_gravity = 1; name = "The Hive"; power_environ = 0; power_equip = 0; power_light = 0; poweralm = 0})
"w" = (/obj/structure/alien/weeds,/obj/effect/decal/cleanable/blood/gibs,/turf/open/floor/plating/asteroid{initial_gas_mix = "co2=48.7;n2=13.2;o2=32.4;TEMP=251" heat_capacity = 1e+006;   },/area/awaycontent/a5{always_unpowered = 1; has_gravity = 1; name = "The Hive"; power_environ = 0; power_equip = 0; power_light = 0; poweralm = 0})
"x" = (/obj/structure/alien/weeds,/obj/structure/alien/weeds{desc = "A large mottled egg."; health = 100; icon_state = "egg_hatched"; name = "egg"},/turf/open/floor/plating/asteroid{initial_gas_mix = "co2=48.7;n2=13.2;o2=32.4;TEMP=251" heat_capacity = 1e+006;   },/area/awaycontent/a5{always_unpowered = 1; has_gravity = 1; name = "The Hive"; power_environ = 0; power_equip = 0; power_light = 0; poweralm = 0})
"y" = (/obj/structure/alien/weeds/node,/obj/structure/alien/resin/wall,/turf/open/floor/plating/asteroid{initial_gas_mix = "co2=48.7;n2=13.2;o2=32.4;TEMP=251" heat_capacity = 1e+006;   },/area/awaycontent/a5{always_unpowered = 1; has_gravity = 1; name = "The Hive"; power_environ = 0; power_equip = 0; power_light = 0; poweralm = 0})
"z" = (/obj/structure/alien/weeds{icon_state = "weeds1"},/obj/structure/bed/nest,/obj/effect/decal/cleanable/blood/gibs,/obj/item/clothing/mask/facehugger{icon_state = "facehugger_impregnated"; item_state = "facehugger_impregnated"; stat = 2},/obj/item/clothing/under/rank/security,/obj/item/clothing/suit/armor/vest,/obj/item/weapon/melee/baton/loaded,/obj/item/clothing/head/helmet,/turf/open/floor/plating/asteroid{initial_gas_mix = "co2=48.7;n2=13.2;o2=32.4;TEMP=251" heat_capacity = 1e+006;   },/area/awaycontent/a5{always_unpowered = 1; has_gravity = 1; name = "The Hive"; power_environ = 0; power_equip = 0; power_light = 0; poweralm = 0})
"A" = (/obj/structure/alien/weeds,/obj/structure/alien/egg,/turf/open/floor/plating/asteroid{initial_gas_mix = "co2=48.7;n2=13.2;o2=32.4;TEMP=251" heat_capacity = 1e+006;   },/area/awaycontent/a5{always_unpowered = 1; has_gravity = 1; name = "The Hive"; power_environ = 0; power_equip = 0; power_light = 0; poweralm = 0})
"B" = (/obj/structure/alien/weeds{icon_state = "weeds1"},/obj/structure/alien/weeds{desc = "A large mottled egg."; health = 100; icon_state = "egg_hatched"; name = "egg"},/obj/effect/decal/cleanable/blood/gibs,/turf/open/floor/plating/asteroid{initial_gas_mix = "co2=48.7;n2=13.2;o2=32.4;TEMP=251" heat_capacity = 1e+006;   },/area/awaycontent/a5{always_unpowered = 1; has_gravity = 1; name = "The Hive"; power_environ = 0; power_equip = 0; power_light = 0; poweralm = 0})
"C" = (/obj/structure/alien/weeds,/obj/structure/alien/weeds{desc = "A large mottled egg."; health = 100; icon_state = "egg_hatched"; name = "egg"},/obj/effect/decal/cleanable/blood,/turf/open/floor/plating/asteroid{initial_gas_mix = "co2=48.7;n2=13.2;o2=32.4;TEMP=251" heat_capacity = 1e+006;   },/area/awaycontent/a5{always_unpowered = 1; has_gravity = 1; name = "The Hive"; power_environ = 0; power_equip = 0; power_light = 0; poweralm = 0})
"D" = (/obj/structure/alien/weeds{icon_state = "weeds2"},/obj/effect/decal/cleanable/blood/gibs,/turf/open/floor/plating/asteroid{initial_gas_mix = "co2=48.7;n2=13.2;o2=32.4;TEMP=251" heat_capacity = 1e+006;   },/area/awaycontent/a5{always_unpowered = 1; has_gravity = 1; name = "The Hive"; power_environ = 0; power_equip = 0; power_light = 0; poweralm = 0})
"E" = (/obj/structure/alien/weeds,/mob/living/simple_animal/hostile/alien/drone{plants_off = 1},/turf/open/floor/plating/asteroid{initial_gas_mix = "co2=48.7;n2=13.2;o2=32.4;TEMP=251" heat_capacity = 1e+006;   },/area/awaycontent/a5{always_unpowered = 1; has_gravity = 1; name = "The Hive"; power_environ = 0; power_equip = 0; power_light = 0; poweralm = 0})
"F" = (/obj/structure/alien/weeds,/mob/living/simple_animal/hostile/alien/queen/large{desc = "A gigantic alien who is in charge of the hive and all of its loyal servants."; name = "alien queen"; pixel_x = -16; plants_off = 1},/turf/open/floor/plating/asteroid{initial_gas_mix = "co2=48.7;n2=13.2;o2=32.4;TEMP=251" heat_capacity = 1e+006;   },/area/awaycontent/a5{always_unpowered = 1; has_gravity = 1; name = "The Hive"; power_environ = 0; power_equip = 0; power_light = 0; poweralm = 0})
"G" = (/obj/structure/alien/weeds{icon_state = "weeds1"},/mob/living/simple_animal/hostile/alien/drone{plants_off = 1},/turf/open/floor/plating/asteroid{initial_gas_mix = "co2=48.7;n2=13.2;o2=32.4;TEMP=251" heat_capacity = 1e+006;   },/area/awaycontent/a5{always_unpowered = 1; has_gravity = 1; name = "The Hive"; power_environ = 0; power_equip = 0; power_light = 0; poweralm = 0})
"H" = (/obj/structure/alien/weeds,/obj/effect/decal/cleanable/blood,/turf/open/floor/plating/asteroid{initial_gas_mix = "co2=48.7;n2=13.2;o2=32.4;TEMP=251" heat_capacity = 1e+006;   },/area/awaycontent/a5{always_unpowered = 1; has_gravity = 1; name = "The Hive"; power_environ = 0; power_equip = 0; power_light = 0; poweralm = 0})
"I" = (/obj/structure/alien/weeds,/obj/structure/bed/nest,/obj/effect/decal/cleanable/blood/gibs,/obj/effect/decal/cleanable/blood,/obj/item/clothing/mask/facehugger{icon_state = "facehugger_impregnated"; item_state = "facehugger_impregnated"; stat = 2},/obj/item/clothing/under/syndicate,/obj/item/clothing/glasses/night,/turf/open/floor/plating/asteroid{initial_gas_mix = "co2=48.7;n2=13.2;o2=32.4;TEMP=251" heat_capacity = 1e+006;   },/area/awaycontent/a5{always_unpowered = 1; has_gravity = 1; name = "The Hive"; power_environ = 0; power_equip = 0; power_light = 0; poweralm = 0})
"J" = (/obj/structure/alien/weeds,/mob/living/simple_animal/hostile/alien/sentinel,/turf/open/floor/plating/asteroid{initial_gas_mix = "co2=48.7;n2=13.2;o2=32.4;TEMP=251" heat_capacity = 1e+006;   },/area/awaycontent/a5{always_unpowered = 1; has_gravity = 1; name = "The Hive"; power_environ = 0; power_equip = 0; power_light = 0; poweralm = 0})
"K" = (/obj/structure/alien/weeds/node,/mob/living/simple_animal/hostile/alien,/turf/open/floor/plating/asteroid{initial_gas_mix = "co2=48.7;n2=13.2;o2=32.4;TEMP=251" heat_capacity = 1e+006;   },/area/awaycontent/a5{always_unpowered = 1; has_gravity = 1; name = "The Hive"; power_environ = 0; power_equip = 0; power_light = 0; poweralm = 0})
"L" = (/obj/structure/alien/weeds/node,/mob/living/simple_animal/hostile/alien/drone{plants_off = 1},/turf/open/floor/plating/asteroid{initial_gas_mix = "co2=48.7;n2=13.2;o2=32.4;TEMP=251" heat_capacity = 1e+006;   },/area/awaycontent/a5{always_unpowered = 1; has_gravity = 1; name = "The Hive"; power_environ = 0; power_equip = 0; power_light = 0; poweralm = 0})
"M" = (/obj/structure/alien/weeds{icon_state = "weeds1"},/obj/structure/bed/nest,/obj/effect/decal/cleanable/blood/gibs,/obj/item/weapon/tank/internals/oxygen,/obj/item/clothing/suit/space/syndicate/orange,/obj/item/clothing/mask/gas,/obj/item/clothing/head/helmet/space/syndicate/orange,/obj/item/clothing/mask/facehugger{icon_state = "facehugger_impregnated"; item_state = "facehugger_impregnated"; stat = 2},/turf/open/floor/plating/asteroid{initial_gas_mix = "co2=48.7;n2=13.2;o2=32.4;TEMP=251" heat_capacity = 1e+006;   },/area/awaycontent/a5{always_unpowered = 1; has_gravity = 1; name = "The Hive"; power_environ = 0; power_equip = 0; power_light = 0; poweralm = 0})
"N" = (/obj/structure/alien/weeds,/obj/structure/alien/resin/wall,/turf/template_noop,/area/template_noop)
"O" = (/obj/structure/alien/weeds/node,/turf/template_noop,/area/template_noop)
"P" = (/obj/structure/alien/weeds{icon_state = "weeds2"},/obj/structure/alien/resin/wall,/turf/template_noop,/area/template_noop)
"Q" = (/obj/structure/alien/weeds{icon_state = "weeds1"},/obj/effect/decal/cleanable/blood,/mob/living/simple_animal/hostile/alien/drone{plants_off = 1},/turf/open/floor/plating/asteroid{initial_gas_mix = "co2=48.7;n2=13.2;o2=32.4;TEMP=251" heat_capacity = 1e+006;   },/area/awaycontent/a5{always_unpowered = 1; has_gravity = 1; name = "The Hive"; power_environ = 0; power_equip = 0; power_light = 0; poweralm = 0})
"R" = (/obj/structure/alien/weeds,/turf/template_noop,/area/template_noop)
"S" = (/obj/structure/alien/weeds{icon_state = "weeds2"},/turf/template_noop,/area/template_noop)
"T" = (/obj/structure/alien/weeds/node,/obj/structure/alien/resin/wall,/turf/template_noop,/area/template_noop)
"U" = (/obj/structure/alien/weeds{icon_state = "weeds1"},/obj/structure/alien/resin/wall,/turf/template_noop,/area/template_noop)
"V" = (/obj/structure/alien/weeds{icon_state = "weeds1"},/turf/template_noop,/area/template_noop)

(1,1,1) = {"
aaaaaaaaaaaaaaaaaaabcddcaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaacefgchaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaahijkicaaaaaaaaaaaaaaaaaaaa
aaahcbhcbhbaaaaaaaabhglmcaaaaaaaaaaaaaaaaaaaa
abhcggenopchcaaaaaaacbqbhaaaaaaaaaaaaaaachraa
abgspqtuvwqxhcaaaaaahcgcaaabcchaaaaaaabhcxcaa
ccepymgpqcgpqhchcbhabqphaabhzibaaaaaabcmeqhaa
hAkgmqpgppqgpgclgqhbhgcbaacBCDchbhchccqEqgcaa
begspFqlpggplqblpqgccphbcchgjpgpplpgqpgplnbaa
hcsGquHqqgqgqpchbggpqgpgEpqqgnchcbhchckggmhaa
abgqyIuJkyqqghcahcplpqcbcgqlxmcaaaaaabhqxccaa
abcegHqkpxppcbaaaccpgqhahhcxmchaaaaaahcpcbaaa
aabcbhchcbchcaaabhgqpccaaabhcbaaaaaaacgphaaaa
aaaaaaaaaaaaaaaahqqghbaaaaaaaaaaaaaaacqbcaaaa
aaaaaaaaaaaaaaaacgpcbaaaaaaaaaaaaaaaabKcaaaaa
aaaaaaaaaaaaaaaahqghaaaaaaaaaaaaaaaabcghaaaaa
aaaaaaaaaaaaaaaacpqcaaaaaaabhcbhhaachpqcaaaaa
aaaaaaaaaaaaaaaabgphbhccbhccgqpgcbchgqchaaaaa
aaaaaaaaaaaaaaaahglqcqgpgqcgphcglpqgphbaaaaaa
aaaaaaaaaaaaaaaahcqpgqpgLpgqccbhchchbcaaaaaaa
aaaaaaaaaaaaaaahcbgqpgccbqphhaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaabhggphchbacgpcbaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaahqpcbbaaaabcggchaaaaaaaaaaaaaaa
aaaaaaaaaaaabccjhhaaaaaaahqpgcaaaaaaaaaaaaaaa
aaaaaaaaaaahhipgcaaaaaaaacbqlbaaaaaaaaaaaaaaa
aaaaaaaaaacbxqgebaaaaaaaaacbbcaaaaaaaaaaaaaaa
aaaaaaaaaahMDlqhhaaaaaaaaaNOOPaaPPaaaaaaaaaaa
aaaaaaaaaabiQgicaaaaaaaaaaPRSTPNPaaaaaaaaaaaa
aaaaaaaaaahcqehbaaaaaaaaaUTVVSRVSaaaaaaaaaaaa
aaaaaaaaaaahcbbaaaaaaaaaPNRSRVSRaaaaaaaaaaaaa
"}


code:
"a" = (/turf/open/space,/area/space)
"b" = (/turf/closed/mineral,/area/space)
"c" = (/turf/closed/mineral/random/low_chance,/area/space)

(1,1,1) = {"
aabbaaa
abbbcaa
bbcccca
cccccbb
bcccccb
bccccbb
bcbcbba
aabbaaa
"}

license: mit


code:
"a" = (/turf/open/space,/area/space)
"b" = (/turf/open/space,/turf/closed/wall/shuttle{tag = "icon-swall_f6"; icon_state = "swall_f6"},/area/space)
"c" = (/obj/structure/grille,/obj/structure/window/shuttle,/turf/open/floor/plating/airless,/area/space)
"d" = (/turf/open/space,/turf/closed/wall/shuttle{tag = "icon-swall_f10"; icon_state = "swall_f10"},/area/space)
"e" = (/turf/closed/wall/shuttle{tag = "icon-swall3"; icon_state = "swall3"},/area/space)
"f" = (/turf/open/floor/plasteel/shuttle,/area/space)
"g" = (/obj/structure/chair{dir = 1},/turf/open/floor/plasteel/shuttle,/area/space)
"h" = (/turf/closed/wall/shuttle{tag = "icon-swall13"; icon_state = "swall13"},/area/space)
"i" = (/turf/closed/wall/shuttle{tag = "icon-swall8"; icon_state = "swall8"},/area/space)
"j" = (/obj/machinery/door/unpowered/shuttle,/turf/open/floor/plasteel/shuttle,/area/space)
"k" = (/turf/closed/wall/shuttle{tag = "icon-swall4"; icon_state = "swall4"},/area/space)
"l" = (/obj/structure/chair{dir = 4},/turf/open/floor/plasteel/shuttle,/area/space)
"m" = (/obj/structure/chair{dir = 8},/turf/open/floor/plasteel/shuttle,/area/space)
"n" = (/obj/structure/shuttle/engine/heater,/turf/open/floor/plating/airless,/area/space)
"o" = (/turf/open/space,/turf/closed/wall/shuttle{tag = "icon-swall_f5"; icon_state = "swall_f5"},/area/space)
"p" = (/obj/structure/shuttle/engine/propulsion{icon_state = "propulsion_l"},/turf/open/floor/plating/airless,/area/space)
"q" = (/obj/structure/shuttle/engine/propulsion,/turf/open/floor/plating/airless,/area/space)
"r" = (/obj/structure/shuttle/engine/propulsion{icon_state = "propulsion_r"},/turf/open/floor/plating/airless,/area/space)
"s" = (/turf/open/space,/turf/closed/wall/shuttle{tag = "icon-swall_f9"; icon_state = "swall_f9"},/area/space)

(1,1,1) = {"
abcccda
aefgfea
aefffea
bhijkhd
elfffme
elfffme
jfffffj
jfffffj
efffffe
ennnnne
opqqqrs
"}


code:
/*
The /tg/ codebase currently requires you to have 7 z-levels of the same size dimensions.
z-level order is important, the order you put them in inside this file will determine what z level number they are assigned ingame.
Names of z-level do not matter, but order does greatly, for instances such as checking alive status of revheads on z1

current as of 2014/11/24
z1 = station
z2 = centcomm
z3 = derelict telecomms satellite
z4 = derelict station
z5 = mining
z6 = empty space
z7 = empty space
*/

#if !defined(MAP_FILE)

		#define TITLESCREEN "title" //Add an image in misc/fullscreen.dmi, and set this define to the icon_state, to set a custom titlescreen for your map

		#define MINETYPE "lavaland"

        #include "map_files\TgStation\tgstation.2.1.3.dmm"
        #include "map_files\generic\z2.dmm"
        #include "map_files\generic\z3.dmm"
        #include "map_files\generic\z4.dmm"
        #include "map_files\generic\lavaland.dmm"
        #include "map_files\generic\z6.dmm"
        #include "map_files\generic\z7.dmm"

		#define MAP_PATH "map_files/TgStation"
        #define MAP_FILE "tgstation.2.1.3.dmm"
        #define MAP_NAME "Box Station"

        #define MAP_TRANSITION_CONFIG	list(MAIN_STATION = CROSSLINKED, CENTCOMM = SELFLOOPING, ABANDONED_SATELLITE = CROSSLINKED, DERELICT = CROSSLINKED, MINING = SELFLOOPING, EMPTY_AREA_1 = CROSSLINKED, EMPTY_AREA_2 = CROSSLINKED)

#elif !defined(MAP_OVERRIDE)

	#warn a map has already been included, ignoring /tg/station 2.

#endif


code:
The author or authors of this code dedicate any and all copyright interest in
this code to the public domain. We make this dedication for the benefit of the
public at large and to the detriment of our heirs and successors. We intend
this dedication to be an overt act of relinquishment in perpetuity of all
present and future rights to this code under copyright law.


code:
# Configuration for the minibot.py bot starts here
server = "irc.rizon.net"
port = 6667

channels = ["#asdfgbus", "#botbus"]
defaultchannel = "#asdfgbus"

nick = "minibot-testing-ss13"
altnick = "minibot-testing-ss13_"
name = "minibot"
ident = "minibot"
realname = "minibot"
password = "CHANGETHIS"
# Configuration ends here


code:
#!/usr/bin/env python3
# This bot was made by tkdrg.
# Ask #coderbus@irc.rizon.net if this breaks.
# See LICENSE-bot_folder.txt for the license of the files in this folder.
from config import *
import collections
import time
import pickle
import socket
import sys
import threading
import logging

logging.basicConfig(level=logging.INFO)
global irc

def print_err(msg):
	logging.error(msg)

def setup_irc_socket():
	s = socket.socket()
	s.settimeout(240)

	while 1:
		try:
			s.connect((server, port))
		except socket.error:
			print_err("Unable to connect to server {0}:{1}, attempting to reconnect in 20 seconds.".format(server, port))
			time.sleep(20)
		else:
			print_err("Connection established to server {0}:{1}.".format(server, port))
			break

	s.send(bytes("NICK {0}\r\n".format(nick), "UTF-8"))
	s.send(bytes("USER {0} {1} {2} :{3}\r\n".format(ident, server, name, realname), "UTF-8"))
	return s

def setup_nudge_socket():
	s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
	s.bind(("", 45678))  # localhost:45678
	s.listen(5)
	return s

def nudge_handler():
	global irc
	nudge = setup_nudge_socket()
	message_queue = collections.deque()
	while 1:
		if len(message_queue):
			message = message_queue.popleft()
		else:
			try:
				s, ip = nudge.accept()
			except:
				print_err("Nudge socket lost, attempting to reopen.")
				nudge = setup_nudge_socket()
				continue
			rawdata = s.recv(1024)
			s.close()
			data = pickle.loads(rawdata)
			logging.info(data)
			if data["ip"][0] == "#":
				message = "{0} :AUTOMATIC ANNOUNCEMENT : {1}\r\n".format(data["ip"], str(" ".join(data["data"])))
			else:
				message = "{0} :AUTOMATIC ANNOUNCEMENT : {1} | {2}\r\n".format(defaultchannel, data["ip"], str(" ".join(data["data"])))
		try:
			irc.send(bytes("PRIVMSG {0}".format(message), "UTF-8"))
		except:
			print_err("Nudge received without IRC socket, appending to queue.")
			print_err("Message: {0}".format(message))
			message_queue.append(message)

def irc_handler():
	global irc
	while 1:
		try:
			buf = irc.recv(1024).decode("UTF-8").split("\n")
			for i in buf:
				logging.info(i)
				if i[0:4] == "PING":
					irc.send(bytes("PONG {0}\r\n".format(i[5:]), "UTF-8"))
				else:
					l = i.split(" ")
					if len(l) < 2:
						continue
					elif l[1] == "001":
						print_err("connected and registered, identifing and joining channels")
						irc.send(bytes("PRIVMSG NickServ :IDENTIFY {0}\r\n".format(password), "UTF-8"))
						time.sleep(1)
						for channel in channels:
							irc.send(bytes("JOIN {0}\r\n".format(channel), "UTF-8"))
					elif l[1] == "477":
						print_err("Error: Nickname was not registered when joining {0}. Reauthing and retrying...".format(l[3]))
						irc.send(bytes("PRIVMSG NickServ :IDENTIFY {0}\r\n".format(password), "UTF-8"))
						time.sleep(5)
						irc.send(bytes("JOIN {0}\r\n".format(l[3]), "UTF-8"))
					elif l[1] == "433":
						print_err("Error: Nickname already in use. Attempting to use alt nickname if available, sleeping 60s otherwise...")
						if(altnick):
							irc.send(bytes("NICK {0}\r\n".format(altnick), "UTF-8"))
						else:
							time.sleep(60)
							irc = setup_irc_socket()
		except:
			print_err("Lost connection to IRC server.")
			irc = setup_irc_socket()

if __name__ == "__main__":
	irc = setup_irc_socket()
	t = threading.Thread(target=nudge_handler)
	t.daemon = True
	t.start()
	irc_handler()


code:
#!/usr/bin/env python3
import sys
import pickle
import socket

def pack():
	ip = sys.argv[1]
	try:
		data = sys.argv[2:]
	except:
		data = "NO DATA SPECIFIED"

	nudge(pickle.dumps({"ip": ip, "data": data}))

def nudge(data):
	s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
	s.connect(("localhost", 45678))
	s.send(data)
	s.close()

if __name__ == "__main__" and len(sys.argv) > 1:
	pack()


code:
###################################################################################
# This is a list of ckeys authorized to use client-side debug options:            #
# Profile, Reboot, Resume, Status, and Trace-client                               #
# Of these, Profile is the most relevant as it allows you to easily               #
# retrieve information regarding the game's processing.                           #
# If a ckey is on this list, and has proper admin privledges,                     #
# they will be able to right-click the top of the client to access these options. #                                                                                #
# Case is not important for ckey.                                                 #
###################################################################################
aranclanos
cheridan
giacomand
rockdtben
MrStonedOne
Jordie0608
Dunc


code:
//////////////////////
//Heap object
//////////////////////

/Heap
	var/list/L
	var/cmp

/Heap/New(compare)
	L = new()
	cmp = compare

/Heap/proc/IsEmpty()
	return !L.len

//Insert and place at its position a new node in the heap
/Heap/proc/Insert(atom/A)

	L.Add(A)
	Swim(L.len)

//removes and returns the first element of the heap
//(i.e the max or the min dependant on the comparison function)
/Heap/proc/Pop()
	if(!L.len)
		return 0
	. = L[1]

	L[1] = L[L.len]
	L.Cut(L.len)

	Sink(1)

//Get a node up to its right position in the heap
/Heap/proc/Swim(var/index)
	var/parent = round(index * 0.5)

	while(parent > 0 && (call(cmp)(L[index],L[parent]) > 0))
		L.Swap(index,parent)
		index = parent
		parent = round(index * 0.5)

//Get a node down to its right position in the heap
/Heap/proc/Sink(var/index)
	var/g_child = GetGreaterChild(index)

	while(g_child > 0 && (call(cmp)(L[index],L[g_child]) < 0))
		L.Swap(index,g_child)
		index = g_child
		g_child = GetGreaterChild(index)

//Returns the greater (relative to the comparison proc) of a node children
//or 0 if there's no child
/Heap/proc/GetGreaterChild(var/index)
	if(index * 2 > L.len)
		return 0

	if(index * 2 + 1 > L.len)
		return index * 2

	if(call(cmp)(L[index * 2],L[index * 2 + 1]) < 0)
		return index * 2 + 1
	else
		return index * 2

//Replaces a given node so it verify the heap condition
/Heap/proc/ReSort(atom/A)
	var/index = L.Find(A)

	Swim(index)
	Sink(index)

/Heap/proc/List()
	. = L.Copy()


code:
//Ok so it's technically a double linked list, bite me.

/datum/linked_list
	var/datum/linked_node/head
	var/datum/linked_node/tail
	var/node_amt = 0

/datum/linked_node
	var/value = null
	var/datum/linked_list/linked_list = null
	var/datum/linked_node/next_node = null
	var/datum/linked_node/previous_node = null

/datum/linked_list/proc/IsEmpty()
	. = (node_amt <= 0)

//Add a linked_node (or value, creating a linked_node) at position
//the added node BECOMES the position-th element,
//eg: add("Test",5), the 5th node is now "Test", the previous 5th moves up to become the 6th
/datum/linked_list/proc/Add(node, position)
	var/datum/linked_node/adding
	if(istype(node, /datum/linked_node))
		adding = node
	else
		adding = new()
		adding.value = node

	if(!adding.linked_list || (adding.linked_list && (adding.linked_list != src)))
		node_amt++

	adding.linked_list = src

	if(position && position < node_amt)
		//Replacing head
		if(position == 1)
			if(head)
				head.previous_node = adding
				adding.next_node = head
			head = adding

		//Replacing any middle node
		else
			var/location = 0
			var/datum/linked_node/at
			while((location != position) && (location <= node_amt))
				if(at)
					if(at.next_node)
						at = at.next_node
					else
						break
				else
					at = head
				location++

			//Push at up and assume it's place as the position-th element
			if(at && at.previous_node)
				at.previous_node.next_node = adding
				adding.previous_node = at.previous_node
				at.previous_node = adding
				adding.next_node = at
		return

	//Replacing tail
	if(tail)
		tail.next_node = adding
		adding.previous_node = tail
		if(!tail.previous_node)
			head = tail
	tail = adding

//Remove a linked_node or the linked_node of a value
//If you specify a value the FIRST ONE is removed
/datum/linked_list/proc/Remove(node)
	var/datum/linked_node/removing
	if(istype(node,/datum/linked_node))
		removing = node
	else
		//optimise removing head and tail, no point looping for them, especially the tail
		if(removing == head)
			removing = head
		else if(removing == tail)
			removing = tail
		else
			var/location = 1
			var/current_value = null
			var/datum/linked_node/at = null
			while((current_value != node) && (location <= node_amt))
				if(at)
					if(at.next_node)
						at = at.next_node
				else
					at = head
				location++
				if(at)
					current_value = at.value
					if(current_value == node)
						removing = at
						break

	//Adjust pointers of where removing -was- in the chain.
	if(removing)
		if(removing.previous_node)
			if(removing == tail)
				tail = removing.previous_node
			if(removing.next_node)
				if(removing == head)
					head = removing.next_node
				removing.next_node.previous_node = removing.previous_node
				removing.previous_node.next_node = removing.next_node
			else
				removing.previous_node.next_node = null
		else
			if(removing.next_node)
				if(removing == head)
					head = removing.next_node
				removing.next_node.previous_node = null

		//if this is still true at this point, there's no more nodes to replace them with
		if(removing == head)
			head = null
		if(removing == tail)
			tail = null

		removing.next_node = null
		removing.previous_node = null
		if(removing.linked_list == src)
			node_amt--
		removing.linked_list = null

		return removing
	return 0

//Removes and deletes a node or value
/datum/linked_list/proc/RemoveDelete(node)
	var/datum/linked_node/dead = Remove(node)
	if(dead)
		qdel(dead)
		return 1
	return 0

//Empty the linked_list, deleting all nodes
/datum/linked_list/proc/Empty()
	var/datum/linked_node/n = head
	while(n)
		var/next = n.next_node
		Remove(n)
		qdel(n)
		n = next
	node_amt = 0

//Some debugging tools
/datum/linked_list/proc/CheckNodeLinks()
	var/datum/linked_node/n = head
	while(n)
		. = "|[n.value]|"
		if(n.previous_node)
			. = "[n.previous_node.value]<-" + .
		if(n.next_node)
			. += "->[n.next_node.value]"
		n = n.next_node
		. += "<BR>"

/datum/linked_list/proc/DrawNodeLinks()
	. = "|<-"
	var/datum/linked_node/n = head
	while(n)
		if(n.previous_node)
			. += "<-"
		. += "[n.value]"
		if(n.next_node)
			. += "->"
		n = n.next_node
	. += "->|"

/datum/linked_list/proc/ToList()
	. = list()
	var/datum/linked_node/n = head
	while(n)
		. += n
		n = n.next_node


code:
//////////////////////
//PriorityQueue object
//////////////////////

//an ordered list, using the cmp proc to weight the list elements
/PriorityQueue
	var/list/L //the actual queue
	var/cmp //the weight function used to order the queue

/PriorityQueue/New(compare)
	L = new()
	cmp = compare

/PriorityQueue/proc/IsEmpty()
	return !L.len

//return the index the element should be in the priority queue using dichotomic search
/PriorityQueue/proc/FindElementIndex(atom/A)
	var/i = 1
	var/j = L.len
	var/mid

	while(i < j)
		mid = round((i+j)/2)

		if(call(cmp)(L[mid],A) < 0)
			i = mid + 1
		else
			j = mid

	if(i == 1 || i ==  L.len) //edge cases
		return (call(cmp)(L[i],A) > 0) ? i : i+1
	else
		return i

//add an element in the list,
//immediatly ordering it to its position using dichotomic search
/PriorityQueue/proc/Enqueue(atom/A)
	if(!L.len)
		L.Add(A)
		return

	L.Insert(FindElementIndex(A),A)

//removes and returns the first element in the queue
/PriorityQueue/proc/Dequeue()
	if(!L.len)
		return 0
	. = L[1]

	Remove(.)

//removes an element
/PriorityQueue/proc/Remove(atom/A)
	return L.Remove(A)

//returns a copy of the elements list
/PriorityQueue/proc/List()
	. = L.Copy()

//return the position of an element or 0 if not found
/PriorityQueue/proc/Seek(atom/A)
	. = L.Find(A)

//return the element at the i_th position
/PriorityQueue/proc/Get(i)
	if(i > L.len || i < 1)
		return 0
	return L[i]

//replace the passed element at it's right position using the cmp proc
/PriorityQueue/proc/ReSort(atom/A)
	var/i = Seek(A)
	if(i == 0)
		return
	while(i < L.len && call(cmp)(L[i],L[i+1]) > 0)
		L.Swap(i,i+1)
		i++
	while(i > 1 && call(cmp)(L[i],L[i-1]) <= 0) //last inserted element being first in case of ties (optimization)
		L.Swap(i,i-1)
		i--


code:
/datum/stack
	var/list/stack = list()
	var/max_elements = 0

/datum/stack/New(list/elements,max)
	..()
	if(elements)
		stack = elements.Copy()
	if(max)
		max_elements = max

/datum/stack/proc/Pop()
	if(is_empty())
		return null
	. = stack[stack.len]
	stack.Cut(stack.len,0)

/datum/stack/proc/Push(element)
	if(max_elements && (stack.len+1 > max_elements))
		return null
	stack += element

/datum/stack/proc/Top()
	if(is_empty())
		return null
	. = stack[stack.len]

/datum/stack/proc/is_empty()
	. = stack.len ? 0 : 1

//Rotate entire stack left with the leftmost looping around to the right
/datum/stack/proc/RotateLeft()
	if(is_empty())
		return 0
	. = stack[1]
	stack.Cut(1,2)
	Push(.)

//Rotate entire stack to the right with the rightmost looping around to the left
/datum/stack/proc/RotateRight()
	if(is_empty())
		return 0
	. = stack[stack.len]
	stack.Cut(stack.len,0)
	stack.Insert(1,.)

/datum/stack/proc/Copy()
	var/datum/stack/S=new()
	S.stack = stack.Copy()
	S.max_elements = max_elements
	return S

/datum/stack/proc/Clear()
	stack.Cut()


code:
/*
	This folder is full of #define statements.  They are similar to constants,
	but must come before any code that references them, and they do not take up
	memory the way constants do.

	The values in this folder are NOT options.  They are not for hosts to play with.
	Some of the values are arbitrary and only need to be different from similar constants;
	for example, the genetic mutation numbers in genetics.dm mean nothing, but MUST be distinct.

	It is wise not to touch them unless you understand what they do, where they're used,
	and most importantly,
	how to undo your changes if you screw it up.
	- Sayu
*/


code:
//A set of constants used to determine which type of mute an admin wishes to apply:
//Please read and understand the muting/automuting stuff before changing these. MUTE_IC_AUTO etc = (MUTE_IC << 1)
//Therefore there needs to be a gap between the flags for the automute flags
#define MUTE_IC			1
#define MUTE_OOC		2
#define MUTE_PRAY		4
#define MUTE_ADMINHELP	8
#define MUTE_DEADCHAT	16
#define MUTE_ALL		31

//Some constants for DB_Ban
#define BANTYPE_PERMA		1
#define BANTYPE_TEMP		2
#define BANTYPE_JOB_PERMA	3
#define BANTYPE_JOB_TEMP	4
#define BANTYPE_ANY_FULLBAN	5 //used to locate stuff to unban.
#define BANTYPE_APPEARANCE	6
#define BANTYPE_ADMIN_PERMA	7
#define BANTYPE_ADMIN_TEMP	8
#define BANTYPE_ANY_JOB		9 //used to remove jobbans

//Please don't edit these values without speaking to Errorage first	~Carn
//Admin Permissions
#define R_BUILDMODE		1
#define R_ADMIN			2
#define R_BAN			4
#define R_FUN			8
#define R_SERVER		16
#define R_DEBUG			32
#define R_POSSESS		64
#define R_PERMISSIONS	128
#define R_STEALTH		256
#define R_REJUVINATE	512
#define R_VAREDIT		1024
#define R_SOUNDS		2048
#define R_SPAWN			4096

#define R_MAXPERMISSION 4096 //This holds the maximum value for a permission. It is used in iteration, so keep it updated.


code:
#define FIRE_DAMAGE_MODIFIER	0.0215	//Higher values result in more external fire damage to the skin (default 0.0215)
#define AIR_DAMAGE_MODIFIER		2.025	//More means less damage from hot air scalding lungs, less = more damage. (default 2.025)

#define MOLES_CELLSTANDARD		(ONE_ATMOSPHERE*CELL_VOLUME/(T20C*R_IDEAL_GAS_EQUATION))	//moles in a 2.5 m^3 cell at 101.325 Pa and 20 degC
#define M_CELL_WITH_RATIO		(MOLES_CELLSTANDARD * 0.005)
#define O2STANDARD				0.21
#define N2STANDARD				0.79
#define MOLES_O2STANDARD		(MOLES_CELLSTANDARD*O2STANDARD)	// O2 standard value (21%)
#define MOLES_N2STANDARD		(MOLES_CELLSTANDARD*N2STANDARD)	// N2 standard value (79%)

//indices of values in gas lists. used by listmos.
#define MOLES			1
#define ARCHIVE			2
#define GAS_META		3
#define META_GAS_SPECIFIC_HEAT	1
#define META_GAS_NAME			2
#define META_GAS_OVERLAY		4
#define META_GAS_MOLES_VISIBLE	3

//stuff you should probably leave well alone!
//ATMOS
#define CELL_VOLUME							2500	//liters in a cell
#define BREATH_VOLUME						0.5		//liters in a normal breath
#define BREATH_PERCENTAGE					(BREATH_VOLUME/CELL_VOLUME)					//Amount of air to take a from a tile
#define HUMAN_NEEDED_OXYGEN					(MOLES_CELLSTANDARD*BREATH_PERCENTAGE*0.16)	//Amount of air needed before pass out/suffocation commences
#define NORMPIPERATE						30		//pipe-insulation rate divisor
#define HEATPIPERATE						8		//heat-exch pipe insulation
#define FLOWFRAC							0.99	//fraction of gas transfered per process
#define TANK_LEAK_PRESSURE					(30.*ONE_ATMOSPHERE)	//Tank starts leaking
#define TANK_RUPTURE_PRESSURE				(35.*ONE_ATMOSPHERE)	//Tank spills all contents into atmosphere
#define TANK_FRAGMENT_PRESSURE				(40.*ONE_ATMOSPHERE)	//Boom 3x3 base explosion
#define TANK_FRAGMENT_SCALE	    			(6.*ONE_ATMOSPHERE)	//+1 for each SCALE kPa aboe threshold
#define MINIMUM_AIR_RATIO_TO_SUSPEND		0.1		//Ratio of air that must move to/from a tile to reset group processing
#define MINIMUM_AIR_RATIO_TO_MOVE			0.001	//Minimum ratio of air that must move to/from a tile
#define MINIMUM_AIR_TO_SUSPEND				(MOLES_CELLSTANDARD*MINIMUM_AIR_RATIO_TO_SUSPEND)	//Minimum amount of air that has to move before a group processing can be suspended
#define MINIMUM_MOLES_DELTA_TO_MOVE			(MOLES_CELLSTANDARD*MINIMUM_AIR_RATIO_TO_MOVE) //Either this must be active
#define EXCITED_GROUP_BREAKDOWN_CYCLES		4
#define EXCITED_GROUP_DISMANTLE_CYCLES		16
#define MINIMUM_TEMPERATURE_TO_MOVE			(T20C+100)			//or this (or both, obviously)
#define MINIMUM_TEMPERATURE_RATIO_TO_SUSPEND		0.012
#define MINIMUM_TEMPERATURE_DELTA_TO_SUSPEND		4		//Minimum temperature difference before group processing is suspended
#define MINIMUM_TEMPERATURE_DELTA_TO_CONSIDER		0.5		//Minimum temperature difference before the gas temperatures are just set to be equal
#define MINIMUM_TEMPERATURE_FOR_SUPERCONDUCTION		T20C+10
#define MINIMUM_TEMPERATURE_START_SUPERCONDUCTION	T20C+200
#define FLOOR_HEAT_TRANSFER_COEFFICIENT		0.4
#define WALL_HEAT_TRANSFER_COEFFICIENT		0.0
#define DOOR_HEAT_TRANSFER_COEFFICIENT		0.0
#define SPACE_HEAT_TRANSFER_COEFFICIENT		0.2		//a hack to partly simulate radiative heat
#define OPEN_HEAT_TRANSFER_COEFFICIENT		0.4
#define WINDOW_HEAT_TRANSFER_COEFFICIENT	0.1		//a hack for now
	//Must be between 0 and 1. Values closer to 1 equalize temperature faster
	//Should not exceed 0.4 else strange heat flow occur
#define FIRE_MINIMUM_TEMPERATURE_TO_SPREAD	150+T0C
#define FIRE_MINIMUM_TEMPERATURE_TO_EXIST	100+T0C
#define FIRE_SPREAD_RADIOSITY_SCALE			0.85
#define FIRE_CARBON_ENERGY_RELEASED			500000	//Amount of heat released per mole of burnt carbon into the tile
#define FIRE_PLASMA_ENERGY_RELEASED			3000000	//Amount of heat released per mole of burnt plasma into the tile
#define FIRE_GROWTH_RATE					40000	//For small fires
#define CARBON_LIFEFORM_FIRE_RESISTANCE 	200+T0C	//Resistance to fire damage
#define CARBON_LIFEFORM_FIRE_DAMAGE			4		//Fire damage
	//Plasma fire properties
#define OXYGEN_BURN_RATE_BASE				1.4
#define PLASMA_BURN_RATE_DELTA				9
#define PLASMA_MINIMUM_BURN_TEMPERATURE		100+T0C
#define PLASMA_UPPER_TEMPERATURE			1370+T0C
#define PLASMA_MINIMUM_OXYGEN_NEEDED		2
#define PLASMA_MINIMUM_OXYGEN_PLASMA_RATIO	30
#define PLASMA_OXYGEN_FULLBURN				10
#define MIN_PLASMA_DAMAGE					1
#define MAX_PLASMA_DAMAGE					10
#define MOLES_PLASMA_VISIBLE				0.5		//Moles in a standard cell after which plasma is visible
	//Plasma fusion properties
#define PLASMA_BINDING_ENERGY				3000000
#define MAX_CARBON_EFFICENCY				9
#define PLASMA_FUSED_COEFFICENT				0.08
#define CARBON_CATALYST_COEFFICENT			0.01
#define FUSION_PURITY_THRESHOLD				0.9
// Pressure limits.
#define HAZARD_HIGH_PRESSURE				550		//This determins at what pressure the ultra-high pressure red icon is displayed. (This one is set as a constant)
#define WARNING_HIGH_PRESSURE				325		//This determins when the orange pressure icon is displayed (it is 0.7 * HAZARD_HIGH_PRESSURE)
#define WARNING_LOW_PRESSURE				50		//This is when the gray low pressure icon is displayed. (it is 2.5 * HAZARD_LOW_PRESSURE)
#define HAZARD_LOW_PRESSURE					20		//This is when the black ultra-low pressure icon is displayed. (This one is set as a constant)

#define TEMPERATURE_DAMAGE_COEFFICIENT		1.5		//This is used in handle_temperature_damage() for humans, and in reagents that affect body temperature. Temperature damage is multiplied by this amount.
#define BODYTEMP_AUTORECOVERY_DIVISOR		12		//This is the divisor which handles how much of the temperature difference between the current body temperature and 310.15K (optimal temperature) humans auto-regenerate each tick. The higher the number, the slower the recovery. This is applied each tick, so long as the mob is alive.
#define BODYTEMP_AUTORECOVERY_MINIMUM		10		//Minimum amount of kelvin moved toward 310.15K per tick. So long as abs(310.15 - bodytemp) is more than 50.
#define BODYTEMP_COLD_DIVISOR				6		//Similar to the BODYTEMP_AUTORECOVERY_DIVISOR, but this is the divisor which is applied at the stage that follows autorecovery. This is the divisor which comes into play when the human's loc temperature is lower than their body temperature. Make it lower to lose bodytemp faster.
#define BODYTEMP_HEAT_DIVISOR				6		//Similar to the BODYTEMP_AUTORECOVERY_DIVISOR, but this is the divisor which is applied at the stage that follows autorecovery. This is the divisor which comes into play when the human's loc temperature is higher than their body temperature. Make it lower to gain bodytemp faster.
#define BODYTEMP_COOLING_MAX				30		//The maximum number of degrees that your body can cool in 1 tick, when in a cold area.
#define BODYTEMP_HEATING_MAX				30		//The maximum number of degrees that your body can heat up in 1 tick, when in a hot area.

#define BODYTEMP_HEAT_DAMAGE_LIMIT			360.15 // The limit the human body can take before it starts taking damage from heat.
#define BODYTEMP_COLD_DAMAGE_LIMIT			260.15 // The limit the human body can take before it starts taking damage from coldness.

#define SPACE_HELM_MIN_TEMP_PROTECT			2.0		//what min_cold_protection_temperature is set to for space-helmet quality headwear. MUST NOT BE 0.
#define SPACE_HELM_MAX_TEMP_PROTECT			1500	//Thermal insulation works both ways /Malkevin
#define SPACE_SUIT_MIN_TEMP_PROTECT			2.0		//what min_cold_protection_temperature is set to for space-suit quality jumpsuits or suits. MUST NOT BE 0.
#define SPACE_SUIT_MAX_TEMP_PROTECT			1500

#define FIRE_SUIT_MIN_TEMP_PROTECT			60		//Cold protection for firesuits
#define FIRE_SUIT_MAX_TEMP_PROTECT			30000	//what max_heat_protection_temperature is set to for firesuit quality suits. MUST NOT BE 0.
#define FIRE_HELM_MIN_TEMP_PROTECT			60		//Cold protection for fire helmets
#define FIRE_HELM_MAX_TEMP_PROTECT			30000	//for fire helmet quality items (red and white hardhats)

#define FIRE_IMMUNITY_SUIT_MAX_TEMP_PROTECT	35000	//what max_heat_protection_temperature is set to for firesuit quality suits. MUST NOT BE 0.
#define FIRE_IMMUNITY_HELM_MAX_TEMP_PROTECT	35000	//for fire helmet quality items (red and white hardhats)

#define HELMET_MIN_TEMP_PROTECT				160		//For normal helmets
#define HELMET_MAX_TEMP_PROTECT				600		//For normal helmets
#define ARMOR_MIN_TEMP_PROTECT				160		//For armor
#define ARMOR_MAX_TEMP_PROTECT				600		//For armor

#define GLOVES_MIN_TEMP_PROTECT				2.0		//For some gloves (black and)
#define GLOVES_MAX_TEMP_PROTECT				1500	//For some gloves
#define SHOES_MIN_TEMP_PROTECT				2.0		//For gloves
#define SHOES_MAX_TEMP_PROTECT				1500	//For gloves

#define PRESSURE_DAMAGE_COEFFICIENT			4		//The amount of pressure damage someone takes is equal to (pressure / HAZARD_HIGH_PRESSURE)*PRESSURE_DAMAGE_COEFFICIENT, with the maximum of MAX_PRESSURE_DAMAGE
#define MAX_HIGH_PRESSURE_DAMAGE			4		//This used to be 20... I got this much random rage for some retarded decision by polymorph?! Polymorph now lies in a pool of blood with a katana jammed in his spleen. ~Errorage --PS: The katana did less than 20 damage to him :(
#define LOW_PRESSURE_DAMAGE					2		//The amounb of damage someone takes when in a low pressure area (The pressure threshold is so low that it doesn't make sense to do any calculations, so it just applies this flat value).

#define COLD_SLOWDOWN_FACTOR				20		//Humans are slowed by the difference between bodytemp and BODYTEMP_COLD_DAMAGE_LIMIT divided by this

// Atmos pipe limits
#define MAX_OUTPUT_PRESSURE					4500 // (kPa) What pressure pumps and powered equipment max out at.
#define MAX_TRANSFER_RATE					200 // (L/s) Maximum speed powered equipment can work at.

//Atmos machinery pipenet stuff

// used for device_type vars; used by DEVICE_TYPE_LOOP
#define UNARY		1
#define BINARY 		2
#define TRINARY		3
#define QUATERNARY	4

// this is the standard for loop used by all sorts of atmos machinery procs
#define DEVICE_TYPE_LOOP	var/I in 1 to device_type

// defines for the various machinery lists
// NODE_I, AIR_I, PARENT_I are used within DEVICE_TYPE_LOOP

//  nodes list - all atmos machinery
#define NODE1	nodes[1]
#define	NODE2	nodes[2]
#define NODE3	nodes[3]
#define NODE4	nodes[4]
#define NODE_I	nodes[I]

//  airs list - components only
#define AIR1	airs[1]
#define AIR2	airs[2]
#define AIR3	airs[3]
#define AIR_I	airs[I]

//  parents list - components only
#define PARENT1		parents[1]
#define PARENT2		parents[2]
#define PARENT3		parents[3]
#define PARENT_I	parents[I]

//Tanks
#define TANK_MAX_RELEASE_PRESSURE (ONE_ATMOSPHERE*3)
#define TANK_MIN_RELEASE_PRESSURE 0
#define TANK_DEFAULT_RELEASE_PRESSURE 16


code:
//Bot defines, placed here so they can be read by other things!

#define BOT_STEP_DELAY 4 //Delay between movemements
#define BOT_STEP_MAX_RETRIES 5 //Maximum times a bot will retry to step from its position

#define DEFAULT_SCAN_RANGE		7	//default view range for finding targets.

//Mode defines
#define BOT_IDLE 			0	// idle
#define BOT_HUNT 			1	// found target, hunting
#define BOT_PREP_ARREST 	2	// at target, preparing to arrest
#define BOT_ARREST			3	// arresting target
#define BOT_START_PATROL	4	// start patrol
#define BOT_PATROL			5	// patrolling
#define BOT_SUMMON			6	// summoned by PDA
#define BOT_CLEANING 		7	// cleaning (cleanbots)
#define BOT_REPAIRING		8	// repairing hull breaches (floorbots)
#define BOT_MOVING			9	// for clean/floor/med bots, when moving.
#define BOT_HEALING			10	// healing people (medbots)
#define BOT_RESPONDING		11	// responding to a call from the AI
#define BOT_DELIVER			12	// moving to deliver
#define BOT_GO_HOME			13	// returning to home
#define BOT_BLOCKED			14	// blocked
#define BOT_NAV				15	// computing navigation
#define BOT_WAIT_FOR_NAV	16	// waiting for nav computation
#define BOT_NO_ROUTE		17	// no destination beacon found (or no route)


code:
//ITEM INVENTORY SLOT BITMASKS
#define SLOT_OCLOTHING	1
#define SLOT_ICLOTHING	2
#define SLOT_GLOVES		4
#define SLOT_EYES		8
#define SLOT_EARS		16
#define SLOT_MASK		32
#define SLOT_HEAD		64
#define SLOT_FEET		128
#define SLOT_ID			256
#define SLOT_BELT		512
#define SLOT_BACK		1024
#define SLOT_POCKET		2048		//this is to allow items with a w_class of 3 or 4 to fit in pockets.
#define SLOT_DENYPOCKET	4096	//this is to deny items with a w_class of 2 or 1 to fit in pockets.

//Bit flags for the flags_inv variable, which determine when a piece of clothing hides another. IE a helmet hiding glasses.
#define HIDEGLOVES		1
#define HIDESUITSTORAGE	2
#define HIDEJUMPSUIT	4	//these first four are only used in exterior suits
#define HIDESHOES		8
#define HIDEMASK		16	//these last six are only used in masks and headgear.
#define HIDEEARS		32	// (ears means headsets and such)
#define HIDEEYES		64	// Whether eyes and glasses are hidden
#define HIDEFACE		128	// Whether we appear as unknown.
#define HIDEHAIR		256
#define HIDEFACIALHAIR	512

//slots
#define slot_back			1
#define slot_wear_mask		2
#define slot_handcuffed		3
#define slot_l_hand			4
#define slot_r_hand			5
#define slot_belt			6
#define slot_wear_id		7
#define slot_ears			8
#define slot_glasses		9
#define slot_gloves			10
#define slot_head			11
#define slot_shoes			12
#define slot_wear_suit		13
#define slot_w_uniform		14
#define slot_l_store		15
#define slot_r_store		16
#define slot_s_store		17
#define slot_in_backpack	18
#define slot_legcuffed		19
#define slot_drone_storage	20

#define slots_amt			20 // Keep this up to date!

//Cant seem to find a mob bitflags area other than the powers one

// bitflags for clothing parts - also used for limbs
#define HEAD		1
#define CHEST		2
#define GROIN		4
#define LEG_LEFT	8
#define LEG_RIGHT	16
#define LEGS		24
#define FOOT_LEFT	32
#define FOOT_RIGHT	64
#define FEET		96
#define ARM_LEFT	128
#define ARM_RIGHT	256
#define ARMS		384
#define HAND_LEFT	512
#define HAND_RIGHT	1024
#define HANDS		1536
#define FULL_BODY	2047

// bitflags for the percentual amount of protection a piece of clothing which covers the body part offers.
// Used with human/proc/get_heat_protection() and human/proc/get_cold_protection()
// The values here should add up to 1.
// Hands and feet have 2.5%, arms and legs 7.5%, each of the torso parts has 15% and the head has 30%
#define THERMAL_PROTECTION_HEAD			0.3
#define THERMAL_PROTECTION_CHEST		0.15
#define THERMAL_PROTECTION_GROIN		0.15
#define THERMAL_PROTECTION_LEG_LEFT		0.075
#define THERMAL_PROTECTION_LEG_RIGHT	0.075
#define THERMAL_PROTECTION_FOOT_LEFT	0.025
#define THERMAL_PROTECTION_FOOT_RIGHT	0.025
#define THERMAL_PROTECTION_ARM_LEFT		0.075
#define THERMAL_PROTECTION_ARM_RIGHT	0.075
#define THERMAL_PROTECTION_HAND_LEFT	0.025
#define THERMAL_PROTECTION_HAND_RIGHT	0.025

//flags for female outfits: How much the game can safely "take off" the uniform without it looking weird

#define NO_FEMALE_UNIFORM			0
#define FEMALE_UNIFORM_FULL			1
#define FEMALE_UNIFORM_TOP			2

//flags for covering body parts
#define GLASSESCOVERSEYES	1
#define MASKCOVERSEYES		2		// get rid of some of the other retardation in these flags
#define HEADCOVERSEYES		4		// feel free to realloc these numbers for other purposes
#define MASKCOVERSMOUTH		8		// on other items, these are just for mask/head
#define HEADCOVERSMOUTH		16

#define TINT_DARKENED 2			//Threshold of tint level to apply weld mask overlay
#define TINT_BLIND 3			//Threshold of tint level to obscure vision fully


code:
//Damage things	//TODO: merge these down to reduce on defines
//Way to waste perfectly good damagetype names (BRUTE) on this... If you were really worried about case sensitivity, you could have just used lowertext(damagetype) in the proc...
#define BRUTE		"brute"
#define BURN		"fire"
#define TOX			"tox"
#define OXY			"oxy"
#define CLONE		"clone"
#define STAMINA 	"stamina"

#define STUN		"stun"
#define WEAKEN		"weaken"
#define PARALYZE	"paralize"
#define IRRADIATE	"irradiate"
#define STUTTER		"stutter"
#define SLUR 		"slur"
#define EYE_BLUR	"eye_blur"
#define DROWSY		"drowsy"
#define JITTER		"jitter"

//I hate adding defines like this but I'd much rather deal with bitflags than lists and string searches
#define BRUTELOSS 1
#define FIRELOSS 2
#define TOXLOSS 4
#define OXYLOSS 8
#define SHAME 16

//Bitflags defining which status effects could be or are inflicted on a mob
#define CANSTUN		1
#define CANWEAKEN	2
#define CANPARALYSE	4
#define CANPUSH		8
#define IGNORESLOWDOWN	16
#define GOTTAGOFAST	32
#define GOTTAGOREALLYFAST	64
#define GODMODE		4096
#define FAKEDEATH	8192	//Replaces stuff like changeling.changeling_fakedeath
#define DISFIGURED	16384	//I'll probably move this elsewhere if I ever get wround to writing a bitflag mob-damage system
#define XENO_HOST	32768	//Tracks whether we're gonna be a baby alien's mummy.

//Grab levels
#define GRAB_PASSIVE	1
#define GRAB_AGGRESSIVE	2
#define GRAB_NECK		3
#define GRAB_UPGRADING	4
#define GRAB_KILL		5

//Hostile Mob AI Status
#define AI_ON		1
#define AI_IDLE	2
#define AI_OFF		3

//Embedded objects
#define EMBEDDED_PAIN_CHANCE 					15	//Chance for embedded objects to cause pain (damage user)
#define EMBEDDED_ITEM_FALLOUT 					5	//Chance for embedded object to fall out (causing pain but removing the object)
#define EMBED_CHANCE							45	//Chance for an object to embed into somebody when thrown (if it's sharp)
#define EMBEDDED_PAIN_MULTIPLIER				2	//Coefficient of multiplication for the damage the item does while embedded (this*item.w_class)
#define EMBEDDED_FALL_PAIN_MULTIPLIER			5	//Coefficient of multiplication for the damage the item does when it falls out (this*item.w_class)
#define EMBEDDED_IMPACT_PAIN_MULTIPLIER			4	//Coefficient of multiplication for the damage the item does when it first embeds (this*item.w_class)
#define EMBED_THROWSPEED_THRESHOLD				4	//The minimum value of an item's throw_speed for it to embed (Unless it has embedded_ignore_throwspeed_threshold set to 1)
#define EMBEDDED_UNSAFE_REMOVAL_PAIN_MULTIPLIER 8	//Coefficient of multiplication for the damage the item does when removed without a surgery (this*item.w_class)
#define EMBEDDED_UNSAFE_REMOVAL_TIME			30	//A Time in ticks, total removal time = (this*item.w_class)

//Attack types for checking shields/hit reactions

#define MELEE_ATTACK 1
#define UNARMED_ATTACK 2
#define PROJECTILE_ATTACK 3
#define THROWN_PROJECTILE_ATTACK 4


code:
/*
	These defines are specific to the atom/flags bitmask
*/
#define ALL ~0 //For convenience.
#define NONE 0

//FLAGS BITMASK
#define STOPSPRESSUREDMAGE 1	//This flag is used on the flags variable for SUIT and HEAD items which stop pressure damage. Note that the flag 1 was previous used as ONBACK, so it is possible for some code to use (flags & 1) when checking if something can be put on your back. Replace this code with (inv_flags & SLOT_BACK) if you see it anywhere
//To successfully stop you taking all pressure damage you must have both a suit and head item with this flag.

#define NODROP			2		// This flag makes it so that an item literally cannot be removed at all, or at least that's how it should be. Only deleted.
#define NOBLUDGEON		4		// when an item has this it produces no "X has been hit by Y with Z" message in the default attackby()
#define MASKINTERNALS	8		// mask allows internals
#define HEAR 			16		// This flag is what recursive_hear_check() uses to determine wether to add an item to the hearer list or not.
#define HANDSLOW        32		// If an item has this flag, it will slow you to carry it
#define CONDUCT			64		// conducts electricity (metal etc.)
#define ABSTRACT    	128		// for all things that are technically items but used for various different stuff, made it 128 because it could conflict with other flags other way
#define NODECONSTRUCT  	128		// For machines and structures that should not break into parts, eg, holodeck stuff
#define FPRINT			256		// takes a fingerprint
#define ON_BORDER		512		// item has priority to check when entering or leaving

#define HEADBANGPROTECT		4096
#define EARBANGPROTECT		1024

#define NOSLIP		1024 		//prevents from slipping on wet floors, in space etc (NOTE: flag shared with THICKMATERIAL for external suits and helmet)

#define OPENCONTAINER	4096	// is an open container for chemistry purposes

// BLOCK_GAS_SMOKE_EFFECT only used in masks at the moment.
#define BLOCK_GAS_SMOKE_EFFECT 8192	// blocks the effect that chemical clouds would have on a mob --glasses, mask and helmets ONLY! (NOTE: flag shared with THICKMATERIAL)
#define THICKMATERIAL 8192		//prevents syringes, parapens and hypos if the external suit or helmet (if targeting head) has this flag. Example: space suits, biosuit, bombsuits, thick suits that cover your body. (NOTE: flag shared with BLOCK_GAS_SMOKE_EFFECT)

#define	NOREACT		16384 		//Reagents dont' react inside this container.

//turf-only flags
#define NOJAUNT		1

/*
	These defines are used specifically with the atom/pass_flags bitmask
	the atom/checkpass() proc uses them (tables will call movable atom checkpass(PASSTABLE) for example)
*/
//flags for pass_flags
#define PASSTABLE		1
#define PASSGLASS		2
#define PASSGRILLE		4
#define PASSBLOB		8
#define PASSMOB			16
#define LETPASSTHROW	32

//flags for species

#define MUTCOLORS		1
#define HAIR			2
#define FACEHAIR		4
#define EYECOLOR		8
#define LIPS			16
#define COLDRES			32
#define HEATRES			64
#define RADIMMUNE		128
#define NOBREATH		256
#define NOGUNS			512
#define NOBLOOD			1024
#define NOFIRE			2048
#define VIRUSIMMUNE		4096
#define PIERCEIMMUNE	8192
#define NOTRANSSTING	16384

#define MUTCOLORS_PARTSONLY 	32768	//Used if we want the mutant colour to be only used by mutant bodyparts. Don't combine this with MUTCOLORS, or it will be useless.

/*
	These defines are used specifically with the atom/movable/languages bitmask.
	They are used in atom/movable/Hear() and atom/movable/say() to determine whether hearers can understand a message.
*/
#define HUMAN 1
#define MONKEY 2
#define ALIEN 4
#define ROBOT 8
#define SLIME 16
#define DRONE 32
#define SWARMER 64


code:
//Defines copying names of mutations in all cases, make sure to change this if you change mutation's name
#define HULK		"Hulk"
#define XRAY		"X Ray Vision"
#define COLDRES		"Cold Resistance"
#define TK			"Telekinesis"
#define NERVOUS		"Nervousness"
#define EPILEPSY	"Epilepsy"
#define MUTATE		"Unstable DNA"
#define COUGH		"Cough"
#define DWARFISM	"Dwarfism"
#define CLOWNMUT	"Clumsiness"
#define TOURETTES	"Tourettes Syndrome"
#define DEAFMUT		"Deafness"
#define BLINDMUT	"Blindness"
#define RACEMUT		"Monkified"
#define BADSIGHT	"Near Sightness"
#define LASEREYES	"Laser Eyes"
#define CHAMELEON	"Chameleon"
#define WACKY		"Wacky"
#define MUT_MUTE	"Mute"
#define SMILE		"Smile"
#define UNINTELLIGABLE		"Unintelligable"
#define SWEDISH		"Swedish"
#define CHAV		"Chav"
#define ELVIS		"Elvis"

#define UI_CHANGED "ui changed"
#define UE_CHANGED "ue changed"

#define CHAMELEON_MUTATION_DEFAULT_TRANSPARENCY 204

// String identifiers for associative list lookup

//Types of usual mutations
#define	POSITIVE 			1
#define	NEGATIVE			2
#define	MINOR_NEGATIVE		3

//Mutations that cant be taken from genetics and are not in SE
#define	NON_SCANNABLE		-1

	// Extra powers:
#define LASER			9 	// harm intent - click anywhere to shoot lasers from eyes
#define HEAL			10 	// healing people with hands
#define SHADOW			11 	// shadow teleportation (create in/out portals anywhere) (25%)
#define SCREAM			12 	// supersonic screaming (25%)
#define EXPLOSIVE		13 	// exploding on-demand (15%)
#define REGENERATION	14 	// superhuman regeneration (30%)
#define REPROCESSOR		15 	// eat anything (50%)
#define SHAPESHIFTING	16 	// take on the appearance of anything (40%)
#define PHASING			17 	// ability to phase through walls (40%)
#define SHIELD			18 	// shielding from all projectile attacks (30%)
#define SHOCKWAVE		19 	// attack a nearby tile and cause a massive shockwave, knocking most people on their asses (25%)
#define ELECTRICITY		20 	// ability to shoot electric attacks (15%)

//DNA - Because fuck you and your magic numbers being all over the codebase.
#define DNA_BLOCK_SIZE				3

#define DNA_UNI_IDENTITY_BLOCKS		7
#define DNA_HAIR_COLOR_BLOCK		1
#define DNA_FACIAL_HAIR_COLOR_BLOCK	2
#define DNA_SKIN_TONE_BLOCK			3
#define DNA_EYE_COLOR_BLOCK			4
#define DNA_GENDER_BLOCK			5
#define DNA_FACIAL_HAIR_STYLE_BLOCK	6
#define DNA_HAIR_STYLE_BLOCK		7

#define DNA_STRUC_ENZYMES_BLOCKS	19
#define DNA_UNIQUE_ENZYMES_LEN		32

//Transformation proc stuff
#define TR_KEEPITEMS	1
#define TR_KEEPVIRUS	2
#define TR_KEEPDAMAGE	4
#define TR_HASHNAME		8	// hashing names (e.g. monkey(e34f)) (only in monkeyize)
#define TR_KEEPIMPLANTS	16
#define TR_KEEPSE		32 // changelings shouldn't edit the DNA's SE when turning into a monkey
#define TR_DEFAULTMSG	64
#define TR_KEEPSRC		128
#define TR_KEEPORGANS	256

//Organ stuff, It's here because "Genetics" is the most relevant file for organs
#define ORGAN_ORGANIC   1
#define ORGAN_ROBOTIC   2

//Nutrition levels for humans. No idea where else to put it
#define NUTRITION_LEVEL_FAT 600
#define NUTRITION_LEVEL_FULL 550
#define NUTRITION_LEVEL_WELL_FED 450
#define NUTRITION_LEVEL_FED 350
#define NUTRITION_LEVEL_HUNGRY 250
#define NUTRITION_LEVEL_STARVING 150


code:
// for secHUDs and medHUDs and variants. The number is the location of the image on the list hud_list
// note: if you add more HUDs, even for non-human atoms, make sure to use unique numbers for the defines!
// /datum/atom_hud expects these to be unique
// these need to be strings in order to make them associative lists
#define HEALTH_HUD		"1" // dead, alive, sick, health status
#define STATUS_HUD		"2" // a simple line rounding the mob's number health
#define ID_HUD			"3" // the job asigned to your ID
#define WANTED_HUD		"4" // wanted, released, parroled, security status
#define IMPLOYAL_HUD	"5" // loyality implant
#define IMPCHEM_HUD		"6" // chemical implant
#define IMPTRACK_HUD	"7" // tracking implant
#define DIAG_STAT_HUD	"8" // Silicon/Mech Status
#define DIAG_HUD		"9" // Silicon health bar
#define DIAG_BATT_HUD	"10"// Borg/Mech power meter
#define DIAG_MECH_HUD	"11"// Mech health bar
#define DIAG_BOT_HUD	"12"// Bot HUDs
//for antag huds. these are used at the /mob level
#define ANTAG_HUD		"12"

//data HUD (medhud, sechud) defines
//Don't forget to update human/New() if you change these!
#define DATA_HUD_SECURITY_BASIC		1
#define DATA_HUD_SECURITY_ADVANCED	2
#define DATA_HUD_MEDICAL_BASIC		3
#define DATA_HUD_MEDICAL_ADVANCED	4
#define DATA_HUD_DIAGNOSTIC			5
//antag HUD defines
#define ANTAG_HUD_CULT		6
#define ANTAG_HUD_REV		7
#define ANTAG_HUD_OPS		8
#define ANTAG_HUD_WIZ		9
#define ANTAG_HUD_SHADOW    10
#define ANTAG_HUD_HOG_BLUE 11
#define ANTAG_HUD_HOG_RED 12
#define ANTAG_HUD_TRAITOR 13
#define ANTAG_HUD_NINJA 14
#define ANTAG_HUD_CHANGELING 15
#define ANTAG_HUD_ABDUCTOR 16


code:
// simple is_type and similar inline helpers

#define islist(L) (istype(L,/list))

#define in_range(source, user) (get_dist(source, user) <= 1)

// MOB HELPERS

#define ishuman(A) (istype(A, /mob/living/carbon/human))

#define ismonkey(A) (istype(A, /mob/living/carbon/monkey))

#define isbrain(A) (istype(A, /mob/living/carbon/brain))

#define isalien(A) (istype(A, /mob/living/carbon/alien))

#define isalienadult(A) (istype(A, /mob/living/carbon/alien/humanoid))

#define islarva(A) (istype(A, /mob/living/carbon/alien/larva))

#define isslime(A) (istype(A, /mob/living/simple_animal/slime))

#define isrobot(A) (istype(A, /mob/living/silicon/robot))

#define isanimal(A) (istype(A, /mob/living/simple_animal))

#define iscorgi(A) (istype(A, /mob/living/simple_animal/pet/dog/corgi))

#define iscrab(A) (istype(A, /mob/living/simple_animal/crab))

#define iscat(A) (istype(A, /mob/living/simple_animal/pet/cat))

#define ismouse(A) (istype(A, /mob/living/simple_animal/mouse))

#define isbear(A) (istype(A, /mob/living/simple_animal/hostile/bear))

#define iscarp(A) (istype(A, /mob/living/simple_animal/hostile/carp))

#define isclown(A) (istype(A, /mob/living/simple_animal/hostile/retaliate/clown))

#define isAI(A) (istype(A, /mob/living/silicon/ai))

#define ispAI(A) (istype(A, /mob/living/silicon/pai))

#define iscarbon(A) (istype(A, /mob/living/carbon))

#define issilicon(A) (istype(A, /mob/living/silicon))

#define isliving(A) (istype(A, /mob/living))

#define isobserver(A) (istype(A, /mob/dead/observer))

#define isnewplayer(A) (istype(A, /mob/new_player))

#define isovermind(A) (istype(A, /mob/camera/blob))

#define isdrone(A) (istype(A, /mob/living/simple_animal/drone))

#define isswarmer(A) (istype(A, /mob/living/simple_animal/hostile/swarmer))

#define isguardian(A) (istype(A, /mob/living/simple_animal/hostile/guardian))

#define islimb(A) (istype(A, /obj/item/organ/limb))

#define isbot(A) (istype(A, /mob/living/simple_animal/bot))

#define ismovableatom(A) (istype(A, /atom/movable))

// ASSEMBLY HELPERS

#define isassembly(O) (istype(O, /obj/item/device/assembly))

#define isigniter(O) (istype(O, /obj/item/device/assembly/igniter))

#define isinfared(O) (istype(O, /obj/item/device/assembly/infra))

#define isprox(O) (istype(O, /obj/item/device/assembly/prox_sensor))

#define issignaler(O) (istype(O, /obj/item/device/assembly/signaler))

#define istimer(O) (istype(O, /obj/item/device/assembly/timer))


code:
// channel numbers for power
#define EQUIP			1
#define LIGHT			2
#define ENVIRON			3
#define TOTAL			4	//for total power used only
#define STATIC_EQUIP 	5
#define STATIC_LIGHT	6
#define STATIC_ENVIRON	7

//bitflags for door switches.
#define OPEN	1
#define IDSCAN	2
#define BOLTS	4
#define SHOCK	8
#define SAFE	16

//used in design to specify which machine can build it
#define	IMPRINTER	1	//For circuits. Uses glass/chemicals.
#define PROTOLATHE	2	//New stuff. Uses glass/metal/chemicals
#define	AUTOLATHE	4	//Uses glass/metal only.
#define CRAFTLATHE	8	//Uses fuck if I know. For use eventually.
#define MECHFAB		16 //Remember, objects utilising this flag should have construction_time and construction_cost vars.
//Note: More then one of these can be added to a design but imprinter and lathe designs are incompatable.


code:
#define PI						3.1415
#define SPEED_OF_LIGHT			3e8		//not exact but hey!
#define SPEED_OF_LIGHT_SQ		9e+16
#define INFINITY				1e31	//closer then enough

//atmos
#define R_IDEAL_GAS_EQUATION	8.31	//kPa*L/(K*mol)
#define ONE_ATMOSPHERE			101.325	//kPa
#define T0C						273.15	// 0degC
#define T20C					293.15	// 20degC
#define TCMB					2.7		// -270.3degC


code:
#define MIDNIGHT_ROLLOVER		864000	//number of deciseconds in a day

#define JANUARY		1
#define FEBRUARY	2
#define MARCH		3
#define APRIL		4
#define MAY			5
#define JUNE		6
#define JULY		7
#define AUGUST		8
#define SEPTEMBER	9
#define OCTOBER		10
#define NOVEMBER	11
#define DECEMBER	12

//Select holiday names -- If you test for a holiday in the code, make the holiday's name a define and test for that instead
#define NEW_YEAR				"New Year"
#define VALENTINES				"Valentine's Day"
#define APRIL_FOOLS				"April Fool's Day"
#define EASTER					"Easter"
#define HALLOWEEN				"Halloween"
#define CHRISTMAS				"Christmas"
#define FRIDAY_13TH				"Friday the 13th"

//Human Overlays Indexes/////////
#define SPECIES_LAYER			27		// mutantrace colors... these are on a seperate layer in order to prvent
#define MUTATIONS_LAYER			26		//mutations. Hulk, Tk headglows, etc
#define BODY_BEHIND_LAYER		25
#define BODY_LAYER				24		//underwear, undershirts, socks, eyes, lips(makeup)
#define BODY_ADJ_LAYER			23
#define AUGMENTS_LAYER			22
#define FRONT_MUTATIONS_LAYER	21		//mutations that should appear above body and augments layer (e.g. laser eyes)
#define DAMAGE_LAYER			20		//damage indicators (cuts and burns)
#define UNIFORM_LAYER			19
#define ID_LAYER				18
#define SHOES_LAYER				17
#define GLOVES_LAYER			16
#define EARS_LAYER				15
#define SUIT_LAYER				14
#define GLASSES_LAYER			13
#define BELT_LAYER				12		//Possible make this an overlay of somethign required to wear a belt?
#define SUIT_STORE_LAYER		11
#define BACK_LAYER				10
#define HAIR_LAYER				9		//TODO: make part of head layer?
#define FACEMASK_LAYER			8
#define HEAD_LAYER				7
#define HANDCUFF_LAYER			6
#define LEGCUFF_LAYER			5
#define L_HAND_LAYER			4
#define R_HAND_LAYER			3		//Having the two hands seperate seems rather silly, merge them together? It'll allow for code to be reused on mobs with arbitarily many hands
#define BODY_FRONT_LAYER		2
#define FIRE_LAYER				1		//If you're on fire
#define TOTAL_LAYERS			27		//KEEP THIS UP-TO-DATE OR SHIT WILL BREAK ;_;

//Human Overlay Index Shortcuts for alternate_worn_layer, layers
//Because I *KNOW* somebody will think layer+1 means "above"
//IT DOESN'T OK, IT MEANS "UNDER"
#define UNDER_SPECIES_LAYER			SPECIES_LAYER+1
#define UNDER_BODY_BEHIND_LAYER		BODY_BEHIND_LAYER+1
#define UNDER_BODY_LAYER			BODY_LAYER+1
#define UNDER_BODY_ADJ_LAYER		BODY_ADJ_LAYER+1
#define UNDER_MUTATIONS_LAYER		MUTATIONS_LAYER+1
#define UNDER_AUGMENTS_LAYER		AUGMENTS_LAYER+1
#define UNDER_DAMAGE_LAYER			DAMAGE_LAYER+1
#define UNDER_UNIFORM_LAYER			UNIFORM_LAYER+1
#define UNDER_ID_LAYER				ID_LAYER+1
#define UNDER_SHOES_LAYER			SHOES_LAYER+1
#define UNDER_GLOVES_LAYER			GLOVES_LAYER+1
#define UNDER_EARS_LAYER			EARS_LAYER+1
#define UNDER_SUIT_LAYER			SUIT_LAYER+1
#define UNDER_GLASSES_LAYER			GLASSES_LAYER+1
#define UNDER_BELT_LAYER			BELT_LAYER+1
#define UNDER_SUIT_STORE_LAYER		SUIT_STORE_LAYER+1
#define UNDER_BACK_LAYER			BACK_LAYER+1
#define UNDER_HAIR_LAYER			HAIR_LAYER+1
#define UNDER_FACEMASK_LAYER		FACEMASK_LAYER+1
#define UNDER_HEAD_LAYER			HEAD_LAYER+1
#define UNDER_HANDCUFF_LAYER		HANDCUFF_LAYER+1
#define UNDER_LEGCUFF_LAYER			LEGCUFF_LAYER+1
#define UNDER_L_HAND_LAYER			L_HAND_LAYER+1
#define UNDER_R_HAND_LAYER			R_HAND_LAYER+1
#define UNDER_BODY_FRONT_LAYER		BODY_FRONT_LAYER+1
#define UNDER_FIRE_LAYER			FIRE_LAYER+1

//AND -1 MEANS "ABOVE", OK?, OK!?!
#define ABOVE_SPECIES_LAYER			SPECIES_LAYER-1
#define ABOVE_BODY_BEHIND_LAYER		BODY_BEHIND_LAYER-1
#define ABOVE_BODY_LAYER			BODY_LAYER-1
#define ABOVE_BODY_ADJ_LAYER		BODY_ADJ_LAYER-1
#define ABOVE_MUTATIONS_LAYER		MUTATIONS_LAYER-1
#define ABOVE_AUGMENTS_LAYER		AUGMENTS_LAYER-1
#define ABOVE_DAMAGE_LAYER			DAMAGE_LAYER-1
#define ABOVE_UNIFORM_LAYER			UNIFORM_LAYER-1
#define ABOVE_ID_LAYER				ID_LAYER-1
#define ABOVE_SHOES_LAYER			SHOES_LAYER-1
#define ABOVE_GLOVES_LAYER			GLOVES_LAYER-1
#define ABOVE_EARS_LAYER			EARS_LAYER-1
#define ABOVE_SUIT_LAYER			SUIT_LAYER-1
#define ABOVE_GLASSES_LAYER			GLASSES_LAYER-1
#define ABOVE_BELT_LAYER			BELT_LAYER-1
#define ABOVE_SUIT_STORE_LAYER		SUIT_STORE_LAYER-1
#define ABOVE_BACK_LAYER			BACK_LAYER-1
#define ABOVE_HAIR_LAYER			HAIR_LAYER-1
#define ABOVE_FACEMASK_LAYER		FACEMASK_LAYER-1
#define ABOVE_HEAD_LAYER			HEAD_LAYER-1
#define ABOVE_HANDCUFF_LAYER		HANDCUFF_LAYER-1
#define ABOVE_LEGCUFF_LAYER			LEGCUFF_LAYER-1
#define ABOVE_L_HAND_LAYER			L_HAND_LAYER-1
#define ABOVE_R_HAND_LAYER			R_HAND_LAYER-1
#define ABOVE_BODY_FRONT_LAYER		BODY_FRONT_LAYER-1
#define ABOVE_FIRE_LAYER			FIRE_LAYER-1

//Security levels
#define SEC_LEVEL_GREEN	0
#define SEC_LEVEL_BLUE	1
#define SEC_LEVEL_RED	2
#define SEC_LEVEL_DELTA	3

//some arbitrary defines to be used by self-pruning global lists. (see master_controller)
#define PROCESS_KILL 26	//Used to trigger removal from a processing list

// Cargo-related stuff.
#define MANIFEST_ERROR_CHANCE		5
#define MANIFEST_ERROR_NAME			1
#define MANIFEST_ERROR_CONTENTS		2
#define MANIFEST_ERROR_ITEM			4

#define TRANSITIONEDGE			7 //Distance from edge to move to another z-level

//HUD styles. Please ensure HUD_VERSIONS is the same as the maximum index. Index order defines how they are cycled in F12.
#define HUD_STYLE_STANDARD 1
#define HUD_STYLE_REDUCED 2
#define HUD_STYLE_NOHUD 3

#define HUD_VERSIONS 3	//used in show_hud()
//1 = standard hud
//2 = reduced hud (just hands and intent switcher)
//3 = no hud (for screenshots)

#define MINERAL_MATERIAL_AMOUNT 2000
//The amount of materials you get from a sheet of mineral like iron/diamond/glass etc
#define MAX_STACK_SIZE 50
//The maximum size of a stack object.

#define CLICK_CD_MELEE 8
#define CLICK_CD_RANGE 4
#define CLICK_CD_BREAKOUT 100
#define CLICK_CD_HANDCUFFED 10
#define CLICK_CD_TKSTRANGLE 10
#define CLICK_CD_RESIST 20
//click cooldowns, in tenths of a second

#define BE_CLOSE 1		//in the case of a silicon, to select if they need to be next to the atom
#define NO_DEXTERY 1	//if other mobs (monkeys, aliens, etc) can use this
//used by canUseTopic()

//Sizes of mobs, used by mob/living/var/mob_size
#define MOB_SIZE_TINY 0
#define MOB_SIZE_SMALL 1
#define MOB_SIZE_HUMAN 2
#define MOB_SIZE_LARGE 3

//Slime evolution threshold. Controls how fast slimes can split/grow
#define SLIME_EVOLUTION_THRESHOLD 10

//singularity defines
#define STAGE_ONE 1
#define STAGE_TWO 3
#define STAGE_THREE 5
#define STAGE_FOUR 7
#define STAGE_FIVE 9
#define STAGE_SIX 11 //From supermatter shard

//zlevel defines, can be overridden for different maps in the appropriate _maps file.
#define ZLEVEL_SPACEMAX 7
#define ZLEVEL_MINING 5
#define ZLEVEL_SPACEMIN 3
#define ZLEVEL_ABANDONNEDTSAT 3
#define ZLEVEL_CENTCOM 2
#define ZLEVEL_STATION 1
#define ZLEVEL_LAVALAND 5
#define ZLEVEL_UNDERGROUND 6

//ticker.current_state values
#define GAME_STATE_STARTUP		0
#define GAME_STATE_PREGAME		1
#define GAME_STATE_SETTING_UP	2
#define GAME_STATE_PLAYING		3
#define GAME_STATE_FINISHED		4
//SOUND:
#define SOUND_MINIMUM_PRESSURE 10
#define FALLOFF_SOUNDS	1
#define SURROUND_CAP	7

//FONTS:
// Used by Paper and PhotoCopier (and PaperBin once a year).
// Used by PDA's Notekeeper.
// Used by NewsCaster and NewsPaper.
#define PEN_FONT "Verdana"
#define CRAYON_FONT "Comic Sans MS"
#define SIGNFONT "Times New Roman"

//NPC DEFINES
#define INTERACTING 2
#define TRAVEL 4
#define FIGHTING 8

//TRAITS

#define TRAIT_ROBUST 2
#define TRAIT_UNROBUST 4
#define TRAIT_SMART 8
#define TRAIT_DUMB 16
#define TRAIT_MEAN 32
#define TRAIT_FRIENDLY 64
#define TRAIT_THIEVING 128

//SNPC defines
#define MAX_RANGE_FIND 32
#define MIN_RANGE_FIND 16
#define FUZZY_CHANCE_HIGH 85
#define FUZZY_CHANCE_LOW 50
#define CHANCE_TALK 15

#define SNPC_BRUTE 1
#define SNPC_STEALTH 2
#define SNPC_MARTYR 3
#define SNPC_PSYCHO 4

#define MAXCOIL 30
#define RESIZE_DEFAULT_SIZE 1

//transfer_ai() defines. Main proc in ai_core.dm
#define AI_TRANS_TO_CARD	1 //Downloading AI to InteliCard.
#define AI_TRANS_FROM_CARD	2 //Uploading AI from InteliCard
#define AI_MECH_HACK		3 //Malfunctioning AI hijacking mecha

//Material defines
#define MAT_METAL		"$metal"
#define MAT_GLASS		"$glass"
#define MAT_SILVER		"$silver"
#define MAT_GOLD		"$gold"
#define MAT_DIAMOND		"$diamond"
#define MAT_URANIUM		"$uranium"
#define MAT_PLASMA		"$plasma"
#define MAT_BANANIUM	"$bananium"

//check_target_facings() return defines
#define FACING_FAILED											0
#define FACING_SAME_DIR											1
#define FACING_EACHOTHER										2
#define FACING_INIT_FACING_TARGET_TARGET_FACING_PERPENDICULAR	3 //Do I win the most informative but also most stupid define award?

//Cache of bloody footprint images
//Key:
//"entered-[blood_state]-[dir_of_image]"
//or: "exited-[blood_state]-[dir_of_image]"
var/list/bloody_footprints_cache = list()

//Bloody shoes/footprints
#define MAX_SHOE_BLOODINESS			100
#define BLOODY_FOOTPRINT_BASE_ALPHA	150
#define BLOOD_GAIN_PER_STEP			100
#define BLOOD_LOSS_PER_STEP			5
#define BLOOD_FADEOUT_TIME			2

//Bloody shoe blood states
#define BLOOD_STATE_HUMAN			"blood"
#define BLOOD_STATE_XENO			"xeno"
#define BLOOD_STATE_OIL				"oil"
#define BLOOD_STATE_NOT_BLOODY		"no blood whatsoever"
//Turf wet states
#define TURF_DRY		0
#define TURF_WET_WATER	1
#define TURF_WET_LUBE	2
#define TURF_WET_ICE	3

//Object/Item sharpness
#define IS_BLUNT			0
#define IS_SHARP			1
#define IS_SHARP_ACCURATE	2

//unmagic-strings for types of polls
#define POLLTYPE_OPTION		"OPTION"
#define POLLTYPE_TEXT		"TEXT"
#define POLLTYPE_RATING		"NUMVAL"
#define POLLTYPE_MULTI		"MULTICHOICE"

//lighting area defines
#define DYNAMIC_LIGHTING_DISABLED 0 //dynamic lighting disabled (area stays at full brightness)
#define DYNAMIC_LIGHTING_ENABLED 1 //dynamic lighting enabled
#define DYNAMIC_LIGHTING_IFSTARLIGHT 2 //dynamic lighting enabled only if starlight is.
#define IS_DYNAMIC_LIGHTING(A) ( A.lighting_use_dynamic == DYNAMIC_LIGHTING_IFSTARLIGHT ? config.starlight : A.lighting_use_dynamic )

//subtypesof(), typesof() without the parent path
#define subtypesof(typepath) ( typesof(typepath) - typepath )

//Bot types
#define SEC_BOT				1	// Secutritrons (Beepsky) and ED-209s
#define MULE_BOT			2	// MULEbots
#define FLOOR_BOT			4	// Floorbots
#define CLEAN_BOT			8	// Cleanbots
#define MED_BOT				16	// Medibots

//Sentience types
#define SENTIENCE_ORGANIC 1
#define SENTIENCE_ARTIFICIAL 2
#define SENTIENCE_OTHER 3
#define SENTIENCE_MINEBOT 4

//Fire stuff, for burn_state
#define LAVA_PROOF -2
#define FIRE_PROOF -1
#define FLAMMABLE 0
#define ON_FIRE 1

//Ghost orbit types:
#define GHOST_ORBIT_CIRCLE		"circle"
#define GHOST_ORBIT_TRIANGLE	"triangle"
#define GHOST_ORBIT_HEXAGON		"hexagon"
#define GHOST_ORBIT_SQUARE		"square"
#define GHOST_ORBIT_PENTAGON	"pentagon"

//Ghost showing preferences:
#define GHOST_ACCS_NONE		1
#define GHOST_ACCS_DIR		50
#define GHOST_ACCS_FULL		100

#define GHOST_ACCS_NONE_NAME		"default sprites"
#define GHOST_ACCS_DIR_NAME			"only directional sprites"
#define GHOST_ACCS_FULL_NAME		"full accessories"

#define GHOST_ACCS_DEFAULT_OPTION	GHOST_ACCS_FULL

var/global/list/ghost_accs_options = list(GHOST_ACCS_NONE, GHOST_ACCS_DIR, GHOST_ACCS_FULL) //So save files can be sanitized properly.

#define GHOST_OTHERS_SIMPLE 			1
#define GHOST_OTHERS_DEFAULT_SPRITE		50
#define GHOST_OTHERS_THEIR_SETTING 		100

#define GHOST_OTHERS_SIMPLE_NAME 			"white ghost"
#define GHOST_OTHERS_DEFAULT_SPRITE_NAME 	"default sprites"
#define GHOST_OTHERS_THEIR_SETTING_NAME 	"their setting"

#define GHOST_OTHERS_DEFAULT_OPTION			GHOST_OTHERS_THEIR_SETTING

var/global/list/ghost_others_options = list(GHOST_OTHERS_SIMPLE, GHOST_OTHERS_DEFAULT_SPRITE, GHOST_OTHERS_THEIR_SETTING) //Same as ghost_accs_options.

//Bloodcrawling
#define BLOODCRAWL 1
#define BLOODCRAWL_EAT 2

//Color Defines
#define OOC_COLOR  "#002eb8"

/////////////////////////////////////
// atom.appearence_flags shortcuts //
/////////////////////////////////////
//this was added midway thru 510, so it might not exist in some versions, but we can't check by minor verison
#ifndef TILE_BOUND
#if DM_VERSION >= 510
#warn this version of 510 is too old, You should use byond 510.1332 or later when using 510.
#endif
#define TILE_BOUND 256
#endif

// Disabling certain features
#define APPEARANCE_IGNORE_TRANSFORM			RESET_TRANSFORM
#define APPEARANCE_IGNORE_COLOUR			RESET_COLOR
#define	APPEARANCE_IGNORE_CLIENT_COLOUR		NO_CLIENT_COLOR
#define APPEARANCE_IGNORE_COLOURING			RESET_COLOR|NO_CLIENT_COLOR
#define APPEARANCE_IGNORE_ALPHA				RESET_ALPHA
#define APPEARANCE_NORMAL_GLIDE				~LONG_GLIDE

// Enabling certain features
#define APPEARANCE_CONSIDER_TRANSFORM		~RESET_TRANSFORM
#define APPEARANCE_CONSIDER_COLOUR			~RESET_COLOUR
#define APPEARANCE_CONSIDER_CLIENT_COLOUR	~NO_CLIENT_COLOR
#define APPEARANCE_CONSIDER_COLOURING		~RESET_COLOR|~NO_CLIENT_COLOR
#define APPEARANCE_CONSIDER_ALPHA			~RESET_ALPHA
#define APPEARANCE_LONG_GLIDE				LONG_GLIDE

// Consider these images/atoms as part of the UI/HUD
#define APPEARANCE_UI_IGNORE_ALPHA			RESET_COLOR|RESET_TRANSFORM|NO_CLIENT_COLOR|RESET_ALPHA
#define APPEARANCE_UI						RESET_COLOR|RESET_TRANSFORM|NO_CLIENT_COLOR

//Launching Shuttles to Centcomm
#define NOLAUNCH -1
#define UNLAUNCHED 0
#define ENDGAME_LAUNCHED 1
#define EARLY_LAUNCHED 2

//Just space
#define SPACE_ICON_STATE	"[((x + y) ^ ~(x * y) + z) % 25]"

//Gun trigger guards
#define TRIGGER_GUARD_ALLOW_ALL -1
#define TRIGGER_GUARD_NONE 0
#define TRIGGER_GUARD_NORMAL 1

// Plant types
#define PLANT_NORMAL 0
#define PLANT_WEED 1
#define PLANT_MUSHROOM 2
#define PLANT_ALIEN 3


code:
/*
PIPE CONSTRUCTION DEFINES
Update these any time a path is changed
Construction breaks otherwise
*/

//Pipes
#define PIPE_SIMPLE				/obj/machinery/atmospherics/pipe/simple
#define PIPE_MANIFOLD			/obj/machinery/atmospherics/pipe/manifold
#define PIPE_4WAYMANIFOLD       /obj/machinery/atmospherics/pipe/manifold4w
#define PIPE_HE					/obj/machinery/atmospherics/pipe/heat_exchanging/simple
#define PIPE_HE_MANIFOLD		/obj/machinery/atmospherics/pipe/heat_exchanging/manifold
#define PIPE_HE_4WAYMANIFOLD	/obj/machinery/atmospherics/pipe/heat_exchanging/manifold4w
#define PIPE_JUNCTION			/obj/machinery/atmospherics/pipe/heat_exchanging/junction
//Unary
#define PIPE_CONNECTOR			/obj/machinery/atmospherics/components/unary/portables_connector
#define PIPE_UVENT				/obj/machinery/atmospherics/components/unary/vent_pump
#define PIPE_SCRUBBER			/obj/machinery/atmospherics/components/unary/vent_scrubber
#define PIPE_HEAT_EXCHANGE      /obj/machinery/atmospherics/components/unary/heat_exchanger
//Binary
#define PIPE_PUMP				/obj/machinery/atmospherics/components/binary/pump
#define PIPE_PASSIVE_GATE       /obj/machinery/atmospherics/components/binary/passive_gate
#define PIPE_VOLUME_PUMP        /obj/machinery/atmospherics/components/binary/volume_pump
#define PIPE_MVALVE				/obj/machinery/atmospherics/components/binary/valve
#define PIPE_DVALVE             /obj/machinery/atmospherics/components/binary/valve/digital
//Trinary
#define PIPE_GAS_FILTER			/obj/machinery/atmospherics/components/trinary/filter
#define PIPE_GAS_MIXER			/obj/machinery/atmospherics/components/trinary/mixer

//Disposal piping numbers - do NOT hardcode these, use the defines
#define DISP_PIPE_STRAIGHT		0
#define DISP_PIPE_BENT			1
#define DISP_JUNCTION			2
#define DISP_JUNCTION_FLIP		3
#define DISP_YJUNCTION			4
#define DISP_END_TRUNK			5
#define DISP_END_BIN			6
#define DISP_END_OUTLET			7
#define DISP_END_CHUTE			8
#define DISP_SORTJUNCTION		9
#define DISP_SORTJUNCTION_FLIP	10


code:
//Preference toggles
#define SOUND_ADMINHELP	1
#define SOUND_MIDI		2
#define SOUND_AMBIENCE	4
#define SOUND_LOBBY		8
#define MEMBER_PUBLIC	16
#define INTENT_STYLE	32
#define MIDROUND_ANTAG	64
#define SOUND_INSTRUMENTS	128
#define SOUND_SHIP_AMBIENCE 256
#define SOUND_PRAYERS 512
#define ANNOUNCE_LOGIN 1024
#define SOUND_ANNOUNCEMENTS 2048

#define TOGGLES_DEFAULT (SOUND_ADMINHELP|SOUND_MIDI|SOUND_AMBIENCE|SOUND_LOBBY|MEMBER_PUBLIC|INTENT_STYLE|MIDROUND_ANTAG|SOUND_INSTRUMENTS|SOUND_SHIP_AMBIENCE|SOUND_PRAYERS|SOUND_ANNOUNCEMENTS)

//Chat toggles
#define CHAT_OOC		1
#define CHAT_DEAD		2
#define CHAT_GHOSTEARS	4
#define CHAT_GHOSTSIGHT	8
#define CHAT_PRAYER		16
#define CHAT_RADIO		32
#define CHAT_PULLR		64
#define CHAT_GHOSTWHISPER 128
#define CHAT_GHOSTPDA	256
#define CHAT_GHOSTRADIO 512

#define TOGGLES_DEFAULT_CHAT (CHAT_OOC|CHAT_DEAD|CHAT_GHOSTEARS|CHAT_GHOSTSIGHT|CHAT_PRAYER|CHAT_RADIO|CHAT_PULLR|CHAT_GHOSTWHISPER|CHAT_GHOSTPDA|CHAT_GHOSTRADIO)


code:
//defines that give qdel hints. these can be given as a return in destory() or by calling

#define QDEL_HINT_QUEUE 		0 //qdel should queue the object for deletion.
#define QDEL_HINT_LETMELIVE		1 //qdel should let the object live after calling destory.
#define QDEL_HINT_IWILLGC		2 //functionally the same as the above. qdel should assume the object will gc on its own, and not check it.
#define QDEL_HINT_HARDDEL		3 //qdel should assume this object won't gc, and queue a hard delete using a hard reference.
#define QDEL_HINT_HARDDEL_NOW	4 //qdel should assume this object won't gc, and hard del it post haste.
#define QDEL_HINT_PUTINPOOL		5 //qdel will put this object in the atom pool.
#define QDEL_HINT_FINDREFERENCE	6 //functionally identical to QDEL_HINT_QUEUE if TESTING is not enabled in _compiler_options.dm.
								  //if TESTING is enabled, qdel will call this object's find_references() verb.


code:
#define MIN_FREE_FREQ 1201
#define MAX_FREE_FREQ 1599

#define MIN_FREQ 1441
#define MAX_FREQ 1489


code:
#define SOLID 1
#define LIQUID 2
#define GAS 3


code:
//Values for antag preferences, event roles, etc. unified here

//These are synced with the Database, if you change the values of the defines
//then you MUST update the database!
#define ROLE_TRAITOR			"traitor"
#define ROLE_OPERATIVE			"operative"
#define ROLE_CHANGELING			"changeling"
#define ROLE_WIZARD				"wizard"
#define ROLE_MALF				"malf AI"
#define ROLE_REV				"revolutionary"
#define ROLE_ALIEN				"xenomorph"
#define ROLE_PAI				"pAI"
#define ROLE_CULTIST			"cultist"
#define ROLE_BLOB				"blob"
#define ROLE_NINJA				"space ninja"
#define ROLE_MONKEY				"monkey"
#define ROLE_GANG				"gangster"
#define ROLE_SHADOWLING			"shadowling"
#define ROLE_ABDUCTOR			"abductor"
#define ROLE_REVENANT			"revenant"
#define ROLE_HOG_GOD			"hand of god: god"
#define ROLE_HOG_CULTIST		"hand of god: cultist"

//Missing assignment means it's not a gamemode specific role, IT'S NOT A BUG OR ERROR.
//The gamemode specific ones are just so the gamemodes can query whether a player is old enough
//(in game days played) to play that role
var/global/list/special_roles = list(
	ROLE_TRAITOR = /datum/game_mode/traitor,
	ROLE_OPERATIVE = /datum/game_mode/nuclear,
	ROLE_CHANGELING = /datum/game_mode/changeling,
	ROLE_WIZARD = /datum/game_mode/wizard,
	ROLE_MALF,
	ROLE_REV = /datum/game_mode/revolution,
	ROLE_ALIEN,
	ROLE_PAI,
	ROLE_CULTIST = /datum/game_mode/cult,
	ROLE_BLOB = /datum/game_mode/blob,
	ROLE_NINJA,
	ROLE_MONKEY = /datum/game_mode/monkey,
	ROLE_GANG = /datum/game_mode/gang,
	ROLE_SHADOWLING = /datum/game_mode/shadowling,
	ROLE_REVENANT,
	ROLE_ABDUCTOR = /datum/game_mode/abduction,
	ROLE_HOG_GOD = /datum/game_mode/hand_of_god,
	ROLE_HOG_CULTIST = /datum/game_mode/hand_of_god,
)


code:
/*
	Defines for use in saycode and text formatting.
	Currently contains speech spans and message modes
*/

//Message modes. Each one defines a radio channel, more or less.
#define MODE_HEADSET "headset"
#define MODE_ROBOT "robot"
#define MODE_R_HAND "right hand"
#define MODE_L_HAND "left hand"
#define MODE_INTERCOM "intercom"
#define MODE_BINARY "binary"
#define MODE_WHISPER "whisper"
#define MODE_DEPARTMENT "department"
#define MODE_ALIEN "alientalk"
#define MODE_HOLOPAD "holopad"
#define MODE_CHANGELING "changeling"

//Spans. Robot speech, italics, etc. Applied in compose_message().
#define SPAN_ROBOT "robot"
#define SPAN_YELL "yell"
#define SPAN_ITALICS "italics"
#define SPAN_SANS "sans"
#define SPAN_PAPYRUS "papyrus"
#define SPAN_REALLYBIG "reallybig"
#define SPAN_COMMAND "command_headset"

//bitflag #defines for return value of the radio() proc.
#define ITALICS 1
#define REDUCE_RANGE 2
#define NOPASS 4


code:
#define SEE_INVISIBLE_MINIMUM 5

#define SEE_INVISIBLE_NOLIGHTING 15 //to not see the lighting objects. Used for nightvision and observer with darkness toggled.

#define INVISIBILITY_LIGHTING 20

#define SEE_INVISIBLE_LIVING 25

#define SEE_INVISIBLE_LEVEL_ONE 35 //currently unused
#define INVISIBILITY_LEVEL_ONE 35 //currently unused

#define SEE_INVISIBLE_LEVEL_TWO 45 //currently unused
#define INVISIBILITY_LEVEL_TWO 45 //currently unused

#define INVISIBILITY_OBSERVER 60
#define SEE_INVISIBLE_OBSERVER 60

#define INVISIBILITY_MAXIMUM 100

#define BORGMESON 1
#define BORGTHERM 2
#define BORGXRAY  4
#define BORGMATERIAL 8


code:
/*
	Used with the various stat variables (mob, machines)
*/

//mob/var/stat things
#define CONSCIOUS	0
#define UNCONSCIOUS	1
#define DEAD		2

//mob disabilities stat

#define BLIND 		1
#define MUTE		2
#define DEAF		4
#define NEARSIGHT	8
#define FAT			32
#define HUSK		64
#define NOCLONE		128
#define CLUMSY		256

// bitflags for machine stat variable
#define BROKEN		1
#define NOPOWER		2
#define POWEROFF	4		// tbd
#define MAINT		8			// under maintaince
#define EMPED		16		// temporary broken by EMP pulse

//shuttle mode defines
#define SHUTTLE_IDLE		0
#define SHUTTLE_RECALL		1
#define SHUTTLE_CALL		2
#define SHUTTLE_DOCKED		3
#define SHUTTLE_STRANDED	4
#define SHUTTLE_ESCAPE		5
#define SHUTTLE_ENDGAME		6


code:
#define CAT_NONE	""
#define CAT_WEAPON	"Weaponry"
#define CAT_AMMO	"Ammunition"
#define CAT_ROBOT	"Robots"
#define CAT_FOOD	"Food"
#define CAT_MISC	"Misc"


code:
#define UI_INTERACTIVE 2	// Green/Interactive
#define UI_UPDATE 1			// Orange/Updates Only
#define UI_DISABLED 0		// Red/Disabled
#define UI_CLOSE -1			// Closed


code:
#define TICK_LIMIT_RUNNING 90
#define TICK_LIMIT_TO_RUN 85
#define TICK_LIMIT_MC 80

#if DM_VERSION >= 510
#define TICK_CHECK ( world.tick_usage > TICK_LIMIT_RUNNING ? stoplag() : 0 )
#define CHECK_TICK if (world.tick_usage > TICK_LIMIT_RUNNING)  stoplag()
#define MC_TICK_CHECK ( world.tick_usage > TICK_LIMIT_RUNNING ? pause() : 0 )
#else
#define TICK_CHECK ( 0 )
#define CHECK_TICK
#define MC_TICK_CHECK ( 0 )
#endif


code:
#define WIRE_ACTIVATE "activate"
#define WIRE_AI "ai"
#define WIRE_ALARM "alarm"
#define WIRE_AVOIDANCE "avoidance"
#define WIRE_BACKUP1 "backup1"
#define WIRE_BACKUP2 "backup2"
#define WIRE_BEACON "beacon"
#define WIRE_BOLTS "bolts"
#define WIRE_BOOM "boom"
#define WIRE_CAMERA "camera"
#define WIRE_CONTRABAND "contraband"
#define WIRE_DELAY "delay"
#define WIRE_DISABLE "disable"
#define WIRE_DISARM "disarm"
#define WIRE_ELECTRIFY "electrify"
#define WIRE_HACK "hack"
#define WIRE_IDSCAN "idscan"
#define WIRE_INTERFACE "interface"
#define WIRE_LAWSYNC "lawsync"
#define WIRE_LIGHT "light"
#define WIRE_LIMIT "limit"
#define WIRE_LOADCHECK "loadcheck"
#define WIRE_LOCKDOWN "lockdown"
#define WIRE_MOTOR1 "motor1"
#define WIRE_MOTOR2 "motor2"
#define WIRE_OPEN "open"
#define WIRE_PANIC "panic"
#define WIRE_POWER "power"
#define WIRE_POWER1 "power1"
#define WIRE_POWER2 "power2"
#define WIRE_PROCEED "proceed"
#define WIRE_RX "recieve"
#define WIRE_SAFETY "safety"
#define WIRE_SHOCK "shock"
#define WIRE_SIGNAL "signal"
#define WIRE_SPEAKER "speaker"
#define WIRE_STRENGTH "strength"
#define WIRE_THROW "throw"
#define WIRE_TIMING "timing"
#define WIRE_TX "transmit"
#define WIRE_UNBOLT "unbolt"
#define WIRE_ZAP "zap"
#define WIRE_ZAP1 "zap1"
#define WIRE_ZAP2 "zap2"