diff --git a/code/ATMOSPHERICS/pipes/he_pipes.dm b/code/ATMOSPHERICS/pipes/he_pipes.dm index 8b1b800830..89ecf1e2bb 100644 --- a/code/ATMOSPHERICS/pipes/he_pipes.dm +++ b/code/ATMOSPHERICS/pipes/he_pipes.dm @@ -104,9 +104,7 @@ parent.radiate_heat_to_space(surface, 1) if(has_buckled_mobs()) - for(var/M in buckled_mobs) - var/mob/living/L = M - + for(var/mob/living/L as anything in buckled_mobs) var/hc = pipe_air.heat_capacity() var/avg_temp = (pipe_air.temperature * hc + L.bodytemperature * 3500) / (hc + 3500) pipe_air.temperature = avg_temp diff --git a/code/ZAS/Atom.dm b/code/ZAS/Atom.dm index 1953c58e9f..06305182b3 100644 --- a/code/ZAS/Atom.dm +++ b/code/ZAS/Atom.dm @@ -93,8 +93,7 @@ return AIR_BLOCKED var/result = 0 - for(var/mm in contents) - var/atom/movable/M = mm + for(var/atom/movable/M as anything in contents) switch(M.can_atmos_pass) if(ATMOS_PASS_YES) continue diff --git a/code/ZAS/Fire.dm b/code/ZAS/Fire.dm index 1f281d334a..e67d2ad3ac 100644 --- a/code/ZAS/Fire.dm +++ b/code/ZAS/Fire.dm @@ -71,8 +71,7 @@ If it gains pressure too slowly, it may leak or just rupture instead of explodin var/fuel_to_remove = used_liquid_fuel/(fuel_objs.len*LIQUIDFUEL_AMOUNT_TO_MOL) //convert back to liquid volume units - for(var/O in fuel_objs) - var/obj/effect/decal/cleanable/liquid_fuel/fuel = O + for(var/obj/effect/decal/cleanable/liquid_fuel/fuel as anything in fuel_objs) if(!istype(fuel)) fuel_objs -= fuel continue diff --git a/code/__defines/mobs.dm b/code/__defines/mobs.dm index 8bc561b4a6..d9a5f7a847 100644 --- a/code/__defines/mobs.dm +++ b/code/__defines/mobs.dm @@ -319,13 +319,13 @@ #define SPECIES_VR_SKELETON "Virtual Reality Skeleton" #define SPECIES_VR_VOX "Virtual Reality Vox" -// Ayyy IDs. CHOMPedit -#define SPECIES_GENA "Genaprawn" -#define SPECIES_GENA_DRONE "Genaprawn Drone" -#define SPECIES_GENA_HUNTER "Genaprawn Hunter" -#define SPECIES_GENA_SENTINEL "Genaprawn Sentinel" -#define SPECIES_GENA_QUEEN "Genaprawn Queen" -//CHOMPedit end +// Ayyy IDs. +#define SPECIES_XENO "Xenomorph" +#define SPECIES_XENO_DRONE "Xenomorph Drone" +#define SPECIES_XENO_HUNTER "Xenomorph Hunter" +#define SPECIES_XENO_SENTINEL "Xenomorph Sentinel" +#define SPECIES_XENO_QUEEN "Xenomorph Queen" + // Misc species. Mostly unused but might as well be complete. #define SPECIES_SHADOW "Shadow" #define SPECIES_SKELETON "Skeleton" diff --git a/code/__defines/sprite_sheets.dm b/code/__defines/sprite_sheets.dm index c40899e3fe..603bb82d5f 100644 --- a/code/__defines/sprite_sheets.dm +++ b/code/__defines/sprite_sheets.dm @@ -1,5 +1,6 @@ // Default species get default sprites, VR species get VR sprites #define VR_SPECIES_SPRITE_SHEETS_SUIT_MOB list(\ +SPECIES_HUMAN = 'icons/inventory/suit/mob.dmi',\ SPECIES_TAJ = 'icons/inventory/suit/mob_tajaran.dmi',\ SPECIES_SKRELL = 'icons/inventory/suit/mob_skrell.dmi',\ SPECIES_UNATHI = 'icons/inventory/suit/mob_unathi.dmi',\ @@ -12,6 +13,7 @@ SPECIES_VULPKANIN = 'icons/inventory/suit/mob_vr_vulpkanin.dmi',\ SPECIES_ZORREN_HIGH = 'icons/inventory/suit/mob_vr_vulpkanin.dmi',\ SPECIES_FENNEC = 'icons/inventory/suit/mob_vr_vulpkanin.dmi') #define VR_SPECIES_SPRITE_SHEETS_HEAD_MOB list(\ +SPECIES_HUMAN = 'icons/inventory/head/mob.dmi',\ SPECIES_TAJ = 'icons/inventory/head/mob_tajaran.dmi',\ SPECIES_SKRELL = 'icons/inventory/head/mob_skrell.dmi',\ SPECIES_UNATHI = 'icons/inventory/head/mob_unathi.dmi',\ @@ -24,6 +26,7 @@ SPECIES_VULPKANIN = 'icons/inventory/head/mob_vr_vulpkanin.dmi',\ SPECIES_ZORREN_HIGH = 'icons/inventory/head/mob_vr_vulpkanin.dmi',\ SPECIES_FENNEC = 'icons/inventory/head/mob_vr_vulpkanin.dmi') #define VR_SPECIES_SPRITE_SHEETS_HANDS_MOB list(\ +SPECIES_HUMAN = 'icons/inventory/hands/mob.dmi',\ SPECIES_TAJ = 'icons/inventory/hands/mob_tajaran.dmi',\ SPECIES_SKRELL = 'icons/inventory/hands/mob_skrell.dmi',\ SPECIES_UNATHI = 'icons/inventory/hands/mob_unathi.dmi',\ @@ -36,6 +39,7 @@ SPECIES_VULPKANIN = 'icons/inventory/hands/mob_vr_vulpkanin.dmi',\ SPECIES_ZORREN_HIGH = 'icons/inventory/hands/mob_vr_vulpkanin.dmi',\ SPECIES_FENNEC = 'icons/inventory/hands/mob_vr_vulpkanin.dmi') #define VR_SPECIES_SPRITE_SHEETS_FEET_MOB list(\ +SPECIES_HUMAN = 'icons/inventory/feet/mob.dmi',\ SPECIES_TAJ = 'icons/inventory/feet/mob_tajaran.dmi',\ SPECIES_SKRELL = 'icons/inventory/feet/mob_skrell.dmi',\ SPECIES_UNATHI = 'icons/inventory/feet/mob_unathi.dmi',\ @@ -49,6 +53,7 @@ SPECIES_ZORREN_HIGH = 'icons/inventory/feet/mob_vr_vulpkanin.dmi',\ SPECIES_FENNEC = 'icons/inventory/feet/mob_vr_vulpkanin.dmi') #define VR_SPECIES_SPRITE_SHEETS_SUIT_ITEM list(\ +SPECIES_HUMAN = 'icons/inventory/suit/item.dmi',\ SPECIES_TAJ = 'icons/inventory/suit/item_tajaran.dmi',\ SPECIES_SKRELL = 'icons/inventory/suit/item_skrell.dmi',\ SPECIES_UNATHI = 'icons/inventory/suit/item_unathi.dmi',\ @@ -61,6 +66,7 @@ SPECIES_VULPKANIN = 'icons/inventory/suit/item_vr_vulpkanin.dmi',\ SPECIES_ZORREN_HIGH = 'icons/inventory/suit/item_vr_vulpkanin.dmi',\ SPECIES_FENNEC = 'icons/inventory/suit/item_vr_vulpkanin.dmi') #define VR_SPECIES_SPRITE_SHEETS_HEAD_ITEM list(\ +SPECIES_HUMAN = 'icons/inventory/head/item.dmi',\ SPECIES_TAJ = 'icons/inventory/head/item_tajaran.dmi',\ SPECIES_SKRELL = 'icons/inventory/head/item_skrell.dmi',\ SPECIES_UNATHI = 'icons/inventory/head/item_unathi.dmi',\ @@ -73,6 +79,7 @@ SPECIES_VULPKANIN = 'icons/inventory/head/item_vr_vulpkanin.dmi',\ SPECIES_ZORREN_HIGH = 'icons/inventory/head/item_vr_vulpkanin.dmi',\ SPECIES_FENNEC = 'icons/inventory/head/item_vr_vulpkanin.dmi') #define VR_SPECIES_SPRITE_SHEETS_HANDS_ITEM list(\ +SPECIES_HUMAN = 'icons/inventory/hands/item.dmi',\ SPECIES_TAJ = 'icons/inventory/hands/item_tajaran.dmi',\ SPECIES_SKRELL = 'icons/inventory/hands/item_skrell.dmi',\ SPECIES_UNATHI = 'icons/inventory/hands/item_unathi.dmi',\ @@ -85,6 +92,7 @@ SPECIES_VULPKANIN = 'icons/inventory/hands/item_vr_vulpkanin.dmi',\ SPECIES_ZORREN_HIGH = 'icons/inventory/hands/item_vr_vulpkanin.dmi',\ SPECIES_FENNEC = 'icons/inventory/hands/item_vr_vulpkanin.dmi') #define VR_SPECIES_SPRITE_SHEETS_FEET_ITEM list(\ +SPECIES_HUMAN = 'icons/inventory/feet/item.dmi',\ SPECIES_TAJ = 'icons/inventory/feet/item_tajaran.dmi',\ SPECIES_SKRELL = 'icons/inventory/feet/item_skrell.dmi',\ SPECIES_UNATHI = 'icons/inventory/feet/item_unathi.dmi',\ @@ -99,6 +107,7 @@ SPECIES_FENNEC = 'icons/inventory/feet/item_vr_vulpkanin.dmi') // All species get VR sprites #define ALL_VR_SPRITE_SHEETS_SUIT_MOB list(\ +SPECIES_HUMAN = 'icons/inventory/suit/mob_vr.dmi',\ SPECIES_TAJ = 'icons/inventory/suit/mob_vr_tajaran.dmi',\ SPECIES_SKRELL = 'icons/inventory/suit/mob_vr_skrell.dmi',\ SPECIES_UNATHI = 'icons/inventory/suit/mob_vr_unathi.dmi',\ @@ -111,6 +120,7 @@ SPECIES_VULPKANIN = 'icons/inventory/suit/mob_vr_vulpkanin.dmi',\ SPECIES_ZORREN_HIGH = 'icons/inventory/suit/mob_vr_vulpkanin.dmi',\ SPECIES_FENNEC = 'icons/inventory/suit/mob_vr_vulpkanin.dmi') #define ALL_VR_SPRITE_SHEETS_HEAD_MOB list(\ +SPECIES_HUMAN = 'icons/inventory/head/mob_vr.dmi',\ SPECIES_TAJ = 'icons/inventory/head/mob_vr_tajaran.dmi',\ SPECIES_SKRELL = 'icons/inventory/head/mob_vr_skrell.dmi',\ SPECIES_UNATHI = 'icons/inventory/head/mob_vr_unathi.dmi',\ @@ -123,6 +133,7 @@ SPECIES_VULPKANIN = 'icons/inventory/head/mob_vr_vulpkanin.dmi',\ SPECIES_ZORREN_HIGH = 'icons/inventory/head/mob_vr_vulpkanin.dmi',\ SPECIES_FENNEC = 'icons/inventory/head/mob_vr_vulpkanin.dmi') #define ALL_VR_SPRITE_SHEETS_HANDS_MOB list(\ +SPECIES_HUMAN = 'icons/inventory/hands/mob_vr.dmi',\ SPECIES_TAJ = 'icons/inventory/hands/mob_vr_tajaran.dmi',\ SPECIES_SKRELL = 'icons/inventory/hands/mob_vr_skrell.dmi',\ SPECIES_UNATHI = 'icons/inventory/hands/mob_vr_unathi.dmi',\ @@ -135,6 +146,7 @@ SPECIES_VULPKANIN = 'icons/inventory/hands/mob_vr_vulpkanin.dmi',\ SPECIES_ZORREN_HIGH = 'icons/inventory/hands/mob_vr_vulpkanin.dmi',\ SPECIES_FENNEC = 'icons/inventory/hands/mob_vr_vulpkanin.dmi') #define ALL_VR_SPRITE_SHEETS_FEET_MOB list(\ +SPECIES_HUMAN = 'icons/inventory/feet/mob_vr.dmi',\ SPECIES_TAJ = 'icons/inventory/feet/mob_vr_tajaran.dmi',\ SPECIES_SKRELL = 'icons/inventory/feet/mob_vr_skrell.dmi',\ SPECIES_UNATHI = 'icons/inventory/feet/mob_vr_unathi.dmi',\ @@ -148,6 +160,7 @@ SPECIES_ZORREN_HIGH = 'icons/inventory/feet/mob_vr_vulpkanin.dmi',\ SPECIES_FENNEC = 'icons/inventory/feet/mob_vr_vulpkanin.dmi') #define ALL_VR_SPRITE_SHEETS_SUIT_ITEM list(\ +SPECIES_HUMAN = 'icons/inventory/suit/item_vr.dmi',\ SPECIES_TAJ = 'icons/inventory/suit/item_vr_tajaran.dmi',\ SPECIES_SKRELL = 'icons/inventory/suit/item_vr_skrell.dmi',\ SPECIES_UNATHI = 'icons/inventory/suit/item_vr_unathi.dmi',\ @@ -160,6 +173,7 @@ SPECIES_VULPKANIN = 'icons/inventory/suit/item_vr_vulpkanin.dmi',\ SPECIES_ZORREN_HIGH = 'icons/inventory/suit/item_vr_vulpkanin.dmi',\ SPECIES_FENNEC = 'icons/inventory/suit/item_vr_vulpkanin.dmi') #define ALL_VR_SPRITE_SHEETS_HEAD_ITEM list(\ +SPECIES_HUMAN = 'icons/inventory/head/item_vr.dmi',\ SPECIES_TAJ = 'icons/inventory/head/item_vr_tajaran.dmi',\ SPECIES_SKRELL = 'icons/inventory/head/item_vr_skrell.dmi',\ SPECIES_UNATHI = 'icons/inventory/head/item_vr_unathi.dmi',\ @@ -172,6 +186,7 @@ SPECIES_VULPKANIN = 'icons/inventory/head/item_vr_vulpkanin.dmi',\ SPECIES_ZORREN_HIGH = 'icons/inventory/head/item_vr_vulpkanin.dmi',\ SPECIES_FENNEC = 'icons/inventory/head/item_vr_vulpkanin.dmi') #define ALL_VR_SPRITE_SHEETS_HANDS_ITEM list(\ +SPECIES_HUMAN = 'icons/inventory/hands/item_vr.dmi',\ SPECIES_TAJ = 'icons/inventory/hands/item_vr_tajaran.dmi',\ SPECIES_SKRELL = 'icons/inventory/hands/item_vr_skrell.dmi',\ SPECIES_UNATHI = 'icons/inventory/hands/item_vr_unathi.dmi',\ @@ -184,6 +199,7 @@ SPECIES_VULPKANIN = 'icons/inventory/hands/item_vr_vulpkanin.dmi',\ SPECIES_ZORREN_HIGH = 'icons/inventory/hands/item_vr_vulpkanin.dmi',\ SPECIES_FENNEC = 'icons/inventory/hands/item_vr_vulpkanin.dmi') #define ALL_VR_SPRITE_SHEETS_FEET_ITEM list(\ +SPECIES_HUMAN = 'icons/inventory/feet/item_vr.dmi',\ SPECIES_TAJ = 'icons/inventory/feet/item_vr_tajaran.dmi',\ SPECIES_SKRELL = 'icons/inventory/feet/item_vr_skrell.dmi',\ SPECIES_UNATHI = 'icons/inventory/feet/item_vr_unathi.dmi',\ diff --git a/code/_helpers/_lists.dm b/code/_helpers/_lists.dm index d71897c466..c359227f05 100644 --- a/code/_helpers/_lists.dm +++ b/code/_helpers/_lists.dm @@ -127,22 +127,19 @@ //returns a new list with only atoms that are in typecache L /proc/typecache_filter_list(list/atoms, list/typecache) . = list() - for(var/thing in atoms) - var/atom/A = thing + for(var/atom/A as anything in atoms) if(typecache[A.type]) . += A /proc/typecache_filter_list_reverse(list/atoms, list/typecache) . = list() - for(var/thing in atoms) - var/atom/A = thing + for(var/atom/A as anything in atoms) if(!typecache[A.type]) . += A /proc/typecache_filter_multi_list_exclusion(list/atoms, list/typecache_include, list/typecache_exclude) . = list() - for(var/thing in atoms) - var/atom/A = thing + for(var/atom/A as anything in atoms) if(typecache_include[A.type] && !typecache_exclude[A.type]) . += A diff --git a/code/_helpers/game.dm b/code/_helpers/game.dm index 179f7251d9..ac38f40302 100644 --- a/code/_helpers/game.dm +++ b/code/_helpers/game.dm @@ -226,8 +226,7 @@ var/mobs_radio_range_fired = 1 //CHOMPEdit . = list() // Returns a list of mobs who can hear any of the radios given in @radios var/list/speaker_coverage = list() - for(var/r in radios) - var/obj/item/device/radio/R = r // You better fucking be a radio. + for(var/obj/item/device/radio/R as anything in radios) var/turf/speaker = get_turf(R) if(speaker) for(var/turf/T in R.can_broadcast_to()) //CHOMPEdit @@ -378,8 +377,7 @@ var/mobs_radio_range_fired = 1 //CHOMPEdit /proc/flick_overlay_view(image/I, atom/target, duration, gc_after) //wrapper for the above, flicks to everyone who can see the target atom var/list/viewing = list() - for(var/m in viewers(target)) - var/mob/M = m + for(var/mob/M as anything in viewers(target)) if(M.client) viewing += M.client flick_overlay(I, viewing, duration, gc_after) diff --git a/code/_helpers/global_lists.dm b/code/_helpers/global_lists.dm index fcb6554a5c..1a482e6d24 100644 --- a/code/_helpers/global_lists.dm +++ b/code/_helpers/global_lists.dm @@ -215,23 +215,20 @@ GLOBAL_LIST_EMPTY(mannequins) // Suit cyclers paths = subtypesof(/datum/suit_cycler_choice/department) - for(var/path in paths) - var/datum/suit_cycler_choice/SCC = path + for(var/datum/suit_cycler_choice/SCC as anything in paths) if(!initial(SCC.name)) continue - GLOB.suit_cycler_departments += new path() + GLOB.suit_cycler_departments += new SCC() paths = subtypesof(/datum/suit_cycler_choice/species) - for(var/path in paths) - var/datum/suit_cycler_choice/SCC = path + for(var/datum/suit_cycler_choice/SCC as anything in paths) if(!initial(SCC.name)) continue - GLOB.suit_cycler_species += new path() + GLOB.suit_cycler_species += new SCC() paths = subtypesof(/datum/suit_cycler_choice/department/emag) - for(var/path in paths) - var/datum/suit_cycler_choice/SCC = path + for(var/datum/suit_cycler_choice/SCC as anything in paths) if(!initial(SCC.name)) continue - GLOB.suit_cycler_emagged += new path() + GLOB.suit_cycler_emagged += new SCC() //Ores paths = subtypesof(/ore) @@ -273,7 +270,7 @@ GLOBAL_LIST_EMPTY(mannequins) /* // Custom species traits - paths = subtypesof(/datum/trait) - /datum/trait + paths = subtypesof(/datum/trait) for(var/path in paths) var/datum/trait/instance = new path() if(!instance.name) diff --git a/code/_helpers/global_lists_vr.dm b/code/_helpers/global_lists_vr.dm index 7224522352..178903c82a 100644 --- a/code/_helpers/global_lists_vr.dm +++ b/code/_helpers/global_lists_vr.dm @@ -507,11 +507,11 @@ var/global/list/remainless_species = list(SPECIES_PROMETHEAN, SPECIES_MONKEY_NEVREAN, SPECIES_MONKEY_SERGAL, SPECIES_MONKEY_VULPKANIN, - SPECIES_GENA, //Same for xenos, CHOMPedit - SPECIES_GENA_DRONE, - SPECIES_GENA_HUNTER, - SPECIES_GENA_SENTINEL, - SPECIES_GENA_QUEEN, //CHOMPedit end + SPECIES_XENO, //Same for xenos, + SPECIES_XENO_DRONE, + SPECIES_XENO_HUNTER, + SPECIES_XENO_SENTINEL, + SPECIES_XENO_QUEEN, SPECIES_SHADOW, SPECIES_GOLEM, //Some special species that may or may not be ever used in event too, SPECIES_SHADEKIN) //Shadefluffers just poof away @@ -534,7 +534,7 @@ var/global/list/remainless_species = list(SPECIES_PROMETHEAN, var/paths // Custom Hair Accessories - paths = typesof(/datum/sprite_accessory/hair_accessory) - /datum/sprite_accessory/hair_accessory + paths = subtypesof(/datum/sprite_accessory/hair_accessory) for(var/path in paths) var/datum/sprite_accessory/hair_accessory/instance = new path() hair_accesories_list[path] = instance @@ -568,14 +568,14 @@ var/global/list/remainless_species = list(SPECIES_PROMETHEAN, // Weaver recipe stuff - paths = typesof(/datum/weaver_recipe/structure) - /datum/weaver_recipe/structure + paths = subtypesof(/datum/weaver_recipe/structure) for(var/path in paths) var/datum/weaver_recipe/instance = new path() if(!instance.title) continue //A prototype or something weavable_structures[instance.title] = instance - paths = typesof(/datum/weaver_recipe/item) - /datum/weaver_recipe/item + paths = subtypesof(/datum/weaver_recipe/item) for(var/path in paths) var/datum/weaver_recipe/instance = new path() if(!instance.title) diff --git a/code/_helpers/icons.dm b/code/_helpers/icons.dm index 8e4de46935..24f398c8ec 100644 --- a/code/_helpers/icons.dm +++ b/code/_helpers/icons.dm @@ -1,218 +1,3 @@ -/* -IconProcs README - -A BYOND library for manipulating icons and colors - -by Lummox JR - -version 1.0 - -The IconProcs library was made to make a lot of common icon operations much easier. BYOND's icon manipulation -routines are very capable but some of the advanced capabilities like using alpha transparency can be unintuitive to beginners. - -CHANGING ICONS - -Several new procs have been added to the /icon datum to simplify working with icons. To use them, -remember you first need to setup an /icon var like so: - -var/icon/my_icon = new('iconfile.dmi') - -icon/ChangeOpacity(amount = 1) - A very common operation in DM is to try to make an icon more or less transparent. Making an icon more - transparent is usually much easier than making it less so, however. This proc basically is a frontend - for MapColors() which can change opacity any way you like, in much the same way that SetIntensity() - can make an icon lighter or darker. If amount is 0.5, the opacity of the icon will be cut in half. - If amount is 2, opacity is doubled and anything more than half-opaque will become fully opaque. -icon/GrayScale() - Converts the icon to grayscale instead of a fully colored icon. Alpha values are left intact. -icon/ColorTone(tone) - Similar to GrayScale(), this proc converts the icon to a range of black -> tone -> white, where tone is an - RGB color (its alpha is ignored). This can be used to create a sepia tone or similar effect. - See also the global ColorTone() proc. -icon/MinColors(icon) - The icon is blended with a second icon where the minimum of each RGB pixel is the result. - Transparency may increase, as if the icons were blended with ICON_ADD. You may supply a color in place of an icon. -icon/MaxColors(icon) - The icon is blended with a second icon where the maximum of each RGB pixel is the result. - Opacity may increase, as if the icons were blended with ICON_OR. You may supply a color in place of an icon. -icon/Opaque(background = "#000000") - All alpha values are set to 255 throughout the icon. Transparent pixels become black, or whatever background color you specify. -icon/BecomeAlphaMask() - You can convert a simple grayscale icon into an alpha mask to use with other icons very easily with this proc. - The black parts become transparent, the white parts stay white, and anything in between becomes a translucent shade of white. -icon/AddAlphaMask(mask) - The alpha values of the mask icon will be blended with the current icon. Anywhere the mask is opaque, - the current icon is untouched. Anywhere the mask is transparent, the current icon becomes transparent. - Where the mask is translucent, the current icon becomes more transparent. -icon/UseAlphaMask(mask, mode) - Sometimes you may want to take the alpha values from one icon and use them on a different icon. - This proc will do that. Just supply the icon whose alpha mask you want to use, and src will change - so it has the same colors as before but uses the mask for opacity. - -COLOR MANAGEMENT AND HSV - -RGB isn't the only way to represent color. Sometimes it's more useful to work with a model called HSV, which stands for hue, saturation, and value. - - * The hue of a color describes where it is along the color wheel. It goes from red to yellow to green to - cyan to blue to magenta and back to red. - * The saturation of a color is how much color is in it. A color with low saturation will be more gray, - and with no saturation at all it is a shade of gray. - * The value of a color determines how bright it is. A high-value color is vivid, moderate value is dark, - and no value at all is black. - -Just as BYOND uses "#rrggbb" to represent RGB values, a similar format is used for HSV: "#hhhssvv". The hue is three -hex digits because it ranges from 0 to 0x5FF. - - * 0 to 0xFF - red to yellow - * 0x100 to 0x1FF - yellow to green - * 0x200 to 0x2FF - green to cyan - * 0x300 to 0x3FF - cyan to blue - * 0x400 to 0x4FF - blue to magenta - * 0x500 to 0x5FF - magenta to red - -Knowing this, you can figure out that red is "#000ffff" in HSV format, which is hue 0 (red), saturation 255 (as colorful as possible), -value 255 (as bright as possible). Green is "#200ffff" and blue is "#400ffff". - -More than one HSV color can match the same RGB color. - -Here are some procs you can use for color management: - -ReadRGB(rgb) - Takes an RGB string like "#ffaa55" and converts it to a list such as list(255,170,85). If an RGBA format is used - that includes alpha, the list will have a fourth item for the alpha value. -hsv(hue, sat, val, apha) - Counterpart to rgb(), this takes the values you input and converts them to a string in "#hhhssvv" or "#hhhssvvaa" - format. Alpha is not included in the result if null. -ReadHSV(rgb) - Takes an HSV string like "#100FF80" and converts it to a list such as list(256,255,128). If an HSVA format is used that - includes alpha, the list will have a fourth item for the alpha value. -RGBtoHSV(rgb) - Takes an RGB or RGBA string like "#ffaa55" and converts it into an HSV or HSVA color such as "#080aaff". -HSVtoRGB(hsv) - Takes an HSV or HSVA string like "#080aaff" and converts it into an RGB or RGBA color such as "#ff55aa". -BlendRGB(rgb1, rgb2, amount) - Blends between two RGB or RGBA colors using regular RGB blending. If amount is 0, the first color is the result; - if 1, the second color is the result. 0.5 produces an average of the two. Values outside the 0 to 1 range are allowed as well. - The returned value is an RGB or RGBA color. -BlendHSV(hsv1, hsv2, amount) - Blends between two HSV or HSVA colors using HSV blending, which tends to produce nicer results than regular RGB - blending because the brightness of the color is left intact. If amount is 0, the first color is the result; if 1, - the second color is the result. 0.5 produces an average of the two. Values outside the 0 to 1 range are allowed as well. - The returned value is an HSV or HSVA color. -BlendRGBasHSV(rgb1, rgb2, amount) - Like BlendHSV(), but the colors used and the return value are RGB or RGBA colors. The blending is done in HSV form. -HueToAngle(hue) - Converts a hue to an angle range of 0 to 360. Angle 0 is red, 120 is green, and 240 is blue. -AngleToHue(hue) - Converts an angle to a hue in the valid range. -RotateHue(hsv, angle) - Takes an HSV or HSVA value and rotates the hue forward through red, green, and blue by an angle from 0 to 360. - (Rotating red by 60deg produces yellow.) The result is another HSV or HSVA color with the same saturation and value - as the original, but a different hue. -GrayScale(rgb) - Takes an RGB or RGBA color and converts it to grayscale. Returns an RGB or RGBA string. -ColorTone(rgb, tone) - Similar to GrayScale(), this proc converts an RGB or RGBA color to a range of black -> tone -> white instead of - using strict shades of gray. The tone value is an RGB color; any alpha value is ignored. -*/ - -/* -Get Flat Icon DEMO by DarkCampainger - -This is a test for the get flat icon proc, modified approprietly for icons and their states. -Probably not a good idea to run this unless you want to see how the proc works in detail. -mob - icon = 'old_or_unused.dmi' - icon_state = "green" - - Login() - // Testing image underlays - underlays += image(icon='old_or_unused.dmi',icon_state="red") - underlays += image(icon='old_or_unused.dmi',icon_state="red", pixel_x = 32) - underlays += image(icon='old_or_unused.dmi',icon_state="red", pixel_x = -32) - - // Testing image overlays - overlays += image(icon='old_or_unused.dmi',icon_state="green", pixel_x = 32, pixel_y = -32) - overlays += image(icon='old_or_unused.dmi',icon_state="green", pixel_x = 32, pixel_y = 32) - overlays += image(icon='old_or_unused.dmi',icon_state="green", pixel_x = -32, pixel_y = -32) - - // Testing icon file overlays (defaults to mob's state) - overlays += '_flat_demoIcons2.dmi' - - // Testing icon_state overlays (defaults to mob's icon) - overlays += "white" - - // Testing dynamic icon overlays - var/icon/I = icon('old_or_unused.dmi', icon_state="aqua") - I.Shift(NORTH,16,1) - overlays+=I - - // Testing dynamic image overlays - I=image(icon=I,pixel_x = -32, pixel_y = 32) - overlays+=I - - // Testing object types (and layers) - overlays+=/obj/effect/overlayTest - - loc = locate (10,10,1) - verb - Browse_Icon() - set name = "1. Browse Icon" - // Give it a name for the cache - var/iconName = "[ckey(src.name)]_flattened.dmi" - // Send the icon to src's local cache - src<

") - - Output_Icon() - set name = "2. Output Icon" - to_chat(src, "Icon is: [bicon(getFlatIcon(src))]") - - Label_Icon() - set name = "3. Label Icon" - // Give it a name for the cache - var/iconName = "[ckey(src.name)]_flattened.dmi" - // Copy the file to the rsc manually - var/icon/I = fcopy_rsc(getFlatIcon(src)) - // Send the icon to src's local cache - src< 57 && ch < 65) || (ch > 70 && ch < 97) || ch > 102) break - ++digits - if(digits == 8) break - - var/single = digits < 6 - if(digits != 3 && digits != 4 && digits != 6 && digits != 8) return - if(digits == 4 || digits == 8) usealpha = 1 - for(i=start, digits>0, ++i) - ch = text2ascii(rgb, i) - if(ch >= 48 && ch <= 57) ch -= 48 - else if(ch >= 65 && ch <= 70) ch -= 55 - else if(ch >= 97 && ch <= 102) ch -= 87 - else break - --digits - switch(which) - if(0) - r = (r << 4) | ch - if(single) - r |= r << 4 - ++which - else if(!(digits & 1)) ++which - if(1) - g = (g << 4) | ch - if(single) - g |= g << 4 - ++which - else if(!(digits & 1)) ++which - if(2) - b = (b << 4) | ch - if(single) - b |= b << 4 - ++which - else if(!(digits & 1)) ++which - if(3) - alpha = (alpha << 4) | ch - if(single) alpha |= alpha << 4 - - . = list(r, g, b) - if(usealpha) . += alpha - -/proc/RGBdec2hex(var/list/values) - var/string = "" - while(values.len) - string = "[num2text(values[values.len], 2, 16)][string]" - values.len-- - return "#[string]" - -/proc/ReadHSV(hsv) - if(!hsv) return - - // interpret the HSV or HSVA value - var/i=1,start=1 - if(text2ascii(hsv) == 35) ++start // skip opening # - var/ch,which=0,hue=0,sat=0,val=0,alpha=0,usealpha - var/digits=0 - for(i=start, i<=length(hsv), ++i) - ch = text2ascii(hsv, i) - if(ch < 48 || (ch > 57 && ch < 65) || (ch > 70 && ch < 97) || ch > 102) break - ++digits - if(digits == 9) break - if(digits > 7) usealpha = 1 - if(digits <= 4) ++which - if(digits <= 2) ++which - for(i=start, digits>0, ++i) - ch = text2ascii(hsv, i) - if(ch >= 48 && ch <= 57) ch -= 48 - else if(ch >= 65 && ch <= 70) ch -= 55 - else if(ch >= 97 && ch <= 102) ch -= 87 - else break - --digits - switch(which) - if(0) - hue = (hue << 4) | ch - if(digits == (usealpha ? 6 : 4)) ++which - if(1) - sat = (sat << 4) | ch - if(digits == (usealpha ? 4 : 2)) ++which - if(2) - val = (val << 4) | ch - if(digits == (usealpha ? 2 : 0)) ++which - if(3) - alpha = (alpha << 4) | ch - - . = list(hue, sat, val) - if(usealpha) . += alpha - -/proc/HSVtoRGB(hsv) - if(!hsv) return "#000000" - var/list/HSV = ReadHSV(hsv) - if(!HSV) return "#000000" - - var/hue = HSV[1] - var/sat = HSV[2] - var/val = HSV[3] - - // Compress hue into easier-to-manage range - hue -= hue >> 8 - if(hue >= 0x5fa) hue -= 0x5fa - - var/hi,mid,lo,r,g,b - hi = val - lo = round((255 - sat) * val / 255, 1) - mid = lo + round(abs(round(hue, 510) - hue) * (hi - lo) / 255, 1) - if(hue >= 765) - if(hue >= 1275) {r=hi; g=lo; b=mid} - else if(hue >= 1020) {r=mid; g=lo; b=hi } - else {r=lo; g=mid; b=hi } - else - if(hue >= 510) {r=lo; g=hi; b=mid} - else if(hue >= 255) {r=mid; g=hi; b=lo } - else {r=hi; g=mid; b=lo } - - return (HSV.len > 3) ? rgb(r,g,b,HSV[4]) : rgb(r,g,b) - -/proc/RGBtoHSV(rgb) - if(!rgb) return "#0000000" - var/list/RGB = ReadRGB(rgb) - if(!RGB) return "#0000000" - - var/r = RGB[1] - var/g = RGB[2] - var/b = RGB[3] - var/hi = max(r,g,b) - var/lo = min(r,g,b) - - var/val = hi - var/sat = hi ? round((hi-lo) * 255 / hi, 1) : 0 - var/hue = 0 - - if(sat) - var/dir - var/mid - if(hi == r) - if(lo == b) {hue=0; dir=1; mid=g} - else {hue=1535; dir=-1; mid=b} - else if(hi == g) - if(lo == r) {hue=512; dir=1; mid=b} - else {hue=511; dir=-1; mid=r} - else if(hi == b) - if(lo == g) {hue=1024; dir=1; mid=r} - else {hue=1023; dir=-1; mid=g} - hue += dir * round((mid-lo) * 255 / (hi-lo), 1) - - return hsv(hue, sat, val, (RGB.len>3 ? RGB[4] : null)) - -/proc/hsv(hue, sat, val, alpha) - if(hue < 0 || hue >= 1536) hue %= 1536 - if(hue < 0) hue += 1536 - if((hue & 0xFF) == 0xFF) - ++hue - if(hue >= 1536) hue = 0 - if(sat < 0) sat = 0 - if(sat > 255) sat = 255 - if(val < 0) val = 0 - if(val > 255) val = 255 - . = "#" - . += TO_HEX_DIGIT(hue >> 8) - . += TO_HEX_DIGIT(hue >> 4) - . += TO_HEX_DIGIT(hue) - . += TO_HEX_DIGIT(sat >> 4) - . += TO_HEX_DIGIT(sat) - . += TO_HEX_DIGIT(val >> 4) - . += TO_HEX_DIGIT(val) - if(!isnull(alpha)) - if(alpha < 0) alpha = 0 - if(alpha > 255) alpha = 255 - . += TO_HEX_DIGIT(alpha >> 4) - . += TO_HEX_DIGIT(alpha) - -/* - Smooth blend between HSV colors - - amount=0 is the first color - amount=1 is the second color - amount=0.5 is directly between the two colors - - amount<0 or amount>1 are allowed - */ -/proc/BlendHSV(hsv1, hsv2, amount) - var/list/HSV1 = ReadHSV(hsv1) - var/list/HSV2 = ReadHSV(hsv2) - - // add missing alpha if needed - if(HSV1.len < HSV2.len) HSV1 += 255 - else if(HSV2.len < HSV1.len) HSV2 += 255 - var/usealpha = HSV1.len > 3 - - // normalize hsv values in case anything is screwy - if(HSV1[1] > 1536) HSV1[1] %= 1536 - if(HSV2[1] > 1536) HSV2[1] %= 1536 - if(HSV1[1] < 0) HSV1[1] += 1536 - if(HSV2[1] < 0) HSV2[1] += 1536 - if(!HSV1[3]) {HSV1[1] = 0; HSV1[2] = 0} - if(!HSV2[3]) {HSV2[1] = 0; HSV2[2] = 0} - - // no value for one color means don't change saturation - if(!HSV1[3]) HSV1[2] = HSV2[2] - if(!HSV2[3]) HSV2[2] = HSV1[2] - // no saturation for one color means don't change hues - if(!HSV1[2]) HSV1[1] = HSV2[1] - if(!HSV2[2]) HSV2[1] = HSV1[1] - - // Compress hues into easier-to-manage range - HSV1[1] -= HSV1[1] >> 8 - HSV2[1] -= HSV2[1] >> 8 - - var/hue_diff = HSV2[1] - HSV1[1] - if(hue_diff > 765) hue_diff -= 1530 - else if(hue_diff <= -765) hue_diff += 1530 - - var/hue = round(HSV1[1] + hue_diff * amount, 1) - var/sat = round(HSV1[2] + (HSV2[2] - HSV1[2]) * amount, 1) - var/val = round(HSV1[3] + (HSV2[3] - HSV1[3]) * amount, 1) - var/alpha = usealpha ? round(HSV1[4] + (HSV2[4] - HSV1[4]) * amount, 1) : null - - // normalize hue - if(hue < 0 || hue >= 1530) hue %= 1530 - if(hue < 0) hue += 1530 - // decompress hue - hue += round(hue / 255) - - return hsv(hue, sat, val, alpha) - -/* - Smooth blend between RGB colors - - amount=0 is the first color - amount=1 is the second color - amount=0.5 is directly between the two colors - - amount<0 or amount>1 are allowed - */ /proc/BlendRGB(rgb1, rgb2, amount) - var/list/RGB1 = ReadRGB(rgb1) - var/list/RGB2 = ReadRGB(rgb2) + var/list/RGB1 = rgb2num(rgb1) + var/list/RGB2 = rgb2num(rgb2) // add missing alpha if needed if(RGB1.len < RGB2.len) RGB1 += 255 @@ -574,65 +95,6 @@ world return isnull(alpha) ? rgb(r, g, b) : rgb(r, g, b, alpha) -/proc/BlendRGBasHSV(rgb1, rgb2, amount) - return HSVtoRGB(RGBtoHSV(rgb1), RGBtoHSV(rgb2), amount) - -/proc/HueToAngle(hue) - // normalize hsv in case anything is screwy - if(hue < 0 || hue >= 1536) hue %= 1536 - if(hue < 0) hue += 1536 - // Compress hue into easier-to-manage range - hue -= hue >> 8 - return hue / (1530/360) - -/proc/AngleToHue(angle) - // normalize hsv in case anything is screwy - if(angle < 0 || angle >= 360) angle -= 360 * round(angle / 360) - var/hue = angle * (1530/360) - // Decompress hue - hue += round(hue / 255) - return hue - - -// positive angle rotates forward through red->green->blue -/proc/RotateHue(hsv, angle) - var/list/HSV = ReadHSV(hsv) - - // normalize hsv in case anything is screwy - if(HSV[1] >= 1536) HSV[1] %= 1536 - if(HSV[1] < 0) HSV[1] += 1536 - - // Compress hue into easier-to-manage range - HSV[1] -= HSV[1] >> 8 - - if(angle < 0 || angle >= 360) angle -= 360 * round(angle / 360) - HSV[1] = round(HSV[1] + angle * (1530/360), 1) - - // normalize hue - if(HSV[1] < 0 || HSV[1] >= 1530) HSV[1] %= 1530 - if(HSV[1] < 0) HSV[1] += 1530 - // decompress hue - HSV[1] += round(HSV[1] / 255) - - return hsv(HSV[1], HSV[2], HSV[3], (HSV.len > 3 ? HSV[4] : null)) - -// Convert an rgb color to grayscale -/proc/GrayScale(rgb) - var/list/RGB = ReadRGB(rgb) - var/gray = RGB[1]*0.3 + RGB[2]*0.59 + RGB[3]*0.11 - return (RGB.len > 3) ? rgb(gray, gray, gray, RGB[4]) : rgb(gray, gray, gray) - -// Change grayscale color to black->tone->white range -/proc/ColorTone(rgb, tone) - var/list/RGB = ReadRGB(rgb) - var/list/TONE = ReadRGB(tone) - - var/gray = RGB[1]*0.3 + RGB[2]*0.59 + RGB[3]*0.11 - var/tone_gray = TONE[1]*0.3 + TONE[2]*0.59 + TONE[3]*0.11 - - if(gray <= tone_gray) return BlendRGB("#000000", tone, gray/(tone_gray || 1)) - else return BlendRGB(tone, "#ffffff", (gray-tone_gray)/((255-tone_gray) || 1)) - // Ported from /tg/station // Creates a single icon from a given /atom or /image. Only the first argument is required. /proc/getFlatIcon(image/A, defdir, deficon, defstate, defblend, start = TRUE, no_anim = FALSE) @@ -762,8 +224,7 @@ world // Dimensions of overlay being added var/list/add_size[4] - for(var/V in layers) - var/image/I = V + for(var/image/I as anything in layers) if(I.alpha == 0) continue @@ -897,8 +358,7 @@ world //For photo camera. /proc/build_composite_icon(atom/A) var/icon/composite = icon(A.icon, A.icon_state, A.dir, 1) - for(var/O in A.overlays) - var/image/I = O + for(var/image/I as anything in A.overlays) composite.Blend(icon(I.icon, I.icon_state, I.dir, 1), ICON_OVERLAY) return composite @@ -937,7 +397,7 @@ GLOBAL_LIST_EMPTY(cached_examine_icons) if (!color) return "#FFFFFF" if (!value) return color - var/list/RGB = ReadRGB(color) + var/list/RGB = rgb2num(color) RGB[1] = CLAMP(RGB[1]+value,0,255) RGB[2] = CLAMP(RGB[2]+value,0,255) RGB[3] = CLAMP(RGB[3]+value,0,255) diff --git a/code/_helpers/icons_vr.dm b/code/_helpers/icons_vr.dm index 1b500862b6..1afbeb21f1 100644 --- a/code/_helpers/icons_vr.dm +++ b/code/_helpers/icons_vr.dm @@ -12,14 +12,14 @@ var/final_average if (accurate) //keeping it legible for(var/i = 1 to total) - RGB = ReadRGB(colors[i]) + RGB = rgb2num(colors[i]) colorsum[1] += RGB[1]*RGB[1] colorsum[2] += RGB[2]*RGB[2] colorsum[3] += RGB[3]*RGB[3] final_average = rgb(sqrt(colorsum[1]/total), sqrt(colorsum[2]/total), sqrt(colorsum[3]/total)) else for(var/i = 1 to total) - RGB = ReadRGB(colors[i]) + RGB = rgb2num(colors[i]) colorsum[1] += RGB[1] colorsum[2] += RGB[2] colorsum[3] += RGB[3] @@ -32,7 +32,7 @@ for(var/y_pixel = 1 to I.Height()) var/this_color = I.GetPixel(x_pixel, y_pixel) if(this_color) - if (ignoreGreyscale && ReadHSV(RGBtoHSV(this_color))[2] == 0) //If saturation is 0, must be greyscale + if (ignoreGreyscale && rgb2num(this_color, COLORSPACE_HSV)[2] == 0) //If saturation is 0, must be greyscale continue colors.Add(this_color) return colors diff --git a/code/_helpers/unsorted.dm b/code/_helpers/unsorted.dm index cef24751a2..4772ebcdf4 100644 --- a/code/_helpers/unsorted.dm +++ b/code/_helpers/unsorted.dm @@ -1249,8 +1249,7 @@ var/mob/dview/dview_mob = new if(orange) turfs -= get_turf(center) . = list() - for(var/V in turfs) - var/turf/T = V + for(var/turf/T as anything in turfs) . += T . += T.contents if(areas) diff --git a/code/_helpers/visual_filters.dm b/code/_helpers/visual_filters.dm index 96f6871000..c02bbb6993 100644 --- a/code/_helpers/visual_filters.dm +++ b/code/_helpers/visual_filters.dm @@ -335,8 +335,7 @@ GLOBAL_LIST_INIT(master_filter_info, list( /obj/item/update_filters() . = ..() /* Will port this from TG - for(var/X in actions) - var/datum/action/A = X + for(var/datum/action/A as anything in actions) A.UpdateButtonIcon() */ diff --git a/code/_onclick/hud/minihud_rigmech.dm b/code/_onclick/hud/minihud_rigmech.dm index e54a733f80..b4d13f1c86 100644 --- a/code/_onclick/hud/minihud_rigmech.dm +++ b/code/_onclick/hud/minihud_rigmech.dm @@ -21,8 +21,7 @@ screenobjs += new /obj/screen/rig/deco1_f screenobjs += new /obj/screen/rig/deco2_f - for(var/scr in screenobjs) - var/obj/screen/S = scr + for(var/obj/screen/S as anything in screenobjs) S.master = owner_rig ..() @@ -71,8 +70,7 @@ screenobjs += new /obj/screen/mech/deco1_f screenobjs += new /obj/screen/mech/deco2_f - for(var/scr in screenobjs) - var/obj/screen/S = scr + for(var/obj/screen/S as anything in screenobjs) S.master = owner_mech ..() diff --git a/code/controllers/configuration.dm b/code/controllers/configuration.dm index 037664027a..2bafc95462 100644 --- a/code/controllers/configuration.dm +++ b/code/controllers/configuration.dm @@ -232,7 +232,7 @@ var/list/gamemode_cache = list() // 15, 45, 70 minutes respectively var/static/list/event_delay_upper = list(EVENT_LEVEL_MUNDANE = 9000, EVENT_LEVEL_MODERATE = 27000, EVENT_LEVEL_MAJOR = 42000) - var/static/aliens_allowed = 1 //CHOMPedit to 1. This not only allows the natural spawning of xenos, but also the ability to lay eggs. Genaprawns cannot lay eggs if this is 0 + var/static/aliens_allowed = 1 var/static/ninjas_allowed = 0 var/static/abandon_allowed = 1 var/static/ooc_allowed = 1 @@ -300,7 +300,7 @@ var/list/gamemode_cache = list() var/static/list/jukebox_track_files /datum/configuration/New() - var/list/L = typesof(/datum/game_mode) - /datum/game_mode + var/list/L = subtypesof(/datum/game_mode) for (var/T in L) // I wish I didn't have to instance the game modes in order to look up // their information, but it is the only way (at least that I know of). diff --git a/code/controllers/master.dm b/code/controllers/master.dm index 4ff1b7219b..fc065bc86a 100644 --- a/code/controllers/master.dm +++ b/code/controllers/master.dm @@ -251,8 +251,7 @@ GLOBAL_REAL(Master, /datum/controller/master) = new var/list/tickersubsystems = list() var/list/runlevel_sorted_subsystems = list(list()) //ensure we always have at least one runlevel var/timer = world.time - for (var/thing in subsystems) - var/datum/controller/subsystem/SS = thing + for (var/datum/controller/subsystem/SS as anything in subsystems) if (SS.flags & SS_NO_FIRE) continue SS.queued_time = 0 @@ -339,8 +338,7 @@ GLOBAL_REAL(Master, /datum/controller/master) = new cached_runlevel = checking_runlevel current_runlevel_subsystems = runlevel_sorted_subsystems[cached_runlevel] var/stagger = world.time - for(var/I in current_runlevel_subsystems) - var/datum/controller/subsystem/SS = I + for(var/datum/controller/subsystem/SS as anything in current_runlevel_subsystems) if(SS.next_fire <= world.time) stagger += world.tick_lag * rand(1, 5) SS.next_fire = stagger @@ -553,8 +551,7 @@ GLOBAL_REAL(Master, /datum/controller/master) = new for(var/I in runlevel_SS) subsystemstocheck |= I - for (var/thing in subsystemstocheck) - var/datum/controller/subsystem/SS = thing + for (var/datum/controller/subsystem/SS as anything in subsystemstocheck) if (!SS || !istype(SS)) //list(SS) is so if a list makes it in the subsystem list, we remove the list, not the contents subsystems -= list(SS) @@ -601,8 +598,7 @@ GLOBAL_REAL(Master, /datum/controller/master) = new //disallow more than one map to load at once, multithreading it will just cause race conditions while(map_loading) stoplag() - for(var/S in subsystems) - var/datum/controller/subsystem/SS = S + for(var/datum/controller/subsystem/SS as anything in subsystems) SS.StartLoadingMap() map_loading = TRUE @@ -611,6 +607,5 @@ GLOBAL_REAL(Master, /datum/controller/master) = new if(!quiet) admin_notice("Map is finished. Unlocking.", R_DEBUG) map_loading = FALSE - for(var/S in subsystems) - var/datum/controller/subsystem/SS = S + for(var/datum/controller/subsystem/SS as anything in subsystems) SS.StopLoadingMap() diff --git a/code/controllers/subsystems/assets.dm b/code/controllers/subsystems/assets.dm index 0da1173cd0..75c23ff10f 100644 --- a/code/controllers/subsystems/assets.dm +++ b/code/controllers/subsystems/assets.dm @@ -6,23 +6,10 @@ SUBSYSTEM_DEF(assets) var/list/preload = list() /datum/controller/subsystem/assets/Initialize(timeofday) -<<<<<<< HEAD - for(var/type in typesof(/datum/asset)) - var/datum/asset/A = type - if (type != initial(A._abstract)) - get_asset_datum(type) - -||||||| parent of 70cccc775a... Merge pull request #11192 from VOREStation/Arokha/hmm - for(var/datum/asset/A as anything in typesof(/datum/asset)) - if (type != initial(A._abstract)) - get_asset_datum(type) - -======= for(var/typepath in typesof(/datum/asset)) var/datum/asset/A = typepath if (typepath != initial(A._abstract)) get_asset_datum(typepath) ->>>>>>> 70cccc775a... Merge pull request #11192 from VOREStation/Arokha/hmm preload = cache.Copy() //don't preload assets generated during the round diff --git a/code/controllers/subsystems/atoms.dm b/code/controllers/subsystems/atoms.dm index 4db490914a..a62c5265c5 100644 --- a/code/controllers/subsystems/atoms.dm +++ b/code/controllers/subsystems/atoms.dm @@ -38,11 +38,10 @@ SUBSYSTEM_DEF(atoms) if(atoms) created_atoms = list() count = atoms.len - for(var/I in atoms) - var/atom/A = I + for(var/atom/A as anything in atoms) if(!A.initialized) - if(InitAtom(I, mapload_arg)) - atoms -= I + if(InitAtom(A, mapload_arg)) + atoms -= A CHECK_TICK else count = 0 @@ -57,8 +56,7 @@ SUBSYSTEM_DEF(atoms) initialized = INITIALIZATION_INNEW_REGULAR if(late_loaders.len) - for(var/I in late_loaders) - var/atom/A = I + for(var/atom/A as anything in late_loaders) A.LateInitialize() CHECK_TICK testing("Late initialized [late_loaders.len] atoms") diff --git a/code/controllers/subsystems/chat.dm b/code/controllers/subsystems/chat.dm index 553c30d128..aece61d39e 100644 --- a/code/controllers/subsystems/chat.dm +++ b/code/controllers/subsystems/chat.dm @@ -13,8 +13,7 @@ SUBSYSTEM_DEF(chat) /datum/controller/subsystem/chat/fire() var/list/msg_queue = src.msg_queue // Local variable for sanic speed. - for(var/i in msg_queue) - var/client/C = i + for(var/client/C as anything in msg_queue) var/list/messages = msg_queue[C] msg_queue -= C if (C) diff --git a/code/controllers/subsystems/circuits.dm b/code/controllers/subsystems/circuits.dm index 8fda048c60..4d2b282171 100644 --- a/code/controllers/subsystems/circuits.dm +++ b/code/controllers/subsystems/circuits.dm @@ -23,11 +23,10 @@ SUBSYSTEM_DEF(circuit) /datum/controller/subsystem/circuit/proc/circuits_init() //Cached lists for free performance - for(var/path in typesof(/obj/item/integrated_circuit)) - var/obj/item/integrated_circuit/IC = path - var/name = initial(IC.name) - all_components[name] = path // Populating the component lists - cached_components[IC] = new path + for(var/obj/item/integrated_circuit/IC as anything in typesof(/obj/item/integrated_circuit)) + var/path = IC + all_components[initial(IC.name)] = path // Populating the component lists + cached_components[path] = new path if(!(initial(IC.spawn_flags) & (IC_SPAWN_DEFAULT | IC_SPAWN_RESEARCH))) continue @@ -38,11 +37,10 @@ SUBSYSTEM_DEF(circuit) var/list/category_list = circuit_fabricator_recipe_list[category] category_list += IC // Populating the fabricator categories - for(var/path in typesof(/obj/item/device/electronic_assembly)) - var/obj/item/device/electronic_assembly/A = path - var/name = initial(A.name) - all_assemblies[name] = path - cached_assemblies[A] = new path + for(var/obj/item/device/electronic_assembly/A as anything in typesof(/obj/item/device/electronic_assembly)) + var/path = A + all_assemblies[initial(A.name)] = path + cached_assemblies[path] = new path circuit_fabricator_recipe_list["Assemblies"] = list( diff --git a/code/controllers/subsystems/events.dm b/code/controllers/subsystems/events.dm index 5b613775e4..83ab2fa00c 100644 --- a/code/controllers/subsystems/events.dm +++ b/code/controllers/subsystems/events.dm @@ -13,7 +13,7 @@ SUBSYSTEM_DEF(events) var/datum/event_meta/new_event = new /datum/controller/subsystem/events/Initialize() - allEvents = typesof(/datum/event) - /datum/event + allEvents = subtypesof(/datum/event) event_containers = list( EVENT_LEVEL_MUNDANE = new/datum/event_container/mundane, EVENT_LEVEL_MODERATE = new/datum/event_container/moderate, diff --git a/code/controllers/subsystems/events2.dm b/code/controllers/subsystems/events2.dm index 2a73498b1d..7cf986358f 100644 --- a/code/controllers/subsystems/events2.dm +++ b/code/controllers/subsystems/events2.dm @@ -14,8 +14,7 @@ SUBSYSTEM_DEF(event_ticker) // Process active events. /datum/controller/subsystem/event_ticker/fire(resumed) - for(var/E in active_events) - var/datum/event2/event/event = E + for(var/datum/event2/event/event as anything in active_events) event.process() if(event.finished) event_finished(event) diff --git a/code/controllers/subsystems/game_master.dm b/code/controllers/subsystems/game_master.dm index 01ea086935..06a6060227 100644 --- a/code/controllers/subsystems/game_master.dm +++ b/code/controllers/subsystems/game_master.dm @@ -74,8 +74,7 @@ SUBSYSTEM_DEF(game_master) chosen_event.enabled = FALSE if(chosen_event.event_class) // Disable similar events, too. - for(var/M in available_events) - var/datum/event2/meta/meta = M + for(var/datum/event2/meta/meta as anything in available_events) if(meta.event_class == chosen_event.event_class) meta.enabled = FALSE @@ -235,8 +234,7 @@ SUBSYSTEM_DEF(game_master) dat += "Players" dat += "" - for(var/P in player_list) - var/mob/M = P + for(var/mob/M as anything in player_list) dat += "" dat += "[M] ([M.ckey])" dat += "[metric.assess_player_activity(M)]%" @@ -255,8 +253,7 @@ SUBSYSTEM_DEF(game_master) dat += "Buttons" dat += "" - for(var/E in available_events) - var/datum/event2/meta/event = E + for(var/datum/event2/meta/event as anything in available_events) dat += "" if(!event.enabled) dat += "[event.name]" @@ -285,8 +282,7 @@ SUBSYSTEM_DEF(game_master) dat += "Buttons" dat += "" - for(var/E in SSevent_ticker.active_events) - var/datum/event2/event/event = E + for(var/datum/event2/event/event as anything in SSevent_ticker.active_events) dat += "" dat += "[event.type]" dat += "[event.time_started]" @@ -309,8 +305,7 @@ SUBSYSTEM_DEF(game_master) dat += "Finish Time" dat += "" - for(var/E in SSevent_ticker.finished_events) - var/datum/event2/event/event = E + for(var/datum/event2/event/event as anything in SSevent_ticker.finished_events) dat += "" dat += "[event.type]" dat += "[event.time_started]" diff --git a/code/controllers/subsystems/garbage.dm b/code/controllers/subsystems/garbage.dm index 422fa6743f..c1fe92295d 100644 --- a/code/controllers/subsystems/garbage.dm +++ b/code/controllers/subsystems/garbage.dm @@ -172,8 +172,7 @@ SUBSYSTEM_DEF(garbage) log_world("## TESTING: GC: -- \ref[D] | [type] was unable to be GC'd --") #ifdef TESTING - for(var/c in GLOB.admins) //Using testing() here would fill the logs with ADMIN_VV garbage - var/client/admin = c + for(var/client/admin as anything in GLOB.admins) //Using testing() here would fill the logs with ADMIN_VV garbage if(!check_rights_for(admin, R_ADMIN)) continue to_chat(admin, "## TESTING: GC: -- [ADMIN_VV(D)] | [type] was unable to be GC'd --") diff --git a/code/controllers/subsystems/mapping.dm b/code/controllers/subsystems/mapping.dm index 848a5552d6..06bf16e255 100644 --- a/code/controllers/subsystems/mapping.dm +++ b/code/controllers/subsystems/mapping.dm @@ -34,11 +34,10 @@ SUBSYSTEM_DEF(mapping) ..() /datum/controller/subsystem/mapping/proc/load_map_templates() - for(var/T in subtypesof(/datum/map_template)) - var/datum/map_template/template = T + for(var/datum/map_template/template as anything in subtypesof(/datum/map_template)) if(!(initial(template.mappath))) // If it's missing the actual path its probably a base type or being used for inheritence. continue - template = new T() + template = new template() map_templates[template.name] = template return TRUE @@ -113,8 +112,7 @@ SUBSYSTEM_DEF(mapping) MT.load_new_z(centered = FALSE) /datum/controller/subsystem/mapping/proc/preloadShelterTemplates() - for(var/item in subtypesof(/datum/map_template/shelter)) - var/datum/map_template/shelter/shelter_type = item + for(var/datum/map_template/shelter/shelter_type as anything in subtypesof(/datum/map_template/shelter)) if(!(initial(shelter_type.mappath))) continue var/datum/map_template/shelter/S = new shelter_type() diff --git a/code/controllers/subsystems/persistence.dm b/code/controllers/subsystems/persistence.dm index 8168bfa6c2..f238621b3e 100644 --- a/code/controllers/subsystems/persistence.dm +++ b/code/controllers/subsystems/persistence.dm @@ -12,11 +12,10 @@ SUBSYSTEM_DEF(persistence) /datum/controller/subsystem/persistence/Initialize() . = ..() - for(var/thing in subtypesof(/datum/persistent)) - var/datum/persistent/P = thing + for(var/datum/persistent/P as anything in subtypesof(/datum/persistent)) if(initial(P.name)) P = new P - persistence_datums[thing] = P + persistence_datums[P.type] = P P.Initialize() /datum/controller/subsystem/persistence/Shutdown() diff --git a/code/controllers/subsystems/planets.dm b/code/controllers/subsystems/planets.dm index 16fbe59d3a..5486034871 100644 --- a/code/controllers/subsystems/planets.dm +++ b/code/controllers/subsystems/planets.dm @@ -111,8 +111,7 @@ SUBSYSTEM_DEF(planets) /datum/controller/subsystem/planets/proc/updateTemp(var/datum/planet/P) //Set new temperatures - for(var/W in P.planet_walls) - var/turf/unsimulated/wall/planetary/wall = W + for(var/turf/unsimulated/wall/planetary/wall as anything in P.planet_walls) wall.set_temperature(P.weather_holder.temperature) CHECK_TICK @@ -120,8 +119,7 @@ SUBSYSTEM_DEF(planets) var/count = 100000 while(count > 0) count-- - for(var/planet in planets) - var/datum/planet/P = planet + for(var/datum/planet/P as anything in planets) if(P.weather_holder) P.weather_holder.change_weather(pick(P.weather_holder.allowed_weather_types)) sleep(3) diff --git a/code/controllers/subsystems/plants.dm b/code/controllers/subsystems/plants.dm index cc066cb99d..f21cc1cb2c 100644 --- a/code/controllers/subsystems/plants.dm +++ b/code/controllers/subsystems/plants.dm @@ -62,7 +62,7 @@ SUBSYSTEM_DEF(plants) accessible_product_sprites |= base // Populate the global seed datum list. - for(var/type in typesof(/datum/seed)-/datum/seed) + for(var/type in subtypesof(/datum/seed)) var/datum/seed/S = new type seeds[S.name] = S S.uid = "[seeds.len]" diff --git a/code/controllers/subsystems/processing/instruments.dm b/code/controllers/subsystems/processing/instruments.dm index ee0fd1ea00..3f305fb8fc 100644 --- a/code/controllers/subsystems/processing/instruments.dm +++ b/code/controllers/subsystems/processing/instruments.dm @@ -33,11 +33,10 @@ PROCESSING_SUBSYSTEM_DEF(instruments) songs -= S /datum/controller/subsystem/processing/instruments/proc/initialize_instrument_data() - for(var/path in subtypesof(/datum/instrument)) - var/datum/instrument/I = path - if(initial(I.abstract_type) == path) + for(var/datum/instrument/I as anything in subtypesof(/datum/instrument)) + if(initial(I.abstract_type) == I) continue - I = new path + I = new I I.Initialize() if(!I.id) qdel(I) diff --git a/code/controllers/subsystems/processing/projectiles.dm b/code/controllers/subsystems/processing/projectiles.dm index e4316304ce..3e5e1b2127 100644 --- a/code/controllers/subsystems/processing/projectiles.dm +++ b/code/controllers/subsystems/processing/projectiles.dm @@ -19,7 +19,6 @@ PROCESSING_SUBSYSTEM_DEF(projectiles) /datum/controller/subsystem/processing/projectiles/proc/set_pixel_speed(new_speed) global_pixel_speed = new_speed - for(var/i in processing) - var/obj/item/projectile/P = i + for(var/obj/item/projectile/P as anything in processing) if(istype(P)) //there's non projectiles on this too. P.set_pixel_speed(new_speed) diff --git a/code/controllers/subsystems/radiation.dm b/code/controllers/subsystems/radiation.dm index 50c72ddd60..8f140a5fc8 100644 --- a/code/controllers/subsystems/radiation.dm +++ b/code/controllers/subsystems/radiation.dm @@ -63,8 +63,7 @@ SUBSYSTEM_DEF(radiation) if(!istype(T)) return - for(var/value in sources) - var/datum/radiation_source/source = value + for(var/datum/radiation_source/source as anything in sources) if(source.rad_power < .) continue // Already being affected by a stronger source diff --git a/code/controllers/subsystems/shuttles.dm b/code/controllers/subsystems/shuttles.dm index 40039edceb..38ec9e5c83 100644 --- a/code/controllers/subsystems/shuttles.dm +++ b/code/controllers/subsystems/shuttles.dm @@ -119,8 +119,7 @@ SUBSYSTEM_DEF(shuttles) landmarks_still_needed[landmark_tag] = given_sector // Landmark isn't registered yet, queue it to be added once it is. var/landmarks_to_check = landmarks_awaiting_sector.Copy() - for(var/thing in landmarks_to_check) - var/obj/effect/shuttle_landmark/automatic/landmark = thing + for(var/obj/effect/shuttle_landmark/automatic/landmark as anything in landmarks_to_check) if(landmark.z in given_sector.map_z) given_sector.add_landmark(landmark, landmark.shuttle_restricted) landmarks_awaiting_sector -= landmark @@ -170,8 +169,7 @@ SUBSYSTEM_DEF(shuttles) if(overmap_halted == new_setting) return overmap_halted = !overmap_halted - for(var/ship in ships) - var/obj/effect/overmap/visitable/ship/ship_effect = ship + for(var/obj/effect/overmap/visitable/ship/ship_effect as anything in ships) overmap_halted ? ship_effect.halt() : ship_effect.unhalt() /datum/controller/subsystem/shuttles/stat_entry() diff --git a/code/controllers/subsystems/timer.dm b/code/controllers/subsystems/timer.dm index dadcd9ab95..4fadc4f599 100644 --- a/code/controllers/subsystems/timer.dm +++ b/code/controllers/subsystems/timer.dm @@ -202,8 +202,7 @@ SUBSYSTEM_DEF(timer) bucket_count -= length(spent) - for (var/i in spent) - var/datum/timedevent/qtimer = i + for(var/datum/timedevent/qtimer as anything in spent) if(QDELETED(qtimer)) bucket_count++ continue diff --git a/code/controllers/subsystems/vote.dm b/code/controllers/subsystems/vote.dm index 34128d372a..c1e4288869 100644 --- a/code/controllers/subsystems/vote.dm +++ b/code/controllers/subsystems/vote.dm @@ -35,8 +35,7 @@ SUBSYSTEM_DEF(vote) // Before doing the vote, see if anyone is playing. // If not, just do the transfer. var/players_are_in_round = FALSE - for(var/a in player_list) // Mobs with clients attached. - var/mob/living/L = a + for(var/mob/living/L as anything in player_list) // Mobs with clients attached. if(!istype(L)) // Exclude ghosts and other weird things. continue if(L.stat == DEAD) // Dead mobs aren't playing. diff --git a/code/controllers/subsystems/xenoarch.dm b/code/controllers/subsystems/xenoarch.dm index 9851c69278..a175625b1f 100644 --- a/code/controllers/subsystems/xenoarch.dm +++ b/code/controllers/subsystems/xenoarch.dm @@ -41,8 +41,7 @@ SUBSYSTEM_DEF(xenoarch) continue var/farEnough = 1 - for(var/A in digsite_spawning_turfs) - var/turf/T = A + for(var/turf/T as anything in digsite_spawning_turfs) if(T in range(5, M)) farEnough = 0 break diff --git a/code/controllers/verbs.dm b/code/controllers/verbs.dm index 7323d2cba2..da3e8e1baf 100644 --- a/code/controllers/verbs.dm +++ b/code/controllers/verbs.dm @@ -75,8 +75,7 @@ options["MC"] = Master options["Failsafe"] = Failsafe options["Configuration"] = config - for(var/i in Master.subsystems) - var/datum/controller/subsystem/S = i + for(var/datum/controller/subsystem/S as anything in Master.subsystems) if(!istype(S)) //Eh, we're a debug verb, let's have typechecking. continue var/strtype = "SS[get_end_section_of_type(S.type)]" diff --git a/code/datums/chat_message.dm b/code/datums/chat_message.dm index ae17f21e2d..982e9e098c 100644 --- a/code/datums/chat_message.dm +++ b/code/datums/chat_message.dm @@ -172,8 +172,7 @@ var/list/runechat_image_cache = list() if(owned_by.seen_messages) var/idx = 1 var/combined_height = approx_lines - for(var/msg in owned_by.seen_messages[message_loc]) - var/datum/chatmessage/m = msg + for(var/datum/chatmessage/m as anything in owned_by.seen_messages[message_loc]) animate(m.message, pixel_y = m.message.pixel_y + mheight, time = CHAT_MESSAGE_SPAWN_TIME) combined_height += m.approx_lines @@ -336,8 +335,7 @@ var/list/runechat_image_cache = list() var/list/hear = get_mobs_and_objs_in_view_fast(get_turf(src), range, remote_ghosts = FALSE) hearing_mobs = hear["mobs"] - for(var/mob in hearing_mobs) - var/mob/M = mob + for(var/mob/M as anything in hearing_mobs) if(!M.client) continue M.create_chat_message(src, message, italics, classes, audible) diff --git a/code/datums/components/_component.dm b/code/datums/components/_component.dm index c5bd07cdcb..2e177c8ff3 100644 --- a/code/datums/components/_component.dm +++ b/code/datums/components/_component.dm @@ -320,8 +320,7 @@ var/proctype = C.signal_procs[src][sigtype] return NONE | CallAsync(C, proctype, arguments) . = NONE - for(var/I in target) - var/datum/C = I + for(var/datum/C as anything in target) if(!C.signal_enabled) continue var/proctype = C.signal_procs[src][sigtype] @@ -444,8 +443,7 @@ var/list/arguments = raw_args.Copy() arguments[1] = new_comp var/make_new_component = TRUE - for(var/i in GetComponents(new_type)) - var/datum/component/C = i + for(var/datum/component/C as anything in GetComponents(new_type)) if(C.CheckDupeComponent(arglist(arguments))) make_new_component = FALSE QDEL_NULL(new_comp) diff --git a/code/datums/components/crafting/crafting.dm b/code/datums/components/crafting/crafting.dm index cc6bb53a97..c4d8bcc3d4 100644 --- a/code/datums/components/crafting/crafting.dm +++ b/code/datums/components/crafting/crafting.dm @@ -402,8 +402,7 @@ var/list/surroundings = get_surroundings(user) var/list/craftability = list() - for(var/rec in GLOB.crafting_recipes) - var/datum/crafting_recipe/R = rec + for(var/datum/crafting_recipe/R as anything in GLOB.crafting_recipes) if(!R.always_available && !(R.type in user?.mind?.learned_recipes)) //User doesn't actually know how to make this. continue @@ -420,11 +419,10 @@ var/list/data = list() var/list/crafting_recipes = list() - for(var/rec in GLOB.crafting_recipes) - var/datum/crafting_recipe/R = rec + for(var/datum/crafting_recipe/R as anything in GLOB.crafting_recipes) if(R.name == "") //This is one of the invalid parents that sneaks in - GLOB.crafting_recipes -= rec + GLOB.crafting_recipes -= R continue if(!R.always_available && !(R.type in user?.mind?.learned_recipes)) //User doesn't actually know how to make this. diff --git a/code/datums/components/material_container.dm b/code/datums/components/material_container.dm index c8f54a1f0c..86573474e6 100644 --- a/code/datums/components/material_container.dm +++ b/code/datums/components/material_container.dm @@ -99,9 +99,8 @@ /datum/component/material_container/proc/on_examine(datum/source, mob/user, list/examine_texts) SIGNAL_HANDLER - for(var/I in materials) - var/datum/material/M = I - var/amt = materials[I] + for(var/datum/material/M as anything in materials) + var/amt = materials[M] if(amt) examine_texts += "It has [amt] units of [lowertext(M.name)] stored." @@ -327,13 +326,13 @@ var/list/mats_to_remove = list() //Assoc list MAT | AMOUNT - for(var/x in mats) //Loop through all required materials - var/datum/material/req_mat = x + for(var/datum/material/req_mat as anything in mats) //Loop through all required materials + var/imat = req_mat if(!istype(req_mat)) req_mat = GET_MATERIAL_REF(req_mat) //Get the ref if necesary if(!materials[req_mat]) //Do we have the resource? return FALSE //Can't afford it - var/amount_required = mats[x] * multiplier + var/amount_required = mats[imat] * multiplier if(!(materials[req_mat] >= amount_required)) // do we have enough of the resource? return FALSE //Can't afford it mats_to_remove[req_mat] += amount_required //Add it to the assoc list of things to remove @@ -392,8 +391,8 @@ if(!mats || !mats.len) return FALSE - for(var/x in mats) //Loop through all required materials - var/datum/material/req_mat = x + for(var/datum/material/req_mat as anything in mats) //Loop through all required materials + var/imat = req_mat if(!istype(req_mat)) if(ispath(req_mat) || istext(req_mat)) //Is this an actual material, or is it a category? req_mat = GET_MATERIAL_REF(req_mat) //Get the ref @@ -404,7 +403,7 @@ // else // continue - if(!has_enough_of_material(req_mat, mats[x], multiplier))//Not a category, so just check the normal way + if(!has_enough_of_material(req_mat, mats[imat], multiplier))//Not a category, so just check the normal way return FALSE return TRUE diff --git a/code/datums/components/overlay_lighting.dm b/code/datums/components/overlay_lighting.dm index b6a812ce9a..9bc3820494 100644 --- a/code/datums/components/overlay_lighting.dm +++ b/code/datums/components/overlay_lighting.dm @@ -171,8 +171,7 @@ ///Clears the affected_turfs lazylist, removing from its contents the effects of being near the light. /datum/component/overlay_lighting/proc/clean_old_turfs() - for(var/t in affected_turfs) - var/turf/lit_turf = t + for(var/turf/lit_turf as anything in affected_turfs) lit_turf.dynamic_lumcount -= lum_power affected_turfs = null @@ -182,9 +181,12 @@ if(!current_holder) return var/atom/movable/light_source = GET_LIGHT_SOURCE + . = list() for(var/turf/lit_turf in view(lumcount_range, get_turf(light_source))) lit_turf.dynamic_lumcount += lum_power - LAZYADD(affected_turfs, lit_turf) + . += lit_turf + if(length(.)) + affected_turfs = . ///Clears the old affected turfs and populates the new ones. @@ -431,8 +433,7 @@ . = lum_power lum_power = new_lum_power var/difference = . - lum_power - for(var/t in affected_turfs) - var/turf/lit_turf = t + for(var/turf/lit_turf as anything in affected_turfs) lit_turf.dynamic_lumcount -= difference ///Moves the light directional_atom that emits our "light" based on our position and our direction diff --git a/code/datums/datum.dm b/code/datums/datum.dm index 2304af887a..01eb82dd71 100644 --- a/code/datums/datum.dm +++ b/code/datums/datum.dm @@ -31,8 +31,7 @@ //clear timers var/list/timers = active_timers active_timers = null - for(var/thing in timers) - var/datum/timedevent/timer = thing + for(var/datum/timedevent/timer as anything in timers) if (timer.spent) continue qdel(timer) @@ -46,8 +45,7 @@ if(dc) var/all_components = dc[/datum/component] if(length(all_components)) - for(var/I in all_components) - var/datum/component/C = I + for(var/datum/component/C as anything in all_components) qdel(C, FALSE, TRUE) else var/datum/component/C = all_components @@ -59,8 +57,7 @@ for(var/sig in lookup) var/list/comps = lookup[sig] if(length(comps)) - for(var/i in comps) - var/datum/component/comp = i + for(var/datum/component/comp as anything in comps) comp.UnregisterSignal(src, sig) else var/datum/component/comp = comps diff --git a/code/datums/game_masters/default.dm b/code/datums/game_masters/default.dm index d380476df2..8f69b296af 100644 --- a/code/datums/game_masters/default.dm +++ b/code/datums/game_masters/default.dm @@ -17,8 +17,7 @@ log_game_master("Got [best_events.len] choice\s for the next event.") var/list/weighted_events = list() - for(var/E in best_events) - var/datum/event2/meta/event = E + for(var/datum/event2/meta/event as anything in best_events) var/weight = event.get_weight() if(weight <= 0) continue @@ -71,8 +70,7 @@ // If no list is passed, all the events will be returned. /datum/game_master/default/proc/filter_events_by_departments(list/departments) . = list() - for(var/E in SSgame_master.available_events) - var/datum/event2/meta/event = E + for(var/datum/event2/meta/event as anything in SSgame_master.available_events) if(!event.enabled) continue if(event.chaotic_threshold && !ignore_round_chaos) diff --git a/code/datums/game_masters/other_game_masters.dm b/code/datums/game_masters/other_game_masters.dm index f62d83cfe3..cd45483251 100644 --- a/code/datums/game_masters/other_game_masters.dm +++ b/code/datums/game_masters/other_game_masters.dm @@ -3,8 +3,7 @@ // * Does not react to danger at all. /datum/game_master/classic/choose_event() var/list/weighted_events = list() - for(var/E in SSgame_master.available_events) - var/datum/event2/meta/event = E + for(var/datum/event2/meta/event as anything in SSgame_master.available_events) if(!event.enabled) continue weighted_events[event] = event.get_weight() @@ -31,8 +30,7 @@ /datum/game_master/brutal/choose_event() var/list/weighted_events = list() - for(var/E in SSgame_master.available_events) - var/datum/event2/meta/event = E + for(var/datum/event2/meta/event as anything in SSgame_master.available_events) if(!event.enabled) continue weighted_events[event] = event.get_weight() + (event.chaos * 2) diff --git a/code/datums/helper_datums/getrev.dm b/code/datums/helper_datums/getrev.dm index debc08c2c4..68aa27e2d1 100644 --- a/code/datums/helper_datums/getrev.dm +++ b/code/datums/helper_datums/getrev.dm @@ -45,8 +45,7 @@ GLOBAL_DATUM(revdata, /datum/getrev) return if(header) . += "The following pull requests are currently test merged:" - for(var/line in testmerge) - var/datum/tgs_revision_information/test_merge/tm = line + for(var/datum/tgs_revision_information/test_merge/tm as anything in testmerge) var/cm = tm.head_commit //CHOMPStation Edit TGS4 var/details = ": '" + html_encode(tm.title) + "' by " + html_encode(tm.author) + " at commit " + html_encode(copytext_char(cm, 1, 11)) if(details && findtext(details, "\[s\]") && (!usr || !usr.client.holder)) diff --git a/code/datums/observation/~cleanup.dm b/code/datums/observation/~cleanup.dm index 9dcc601436..da902052bd 100644 --- a/code/datums/observation/~cleanup.dm +++ b/code/datums/observation/~cleanup.dm @@ -40,8 +40,7 @@ GLOBAL_LIST_EMPTY(event_listen_count) /decl/observ/destroyed/proc/cleanup_global_listener(listener, listen_count) GLOB.global_listen_count -= listener - for(var/entry in GLOB.all_observable_events.events) - var/decl/observ/event = entry + for(var/decl/observ/event as anything in GLOB.all_observable_events.events) if(event.unregister_global(listener)) // log_debug("[event] - [listener] was deleted while still registered to global events.") // TODO: Apply axe, reimplement with datum component listeners if(!(--listen_count)) @@ -49,8 +48,7 @@ GLOBAL_LIST_EMPTY(event_listen_count) /decl/observ/destroyed/proc/cleanup_source_listeners(event_source, source_listener_count) GLOB.event_sources_count -= event_source - for(var/entry in GLOB.all_observable_events.events) - var/decl/observ/event = entry + for(var/decl/observ/event as anything in GLOB.all_observable_events.events) var/proc_owners = event.event_sources[event_source] if(proc_owners) for(var/proc_owner in proc_owners) @@ -61,8 +59,7 @@ GLOBAL_LIST_EMPTY(event_listen_count) /decl/observ/destroyed/proc/cleanup_event_listener(listener, listener_count) GLOB.event_listen_count -= listener - for(var/entry in GLOB.all_observable_events.events) - var/decl/observ/event = entry + for(var/decl/observ/event as anything in GLOB.all_observable_events.events) for(var/event_source in event.event_sources) if(event.unregister(event_source, listener)) // log_debug("[event] - [listener] was deleted while still listening to [event_source].") // TODO: Apply axe, reimplement with datum component listeners diff --git a/code/datums/orbit.dm b/code/datums/orbit.dm index 0176d7f23d..adbd166d25 100644 --- a/code/datums/orbit.dm +++ b/code/datums/orbit.dm @@ -110,8 +110,7 @@ /atom/Destroy(force = FALSE) . = ..() if (orbiters) - for (var/thing in orbiters) - var/datum/orbit/O = thing + for(var/datum/orbit/O as anything in orbiters) if (O.orbiter) O.orbiter.stop_orbit() @@ -123,8 +122,7 @@ /* /atom/movable/proc/transfer_observers_to(atom/movable/target) if(orbiters) - for(var/thing in orbiters) - var/datum/orbit/O = thing + for(var/datum/orbit/O as anything in orbiters) if(O.orbiter && isobserver(O.orbiter)) var/mob/dead/observer/D = O.orbiter D.ManualFollow(target) diff --git a/code/datums/progressbar.dm b/code/datums/progressbar.dm index c24dfcd922..8da8d7c000 100644 --- a/code/datums/progressbar.dm +++ b/code/datums/progressbar.dm @@ -51,8 +51,7 @@ animate(bar, pixel_y = shiftheight, time = 5, easing = SINE_EASING) /datum/progressbar/Destroy() - for(var/I in user.progressbars[bar.loc]) - var/datum/progressbar/P = I + for(var/datum/progressbar/P as anything in user.progressbars[bar.loc]) if(P != src && P.listindex > listindex) P.shiftDown() diff --git a/code/datums/soul_link.dm b/code/datums/soul_link.dm index 7bc652a863..d15049d924 100644 --- a/code/datums/soul_link.dm +++ b/code/datums/soul_link.dm @@ -6,13 +6,11 @@ var/list/shared_soul_links // Soul links we are a/the sharer of. /mob/living/Destroy() - for(var/s in owned_soul_links) - var/datum/soul_link/S = s + for(var/datum/soul_link/S as anything in owned_soul_links) S.owner_died(FALSE) - qdel(s) // If the owner is destroy()'d, the soullink is destroy()'d. + qdel(S) // If the owner is destroy()'d, the soullink is destroy()'d. owned_soul_links = null - for(var/s in shared_soul_links) - var/datum/soul_link/S = s + for(var/datum/soul_link/S as anything in shared_soul_links) S.sharer_died(FALSE) S.remove_soul_sharer(src) // If a sharer is destroy()'d, they are simply removed. shared_soul_links = null @@ -82,8 +80,7 @@ soul_owner = owner soul_sharers = sharers LAZYADD(owner.owned_soul_links, src) - for(var/l in sharers) - var/mob/living/L = l + for(var/mob/living/L as anything in sharers) LAZYADD(L.shared_soul_links, src) return TRUE @@ -144,8 +141,7 @@ /datum/soul_link/multi_sharer/replacement_pool/owner_died(gibbed, mob/living/owner) if(LAZYLEN(soul_sharers) && !gibbed) //let's not put them in some gibs var/list/souls = shuffle(soul_sharers.Copy()) - for(var/l in souls) - var/mob/living/L = l + for(var/mob/living/L as anything in souls) if(L.stat != DEAD && L.mind) L.mind.transfer_to(soul_owner) soul_owner.revive(TRUE, TRUE) diff --git a/code/game/antagonist/_antagonist_setup.dm b/code/game/antagonist/_antagonist_setup.dm index 6f514b9413..c1e5002e74 100644 --- a/code/game/antagonist/_antagonist_setup.dm +++ b/code/game/antagonist/_antagonist_setup.dm @@ -46,7 +46,7 @@ var/global/list/antag_names_to_ids = list() antag.update_all_icons() /proc/populate_antag_type_list() - for(var/antag_type in typesof(/datum/antagonist)-/datum/antagonist) + for(var/antag_type in subtypesof(/datum/antagonist)) var/datum/antagonist/A = new antag_type all_antag_types[A.id] = A all_antag_spawnpoints[A.landmark_id] = list() diff --git a/code/game/antagonist/mutiny/mutineer.dm b/code/game/antagonist/mutiny/mutineer.dm index 480fc83c70..85aecd71ea 100644 --- a/code/game/antagonist/mutiny/mutineer.dm +++ b/code/game/antagonist/mutiny/mutineer.dm @@ -54,7 +54,7 @@ var/datum/antagonist/mutineer/mutineers proc/get_directive_candidates() var/list/candidates[0] - for(var/T in typesof(/datum/directive) - /datum/directive) + for(var/T in subtypesof(/datum/directive)) var/datum/directive/D = new T(src) if (D.meets_prerequisites()) candidates.Add(D) diff --git a/code/game/atoms.dm b/code/game/atoms.dm index 5c8ff8974d..3e4b277696 100644 --- a/code/game/atoms.dm +++ b/code/game/atoms.dm @@ -153,8 +153,7 @@ ASSERT(callback) ASSERT(isturf(loc)) var/list/turfs = trange(range, src) - for(var/t in turfs) - var/turf/T = t + for(var/turf/T as anything in turfs) GLOB.turf_entered_event.register(T, src, callback) //Unregister from prox listening in a certain range. You should do this BEFORE you move, but if you @@ -162,8 +161,7 @@ /atom/proc/unsense_proximity(var/range = 1, var/callback, var/center) ASSERT(isturf(center) || isturf(loc)) var/list/turfs = trange(range, center ? center : src) - for(var/t in turfs) - var/turf/T = t + for(var/turf/T as anything in turfs) GLOB.turf_entered_event.unregister(T, src, callback) @@ -529,11 +527,9 @@ if(LAZYLEN(exclude_mobs)) seeing_mobs -= exclude_mobs - for(var/obj in seeing_objs) - var/obj/O = obj + for(var/obj/O as anything in seeing_objs) O.show_message(message, VISIBLE_MESSAGE, blind_message, AUDIBLE_MESSAGE) - for(var/mob in seeing_mobs) - var/mob/M = mob + for(var/mob/M as anything in seeing_mobs) if(M.see_invisible >= invisibility && MOB_CAN_SEE_PLANE(M, plane)) M.show_message(message, VISIBLE_MESSAGE, blind_message, AUDIBLE_MESSAGE) if(runemessage != -1) @@ -555,16 +551,13 @@ var/list/hearing_objs = hear["objs"] if(radio_message) - for(var/obj in hearing_objs) - var/obj/O = obj + for(var/obj/O as anything in hearing_objs) O.hear_talk(src, list(new /datum/multilingual_say_piece(GLOB.all_languages["Noise"], radio_message)), null) else - for(var/obj in hearing_objs) - var/obj/O = obj + for(var/obj/O as anything in hearing_objs) O.show_message(message, AUDIBLE_MESSAGE, deaf_message, VISIBLE_MESSAGE) - for(var/mob in hearing_mobs) - var/mob/M = mob + for(var/mob/M as anything in hearing_mobs) var/msg = message M.show_message(msg, AUDIBLE_MESSAGE, deaf_message, VISIBLE_MESSAGE) if(runemessage != -1) diff --git a/code/game/atoms_movable.dm b/code/game/atoms_movable.dm index 08b0f3e056..9dfba6c423 100644 --- a/code/game/atoms_movable.dm +++ b/code/game/atoms_movable.dm @@ -134,8 +134,7 @@ oldarea.Exited(src, newloc) // Multi-tile objects can't reach here, otherwise you'd need to avoid uncrossing yourself - for(var/i in oldloc) - var/atom/movable/thing = i + for(var/atom/movable/thing as anything in oldloc) // We don't call parent so we are calling this for byond thing.Uncrossed(src) @@ -145,8 +144,7 @@ newarea.Entered(src, oldloc) // Multi-tile objects can't reach here, otherwise you'd need to avoid uncrossing yourself - for(var/i in loc) - var/atom/movable/thing = i + for(var/atom/movable/thing as anything in loc) // We don't call parent so we are calling this for byond thing.Crossed(src, oldloc) @@ -315,8 +313,7 @@ old_area.Exited(src, destination) // Uncross everything where we left - for(var/i in oldloc) - var/atom/movable/AM = i + for(var/atom/movable/AM as anything in oldloc) if(AM == src) continue AM.Uncrossed(src) @@ -341,8 +338,7 @@ destarea.Entered(src, oldloc) // We ignore ourselves because if we're multi-tile we might be in both old and new locs - for(var/i in destination) - var/atom/movable/AM = i + for(var/atom/movable/AM as anything in destination) if(AM == src) continue AM.Crossed(src, oldloc) @@ -364,8 +360,7 @@ loc = null // Uncross everything where we left (no multitile safety like above because we are definitely not still there) - for(var/i in oldloc) - var/atom/movable/AM = i + for(var/atom/movable/AM as anything in oldloc) AM.Uncrossed(src) // Exited() our loc and area @@ -379,8 +374,7 @@ /atom/movable/proc/onTransitZ(old_z,new_z) GLOB.z_moved_event.raise_event(src, old_z, new_z) SEND_SIGNAL(src, COMSIG_MOVABLE_Z_CHANGED, old_z, new_z) - for(var/item in src) // Notify contents of Z-transition. This can be overridden IF we know the items contents do not care. - var/atom/movable/AM = item + for(var/atom/movable/AM as anything in src) // Notify contents of Z-transition. This can be overridden IF we know the items contents do not care. AM.onTransitZ(old_z,new_z) /atom/movable/proc/glide_for(movetime) diff --git a/code/game/dna/dna2_helpers.dm b/code/game/dna/dna2_helpers.dm index 3fb282d72d..8371c395a4 100644 --- a/code/game/dna/dna2_helpers.dm +++ b/code/game/dna/dna2_helpers.dm @@ -258,8 +258,7 @@ //VOREStation Add /mob/living/carbon/human/proc/force_update_organs() - for(var/organ in organs + internal_organs) - var/obj/item/organ/O = organ + for(var/obj/item/organ/O as anything in organs + internal_organs) O.species = species //VOREStation Add End diff --git a/code/game/gamemodes/changeling/modularchangling.dm b/code/game/gamemodes/changeling/modularchangling.dm index c6af89ad75..5563d4f01b 100644 --- a/code/game/gamemodes/changeling/modularchangling.dm +++ b/code/game/gamemodes/changeling/modularchangling.dm @@ -2,7 +2,7 @@ //Ling power's evolution menu entry datum should be contained alongside the mob proc for the actual power, in their own file. -var/list/powers = typesof(/datum/power/changeling) - /datum/power/changeling //needed for the badmin verb for now +var/list/powers = subtypesof(/datum/power/changeling) //needed for the badmin verb for now var/list/datum/power/changeling/powerinstances = list() /datum/power //Could be used by other antags too diff --git a/code/game/gamemodes/sandbox/h_sandbox.dm b/code/game/gamemodes/sandbox/h_sandbox.dm index 08340f5a76..449d448fe0 100644 --- a/code/game/gamemodes/sandbox/h_sandbox.dm +++ b/code/game/gamemodes/sandbox/h_sandbox.dm @@ -105,7 +105,7 @@ mob hsb.loc = usr.loc to_chat(usr, "Sandbox: Created an airlock.") if("hsbcanister") - var/list/hsbcanisters = typesof(/obj/machinery/portable_atmospherics/canister/) - /obj/machinery/portable_atmospherics/canister/ + var/list/hsbcanisters = subtypesof(/obj/machinery/portable_atmospherics/canister) var/hsbcanister = tgui_input_list(usr, "Choose a canister to spawn:", "Sandbox", hsbcanisters) if(hsbcanister) new hsbcanister(usr.loc) diff --git a/code/game/gamemodes/technomancer/catalog.dm b/code/game/gamemodes/technomancer/catalog.dm index b403639ddc..539329da15 100644 --- a/code/game/gamemodes/technomancer/catalog.dm +++ b/code/game/gamemodes/technomancer/catalog.dm @@ -4,10 +4,10 @@ #define UTILITY_SPELLS "Utility" #define SUPPORT_SPELLS "Support" -var/list/all_technomancer_spells = typesof(/datum/technomancer/spell) - /datum/technomancer/spell -var/list/all_technomancer_equipment = typesof(/datum/technomancer/equipment) - /datum/technomancer/equipment -var/list/all_technomancer_consumables = typesof(/datum/technomancer/consumable) - /datum/technomancer/consumable -var/list/all_technomancer_assistance = typesof(/datum/technomancer/assistance) - /datum/technomancer/assistance +var/list/all_technomancer_spells = subtypesof(/datum/technomancer/spell) +var/list/all_technomancer_equipment = subtypesof(/datum/technomancer/equipment) +var/list/all_technomancer_consumables = subtypesof(/datum/technomancer/consumable) +var/list/all_technomancer_assistance = subtypesof(/datum/technomancer/assistance) /datum/technomancer var/name = "technomancer thing" diff --git a/code/game/jobs/access_datum.dm b/code/game/jobs/access_datum.dm index 5a2e3bd0cf..53dfb77b5a 100644 --- a/code/game/jobs/access_datum.dm +++ b/code/game/jobs/access_datum.dm @@ -262,8 +262,8 @@ desc = "Station Network" region = ACCESS_REGION_RESEARCH -// /var/const/free_access_id = 43 -// /var/const/free_access_id = 44 +// /var/const/free_access_id = 43 // taken in VR +// /var/const/free_access_id = 44 // taken in VR /var/const/access_surgery = 45 /datum/access/surgery diff --git a/code/game/jobs/access_datum_vr.dm b/code/game/jobs/access_datum_vr.dm index bd3906f16c..bdfef8a12b 100644 --- a/code/game/jobs/access_datum_vr.dm +++ b/code/game/jobs/access_datum_vr.dm @@ -5,6 +5,12 @@ var/const/access_explorer = 43 desc = "Explorer" region = ACCESS_REGION_GENERAL +/var/const/access_pathfinder = 44 +/datum/access/pathfinder + id = access_pathfinder + desc = "Pathfinder" + region = ACCESS_REGION_GENERAL + var/const/access_pilot = 67 /datum/access/pilot id = access_pilot diff --git a/code/game/jobs/job/exploration_vr.dm b/code/game/jobs/job/exploration_vr.dm index 4b3227c38e..2a6649543b 100644 --- a/code/game/jobs/job/exploration_vr.dm +++ b/code/game/jobs/job/exploration_vr.dm @@ -43,8 +43,8 @@ pto_type = PTO_EXPLORATION dept_time_required = 20 - access = list(access_eva, access_maint_tunnels, access_external_airlocks, access_pilot, access_explorer, access_gateway) - minimal_access = list(access_eva, access_maint_tunnels, access_external_airlocks, access_pilot, access_explorer, access_gateway) + access = list(access_eva, access_maint_tunnels, access_external_airlocks, access_pilot, access_explorer, access_gateway, access_pathfinder) + minimal_access = list(access_eva, access_maint_tunnels, access_external_airlocks, access_pilot, access_explorer, access_gateway, access_pathfinder) outfit_type = /decl/hierarchy/outfit/job/pathfinder job_description = "The Pathfinder's job is to lead and manage expeditions, and is the primary authority on all off-station expeditions." alt_titles = list("Expedition Lead" = /datum/alt_title/expedition_lead, "Exploration Manager" = /datum/alt_title/exploration_manager) diff --git a/code/game/machinery/adv_med.dm b/code/game/machinery/adv_med.dm index d54f3e6521..bd8edfcd8a 100644 --- a/code/game/machinery/adv_med.dm +++ b/code/game/machinery/adv_med.dm @@ -474,9 +474,8 @@ infected = "Gangrene Detected:" var/unknown_body = 0 - for(var/thing in e.implants) - var/obj/item/weapon/implant/I = thing - var/obj/item/device/nif/N = thing //VOREStation Add: NIFs + for(var/obj/item/weapon/implant/I as anything in e.implants) + var/obj/item/device/nif/N = I //VOREStation Add: NIFs if(istype(I) && I.known_implant) imp += "[I] implanted:" if(istype(N) && N.known_implant) //VOREStation Add: NIFs diff --git a/code/game/machinery/adv_med_vr.dm b/code/game/machinery/adv_med_vr.dm index e8ff59adc0..c4c1d93374 100644 --- a/code/game/machinery/adv_med_vr.dm +++ b/code/game/machinery/adv_med_vr.dm @@ -12,8 +12,7 @@ var/livingprey = 0 var/objectprey = 0 - for(var/belly in H.vore_organs) - var/obj/belly/B = belly + for(var/obj/belly/B as anything in H.vore_organs) for(var/C in B) if(ishuman(C)) humanprey++ diff --git a/code/game/machinery/autolathe.dm b/code/game/machinery/autolathe.dm index b3d315cbad..f079485f19 100644 --- a/code/game/machinery/autolathe.dm +++ b/code/game/machinery/autolathe.dm @@ -183,9 +183,8 @@ //Check if we still have the materials. var/coeff = (making.no_scale ? 1 : mat_efficiency) //stacks are unaffected by production coefficient - for(var/MAT in making.resources) - var/datum/material/used_material = MAT - var/amount_needed = making.resources[MAT] * coeff * multiplier + for(var/datum/material/used_material as anything in making.resources) + var/amount_needed = making.resources[used_material] * coeff * multiplier materials_used[used_material] = amount_needed if(LAZYLEN(materials_used)) diff --git a/code/game/machinery/computer/card.dm b/code/game/machinery/computer/card.dm index 58565ead6e..c15a9d1524 100644 --- a/code/game/machinery/computer/card.dm +++ b/code/game/machinery/computer/card.dm @@ -111,8 +111,7 @@ data["id_rank"] = modify && modify.assignment ? modify.assignment : "Unassigned" var/list/departments = list() - for(var/D in SSjob.get_all_department_datums()) - var/datum/department/dept = D + for(var/datum/department/dept as anything in SSjob.get_all_department_datums()) if(!dept.assignable) // No AI ID cards for you. continue if(dept.centcom_only && !is_centcom()) diff --git a/code/game/machinery/cryopod.dm b/code/game/machinery/cryopod.dm index b7ba4a4339..19ae206605 100644 --- a/code/game/machinery/cryopod.dm +++ b/code/game/machinery/cryopod.dm @@ -373,8 +373,7 @@ hook_vr("despawn", list(to_despawn, src)) if(isliving(to_despawn)) var/mob/living/L = to_despawn - for(var/belly in L.vore_organs) - var/obj/belly/B = belly + for(var/obj/belly/B as anything in L.vore_organs) for(var/mob/living/sub_L in B) despawn_occupant(sub_L) for(var/obj/item/W in B) diff --git a/code/game/machinery/doors/airlock.dm b/code/game/machinery/doors/airlock.dm index 02f80de642..19cbb9811e 100644 --- a/code/game/machinery/doors/airlock.dm +++ b/code/game/machinery/doors/airlock.dm @@ -86,17 +86,17 @@ var/mob/living/carbon/human/X = user if(istype(X.species, /datum/species/xenos)) if(src.locked || src.welded) - visible_message("\The [user] begins tearing into \the [src] internals!") //CHOMPedit . edited message to make it more violent + visible_message("\The [user] begins tearing into \the [src] internals!") src.do_animate("deny") - if(do_after(user,30 SECONDS,src)) //CHOMPedit . Increased time to force open welded door for alien - visible_message("\The [user] tears \the [src] open, sparks flying from its electronics!") //CHOMPedit + if(do_after(user,15 SECONDS,src)) + visible_message("\The [user] tears \the [src] open, sparks flying from its electronics!") src.do_animate("spark") - playsound(src, 'sound/machines/door/airlock_creaking_xeno.ogg', 100, 1, volume_channel = VOLUME_CHANNEL_DOORS) //CHOMPedit gave xeno airlock breaking its own sound effect + playsound(src, 'sound/machines/door/airlock_tear_apart.ogg', 100, 1, volume_channel = VOLUME_CHANNEL_DOORS) src.locked = 0 src.welded = 0 update_icon() open(1) - src.set_broken() //CHOMPedit . Changed action to make ripping open the airlock more realistic + src.set_broken() //These aren't emags, these be CLAWS else if(src.density) visible_message("\The [user] begins forcing \the [src] open!") if(do_after(user, 5 SECONDS,src)) @@ -1222,8 +1222,7 @@ About the new airlock wires panel: use_power(360) //360 W seems much more appropriate for an actuator moving an industrial door capable of crushing people //if the door is unpowered then it doesn't make sense to hear the woosh of a pneumatic actuator - for(var/P in player_list) - var/mob/M = P + for(var/mob/M as anything in player_list) if(!M || !M.client) continue var/old_sounds = M.client.is_preference_enabled(/datum/client_preference/old_door_sounds) @@ -1351,8 +1350,7 @@ About the new airlock wires panel: use_power(360) //360 W seems much more appropriate for an actuator moving an industrial door capable of crushing people has_beeped = 0 - for(var/P in player_list) - var/mob/M = P + for(var/mob/M as anything in player_list) if(!M || !M.client) continue var/old_sounds = M.client.is_preference_enabled(/datum/client_preference/old_door_sounds) diff --git a/code/game/machinery/frame.dm b/code/game/machinery/frame.dm index d2ee11fbf8..6a593ab554 100644 --- a/code/game/machinery/frame.dm +++ b/code/game/machinery/frame.dm @@ -5,7 +5,7 @@ //Create global frame type list if it hasn't been made already. construction_frame_wall = list() construction_frame_floor = list() - for(var/R in typesof(/datum/frame/frame_types) - /datum/frame/frame_types) + for(var/R in subtypesof(/datum/frame/frame_types)) var/datum/frame/frame_types/type = new R if(type.frame_style == FRAME_STYLE_WALL) construction_frame_wall += type @@ -272,9 +272,8 @@ for(var/A in circuit.req_components) req_components[A] = circuit.req_components[A] req_component_names = circuit.req_components.Copy() - for(var/A in req_components) - var/obj/ct = A - req_component_names[A] = initial(ct.name) + for(var/obj/ct as anything in req_components) + req_component_names[ct] = initial(ct.name) /obj/structure/frame/New(var/loc, var/dir, var/building = 0, var/datum/frame/frame_types/type, mob/user as mob) ..() diff --git a/code/game/machinery/jukebox.dm b/code/game/machinery/jukebox.dm index 54a65642f0..db40cbcf39 100644 --- a/code/game/machinery/jukebox.dm +++ b/code/game/machinery/jukebox.dm @@ -91,8 +91,7 @@ media_start_time = 0 update_music() //VOREStation Add - for(var/rem in remotes) - var/obj/item/device/juke_remote/remote = rem + for(var/obj/item/device/juke_remote/remote as anything in remotes) remote.update_music() //VOREStation Add End diff --git a/code/game/machinery/machinery.dm b/code/game/machinery/machinery.dm index 2da7d5342a..26766addf6 100644 --- a/code/game/machinery/machinery.dm +++ b/code/game/machinery/machinery.dm @@ -548,8 +548,7 @@ Class Procs: surviving_parts += new /obj/item/stack/cable_coil(null, 1) surviving_parts += new /obj/item/stack/cable_coil(null, 1) - for(var/a in surviving_parts) - var/atom/movable/A = a + for(var/atom/movable/A as anything in surviving_parts) A.forceMove(droploc) if(scatter && isturf(droploc)) var/turf/T = droploc diff --git a/code/game/machinery/partslathe_vr.dm b/code/game/machinery/partslathe_vr.dm index 6f83f6d158..77eefb94c9 100644 --- a/code/game/machinery/partslathe_vr.dm +++ b/code/game/machinery/partslathe_vr.dm @@ -265,8 +265,7 @@ if(istype(copy_board)) data["copyBoard"] = copy_board.name var/list/req_components_ui = list() - for(var/CP in (copy_board.req_components || list())) - var/obj/comp_path = CP + for(var/obj/comp_path as anything in (copy_board.req_components || list())) var/comp_amt = copy_board.req_components[comp_path] if(comp_amt && (comp_path in partslathe_recipies)) req_components_ui.Add(list(list("name" = initial(comp_path.name), "qty" = comp_amt))) @@ -355,7 +354,7 @@ /obj/machinery/partslathe/proc/update_recipe_list() if(!partslathe_recipies) partslathe_recipies = list() - var/list/paths = typesof(/obj/item/weapon/stock_parts)-/obj/item/weapon/stock_parts + var/list/paths = subtypesof(/obj/item/weapon/stock_parts) for(var/type in paths) var/obj/item/weapon/stock_parts/I = new type() if(getHighestOriginTechLevel(I) > 1) diff --git a/code/game/machinery/pointdefense.dm b/code/game/machinery/pointdefense.dm index d1923e949c..b4cfce40d5 100644 --- a/code/game/machinery/pointdefense.dm +++ b/code/game/machinery/pointdefense.dm @@ -25,8 +25,7 @@ GLOBAL_LIST_BOILERPLATE(pointdefense_turrets, /obj/machinery/pointdefense) . = ..() if(id_tag) //No more than 1 controller please. - for(var/thing in GLOB.pointdefense_controllers) - var/obj/machinery/pointdefense_control/PC = thing + for(var/obj/machinery/pointdefense_control/PC as anything in GLOB.pointdefense_controllers) if(PC != src && PC.id_tag == id_tag) warning("Two [src] with the same id_tag of [id_tag]") id_tag = null @@ -101,8 +100,7 @@ GLOBAL_LIST_BOILERPLATE(pointdefense_turrets, /obj/machinery/pointdefense) var/new_ident = input(user, "Enter a new ident tag.", "[src]", id_tag) as null|text if(new_ident && new_ident != id_tag && user.Adjacent(src) && CanInteract(user, GLOB.tgui_physical_state)) // Check for duplicate controllers with this ID - for(var/thing in GLOB.pointdefense_controllers) - var/obj/machinery/pointdefense_control/PC = thing + for(var/obj/machinery/pointdefense_control/PC as anything in GLOB.pointdefense_controllers) if(PC != src && PC.id_tag == id_tag) to_chat(user, "The [new_ident] network already has a controller.") return @@ -208,8 +206,7 @@ GLOBAL_LIST_BOILERPLATE(pointdefense_turrets, /obj/machinery/pointdefense) if(!id_tag) return null var/list/connected_z_levels = GetConnectedZlevels(get_z(src)) - for(var/thing in GLOB.pointdefense_controllers) - var/obj/machinery/pointdefense_control/PDC = thing + for(var/obj/machinery/pointdefense_control/PDC as anything in GLOB.pointdefense_controllers) if(PDC.id_tag == id_tag && (get_z(PDC) in connected_z_levels)) return PDC diff --git a/code/game/machinery/portable_turret.dm b/code/game/machinery/portable_turret.dm index 0b1e575596..1779fdb070 100644 --- a/code/game/machinery/portable_turret.dm +++ b/code/game/machinery/portable_turret.dm @@ -679,12 +679,11 @@ for(var/turf/T in oview(world.view, src)) seenturfs += T - for(var/mob in living_mob_list) - var/mob/M = mob + for(var/mob/M as anything in living_mob_list) if(M.z != z) //Skip continue if(get_turf(M) in seenturfs) - assess_and_assign(mob, targets, secondarytargets) + assess_and_assign(M, targets, secondarytargets) /* This was dumb. Why do this and then check line of sight later? for(var/mob/M in mobs_in_xray_view(world.view, src)) diff --git a/code/game/machinery/suit_cycler_datums.dm b/code/game/machinery/suit_cycler_datums.dm index 205dc99979..e796213acf 100644 --- a/code/game/machinery/suit_cycler_datums.dm +++ b/code/game/machinery/suit_cycler_datums.dm @@ -14,12 +14,13 @@ GLOBAL_LIST_EMPTY(suit_cycler_emagged) var/helmet_becomes /datum/suit_cycler_choice/department/proc/can_refit_helmet(obj/item/clothing/head/helmet/helmet) - return !!helmet_becomes + return helmet && !!helmet_becomes /datum/suit_cycler_choice/department/proc/do_refit_helmet(obj/item/clothing/head/helmet/helmet) var/obj/item/clothing/tmp = new helmet_becomes() helmet.name = "refitted [tmp.name]" helmet.desc = tmp.desc + helmet.icon = tmp.icon helmet.icon_state = tmp.icon_state helmet.item_state = tmp.item_state helmet.item_state_slots = tmp.item_state_slots?.Copy() @@ -28,12 +29,13 @@ GLOBAL_LIST_EMPTY(suit_cycler_emagged) helmet.default_worn_icon = tmp.default_worn_icon /datum/suit_cycler_choice/department/proc/can_refit_suit(obj/item/clothing/suit/space/suit) - return !!suit_becomes + return suit && !!suit_becomes /datum/suit_cycler_choice/department/proc/do_refit_suit(obj/item/clothing/suit/space/suit) var/obj/item/clothing/tmp = new suit_becomes() suit.name = "refitted [tmp.name]" suit.desc = tmp.desc + suit.icon = tmp.icon suit.icon_state = tmp.icon_state suit.item_state = tmp.item_state suit.item_state_slots = tmp.item_state_slots?.Copy() @@ -305,16 +307,16 @@ GLOBAL_LIST_EMPTY(suit_cycler_emagged) // Uses same logic as it used to, which is that it bases an assumption of 'we should have custom sprites' on // the presence of the species in the sprite_sheets_obj list on the helmet and suit -/datum/suit_cycler_choice/species/proc/can_refit_to(obj/item/clothing/head/helmet/helmet, obj/item/clothing/suit/space/suit) - for(var/obj/item/clothing/C in list(helmet, suit)) +/datum/suit_cycler_choice/species/proc/can_refit_to(...) + for(var/obj/item/clothing/C in args) if(LAZYACCESS(C.sprite_sheets_obj, name)) if(!(C.icon_state in cached_icon_states(C.sprite_sheets_obj[name]))) return FALSE // Species was in sprite_sheets_obj, but had no sprite for this object in particular return TRUE -/datum/suit_cycler_choice/species/proc/do_refit_to(obj/item/clothing/head/helmet/helmet, obj/item/clothing/suit/space/suit) - for(var/obj/item/clothing/C in list(helmet, suit)) +/datum/suit_cycler_choice/species/proc/do_refit_to(...) + for(var/obj/item/clothing/C in args) C.refit_for_species(name) /datum/suit_cycler_choice/species/noop diff --git a/code/game/machinery/suit_storage_unit.dm b/code/game/machinery/suit_storage_unit.dm index 6b8c8747cc..175434088d 100644 --- a/code/game/machinery/suit_storage_unit.dm +++ b/code/game/machinery/suit_storage_unit.dm @@ -1114,17 +1114,20 @@ GLOBAL_LIST_EMPTY(suit_cycler_typecache) /obj/machinery/suit_cycler/proc/apply_paintjob() if(!target_species || !target_department) return - if(suit?.helmet) - visible_message("[bicon(src)]Separate the suit and helmet before applying any customizations.") - return - if(helmet && target_department.can_refit_helmet(helmet)) + // Helmet to new paint + if(target_department.can_refit_helmet(helmet)) target_department.do_refit_helmet(helmet) - if(suit && target_department.can_refit_suit(suit)) + // Suit to new paint + if(target_department.can_refit_suit(suit)) target_department.do_refit_suit(suit) - - if(target_species.can_refit_to(helmet, suit)) - target_species.do_refit_to(helmet, suit) + // Attached voidsuit helmet to new paint + if(target_department.can_refit_helmet(suit?.helmet)) + target_department.do_refit_helmet(suit.helmet) + + // Species fitting for all 3 potential changes + if(target_species.can_refit_to(helmet, suit, suit?.helmet)) + target_species.do_refit_to(helmet, suit, suit?.helmet) else visible_message("[bicon(src)]Unable to apply specified cosmetics with specified species. Please try again with a different species or cosmetic option selected.") return diff --git a/code/game/objects/buckling.dm b/code/game/objects/buckling.dm index b0f4f4c2c1..a4f5125b72 100644 --- a/code/game/objects/buckling.dm +++ b/code/game/objects/buckling.dm @@ -54,6 +54,10 @@ if(!can_buckle_check(M, forced)) return FALSE + if(M == src) + stack_trace("Recursive buckle warning: [M] being buckled to self.") + return + M.buckled = src M.facing_dir = null M.set_dir(buckle_dir ? buckle_dir : dir) @@ -176,8 +180,7 @@ return M /atom/movable/proc/handle_buckled_mob_movement(atom/old_loc, direct, movetime) - for(var/A in buckled_mobs) - var/mob/living/L = A + for(var/mob/living/L as anything in buckled_mobs) if(!L.Move(loc, direct, movetime)) L.forceMove(loc, direct, movetime) L.last_move = last_move diff --git a/code/game/objects/effects/alien/aliens.dm b/code/game/objects/effects/alien/aliens.dm index 0cc5868762..5882723311 100644 --- a/code/game/objects/effects/alien/aliens.dm +++ b/code/game/objects/effects/alien/aliens.dm @@ -203,6 +203,7 @@ layer = ABOVE_TURF_LAYER+0.01 light_range = NODERANGE light_on = TRUE + light_color = "#673972" var/node_range = NODERANGE var/set_color = "#321D37" @@ -293,8 +294,7 @@ for(var/obj/effect/alien/weeds/W in orange(node_range, src)) nearby_weeds |= W - for(var/nbw in nearby_weeds) - var/obj/effect/alien/weeds/W = nbw + for(var/obj/effect/alien/weeds/W as anything in nearby_weeds) if(!W.linked_node) W.linked_node = src @@ -420,5 +420,3 @@ if(0 to 1) visible_message("[src.target] begins to crumble under the acid!") spawn(rand(150, 200)) tick() - -//CHOMPedit old eggs removed diff --git a/code/game/objects/effects/landmarks.dm b/code/game/objects/effects/landmarks.dm index 3a60ef5480..82070a520a 100644 --- a/code/game/objects/effects/landmarks.dm +++ b/code/game/objects/effects/landmarks.dm @@ -123,6 +123,15 @@ else log_error("[type] mapped in but no using_map") +/obj/effect/landmark/hidden_level + delete_me = 1 +/obj/effect/landmark/hidden_level/Initialize() + . = ..() + if(using_map) + using_map.hidden_levels |= z + else + log_error("[type] mapped in but no using_map") + /obj/effect/landmark/virtual_reality name = "virtual_reality" diff --git a/code/game/objects/effects/map_effects/portal.dm b/code/game/objects/effects/map_effects/portal.dm index 375bbcd336..ede5cbdaca 100644 --- a/code/game/objects/effects/map_effects/portal.dm +++ b/code/game/objects/effects/map_effects/portal.dm @@ -113,8 +113,7 @@ when portals are shortly lived, or when portals are made to be obvious with spec var/lowest_y = 0 // First pass is for finding the top right corner. - for(var/thing in vis_contents) - var/turf/T = thing + for(var/turf/T as anything in vis_contents) if(T.x > highest_x) highest_x = T.x if(T.y > highest_y) @@ -124,8 +123,7 @@ when portals are shortly lived, or when portals are made to be obvious with spec lowest_y = highest_y // Second one is for the bottom left corner. - for(var/thing in vis_contents) - var/turf/T = thing + for(var/turf/T as anything in vis_contents) if(T.x < lowest_x) lowest_x = T.x if(T.y < lowest_y) @@ -182,8 +180,7 @@ when portals are shortly lived, or when portals are made to be obvious with spec // Connects both sides of a portal together. /obj/effect/map_effect/portal/master/proc/find_counterparts() - for(var/thing in GLOB.all_portal_masters) - var/obj/effect/map_effect/portal/master/M = thing + for(var/obj/effect/map_effect/portal/master/M as anything in GLOB.all_portal_masters) if(M == src) continue if(M.counterpart) @@ -205,8 +202,7 @@ when portals are shortly lived, or when portals are made to be obvious with spec /obj/effect/map_effect/portal/master/proc/make_visuals() var/list/observed_turfs = list() - for(var/thing in portal_lines + src) - var/obj/effect/map_effect/portal/P = thing + for(var/obj/effect/map_effect/portal/P as anything in portal_lines + src) P.name = null P.icon_state = null @@ -230,8 +226,7 @@ when portals are shortly lived, or when portals are made to be obvious with spec // Shifts the portal's pixels in order to line up properly, as BYOND offsets the sprite when it holds multiple turfs inside `vis_contents`. // This undos the shift that BYOND did. /obj/effect/map_effect/portal/master/proc/apply_offset() - for(var/thing in portal_lines + src) - var/obj/effect/map_effect/portal/P = thing + for(var/obj/effect/map_effect/portal/P as anything in portal_lines + src) P.pixel_x = WORLD_ICON_SIZE * P.portal_distance_x P.pixel_y = WORLD_ICON_SIZE * P.portal_distance_y @@ -245,8 +240,7 @@ when portals are shortly lived, or when portals are made to be obvious with spec var/list/in_range = get_mobs_and_objs_in_view_fast(T, world.view, 0) var/list/mobs_to_relay = in_range["mobs"] - for(var/thing in mobs_to_relay) - var/mob/mob = thing + for(var/mob/mob as anything in mobs_to_relay) var/rendered = "[text]" mob.show_message(rendered) @@ -261,8 +255,7 @@ when portals are shortly lived, or when portals are made to be obvious with spec var/list/in_range = get_mobs_and_objs_in_view_fast(T, world.view, 0) var/list/mobs_to_relay = in_range["mobs"] - for(var/thing in mobs_to_relay) - var/mob/mob = thing + for(var/mob/mob as anything in mobs_to_relay) mob.show_message(rendered) ..() @@ -275,8 +268,7 @@ when portals are shortly lived, or when portals are made to be obvious with spec var/list/in_range = get_mobs_and_objs_in_view_fast(T, world.view, 0) var/list/mobs_to_relay = in_range["mobs"] - for(var/thing in mobs_to_relay) - var/mob/mob = thing + for(var/mob/mob as anything in mobs_to_relay) var/list/combined = mob.combine_message(message_pieces, verb, M) var/message = combined["formatted"] var/name_used = M.GetVoice() @@ -296,8 +288,7 @@ when portals are shortly lived, or when portals are made to be obvious with spec var/obj/effect/map_effect/portal/master/other_master = counterpart var/in_vis_contents = FALSE - for(var/thing in other_master.portal_lines + other_master) - var/obj/effect/map_effect/portal/P = thing + for(var/obj/effect/map_effect/portal/P as anything in other_master.portal_lines + other_master) if(P in true_turf.vis_locs) in_vis_contents = TRUE break diff --git a/code/game/objects/effects/map_effects/screen_shaker.dm b/code/game/objects/effects/map_effects/screen_shaker.dm index 29568242e5..c8f5d413bd 100644 --- a/code/game/objects/effects/map_effects/screen_shaker.dm +++ b/code/game/objects/effects/map_effects/screen_shaker.dm @@ -11,8 +11,7 @@ var/shake_strength = 1 // How much it shakes. /obj/effect/map_effect/interval/screen_shaker/trigger() - for(var/A in player_list) - var/mob/M = A + for(var/mob/M as anything in player_list) if(M.z == src.z && get_dist(src, M) <= shake_radius) shake_camera(M, shake_duration, shake_strength) ..() \ No newline at end of file diff --git a/code/game/objects/effects/temporary_visuals/projectiles/tracer.dm b/code/game/objects/effects/temporary_visuals/projectiles/tracer.dm index 76e8015976..4c2f6b6e73 100644 --- a/code/game/objects/effects/temporary_visuals/projectiles/tracer.dm +++ b/code/game/objects/effects/temporary_visuals/projectiles/tracer.dm @@ -23,8 +23,7 @@ if(light_range > 0 && light_intensity > 0) var/list/turf/line = getline(starting.return_turf(), ending.return_turf()) tracing_line: - for(var/i in line) - var/turf/T = i + for(var/turf/T as anything in line) for(var/obj/effect/projectile_lighting/PL in T) if(PL.owner == instance_key) continue tracing_line diff --git a/code/game/objects/items/devices/communicator/UI_tgui.dm b/code/game/objects/items/devices/communicator/UI_tgui.dm index 989d68078e..3759d23d4e 100644 --- a/code/game/objects/items/devices/communicator/UI_tgui.dm +++ b/code/game/objects/items/devices/communicator/UI_tgui.dm @@ -24,8 +24,7 @@ cam_plane_masters = get_tgui_plane_masters() - for(var/plane in cam_plane_masters) - var/obj/screen/instance = plane + for(var/obj/screen/instance as anything in cam_plane_masters) instance.assigned_map = map_name instance.del_on_map_removal = FALSE instance.screen_loc = "[map_name]:CENTER" diff --git a/code/game/objects/items/devices/hacktool.dm b/code/game/objects/items/devices/hacktool.dm index b221ff875c..e92c45e151 100644 --- a/code/game/objects/items/devices/hacktool.dm +++ b/code/game/objects/items/devices/hacktool.dm @@ -15,8 +15,7 @@ hack_state = new(src) /obj/item/device/multitool/hacktool/Destroy() - for(var/T in known_targets) - var/atom/target = T + for(var/atom/target as anything in known_targets) target.unregister(OBSERVER_EVENT_DESTROY, src) known_targets.Cut() qdel(hack_state) diff --git a/code/game/objects/items/devices/radio/jammer.dm b/code/game/objects/items/devices/radio/jammer.dm index ed52707904..ace17fa07d 100644 --- a/code/game/objects/items/devices/radio/jammer.dm +++ b/code/game/objects/items/devices/radio/jammer.dm @@ -4,8 +4,7 @@ var/global/list/active_radio_jammers = list() var/turf/Tr = get_turf(radio) if(!Tr) return 0 //Nullspace radios don't get jammed. - for(var/jammer in active_radio_jammers) - var/obj/item/device/radio_jammer/J = jammer + for(var/obj/item/device/radio_jammer/J as anything in active_radio_jammers) var/turf/Tj = get_turf(J) if(J.on && Tj.z == Tr.z) //If we're on the same Z, it's worth checking. diff --git a/code/game/objects/items/devices/scanners.dm b/code/game/objects/items/devices/scanners.dm index 79f38554b8..1fac4f3226 100644 --- a/code/game/objects/items/devices/scanners.dm +++ b/code/game/objects/items/devices/scanners.dm @@ -133,8 +133,7 @@ HALOGEN COUNTER - Radcount on mobs var/unknown = 0 var/reagentdata[0] var/unknownreagents[0] - for(var/A in C.reagents.reagent_list) - var/datum/reagent/R = A + for(var/datum/reagent/R as anything in C.reagents.reagent_list) if(R.scannable) reagentdata["[R.id]"] = "\t[round(C.reagents.get_reagent_amount(R.id), 1)]u [R.name][(R.overdose && R.volume > R.overdose) ? " - Overdose" : ""]
" else @@ -155,8 +154,7 @@ HALOGEN COUNTER - Radcount on mobs var/unknown = 0 var/stomachreagentdata[0] var/stomachunknownreagents[0] - for(var/B in C.ingested.reagent_list) - var/datum/reagent/R = B + for(var/datum/reagent/R as anything in C.ingested.reagent_list) if(R.scannable) stomachreagentdata["[R.id]"] = "\t[round(C.ingested.get_reagent_amount(R.id), 1)]u [R.name][(R.overdose && R.volume > R.overdose) ? " - Overdose" : ""]
" if (advscan == 0 || showadvscan == 0) @@ -179,8 +177,7 @@ HALOGEN COUNTER - Radcount on mobs var/unknown = 0 var/touchreagentdata[0] var/touchunknownreagents[0] - for(var/B in C.touching.reagent_list) - var/datum/reagent/R = B + for(var/datum/reagent/R as anything in C.touching.reagent_list) if(R.scannable) touchreagentdata["[R.id]"] = "\t[round(C.touching.get_reagent_amount(R.id), 1)]u [R.name][(R.overdose && R.can_overdose_touch && R.volume > R.overdose) ? " - Overdose" : ""]
" if (advscan == 0 || showadvscan == 0) diff --git a/code/game/objects/items/devices/scanners_vr.dm b/code/game/objects/items/devices/scanners_vr.dm index b0c928e5a2..1722617106 100644 --- a/code/game/objects/items/devices/scanners_vr.dm +++ b/code/game/objects/items/devices/scanners_vr.dm @@ -54,8 +54,7 @@ var/global/mob/living/carbon/human/dummy/mannequin/sleevemate_mob // Gather potential subtargets var/list/choices = list(M) if(istype(M)) - for(var/belly in M.vore_organs) - var/obj/belly/B = belly + for(var/obj/belly/B as anything in M.vore_organs) for(var/mob/living/carbon/human/H in B) // I do want an istype choices += H // Subtargets diff --git a/code/game/objects/items/devices/text_to_speech.dm b/code/game/objects/items/devices/text_to_speech.dm index e962124022..54510fb9a4 100644 --- a/code/game/objects/items/devices/text_to_speech.dm +++ b/code/game/objects/items/devices/text_to_speech.dm @@ -7,7 +7,7 @@ var/named /obj/item/device/text_to_speech/attack_self(mob/user as mob) - if(user.incapacitated(INCAPACITATION_ALL)) //Are you in a state to actual use the device? + if(user.incapacitated(INCAPACITATION_KNOCKDOWN|INCAPACITATION_DISABLED)) // EDIT: We can use the device only if we are not in certain types of incapacitation. We don't want chairs stopping us from texting!! to_chat(user, "You cannot activate the device in your state.") return @@ -27,3 +27,6 @@ audible_message("[bicon(src)] \The [src.name] states, \"[message]\"", runemessage = "synthesized speech") if(ismob(loc)) loc.audible_message("", runemessage = "\[TTS Voice\] [message]") + +/obj/item/device/text_to_speech/AltClick(mob/user) // QOL Change + attack_self(user) diff --git a/code/game/objects/items/stacks/medical_vr.dm b/code/game/objects/items/stacks/medical_vr.dm index 4599bb43f9..9ba54cea33 100644 --- a/code/game/objects/items/stacks/medical_vr.dm +++ b/code/game/objects/items/stacks/medical_vr.dm @@ -43,16 +43,14 @@ var/clotted = 0 var/too_far_gone = 0 - for(var/org in H.organs) //'organs' is just external organs, as opposed to 'internal_organs' - var/obj/item/organ/external/affecting = org + for(var/obj/item/organ/external/affecting as anything in H.organs) //'organs' is just external organs, as opposed to 'internal_organs' // No amount of clotting is going to help you here. if(affecting.open) too_far_gone++ continue - for(var/wnd in affecting.wounds) - var/datum/wound/W = wnd + for(var/datum/wound/W as anything in affecting.wounds) // No need if(W.bandaged) continue diff --git a/code/game/objects/random/mapping.dm b/code/game/objects/random/mapping.dm index 06a5e75fd1..f61567d6de 100644 --- a/code/game/objects/random/mapping.dm +++ b/code/game/objects/random/mapping.dm @@ -464,7 +464,7 @@ /obj/random/multiple/ore_pile/item_to_spawn() return pick( - prob(10);list( + /*prob(10);list( /obj/item/weapon/ore/bauxite, /obj/item/weapon/ore/bauxite, /obj/item/weapon/ore/bauxite, @@ -475,7 +475,7 @@ /obj/item/weapon/ore/bauxite, /obj/item/weapon/ore/bauxite, /obj/item/weapon/ore/bauxite - ), + ),*/ prob(10);list( /obj/item/weapon/ore/coal, /obj/item/weapon/ore/coal, @@ -488,7 +488,7 @@ /obj/item/weapon/ore/coal, /obj/item/weapon/ore/coal ), - prob(10);list( + /*prob(10);list( /obj/item/weapon/ore/copper, /obj/item/weapon/ore/copper, /obj/item/weapon/ore/copper, @@ -499,7 +499,7 @@ /obj/item/weapon/ore/copper, /obj/item/weapon/ore/copper, /obj/item/weapon/ore/copper - ), + ),*/ prob(3);list( /obj/item/weapon/ore/diamond, /obj/item/weapon/ore/diamond, @@ -598,11 +598,11 @@ prob(2);list( /obj/item/weapon/ore/verdantium, /obj/item/weapon/ore/verdantium - ), + ),/* prob(2);list( /obj/item/weapon/ore/void_opal, /obj/item/weapon/ore/void_opal - ), + ),*/ ) /obj/random/multiple/corp_crate diff --git a/code/game/objects/structures.dm b/code/game/objects/structures.dm index 38e173e3ff..67d76a8c89 100644 --- a/code/game/objects/structures.dm +++ b/code/game/objects/structures.dm @@ -252,6 +252,5 @@ return TRUE /obj/structure/proc/refresh_neighbors() - for(var/thing in RANGE_TURFS(1, src)) - var/turf/T = thing + for(var/turf/T as anything in RANGE_TURFS(1, src)) T.update_icon() diff --git a/code/game/objects/structures/alien/alien egg.dm b/code/game/objects/structures/alien/alien egg.dm new file mode 100644 index 0000000000..7ca4bd37b7 --- /dev/null +++ b/code/game/objects/structures/alien/alien egg.dm @@ -0,0 +1,117 @@ +#define MAX_PROGRESS 100 + +/obj/structure/alien/egg //Gurg Addition, working alien egg structure. + desc = "It looks like a weird egg." + name = "egg" + icon_state = "egg_growing" + density = 0 + anchored = 1 + var/progress = 0 + +/obj/structure/alien/egg/Initialize() + . = ..() + START_PROCESSING(SSobj, src) + +/obj/structure/alien/egg/Destroy() + STOP_PROCESSING(SSobj, src) + . = ..() + +/obj/structure/alien/egg/CanUseTopic(var/mob/user) + return isobserver(user) ? STATUS_INTERACTIVE : STATUS_CLOSE + +/obj/structure/alien/egg/Topic(href, href_list) + if(..()) + return 1 + + if(href_list["spawn"]) + attack_ghost(usr) + +/obj/structure/alien/egg/process() + progress++ + if(progress >= MAX_PROGRESS) + for(var/mob/observer/dead/O in observer_mob_list) + if(O.client) + to_chat(O, "An alien is ready to hatch at [get_area(src.loc)]! (spawn)") + STOP_PROCESSING(SSobj, src) + update_icon() + +/obj/structure/alien/egg/update_icon() + if(progress == -1) + icon_state = "egg_opened" + else if(progress < MAX_PROGRESS) + icon_state = "egg_growing" + else + icon_state = "egg" + + // Ghostjoinable icon + var/static/image/I + if(!I) + I = image('icons/mob/hud_vr.dmi', "ghostjoin") + I.invisibility = INVISIBILITY_OBSERVER + I.plane = PLANE_GHOSTS + I.appearance_flags = KEEP_APART|RESET_TRANSFORM + + if(progress >= MAX_PROGRESS) + add_overlay(I) + else + cut_overlay(I) + + +/obj/structure/alien/egg/attack_ghost(var/mob/observer/dead/user) + // Still a ghost? + if(!istype(user)) + tgui_alert_async(user, "You have to be an observer to join as this Xenomorph larva.") + return + + // Check for bans properly. + if(jobban_isbanned(user, "Xenomorph")) + tgui_alert_async(user, "You are banned from playing a Xenomorph, so you can't join as this Xenomorph larva.") + return + + // Check for respawn + if(!user.MayRespawn(1)) + tgui_alert_async(user, "You aren't allowed to respawn, so you can't join as this Xenomorph larva.") + return + + if(progress == -1) + tgui_alert_async(user, "That egg has already hatched.") + else if(progress >= MAX_PROGRESS) + tgui_alert_async(user, "Are you sure you want to join as a Xenomorph larva?", "Become Larva", list("Yes","No"), CALLBACK(src, .proc/ghost_dunk), 20 SECONDS) + else + tgui_alert_async(user, "\The [src] has not yet matured.") + +/obj/structure/alien/egg/proc/ghost_dunk(choice) + if(choice != "Yes") + return + var/mob/observer/dead/user = usr + if(progress < MAX_PROGRESS || !istype(user)) + return + + progress = -1 // No harvesting pls. + flick("egg_opening",src) + sleep(5) //5ds animation + + if(!src || !istype(user)) + visible_message("\The [src] writhes with internal motion, but nothing comes out.") + progress = MAX_PROGRESS // Someone else can have a go. + return // What a pain. + + // Create the mob, transfer over key. + var/mob/living/carbon/alien/larva/larva = new(get_turf(src)) + + // Move the ghost in + if(user.mind) + user.mind.active = TRUE + user.mind.transfer_to(larva) + else + larva.ckey = user.ckey + qdel(user) + + visible_message("\The [src] splits open with a wet slithering noise, and \the [larva] writhes free!") + + // Turn us into a hatched egg. + name = "hatched alien egg" + desc += " This one has hatched." + update_icon() + +#undef MAX_PROGRESS diff --git a/code/game/objects/structures/alien/alien.dm b/code/game/objects/structures/alien/alien.dm new file mode 100644 index 0000000000..31a609e5a5 --- /dev/null +++ b/code/game/objects/structures/alien/alien.dm @@ -0,0 +1,62 @@ +/obj/structure/alien //Gurg Addition, framework for alien eggs. + name = "alien thing" + desc = "There's something alien about this." + icon = 'icons/mob/alien.dmi' + layer = ABOVE_JUNK_LAYER + var/health = 50 + +/obj/structure/alien/proc/healthcheck() + if(health <=0) + set_density(0) + qdel(src) + return + +/obj/structure/alien/bullet_act(var/obj/item/projectile/Proj) + health -= Proj.damage + ..() + healthcheck() + return + +/obj/structure/alien/ex_act(severity) + switch(severity) + if(1.0) + health-=50 + if(2.0) + health-=50 + if(3.0) + if (prob(50)) + health-=50 + else + health-=25 + healthcheck() + return + +/obj/structure/alien/hitby(AM as mob|obj) + ..() + visible_message("\The [src] was hit by \the [AM].") + var/tforce = 0 + if(ismob(AM)) + tforce = 10 + else + tforce = AM:throwforce + playsound(loc, 'sound/effects/attackblob.ogg', 100, 1) + health = max(0, health - tforce) + healthcheck() + ..() + return + +/obj/structure/alien/attack_generic() + attack_hand(usr) + +/obj/structure/alien/attackby(var/obj/item/weapon/W, var/mob/user) + health = max(0, health - W.force) + playsound(loc, 'sound/effects/attackblob.ogg', 100, 1) + healthcheck() + ..() + return + +/obj/structure/alien/CanPass(atom/movable/mover, turf/target, height=0, air_group=0) + if(air_group) return 0 + if(istype(mover) && mover.checkpass(PASSGLASS)) + return !opacity + return !density diff --git a/code/game/objects/structures/artstuff.dm b/code/game/objects/structures/artstuff.dm index 2e2f4052b8..cbb95e955f 100644 --- a/code/game/objects/structures/artstuff.dm +++ b/code/game/objects/structures/artstuff.dm @@ -375,6 +375,12 @@ persistence_id = "library_private" req_one_access = list(access_library) +/obj/structure/sign/painting/away_areas // for very hard-to-get-to areas + name = "\improper Remote Painting Exhibit mounting" + desc = "For art pieces made in the depths of space." + desc_with_canvas = "A painting hung where only the determined can reach it." + persistence_id = "away_area" + /obj/structure/sign/painting/Initialize(mapload, dir, building) . = ..() if(persistence_id) diff --git a/code/game/objects/structures/electricchair.dm b/code/game/objects/structures/electricchair.dm index ca515e230f..2859d55dfb 100644 --- a/code/game/objects/structures/electricchair.dm +++ b/code/game/objects/structures/electricchair.dm @@ -65,8 +65,7 @@ s.set_up(12, 1, src) s.start() if(has_buckled_mobs()) - for(var/a in buckled_mobs) - var/mob/living/L = a + for(var/mob/living/L as anything in buckled_mobs) L.burn_skin(85) to_chat(L, "You feel a deep shock course through your body!") sleep(1) diff --git a/code/game/objects/structures/janicart.dm b/code/game/objects/structures/janicart.dm index 87f568f703..46a888e55f 100644 --- a/code/game/objects/structures/janicart.dm +++ b/code/game/objects/structures/janicart.dm @@ -456,8 +456,7 @@ GLOBAL_LIST_BOILERPLATE(all_janitorial_carts, /obj/structure/janitorialcart) ..() update_layer() if(has_buckled_mobs()) - for(var/A in buckled_mobs) - var/mob/living/L = A + for(var/mob/living/L as anything in buckled_mobs) if(L.loc != loc) L.buckled = null //Temporary, so Move() succeeds. L.buckled = src //Restoring @@ -467,8 +466,7 @@ GLOBAL_LIST_BOILERPLATE(all_janitorial_carts, /obj/structure/janitorialcart) /obj/structure/bed/chair/janicart/proc/update_mob() if(has_buckled_mobs()) - for(var/A in buckled_mobs) - var/mob/living/L = A + for(var/mob/living/L as anything in buckled_mobs) L.set_dir(dir) switch(dir) if(SOUTH) diff --git a/code/game/objects/structures/stool_bed_chair_nest/chairs.dm b/code/game/objects/structures/stool_bed_chair_nest/chairs.dm index 164554652b..4a3c5b53ff 100644 --- a/code/game/objects/structures/stool_bed_chair_nest/chairs.dm +++ b/code/game/objects/structures/stool_bed_chair_nest/chairs.dm @@ -63,8 +63,7 @@ ..() update_layer() if(has_buckled_mobs()) - for(var/A in buckled_mobs) - var/mob/living/L = A + for(var/mob/living/L as anything in buckled_mobs) L.set_dir(dir) /obj/structure/bed/chair/verb/rotate_clockwise() @@ -151,8 +150,7 @@ playsound(src, 'sound/effects/roll.ogg', 100, 1) /obj/structure/bed/chair/office/handle_buckled_mob_movement(atom/new_loc, direction, movetime) - for(var/A in buckled_mobs) - var/mob/living/occupant = A + for(var/mob/living/occupant as anything in buckled_mobs) occupant.buckled = null occupant.Move(loc, direction, movetime) occupant.buckled = src diff --git a/code/game/objects/structures/stool_bed_chair_nest/wheelchair.dm b/code/game/objects/structures/stool_bed_chair_nest/wheelchair.dm index 461cc122bf..2521055dad 100644 --- a/code/game/objects/structures/stool_bed_chair_nest/wheelchair.dm +++ b/code/game/objects/structures/stool_bed_chair_nest/wheelchair.dm @@ -51,8 +51,7 @@ . = ..() if(.) if(has_buckled_mobs()) - for(var/A in buckled_mobs) - var/mob/living/L = A + for(var/mob/living/L as anything in buckled_mobs) L.set_dir(dir) /obj/structure/bed/chair/wheelchair/attackby(obj/item/weapon/W as obj, mob/user as mob) @@ -95,8 +94,7 @@ var/turf/T = null //--1---Move occupant---1--// if(has_buckled_mobs()) - for(var/A in buckled_mobs) - var/mob/living/L = A + for(var/mob/living/L as anything in buckled_mobs) L.buckled = null step(L, direction) L.buckled = src @@ -128,8 +126,7 @@ . = ..() playsound(src, 'sound/effects/roll.ogg', 75, 1) if(has_buckled_mobs()) - for(var/A in buckled_mobs) - var/mob/living/occupant = A + for(var/mob/living/occupant as anything in buckled_mobs) if(!driving) occupant.buckled = null occupant.Move(src.loc) diff --git a/code/game/objects/structures/watercloset.dm b/code/game/objects/structures/watercloset.dm index 72474fea33..a8eb677840 100644 --- a/code/game/objects/structures/watercloset.dm +++ b/code/game/objects/structures/watercloset.dm @@ -265,12 +265,11 @@ /obj/machinery/shower/process() if(!on) return - for(var/thing in loc) - var/atom/movable/AM = thing - var/mob/living/L = thing - if(istype(AM) && AM.simulated) + for(var/atom/movable/AM in loc) + if(AM.simulated) wash(AM) - if(istype(L)) + if(isliving(AM)) + var/mob/living/L = AM process_heat(L) wash_floor() reagents.add_reagent("water", reagents.get_free_space()) diff --git a/code/game/periodic_news.dm b/code/game/periodic_news.dm index a3d89313c5..a5eb2042be 100644 --- a/code/game/periodic_news.dm +++ b/code/game/periodic_news.dm @@ -109,7 +109,7 @@ var/global/list/newscaster_standard_feeds = list(/datum/news_announcement/bluesp var/global/tmp/announced_news_types = list() /proc/check_for_newscaster_updates(type) - for(var/subtype in typesof(type)-type) + for(var/subtype in subtypesof(type)) var/datum/news_announcement/news = new subtype() if(news.round_time * 10 <= world.time && !(subtype in announced_news_types)) announced_news_types += subtype diff --git a/code/game/sound.dm b/code/game/sound.dm index 4635415058..0b2cf4b80e 100644 --- a/code/game/sound.dm +++ b/code/game/sound.dm @@ -17,8 +17,7 @@ var/list/listeners = player_list if(!ignore_walls) //these sounds don't carry through walls listeners = listeners & hearers(maxdistance,turf_source) - for(var/P in listeners) - var/mob/M = P + for(var/mob/M as anything in listeners) if(!M || !M.client) continue var/turf/T = get_turf(M) diff --git a/code/game/turfs/turf.dm b/code/game/turfs/turf.dm index 10e78e83ee..5a6495d638 100644 --- a/code/game/turfs/turf.dm +++ b/code/game/turfs/turf.dm @@ -239,19 +239,17 @@ /turf/proc/AdjacentTurfs(var/check_blockage = TRUE) . = list() - for(var/t in (trange(1,src) - src)) - var/turf/T = t + for(var/turf/T as anything in (trange(1,src) - src)) if(check_blockage) if(!T.density) if(!LinkBlocked(src, T) && !TurfBlockedNonWindow(T)) - . += t + . += T else - . += t + . += T /turf/proc/CardinalTurfs(var/check_blockage = TRUE) . = list() - for(var/ad in AdjacentTurfs(check_blockage)) - var/turf/T = ad + for(var/turf/T as anything in AdjacentTurfs(check_blockage)) if(T.x == src.x || T.y == src.y) . += T diff --git a/code/game/turfs/turf_changing.dm b/code/game/turfs/turf_changing.dm index 85292aa2b3..492f3ef65b 100644 --- a/code/game/turfs/turf_changing.dm +++ b/code/game/turfs/turf_changing.dm @@ -41,6 +41,7 @@ var/old_directional_opacity = directional_opacity var/old_outdoors = outdoors var/old_dangerous_objects = dangerous_objects + var/old_dynamic_lumcount = dynamic_lumcount var/turf/Ab = GetAbove(src) if(Ab) @@ -111,6 +112,8 @@ lighting_corner_SW = old_lighting_corner_SW lighting_corner_NW = old_lighting_corner_NW + dynamic_lumcount = old_dynamic_lumcount + if(SSlighting.subsystem_initialized) lighting_object = old_lighting_object diff --git a/code/modules/admin/admin_secrets.dm b/code/modules/admin/admin_secrets.dm index 89f032071c..e8ab89101c 100644 --- a/code/modules/admin/admin_secrets.dm +++ b/code/modules/admin/admin_secrets.dm @@ -12,7 +12,7 @@ var/datum/admin_secrets/admin_secrets = new() for(var/datum/admin_secret_category/category in categories) category_assoc[category.type] = category - for(var/item_type in (typesof(/datum/admin_secret_item) - /datum/admin_secret_item)) + for(var/item_type in subtypesof(/datum/admin_secret_item)) var/datum/admin_secret_item/secret_item = item_type if(!initial(secret_item.name)) continue diff --git a/code/modules/admin/admin_verbs.dm b/code/modules/admin/admin_verbs.dm index fd11766653..e9d63621b0 100644 --- a/code/modules/admin/admin_verbs.dm +++ b/code/modules/admin/admin_verbs.dm @@ -302,7 +302,7 @@ to_chat(usr, "Looks like you didn't select a mob.") return - var/list/possible_modifiers = typesof(/datum/modifier) - /datum/modifier + var/list/possible_modifiers = subtypesof(/datum/modifier) var/new_modifier_type = tgui_input_list(usr, "What modifier should we add to [L]?", "Modifier Type", possible_modifiers) if(!new_modifier_type) diff --git a/code/modules/admin/verbs/SDQL2/SDQL_2.dm b/code/modules/admin/verbs/SDQL2/SDQL_2.dm index 0d9bceb996..60542d5a05 100644 --- a/code/modules/admin/verbs/SDQL2/SDQL_2.dm +++ b/code/modules/admin/verbs/SDQL2/SDQL_2.dm @@ -238,8 +238,7 @@ Example: USING PROCCALL = BLOCKING, SELECT = FORCE_NULLS, PRIORITY = HIGH SELECT do CHECK_TICK finished = TRUE - for(var/i in running) - var/datum/SDQL2_query/query = i + for(var/datum/SDQL2_query/query as anything in running) if(QDELETED(query)) running -= query continue @@ -562,8 +561,7 @@ GLOBAL_DATUM_INIT(sdql2_vv_statobj, /obj/effect/statclick/SDQL2_VV_all, new(null location = list(location) if(type == "*") - for(var/i in location) - var/datum/d = i + for(var/datum/d as anything in location) if(d.can_vv_get() || superuser) out += d SDQL2_TICK_CHECK diff --git a/code/modules/admin/verbs/adminhelp.dm b/code/modules/admin/verbs/adminhelp.dm index 20d3bad3c7..1943147aee 100644 --- a/code/modules/admin/verbs/adminhelp.dm +++ b/code/modules/admin/verbs/adminhelp.dm @@ -82,8 +82,7 @@ GLOBAL_DATUM_INIT(ahelp_tickets, /datum/admin_help_tickets, new) return var/list/dat = list("[title]") dat += "Refresh

" - for(var/I in l2b) - var/datum/admin_help/AH = I + for(var/datum/admin_help/AH as anything in l2b) dat += "Ticket #[AH.id]: [AH.initiator_key_name]: [AH.name]
" usr << browse(dat.Join(), "window=ahelp_list[state];size=600x480") @@ -92,8 +91,7 @@ GLOBAL_DATUM_INIT(ahelp_tickets, /datum/admin_help_tickets, new) /datum/admin_help_tickets/proc/stat_entry() var/num_disconnected = 0 stat("Active Tickets:", astatclick.update("[active_tickets.len]")) - for(var/I in active_tickets) - var/datum/admin_help/AH = I + for(var/datum/admin_help/AH as anything in active_tickets) if(AH.initiator) stat("#[AH.id]. [AH.initiator_key_name]:", AH.statclick.update()) else @@ -119,8 +117,7 @@ GLOBAL_DATUM_INIT(ahelp_tickets, /datum/admin_help_tickets, new) //Get a ticket given a ckey /datum/admin_help_tickets/proc/CKey2ActiveTicket(ckey) - for(var/I in active_tickets) - var/datum/admin_help/AH = I + for(var/datum/admin_help/AH as anything in active_tickets) if(AH.initiator_ckey == ckey) return AH @@ -669,8 +666,7 @@ GLOBAL_DATUM_INIT(ahelp_tickets, /datum/admin_help_tickets, new) /proc/ircadminwho() var/list/message = list("Admins: ") var/list/admin_keys = list() - for(var/adm in GLOB.admins) - var/client/C = adm + for(var/client/C as anything in GLOB.admins) admin_keys += "[C][C.holder.fakekey ? "(Stealth)" : ""][C.is_afk() ? "(AFK)" : ""]" for(var/admin in admin_keys) diff --git a/code/modules/admin/verbs/randomverbs.dm b/code/modules/admin/verbs/randomverbs.dm index e903df406a..827eb3aa7f 100644 --- a/code/modules/admin/verbs/randomverbs.dm +++ b/code/modules/admin/verbs/randomverbs.dm @@ -282,8 +282,7 @@ Ccomp's first proc. GLOB.respawn_timers -= target var/found_client = FALSE - for(var/c in GLOB.clients) - var/client/C = c + for(var/client/C as anything in GLOB.clients) if(C.ckey == target) found_client = C to_chat(C, "You may now respawn. You should roleplay as if you learned nothing about the round during your time with the dead.") @@ -892,13 +891,13 @@ Traitors and the like can also be revived with the previous role mostly intact. var/choice if(ticker.mode.auto_recall_shuttle) - choice = tgui_input_list(usr, "The shuttle will just return if you call it. Call anyway?", list("Confirm", "Cancel")) + choice = tgui_input_list(usr, "The shuttle will just return if you call it. Call anyway?", "Shuttle Call", list("Confirm", "Cancel")) if(choice == "Confirm") emergency_shuttle.auto_recall = 1 //enable auto-recall else return - choice = tgui_input_list(usr, "Is this an emergency evacuation or a crew transfer?", list("Emergency", "Crew Transfer")) + choice = tgui_input_list(usr, "Is this an emergency evacuation or a crew transfer?", "Shuttle Call", list("Emergency", "Crew Transfer")) if (choice == "Emergency") emergency_shuttle.call_evac() else diff --git a/code/modules/admin/verbs/striketeam.dm b/code/modules/admin/verbs/striketeam.dm index 1a27de10c4..d7b2c1ffff 100644 --- a/code/modules/admin/verbs/striketeam.dm +++ b/code/modules/admin/verbs/striketeam.dm @@ -20,7 +20,7 @@ var/const/commandos_possible = 6 //if more Commandos are needed in the future var/datum/antagonist/deathsquad/team - var/choice = tgui_input_list(usr, "Select type of strike team:", list("Heavy Asset Protection", "Mercenaries")) + var/choice = tgui_input_list(usr, "Select type of strike team:", "Strike Team", list("Heavy Asset Protection", "Mercenaries")) if(!choice) return diff --git a/code/modules/admin/view_variables/modify_variables.dm b/code/modules/admin/view_variables/modify_variables.dm index 6f354e9b63..8863e76533 100644 --- a/code/modules/admin/view_variables/modify_variables.dm +++ b/code/modules/admin/view_variables/modify_variables.dm @@ -46,8 +46,7 @@ GLOBAL_PROTECT(VVpixelmovement) var/things = get_all_of_type(type, subtypes) var/i = 0 - for(var/thing in things) - var/datum/D = thing + for(var/datum/D as anything in things) i++ //try one of 3 methods to shorten the type text: // fancy type, diff --git a/code/modules/ai/ai_holder.dm b/code/modules/ai/ai_holder.dm index edd55a4c04..78f16a96a0 100644 --- a/code/modules/ai/ai_holder.dm +++ b/code/modules/ai/ai_holder.dm @@ -175,11 +175,10 @@ var/list/choices = list() for(var/typechoice in types) var/list/found = list() - for(var/mob in searching) // Isnt't there a helper for this, maybe? I forget. - var/atom/M = mob + for(var/atom/M as anything in searching) // Isnt't there a helper for this, maybe? I forget. if(!(M.z in levels_working)) continue - if(!istype(mob,typechoice)) + if(!istype(M,typechoice)) continue found += M choices["[typechoice] ([found.len])"] = found // Prettified name for the user input below) @@ -190,8 +189,7 @@ href_list["datumrefresh"] = "\ref[src]" return var/list/selected = choices[choice] - for(var/mob in selected) - var/mob/living/L = mob + for(var/mob/living/L as anything in selected) if(!istype(L)) to_chat(usr,"Skipping incompatible mob: [L] [ADMIN_COORDJMP(L)]") continue diff --git a/code/modules/ai/ai_holder_combat.dm b/code/modules/ai/ai_holder_combat.dm index e2e1ecbdea..760031985e 100644 --- a/code/modules/ai/ai_holder_combat.dm +++ b/code/modules/ai/ai_holder_combat.dm @@ -132,8 +132,7 @@ ai_log("test_projectile_safety() : Test projectile did[!would_hit_primary_target ? " NOT " : " "]hit \the [AM]", AI_LOG_DEBUG) // Make sure we don't have a chance to shoot our friends. - for(var/a in hit_things) - var/atom/A = a + for(var/atom/A as anything in hit_things) ai_log("test_projectile_safety() : Evaluating \the [A] ([A.type]).", AI_LOG_TRACE) if(isliving(A)) // Don't shoot at our friends, even if they're behind the target, as RNG can make them get hit. var/mob/living/L = A diff --git a/code/modules/ai/ai_holder_communication.dm b/code/modules/ai/ai_holder_communication.dm index beddb68924..caafe5c8b8 100644 --- a/code/modules/ai/ai_holder_communication.dm +++ b/code/modules/ai/ai_holder_communication.dm @@ -84,8 +84,7 @@ if(rand(0,200) < speak_chance) // Check if anyone is around to 'appreciate' what we say. var/alone = TRUE - for(var/m in viewers(holder)) - var/mob/M = m + for(var/mob/M as anything in viewers(holder)) if(M.client) alone = FALSE break diff --git a/code/modules/assembly/infrared.dm b/code/modules/assembly/infrared.dm index af697777f9..66ed0c186a 100644 --- a/code/modules/assembly/infrared.dm +++ b/code/modules/assembly/infrared.dm @@ -127,8 +127,7 @@ return TRUE if("visible") visible = !visible - for(var/ibeam in i_beams) - var/obj/effect/beam/i_beam/I = ibeam + for(var/obj/effect/beam/i_beam/I as anything in i_beams) I.visible = visible CHECK_TICK return TRUE diff --git a/code/modules/asset_cache/asset_list_items.dm b/code/modules/asset_cache/asset_list_items.dm index e92d5b1719..88cbfa16f7 100644 --- a/code/modules/asset_cache/asset_list_items.dm +++ b/code/modules/asset_cache/asset_list_items.dm @@ -375,8 +375,7 @@ /datum/asset/spritesheet/vending/register() populate_vending_products() - for(var/k in GLOB.vending_products) - var/atom/item = k + for(var/atom/item as anything in GLOB.vending_products) if(!ispath(item, /atom)) continue diff --git a/code/modules/awaymissions/gateway.dm b/code/modules/awaymissions/gateway.dm index 1fa45f6a10..9e8967732e 100644 --- a/code/modules/awaymissions/gateway.dm +++ b/code/modules/awaymissions/gateway.dm @@ -176,6 +176,8 @@ GLOBAL_DATUM(gateway_station, /obj/machinery/gateway/centerstation) //VOREStation Addition Start: Abduction! if(istype(M, /mob/living) && dest.abductor) var/mob/living/L = M + if(L.nutrition > 500) + L.nutrition = 500 //If the aim is to negate people overpreparing, then they shouldn't be able to stuff themselves full of food either. //Situations to get the mob out of if(L.buckled) L.buckled.unbuckle_mob() diff --git a/code/modules/awaymissions/loot_vr.dm b/code/modules/awaymissions/loot_vr.dm index 17509ce12e..d602eb9da2 100644 --- a/code/modules/awaymissions/loot_vr.dm +++ b/code/modules/awaymissions/loot_vr.dm @@ -63,7 +63,7 @@ //credits var/amount = rand(2,6) var/list/possible_spawns = list() - for(var/cash_type in typesof(/obj/item/weapon/spacecash) - /obj/item/weapon/spacecash) + for(var/cash_type in subtypesof(/obj/item/weapon/spacecash)) possible_spawns += cash_type var/cash_type = pick(possible_spawns) diff --git a/code/modules/blob2/blobs/base_blob.dm b/code/modules/blob2/blobs/base_blob.dm index f9c9eb588d..14f7eb54c0 100644 --- a/code/modules/blob2/blobs/base_blob.dm +++ b/code/modules/blob2/blobs/base_blob.dm @@ -111,8 +111,7 @@ GLOBAL_LIST_EMPTY(all_blobs) shuffle_inplace(blobs_to_affect) - for(var/L in blobs_to_affect) - var/obj/structure/blob/B = L + for(var/obj/structure/blob/B as anything in blobs_to_affect) if(B.faction != faction) continue diff --git a/code/modules/blob2/blobs/core.dm b/code/modules/blob2/blobs/core.dm index cd4a68a308..2b5cefa89d 100644 --- a/code/modules/blob2/blobs/core.dm +++ b/code/modules/blob2/blobs/core.dm @@ -197,8 +197,7 @@ var/list/blob_cores = list() if(!difficulty_threshold) return var/list/valid_types = list() - for(var/thing in subtypesof(/datum/blob_type)) - var/datum/blob_type/BT = thing + for(var/datum/blob_type/BT as anything in subtypesof(/datum/blob_type)) if(initial(BT.difficulty) > difficulty_threshold) // Too hard. continue if(initial(BT.difficulty) < difficulty_floor) // Too easy. diff --git a/code/modules/blob2/overmind/overmind.dm b/code/modules/blob2/overmind/overmind.dm index 6df0cba629..cdfe6d766a 100644 --- a/code/modules/blob2/overmind/overmind.dm +++ b/code/modules/blob2/overmind/overmind.dm @@ -57,14 +57,12 @@ var/list/overminds = list() return ..(newloc) /mob/observer/blob/Destroy() - for(var/BL in GLOB.all_blobs) - var/obj/structure/blob/B = BL + for(var/obj/structure/blob/B as anything in GLOB.all_blobs) if(B && B.overmind == src) B.overmind = null B.update_icon() //reset anything that was ours - for(var/BLO in blob_mobs) - var/mob/living/simple_mob/blob/spore/BM = BLO + for(var/mob/living/simple_mob/blob/spore/BM as anything in blob_mobs) if(BM) BM.overmind = null BM.update_icons() diff --git a/code/modules/blob2/overmind/types/synchronous_mesh.dm b/code/modules/blob2/overmind/types/synchronous_mesh.dm index e234756b2d..acf9441b71 100644 --- a/code/modules/blob2/overmind/types/synchronous_mesh.dm +++ b/code/modules/blob2/overmind/types/synchronous_mesh.dm @@ -34,8 +34,7 @@ if(!istype(C, /obj/structure/blob/core) && !istype(C, /obj/structure/blob/node) && C.overmind && (C.overmind == B.overmind) ) //if it doesn't have the same 'ownership' or is a core or node, don't split damage to it blobs_to_hurt += C - for(var/thing in blobs_to_hurt) - var/obj/structure/blob/C = thing + for(var/obj/structure/blob/C as anything in blobs_to_hurt) if(C == B) continue // We'll damage this later. diff --git a/code/modules/busy_space/loremaster.dm b/code/modules/busy_space/loremaster.dm index 28dca0055b..9c2f0f55b4 100644 --- a/code/modules/busy_space/loremaster.dm +++ b/code/modules/busy_space/loremaster.dm @@ -7,7 +7,7 @@ var/datum/lore/loremaster/loremaster = new/datum/lore/loremaster /datum/lore/loremaster/New() - var/list/paths = typesof(/datum/lore/organization) - /datum/lore/organization + var/list/paths = subtypesof(/datum/lore/organization) for(var/path in paths) // Some intermediate paths are not real organizations (ex. /datum/lore/organization/mil). Only do ones with names var/datum/lore/organization/instance = path diff --git a/code/modules/busy_space_vr/loremaster.dm b/code/modules/busy_space_vr/loremaster.dm index 28dca0055b..9c2f0f55b4 100644 --- a/code/modules/busy_space_vr/loremaster.dm +++ b/code/modules/busy_space_vr/loremaster.dm @@ -7,7 +7,7 @@ var/datum/lore/loremaster/loremaster = new/datum/lore/loremaster /datum/lore/loremaster/New() - var/list/paths = typesof(/datum/lore/organization) - /datum/lore/organization + var/list/paths = subtypesof(/datum/lore/organization) for(var/path in paths) // Some intermediate paths are not real organizations (ex. /datum/lore/organization/mil). Only do ones with names var/datum/lore/organization/instance = path diff --git a/code/modules/catalogue/cataloguer.dm b/code/modules/catalogue/cataloguer.dm index 8f7f3152f3..92ed97f347 100644 --- a/code/modules/catalogue/cataloguer.dm +++ b/code/modules/catalogue/cataloguer.dm @@ -78,8 +78,7 @@ GLOBAL_LIST_EMPTY(all_cataloguers) if(isturf(target) && (!target.can_catalogue())) var/turf/T = target - for(var/a in T) // If we can't scan the turf, see if we can scan anything on it, to help with aiming. - var/atom/A = a + for(var/atom/A as anything in T) // If we can't scan the turf, see if we can scan anything on it, to help with aiming. if(A.can_catalogue()) target = A break @@ -149,8 +148,7 @@ GLOBAL_LIST_EMPTY(all_cataloguers) // Figure out who may have helped out. var/list/contributers = list() var/list/contributer_names = list() - for(var/thing in player_list) - var/mob/living/L = thing + for(var/mob/living/L as anything in player_list) if(L == user) continue if(!istype(L)) @@ -169,8 +167,7 @@ GLOBAL_LIST_EMPTY(all_cataloguers) if(istype(I)) var/list/discoveries = I.discover(user, list(user.name) + contributer_names) // If one discovery leads to another, the list returned will have all of them. if(LAZYLEN(discoveries)) - for(var/D in discoveries) - var/datum/category_item/catalogue/data = D + for(var/datum/category_item/catalogue/data as anything in discoveries) points_gained += data.value // Give out points. @@ -208,23 +205,20 @@ GLOBAL_LIST_EMPTY(all_cataloguers) // First, get everything able to be scanned. var/list/scannable_atoms = list() - for(var/a in view(world.view, user)) - var/atom/A = a + for(var/atom/A as anything in view(world.view, user)) if(A.can_catalogue()) // Not passing the user is intentional, so they don't get spammed. scannable_atoms += A // Highlight things able to be scanned. var/filter = filter(type = "outline", size = 1, color = "#00FF00") - for(var/a in scannable_atoms) - var/atom/A = a + for(var/atom/A as anything in scannable_atoms) A.filters += filter to_chat(user, span("notice", "\The [src] is highlighting scannable objects in green, if any exist.")) sleep(2 SECONDS) // Remove the highlights. - for(var/a in scannable_atoms) - var/atom/A = a + for(var/atom/A as anything in scannable_atoms) if(QDELETED(A)) continue A.filters -= filter @@ -271,14 +265,12 @@ GLOBAL_LIST_EMPTY(all_cataloguers) else dat += "
" - for(var/G in GLOB.catalogue_data.categories) - var/datum/category_group/group = G + for(var/datum/category_group/group as anything in GLOB.catalogue_data.categories) var/list/group_dat = list() var/show_group = FALSE group_dat += "[group.name]" - for(var/I in group.items) - var/datum/category_item/catalogue/item = I + for(var/datum/category_item/catalogue/item as anything in group.items) if(item.visible || debug) group_dat += "[item.name]" show_group = TRUE diff --git a/code/modules/client/client procs.dm b/code/modules/client/client procs.dm index bd905205f4..f68ddc011d 100644 --- a/code/modules/client/client procs.dm +++ b/code/modules/client/client procs.dm @@ -74,13 +74,12 @@ if(href_list["discord_reg"]) var/their_id = html_decode(href_list["discord_reg"]) var/sane = FALSE - for(var/item in GLOB.pending_discord_registrations) - var/list/L = item + for(var/list/L as anything in GLOB.pending_discord_registrations) if(!islist(L)) - GLOB.pending_discord_registrations -= item + GLOB.pending_discord_registrations -= L continue if(L["ckey"] == ckey && L["id"] == their_id) - GLOB.pending_discord_registrations -= list(item) + GLOB.pending_discord_registrations -= list(L) var/time = L["time"] if((world.realtime - time) > 10 MINUTES) to_chat(src, "Sorry, that link has expired. Please request another on Discord.") diff --git a/code/modules/client/preference_setup/global/02_settings.dm b/code/modules/client/preference_setup/global/02_settings.dm index f213c15a8a..8f047985c7 100644 --- a/code/modules/client/preference_setup/global/02_settings.dm +++ b/code/modules/client/preference_setup/global/02_settings.dm @@ -29,8 +29,7 @@ // Arrange preferences that have never been enabled/disabled. var/list/client_preference_keys = list() - for(var/cp in get_client_preferences()) - var/datum/client_preference/client_pref = cp + for(var/datum/client_preference/client_pref as anything in get_client_preferences()) client_preference_keys += client_pref.key if((client_pref.key in pref.preferences_enabled) || (client_pref.key in pref.preferences_disabled)) continue @@ -57,8 +56,7 @@ . += "Preferences
" . += "" var/mob/pref_mob = preference_mob() - for(var/cp in get_client_preferences()) - var/datum/client_preference/client_pref = cp + for(var/datum/client_preference/client_pref as anything in get_client_preferences()) if(!client_pref.may_toggle(pref_mob)) continue diff --git a/code/modules/client/preference_setup/global/setting_datums.dm b/code/modules/client/preference_setup/global/setting_datums.dm index 24ce8f1d33..7138d28626 100644 --- a/code/modules/client/preference_setup/global/setting_datums.dm +++ b/code/modules/client/preference_setup/global/setting_datums.dm @@ -5,8 +5,7 @@ var/list/_client_preferences_by_type /proc/get_client_preferences() if(!_client_preferences) _client_preferences = list() - for(var/ct in subtypesof(/datum/client_preference)) - var/datum/client_preference/client_type = ct + for(var/datum/client_preference/client_type as anything in subtypesof(/datum/client_preference)) if(initial(client_type.description)) _client_preferences += new client_type() return _client_preferences @@ -21,16 +20,14 @@ var/list/_client_preferences_by_type /proc/get_client_preference_by_key(var/preference) if(!_client_preferences_by_key) _client_preferences_by_key = list() - for(var/ct in get_client_preferences()) - var/datum/client_preference/client_pref = ct + for(var/datum/client_preference/client_pref as anything in get_client_preferences()) _client_preferences_by_key[client_pref.key] = client_pref return _client_preferences_by_key[preference] /proc/get_client_preference_by_type(var/preference) if(!_client_preferences_by_type) _client_preferences_by_type = list() - for(var/ct in get_client_preferences()) - var/datum/client_preference/client_pref = ct + for(var/datum/client_preference/client_pref as anything in get_client_preferences()) _client_preferences_by_type[client_pref.type] = client_pref return _client_preferences_by_type[preference] diff --git a/code/modules/client/preference_setup/loadout/loadout.dm b/code/modules/client/preference_setup/loadout/loadout.dm index e01d5f0b24..f16815d356 100644 --- a/code/modules/client/preference_setup/loadout/loadout.dm +++ b/code/modules/client/preference_setup/loadout/loadout.dm @@ -12,9 +12,8 @@ var/list/gear_datums = list() /hook/startup/proc/populate_gear_list() //create a list of gear datums to sort - for(var/geartype in typesof(/datum/gear)-/datum/gear) - var/datum/gear/G = geartype - if(initial(G.type_category) == geartype) + for(var/datum/gear/G as anything in subtypesof(/datum/gear)) + if(initial(G.type_category) == G) continue var/use_name = initial(G.display_name) var/use_category = initial(G.sort_category) @@ -32,7 +31,7 @@ var/list/gear_datums = list() if(!loadout_categories[use_category]) loadout_categories[use_category] = new /datum/loadout_category(use_category) var/datum/loadout_category/LC = loadout_categories[use_category] - gear_datums[use_name] = new geartype + gear_datums[use_name] = new G LC.gear[use_name] = gear_datums[use_name] loadout_categories = sortAssoc(loadout_categories) diff --git a/code/modules/client/preference_setup/loadout/loadout_accessories.dm b/code/modules/client/preference_setup/loadout/loadout_accessories.dm index b9c446fb87..07c1b7f1be 100644 --- a/code/modules/client/preference_setup/loadout/loadout_accessories.dm +++ b/code/modules/client/preference_setup/loadout/loadout_accessories.dm @@ -13,8 +13,7 @@ /datum/gear/accessory/armband/New() ..() var/list/armbands = list() - for(var/armband in (typesof(/obj/item/clothing/accessory/armband) - typesof(/obj/item/clothing/accessory/armband/med/color))) - var/obj/item/clothing/accessory/armband_type = armband + for(var/obj/item/clothing/accessory/armband_type as anything in (typesof(/obj/item/clothing/accessory/armband) - typesof(/obj/item/clothing/accessory/armband/med/color))) armbands[initial(armband_type.name)] = armband_type gear_tweaks += new/datum/gear_tweak/path(sortAssoc(armbands)) @@ -71,8 +70,7 @@ /datum/gear/accessory/wcoat/New() ..() var/list/wcoats = list() - for(var/wcoat in typesof(/obj/item/clothing/accessory/wcoat)) - var/obj/item/clothing/accessory/wcoat_type = wcoat + for(var/obj/item/clothing/accessory/wcoat_type as anything in typesof(/obj/item/clothing/accessory/wcoat)) wcoats[initial(wcoat_type.name)] = wcoat_type gear_tweaks += new/datum/gear_tweak/path(sortAssoc(wcoats)) @@ -84,8 +82,7 @@ /datum/gear/accessory/holster/New() ..() var/list/holsters = list() - for(var/holster in typesof(/obj/item/clothing/accessory/holster)) - var/obj/item/clothing/accessory/holster_type = holster + for(var/obj/item/clothing/accessory/holster_type as anything in typesof(/obj/item/clothing/accessory/holster)) holsters[initial(holster_type.name)] = holster_type gear_tweaks += new/datum/gear_tweak/path(sortAssoc(holsters)) @@ -97,8 +94,7 @@ /datum/gear/accessory/tie/New() ..() var/list/ties = list() - for(var/tie in typesof(/obj/item/clothing/accessory/tie)) - var/obj/item/clothing/accessory/tie_type = tie + for(var/obj/item/clothing/accessory/tie_type as anything in typesof(/obj/item/clothing/accessory/tie)) ties[initial(tie_type.name)] = tie_type gear_tweaks += new/datum/gear_tweak/path(sortAssoc(ties)) @@ -110,8 +106,7 @@ /datum/gear/accessory/scarf/New() ..() var/list/scarfs = list() - for(var/scarf in typesof(/obj/item/clothing/accessory/scarf)) - var/obj/item/clothing/accessory/scarf_type = scarf + for(var/obj/item/clothing/accessory/scarf_type as anything in typesof(/obj/item/clothing/accessory/scarf)) scarfs[initial(scarf_type.name)] = scarf_type gear_tweaks += new/datum/gear_tweak/path(sortAssoc(scarfs)) @@ -132,8 +127,7 @@ /datum/gear/accessory/jacket/New() ..() var/list/jackets = list() - for(var/jacket in typesof(/obj/item/clothing/accessory/jacket)) - var/obj/item/clothing/accessory/jacket_type = jacket + for(var/obj/item/clothing/accessory/jacket_type as anything in typesof(/obj/item/clothing/accessory/jacket)) jackets[initial(jacket_type.name)] = jacket_type gear_tweaks += new/datum/gear_tweak/path(sortAssoc(jackets)) @@ -179,8 +173,7 @@ /datum/gear/accessory/fannypack/New() ..() var/list/fannys = list() - for(var/fanny in typesof(/obj/item/weapon/storage/belt/fannypack)) - var/obj/item/weapon/storage/belt/fannypack/fanny_type = fanny + for(var/obj/item/weapon/storage/belt/fannypack/fanny_type as anything in typesof(/obj/item/weapon/storage/belt/fannypack)) fannys[initial(fanny_type.name)] = fanny_type gear_tweaks += new/datum/gear_tweak/path(sortAssoc(fannys)) @@ -280,8 +273,7 @@ /datum/gear/accessory/asym/New() ..() var/list/asyms = list() - for(var/asym in typesof(/obj/item/clothing/accessory/asymmetric)) - var/obj/item/clothing/accessory/asymmetric_type = asym + for(var/obj/item/clothing/accessory/asymmetric_type as anything in typesof(/obj/item/clothing/accessory/asymmetric)) asyms[initial(asymmetric_type.name)] = asymmetric_type gear_tweaks += new/datum/gear_tweak/path(sortAssoc(asyms)) diff --git a/code/modules/client/preference_setup/loadout/loadout_general.dm b/code/modules/client/preference_setup/loadout/loadout_general.dm index 719eb6fcfc..8b566fe3c9 100644 --- a/code/modules/client/preference_setup/loadout/loadout_general.dm +++ b/code/modules/client/preference_setup/loadout/loadout_general.dm @@ -53,8 +53,7 @@ /datum/gear/plushie/New() ..() var/list/plushies = list() - for(var/plushie in subtypesof(/obj/item/toy/plushie/) - /obj/item/toy/plushie/therapy) - var/obj/item/toy/plushie/plushie_type = plushie + for(var/obj/item/toy/plushie/plushie_type as anything in subtypesof(/obj/item/toy/plushie) - /obj/item/toy/plushie/therapy) plushies[initial(plushie_type.name)] = plushie_type gear_tweaks += new/datum/gear_tweak/path(sortAssoc(plushies)) @@ -66,8 +65,7 @@ /datum/gear/figure/New() ..() var/list/figures = list() - for(var/figure in typesof(/obj/item/toy/figure/) - /obj/item/toy/figure) - var/obj/item/toy/figure/figure_type = figure + for(var/obj/item/toy/figure/figure_type as anything in subtypesof(/obj/item/toy/figure)) figures[initial(figure_type.name)] = figure_type gear_tweaks += new/datum/gear_tweak/path(sortAssoc(figures)) diff --git a/code/modules/client/preference_setup/loadout/loadout_general_vr.dm b/code/modules/client/preference_setup/loadout/loadout_general_vr.dm index 94739c56bb..9b72d27aba 100644 --- a/code/modules/client/preference_setup/loadout/loadout_general_vr.dm +++ b/code/modules/client/preference_setup/loadout/loadout_general_vr.dm @@ -6,8 +6,7 @@ /datum/gear/ball/New() ..() var/list/balls = list() - for(var/ball in typesof(/obj/item/toy/tennis/)) - var/obj/item/toy/tennis/ball_type = ball + for(var/obj/item/toy/tennis/ball_type as anything in typesof(/obj/item/toy/tennis/)) balls[initial(ball_type.name)] = ball_type gear_tweaks += new/datum/gear_tweak/path(sortAssoc(balls)) @@ -19,8 +18,7 @@ /datum/gear/character/New() ..() var/list/characters = list() - for(var/character in typesof(/obj/item/toy/character/) - /obj/item/toy/character) - var/obj/item/toy/character/character_type = character + for(var/obj/item/toy/character/character_type as anything in subtypesof(/obj/item/toy/character)) characters[initial(character_type.name)] = character_type gear_tweaks += new/datum/gear_tweak/path(sortAssoc(characters)) @@ -32,8 +30,7 @@ /datum/gear/mechtoy/New() ..() var/list/mechs = list() - for(var/mech in typesof(/obj/item/toy/mecha/) - /obj/item/toy/mecha/) - var/obj/item/toy/mecha/mech_type = mech + for(var/obj/item/toy/mecha/mech_type as anything in subtypesof(/obj/item/toy/mecha)) mechs[initial(mech_type.name)] = mech_type gear_tweaks += new/datum/gear_tweak/path(sortAssoc(mechs)) diff --git a/code/modules/client/preference_setup/loadout/loadout_head.dm b/code/modules/client/preference_setup/loadout/loadout_head.dm index ee161f598d..ba7d818dbd 100644 --- a/code/modules/client/preference_setup/loadout/loadout_head.dm +++ b/code/modules/client/preference_setup/loadout/loadout_head.dm @@ -169,8 +169,7 @@ /datum/gear/head/pin/New() ..() var/list/pins = list() - for(var/pin in typesof(/obj/item/clothing/head/pin)) - var/obj/item/clothing/head/pin/pin_type = pin + for(var/obj/item/clothing/head/pin/pin_type as anything in typesof(/obj/item/clothing/head/pin)) pins[initial(pin_type.name)] = pin_type gear_tweaks += new/datum/gear_tweak/path(sortAssoc(pins)) @@ -182,8 +181,7 @@ /datum/gear/head/hardhat/New() ..() var/list/hardhats = list() - for(var/hardhat in typesof(/obj/item/clothing/head/hardhat)) - var/obj/item/clothing/head/hardhat/hardhat_type = hardhat + for(var/obj/item/clothing/head/hardhat/hardhat_type as anything in typesof(/obj/item/clothing/head/hardhat)) hardhats[initial(hardhat_type.name)] = hardhat_type gear_tweaks += new/datum/gear_tweak/path(sortAssoc(hardhats)) @@ -223,8 +221,7 @@ /datum/gear/head/santahat/New() ..() var/list/santahats = list() - for(var/santahat in typesof(/obj/item/clothing/head/santa)) - var/obj/item/clothing/head/santa/santahat_type = santahat + for(var/obj/item/clothing/head/santa/santahat_type as anything in typesof(/obj/item/clothing/head/santa)) santahats[initial(santahat_type.name)] = santahat_type gear_tweaks += new/datum/gear_tweak/path(sortAssoc(santahats)) diff --git a/code/modules/client/preference_setup/loadout/loadout_smoking.dm b/code/modules/client/preference_setup/loadout/loadout_smoking.dm index 96db8bf2fe..f9442518b2 100644 --- a/code/modules/client/preference_setup/loadout/loadout_smoking.dm +++ b/code/modules/client/preference_setup/loadout/loadout_smoking.dm @@ -48,7 +48,6 @@ /datum/gear/cigarettes/New() ..() var/list/cigarettes = list() - for(var/cigarette in (typesof(/obj/item/weapon/storage/fancy/cigarettes) - typesof(/obj/item/weapon/storage/fancy/cigarettes/killthroat))) - var/obj/item/weapon/storage/fancy/cigarettes/cigarette_brand = cigarette + for(var/obj/item/weapon/storage/fancy/cigarettes/cigarette_brand as anything in (typesof(/obj/item/weapon/storage/fancy/cigarettes) - typesof(/obj/item/weapon/storage/fancy/cigarettes/killthroat))) cigarettes[initial(cigarette_brand.name)] = cigarette_brand gear_tweaks += new/datum/gear_tweak/path(sortAssoc(cigarettes)) diff --git a/code/modules/client/preference_setup/loadout/loadout_uniform.dm b/code/modules/client/preference_setup/loadout/loadout_uniform.dm index 4d9e530992..5b7bc83757 100644 --- a/code/modules/client/preference_setup/loadout/loadout_uniform.dm +++ b/code/modules/client/preference_setup/loadout/loadout_uniform.dm @@ -16,8 +16,7 @@ /datum/gear/uniform/cheongsam/New() ..() var/list/cheongasms = list() - for(var/cheongasm in typesof(/obj/item/clothing/under/cheongsam)) - var/obj/item/clothing/under/cheongsam/cheongasm_type = cheongasm + for(var/obj/item/clothing/under/cheongsam/cheongasm_type as anything in typesof(/obj/item/clothing/under/cheongsam)) cheongasms[initial(cheongasm_type.name)] = cheongasm_type gear_tweaks += new/datum/gear_tweak/path(sortAssoc(cheongasms)) @@ -28,8 +27,7 @@ /datum/gear/uniform/croptop/New() ..() var/list/croptops = list() - for(var/croptop in typesof(/obj/item/clothing/under/croptop)) - var/obj/item/clothing/under/croptop/croptop_type = croptop + for(var/obj/item/clothing/under/croptop/croptop_type as anything in typesof(/obj/item/clothing/under/croptop)) croptops[initial(croptop_type.name)] = croptop_type gear_tweaks += new/datum/gear_tweak/path(sortAssoc(croptops)) @@ -52,8 +50,7 @@ /datum/gear/uniform/jumpsuit/New() ..() var/list/jumpclothes = list() - for(var/jump in typesof(/obj/item/clothing/under/color)) - var/obj/item/clothing/under/color/jumps = jump + for(var/obj/item/clothing/under/color/jumps as anything in typesof(/obj/item/clothing/under/color)) jumpclothes[initial(jumps.name)] = jumps gear_tweaks += new/datum/gear_tweak/path(sortAssoc(jumpclothes)) @@ -78,8 +75,7 @@ /datum/gear/uniform/pants/New() ..() var/list/pants = list() - for(var/pant in typesof(/obj/item/clothing/under/pants)) - var/obj/item/clothing/under/pants/pant_type = pant + for(var/obj/item/clothing/under/pants/pant_type as anything in typesof(/obj/item/clothing/under/pants)) pants[initial(pant_type.name)] = pant_type gear_tweaks += new/datum/gear_tweak/path(sortAssoc(pants)) @@ -90,8 +86,7 @@ /datum/gear/uniform/shorts/New() ..() var/list/shorts = list() - for(var/short in typesof(/obj/item/clothing/under/shorts)) - var/obj/item/clothing/under/pants/short_type = short + for(var/obj/item/clothing/under/pants/short_type as anything in typesof(/obj/item/clothing/under/shorts)) shorts[initial(short_type.name)] = short_type gear_tweaks += new/datum/gear_tweak/path(sortAssoc(shorts)) @@ -212,8 +207,7 @@ /datum/gear/uniform/suit/lawyer/New() ..() var/list/lsuits = list() - for(var/lsuit in typesof(/obj/item/clothing/under/lawyer)) - var/obj/item/clothing/suit/lsuit_type = lsuit + for(var/obj/item/clothing/suit/lsuit_type as anything in typesof(/obj/item/clothing/under/lawyer)) lsuits[initial(lsuit_type.name)] = lsuit_type gear_tweaks += new/datum/gear_tweak/path(sortAssoc(lsuits)) @@ -273,8 +267,7 @@ /datum/gear/uniform/scrub/New() ..() var/list/scrubs = list() - for(var/scrub in typesof(/obj/item/clothing/under/rank/medical/scrubs)) - var/obj/item/clothing/under/rank/medical/scrubs/scrub_type = scrub + for(var/obj/item/clothing/under/rank/medical/scrubs/scrub_type as anything in typesof(/obj/item/clothing/under/rank/medical/scrubs)) scrubs[initial(scrub_type.name)] = scrub_type gear_tweaks += new/datum/gear_tweak/path(sortAssoc(scrubs)) @@ -396,8 +389,7 @@ /datum/gear/uniform/dresses/maid/New() ..() var/list/maids = list() - for(var/maid in typesof(/obj/item/clothing/under/dress/maid)) - var/obj/item/clothing/under/dress/maid/maid_type = maid + for(var/obj/item/clothing/under/dress/maid/maid_type as anything in typesof(/obj/item/clothing/under/dress/maid)) maids[initial(maid_type.name)] = maid_type gear_tweaks += new/datum/gear_tweak/path(sortAssoc(maids)) diff --git a/code/modules/client/preference_setup/loadout/loadout_uniform_vr.dm b/code/modules/client/preference_setup/loadout/loadout_uniform_vr.dm index a165232e1a..448b7747e4 100644 --- a/code/modules/client/preference_setup/loadout/loadout_uniform_vr.dm +++ b/code/modules/client/preference_setup/loadout/loadout_uniform_vr.dm @@ -183,8 +183,7 @@ Swimsuits /datum/gear/uniform/swimsuits/New() ..() var/list/swimsuits = list() - for(var/swimsuit in typesof(/obj/item/weapon/storage/box/fluff/swimsuit)) - var/obj/item/weapon/storage/box/fluff/swimsuit/swimsuit_type = swimsuit + for(var/obj/item/weapon/storage/box/fluff/swimsuit/swimsuit_type as anything in typesof(/obj/item/weapon/storage/box/fluff/swimsuit)) swimsuits[initial(swimsuit_type.name)] = swimsuit_type gear_tweaks += new/datum/gear_tweak/path(sortAssoc(swimsuits)) diff --git a/code/modules/client/preference_setup/loadout/loadout_utility.dm b/code/modules/client/preference_setup/loadout/loadout_utility.dm index 4798a4b994..d185ca2608 100644 --- a/code/modules/client/preference_setup/loadout/loadout_utility.dm +++ b/code/modules/client/preference_setup/loadout/loadout_utility.dm @@ -21,8 +21,7 @@ /datum/gear/utility/communicator/New() ..() var/list/communicators = list() - for(var/communicator in typesof(/obj/item/device/communicator) - list(/obj/item/device/communicator/integrated,/obj/item/device/communicator/commlink)) //VOREStation Edit - Remove Commlink - var/obj/item/device/communicator_type = communicator + for(var/obj/item/device/communicator_type as anything in typesof(/obj/item/device/communicator) - list(/obj/item/device/communicator/integrated,/obj/item/device/communicator/commlink)) //VOREStation Edit - Remove Commlink communicators[initial(communicator_type.name)] = communicator_type gear_tweaks += new/datum/gear_tweak/path(sortAssoc(communicators)) diff --git a/code/modules/client/preferences_spawnpoints.dm b/code/modules/client/preferences_spawnpoints.dm index 06f7aa5e06..455be8a8b8 100644 --- a/code/modules/client/preferences_spawnpoints.dm +++ b/code/modules/client/preferences_spawnpoints.dm @@ -2,7 +2,7 @@ var/list/spawntypes = list() /proc/populate_spawn_points() spawntypes = list() - for(var/type in typesof(/datum/spawnpoint)-/datum/spawnpoint) + for(var/type in subtypesof(/datum/spawnpoint)) var/datum/spawnpoint/S = new type() spawntypes[S.display_name] = S diff --git a/code/modules/clothing/chameleon.dm b/code/modules/clothing/chameleon.dm index c0cde563a8..a69eee2e7f 100644 --- a/code/modules/clothing/chameleon.dm +++ b/code/modules/clothing/chameleon.dm @@ -24,15 +24,14 @@ . = list() var/i = 1 //in case there is a collision with both name AND icon_state - for(var/typepath in typesof(basetype) - blacklist) - var/obj/O = typepath + for(var/obj/O as anything in typesof(basetype) - blacklist) if(initial(O.icon) && initial(O.icon_state)) var/name = initial(O.name) if(name in .) name += " ([initial(O.icon_state)])" if(name in .) name += " \[[i++]\]" - .[name] = typepath + .[name] = O /obj/item/clothing/under/chameleon //starts off as black diff --git a/code/modules/clothing/clothing.dm b/code/modules/clothing/clothing.dm index c6f0ddee71..bf81706f3f 100644 --- a/code/modules/clothing/clothing.dm +++ b/code/modules/clothing/clothing.dm @@ -16,13 +16,6 @@ var/list/enables_planes //Enables these planes in the wearing mob's plane_holder var/list/plane_slots //But only if it's equipped into this specific slot - /* - Sprites used when the clothing item is refit. This is done by setting icon_override. - For best results, if this is set then sprite_sheets should be null and vice versa, but that is by no means necessary. - Ideally, sprite_sheets_refit should be used for "hard" clothing items that can't change shape very well to fit the wearer (e.g. helmets, hardsuits), - while sprite_sheets should be used for "flexible" clothing items that do not need to be refitted (e.g. aliens wearing jumpsuits). - */ - var/list/sprite_sheets_refit = null var/ear_protection = 0 var/blood_sprite_state @@ -163,9 +156,6 @@ species_restricted = list(target_species) //Set icon - if (sprite_sheets_refit && (target_species in sprite_sheets_refit)) - LAZYSET(sprite_sheets, target_species, sprite_sheets_refit[target_species]) - if (sprite_sheets_obj && (target_species in sprite_sheets_obj)) icon = sprite_sheets_obj[target_species] else @@ -211,9 +201,6 @@ species_restricted = list(target_species) //Set icon - if (sprite_sheets_refit && (target_species in sprite_sheets_refit)) - LAZYSET(sprite_sheets, target_species, sprite_sheets_refit[target_species]) - if (sprite_sheets_obj && (target_species in sprite_sheets_obj)) icon = sprite_sheets_obj[target_species] else diff --git a/code/modules/clothing/clothing_accessories.dm b/code/modules/clothing/clothing_accessories.dm index d7415c4a75..c67d63e6a8 100644 --- a/code/modules/clothing/clothing_accessories.dm +++ b/code/modules/clothing/clothing_accessories.dm @@ -9,8 +9,7 @@ //Find all consumed slots var/consumed_slots = 0 - for(var/thing in accessories) - var/obj/item/clothing/accessory/AC = thing + for(var/obj/item/clothing/accessory/AC as anything in accessories) consumed_slots |= AC.slot //Mask to just consumed restricted diff --git a/code/modules/clothing/head/pilot_helmet.dm b/code/modules/clothing/head/pilot_helmet.dm index f2c3956e47..590cba4dd1 100644 --- a/code/modules/clothing/head/pilot_helmet.dm +++ b/code/modules/clothing/head/pilot_helmet.dm @@ -166,8 +166,7 @@ I.color = newcolor /obj/item/clothing/head/pilot/Destroy() - for(var/img in raw_images) - var/image/I = img + for(var/image/I as anything in raw_images) I.loc = null shuttle_comp = null qdel(pilot_hud) diff --git a/code/modules/clothing/spacesuits/void/ert_vr.dm b/code/modules/clothing/spacesuits/void/ert_vr.dm index 6dd1c3b7d4..0393b4ecf7 100644 --- a/code/modules/clothing/spacesuits/void/ert_vr.dm +++ b/code/modules/clothing/spacesuits/void/ert_vr.dm @@ -239,4 +239,3 @@ SPECIES_ALRAUNE = 'icons/inventory/head/item_vr.dmi', SPECIES_ZADDAT = 'icons/inventory/head/item_vr.dmi' ) - sprite_sheets_refit = list() //have to nullify this as well just to be thorough diff --git a/code/modules/clothing/spacesuits/void/void.dm b/code/modules/clothing/spacesuits/void/void.dm index 9d1f4e7c90..a47fd885cd 100644 --- a/code/modules/clothing/spacesuits/void/void.dm +++ b/code/modules/clothing/spacesuits/void/void.dm @@ -14,18 +14,8 @@ //Species-specific stuff. species_restricted = list("Human", "Promethean") - sprite_sheets_refit = list( - SPECIES_UNATHI = 'icons/inventory/head/mob_unathi.dmi', - SPECIES_TAJ = 'icons/inventory/head/mob_tajaran.dmi', - SPECIES_SKRELL = 'icons/inventory/head/mob_skrell.dmi' - //Teshari have a general sprite sheet defined in modules/clothing/clothing.dm - ) - sprite_sheets_obj = list( - SPECIES_UNATHI = 'icons/inventory/head/item_unathi.dmi', - SPECIES_TAJ = 'icons/inventory/head/item_tajaran.dmi', - SPECIES_SKRELL = 'icons/inventory/head/item_skrell.dmi', - SPECIES_TESHARI = 'icons/inventory/head/item_teshari.dmi' - ) + sprite_sheets = VR_SPECIES_SPRITE_SHEETS_HEAD_MOB + sprite_sheets_obj = VR_SPECIES_SPRITE_SHEETS_HEAD_ITEM light_overlay = "helmet_light" var/no_cycle = FALSE //stop this item from being put in a cycler @@ -44,18 +34,8 @@ max_pressure_protection = 10 * ONE_ATMOSPHERE species_restricted = list("Human", SPECIES_SKRELL, "Promethean") - sprite_sheets_refit = list( - SPECIES_UNATHI = 'icons/inventory/suit/mob_unathi.dmi', - SPECIES_TAJ = 'icons/inventory/suit/mob_tajaran.dmi', - SPECIES_SKRELL = 'icons/inventory/suit/mob_skrell.dmi' - //Teshari have a general sprite sheet defined in modules/clothing/clothing.dm - ) - sprite_sheets_obj = list( - SPECIES_UNATHI = 'icons/inventory/suit/item_unathi.dmi', - SPECIES_TAJ = 'icons/inventory/suit/item_tajaran.dmi', - SPECIES_SKRELL = 'icons/inventory/suit/item_skrell.dmi', - SPECIES_TESHARI = 'icons/inventory/suit/item_teshari.dmi' - ) + sprite_sheets = VR_SPECIES_SPRITE_SHEETS_SUIT_MOB + sprite_sheets_obj = VR_SPECIES_SPRITE_SHEETS_SUIT_ITEM //Breach thresholds, should ideally be inherited by most (if not all) voidsuits. //With 0.2 resiliance, will reach 10 breach damage after 3 laser carbine blasts or 8 smg hits. diff --git a/code/modules/clothing/spacesuits/void/void_vr.dm b/code/modules/clothing/spacesuits/void/void_vr.dm index eb78925427..57774c8d2d 100644 --- a/code/modules/clothing/spacesuits/void/void_vr.dm +++ b/code/modules/clothing/spacesuits/void/void_vr.dm @@ -7,20 +7,10 @@ /obj/item/clothing/head/helmet/space/void species_restricted = list(SPECIES_HUMAN, SPECIES_RAPALA, SPECIES_VASILISSAN, SPECIES_ALRAUNE, SPECIES_PROMETHEAN, SPECIES_XENOCHIMERA) - sprite_sheets = VR_SPECIES_SPRITE_SHEETS_HEAD_MOB - sprite_sheets_obj = VR_SPECIES_SPRITE_SHEETS_HEAD_ITEM /obj/item/clothing/suit/space/void species_restricted = list(SPECIES_HUMAN, SPECIES_SKRELL, SPECIES_RAPALA, SPECIES_VASILISSAN, SPECIES_ALRAUNE, SPECIES_PROMETHEAN, SPECIES_XENOCHIMERA) - sprite_sheets = VR_SPECIES_SPRITE_SHEETS_SUIT_MOB - sprite_sheets_obj = VR_SPECIES_SPRITE_SHEETS_SUIT_ITEM - // This is a hack to prevent the item_state variable on the suits from taking effect - // when the item is equipped in outer clothing slot. - // This variable is normally used to set the icon_override when the suit is refitted, - // however the species spritesheet now means we no longer need that anyway! - sprite_sheets_refit = list() - /obj/item/clothing/head/helmet/space/void/heck name = "\improper H.E.C.K. helmet" desc = "Hostile Environiment Cross-Kinetic Helmet: A helmet designed to withstand the wide variety of hazards from \[REDACTED\]. It wasn't enough for its last owner." @@ -106,7 +96,6 @@ default_worn_icon = 'icons/inventory/suit/mob_vr.dmi' sprite_sheets = ALL_VR_SPRITE_SHEETS_SUIT_MOB sprite_sheets_obj = null - sprite_sheets_refit = null /obj/item/clothing/suit/space/void/autolok/Initialize() . = ..() @@ -162,4 +151,3 @@ default_worn_icon = 'icons/inventory/head/mob_vr.dmi' sprite_sheets = ALL_VR_SPRITE_SHEETS_HEAD_MOB sprite_sheets_obj = null - sprite_sheets_refit = null diff --git a/code/modules/clothing/spacesuits/void/wizard.dm b/code/modules/clothing/spacesuits/void/wizard.dm index 7dab89d1d7..bcef9752ac 100644 --- a/code/modules/clothing/spacesuits/void/wizard.dm +++ b/code/modules/clothing/spacesuits/void/wizard.dm @@ -7,7 +7,6 @@ unacidable = TRUE //No longer shall our kind be foiled by lone chemists with spray bottles! armor = list(melee = 40, bullet = 20, laser = 20,energy = 20, bomb = 35, bio = 100, rad = 60) siemens_coefficient = 0.7 - sprite_sheets_refit = null sprite_sheets_obj = null wizard_garb = 1 @@ -20,6 +19,5 @@ unacidable = TRUE armor = list(melee = 40, bullet = 20, laser = 20,energy = 20, bomb = 35, bio = 100, rad = 60) siemens_coefficient = 0.7 - sprite_sheets_refit = null sprite_sheets_obj = null wizard_garb = 1 diff --git a/code/modules/economy/economy_misc.dm b/code/modules/economy/economy_misc.dm index a44c7c03fd..1b029ac74a 100644 --- a/code/modules/economy/economy_misc.dm +++ b/code/modules/economy/economy_misc.dm @@ -60,7 +60,7 @@ var/global/economy_init = 0 news_network.CreateFeedChannel("The Gibson Gazette", "Editor Mike Hammers", 1, 1) news_network.CreateFeedChannel("Oculum Content Aggregator", "Oculus v6rev7", 1, 1) - for(var/loc_type in typesof(/datum/trade_destination) - /datum/trade_destination) + for(var/loc_type in subtypesof(/datum/trade_destination)) var/datum/trade_destination/D = new loc_type weighted_randomevent_locations[D] = D.viable_random_events.len weighted_mundaneevent_locations[D] = D.mundane_probability diff --git a/code/modules/emotes/emote_mob.dm b/code/modules/emotes/emote_mob.dm index 2003fac6d6..7516be2eff 100644 --- a/code/modules/emotes/emote_mob.dm +++ b/code/modules/emotes/emote_mob.dm @@ -194,8 +194,7 @@ var/list/m_viewers = in_range["mobs"] var/list/o_viewers = in_range["objs"] - for(var/mob in m_viewers) - var/mob/M = mob + for(var/mob/M as anything in m_viewers) spawn(0) // It's possible that it could be deleted in the meantime, or that it runtimes. if(M) if(isobserver(M)) @@ -203,8 +202,7 @@ M.show_message(message, m_type) M.create_chat_message(src, "[runemessage]", FALSE, list("emote"), (m_type == AUDIBLE_MESSAGE)) - for(var/obj in o_viewers) - var/obj/O = obj + for(var/obj/O as anything in o_viewers) spawn(0) if(O) O.see_emote(src, message, m_type) diff --git a/code/modules/entopics_vr/alternate_appearance.dm b/code/modules/entopics_vr/alternate_appearance.dm index 4fd7d31ed0..42b6d697f9 100644 --- a/code/modules/entopics_vr/alternate_appearance.dm +++ b/code/modules/entopics_vr/alternate_appearance.dm @@ -24,8 +24,7 @@ /datum/alternate_appearance/proc/display_to(list/displayTo) if(!displayTo || !displayTo.len) return - for(var/m in displayTo) - var/mob/M = m + for(var/mob/M as anything in displayTo) if(!M.viewing_alternate_appearances) M.viewing_alternate_appearances = list() viewers |= M @@ -42,8 +41,7 @@ if(hideFrom) hiding = hideFrom - for(var/m in hiding) - var/mob/M = m + for(var/mob/M as anything in hiding) if(M.client) M.client.images -= img if(M.viewing_alternate_appearances && M.viewing_alternate_appearances.len) diff --git a/code/modules/entopics_vr/entopics.dm b/code/modules/entopics_vr/entopics.dm index 1e146e0c05..a3ea9e35ab 100644 --- a/code/modules/entopics_vr/entopics.dm +++ b/code/modules/entopics_vr/entopics.dm @@ -77,8 +77,7 @@ var/global/list/alt_farmanimals = list() registered = TRUE entopic_images += my_image - for(var/m in entopic_users) - var/mob/M = m + for(var/mob/M as anything in entopic_users) if(M.client) M.client.images += my_image @@ -88,8 +87,7 @@ var/global/list/alt_farmanimals = list() registered = FALSE entopic_images -= my_image - for(var/m in entopic_users) - var/mob/M = m + for(var/mob/M as anything in entopic_users) if(M.client) M.client.images -= my_image diff --git a/code/modules/events/carp_migration.dm b/code/modules/events/carp_migration.dm index 77612bbd25..fcbd1d951b 100644 --- a/code/modules/events/carp_migration.dm +++ b/code/modules/events/carp_migration.dm @@ -79,8 +79,7 @@ // Counts living carp spawned by this event. /datum/event/carp_migration/proc/count_spawned_carps() . = 0 - for(var/I in spawned_carp) - var/mob/living/simple_mob/animal/M = I + for(var/mob/living/simple_mob/animal/M as anything in spawned_carp) if(!QDELETED(M) && M.stat != DEAD) . += 1 diff --git a/code/modules/events/grubinfestation_vr.dm b/code/modules/events/grubinfestation_vr.dm index 685d59f3f2..8dcf1a20b1 100644 --- a/code/modules/events/grubinfestation_vr.dm +++ b/code/modules/events/grubinfestation_vr.dm @@ -32,8 +32,7 @@ /datum/event/grub_infestation/end() var/list/area_names = list() - for(var/grub in existing_solargrubs) - var/mob/living/G = grub + for(var/mob/living/G as anything in existing_solargrubs) if(!G || G.stat == DEAD) continue var/area/grub_area = get_area(G) diff --git a/code/modules/events/supply_demand_vr.dm b/code/modules/events/supply_demand_vr.dm index 64d402c443..6e229e1b48 100644 --- a/code/modules/events/supply_demand_vr.dm +++ b/code/modules/events/supply_demand_vr.dm @@ -252,7 +252,7 @@ // /datum/event/supply_demand/proc/choose_food_items(var/differentTypes) - var/list/types = typesof(/datum/recipe) - /datum/recipe + var/list/types = subtypesof(/datum/recipe) for(var/i in 1 to differentTypes) var/datum/recipe/R = pick(types) types -= R // Don't pick the same thing twice @@ -262,7 +262,7 @@ return /datum/event/supply_demand/proc/choose_research_items(var/differentTypes) - var/list/types = typesof(/datum/design) - /datum/design + var/list/types = subtypesof(/datum/design) for(var/i in 1 to differentTypes) var/datum/design/D = pick(types) types -= D // Don't pick the same thing twice @@ -327,7 +327,7 @@ return /datum/event/supply_demand/proc/choose_alloy_items(var/differentTypes) - var/list/types = typesof(/datum/alloy) - /datum/alloy + var/list/types = subtypesof(/datum/alloy) for(var/i in 1 to differentTypes) var/datum/alloy/A = pick(types) types -= A // Don't pick the same thing twice diff --git a/code/modules/food/food/lunch.dm b/code/modules/food/food/lunch.dm index 6bbd434e43..81e75fa254 100644 --- a/code/modules/food/food/lunch.dm +++ b/code/modules/food/food/lunch.dm @@ -106,9 +106,8 @@ var/list/lunchables_ethanol_reagents_ = list(/datum/reagent/ethanol/acid_spit, /proc/init_lunchable_list(var/list/lunches) . = list() - for(var/lunch in lunches) - var/obj/O = lunch - .[initial(O.name)] = lunch + for(var/obj/O as anything in lunches) + .[initial(O.name)] = O return sortAssoc(.) /proc/init_lunchable_reagent_list(var/list/banned_reagents, var/reagent_types) diff --git a/code/modules/food/food/snacks.dm b/code/modules/food/food/snacks.dm index d1ef64d081..4b78169387 100644 --- a/code/modules/food/food/snacks.dm +++ b/code/modules/food/food/snacks.dm @@ -4155,8 +4155,7 @@ //Calculate the reagents of the coating needed var/req = 0 - for (var/r in reagents.reagent_list) - var/datum/reagent/R = r + for(var/datum/reagent/R as anything in reagents.reagent_list) if (istype(R, /datum/reagent/nutriment)) req += R.volume * 0.2 else @@ -4238,8 +4237,7 @@ if (do_coating_prefix == 1) name = "[coating.coated_adj] [name]" - for (var/r in reagents.reagent_list) - var/datum/reagent/R = r + for(var/datum/reagent/R as anything in reagents.reagent_list) if (istype(R, /datum/reagent/nutriment/coating)) var/datum/reagent/nutriment/coating/C = R C.data["cooked"] = 1 diff --git a/code/modules/food/kitchen/cooking_machines/_appliance.dm b/code/modules/food/kitchen/cooking_machines/_appliance.dm index db3025f961..8847e99580 100644 --- a/code/modules/food/kitchen/cooking_machines/_appliance.dm +++ b/code/modules/food/kitchen/cooking_machines/_appliance.dm @@ -53,14 +53,12 @@ if (!available_recipes) available_recipes = new - for(var/type in subtypesof(/datum/recipe)) - var/datum/recipe/test = type + for(var/datum/recipe/test as anything in subtypesof(/datum/recipe)) if((appliancetype & initial(test.appliance))) available_recipes += new test /obj/machinery/appliance/Destroy() - for (var/a in cooking_objs) - var/datum/cooking_item/CI = a + for(var/datum/cooking_item/CI as anything in cooking_objs) qdel(CI.container)//Food is fragile, it probably doesnt survive the destruction of the machine cooking_objs -= CI qdel(CI) @@ -74,8 +72,7 @@ /obj/machinery/appliance/proc/list_contents(var/mob/user) if (cooking_objs.len) var/string = "Contains..." - for (var/a in cooking_objs) - var/datum/cooking_item/CI = a + for(var/datum/cooking_item/CI as anything in cooking_objs) string += "-\a [CI.container.label(null, CI.combine_target)], [report_progress(CI)]
" return string else @@ -343,8 +340,7 @@ for (var/obj/item/J in CI.container) cookwork_by_item(J, CI) - for (var/r in CI.container.reagents.reagent_list) - var/datum/reagent/R = r + for(var/datum/reagent/R as anything in CI.container.reagents.reagent_list) if (istype(R, /datum/reagent/nutriment)) CI.max_cookwork += R.volume *2//Added reagents contribute less than those in food items due to granular form @@ -373,8 +369,7 @@ var/work = 0 if (istype(S)) if (S.reagents) - for (var/r in S.reagents.reagent_list) - var/datum/reagent/R = r + for(var/datum/reagent/R as anything in S.reagents.reagent_list) if (istype(R, /datum/reagent/nutriment)) work += R.volume *3//Core nutrients contribute much more than peripheral chemicals @@ -463,8 +458,7 @@ results += TR - for (var/r in results) - var/obj/item/weapon/reagent_containers/food/snacks/R = r + for(var/obj/item/weapon/reagent_containers/food/snacks/R as anything in results) R.forceMove(C) //Move everything from the buffer back to the container R.cooked |= cook_type @@ -608,8 +602,7 @@ /obj/machinery/appliance/proc/removal_menu(var/mob/user) if (can_remove_items(user)) var/list/menuoptions = list() - for (var/a in cooking_objs) - var/datum/cooking_item/CI = a + for(var/datum/cooking_item/CI as anything in cooking_objs) if (CI.container) menuoptions[CI.container.label(menuoptions.len)] = CI diff --git a/code/modules/food/kitchen/cooking_machines/_mixer.dm b/code/modules/food/kitchen/cooking_machines/_mixer.dm index 24b0371cfd..7d18865167 100644 --- a/code/modules/food/kitchen/cooking_machines/_mixer.dm +++ b/code/modules/food/kitchen/cooking_machines/_mixer.dm @@ -80,8 +80,7 @@ fundamental differences /obj/machinery/appliance/mixer/removal_menu(var/mob/user) if (can_remove_items(user)) var/list/menuoptions = list() - for (var/a in cooking_objs) - var/datum/cooking_item/CI = a + for(var/datum/cooking_item/CI as anything in cooking_objs) if (CI.container) if (!CI.container.check_contents()) to_chat(user, "There's nothing in [src] you can remove!") diff --git a/code/modules/food/kitchen/microwave.dm b/code/modules/food/kitchen/microwave.dm index ce1eddfbf2..f7c7194e9f 100644 --- a/code/modules/food/kitchen/microwave.dm +++ b/code/modules/food/kitchen/microwave.dm @@ -1,630 +1,618 @@ -/obj/machinery/microwave - name = "Microwave" - desc = "Studies are inconclusive on whether pressing your face against the glass is harmful." - icon = 'icons/obj/kitchen.dmi' - icon_state = "mw" - layer = 2.9 - density = TRUE - anchored = TRUE - use_power = USE_POWER_IDLE - idle_power_usage = 5 - active_power_usage = 2000 - clicksound = "button" - clickvol = "30" - flags = OPENCONTAINER | NOREACT - circuit = /obj/item/weapon/circuitboard/microwave - var/operating = 0 // Is it on? - var/dirty = 0 // = {0..100} Does it need cleaning? - var/broken = 0 // ={0,1,2} How broken is it??? - var/circuit_item_capacity = 1 //how many items does the circuit add to max number of items - var/item_level = 0 // items microwave can handle, 0 foodstuff, 1 materials - var/global/list/acceptable_items // List of the items you can put in - var/global/list/available_recipes // List of the recipes you can use - var/global/list/acceptable_reagents // List of the reagents you can put in - - var/global/max_n_of_items = 20 - var/appliancetype = MICROWAVE - var/datum/looping_sound/microwave/soundloop - - -//see code/modules/food/recipes_microwave.dm for recipes - -/******************* -* Initialising -********************/ - -/obj/machinery/microwave/Initialize() - . = ..() - - reagents = new/datum/reagents(100) - reagents.my_atom = src - - default_apply_parts() - - if(!available_recipes) - available_recipes = new -<<<<<<< HEAD - for(var/T in (typesof(/datum/recipe)-/datum/recipe)) - var/datum/recipe/type = T - if((initial(type.appliance) & appliancetype)) - available_recipes += new type -||||||| parent of 70cccc775a... Merge pull request #11192 from VOREStation/Arokha/hmm - for(var/datum/recipe/type as anything in subtypesof(/datum/recipe)) - if((initial(type.appliance) & appliancetype)) - available_recipes += new type -======= - for(var/datum/recipe/typepath as anything in subtypesof(/datum/recipe)) - if((initial(typepath.appliance) & appliancetype)) - available_recipes += new typepath ->>>>>>> 70cccc775a... Merge pull request #11192 from VOREStation/Arokha/hmm - - acceptable_items = new - acceptable_reagents = new - for (var/datum/recipe/recipe in available_recipes) - for (var/item in recipe.items) - acceptable_items |= item - for (var/reagent in recipe.reagents) - acceptable_reagents |= reagent - // This will do until I can think of a fun recipe to use dionaea in - - // will also allow anything using the holder item to be microwaved into - // impure carbon. ~Z - acceptable_items |= /obj/item/weapon/holder - acceptable_items |= /obj/item/weapon/reagent_containers/food/snacks/grown - acceptable_items |= /obj/item/device/soulstone - acceptable_items |= /obj/item/weapon/fuel_assembly/supermatter - - soundloop = new(list(src), FALSE) - -/obj/machinery/microwave/Destroy() - QDEL_NULL(soundloop) - return ..() - -/******************* -* Item Adding -********************/ - -/obj/machinery/microwave/attackby(var/obj/item/O as obj, var/mob/user as mob) - if(src.broken > 0) - if(src.broken == 2 && O.is_screwdriver()) // If it's broken and they're using a screwdriver - user.visible_message( \ - "\The [user] starts to fix part of the microwave.", \ - "You start to fix part of the microwave." \ - ) - playsound(src, O.usesound, 50, 1) - if (do_after(user,20 * O.toolspeed)) - user.visible_message( \ - "\The [user] fixes part of the microwave.", \ - "You have fixed part of the microwave." \ - ) - src.broken = 1 // Fix it a bit - else if(src.broken == 1 && O.is_wrench()) // If it's broken and they're doing the wrench - user.visible_message( \ - "\The [user] starts to fix part of the microwave.", \ - "You start to fix part of the microwave." \ - ) - if (do_after(user,20 * O.toolspeed)) - user.visible_message( \ - "\The [user] fixes the microwave.", \ - "You have fixed the microwave." \ - ) - src.icon_state = "mw" - src.broken = 0 // Fix it! - src.dirty = 0 // just to be sure - src.flags = OPENCONTAINER | NOREACT - else - to_chat(user, "It's broken!") - return 1 - - else if(src.dirty==100) // The microwave is all dirty so can't be used! - if(istype(O, /obj/item/weapon/reagent_containers/spray/cleaner) || istype(O, /obj/item/weapon/soap)) // If they're trying to clean it then let them - user.visible_message( \ - "\The [user] starts to clean the microwave.", \ - "You start to clean the microwave." \ - ) - if (do_after(user,20)) - user.visible_message( \ - "\The [user] has cleaned the microwave.", \ - "You have cleaned the microwave." \ - ) - src.dirty = 0 // It's clean! - src.broken = 0 // just to be sure - src.icon_state = "mw" - src.flags = OPENCONTAINER | NOREACT - SStgui.update_uis(src) - else //Otherwise bad luck!! - to_chat(user, "It's dirty!") - return 1 - else if(is_type_in_list(O,acceptable_items)) - if(contents.len>=(max_n_of_items + component_parts.len + circuit_item_capacity)) //Adds component_parts to the maximum number of items. changed 1 to actually just be the circuit item capacity var. - to_chat(user, "This [src] is full of ingredients, you cannot put more.") - return 1 - if(istype(O, /obj/item/stack) && O:get_amount() > 1) // This is bad, but I can't think of how to change it - var/obj/item/stack/S = O - new O.type (src) - S.use(1) - user.visible_message( \ - "\The [user] has added one of [O] to \the [src].", \ - "You add one of [O] to \the [src].") - return - else - // user.remove_from_mob(O) //This just causes problems so far as I can tell. -Pete - Man whoever you are, it's been years. o7 - user.drop_from_inventory(O,src) - user.visible_message( \ - "\The [user] has added \the [O] to \the [src].", \ - "You add \the [O] to \the [src].") - SStgui.update_uis(src) - return - else if(istype(O,/obj/item/weapon/reagent_containers/glass) || \ - istype(O,/obj/item/weapon/reagent_containers/food/drinks) || \ - istype(O,/obj/item/weapon/reagent_containers/food/condiment) \ - ) - if (!O.reagents) - return 1 - for (var/datum/reagent/R in O.reagents.reagent_list) - if (!(R.id in acceptable_reagents)) - to_chat(user, "Your [O] contains components unsuitable for cookery.") - return 1 - return - else if(istype(O,/obj/item/weapon/grab)) - var/obj/item/weapon/grab/G = O - to_chat(user, "This is ridiculous. You can not fit \the [G.affecting] in this [src].") - return 1 - else if(O.is_screwdriver()) - default_deconstruction_screwdriver(user, O) - return - else if(O.is_crowbar()) - if(default_deconstruction_crowbar(user, O)) - return - else - user.visible_message( \ - "\The [user] begins [src.anchored ? "unsecuring" : "securing"] the microwave.", \ - "You attempt to [src.anchored ? "unsecure" : "secure"] the microwave." - ) - if (do_after(user,20/O.toolspeed)) - user.visible_message( \ - "\The [user] [src.anchored ? "unsecures" : "secures"] the microwave.", \ - "You [src.anchored ? "unsecure" : "secure"] the microwave." - ) - src.anchored = !src.anchored - else - to_chat(user, "You decide not to do that.") - else if(default_part_replacement(user, O)) - return - else - to_chat(user, "You have no idea what you can cook with this [O].") - ..() - SStgui.update_uis(src) - -/obj/machinery/microwave/tgui_state(mob/user) - return GLOB.tgui_physical_state - -/obj/machinery/microwave/attack_ai(mob/user as mob) - attack_hand(user) - -/obj/machinery/microwave/attack_hand(mob/user as mob) - user.set_machine(src) - tgui_interact(user) - -/******************* -* Microwave Menu -********************/ -/obj/machinery/microwave/tgui_interact(mob/user, datum/tgui/ui) - ui = SStgui.try_update_ui(user, src, ui) - if(!ui) - ui = new(user, src, "Microwave", name) - ui.open() - -/obj/machinery/microwave/tgui_data(mob/user, datum/tgui/ui, datum/tgui_state/state) - var/list/data = ..() - - data["broken"] = broken - data["operating"] = operating - data["dirty"] = dirty == 100 - data["items"] = get_items_list() - - return data - -/obj/machinery/microwave/proc/get_items_list() - var/list/data = list() - - var/list/items_counts = list() - var/list/items_measures = list() - var/list/items_measures_p = list() - for(var/obj/O in ((contents - component_parts) - circuit)) - var/display_name = O.name - if(istype(O,/obj/item/weapon/reagent_containers/food/snacks/egg)) - items_measures[display_name] = "egg" - items_measures_p[display_name] = "eggs" - if(istype(O,/obj/item/weapon/reagent_containers/food/snacks/tofu)) - items_measures[display_name] = "tofu chunk" - items_measures_p[display_name] = "tofu chunks" - if(istype(O,/obj/item/weapon/reagent_containers/food/snacks/meat)) //any meat - items_measures[display_name] = "slab of meat" - items_measures_p[display_name] = "slabs of meat" - if(istype(O,/obj/item/weapon/reagent_containers/food/snacks/donkpocket)) - display_name = "Turnovers" - items_measures[display_name] = "turnover" - items_measures_p[display_name] = "turnovers" - if(istype(O,/obj/item/weapon/reagent_containers/food/snacks/carpmeat)) - items_measures[display_name] = "fillet of meat" - items_measures_p[display_name] = "fillets of meat" - items_counts[display_name]++ - for(var/O in items_counts) - var/N = items_counts[O] - if(!(O in items_measures)) - data.Add(list(list( - "name" = capitalize(O), - "amt" = N, - "extra" = "[lowertext(O)][N > 1 ? "s" : ""]", - ))) - else - data.Add(list(list( - "name" = capitalize(O), - "amt" = N, - "extra" = N == 1 ? items_measures[O] : items_measures_p[O], - ))) - - for(var/datum/reagent/R in reagents.reagent_list) - var/display_name = R.name - if(R.id == "capsaicin") - display_name = "Hotsauce" - if(R.id == "frostoil") - display_name = "Coldsauce" - data.Add(list(list( - "name" = display_name, - "amt" = R.volume, - "extra" = "unit[R.volume > 1 ? "s" : ""]" - ))) - - return data - -/obj/machinery/microwave/tgui_act(action, list/params, datum/tgui/ui, datum/tgui_state/state) - if(..()) - return TRUE - - if(operating) - return TRUE - - switch(action) - if("cook") - cook() - return TRUE - - if("dispose") - dispose() - return TRUE -/* -/obj/machinery/microwave/interact(mob/user as mob) // The microwave Menu - var/dat = "" - if(src.broken > 0) - dat = {"Bzzzzttttt"} - else if(src.operating) - dat = {"Microwaving in progress!
Please wait...!
"} - else if(src.dirty==100) - dat = {"This microwave is dirty!
Please clean it before use!
"} - else - var/list/items_counts = new - var/list/items_measures = new - var/list/items_measures_p = new - for (var/obj/O in ((contents - component_parts) - circuit)) - var/display_name = O.name - if (istype(O,/obj/item/weapon/reagent_containers/food/snacks/egg)) - items_measures[display_name] = "egg" - items_measures_p[display_name] = "eggs" - if (istype(O,/obj/item/weapon/reagent_containers/food/snacks/tofu)) - items_measures[display_name] = "tofu chunk" - items_measures_p[display_name] = "tofu chunks" - if (istype(O,/obj/item/weapon/reagent_containers/food/snacks/meat)) //any meat - items_measures[display_name] = "slab of meat" - items_measures_p[display_name] = "slabs of meat" - if (istype(O,/obj/item/weapon/reagent_containers/food/snacks/donkpocket)) - display_name = "Turnovers" - items_measures[display_name] = "turnover" - items_measures_p[display_name] = "turnovers" - if (istype(O,/obj/item/weapon/reagent_containers/food/snacks/carpmeat)) - items_measures[display_name] = "fillet of meat" - items_measures_p[display_name] = "fillets of meat" - items_counts[display_name]++ - for (var/O in items_counts) - var/N = items_counts[O] - if (!(O in items_measures)) - dat += {"[capitalize(O)]: [N] [lowertext(O)]\s
"} - else - if (N==1) - dat += {"[capitalize(O)]: [N] [items_measures[O]]
"} - else - dat += {"[capitalize(O)]: [N] [items_measures_p[O]]
"} - - for (var/datum/reagent/R in reagents.reagent_list) - var/display_name = R.name - if (R.id == "capsaicin") - display_name = "Hotsauce" - if (R.id == "frostoil") - display_name = "Coldsauce" - dat += {"[display_name]: [R.volume] unit\s
"} - - if (items_counts.len==0 && reagents.reagent_list.len==0) - dat = {"The microwave is empty
"} - else - dat = {"Ingredients:
[dat]"} - dat += {"

\ -Turn on!
\ -
Eject ingredients!
\ -"} - - user << browse("Microwave Controls[dat]", "window=microwave") - onclose(user, "microwave") - return -*/ - -/*********************************** -* Microwave Menu Handling/Cooking -************************************/ - -/obj/machinery/microwave/proc/cook() - if(stat & (NOPOWER|BROKEN)) - return - start() - if(reagents.total_volume==0 && !(locate(/obj) in ((contents - component_parts) - circuit))) //dry run - if(!wzhzhzh(16)) //VOREStation Edit - Quicker Microwaves (Undone during Auroraport, left note in case of reversion, was 5) - abort() - return - abort() - return - - var/datum/recipe/recipe = select_recipe(available_recipes,src) - var/obj/cooked - if(!recipe) - dirty += 1 - if(prob(max(10,dirty*5))) - if(!wzhzhzh(16)) //VOREStation Edit - Quicker Microwaves (Undone during Auroraport, left note in case of reversion, was 2) - abort() - return - muck_start() - wzhzhzh(2) //VOREStation Edit - Quicker Microwaves (Undone during Auroraport, left note in case of reversion, was 2) - muck_finish() - cooked = fail() - cooked.forceMove(src.loc) - else if(has_extra_item()) - if(!wzhzhzh(16)) //VOREStation Edit - Quicker Microwaves (Undone during Auroraport, left note in case of reversion, was 2) - abort() - return - broke() - cooked = fail() - cooked.forceMove(src.loc) - else - if(!wzhzhzh(40)) //VOREStation Edit - Quicker Microwaves (Undone during Auroraport, left note in case of reversion, was 5) - abort() - return - stop() - cooked = fail() - cooked.forceMove(src.loc) - return - - //Making multiple copies of a recipe - var/halftime = round(recipe.time*4/10/2) // VOREStation Edit - Quicker Microwaves (Undone during Auroraport, left note in case of reversion, was round(recipe.time/20/2)) - if(!wzhzhzh(halftime)) - abort() - return - recipe.before_cook(src) - if(!wzhzhzh(halftime)) - abort() - cooked = fail() - cooked.forceMove(loc) - recipe.after_cook(src) - return - - var/result = recipe.result - var/valid = 1 - var/list/cooked_items = list() - var/obj/temp = new /obj(src) //To prevent infinite loops, all results will be moved into a temporary location so they're not considered as inputs for other recipes - while(valid) - var/list/things = list() - things.Add(recipe.make_food(src)) - cooked_items += things - //Move cooked things to the buffer so they're not considered as ingredients - for(var/atom/movable/AM in things) - AM.forceMove(temp) - - valid = 0 - recipe.after_cook(src) - recipe = select_recipe(available_recipes,src) - if(recipe && recipe.result == result) - valid = 1 - sleep(2) - - for(var/r in cooked_items) - var/atom/movable/R = r - R.forceMove(src) //Move everything from the buffer back to the container - - QDEL_NULL(temp)//Delete buffer object - - //Any leftover reagents are divided amongst the foods - var/total = reagents.total_volume - for(var/obj/item/weapon/reagent_containers/food/snacks/S in cooked_items) - reagents.trans_to_holder(S.reagents, total/cooked_items.len) - - for(var/obj/item/weapon/reagent_containers/food/snacks/S in contents) - S.cook() - - dispose(0) //clear out anything left - stop() - - return - -/obj/machinery/microwave/proc/wzhzhzh(var/seconds as num) // Whoever named this proc is fucking literally Satan. ~ Z - for (var/i=1 to seconds) - if (stat & (NOPOWER|BROKEN)) - return 0 - use_power(active_power_usage) - sleep(5) //VOREStation Edit - Quicker Microwaves - return 1 - -/obj/machinery/microwave/proc/has_extra_item() //- coded to have different microwaves be able to handle different items - if(item_level == 0) - for (var/obj/O in ((contents - component_parts) - circuit)) - if ( \ - !istype(O,/obj/item/weapon/reagent_containers/food) && \ - !istype(O, /obj/item/weapon/grown) \ - ) - return 1 - return 0 - if(item_level == 1) - for (var/obj/O in ((contents - component_parts) - circuit)) - if ( \ - !istype(O, /obj/item/weapon/reagent_containers/food) && \ - !istype(O, /obj/item/weapon/grown) && \ - !istype(O, /obj/item/slime_extract) && \ - !istype(O, /obj/item/organ) && \ - !istype(O, /obj/item/stack/material) \ - ) - return 1 - return 0 - -/obj/machinery/microwave/proc/start() - src.visible_message("The microwave turns on.", "You hear a microwave.") - soundloop.start() - src.operating = TRUE - src.icon_state = "mw1" - SStgui.update_uis(src) - -/obj/machinery/microwave/proc/abort() - operating = FALSE // Turn it off again aferwards - if(icon_state == "mw1") - icon_state = "mw" - SStgui.update_uis(src) - soundloop.stop() - -/obj/machinery/microwave/proc/stop() - playsound(src.loc, 'sound/machines/ding.ogg', 50, 1) - operating = FALSE // Turn it off again aferwards - if(icon_state == "mw1") - icon_state = "mw" - SStgui.update_uis(src) - soundloop.stop() - -/obj/machinery/microwave/proc/dispose(var/message = 1) - for (var/atom/movable/A in ((contents-component_parts)-circuit)) - A.forceMove(loc) - if (src.reagents.total_volume) - src.dirty++ - src.reagents.clear_reagents() - if(message) - to_chat(usr, "You dispose of the microwave contents.") - SStgui.update_uis(src) - -/obj/machinery/microwave/proc/muck_start() - playsound(src, 'sound/effects/splat.ogg', 50, 1) // Play a splat sound - src.icon_state = "mwbloody1" // Make it look dirty!! - -/obj/machinery/microwave/proc/muck_finish() - src.visible_message("The microwave gets covered in muck!") - src.dirty = 100 // Make it dirty so it can't be used util cleaned - src.flags = null //So you can't add condiments - src.icon_state = "mwbloody" // Make it look dirty too - src.operating = 0 // Turn it off again aferwards - SStgui.update_uis(src) - soundloop.stop() - - -/obj/machinery/microwave/proc/broke() - var/datum/effect/effect/system/spark_spread/s = new - s.set_up(2, 1, src) - s.start() - src.icon_state = "mwb" // Make it look all busted up and shit - src.visible_message("The microwave breaks!") //Let them know they're stupid - src.broken = 2 // Make it broken so it can't be used util fixed - src.flags = null //So you can't add condiments - src.operating = 0 // Turn it off again aferwards - SStgui.update_uis(src) - soundloop.stop() - -/obj/machinery/microwave/proc/fail() - var/obj/item/weapon/reagent_containers/food/snacks/badrecipe/ffuu = new(src) - var/amount = 0 - for (var/obj/O in (((contents - ffuu) - component_parts) - circuit)) - amount++ - if(O.reagents) - var/id = O.reagents.get_master_reagent_id() - if(id) - amount+=O.reagents.get_reagent_amount(id) - if(istype(O, /obj/item/weapon/holder)) - var/obj/item/weapon/holder/H = O - if(H.held_mob) - qdel(H.held_mob) - qdel(O) - src.reagents.clear_reagents() - ffuu.reagents.add_reagent("carbon", amount) - ffuu.reagents.add_reagent("toxin", amount/10) - return ffuu - -/obj/machinery/microwave/verb/Eject() - set src in oview(1) - set category = "Object" - set name = "Eject content" - usr.visible_message( - "[usr] tries to open [src] and remove its contents." , - "You try to open [src] and remove its contents." - ) - - if(!do_after(usr, 1 SECONDS, target = src)) - return - - if(operating) - to_chat(usr, "You can't do that, [src] door is locked!") - return - - usr.visible_message( - "[usr] opened [src] and has taken out [english_list(((contents-component_parts)-circuit))]." , - "You have opened [src] and taken out [english_list(((contents-component_parts)-circuit))]." - ) - dispose() - -/obj/machinery/microwave/CanPass(atom/movable/mover, turf/target, height=0, air_group=0) - if(!mover) - return 1 - if(mover.checkpass(PASSTABLE)) - //Animals can run under them, lots of empty space - return 1 - return ..() - -/obj/machinery/microwave/advanced // specifically for complex recipes - name = "deluxe microwave" - icon = 'icons/obj/deluxemicrowave.dmi' - icon_state = "mw" - circuit = /obj/item/weapon/circuitboard/microwave/advanced - circuit_item_capacity = 100 - item_level = 1 - -/obj/machinery/microwave/advanced/Initialize() - . = ..() - reagents.maximum_volume = 1000 - -/datum/recipe/splat // We use this to handle cooking micros (or mice, etc) in a microwave. Janky but it works better than snowflake code to handle the same thing. - items = list( - /obj/item/weapon/holder - ) - result = /obj/effect/decal/cleanable/blood/gibs - -/datum/recipe/splat/before_cook(obj/container) - if(istype(container, /obj/machinery/microwave)) - var/obj/machinery/microwave/M = container - M.muck_start() - playsound(container.loc, 'sound/items/drop/flesh.ogg', 100, 1) - . = ..() - -/datum/recipe/splat/make_food(obj/container) - for(var/obj/item/weapon/holder/H in container) - if(H.held_mob) - to_chat(H.held_mob, "You hear an earsplitting humming and your head aches!") - qdel(H.held_mob) - H.held_mob = null - qdel(H) - - . = ..() - -/datum/recipe/splat/after_cook(obj/container) - if(istype(container, /obj/machinery/microwave)) - var/obj/machinery/microwave/M = container - M.muck_finish() - . = ..() +/obj/machinery/microwave + name = "Microwave" + desc = "Studies are inconclusive on whether pressing your face against the glass is harmful." + icon = 'icons/obj/kitchen.dmi' + icon_state = "mw" + layer = 2.9 + density = TRUE + anchored = TRUE + use_power = USE_POWER_IDLE + idle_power_usage = 5 + active_power_usage = 2000 + clicksound = "button" + clickvol = "30" + flags = OPENCONTAINER | NOREACT + circuit = /obj/item/weapon/circuitboard/microwave + var/operating = 0 // Is it on? + var/dirty = 0 // = {0..100} Does it need cleaning? + var/broken = 0 // ={0,1,2} How broken is it??? + var/circuit_item_capacity = 1 //how many items does the circuit add to max number of items + var/item_level = 0 // items microwave can handle, 0 foodstuff, 1 materials + var/global/list/acceptable_items // List of the items you can put in + var/global/list/available_recipes // List of the recipes you can use + var/global/list/acceptable_reagents // List of the reagents you can put in + + var/global/max_n_of_items = 20 + var/appliancetype = MICROWAVE + var/datum/looping_sound/microwave/soundloop + + +//see code/modules/food/recipes_microwave.dm for recipes + +/******************* +* Initialising +********************/ + +/obj/machinery/microwave/Initialize() + . = ..() + + reagents = new/datum/reagents(100) + reagents.my_atom = src + + default_apply_parts() + + if(!available_recipes) + available_recipes = new + for(var/datum/recipe/typepath as anything in subtypesof(/datum/recipe)) + if((initial(typepath.appliance) & appliancetype)) + available_recipes += new typepath + + acceptable_items = new + acceptable_reagents = new + for (var/datum/recipe/recipe in available_recipes) + for (var/item in recipe.items) + acceptable_items |= item + for (var/reagent in recipe.reagents) + acceptable_reagents |= reagent + // This will do until I can think of a fun recipe to use dionaea in - + // will also allow anything using the holder item to be microwaved into + // impure carbon. ~Z + acceptable_items |= /obj/item/weapon/holder + acceptable_items |= /obj/item/weapon/reagent_containers/food/snacks/grown + acceptable_items |= /obj/item/device/soulstone + acceptable_items |= /obj/item/weapon/fuel_assembly/supermatter + + soundloop = new(list(src), FALSE) + +/obj/machinery/microwave/Destroy() + QDEL_NULL(soundloop) + return ..() + +/******************* +* Item Adding +********************/ + +/obj/machinery/microwave/attackby(var/obj/item/O as obj, var/mob/user as mob) + if(src.broken > 0) + if(src.broken == 2 && O.is_screwdriver()) // If it's broken and they're using a screwdriver + user.visible_message( \ + "\The [user] starts to fix part of the microwave.", \ + "You start to fix part of the microwave." \ + ) + playsound(src, O.usesound, 50, 1) + if (do_after(user,20 * O.toolspeed)) + user.visible_message( \ + "\The [user] fixes part of the microwave.", \ + "You have fixed part of the microwave." \ + ) + src.broken = 1 // Fix it a bit + else if(src.broken == 1 && O.is_wrench()) // If it's broken and they're doing the wrench + user.visible_message( \ + "\The [user] starts to fix part of the microwave.", \ + "You start to fix part of the microwave." \ + ) + if (do_after(user,20 * O.toolspeed)) + user.visible_message( \ + "\The [user] fixes the microwave.", \ + "You have fixed the microwave." \ + ) + src.icon_state = "mw" + src.broken = 0 // Fix it! + src.dirty = 0 // just to be sure + src.flags = OPENCONTAINER | NOREACT + else + to_chat(user, "It's broken!") + return 1 + + else if(src.dirty==100) // The microwave is all dirty so can't be used! + if(istype(O, /obj/item/weapon/reagent_containers/spray/cleaner) || istype(O, /obj/item/weapon/soap)) // If they're trying to clean it then let them + user.visible_message( \ + "\The [user] starts to clean the microwave.", \ + "You start to clean the microwave." \ + ) + if (do_after(user,20)) + user.visible_message( \ + "\The [user] has cleaned the microwave.", \ + "You have cleaned the microwave." \ + ) + src.dirty = 0 // It's clean! + src.broken = 0 // just to be sure + src.icon_state = "mw" + src.flags = OPENCONTAINER | NOREACT + SStgui.update_uis(src) + else //Otherwise bad luck!! + to_chat(user, "It's dirty!") + return 1 + else if(is_type_in_list(O,acceptable_items)) + if(contents.len>=(max_n_of_items + component_parts.len + circuit_item_capacity)) //Adds component_parts to the maximum number of items. changed 1 to actually just be the circuit item capacity var. + to_chat(user, "This [src] is full of ingredients, you cannot put more.") + return 1 + if(istype(O, /obj/item/stack) && O:get_amount() > 1) // This is bad, but I can't think of how to change it + var/obj/item/stack/S = O + new O.type (src) + S.use(1) + user.visible_message( \ + "\The [user] has added one of [O] to \the [src].", \ + "You add one of [O] to \the [src].") + return + else + // user.remove_from_mob(O) //This just causes problems so far as I can tell. -Pete - Man whoever you are, it's been years. o7 + user.drop_from_inventory(O,src) + user.visible_message( \ + "\The [user] has added \the [O] to \the [src].", \ + "You add \the [O] to \the [src].") + SStgui.update_uis(src) + return + else if(istype(O,/obj/item/weapon/reagent_containers/glass) || \ + istype(O,/obj/item/weapon/reagent_containers/food/drinks) || \ + istype(O,/obj/item/weapon/reagent_containers/food/condiment) \ + ) + if (!O.reagents) + return 1 + for (var/datum/reagent/R in O.reagents.reagent_list) + if (!(R.id in acceptable_reagents)) + to_chat(user, "Your [O] contains components unsuitable for cookery.") + return 1 + return + else if(istype(O,/obj/item/weapon/grab)) + var/obj/item/weapon/grab/G = O + to_chat(user, "This is ridiculous. You can not fit \the [G.affecting] in this [src].") + return 1 + else if(O.is_screwdriver()) + default_deconstruction_screwdriver(user, O) + return + else if(O.is_crowbar()) + if(default_deconstruction_crowbar(user, O)) + return + else + user.visible_message( \ + "\The [user] begins [src.anchored ? "unsecuring" : "securing"] the microwave.", \ + "You attempt to [src.anchored ? "unsecure" : "secure"] the microwave." + ) + if (do_after(user,20/O.toolspeed)) + user.visible_message( \ + "\The [user] [src.anchored ? "unsecures" : "secures"] the microwave.", \ + "You [src.anchored ? "unsecure" : "secure"] the microwave." + ) + src.anchored = !src.anchored + else + to_chat(user, "You decide not to do that.") + else if(default_part_replacement(user, O)) + return + else + to_chat(user, "You have no idea what you can cook with this [O].") + ..() + SStgui.update_uis(src) + +/obj/machinery/microwave/tgui_state(mob/user) + return GLOB.tgui_physical_state + +/obj/machinery/microwave/attack_ai(mob/user as mob) + attack_hand(user) + +/obj/machinery/microwave/attack_hand(mob/user as mob) + user.set_machine(src) + tgui_interact(user) + +/******************* +* Microwave Menu +********************/ +/obj/machinery/microwave/tgui_interact(mob/user, datum/tgui/ui) + ui = SStgui.try_update_ui(user, src, ui) + if(!ui) + ui = new(user, src, "Microwave", name) + ui.open() + +/obj/machinery/microwave/tgui_data(mob/user, datum/tgui/ui, datum/tgui_state/state) + var/list/data = ..() + + data["broken"] = broken + data["operating"] = operating + data["dirty"] = dirty == 100 + data["items"] = get_items_list() + + return data + +/obj/machinery/microwave/proc/get_items_list() + var/list/data = list() + + var/list/items_counts = list() + var/list/items_measures = list() + var/list/items_measures_p = list() + for(var/obj/O in ((contents - component_parts) - circuit)) + var/display_name = O.name + if(istype(O,/obj/item/weapon/reagent_containers/food/snacks/egg)) + items_measures[display_name] = "egg" + items_measures_p[display_name] = "eggs" + if(istype(O,/obj/item/weapon/reagent_containers/food/snacks/tofu)) + items_measures[display_name] = "tofu chunk" + items_measures_p[display_name] = "tofu chunks" + if(istype(O,/obj/item/weapon/reagent_containers/food/snacks/meat)) //any meat + items_measures[display_name] = "slab of meat" + items_measures_p[display_name] = "slabs of meat" + if(istype(O,/obj/item/weapon/reagent_containers/food/snacks/donkpocket)) + display_name = "Turnovers" + items_measures[display_name] = "turnover" + items_measures_p[display_name] = "turnovers" + if(istype(O,/obj/item/weapon/reagent_containers/food/snacks/carpmeat)) + items_measures[display_name] = "fillet of meat" + items_measures_p[display_name] = "fillets of meat" + items_counts[display_name]++ + for(var/O in items_counts) + var/N = items_counts[O] + if(!(O in items_measures)) + data.Add(list(list( + "name" = capitalize(O), + "amt" = N, + "extra" = "[lowertext(O)][N > 1 ? "s" : ""]", + ))) + else + data.Add(list(list( + "name" = capitalize(O), + "amt" = N, + "extra" = N == 1 ? items_measures[O] : items_measures_p[O], + ))) + + for(var/datum/reagent/R in reagents.reagent_list) + var/display_name = R.name + if(R.id == "capsaicin") + display_name = "Hotsauce" + if(R.id == "frostoil") + display_name = "Coldsauce" + data.Add(list(list( + "name" = display_name, + "amt" = R.volume, + "extra" = "unit[R.volume > 1 ? "s" : ""]" + ))) + + return data + +/obj/machinery/microwave/tgui_act(action, list/params, datum/tgui/ui, datum/tgui_state/state) + if(..()) + return TRUE + + if(operating) + return TRUE + + switch(action) + if("cook") + cook() + return TRUE + + if("dispose") + dispose() + return TRUE +/* +/obj/machinery/microwave/interact(mob/user as mob) // The microwave Menu + var/dat = "" + if(src.broken > 0) + dat = {"Bzzzzttttt"} + else if(src.operating) + dat = {"Microwaving in progress!
Please wait...!
"} + else if(src.dirty==100) + dat = {"This microwave is dirty!
Please clean it before use!
"} + else + var/list/items_counts = new + var/list/items_measures = new + var/list/items_measures_p = new + for (var/obj/O in ((contents - component_parts) - circuit)) + var/display_name = O.name + if (istype(O,/obj/item/weapon/reagent_containers/food/snacks/egg)) + items_measures[display_name] = "egg" + items_measures_p[display_name] = "eggs" + if (istype(O,/obj/item/weapon/reagent_containers/food/snacks/tofu)) + items_measures[display_name] = "tofu chunk" + items_measures_p[display_name] = "tofu chunks" + if (istype(O,/obj/item/weapon/reagent_containers/food/snacks/meat)) //any meat + items_measures[display_name] = "slab of meat" + items_measures_p[display_name] = "slabs of meat" + if (istype(O,/obj/item/weapon/reagent_containers/food/snacks/donkpocket)) + display_name = "Turnovers" + items_measures[display_name] = "turnover" + items_measures_p[display_name] = "turnovers" + if (istype(O,/obj/item/weapon/reagent_containers/food/snacks/carpmeat)) + items_measures[display_name] = "fillet of meat" + items_measures_p[display_name] = "fillets of meat" + items_counts[display_name]++ + for (var/O in items_counts) + var/N = items_counts[O] + if (!(O in items_measures)) + dat += {"[capitalize(O)]: [N] [lowertext(O)]\s
"} + else + if (N==1) + dat += {"[capitalize(O)]: [N] [items_measures[O]]
"} + else + dat += {"[capitalize(O)]: [N] [items_measures_p[O]]
"} + + for (var/datum/reagent/R in reagents.reagent_list) + var/display_name = R.name + if (R.id == "capsaicin") + display_name = "Hotsauce" + if (R.id == "frostoil") + display_name = "Coldsauce" + dat += {"[display_name]: [R.volume] unit\s
"} + + if (items_counts.len==0 && reagents.reagent_list.len==0) + dat = {"The microwave is empty
"} + else + dat = {"Ingredients:
[dat]"} + dat += {"

\ +
Turn on!
\ +
Eject ingredients!
\ +"} + + user << browse("Microwave Controls[dat]", "window=microwave") + onclose(user, "microwave") + return +*/ + +/*********************************** +* Microwave Menu Handling/Cooking +************************************/ + +/obj/machinery/microwave/proc/cook() + if(stat & (NOPOWER|BROKEN)) + return + start() + if(reagents.total_volume==0 && !(locate(/obj) in ((contents - component_parts) - circuit))) //dry run + if(!wzhzhzh(16)) //VOREStation Edit - Quicker Microwaves (Undone during Auroraport, left note in case of reversion, was 5) + abort() + return + abort() + return + + var/datum/recipe/recipe = select_recipe(available_recipes,src) + var/obj/cooked + if(!recipe) + dirty += 1 + if(prob(max(10,dirty*5))) + if(!wzhzhzh(16)) //VOREStation Edit - Quicker Microwaves (Undone during Auroraport, left note in case of reversion, was 2) + abort() + return + muck_start() + wzhzhzh(2) //VOREStation Edit - Quicker Microwaves (Undone during Auroraport, left note in case of reversion, was 2) + muck_finish() + cooked = fail() + cooked.forceMove(src.loc) + else if(has_extra_item()) + if(!wzhzhzh(16)) //VOREStation Edit - Quicker Microwaves (Undone during Auroraport, left note in case of reversion, was 2) + abort() + return + broke() + cooked = fail() + cooked.forceMove(src.loc) + else + if(!wzhzhzh(40)) //VOREStation Edit - Quicker Microwaves (Undone during Auroraport, left note in case of reversion, was 5) + abort() + return + stop() + cooked = fail() + cooked.forceMove(src.loc) + return + + //Making multiple copies of a recipe + var/halftime = round(recipe.time*4/10/2) // VOREStation Edit - Quicker Microwaves (Undone during Auroraport, left note in case of reversion, was round(recipe.time/20/2)) + if(!wzhzhzh(halftime)) + abort() + return + recipe.before_cook(src) + if(!wzhzhzh(halftime)) + abort() + cooked = fail() + cooked.forceMove(loc) + recipe.after_cook(src) + return + + var/result = recipe.result + var/valid = 1 + var/list/cooked_items = list() + var/obj/temp = new /obj(src) //To prevent infinite loops, all results will be moved into a temporary location so they're not considered as inputs for other recipes + while(valid) + var/list/things = list() + things.Add(recipe.make_food(src)) + cooked_items += things + //Move cooked things to the buffer so they're not considered as ingredients + for(var/atom/movable/AM in things) + AM.forceMove(temp) + + valid = 0 + recipe.after_cook(src) + recipe = select_recipe(available_recipes,src) + if(recipe && recipe.result == result) + valid = 1 + sleep(2) + + for(var/atom/movable/R as anything in cooked_items) + R.forceMove(src) //Move everything from the buffer back to the container + + QDEL_NULL(temp)//Delete buffer object + + //Any leftover reagents are divided amongst the foods + var/total = reagents.total_volume + for(var/obj/item/weapon/reagent_containers/food/snacks/S in cooked_items) + reagents.trans_to_holder(S.reagents, total/cooked_items.len) + + for(var/obj/item/weapon/reagent_containers/food/snacks/S in contents) + S.cook() + + dispose(0) //clear out anything left + stop() + + return + +/obj/machinery/microwave/proc/wzhzhzh(var/seconds as num) // Whoever named this proc is fucking literally Satan. ~ Z + for (var/i=1 to seconds) + if (stat & (NOPOWER|BROKEN)) + return 0 + use_power(active_power_usage) + sleep(5) //VOREStation Edit - Quicker Microwaves + return 1 + +/obj/machinery/microwave/proc/has_extra_item() //- coded to have different microwaves be able to handle different items + if(item_level == 0) + for (var/obj/O in ((contents - component_parts) - circuit)) + if ( \ + !istype(O,/obj/item/weapon/reagent_containers/food) && \ + !istype(O, /obj/item/weapon/grown) \ + ) + return 1 + return 0 + if(item_level == 1) + for (var/obj/O in ((contents - component_parts) - circuit)) + if ( \ + !istype(O, /obj/item/weapon/reagent_containers/food) && \ + !istype(O, /obj/item/weapon/grown) && \ + !istype(O, /obj/item/slime_extract) && \ + !istype(O, /obj/item/organ) && \ + !istype(O, /obj/item/stack/material) \ + ) + return 1 + return 0 + +/obj/machinery/microwave/proc/start() + src.visible_message("The microwave turns on.", "You hear a microwave.") + soundloop.start() + src.operating = TRUE + src.icon_state = "mw1" + SStgui.update_uis(src) + +/obj/machinery/microwave/proc/abort() + operating = FALSE // Turn it off again aferwards + if(icon_state == "mw1") + icon_state = "mw" + SStgui.update_uis(src) + soundloop.stop() + +/obj/machinery/microwave/proc/stop() + playsound(src.loc, 'sound/machines/ding.ogg', 50, 1) + operating = FALSE // Turn it off again aferwards + if(icon_state == "mw1") + icon_state = "mw" + SStgui.update_uis(src) + soundloop.stop() + +/obj/machinery/microwave/proc/dispose(var/message = 1) + for (var/atom/movable/A in ((contents-component_parts)-circuit)) + A.forceMove(loc) + if (src.reagents.total_volume) + src.dirty++ + src.reagents.clear_reagents() + if(message) + to_chat(usr, "You dispose of the microwave contents.") + SStgui.update_uis(src) + +/obj/machinery/microwave/proc/muck_start() + playsound(src, 'sound/effects/splat.ogg', 50, 1) // Play a splat sound + src.icon_state = "mwbloody1" // Make it look dirty!! + +/obj/machinery/microwave/proc/muck_finish() + src.visible_message("The microwave gets covered in muck!") + src.dirty = 100 // Make it dirty so it can't be used util cleaned + src.flags = null //So you can't add condiments + src.icon_state = "mwbloody" // Make it look dirty too + src.operating = 0 // Turn it off again aferwards + SStgui.update_uis(src) + soundloop.stop() + + +/obj/machinery/microwave/proc/broke() + var/datum/effect/effect/system/spark_spread/s = new + s.set_up(2, 1, src) + s.start() + src.icon_state = "mwb" // Make it look all busted up and shit + src.visible_message("The microwave breaks!") //Let them know they're stupid + src.broken = 2 // Make it broken so it can't be used util fixed + src.flags = null //So you can't add condiments + src.operating = 0 // Turn it off again aferwards + SStgui.update_uis(src) + soundloop.stop() + +/obj/machinery/microwave/proc/fail() + var/obj/item/weapon/reagent_containers/food/snacks/badrecipe/ffuu = new(src) + var/amount = 0 + for (var/obj/O in (((contents - ffuu) - component_parts) - circuit)) + amount++ + if(O.reagents) + var/id = O.reagents.get_master_reagent_id() + if(id) + amount+=O.reagents.get_reagent_amount(id) + if(istype(O, /obj/item/weapon/holder)) + var/obj/item/weapon/holder/H = O + if(H.held_mob) + qdel(H.held_mob) + qdel(O) + src.reagents.clear_reagents() + ffuu.reagents.add_reagent("carbon", amount) + ffuu.reagents.add_reagent("toxin", amount/10) + return ffuu + +/obj/machinery/microwave/verb/Eject() + set src in oview(1) + set category = "Object" + set name = "Eject content" + usr.visible_message( + "[usr] tries to open [src] and remove its contents." , + "You try to open [src] and remove its contents." + ) + + if(!do_after(usr, 1 SECONDS, target = src)) + return + + if(operating) + to_chat(usr, "You can't do that, [src] door is locked!") + return + + usr.visible_message( + "[usr] opened [src] and has taken out [english_list(((contents-component_parts)-circuit))]." , + "You have opened [src] and taken out [english_list(((contents-component_parts)-circuit))]." + ) + dispose() + +/obj/machinery/microwave/CanPass(atom/movable/mover, turf/target, height=0, air_group=0) + if(!mover) + return 1 + if(mover.checkpass(PASSTABLE)) + //Animals can run under them, lots of empty space + return 1 + return ..() + +/obj/machinery/microwave/advanced // specifically for complex recipes + name = "deluxe microwave" + icon = 'icons/obj/deluxemicrowave.dmi' + icon_state = "mw" + circuit = /obj/item/weapon/circuitboard/microwave/advanced + circuit_item_capacity = 100 + item_level = 1 + +/obj/machinery/microwave/advanced/Initialize() + . = ..() + reagents.maximum_volume = 1000 + +/datum/recipe/splat // We use this to handle cooking micros (or mice, etc) in a microwave. Janky but it works better than snowflake code to handle the same thing. + items = list( + /obj/item/weapon/holder + ) + result = /obj/effect/decal/cleanable/blood/gibs + +/datum/recipe/splat/before_cook(obj/container) + if(istype(container, /obj/machinery/microwave)) + var/obj/machinery/microwave/M = container + M.muck_start() + playsound(container.loc, 'sound/items/drop/flesh.ogg', 100, 1) + . = ..() + +/datum/recipe/splat/make_food(obj/container) + for(var/obj/item/weapon/holder/H in container) + if(H.held_mob) + to_chat(H.held_mob, "You hear an earsplitting humming and your head aches!") + qdel(H.held_mob) + H.held_mob = null + qdel(H) + + . = ..() + +/datum/recipe/splat/after_cook(obj/container) + if(istype(container, /obj/machinery/microwave)) + var/obj/machinery/microwave/M = container + M.muck_finish() + . = ..() diff --git a/code/modules/food/recipe_dump.dm b/code/modules/food/recipe_dump.dm index 63dc510eb9..dffce315e4 100644 --- a/code/modules/food/recipe_dump.dm +++ b/code/modules/food/recipe_dump.dm @@ -15,7 +15,7 @@ "Catalysts" = CR.catalysts) //////////////////////// FOOD - var/list/food_recipes = typesof(/datum/recipe) - /datum/recipe + var/list/food_recipes = subtypesof(/datum/recipe) //Build a useful list for(var/Rp in food_recipes) //Lists don't work with datum-stealing no-instance initial() so we have to. diff --git a/code/modules/gamemaster/event2/event.dm b/code/modules/gamemaster/event2/event.dm index 4432be40ab..b9f1d92648 100644 --- a/code/modules/gamemaster/event2/event.dm +++ b/code/modules/gamemaster/event2/event.dm @@ -88,8 +88,7 @@ This allows for events that have their announcement happen after the end itself. if(!LAZYLEN(grand_list_of_areas)) return list() - for(var/thing in grand_list_of_areas) - var/list/A = thing + for(var/list/A as anything in grand_list_of_areas) var/list/turfs = list() for(var/turf/T in A) if(!T.check_density()) @@ -107,8 +106,7 @@ This allows for events that have their announcement happen after the end itself. var/list/area/grand_list_of_areas = get_all_existing_areas_of_types(specific_areas) . = list() - for(var/thing in shuffle(grand_list_of_areas)) - var/area/A = thing + for(var/area/A as anything in shuffle(grand_list_of_areas)) if(A.forbid_events) continue if(!(A.z in get_location_z_levels())) diff --git a/code/modules/gamemaster/event2/events/engineering/blob.dm b/code/modules/gamemaster/event2/events/engineering/blob.dm index 3ace8f0894..f3b8a16f8d 100644 --- a/code/modules/gamemaster/event2/events/engineering/blob.dm +++ b/code/modules/gamemaster/event2/events/engineering/blob.dm @@ -111,16 +111,14 @@ log_debug("Spawned [new_blob.overmind.blob_type.name] blob at [get_area(new_blob)].") /datum/event2/event/blob/should_end() - for(var/WR in blobs) - var/weakref/weakref = WR + for(var/weakref/weakref as anything in blobs) if(weakref.resolve()) // If the weakref is resolvable, that means the blob hasn't been deleted yet. return FALSE return TRUE // Only end if all blobs die. // Normally this does nothing, but is useful if aborted by an admin. /datum/event2/event/blob/end() - for(var/WR in blobs) - var/weakref/weakref = WR + for(var/weakref/weakref as anything in blobs) var/obj/structure/blob/core/B = weakref.resolve() if(istype(B)) qdel(B) @@ -130,8 +128,7 @@ var/danger_level = 0 var/list/blob_type_names = list() var/multiblob = FALSE - for(var/WR in blobs) - var/weakref/weakref = WR + for(var/weakref/weakref as anything in blobs) var/obj/structure/blob/core/B = weakref.resolve() if(!istype(B)) continue diff --git a/code/modules/gamemaster/event2/events/engineering/grid_check.dm b/code/modules/gamemaster/event2/events/engineering/grid_check.dm index 8b081f29e2..b4ae7976b6 100644 --- a/code/modules/gamemaster/event2/events/engineering/grid_check.dm +++ b/code/modules/gamemaster/event2/events/engineering/grid_check.dm @@ -15,8 +15,7 @@ // Having the turbines be way over their rated limit makes grid checks more likely. /datum/event2/meta/grid_check/proc/get_overpower() var/highest_overpower = 0 - for(var/T in GLOB.all_turbines) - var/obj/machinery/power/generator/turbine = T + for(var/obj/machinery/power/generator/turbine as anything in GLOB.all_turbines) var/overpower = max((turbine.effective_gen / turbine.max_power) - 1, 0) if(overpower > highest_overpower) highest_overpower = overpower @@ -35,8 +34,7 @@ /datum/event2/event/grid_check/set_up() // Find the turbine being pushed the most. var/obj/machinery/power/generator/most_stressed_turbine = null - for(var/T in GLOB.all_turbines) - var/obj/machinery/power/generator/turbine = T + for(var/obj/machinery/power/generator/turbine as anything in GLOB.all_turbines) if(!most_stressed_turbine) most_stressed_turbine = turbine else if(turbine.effective_gen > most_stressed_turbine.effective_gen) diff --git a/code/modules/gamemaster/event2/events/mob_spawning.dm b/code/modules/gamemaster/event2/events/mob_spawning.dm index 78b1eac69c..4f3bcffa02 100644 --- a/code/modules/gamemaster/event2/events/mob_spawning.dm +++ b/code/modules/gamemaster/event2/events/mob_spawning.dm @@ -66,10 +66,9 @@ // In the future, a new AI stance that handles long distance travel using getline() could work. var/max_distance = 8 var/turf/spawn_turf = null - for(var/P in space_line) - var/turf/point = P + for(var/turf/point as anything in space_line) if(get_dist(point, edge_of_station) <= max_distance) - spawn_turf = P + spawn_turf = point break if(spawn_turf) @@ -88,8 +87,7 @@ // Counts living simple_mobs spawned by this event. /datum/event2/event/mob_spawning/proc/count_spawned_mobs() . = 0 - for(var/I in spawned_mobs) - var/mob/living/simple_mob/M = I + for(var/mob/living/simple_mob/M as anything in spawned_mobs) if(!QDELETED(M) && M.stat != DEAD) . += 1 diff --git a/code/modules/genetics/side_effects.dm b/code/modules/genetics/side_effects.dm index 498aff20d0..958f05d5ac 100644 --- a/code/modules/genetics/side_effects.dm +++ b/code/modules/genetics/side_effects.dm @@ -67,7 +67,7 @@ /proc/trigger_side_effect(mob/living/carbon/human/H) spawn if(!istype(H)) return - var/tp = pick(typesof(/datum/genetics/side_effect) - /datum/genetics/side_effect) + var/tp = pick(subtypesof(/datum/genetics/side_effect)) var/datum/genetics/side_effect/S = new tp S.start(H) diff --git a/code/modules/holomap/mapper.dm b/code/modules/holomap/mapper.dm index b99d2928c1..40a8f433bb 100644 --- a/code/modules/holomap/mapper.dm +++ b/code/modules/holomap/mapper.dm @@ -280,8 +280,7 @@ extras_holder.pixel_y = bgmap.pixel_y = -1*T_y + offset_y // Populate other mapper icons - for(var/hc in mapping_units) - var/obj/item/device/mapping_unit/HC = hc + for(var/obj/item/device/mapping_unit/HC as anything in mapping_units) if(HC.mapper_filter != mapper_filter) continue var/mob_indicator = HOLOMAP_ERROR @@ -340,8 +339,7 @@ extras += mark // Marker beacon items - for(var/hb in mapping_beacons) - var/obj/item/device/holomap_beacon/HB = hb + for(var/obj/item/device/holomap_beacon/HB as anything in mapping_beacons) if(HB.mapper_filter != mapper_filter) continue diff --git a/code/modules/hydroponics/spreading/spreading_growth.dm b/code/modules/hydroponics/spreading/spreading_growth.dm index 99929ea360..b8f8701205 100644 --- a/code/modules/hydroponics/spreading/spreading_growth.dm +++ b/code/modules/hydroponics/spreading/spreading_growth.dm @@ -74,8 +74,7 @@ plant.layer = layer + 0.1 if(has_buckled_mobs()) - for(var/A in buckled_mobs) - var/mob/living/L = A + for(var/mob/living/L as anything in buckled_mobs) seed.do_sting(L,src) if(seed.get_trait(TRAIT_CARNIVOROUS)) seed.do_thorns(L,src) diff --git a/code/modules/hydroponics/spreading/spreading_response.dm b/code/modules/hydroponics/spreading/spreading_response.dm index ab22ae15df..b9e64b8d32 100644 --- a/code/modules/hydroponics/spreading/spreading_response.dm +++ b/code/modules/hydroponics/spreading/spreading_response.dm @@ -49,8 +49,7 @@ /obj/effect/plant/proc/unbuckle() if(has_buckled_mobs()) - for(var/A in buckled_mobs) - var/mob/living/L = A + for(var/mob/living/L as anything in buckled_mobs) if(L.buckled == src) L.buckled = null L.anchored = initial(L.anchored) @@ -64,8 +63,7 @@ if(seed) chance = round(100/(20*seed.get_trait(TRAIT_POTENCY)/100)) if(prob(chance)) - for(var/A in buckled_mobs) - var/mob/living/L = A + for(var/mob/living/L as anything in buckled_mobs) if(!(user in buckled_mobs)) L.visible_message(\ "\The [user] frees \the [L] from \the [src].",\ diff --git a/code/modules/identification/identification.dm b/code/modules/identification/identification.dm index 6ddcdbb075..99ed8bc633 100644 --- a/code/modules/identification/identification.dm +++ b/code/modules/identification/identification.dm @@ -97,8 +97,7 @@ return "unidentified object" var/list/new_name = list() - for(var/i in naming_lists) - var/list/current_list = i + for(var/list/current_list as anything in naming_lists) new_name += pick(current_list) return new_name.Join(" ") diff --git a/code/modules/instruments/instrument_data/_instrument_data.dm b/code/modules/instruments/instrument_data/_instrument_data.dm index 39d16e499f..7cede360a2 100644 --- a/code/modules/instruments/instrument_data/_instrument_data.dm +++ b/code/modules/instruments/instrument_data/_instrument_data.dm @@ -70,8 +70,7 @@ /datum/instrument/Destroy() SSinstruments.instrument_data -= id - for(var/i in songs_using) - var/datum/song/S = i + for(var/datum/song/S as anything in songs_using) S.set_instrument(null) real_samples = null samples = null diff --git a/code/modules/instruments/items.dm b/code/modules/instruments/items.dm index 455c10e5cb..31d4c396cc 100644 --- a/code/modules/instruments/items.dm +++ b/code/modules/instruments/items.dm @@ -296,8 +296,7 @@ /obj/item/instrument/harmonica, /obj/item/instrument/piano_synth/headphones ) - for(var/V in templist) - var/atom/A = V + for(var/atom/A as anything in templist) instruments[initial(A.name)] = A return instruments */ diff --git a/code/modules/instruments/songs/play_legacy.dm b/code/modules/instruments/songs/play_legacy.dm index e8666f7867..9d7ba493d4 100644 --- a/code/modules/instruments/songs/play_legacy.dm +++ b/code/modules/instruments/songs/play_legacy.dm @@ -80,8 +80,7 @@ if((world.time - MUSICIAN_HEARCHECK_MINDELAY) > last_hearcheck) do_hearcheck() var/sound/music_played = sound(soundfile) - for(var/i in hearing_mobs) - var/mob/M = i + for(var/mob/M as anything in hearing_mobs) /* Would be nice if(user && HAS_TRAIT(user, TRAIT_MUSICIAN) && isliving(M)) var/mob/living/L = M diff --git a/code/modules/instruments/songs/play_synthesized.dm b/code/modules/instruments/songs/play_synthesized.dm index d8b10654d5..63369228aa 100644 --- a/code/modules/instruments/songs/play_synthesized.dm +++ b/code/modules/instruments/songs/play_synthesized.dm @@ -61,8 +61,7 @@ channels_playing[channel_text] = 100 last_channel_played = channel_text var/turf/source = get_turf(parent) - for(var/i in hearing_mobs) - var/mob/M = i + for(var/mob/M as anything in hearing_mobs) /* Maybe someday if(user && HAS_TRAIT(user, TRAIT_MUSICIAN) && isliving(M)) var/mob/living/L = M @@ -142,10 +141,8 @@ if(dead) channels_playing -= channel channels_idle += channel - for(var/i in hearing_mobs) - var/mob/M = i + for(var/mob/M as anything in hearing_mobs) M.stop_sound_channel(channelnumber) else - for(var/i in hearing_mobs) - var/mob/M = i + for(var/mob/M as anything in hearing_mobs) M.set_sound_channel_volume(channelnumber, (current_volume * 0.01) * volume * using_instrument.volume_multiplier) diff --git a/code/modules/integrated_electronics/subtypes/converters.dm b/code/modules/integrated_electronics/subtypes/converters.dm index 316742e488..ada8eadbc6 100644 --- a/code/modules/integrated_electronics/subtypes/converters.dm +++ b/code/modules/integrated_electronics/subtypes/converters.dm @@ -361,7 +361,7 @@ var/saturation = get_pin_data(IC_INPUT, 2) var/value = get_pin_data(IC_INPUT, 3) if(isnum(hue) && isnum(saturation) && isnum(value)) - result = HSVtoRGB(hsv(AngleToHue(hue),saturation,value)) + result = rgb(h = hue, s = saturation, v = value, space = COLORSPACE_HSV) set_pin_data(IC_OUTPUT, 1, result) push_data() diff --git a/code/modules/library/lib_machines.dm b/code/modules/library/lib_machines.dm index 50980217a3..adec042a0f 100644 --- a/code/modules/library/lib_machines.dm +++ b/code/modules/library/lib_machines.dm @@ -82,7 +82,7 @@ title = null title = sanitizeSQL(title) if(href_list["setcategory"]) - var/newcategory = tgui_input_list(usr, "Choose a category to search for:", list("Any", "Fiction", "Non-Fiction", "Adult", "Reference", "Religion")) + var/newcategory = tgui_input_list(usr, "Choose a category to search for:", "Category", list("Any", "Fiction", "Non-Fiction", "Adult", "Reference", "Religion")) if(newcategory) category = sanitize(newcategory) else @@ -397,7 +397,7 @@ if(newauthor) scanner.cache.author = newauthor if(href_list["setcategory"]) - var/newcategory = tgui_input_list(usr, "Choose a category: ", list("Fiction", "Non-Fiction", "Adult", "Reference", "Religion")) + var/newcategory = tgui_input_list(usr, "Choose a category: ", "Category", list("Fiction", "Non-Fiction", "Adult", "Reference", "Religion")) if(newcategory) upload_category = newcategory diff --git a/code/modules/looking_glass/lg_area.dm b/code/modules/looking_glass/lg_area.dm index b17c67449f..25d3bd7a3d 100644 --- a/code/modules/looking_glass/lg_area.dm +++ b/code/modules/looking_glass/lg_area.dm @@ -38,8 +38,7 @@ /area/looking_glass/proc/begin_program(var/image/newimage) if(!active) - for(var/trf in our_turfs) - var/turf/simulated/floor/looking_glass/lgt = trf + for(var/turf/simulated/floor/looking_glass/lgt as anything in our_turfs) lgt.activate() our_landmark.take_image(newimage) @@ -47,8 +46,7 @@ /area/looking_glass/proc/end_program() if(active) - for(var/trf in our_turfs) - var/turf/simulated/floor/looking_glass/lgt = trf + for(var/turf/simulated/floor/looking_glass/lgt as anything in our_turfs) lgt.deactivate() active = FALSE @@ -57,8 +55,7 @@ our_landmark.drop_image() /area/looking_glass/proc/toggle_optional(var/transparent) - for(var/trf in our_optional_turfs) - var/turf/simulated/floor/looking_glass/lgt = trf + for(var/turf/simulated/floor/looking_glass/lgt as anything in our_optional_turfs) lgt.center = !transparent if(active) lgt.deactivate() diff --git a/code/modules/maps/tg/map_template.dm b/code/modules/maps/tg/map_template.dm index 8cc742c508..3e530206a4 100644 --- a/code/modules/maps/tg/map_template.dm +++ b/code/modules/maps/tg/map_template.dm @@ -49,8 +49,7 @@ var/list/obj/machinery/atmospherics/atmos_machines = list() var/list/turf/turfs = block(locate(bounds[MAP_MINX], bounds[MAP_MINY], bounds[MAP_MINZ]), locate(bounds[MAP_MAXX], bounds[MAP_MAXY], bounds[MAP_MAXZ])) - for(var/L in turfs) - var/turf/B = L + for(var/turf/B as anything in turfs) atoms += B areas |= B.loc for(var/A in B) @@ -71,8 +70,7 @@ SSmachines.setup_powernets_for_cables(cables) // Ensure all machines in loaded areas get notified of power status - for(var/I in areas) - var/area/A = I + for(var/area/A as anything in areas) A.power_change() if(machinery_was_awake) diff --git a/code/modules/media/media_machinery.dm b/code/modules/media/media_machinery.dm index 3957ff9005..bbde62a347 100644 --- a/code/modules/media/media_machinery.dm +++ b/code/modules/media/media_machinery.dm @@ -48,8 +48,7 @@ // Update Media Source. A.media_source = null // Clients - for(var/m in mobs_in_area(A)) - var/mob/M = m + for(var/mob/M as anything in mobs_in_area(A)) M.update_music() master_area = null diff --git a/code/modules/mining/abandonedcrates.dm b/code/modules/mining/abandonedcrates.dm index 199b1ed0d0..2896f7feea 100644 --- a/code/modules/mining/abandonedcrates.dm +++ b/code/modules/mining/abandonedcrates.dm @@ -58,7 +58,7 @@ if(53 to 54) new/obj/item/latexballon(src) if(55 to 56) - var/newitem = pick(typesof(/obj/item/toy/mecha) - /obj/item/toy/mecha) + var/newitem = pick(subtypesof(/obj/item/toy/mecha)) new newitem(src) if(57 to 58) new/obj/item/toy/syndicateballoon(src) @@ -77,7 +77,7 @@ if(67 to 68) var/t = rand(4,7) for(var/i = 0, i < t, ++i) - var/newitem = pick(typesof(/obj/item/weapon/stock_parts) - /obj/item/weapon/stock_parts - /obj/item/weapon/stock_parts/subspace) + var/newitem = pick(subtypesof(/obj/item/weapon/stock_parts) - /obj/item/weapon/stock_parts/subspace) new newitem(src) if(69 to 70) new/obj/item/weapon/pickaxe/silver(src) diff --git a/code/modules/mining/alloys.dm b/code/modules/mining/alloys.dm index 219a2becdb..4ca7e64571 100644 --- a/code/modules/mining/alloys.dm +++ b/code/modules/mining/alloys.dm @@ -44,7 +44,7 @@ "sand" = 2 ) product = /obj/item/stack/material/glass/phoronglass - +/* /datum/alloy/bronze metaltag = "bronze" requires = list( @@ -52,3 +52,4 @@ "tin" = 1 ) product = /obj/item/stack/material/bronze +*/ \ No newline at end of file diff --git a/code/modules/mining/drilling/drill.dm b/code/modules/mining/drilling/drill.dm index f1b8816c8a..b8618ccf86 100644 --- a/code/modules/mining/drilling/drill.dm +++ b/code/modules/mining/drilling/drill.dm @@ -28,9 +28,9 @@ "hydrogen" = /obj/item/weapon/ore/hydrogen, "silicates" = /obj/item/weapon/ore/glass, "carbon" = /obj/item/weapon/ore/coal, - "copper" = /obj/item/weapon/ore/copper, + // "copper" = /obj/item/weapon/ore/copper, // "tin" = /obj/item/weapon/ore/tin, - "bauxite" = /obj/item/weapon/ore/bauxite, + // "bauxite" = /obj/item/weapon/ore/bauxite, "rutile" = /obj/item/weapon/ore/rutile ) @@ -44,14 +44,14 @@ // Found with an advanced laser. exotic_drilling >= 1 var/list/ore_types_uncommon = list( MAT_MARBLE = /obj/item/weapon/ore/marble, - "painite" = /obj/item/weapon/ore/painite, - "quartz" = /obj/item/weapon/ore/quartz, + //"painite" = /obj/item/weapon/ore/painite, + //"quartz" = /obj/item/weapon/ore/quartz, MAT_LEAD = /obj/item/weapon/ore/lead ) // Found with an ultra laser. exotic_drilling >= 2 var/list/ore_types_rare = list( - "void opal" = /obj/item/weapon/ore/void_opal, + //"void opal" = /obj/item/weapon/ore/void_opal, MAT_VERDANTIUM = /obj/item/weapon/ore/verdantium ) diff --git a/code/modules/mining/drilling/scanner.dm b/code/modules/mining/drilling/scanner.dm index 302216b8d4..9d6eea4607 100644 --- a/code/modules/mining/drilling/scanner.dm +++ b/code/modules/mining/drilling/scanner.dm @@ -41,13 +41,13 @@ var/ore_type switch(metal) - if("silicates", "carbon", "marble", "quartz") ore_type = "surface minerals" - if("hematite", "tin", "copper", "bauxite", "lead") ore_type = "industrial metals" + if("silicates", "carbon", "marble", /*"quartz"*/) ore_type = "surface minerals" + if("hematite", /*"tin", "copper", "bauxite",*/ "lead") ore_type = "industrial metals" if("gold", "silver", "rutile") ore_type = "precious metals" - if("diamond", "painite") ore_type = "precious gems" + if("diamond", /*"painite"*/) ore_type = "precious gems" if("uranium") ore_type = "nuclear fuel" if("phoron", "osmium", "hydrogen") ore_type = "exotic matter" - if("verdantium", "void opal") ore_type = "anomalous matter" + if("verdantium", /*"void opal"*/) ore_type = "anomalous matter" if(ore_type) metals[ore_type] += T.resources[metal] diff --git a/code/modules/mining/fulton.dm b/code/modules/mining/fulton.dm index f5c74a2f8b..c5c939b2f1 100644 --- a/code/modules/mining/fulton.dm +++ b/code/modules/mining/fulton.dm @@ -18,8 +18,7 @@ var/global/list/total_extraction_beacons = list() /obj/item/extraction_pack/attack_self(mob/user) var/list/possible_beacons = list() - for(var/B in global.total_extraction_beacons) - var/obj/structure/extraction_point/EP = B + for(var/obj/structure/extraction_point/EP as anything in global.total_extraction_beacons) if(EP.beacon_network in beacon_networks) possible_beacons += EP diff --git a/code/modules/mining/machinery/machine_stacking.dm b/code/modules/mining/machinery/machine_stacking.dm index 030c52f764..b0b2a7890e 100644 --- a/code/modules/mining/machinery/machine_stacking.dm +++ b/code/modules/mining/machinery/machine_stacking.dm @@ -89,11 +89,10 @@ /obj/machinery/mineral/stacking_machine/New() ..() - for(var/stacktype in (subtypesof(/obj/item/stack/material) - typesof(/obj/item/stack/material/cyborg))) - var/obj/item/stack/material/S = stacktype + for(var/obj/item/stack/material/S as anything in (subtypesof(/obj/item/stack/material) - typesof(/obj/item/stack/material/cyborg))) var/s_matname = initial(S.default_type) stack_storage[s_matname] = 0 - stack_paths[s_matname] = stacktype + stack_paths[s_matname] = S spawn( 5 ) for (var/dir in cardinal) diff --git a/code/modules/mining/mine_turfs.dm b/code/modules/mining/mine_turfs.dm index 9155f054a4..174fb7ad91 100644 --- a/code/modules/mining/mine_turfs.dm +++ b/code/modules/mining/mine_turfs.dm @@ -63,9 +63,9 @@ var/list/mining_overlay_cache = list() "verdantium" = /obj/item/weapon/ore/verdantium, "marble" = /obj/item/weapon/ore/marble, "lead" = /obj/item/weapon/ore/lead, - "copper" = /obj/item/weapon/ore/copper, +// "copper" = /obj/item/weapon/ore/copper, // "tin" = /obj/item/weapon/ore/tin, - "bauxite" = /obj/item/weapon/ore/bauxite, +// "bauxite" = /obj/item/weapon/ore/bauxite, // "void opal" = /obj/item/weapon/ore/void_opal, // "painite" = /obj/item/weapon/ore/painite, // "quartz" = /obj/item/weapon/ore/quartz, @@ -689,10 +689,10 @@ var/list/mining_overlay_cache = list() var/mineral_name if(rare_ore) - mineral_name = pickweight(list("marble" = 5,/* "quartz" = 15,*/ "copper" = 10, /*"tin" = 5,*/ "bauxite" = 5, "uranium" = 15, "platinum" = 20, "hematite" = 15, "rutile" = 20, "carbon" = 15, "diamond" = 3, "gold" = 15, "silver" = 15, "phoron" = 25, "lead" = 5,/* "void opal" = 1,*/ "verdantium" = 2/*, "painite" = 1*/)) + mineral_name = pickweight(list("marble" = 5,/* "quartz" = 15, "copper" = 10, "tin" = 5, "bauxite" = 5*/, "uranium" = 15, "platinum" = 20, "hematite" = 15, "rutile" = 20, "carbon" = 15, "diamond" = 3, "gold" = 15, "silver" = 15, "phoron" = 25, "lead" = 5,/* "void opal" = 1,*/ "verdantium" = 2/*, "painite" = 1*/)) else - mineral_name = pickweight(list("marble" = 3,/* "quartz" = 10,*/ "copper" = 20, /*"tin" = 15,*/ "bauxite" = 15, "uranium" = 10, "platinum" = 10, "hematite" = 70, "rutile" = 15, "carbon" = 70, "diamond" = 2, "gold" = 10, "silver" = 10, "phoron" = 20, "lead" = 3,/* "void opal" = 1,*/ "verdantium" = 1/*, "painite" = 1*/)) + mineral_name = pickweight(list("marble" = 3,/* "quartz" = 10, "copper" = 20, "tin" = 15, "bauxite" = 15*/, "uranium" = 10, "platinum" = 10, "hematite" = 70, "rutile" = 15, "carbon" = 70, "diamond" = 2, "gold" = 10, "silver" = 10, "phoron" = 20, "lead" = 3,/* "void opal" = 1,*/ "verdantium" = 1/*, "painite" = 1*/)) if(mineral_name && (mineral_name in GLOB.ore_data)) mineral = GLOB.ore_data[mineral_name] diff --git a/code/modules/mining/ore.dm b/code/modules/mining/ore.dm index dc95d0e082..4fc2091b03 100644 --- a/code/modules/mining/ore.dm +++ b/code/modules/mining/ore.dm @@ -106,7 +106,7 @@ icon_state = "ore_lead" material = MAT_LEAD origin_tech = list(TECH_MATERIAL = 3) - +/* /obj/item/weapon/ore/copper name = "raw copper" icon_state = "ore_copper" @@ -121,12 +121,12 @@ name = "raw bauxite" icon_state = "ore_bauxite" material = "bauxite" - +*/ /obj/item/weapon/ore/rutile name = "raw rutile" icon_state = "ore_rutile" material = "rutile" - +/* /obj/item/weapon/ore/void_opal name = "raw void opal" icon_state = "ore_void_opal" @@ -141,7 +141,7 @@ name = "raw quartz" icon_state = "ore_quartz" material = "quartz" - +*/ /obj/item/weapon/ore/slag name = "Slag" desc = "Someone screwed up..." diff --git a/code/modules/mining/ore_datum.dm b/code/modules/mining/ore_datum.dm index 5a26dcf0fd..382e31b8bd 100644 --- a/code/modules/mining/ore_datum.dm +++ b/code/modules/mining/ore_datum.dm @@ -175,7 +175,7 @@ ore = /obj/item/weapon/ore/lead scan_icon = "mineral_rare" reagent = "lead" - +/* /ore/copper name = "copper" display_name = "copper" @@ -215,7 +215,7 @@ ore = /obj/item/weapon/ore/bauxite scan_icon = "mineral_common" reagent = "aluminum" - +*/ /ore/rutile name = "rutile" display_name = "rutile" @@ -225,7 +225,7 @@ alloy = 1 ore = /obj/item/weapon/ore/rutile scan_icon = "mineral_uncommon" - +/* /ore/painite name = "painite" display_name = "rough painite" @@ -243,3 +243,4 @@ spread_chance = 1 ore = /obj/item/weapon/ore/void_opal scan_icon = "mineral_rare" +*/ \ No newline at end of file diff --git a/code/modules/mob/animations.dm b/code/modules/mob/animations.dm index 9b9ce3957f..fe64242795 100644 --- a/code/modules/mob/animations.dm +++ b/code/modules/mob/animations.dm @@ -237,8 +237,7 @@ note dizziness decrements automatically in the mob's Life() proc. //Check for clients with pref enabled var/list/viewing = list() - for(var/m in viewers(A)) - var/mob/M = m + for(var/mob/M as anything in viewers(A)) var/client/C = M.client if(C && C.is_preference_enabled(/datum/client_preference/attack_icons)) viewing += M.client diff --git a/code/modules/mob/dead/observer/observer.dm b/code/modules/mob/dead/observer/observer.dm index 9e80b75da5..f7ce6d3b10 100644 --- a/code/modules/mob/dead/observer/observer.dm +++ b/code/modules/mob/dead/observer/observer.dm @@ -341,6 +341,8 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp var/area/A = areas[key] if(A.z in using_map?.secret_levels) areas -= key + if(A.z in using_map?.hidden_levels) + areas -= key return areas @@ -353,10 +355,12 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp var/mobz = get_z(mobs[key]) if(mobz in using_map?.secret_levels) mobs -= key + if(mobz in using_map?.hidden_levels) + mobs -= key return mobs -/mob/observer/dead/verb/dead_tele(areaname as null|anything in jumpable_areas()) +/mob/observer/dead/verb/dead_tele(areaname as anything in jumpable_areas()) set name = "Teleport" set category = "Ghost" set desc = "Teleport to a location." @@ -383,7 +387,7 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp usr.forceMove(pick(get_area_turfs(A || jumpable_areas()[areaname]))) usr.on_mob_jump() -/mob/observer/dead/verb/follow(mobname as null|anything in jumpable_mobs()) +/mob/observer/dead/verb/follow(mobname as anything in jumpable_mobs()) set name = "Follow" set category = "Ghost" set desc = "Follow and haunt a mob." diff --git a/code/modules/mob/freelook/ai/chunk.dm b/code/modules/mob/freelook/ai/chunk.dm index 2a689c1473..ebd68a6206 100644 --- a/code/modules/mob/freelook/ai/chunk.dm +++ b/code/modules/mob/freelook/ai/chunk.dm @@ -7,8 +7,7 @@ var/list/cameras = list() /datum/chunk/camera/acquireVisibleTurfs(var/list/visible) - for(var/camera in cameras) - var/obj/machinery/camera/c = camera + for(var/obj/machinery/camera/c as anything in cameras) if(!istype(c)) cameras -= c diff --git a/code/modules/mob/freelook/chunk.dm b/code/modules/mob/freelook/chunk.dm index da2d84701c..4ae5d3a590 100644 --- a/code/modules/mob/freelook/chunk.dm +++ b/code/modules/mob/freelook/chunk.dm @@ -86,20 +86,17 @@ visibleTurfs = newVisibleTurfs obscuredTurfs = turfs - newVisibleTurfs - for(var/turf in visAdded) - var/turf/t = turf + for(var/turf/t as anything in visAdded) if(LAZYLEN(t.obfuscations) && t.obfuscations[obfuscation.type]) obscured -= t.obfuscations[obfuscation.type] - for(var/eye in seenby) - var/mob/observer/eye/m = eye + for(var/mob/observer/eye/m as anything in seenby) if(!m) continue var/client/client = m.GetViewerClient() if(client) client.images -= t.obfuscations[obfuscation.type] - for(var/turf in visRemoved) - var/turf/t = turf + for(var/turf/t as anything in visRemoved) if(obscuredTurfs[t]) LAZYINITLIST(t.obfuscations) if(!t.obfuscations[obfuscation.type]) @@ -108,8 +105,7 @@ t.obfuscations[obfuscation.type] = ob_image obscured += t.obfuscations[obfuscation.type] - for(var/eye in seenby) - var/mob/observer/eye/m = eye + for(var/mob/observer/eye/m as anything in seenby) if(!m) seenby -= m continue @@ -142,8 +138,7 @@ obscuredTurfs = turfs - visibleTurfs - for(var/turf in obscuredTurfs) - var/turf/t = turf + for(var/turf/t as anything in obscuredTurfs) LAZYINITLIST(t.obfuscations) if(!t.obfuscations[obfuscation.type]) var/image/ob_image = image(obfuscation.icon, t, obfuscation.icon_state, OBFUSCATION_LAYER) diff --git a/code/modules/mob/freelook/visualnet.dm b/code/modules/mob/freelook/visualnet.dm index 44cd9278cc..1508a30133 100644 --- a/code/modules/mob/freelook/visualnet.dm +++ b/code/modules/mob/freelook/visualnet.dm @@ -49,8 +49,7 @@ var/list/chunks_pre_seen = list() var/list/chunks_post_seen = list() - for(var/V in moved_eyes) - var/mob/observer/eye/eye = V + for(var/mob/observer/eye/eye as anything in moved_eyes) if(C) chunks_pre_seen |= eye.visibleChunks // 0xf = 15 @@ -69,31 +68,26 @@ var/list/remove = eye.visibleChunks - visibleChunks var/list/add = visibleChunks - eye.visibleChunks - for(var/chunk in remove) - var/datum/chunk/c = chunk + for(var/datum/chunk/c as anything in remove) c.remove(eye, FALSE) - for(var/chunk in add) - var/datum/chunk/c = chunk + for(var/datum/chunk/c as anything in add) c.add(eye, FALSE) if(C) chunks_post_seen |= eye.visibleChunks if(C) - for(var/V in other_eyes) - var/mob/observer/eye/eye = V + for(var/mob/observer/eye/eye as anything in other_eyes) chunks_post_seen |= eye.visibleChunks var/list/remove = chunks_pre_seen - chunks_post_seen var/list/add = chunks_post_seen - chunks_pre_seen - for(var/chunk in remove) - var/datum/chunk/c = chunk + for(var/datum/chunk/c as anything in remove) C.images -= c.obscured - for(var/chunk in add) - var/datum/chunk/c = chunk + for(var/datum/chunk/c as anything in add) C.images += c.obscured // Updates the chunks that the turf is located in. Use this when obstacles are destroyed or when doors open. diff --git a/code/modules/mob/living/carbon/alien/alien.dm b/code/modules/mob/living/carbon/alien/alien.dm index a90553b2e5..35aca42244 100644 --- a/code/modules/mob/living/carbon/alien/alien.dm +++ b/code/modules/mob/living/carbon/alien/alien.dm @@ -43,10 +43,6 @@ /mob/living/carbon/alien/u_equip(obj/item/W as obj) return -/*/mob/living/carbon/alien/Stat() //CHOMPedit. Commented out because this doesn't work properly for larva, when it should. Will probably give Diona their own kind of they don't have one - ..() - stat(null, "Progress: [amount_grown]/[max_grown]") */ - /mob/living/carbon/alien/restrained() return 0 diff --git a/code/modules/mob/living/carbon/alien/diona/progression.dm b/code/modules/mob/living/carbon/alien/diona/progression.dm index 1fd40b4311..6a8d0864f4 100644 --- a/code/modules/mob/living/carbon/alien/diona/progression.dm +++ b/code/modules/mob/living/carbon/alien/diona/progression.dm @@ -1,3 +1,8 @@ +/mob/living/carbon/alien/diona/Stat() //Specified where progression is at, doesn't work right for some things in carbon/alien + . = ..() + if(. && statpanel("Status")) + stat("Growth", "[round(amount_grown)]/[max_grown]") + /mob/living/carbon/alien/diona/confirm_evolution() if(!is_alien_whitelisted(src, GLOB.all_species[SPECIES_DIONA])) diff --git a/code/modules/mob/living/carbon/alien/larva/larva.dm b/code/modules/mob/living/carbon/alien/larva/larva.dm index 6582b5f6a8..41630f8282 100644 --- a/code/modules/mob/living/carbon/alien/larva/larva.dm +++ b/code/modules/mob/living/carbon/alien/larva/larva.dm @@ -5,10 +5,10 @@ speak_emote = list("hisses") icon_state = "larva" language = "Hivemind" - maxHealth = 50 //CHOMPedit. Larva can gain a little more health on weeds/phoron to make them just a little harder to kill - health = 25 + maxHealth = 50 + health = 50 faction = "xeno" - max_grown = 325 //CHOMPedit. Since xenos can reproduce without people now I decided to drastically increase the growth time + max_grown = 325 //Increase larva growth time due to not needing hosts. /mob/living/carbon/alien/larva/Initialize() . = ..() diff --git a/code/modules/mob/living/carbon/alien/larva/progression.dm b/code/modules/mob/living/carbon/alien/larva/progression.dm index 21cd101f50..2318c87187 100644 --- a/code/modules/mob/living/carbon/alien/larva/progression.dm +++ b/code/modules/mob/living/carbon/alien/larva/progression.dm @@ -1,4 +1,4 @@ -/mob/living/carbon/alien/larva/Stat() //CHOMPedit. Oh thank god we can see how close we are to full grown now +/mob/living/carbon/alien/larva/Stat() //Specified where progression stats come from, because for some reason it doesn't work right in carbon/alien . = ..() if(. && statpanel("Status")) stat("Growth", "[round(amount_grown)]/[max_grown]") diff --git a/code/modules/mob/living/carbon/alien/life.dm b/code/modules/mob/living/carbon/alien/life.dm index 7eee938239..64e5145b97 100644 --- a/code/modules/mob/living/carbon/alien/life.dm +++ b/code/modules/mob/living/carbon/alien/life.dm @@ -28,7 +28,7 @@ var/rads = radiation/25 radiation -= rads - /*adjust_nutrition(rads)*/ //CHOMPedit. Commented out to prevent xeno/diona obesity, it was a real problem + //adjust_nutrition(rads) //Commented out to prevent alien obesity. heal_overall_damage(rads,rads) adjustOxyLoss(-(rads)) adjustToxLoss(-(rads)) diff --git a/code/modules/mob/living/carbon/human/MedicalSideEffects.dm b/code/modules/mob/living/carbon/human/MedicalSideEffects.dm index 9af2957074..6946f26a80 100644 --- a/code/modules/mob/living/carbon/human/MedicalSideEffects.dm +++ b/code/modules/mob/living/carbon/human/MedicalSideEffects.dm @@ -56,7 +56,7 @@ if(life_tick % 15 != 0) return 0 - var/list/L = typesof(/datum/medical_effect)-/datum/medical_effect + var/list/L = subtypesof(/datum/medical_effect) for(var/T in L) var/datum/medical_effect/M = new T if (M.manifest(src)) diff --git a/code/modules/mob/living/carbon/human/chem_side_effects.dm b/code/modules/mob/living/carbon/human/chem_side_effects.dm index 9af2957074..6946f26a80 100644 --- a/code/modules/mob/living/carbon/human/chem_side_effects.dm +++ b/code/modules/mob/living/carbon/human/chem_side_effects.dm @@ -56,7 +56,7 @@ if(life_tick % 15 != 0) return 0 - var/list/L = typesof(/datum/medical_effect)-/datum/medical_effect + var/list/L = subtypesof(/datum/medical_effect) for(var/T in L) var/datum/medical_effect/M = new T if (M.manifest(src)) diff --git a/code/modules/mob/living/carbon/human/emote_vr.dm b/code/modules/mob/living/carbon/human/emote_vr.dm index 0b73e71514..9ba2ca4ad5 100644 --- a/code/modules/mob/living/carbon/human/emote_vr.dm +++ b/code/modules/mob/living/carbon/human/emote_vr.dm @@ -36,7 +36,7 @@ set name = "Set Gender Identity" set desc = "Sets the pronouns when examined and performing an emote." set category = "IC" - var/new_gender_identity = tgui_input_list(usr, "Please select a gender Identity.", list(FEMALE, MALE, NEUTER, PLURAL, HERM)) + var/new_gender_identity = tgui_input_list(usr, "Please select a gender Identity:", "Set Gender Identity", list(FEMALE, MALE, NEUTER, PLURAL, HERM)) if(!new_gender_identity) return 0 change_gender_identity(new_gender_identity) diff --git a/code/modules/mob/living/carbon/human/human.dm b/code/modules/mob/living/carbon/human/human.dm index c61b4724d5..1ed1ad847d 100644 --- a/code/modules/mob/living/carbon/human/human.dm +++ b/code/modules/mob/living/carbon/human/human.dm @@ -751,7 +751,7 @@ update_eyes() // hair - var/list/all_hairs = typesof(/datum/sprite_accessory/hair) - /datum/sprite_accessory/hair + var/list/all_hairs = subtypesof(/datum/sprite_accessory/hair) var/list/hairs = list() // loop through potential hairs @@ -767,7 +767,7 @@ h_style = new_style // facial hair - var/list/all_fhairs = typesof(/datum/sprite_accessory/facial_hair) - /datum/sprite_accessory/facial_hair + var/list/all_fhairs = subtypesof(/datum/sprite_accessory/facial_hair) var/list/fhairs = list() for(var/x in all_fhairs) diff --git a/code/modules/mob/living/carbon/human/human_defense.dm b/code/modules/mob/living/carbon/human/human_defense.dm index 62fef2744d..e43a1de6b6 100644 --- a/code/modules/mob/living/carbon/human/human_defense.dm +++ b/code/modules/mob/living/carbon/human/human_defense.dm @@ -135,8 +135,7 @@ emp_act siemens_coefficient *= C.siemens_coefficient // Modifiers. - for(var/thing in modifiers) - var/datum/modifier/M = thing + for(var/datum/modifier/M as anything in modifiers) if(!isnull(M.siemens_coefficient)) siemens_coefficient *= M.siemens_coefficient @@ -181,8 +180,7 @@ emp_act for(var/obj/item/clothing/gear in protective_gear) protection += gear.armor[type] - for(var/thing in modifiers) - var/datum/modifier/M = thing + for(var/datum/modifier/M as anything in modifiers) var/modifier_armor = LAZYACCESS(M.armor_percent, type) if(modifier_armor) protection += modifier_armor @@ -197,8 +195,7 @@ emp_act for(var/obj/item/clothing/gear in protective_gear) soaked += gear.armorsoak[type] - for(var/thing in modifiers) - var/datum/modifier/M = thing + for(var/datum/modifier/M as anything in modifiers) var/modifier_armor = LAZYACCESS(M.armor_flat, type) if(modifier_armor) soaked += modifier_armor diff --git a/code/modules/mob/living/carbon/human/human_modular_limbs.dm b/code/modules/mob/living/carbon/human/human_modular_limbs.dm index 81d4af05ce..4010a2d487 100644 --- a/code/modules/mob/living/carbon/human/human_modular_limbs.dm +++ b/code/modules/mob/living/carbon/human/human_modular_limbs.dm @@ -58,8 +58,7 @@ // Checks the organ list for limbs meeting a predicate. Way overengineered for such a limited use // case but I can see it being expanded in the future if meat limbs or doona limbs use it. /mob/living/carbon/human/proc/get_modular_limbs(var/return_first_found = FALSE, var/validate_proc) - for(var/bp in organs) - var/obj/item/organ/external/E = bp + for(var/obj/item/organ/external/E as anything in organs) if(!validate_proc || call(E, validate_proc)(src) > MODULAR_BODYPART_INVALID) LAZYADD(., E) if(return_first_found) @@ -67,8 +66,7 @@ // Prune children so we can't remove every individual component of an entire prosthetic arm // piece by piece. Technically a circular dependency here would remove the limb entirely but // if there's a parent whose child is also its parent, there's something wrong regardless. - for(var/bp in .) - var/obj/item/organ/external/E = bp + for(var/obj/item/organ/external/E as anything in .) if(length(E.children)) . -= E.children diff --git a/code/modules/mob/living/carbon/human/life.dm b/code/modules/mob/living/carbon/human/life.dm index d091f43298..cc5ad6f2ff 100644 --- a/code/modules/mob/living/carbon/human/life.dm +++ b/code/modules/mob/living/carbon/human/life.dm @@ -846,8 +846,7 @@ . = 1 - . // Invert from 1 = immunity to 0 = immunity. // Doing it this way makes multiplicative stacking not get out of hand, so two modifiers that give 0.5 protection will be combined to 0.75 in the end. - for(var/thing in modifiers) - var/datum/modifier/M = thing + for(var/datum/modifier/M as anything in modifiers) if(!isnull(M.heat_protection)) . *= 1 - M.heat_protection @@ -866,8 +865,7 @@ . = 1 - . // Invert from 1 = immunity to 0 = immunity. // Doing it this way makes multiplicative stacking not get out of hand, so two modifiers that give 0.5 protection will be combined to 0.75 in the end. - for(var/thing in modifiers) - var/datum/modifier/M = thing + for(var/datum/modifier/M as anything in modifiers) if(!isnull(M.cold_protection)) // Invert the modifier values so they align with the current working value. . *= 1 - M.cold_protection diff --git a/code/modules/mob/living/carbon/human/species/outsider/event.dm b/code/modules/mob/living/carbon/human/species/outsider/event.dm index f88768aa74..32c3314b0b 100644 --- a/code/modules/mob/living/carbon/human/species/outsider/event.dm +++ b/code/modules/mob/living/carbon/human/species/outsider/event.dm @@ -112,7 +112,6 @@ Variables you may want to make use of are: ) var/use_bodyshape = SPECIES_HUMAN - var/waterbreathing = 0 var/overcome_gravity = 0 var/hover = 0 @@ -199,7 +198,7 @@ Variables you may want to make use of are: /datum/species/event1/proc/toggle_cloning() flags ^= NO_SCAN - + /datum/species/event1/proc/toggle_defibbing() flags ^= NO_DEFIB @@ -215,9 +214,6 @@ Variables you may want to make use of are: /datum/species/event1/get_bodytype(var/mob/living/carbon/human/H) //Default to human sprites, if they're based on another species, var edit use_bodyshape to the correct thing in _defines/mobs.dm of the species you want to use. return use_bodyshape -/datum/species/event1/can_breathe_water() - return waterbreathing - /datum/species/event1/can_overcome_gravity(var/mob/living/carbon/human/H) return overcome_gravity diff --git a/code/modules/mob/living/carbon/human/species/shadekin/shadekin.dm b/code/modules/mob/living/carbon/human/species/shadekin/shadekin.dm index 5cf9fa8f73..2e589f3fbb 100644 --- a/code/modules/mob/living/carbon/human/species/shadekin/shadekin.dm +++ b/code/modules/mob/living/carbon/human/species/shadekin/shadekin.dm @@ -74,6 +74,7 @@ breath_type = null poison_type = null + water_breather = TRUE //They don't quite breathe vision_flags = SEE_SELF|SEE_MOBS appearance_flags = HAS_HAIR_COLOR | HAS_LIPS | HAS_SKIN_COLOR | HAS_EYE_COLOR | HAS_UNDERWEAR @@ -135,9 +136,6 @@ /datum/species/shadekin/handle_environment_special(var/mob/living/carbon/human/H) handle_shade(H) -/datum/species/shadekin/can_breathe_water() - return TRUE //they dont quite breathe - /datum/species/shadekin/add_inherent_verbs(var/mob/living/carbon/human/H) ..() add_shadekin_abilities(H) diff --git a/code/modules/mob/living/carbon/human/species/shadekin/shadekin_abilities.dm b/code/modules/mob/living/carbon/human/species/shadekin/shadekin_abilities.dm index 6f81a53f6b..b26d57a82b 100644 --- a/code/modules/mob/living/carbon/human/species/shadekin/shadekin_abilities.dm +++ b/code/modules/mob/living/carbon/human/species/shadekin/shadekin_abilities.dm @@ -91,8 +91,7 @@ ability_flags &= ~AB_PHASE_SHIFTED mouse_opacity = 1 name = real_name - for(var/belly in vore_organs) - var/obj/belly/B = belly + for(var/obj/belly/B as anything in vore_organs) B.escapable = initial(B.escapable) //cut_overlays() @@ -140,8 +139,7 @@ custom_emote(1,"phases out!") name = "Something" - for(var/belly in vore_organs) - var/obj/belly/B = belly + for(var/obj/belly/B as anything in vore_organs) B.escapable = FALSE var/obj/effect/temp_visual/shadekin/phase_out/phaseanim = new /obj/effect/temp_visual/shadekin/phase_out(src.loc) diff --git a/code/modules/mob/living/carbon/human/species/species.dm b/code/modules/mob/living/carbon/human/species/species.dm index d63681898d..b93a56b3db 100644 --- a/code/modules/mob/living/carbon/human/species/species.dm +++ b/code/modules/mob/living/carbon/human/species/species.dm @@ -132,6 +132,7 @@ var/breath_type = "oxygen" // Non-oxygen gas breathed, if any. var/poison_type = "phoron" // Poisonous air. var/exhale_type = "carbon_dioxide" // Exhaled gas type. + var/water_breather = FALSE var/body_temperature = 310.15 // Species will try to stabilize at this temperature. (also affects temperature processing) @@ -504,7 +505,7 @@ // Called when lying down on a water tile. /datum/species/proc/can_breathe_water() - return FALSE + return water_breather // Impliments different trails for species depending on if they're wearing shoes. /datum/species/proc/get_move_trail(var/mob/living/carbon/human/H) diff --git a/code/modules/mob/living/carbon/human/species/species_attack.dm b/code/modules/mob/living/carbon/human/species/species_attack.dm index 3b38201206..5e2aaafb8e 100644 --- a/code/modules/mob/living/carbon/human/species/species_attack.dm +++ b/code/modules/mob/living/carbon/human/species/species_attack.dm @@ -64,11 +64,11 @@ /datum/unarmed_attack/claws/strong/xeno attack_verb = list("slashed", "gouged", "stabbed") - damage = 10 + damage = 15 /datum/unarmed_attack/claws/strong/xeno/queen attack_verb = list("slashed", "gouged", "stabbed", "gored") - damage = 15 + damage = 20 /datum/unarmed_attack/bite/strong attack_name = "strong bite" @@ -77,7 +77,7 @@ shredding = 1 /datum/unarmed_attack/bite/strong/xeno - damage = 10 + damage = 15 /datum/unarmed_attack/slime_glomp attack_name = "glomp" diff --git a/code/modules/mob/living/carbon/human/species/species_shapeshift.dm b/code/modules/mob/living/carbon/human/species/species_shapeshift.dm index d616b7dc1e..ac4929b13e 100644 --- a/code/modules/mob/living/carbon/human/species/species_shapeshift.dm +++ b/code/modules/mob/living/carbon/human/species/species_shapeshift.dm @@ -177,8 +177,7 @@ var/list/wrapped_species_by_ref = list() last_special = world.time + 50 - var/current = RGBdec2hex(list(r_skin, g_skin, b_skin)) - var/new_skin = input(usr, "Please select a new body color.", "Shapeshifter Colour", current) as null|color + var/new_skin = input(usr, "Please select a new body color.", "Shapeshifter Colour", rgb(r_skin, g_skin, b_skin)) as null|color if(!new_skin) return shapeshifter_set_colour(new_skin) diff --git a/code/modules/mob/living/carbon/human/species/species_shapeshift_vr.dm b/code/modules/mob/living/carbon/human/species/species_shapeshift_vr.dm index aab6fdd40b..fbd1921c55 100644 --- a/code/modules/mob/living/carbon/human/species/species_shapeshift_vr.dm +++ b/code/modules/mob/living/carbon/human/species/species_shapeshift_vr.dm @@ -171,8 +171,7 @@ last_special = world.time + 50 - for(var/limb in src.organs) - var/obj/item/organ/external/L = limb + for(var/obj/item/organ/external/L as anything in src.organs) L.transparent = !L.transparent visible_message("\The [src]'s interal composition seems to change.") update_icons_body() diff --git a/code/modules/mob/living/carbon/human/species/station/alraune.dm b/code/modules/mob/living/carbon/human/species/station/alraune.dm index e7151b9608..bb788ad5b3 100644 --- a/code/modules/mob/living/carbon/human/species/station/alraune.dm +++ b/code/modules/mob/living/carbon/human/species/station/alraune.dm @@ -24,6 +24,7 @@ breath_type = "oxygen" poison_type = "phoron" exhale_type = "oxygen" + water_breather = TRUE //eh, why not? Aquatic plants are a thing. // Heat and cold resistances are 20 degrees broader on the level 1 range, level 2 is default, level 3 is much weaker, halfway between L2 and normal L3. // Essentially, they can tolerate a broader range of comfortable temperatures, but suffer more at extremes. @@ -92,9 +93,6 @@ A_FRUIT = /obj/item/organ/internal/fruitgland, ) -/datum/species/alraune/can_breathe_water() - return TRUE //eh, why not? Aquatic plants are a thing. - /datum/species/alraune/handle_environment_special(var/mob/living/carbon/human/H) if(H.inStasisNow()) // if they're in stasis, they won't need this stuff. diff --git a/code/modules/mob/living/carbon/human/species/station/blank_vr.dm b/code/modules/mob/living/carbon/human/species/station/blank_vr.dm index af626ee68b..2962b30fc5 100644 --- a/code/modules/mob/living/carbon/human/species/station/blank_vr.dm +++ b/code/modules/mob/living/carbon/human/species/station/blank_vr.dm @@ -60,12 +60,6 @@ // Stub species overrides for shoving trait abilities into -//Called when face-down in the water or otherwise over their head. -// Return: TRUE for able to breathe fine in water. -/datum/species/custom/can_breathe_water() - return /datum/trait/positive/water_breather in traits - - //Called during handle_environment in Life() ticks. // Return: Not used. /datum/species/custom/handle_environment_special(var/mob/living/carbon/human/H) diff --git a/code/modules/mob/living/carbon/human/species/station/protean_vr/protean_blob.dm b/code/modules/mob/living/carbon/human/species/station/protean_vr/protean_blob.dm index 0830d10e83..b0d605af91 100644 --- a/code/modules/mob/living/carbon/human/species/station/protean_vr/protean_blob.dm +++ b/code/modules/mob/living/carbon/human/species/station/protean_vr/protean_blob.dm @@ -84,6 +84,12 @@ healing.expire() return ..() +/mob/living/simple_mob/protean_blob/say_understands(var/mob/other, var/datum/language/speaking = null) + // The parent of this proc and its parent are SHAMS and should be rewritten, but I'm not up to it right now. + if(!speaking) + return TRUE // can understand common, they're like, a normal person thing + return ..() + /mob/living/simple_mob/protean_blob/speech_bubble_appearance() return "synthetic" @@ -93,6 +99,9 @@ /mob/living/simple_mob/protean_blob/init_vore() return //Don't make a random belly, don't waste your time +/mob/living/simple_mob/protean_blob/isSynthetic() + return TRUE // yup + /mob/living/simple_mob/protean_blob/Stat() ..() if(humanform) @@ -420,8 +429,7 @@ var/global/list/disallowed_protean_accessories = list( //Transfer vore organs blob.vore_organs = vore_organs blob.vore_selected = vore_selected - for(var/belly in vore_organs) - var/obj/belly/B = belly + for(var/obj/belly/B as anything in vore_organs) B.forceMove(blob) B.owner = blob @@ -524,8 +532,7 @@ var/global/list/disallowed_protean_accessories = list( //Transfer vore organs vore_selected = blob.vore_selected - for(var/belly in blob.vore_organs) - var/obj/belly/B = belly + for(var/obj/belly/B as anything in blob.vore_organs) B.forceMove(src) B.owner = src diff --git a/code/modules/mob/living/carbon/human/species/station/protean_vr/protean_species.dm b/code/modules/mob/living/carbon/human/species/station/protean_vr/protean_species.dm index 2a208e43c7..1130918ed5 100755 --- a/code/modules/mob/living/carbon/human/species/station/protean_vr/protean_species.dm +++ b/code/modules/mob/living/carbon/human/species/station/protean_vr/protean_species.dm @@ -236,8 +236,7 @@ CHOMP Station removal end*/ stat(null, "- -- --- REFACTORY ERROR! --- -- -") stat(null, "- -- --- Abilities (Shift+LMB Examines) --- -- -") - for(var/ability in abilities) - var/obj/effect/protean_ability/A = ability + for(var/obj/effect/protean_ability/A as anything in abilities) stat("[A.ability_name]",A.atom_button_text()) // Various modifiers @@ -330,8 +329,7 @@ CHOMP Removal end*/ holder.adjustBruteLoss(-1,include_robo = TRUE) //Modified by species resistances holder.adjustFireLoss(-0.5,include_robo = TRUE) //Modified by species resistances var/mob/living/carbon/human/H = holder - for(var/organ in H.internal_organs) - var/obj/item/organ/O = organ + for(var/obj/item/organ/O as anything in H.internal_organs) // Fix internal damage if(O.damage > 0) O.damage = max(0,O.damage-0.1) diff --git a/code/modules/mob/living/carbon/human/species/station/station.dm b/code/modules/mob/living/carbon/human/species/station/station.dm index 1bd96fae47..21a5efb14a 100644 --- a/code/modules/mob/living/carbon/human/species/station/station.dm +++ b/code/modules/mob/living/carbon/human/species/station/station.dm @@ -349,6 +349,8 @@ reagent_tag = IS_SKRELL allergens = ALLERGEN_MEAT|ALLERGEN_FISH|ALLERGEN_DAIRY|ALLERGEN_EGGS + water_breather = TRUE + has_limbs = list( BP_TORSO = list("path" = /obj/item/organ/external/chest), BP_GROIN = list("path" = /obj/item/organ/external/groin), @@ -363,9 +365,6 @@ BP_R_FOOT = list("path" = /obj/item/organ/external/foot/right) ) -/datum/species/skrell/can_breathe_water() - return TRUE - /datum/species/zaddat name = SPECIES_ZADDAT name_plural = "Zaddat" diff --git a/code/modules/mob/living/carbon/human/species/station/station_vr.dm b/code/modules/mob/living/carbon/human/species/station/station_vr.dm index 6b51d9db8a..25f7eb890e 100644 --- a/code/modules/mob/living/carbon/human/species/station/station_vr.dm +++ b/code/modules/mob/living/carbon/human/species/station/station_vr.dm @@ -32,7 +32,7 @@ lifespan, but due to their lust for violence, only a handful have ever survived beyond the age of 80, such as the infamous and \ legendary General Rain Silves who is claimed to have lived to 5000." -//CHOMPStation Removal TFF 12/24/19 - Wikilinks removed +//CHOMPStation Removal // wikilink="https://www.yawn.ocry.com/Sergal" catalogue_data = list(/datum/category_item/catalogue/fauna/sergal) @@ -100,7 +100,7 @@ surviving in open air for long periods of time. However, Akula even today still require a high humidity environment to avoid drying out \ after a few days, which would make life on an arid world like Virgo-Prime nearly impossible if it were not for Skrellean technology to aid them." -//CHOMPStation Removal TFF 12/24/19 - Wikilinks removed +//CHOMPStation Removal // wikilink="https://www.yawn.ocry.com/Akula" catalogue_data = list(/datum/category_item/catalogue/fauna/akula) @@ -112,13 +112,12 @@ spawn_flags = SPECIES_CAN_JOIN appearance_flags = HAS_HAIR_COLOR | HAS_LIPS | HAS_UNDERWEAR | HAS_SKIN_COLOR | HAS_EYE_COLOR + water_breather = TRUE + flesh_color = "#AFA59E" base_color = "#777777" blood_color = "#1D2CBF" -/datum/species/akula/can_breathe_water() - return TRUE // Surprise, SHERKS. - /datum/species/nevrean name = SPECIES_NEVREAN name_plural = "Nevreans" @@ -151,7 +150,7 @@ over and over again. Consequently, they struggle to make copies of same things. Both genders have a voice that echoes a lot. Their natural \ tone oscillates between tenor and soprano. They are excessively noisy when they quarrel in their native language." -//CHOMPStation Removal TFF 12/24/19 - Wikilinks removed +//CHOMPStation Removal // wikilink="https://www.yawn.ocry.com/Nevrean" catalogue_data = list(/datum/category_item/catalogue/fauna/nevrean) @@ -252,7 +251,7 @@ to the degree it can cause conflict with more rigorous and strict authorities. They speak a guttural language known as 'Canilunzt' \ which has a heavy emphasis on utilizing tail positioning and ear twitches to communicate intent." -//CHOMPStation Removal TFF 12/24/19 - Wikilinks removed +//CHOMPStation Removal // wikilink="https://www.yawn.ocry.com/Vulpkanin" catalogue_data = list(/datum/category_item/catalogue/fauna/vulpkanin) @@ -323,7 +322,7 @@ /datum/species/zaddat spawn_flags = SPECIES_CAN_JOIN min_age = 18 - inherent_verbs = list(/mob/living/carbon/human/proc/tie_hair) //I don't even know if Zaddat can HAVE hair, but here we are, I suppose + inherent_verbs = list(/mob/living/carbon/human/proc/tie_hair) //I don't even know if Zaddat can HAVE hair, but here we are, I suppose gluttonous = 0 genders = list(MALE, FEMALE, PLURAL, NEUTER) descriptors = list() @@ -340,7 +339,7 @@ H.equip_to_slot_or_del(L, slot_in_backpack) /datum/species/diona - spawn_flags = SPECIES_CAN_JOIN | SPECIES_IS_WHITELISTED | SPECIES_WHITELIST_SELECTABLE //CHOMPStation Edit TFF 20/1/20 - restore whitelist requirement + spawn_flags = SPECIES_CAN_JOIN | SPECIES_IS_WHITELISTED | SPECIES_WHITELIST_SELECTABLE //CHOMPStation Edit: restore whitelist requirement min_age = 18 wikilink="https://wiki.chompstation13.net/index.php?title=Diona" //CHOMPedit genders = list(MALE, FEMALE, PLURAL, NEUTER) @@ -373,8 +372,8 @@ /datum/species/vox gluttonous = 0 - spawn_flags = SPECIES_CAN_JOIN | SPECIES_IS_WHITELISTED | SPECIES_WHITELIST_SELECTABLE //CHOMPStation Edit - min_age = 18 + spawn_flags = SPECIES_CAN_JOIN | SPECIES_IS_WHITELISTED | SPECIES_WHITELIST_SELECTABLE + min_age = 18 inherent_verbs = list(/mob/living/carbon/human/proc/tie_hair) //Get ya quills done did icobase = 'icons/mob/human_races/r_vox_old.dmi' deform = 'icons/mob/human_races/r_def_vox_old.dmi' @@ -413,7 +412,7 @@ who are known for having massive winged arms and talons as feet. They've been clocked at speeds of over 35 miler per hour chasing the planet's many fish-like fauna.\ The Rapalan's home-world 'Verita' is a strangely habitable gas giant, while no physical earth exists, there are fertile floating islands orbiting around the planet from past asteroid activity." -//CHOMPStation Removal TFF 12/24/19 - Wikilinks removed +//CHOMPStation Removal // wikilink="https://www.yawn.ocry.com/Rapala" catalogue_data = list(/datum/category_item/catalogue/fauna/rapala) @@ -443,7 +442,7 @@ documented in the Virgo system, following a mining bombardment of Virgo 3. The crew of NSB Adephagia have \ taken to calling these creatures 'Shadekin', and the name has generally stuck and spread. " //TODO: Something more fitting for black-eyes -//CHOMPStation Removal TFF 12/24/19 - Wikilinks removed +//CHOMPStation Removal // wikilink = "https://wiki.vore-station.net/Shadekin" catalogue_data = list(/datum/category_item/catalogue/fauna/shadekin) @@ -504,6 +503,7 @@ breath_type = null poison_type = null + water_breather = TRUE //They do not quite breathe... appearance_flags = HAS_HAIR_COLOR | HAS_LIPS | HAS_SKIN_COLOR | HAS_UNDERWEAR @@ -534,12 +534,9 @@ BP_R_FOOT = list("path" = /obj/item/organ/external/foot/right/crewkin) ) -/datum/species/shadekin/get_bodytype() +/datum/species/crew_shadekin/get_bodytype() return SPECIES_SHADEKIN -/datum/species/shadekin/can_breathe_water() - return TRUE //they dont quite breathe - //These species are not really species but are just there for custom species selection /datum/species/fl_zorren diff --git a/code/modules/mob/living/carbon/human/species/station/traits_vr/positive.dm b/code/modules/mob/living/carbon/human/species/station/traits_vr/positive.dm index 171ded07f8..8e068aee2a 100644 --- a/code/modules/mob/living/carbon/human/species/station/traits_vr/positive.dm +++ b/code/modules/mob/living/carbon/human/species/station/traits_vr/positive.dm @@ -209,3 +209,4 @@ name = "Water Breather" desc = "You can breathe under water." cost = 1 + var_changes = list("water_breather" = 1) diff --git a/code/modules/mob/living/carbon/human/species/station/xenochimera_trait_vr.dm b/code/modules/mob/living/carbon/human/species/station/xenochimera_trait_vr.dm index 2065d91cc4..bd1eb55172 100644 --- a/code/modules/mob/living/carbon/human/species/station/xenochimera_trait_vr.dm +++ b/code/modules/mob/living/carbon/human/species/station/xenochimera_trait_vr.dm @@ -1,4 +1,4 @@ -/* +/* ** For now, these are just neutral traits for Xenochimera only to take. ** These are only traits that they should reasonably be able to evolve to acquire themselves. ** I won't add the resistances though because those are kinda lame for a 'chimera to take! @@ -49,3 +49,12 @@ cost = 0 category = 0 custom_only = FALSE + +/datum/trait/positive/water_breather/xenochimera + sort = TRAIT_SORT_SPECIES + allowed_species = list(SPECIES_XENOCHIMERA) + name = "Xenochimera: Water Breather" + desc = "You can breathe under water." + cost = 0 + category = 0 + custom_only = FALSE \ No newline at end of file diff --git a/code/modules/mob/living/carbon/human/species/xenomorphs/alien_embryo.dm b/code/modules/mob/living/carbon/human/species/xenomorphs/alien_embryo.dm deleted file mode 100644 index 88efb6d355..0000000000 --- a/code/modules/mob/living/carbon/human/species/xenomorphs/alien_embryo.dm +++ /dev/null @@ -1,161 +0,0 @@ -// This is to replace the previous datum/disease/alien_embryo for slightly improved handling and maintainability -// It functions almost identically (see code/datums/diseases/alien_embryo.dm) - -/* -/obj/item/alien_embryo //Commented out as reference for future reproduction methods, or addition later. - name = "alien embryo" - desc = "All slimy and yuck." - icon = 'icons/mob/alien.dmi' - icon_state = "larva0_dead" - var/mob/living/affected_mob - var/stage = 0 - -/obj/item/alien_embryo/New() - if(istype(loc, /mob/living)) - affected_mob = loc - START_PROCESSING(SSobj, src) - spawn(0) - AddInfectionImages(affected_mob) - else - qdel(src) - -/obj/item/alien_embryo/Destroy() - if(affected_mob) - affected_mob.status_flags &= ~(XENO_HOST) - spawn(0) - RemoveInfectionImages(affected_mob) - ..() - -/obj/item/alien_embryo/process() - if(!affected_mob) return - if(loc != affected_mob) - affected_mob.status_flags &= ~(XENO_HOST) - STOP_PROCESSING(SSobj, src) - spawn(0) - RemoveInfectionImages(affected_mob) - affected_mob = null - return - - if(stage < 5 && prob(3)) - stage++ - spawn(0) - RefreshInfectionImage(affected_mob) - - switch(stage) - if(2, 3) - if(prob(1)) - affected_mob.emote("sneeze") - if(prob(1)) - affected_mob.emote("cough") - if(prob(1)) - to_chat(affected_mob, "Your throat feels sore.") - if(prob(1)) - to_chat(affected_mob, "Mucous runs down the back of your throat.") - if(4) - if(prob(1)) - affected_mob.emote("sneeze") - if(prob(1)) - affected_mob.emote("cough") - if(prob(2)) - to_chat(affected_mob, " Your muscles ache.") - if(prob(20)) - affected_mob.take_organ_damage(1) - if(prob(2)) - to_chat(affected_mob, "Your stomach hurts.") - if(prob(20)) - affected_mob.adjustToxLoss(1) - affected_mob.updatehealth() - if(5) - to_chat(affected_mob, "You feel something tearing its way out of your stomach...") - affected_mob.adjustToxLoss(10) - affected_mob.updatehealth() - if(prob(50)) - AttemptGrow() - -/obj/item/alien_embryo/proc/AttemptGrow(var/gib_on_success = 1) - var/list/candidates = get_alien_candidates() - var/picked = null - - // To stop clientless larva, we will check that our host has a client - // if we find no ghosts to become the alien. If the host has a client - // he will become the alien but if he doesn't then we will set the stage - // to 2, so we don't do a process heavy check everytime. - - if(candidates.len) - picked = pick(candidates) - else if(affected_mob.client) - picked = affected_mob.key - else - stage = 4 // Let's try again later. - return - - if(affected_mob.lying) - affected_mob.add_overlay("burst_lie") - else - affected_mob.add_overlay("burst_stand") - spawn(6) - var/mob/living/carbon/alien/larva/new_xeno = new(affected_mob.loc) - new_xeno.key = picked - new_xeno << sound('sound/voice/hiss5.ogg',0,0,0,100) //To get the player's attention - if(gib_on_success) - affected_mob.gib() - qdel(src) - -/*---------------------------------------- -Proc: RefreshInfectionImage() -Des: Removes all infection images from aliens and places an infection image on all infected mobs for aliens. -----------------------------------------*/ -/obj/item/alien_embryo/proc/RefreshInfectionImage() - - for(var/mob/living/carbon/alien in player_list) - - if(!locate(/obj/item/organ/internal/xenos/hivenode) in alien.internal_organs) - continue - - if(alien.client) - for(var/image/I in alien.client.images) - if(dd_hasprefix_case(I.icon_state, "infected")) - qdel(I) - for(var/mob/living/L in mob_list) - if(iscorgi(L) || iscarbon(L)) - if(L.status_flags & XENO_HOST) - var/I = image('icons/mob/alien.dmi', loc = L, icon_state = "infected[stage]") - alien.client.images += I - -/*---------------------------------------- -Proc: AddInfectionImages(C) -Des: Checks if the passed mob (C) is infected with the alien egg, then gives each alien client an infected image at C. -----------------------------------------*/ -/obj/item/alien_embryo/proc/AddInfectionImages(var/mob/living/C) - if(C) - - for(var/mob/living/carbon/alien in player_list) - - if(!locate(/obj/item/organ/internal/xenos/hivenode) in alien.internal_organs) - continue - - if(alien.client) - if(C.status_flags & XENO_HOST) - var/I = image('icons/mob/alien.dmi', loc = C, icon_state = "infected[stage]") - alien.client.images += I - -/*---------------------------------------- -Proc: RemoveInfectionImage(C) -Des: Removes the alien infection image from all aliens in the world located in passed mob (C). -----------------------------------------*/ - -/obj/item/alien_embryo/proc/RemoveInfectionImages(var/mob/living/C) - - if(C) - - for(var/mob/living/carbon/alien in player_list) - - if(!locate(/obj/item/organ/internal/xenos/hivenode) in alien.internal_organs) - continue - - if(alien.client) - for(var/image/I in alien.client.images) - if(I.loc == C) - if(dd_hasprefix_case(I.icon_state, "infected")) - qdel(I) -*/ diff --git a/code/modules/mob/living/carbon/human/species/xenomorphs/alien_powers.dm b/code/modules/mob/living/carbon/human/species/xenomorphs/alien_powers.dm index 262c5bd732..27e1df5b5a 100644 --- a/code/modules/mob/living/carbon/human/species/xenomorphs/alien_powers.dm +++ b/code/modules/mob/living/carbon/human/species/xenomorphs/alien_powers.dm @@ -2,7 +2,7 @@ for(var/mob/living/carbon/human/Q in living_mob_list) if(self && ignore_self && self == Q) continue - if(Q.species.name != SPECIES_GENA_QUEEN) //CHOMPedit + if(Q.species.name != SPECIES_XENO_QUEEN) continue if(!Q.key || !Q.client || Q.stat) continue @@ -79,8 +79,8 @@ // Queen verbs. /mob/living/carbon/human/proc/lay_egg() - set name = "Lay Egg (200)" //CHOMPedit changed number value - set desc = "Lay an egg that hatch into larva." //CHOMPedit + set name = "Lay Egg (200)" + set desc = "Lay an egg to produce huggers to impregnate prey with." set category = "Abilities" if(!config.aliens_allowed) @@ -88,13 +88,13 @@ verbs -= /mob/living/carbon/human/proc/lay_egg return - if(locate(/obj/structure/alien/egg) in get_turf(src)) //CHOMPedit. Changed from obj/effect to obj/structure + if(locate(/obj/structure/alien/egg) in get_turf(src)) to_chat(src, "There's already an egg here.") return - if(check_alien_ability(200,1,O_EGG)) //CHOMPedit changed plasma cost from 75 to 200 + if(check_alien_ability(200,1,O_EGG)) visible_message("[src] has laid an egg!") - new /obj/structure/alien/egg(loc) //CHOMPedit. Changed from obj/effect to obj/structure + new /obj/structure/alien/egg(loc) return @@ -110,7 +110,7 @@ if(check_alien_ability(500)) visible_message("[src] begins to twist and contort!", "You begin to evolve!") - src.set_species("Genaprawn Queen") //CHOMPedit + src.set_species("Xenomorph Queen") return @@ -144,7 +144,7 @@ P.firer = src P.old_style_target(A) P.fire() - playsound(src, 'sound/weapons/pierce.ogg', 25, 0) + playsound(src, 'sound/weapons/alien_spitacid.ogg', 25, 0) /mob/living/carbon/human/proc/corrosive_acid(O as obj|turf in oview(1)) //If they right click to corrode, an error will flash if its an invalid target./N set name = "Corrosive Acid (200)" @@ -329,7 +329,7 @@ /mob/living/carbon/human/proc/gut() set category = "Abilities" - set name = "Slaughter" //CHOMPedit renamed Gut to Slaughter so its more obvious what it does + set name = "Slaughter" set desc = "While grabbing someone aggressively, rip their guts out or tear them apart." if(last_special > world.time) @@ -345,7 +345,7 @@ return if(G.state < GRAB_AGGRESSIVE) - to_chat(src, "You must have an aggressive grab to slaughter your prey!") //CHOMPedit + to_chat(src, "You must have an aggressive grab to slaughter your prey!") return last_special = world.time + 50 diff --git a/code/modules/mob/living/carbon/human/species/xenomorphs/alien_species.dm b/code/modules/mob/living/carbon/human/species/xenomorphs/alien_species.dm index b01849f4db..ac85b0314a 100644 --- a/code/modules/mob/living/carbon/human/species/xenomorphs/alien_species.dm +++ b/code/modules/mob/living/carbon/human/species/xenomorphs/alien_species.dm @@ -1,32 +1,21 @@ //Stand-in until this is made more lore-friendly. /datum/species/xenos - name = SPECIES_GENA //CHOMPedit - name_plural = "Genaprawns" //CHOMPedit + name = SPECIES_XENO + name_plural = "Xenomorphs" - default_language = "Xenolingua" //CHOMPedit + default_language = "Xenomorph" language = "Hivemind" assisted_langs = list() unarmed_types = list(/datum/unarmed_attack/claws/strong/xeno, /datum/unarmed_attack/bite/strong/xeno) hud_type = /datum/hud_data/alien rarity_value = 3 - male_scream_sound = list('sound/effects/mob_effects/x_scream1.ogg','sound/effects/mob_effects/x_scream2.ogg','sound/effects/mob_effects/x_scream3.ogg') //CHOMPedit SCREE - female_scream_sound = list('sound/effects/mob_effects/x_scream1.ogg','sound/effects/mob_effects/x_scream2.ogg','sound/effects/mob_effects/x_scream3.ogg') //CHOMPedit SCREE - - darksight = 10 //CHOMPedit. Added darksight - vision_flags = SEE_SELF|SEE_MOBS|SEE_TURFS //CHOMPedit trying to make xenos see properly - - pixel_offset_x = -16 //CHOMPedit. I literally had to make a different form of pixel_x just for this species, fuck my life - - - icon_template = 'icons/mob/human_races/xenos/template.dmi' //CHOMPedit. Add icon template for 64x64 sprites - has_fine_manipulation = 0 siemens_coefficient = 0 gluttonous = 2 - brute_mod = 0.65 //CHOMPedit. Edited brute vulnerability - burn_mod = 1.50 //CHOMPedit. Edited burn vulnerability + brute_mod = 0.6 // Hardened carapace. + burn_mod = 1.75 // Weak to fire. warning_low_pressure = 50 hazard_low_pressure = -1 @@ -44,21 +33,20 @@ flesh_color = "#282846" gibbed_anim = "gibbed-a" dusted_anim = "dust-a" - death_message = "lets out a piercing multi-toned screech, green blood bubbling from its maw as it ceases." //CHOMPedit. Changed message. + death_message = "lets out a guttural screech, green blood bubbling from its maw." death_sound = 'sound/voice/hiss6.ogg' - damage_overlays = null //CHOMPedit. They don't have overlays yet, if someone wants to add some then be my guest - damage_mask = null //CHOMPedit. - blood_mask = null //CHOMPedit. - speech_sounds = list('sound/voice/hiss1.ogg','sound/voice/hiss2.ogg','sound/voice/hiss3.ogg','sound/voice/hiss4.ogg') - speech_chance = 100 + speech_chance = 75 virus_immune = 1 breath_type = null poison_type = null + vision_flags = SEE_SELF|SEE_MOBS|SEE_TURFS + darksight = 10 + has_organ = list( O_HEART = /obj/item/organ/internal/heart, O_BRAIN = /obj/item/organ/internal/brain/xeno, @@ -93,10 +81,10 @@ ) /datum/species/xenos/get_bodytype() - return SPECIES_GENA //CHOMPedit + return SPECIES_XENO /datum/species/xenos/get_random_name() - return "Genaprawn [caste_name] ([alien_number])" //CHOMPedit + return "xenomorph [caste_name] ([alien_number])" /datum/species/xenos/can_understand(var/mob/other) if(istype(other, /mob/living/carbon/alien/larva)) @@ -104,8 +92,8 @@ return FALSE /datum/species/xenos/hug(var/mob/living/carbon/human/H,var/mob/living/target) - H.visible_message("[H] caresses [target] with its eldritch arm.", \ - "You caress [target] with your eldritch arm.") //CHOMPedit. Changed messages + H.visible_message("[H] caresses [target] with its scythe-like arm.", \ + "You caress [target] with your scythe-like arm.") /datum/species/xenos/handle_post_spawn(var/mob/living/carbon/human/H) @@ -114,7 +102,7 @@ H.mind.special_role = "Alien" alien_number++ //Keep track of how many aliens we've had so far. - H.real_name = "Genaprawn [caste_name] ([alien_number])" //CHOMPedit + H.real_name = "xenomorph [caste_name] ([alien_number])" H.name = H.real_name ..() @@ -167,14 +155,13 @@ return 1 return 0 -//CHOMPedit removed infection images, since they do not exist anymore. /datum/species/xenos/drone - name = SPECIES_GENA_DRONE //CHOMPedit + name = SPECIES_XENO_DRONE caste_name = "drone" weeds_plasma_rate = 15 slowdown = 1 - tail = null //CHOMPedit. Set to null + tail = "xenos_drone_tail" rarity_value = 5 icobase = 'icons/mob/human_races/xenos/r_xenos_drone.dmi' @@ -210,12 +197,12 @@ ..() /datum/species/xenos/hunter - name = SPECIES_GENA_HUNTER //CHOMPedit + name = SPECIES_XENO_HUNTER weeds_plasma_rate = 5 caste_name = "hunter" - slowdown = -2 + slowdown = -1 total_health = 150 - tail = null //CHOMPedit. Set to null + tail = "xenos_hunter_tail" icobase = 'icons/mob/human_races/xenos/r_xenos_hunter.dmi' deform = 'icons/mob/human_races/xenos/r_xenos_hunter.dmi' @@ -240,12 +227,12 @@ ) /datum/species/xenos/sentinel - name = SPECIES_GENA_SENTINEL //CHOMPedit + name = SPECIES_XENO_SENTINEL weeds_plasma_rate = 10 caste_name = "sentinel" slowdown = 0 total_health = 200 - tail = null //CHOMPedit. Set to null + tail = "xenos_sentinel_tail" icobase = 'icons/mob/human_races/xenos/r_xenos_sentinel.dmi' deform = 'icons/mob/human_races/xenos/r_xenos_sentinel.dmi' @@ -273,13 +260,13 @@ /datum/species/xenos/queen - name = SPECIES_GENA_QUEEN //CHOMPedit - total_health = 300 //CHOMPedit. Queen is chonk + name = SPECIES_XENO_QUEEN + total_health = 300 weeds_heal_rate = 5 weeds_plasma_rate = 20 caste_name = "queen" - slowdown = 4 - tail = null //CHOMPedit. Set to null + slowdown = 3 + tail = "xenos_queen_tail" rarity_value = 10 icobase = 'icons/mob/human_races/xenos/r_xenos_queen.dmi' @@ -317,10 +304,10 @@ ..() // Make sure only one official queen exists at any point. if(!alien_queen_exists(1,H)) - H.real_name = "Genaprawn queen ([alien_number])" //CHOMPedit + H.real_name = "xenomorph queen ([alien_number])" H.name = H.real_name else - H.real_name = "Genaprawn princess ([alien_number])" //CHOMPedit + H.real_name = "xenomorph princess ([alien_number])" H.name = H.real_name /datum/hud_data/alien @@ -341,4 +328,4 @@ gear = list( "storage1" = list("loc" = ui_storage1, "name" = "Left Pocket", "slot" = slot_l_store, "state" = "pocket"), "storage2" = list("loc" = ui_storage2, "name" = "Right Pocket", "slot" = slot_r_store, "state" = "pocket"), - ) //CHOMPedit removed head and outer layer item slots, since they caused a slew of problems with xenomorphs + ) //Removed hat and outer slots, it caused too many problems that required admin intervention. diff --git a/code/modules/mob/living/carbon/human/species/xenomorphs/xenomorphs.dm b/code/modules/mob/living/carbon/human/species/xenomorphs/xenomorphs.dm index 7330c80c38..6c73c18430 100644 --- a/code/modules/mob/living/carbon/human/species/xenomorphs/xenomorphs.dm +++ b/code/modules/mob/living/carbon/human/species/xenomorphs/xenomorphs.dm @@ -4,28 +4,27 @@ if(!target || !alien_caste) return var/mob/living/carbon/human/new_alien = new(target) - new_alien.set_species("Genaprawn [alien_caste]") //CHOMPedit + new_alien.set_species("Xenomorph [alien_caste]") return new_alien /mob/living/carbon/human/xdrone/New(var/new_loc) h_style = "Bald" faction = "xeno" - ..(new_loc, SPECIES_GENA_DRONE) //CHOMPedit + ..(new_loc, SPECIES_XENO_DRONE) /mob/living/carbon/human/xsentinel/New(var/new_loc) h_style = "Bald" faction = "xeno" - ..(new_loc, SPECIES_GENA_SENTINEL) //CHOMPedit + ..(new_loc, SPECIES_XENO_SENTINEL) /mob/living/carbon/human/xhunter/New(var/new_loc) h_style = "Bald" faction = "xeno" - ..(new_loc, SPECIES_GENA_HUNTER) //CHOMPedit + ..(new_loc, SPECIES_XENO_HUNTER) /mob/living/carbon/human/xqueen/New(var/new_loc) h_style = "Bald" faction = "xeno" - ..(new_loc, SPECIES_GENA_QUEEN) //CHOMPedit - -//CHOMPedit. Removed AddInfectionImages code, due to it being commented out and not used + ..(new_loc, SPECIES_XENO_QUEEN) +//Removed AddInfectionImages, no longer required. diff --git a/code/modules/mob/living/carbon/human/update_icons.dm b/code/modules/mob/living/carbon/human/update_icons.dm index e940e154f1..040e152d88 100644 --- a/code/modules/mob/living/carbon/human/update_icons.dm +++ b/code/modules/mob/living/carbon/human/update_icons.dm @@ -348,7 +348,7 @@ var/global/list/damage_icon_parts = list() //see UpdateDamageIcon() if(husk) base_icon.ColorTone(husk_color_mod) else if(hulk) - var/list/tone = ReadRGB(hulk_color_mod) + var/list/tone = rgb2num(hulk_color_mod) base_icon.MapColors(rgb(tone[1],0,0),rgb(0,tone[2],0),rgb(0,0,tone[3])) //Handle husk overlay. @@ -1168,13 +1168,6 @@ var/global/list/damage_icon_parts = list() //see UpdateDamageIcon() return working /mob/living/carbon/human/proc/get_ears_overlay() - //If you are FBP with ear style and didn't set a custom one - var/datum/robolimb/model = isSynthetic() - if(istype(model) && model.includes_ears && !ear_style) - var/icon/ears_s = new/icon("icon" = synthetic.icon, "icon_state" = "ears") - ears_s.Blend(rgb(src.r_ears, src.g_ears, src.b_ears), species.color_mult ? ICON_MULTIPLY : ICON_ADD) - return ears_s - if(ear_style && !(head && (head.flags_inv & BLOCKHEADHAIR))) var/icon/ears_s = new/icon("icon" = ear_style.icon, "icon_state" = ear_style.icon_state) if(ear_style.do_colouration) @@ -1196,7 +1189,7 @@ var/global/list/damage_icon_parts = list() //see UpdateDamageIcon() /mob/living/carbon/human/proc/get_tail_image() //If you are FBP with tail style and didn't set a custom one var/datum/robolimb/model = isSynthetic() - if(istype(model) && model.includes_tail && !tail_style && !(wear_suit && wear_suit.flags_inv & HIDETAIL)) + if(istype(model) && model.includes_tail && !tail_style) var/icon/tail_s = new/icon("icon" = synthetic.icon, "icon_state" = "tail") tail_s.Blend(rgb(src.r_skin, src.g_skin, src.b_skin), species.color_mult ? ICON_MULTIPLY : ICON_ADD) return image(tail_s) diff --git a/code/modules/mob/living/death.dm b/code/modules/mob/living/death.dm index b33a5d3945..94776d570e 100644 --- a/code/modules/mob/living/death.dm +++ b/code/modules/mob/living/death.dm @@ -17,11 +17,9 @@ //VOREStation Edit End nest = null - for(var/s in owned_soul_links) - var/datum/soul_link/S = s + for(var/datum/soul_link/S as anything in owned_soul_links) S.owner_died(gibbed) - for(var/s in shared_soul_links) - var/datum/soul_link/S = s + for(var/datum/soul_link/S as anything in shared_soul_links) S.sharer_died(gibbed) . = ..() diff --git a/code/modules/mob/living/living.dm b/code/modules/mob/living/living.dm index 592d7d0db2..622c3965c4 100644 --- a/code/modules/mob/living/living.dm +++ b/code/modules/mob/living/living.dm @@ -868,9 +868,8 @@ update_transform() //VOREStation Add if(lying && LAZYLEN(buckled_mobs)) - for(var/rider in buckled_mobs) - var/mob/living/L = rider - if(buckled_mobs[rider] != "riding") + for(var/mob/living/L as anything in buckled_mobs) + if(buckled_mobs[L] != "riding") continue // Only boot off riders if(riding_datum) riding_datum.force_dismount(L) diff --git a/code/modules/mob/living/say.dm b/code/modules/mob/living/say.dm index fc7d08677b..cc66172f43 100644 --- a/code/modules/mob/living/say.dm +++ b/code/modules/mob/living/say.dm @@ -387,11 +387,9 @@ var/list/channel_to_radio_key = new //Remove all those images. At least it's just ONE spawn this time. spawn(30) - for(var/img in images_to_clients) - var/image/I = img + for(var/image/I as anything in images_to_clients) var/list/clients_from_image = images_to_clients[I] - for(var/client in clients_from_image) - var/client/C = client + for(var/client/C as anything in clients_from_image) if(C) //Could have disconnected after message sent, before removing bubble. C.images -= I qdel(I) @@ -416,12 +414,10 @@ var/list/channel_to_radio_key = new else var/list/potentials = get_mobs_and_objs_in_view_fast(T, world.view) var/list/mobs = potentials["mobs"] - for(var/hearer in mobs) - var/mob/M = hearer + for(var/mob/M as anything in mobs) M.hear_signlang(message, verb, language, src) var/list/objs = potentials["objs"] - for(var/hearer in objs) - var/obj/O = hearer + for(var/obj/O as anything in objs) O.hear_signlang(message, verb, language, src) return 1 diff --git a/code/modules/mob/living/silicon/ai/ai.dm b/code/modules/mob/living/silicon/ai/ai.dm index 2a0a307818..38f59adbc5 100644 --- a/code/modules/mob/living/silicon/ai/ai.dm +++ b/code/modules/mob/living/silicon/ai/ai.dm @@ -32,8 +32,7 @@ var/list/ai_verbs_default = list( /proc/AutoUpdateAI(obj/subject) var/is_in_use = 0 if (subject!=null) - for(var/A in ai_list) - var/mob/living/silicon/ai/M = A + for(var/mob/living/silicon/ai/M as anything in ai_list) if ((M.client && M.machine == subject)) is_in_use = 1 subject.attack_ai(M) diff --git a/code/modules/mob/living/silicon/ai/ai_remote_control.dm b/code/modules/mob/living/silicon/ai/ai_remote_control.dm index 768aba02f5..ac092ed693 100644 --- a/code/modules/mob/living/silicon/ai/ai_remote_control.dm +++ b/code/modules/mob/living/silicon/ai/ai_remote_control.dm @@ -25,8 +25,7 @@ var/list/possible = list() - for(var/borgie in GLOB.available_ai_shells) - var/mob/living/silicon/robot/R = borgie + for(var/mob/living/silicon/robot/R as anything in GLOB.available_ai_shells) if(R.shell && !R.deployed && (R.stat != DEAD) && (!R.connected_ai || (R.connected_ai == src) ) && !(using_map.ai_shell_restricted && !(R.z in using_map.ai_shell_allowed_levels)) ) //VOREStation Edit: shell restrictions possible += R diff --git a/code/modules/mob/living/silicon/ai/multicam.dm b/code/modules/mob/living/silicon/ai/multicam.dm index 7f84eebf6e..1a69c5f5f3 100644 --- a/code/modules/mob/living/silicon/ai/multicam.dm +++ b/code/modules/mob/living/silicon/ai/multicam.dm @@ -202,10 +202,8 @@ GLOBAL_DATUM(ai_camera_room_landmark, /obj/effect/landmark/ai_multicam_room) var/list/obj/machinery/camera/add = list() var/list/obj/machinery/camera/remove = list() var/list/obj/machinery/camera/visible = list() - for(var/VV in visibleChunks) - var/datum/chunk/camera/CC = VV - for(var/V in CC.cameras) - var/obj/machinery/camera/C = V + for(var/datum/chunk/camera/CC as anything in visibleChunks) + for(var/obj/machinery/camera/C as anything in CC.cameras) if (!C.can_use() || (get_dist(C, src) > telegraph_range)) continue visible |= C @@ -213,15 +211,13 @@ GLOBAL_DATUM(ai_camera_room_landmark, /obj/effect/landmark/ai_multicam_room) add = visible - cameras_telegraphed remove = cameras_telegraphed - visible - for(var/V in remove) - var/obj/machinery/camera/C = V + for(var/obj/machinery/camera/C as anything in remove) if(QDELETED(C)) continue cameras_telegraphed -= C C.in_use_lights-- C.update_icon() - for(var/V in add) - var/obj/machinery/camera/C = V + for(var/obj/machinery/camera/C as anything in add) if(QDELETED(C)) continue cameras_telegraphed |= C @@ -230,8 +226,7 @@ GLOBAL_DATUM(ai_camera_room_landmark, /obj/effect/landmark/ai_multicam_room) /mob/observer/eye/aiEye/pic_in_pic/proc/disable_camera_telegraphing() telegraph_cameras = FALSE - for(var/V in cameras_telegraphed) - var/obj/machinery/camera/C = V + for(var/obj/machinery/camera/C as anything in cameras_telegraphed) if(QDELETED(C)) continue C.in_use_lights-- @@ -291,8 +286,7 @@ GLOBAL_DATUM(ai_camera_room_landmark, /obj/effect/landmark/ai_multicam_room) /mob/living/silicon/ai/proc/refresh_multicam() reset_view(GLOB.ai_camera_room_landmark) if(client) - for(var/V in multicam_screens) - var/obj/screen/movable/pic_in_pic/P = V + for(var/obj/screen/movable/pic_in_pic/P as anything in multicam_screens) P.show_to(client) /mob/living/silicon/ai/proc/end_multicam() @@ -301,8 +295,7 @@ GLOBAL_DATUM(ai_camera_room_landmark, /obj/effect/landmark/ai_multicam_room) multicam_on = FALSE select_main_multicam_window(null) if(client) - for(var/V in multicam_screens) - var/obj/screen/movable/pic_in_pic/P = V + for(var/obj/screen/movable/pic_in_pic/P as anything in multicam_screens) P.unshow_to(client) reset_view() to_chat(src, "Multiple-camera viewing mode deactivated.") diff --git a/code/modules/mob/living/silicon/pai/pai_vr.dm b/code/modules/mob/living/silicon/pai/pai_vr.dm index 59a0fad74d..c8ab1d7e07 100644 --- a/code/modules/mob/living/silicon/pai/pai_vr.dm +++ b/code/modules/mob/living/silicon/pai/pai_vr.dm @@ -17,8 +17,7 @@ /mob/living/silicon/pai/proc/update_fullness_pai() //Determines if they have something in their stomach. Copied and slightly modified. var/new_people_eaten = 0 - for(var/belly in vore_organs) - var/obj/belly/B = belly + for(var/obj/belly/B as anything in vore_organs) for(var/mob/living/M in B) new_people_eaten += M.size_multiplier people_eaten = min(1, new_people_eaten) diff --git a/code/modules/mob/living/silicon/pai/software.dm b/code/modules/mob/living/silicon/pai/software.dm index cad5229097..3a98a5bea3 100644 --- a/code/modules/mob/living/silicon/pai/software.dm +++ b/code/modules/mob/living/silicon/pai/software.dm @@ -21,7 +21,7 @@ var/global/list/pai_software_by_key = list() var/global/list/default_pai_software = list() /hook/startup/proc/populate_pai_software_list() var/r = 1 // I would use ., but it'd sacrifice runtime detection - for(var/type in typesof(/datum/pai_software) - /datum/pai_software) + for(var/type in subtypesof(/datum/pai_software)) var/datum/pai_software/P = new type() if(pai_software_by_key[P.id]) var/datum/pai_software/O = pai_software_by_key[P.id] diff --git a/code/modules/mob/living/silicon/robot/dogborg/dog_sleeper_vr.dm b/code/modules/mob/living/silicon/robot/dogborg/dog_sleeper_vr.dm index a15e2bf518..9e3bd95c86 100644 --- a/code/modules/mob/living/silicon/robot/dogborg/dog_sleeper_vr.dm +++ b/code/modules/mob/living/silicon/robot/dogborg/dog_sleeper_vr.dm @@ -567,8 +567,7 @@ 'sound/vore/death10.ogg') playsound(src, deathsound, vol = 100, vary = 1, falloff = 0.1, ignore_walls = TRUE, preference = /datum/client_preference/digestion_noises) if(is_vore_predator(T)) - for(var/belly in T.vore_organs) - var/obj/belly/B = belly + for(var/obj/belly/B as anything in T.vore_organs) for(var/atom/movable/thing in B) thing.forceMove(src) if(ismob(thing)) diff --git a/code/modules/mob/living/silicon/robot/examine_vr.dm b/code/modules/mob/living/silicon/robot/examine_vr.dm index 2bebab2665..84b960050d 100644 --- a/code/modules/mob/living/silicon/robot/examine_vr.dm +++ b/code/modules/mob/living/silicon/robot/examine_vr.dm @@ -1,8 +1,7 @@ /mob/living/silicon/robot/proc/examine_bellies_borg() var/list/message_list = list() - for(var/belly in vore_organs) - var/obj/belly/B = belly + for(var/obj/belly/B as anything in vore_organs) var/bellymessage = B.get_examine_msg() if(bellymessage) message_list += bellymessage bellymessage = B.get_examine_msg_absorbed() diff --git a/code/modules/mob/living/silicon/robot/robot_items.dm b/code/modules/mob/living/silicon/robot/robot_items.dm index d8212d2904..9636f2da51 100644 --- a/code/modules/mob/living/silicon/robot/robot_items.dm +++ b/code/modules/mob/living/silicon/robot/robot_items.dm @@ -282,7 +282,7 @@ switch(choice) if("Colour") - var/newcolour = tgui_input_list(usr, "Which colour would you like to use?", list("black","blue","red","green","yellow")) + var/newcolour = tgui_input_list(usr, "Which colour would you like to use?", "Color Choice", list("black","blue","red","green","yellow")) if(newcolour) colour = newcolour if("Mode") @@ -401,7 +401,7 @@ set category = "Object" set src in range(0) - var/N = tgui_input_list(usr, "How much damage should the shield absorb?", list("5","10","25","50","75","100")) + var/N = tgui_input_list(usr, "How much damage should the shield absorb?", "Shield Level", list("5","10","25","50","75","100")) if (N) shield_level = text2num(N)/100 diff --git a/code/modules/mob/living/silicon/robot/subtypes/thinktank/thinktank_interactions.dm b/code/modules/mob/living/silicon/robot/subtypes/thinktank/thinktank_interactions.dm index 0c981cb4b2..852c09ff61 100644 --- a/code/modules/mob/living/silicon/robot/subtypes/thinktank/thinktank_interactions.dm +++ b/code/modules/mob/living/silicon/robot/subtypes/thinktank/thinktank_interactions.dm @@ -32,7 +32,7 @@ . = ..() -/mob/living/silicon/robot/platform/attack_ghost(mob/observer/ghost/user) +/mob/living/silicon/robot/platform/attack_ghost(mob/observer/dead/user) if(client || key || stat == DEAD || !ticker || !ticker.mode) return ..() diff --git a/code/modules/mob/living/simple_mob/defense.dm b/code/modules/mob/living/simple_mob/defense.dm index 09d6fc7335..af37f156c5 100644 --- a/code/modules/mob/living/simple_mob/defense.dm +++ b/code/modules/mob/living/simple_mob/defense.dm @@ -147,8 +147,7 @@ . = 1 - . // Invert from 1 = immunity to 0 = immunity. // Doing it this way makes multiplicative stacking not get out of hand, so two modifiers that give 0.5 protection will be combined to 0.75 in the end. - for(var/thing in modifiers) - var/datum/modifier/M = thing + for(var/datum/modifier/M as anything in modifiers) if(!isnull(M.cold_protection)) . *= 1 - M.cold_protection @@ -172,8 +171,7 @@ . = 1 - . // Invert from 1 = immunity to 0 = immunity. // Doing it this way makes multiplicative stacking not get out of hand, so two modifiers that give 0.5 protection will be combined to 0.75 in the end. - for(var/thing in modifiers) - var/datum/modifier/M = thing + for(var/datum/modifier/M as anything in modifiers) if(!isnull(M.heat_protection)) . *= 1 - M.heat_protection @@ -199,8 +197,7 @@ . = 1 - . // Invert from 1 = immunity to 0 = immunity. // Doing it this way makes multiplicative stacking not get out of hand, so two modifiers that give 0.5 protection will be combined to 0.75 in the end. - for(var/thing in modifiers) - var/datum/modifier/M = thing + for(var/datum/modifier/M as anything in modifiers) if(!isnull(M.siemens_coefficient)) . *= M.siemens_coefficient @@ -257,8 +254,7 @@ if(isnull(armorval)) armorval = 0 - for(var/thing in modifiers) - var/datum/modifier/M = thing + for(var/datum/modifier/M as anything in modifiers) var/modifier_armor = LAZYACCESS(M.armor_percent, attack_flag) if(modifier_armor) armorval += modifier_armor @@ -270,8 +266,7 @@ if(isnull(armorval)) armorval = 0 - for(var/thing in modifiers) - var/datum/modifier/M = thing + for(var/datum/modifier/M as anything in modifiers) var/modifier_armor = LAZYACCESS(M.armor_flat, attack_flag) if(modifier_armor) armorval += modifier_armor diff --git a/code/modules/mob/living/simple_mob/simple_mob_vr.dm b/code/modules/mob/living/simple_mob/simple_mob_vr.dm index 59cfa2850a..305ecf70fc 100644 --- a/code/modules/mob/living/simple_mob/simple_mob_vr.dm +++ b/code/modules/mob/living/simple_mob/simple_mob_vr.dm @@ -67,8 +67,7 @@ // Update fullness based on size & quantity of belly contents /mob/living/simple_mob/proc/update_fullness() var/new_fullness = 0 - for(var/belly in vore_organs) - var/obj/belly/B = belly + for(var/obj/belly/B as anything in vore_organs) for(var/mob/living/M in B) new_fullness += M.size_multiplier new_fullness = new_fullness / size_multiplier //Divided by pred's size so a macro mob won't get macro belly from a regular prey. diff --git a/code/modules/mob/living/simple_mob/subtypes/animal/giant_spider/nurse.dm b/code/modules/mob/living/simple_mob/subtypes/animal/giant_spider/nurse.dm index 3d8401b76d..8035fb2d80 100644 --- a/code/modules/mob/living/simple_mob/subtypes/animal/giant_spider/nurse.dm +++ b/code/modules/mob/living/simple_mob/subtypes/animal/giant_spider/nurse.dm @@ -240,8 +240,7 @@ var/static/alternative_targets = typecacheof(list(/obj/item, /obj/structure)) - for(var/AT in typecache_filter_list(range(vision_range, holder), alternative_targets)) - var/obj/O = AT + for(var/obj/O as anything in typecache_filter_list(range(vision_range, holder), alternative_targets)) if(can_see(holder, O, vision_range) && !O.anchored) . += O diff --git a/code/modules/mob/living/simple_mob/subtypes/vore/demon/demon_abilities.dm b/code/modules/mob/living/simple_mob/subtypes/vore/demon/demon_abilities.dm index 56214bf58c..e6c84387c8 100644 --- a/code/modules/mob/living/simple_mob/subtypes/vore/demon/demon_abilities.dm +++ b/code/modules/mob/living/simple_mob/subtypes/vore/demon/demon_abilities.dm @@ -32,8 +32,7 @@ if(shifted_out) shifted_out = FALSE name = real_name - for(var/belly in vore_organs) - var/obj/belly/B = belly + for(var/obj/belly/B as anything in vore_organs) B.escapable = initial(B.escapable) cut_overlays() @@ -89,8 +88,7 @@ name = "Something" health = maxHealth //Fullheal - for(var/belly in vore_organs) - var/obj/belly/B = belly + for(var/obj/belly/B as anything in vore_organs) B.escapable = FALSE cut_overlays() @@ -145,8 +143,7 @@ real_name = name name = "Something" - for(var/belly in vore_organs) - var/obj/belly/B = belly + for(var/obj/belly/B as anything in vore_organs) B.escapable = FALSE cut_overlays() @@ -166,8 +163,7 @@ spawn(300) shifted_out = FALSE name = real_name - for(var/belly in vore_organs) - var/obj/belly/B = belly + for(var/obj/belly/B as anything in vore_organs) B.escapable = initial(B.escapable) cut_overlays() diff --git a/code/modules/mob/living/simple_mob/subtypes/vore/lamia.dm b/code/modules/mob/living/simple_mob/subtypes/vore/lamia.dm index 880008dff9..7f525c8310 100644 --- a/code/modules/mob/living/simple_mob/subtypes/vore/lamia.dm +++ b/code/modules/mob/living/simple_mob/subtypes/vore/lamia.dm @@ -54,8 +54,7 @@ /mob/living/simple_mob/vore/lamia/update_fullness() var/new_fullness = 0 // We only want to count our upper_stomach towards capacity - for(var/belly in vore_organs) - var/obj/belly/B = belly + for(var/obj/belly/B as anything in vore_organs) if(B.name == "upper stomach") for(var/mob/living/M in B) new_fullness += M.size_multiplier @@ -76,8 +75,7 @@ var/upper_shows = FALSE var/tail_shows = FALSE - for(var/belly in vore_organs) - var/obj/belly/B = belly + for(var/obj/belly/B as anything in vore_organs) if(!(B.name in list("upper stomach", "tail stomach"))) continue var/belly_fullness = 0 diff --git a/code/modules/mob/living/simple_mob/subtypes/vore/shadekin/ability_procs.dm b/code/modules/mob/living/simple_mob/subtypes/vore/shadekin/ability_procs.dm index 208030125d..ec1161630a 100644 --- a/code/modules/mob/living/simple_mob/subtypes/vore/shadekin/ability_procs.dm +++ b/code/modules/mob/living/simple_mob/subtypes/vore/shadekin/ability_procs.dm @@ -21,8 +21,7 @@ ability_flags &= ~AB_PHASE_SHIFTED mouse_opacity = 1 name = real_name - for(var/belly in vore_organs) - var/obj/belly/B = belly + for(var/obj/belly/B as anything in vore_organs) B.escapable = initial(B.escapable) cut_overlays() @@ -76,8 +75,7 @@ real_name = name name = "Something" - for(var/belly in vore_organs) - var/obj/belly/B = belly + for(var/obj/belly/B as anything in vore_organs) B.escapable = FALSE cut_overlays() diff --git a/code/modules/mob/living/simple_mob/subtypes/vore/shadekin/shadekin.dm b/code/modules/mob/living/simple_mob/subtypes/vore/shadekin/shadekin.dm index 2f275db0f1..371fc8d241 100644 --- a/code/modules/mob/living/simple_mob/subtypes/vore/shadekin/shadekin.dm +++ b/code/modules/mob/living/simple_mob/subtypes/vore/shadekin/shadekin.dm @@ -215,8 +215,7 @@ abilities_stat() /mob/living/simple_mob/shadekin/proc/abilities_stat() - for(var/A in shadekin_abilities) - var/obj/effect/shadekin_ability/ability = A + for(var/obj/effect/shadekin_ability/ability as anything in shadekin_abilities) stat("[ability.ability_name]",ability.atom_button_text()) //They phase back to the dark when killed diff --git a/code/modules/mob/living/simple_mob/subtypes/vore/solargrub_larva.dm b/code/modules/mob/living/simple_mob/subtypes/vore/solargrub_larva.dm index 72e2532792..f3c200410b 100644 --- a/code/modules/mob/living/simple_mob/subtypes/vore/solargrub_larva.dm +++ b/code/modules/mob/living/simple_mob/subtypes/vore/solargrub_larva.dm @@ -205,8 +205,7 @@ var/global/list/grub_machine_overlays = list() var/static/potential_targets = typecacheof(list(/obj/machinery)) var/list/actual_targets = list() - for(var/AT in typecache_filter_list(range(vision_range, holder), potential_targets)) - var/obj/machinery/M = AT + for(var/obj/machinery/M as anything in typecache_filter_list(range(vision_range, holder), potential_targets)) if(istype(M, /obj/machinery/atmospherics/unary/vent_pump)) var/obj/machinery/atmospherics/unary/vent_pump/V = M if(!V.welded && prob(50)) diff --git a/code/modules/mob/living/simple_mob/subtypes/vore/zz_vore_overrides.dm b/code/modules/mob/living/simple_mob/subtypes/vore/zz_vore_overrides.dm index 3ea220ef8d..e1c19a2dd4 100644 --- a/code/modules/mob/living/simple_mob/subtypes/vore/zz_vore_overrides.dm +++ b/code/modules/mob/living/simple_mob/subtypes/vore/zz_vore_overrides.dm @@ -271,14 +271,12 @@ return . = ..() var/safe = (faction == "neutral") - for(var/belly in vore_organs) - var/obj/belly/B = belly + for(var/obj/belly/B as anything in vore_organs) B.digest_mode = safe ? DM_HOLD : vore_default_mode /mob/living/simple_mob/animal/space/carp/holographic/set_safety(var/safe) . = ..() - for(var/belly in vore_organs) - var/obj/belly/B = belly + for(var/obj/belly/B as anything in vore_organs) B.digest_mode = safe ? DM_HOLD : vore_default_mode /mob/living/simple_mob/animal/passive/mouse diff --git a/code/modules/mob/living/status_indicators.dm b/code/modules/mob/living/status_indicators.dm index a3f386b9e6..4f61b7ad34 100644 --- a/code/modules/mob/living/status_indicators.dm +++ b/code/modules/mob/living/status_indicators.dm @@ -67,8 +67,7 @@ current_x_position -= (icon_expected_width / 2) * (get_icon_scale_y() - 1) // Now the indicator row can actually be built. - for(var/thing in status_indicators) - var/image/I = thing + for(var/image/I as anything in status_indicators) // This is a semi-HUD element, in a similar manner as medHUDs, in that they're 'above' everything else in the world, // but don't pierce obfuscation layers such as blindness or darkness, unlike actual HUD elements like inventory slots. diff --git a/code/modules/mob/mob.dm b/code/modules/mob/mob.dm index af947a7b6e..be223341b8 100644 --- a/code/modules/mob/mob.dm +++ b/code/modules/mob/mob.dm @@ -114,16 +114,13 @@ runemessage = -1 // Symmetry with mob/audible_message, despite the fact this one doesn't call parent. Maybe it should! if(radio_message) - for(var/obj in hearing_objs) - var/obj/O = obj + for(var/obj/O as anything in hearing_objs) O.hear_talk(src, list(new /datum/multilingual_say_piece(GLOB.all_languages["Noise"], radio_message)), null) else - for(var/obj in hearing_objs) - var/obj/O = obj + for(var/obj/O as anything in hearing_objs) O.show_message(message, AUDIBLE_MESSAGE, deaf_message, VISIBLE_MESSAGE) - for(var/mob in hearing_mobs) - var/mob/M = mob + for(var/mob/M as anything in hearing_mobs) var/msg = message if(self_message && M==src) msg = self_message @@ -652,8 +649,7 @@ if(length(GLOB.sdql2_queries)) if(statpanel("SDQL2")) stat("Access Global SDQL2 List", GLOB.sdql2_vv_statobj) - for(var/i in GLOB.sdql2_queries) - var/datum/SDQL2_query/Q = i + for(var/datum/SDQL2_query/Q as anything in GLOB.sdql2_queries) Q.generate_stat() if(listed_turf && client) diff --git a/code/modules/mob/new_player/skill.dm b/code/modules/mob/new_player/skill.dm index a24da0e4ba..e1a0b50b7f 100644 --- a/code/modules/mob/new_player/skill.dm +++ b/code/modules/mob/new_player/skill.dm @@ -159,7 +159,7 @@ var/global/list/SKILL_PRE = list("Engineer" = SKILL_ENGINEER, "Roboticist" = SKI /proc/setup_skills() if(SKILLS == null) SKILLS = list() - for(var/T in (typesof(/datum/skill)-/datum/skill)) + for(var/T in subtypesof(/datum/skill)) var/datum/skill/S = new T if(S.ID != "none") if(!SKILLS.Find(S.field)) diff --git a/code/modules/mob/say_vr.dm b/code/modules/mob/say_vr.dm index 64f65adfbb..8b06163590 100644 --- a/code/modules/mob/say_vr.dm +++ b/code/modules/mob/say_vr.dm @@ -49,8 +49,7 @@ var/list/vis_mobs = vis["mobs"] var/list/vis_objs = vis["objs"] - for(var/vismob in vis_mobs) - var/mob/M = vismob + for(var/mob/M as anything in vis_mobs) if(isobserver(M) && !is_preference_enabled(/datum/client_preference/whisubtle_vis) && !M.client?.holder) spawn(0) M.show_message(undisplayed_message, 2) @@ -58,8 +57,7 @@ spawn(0) M.show_message(message, 2) - for(var/visobj in vis_objs) - var/obj/O = visobj + for(var/obj/O as anything in vis_objs) spawn(0) O.see_emote(src, message, 2) diff --git a/code/modules/modular_computers/computers/modular_computer/interaction.dm b/code/modules/modular_computers/computers/modular_computer/interaction.dm index d7e8573010..4cc9c8ba89 100644 --- a/code/modules/modular_computers/computers/modular_computer/interaction.dm +++ b/code/modules/modular_computers/computers/modular_computer/interaction.dm @@ -97,7 +97,7 @@ uninstall_component(user, portable_drive) update_uis() -/obj/item/modular_computer/attack_ghost(var/mob/observer/ghost/user) +/obj/item/modular_computer/attack_ghost(var/mob/observer/dead/user) if(enabled) tgui_interact(user) else if(check_rights(R_ADMIN|R_EVENT, 0, user)) diff --git a/code/modules/modular_computers/file_system/programs/generic/ntnrc_client.dm b/code/modules/modular_computers/file_system/programs/generic/ntnrc_client.dm index f2466213f3..a9a1e3456d 100644 --- a/code/modules/modular_computers/file_system/programs/generic/ntnrc_client.dm +++ b/code/modules/modular_computers/file_system/programs/generic/ntnrc_client.dm @@ -83,8 +83,7 @@ return TRUE var/mob/living/user = usr if(can_run(user, TRUE, access_network)) - for(var/C in ntnet_global.chat_channels) - var/datum/ntnet_conversation/chan = C + for(var/datum/ntnet_conversation/chan as anything in ntnet_global.chat_channels) chan.remove_client(src) netadmin_mode = TRUE return TRUE @@ -92,8 +91,7 @@ var/newname = sanitize(params["new_name"]) if(!newname) return - for(var/C in ntnet_global.chat_channels) - var/datum/ntnet_conversation/chan = C + for(var/datum/ntnet_conversation/chan as anything in ntnet_global.chat_channels) if(src in chan.clients) chan.add_status_message("[username] is now known as [newname].") username = newname @@ -163,8 +161,7 @@ ui_header = "ntnrc_idle.gif" /datum/computer_file/program/chatclient/kill_program(forced = FALSE) - for(var/C in ntnet_global.chat_channels) - var/datum/ntnet_conversation/channel = C + for(var/datum/ntnet_conversation/channel as anything in ntnet_global.chat_channels) channel.remove_client(src) ..() @@ -180,8 +177,7 @@ var/list/data = get_header_data() var/list/all_channels = list() - for(var/C in ntnet_global.chat_channels) - var/datum/ntnet_conversation/conv = C + for(var/datum/ntnet_conversation/conv as anything in ntnet_global.chat_channels) if(conv && conv.title) all_channels.Add(list(list( "chan" = conv.title, diff --git a/code/modules/modular_computers/hardware/network_card.dm b/code/modules/modular_computers/hardware/network_card.dm index 86af5d9ba0..7a3a4da632 100644 --- a/code/modules/modular_computers/hardware/network_card.dm +++ b/code/modules/modular_computers/hardware/network_card.dm @@ -106,8 +106,7 @@ var/global/ntnet_card_uid = 1 var/list/zlevels_in_range = using_map.get_map_levels(holderz, FALSE) var/list/zlevels_in_long_range = using_map.get_map_levels(holderz, TRUE, om_range = DEFAULT_OVERMAP_RANGE) - zlevels_in_range var/best = 0 - for(var/relay in ntnet_global.relays) - var/obj/machinery/ntnet_relay/R = relay + for(var/obj/machinery/ntnet_relay/R as anything in ntnet_global.relays) //Relay is down if(!R.operable()) continue diff --git a/code/modules/multiz/ladders.dm b/code/modules/multiz/ladders.dm index e45e61e482..b4626022bb 100644 --- a/code/modules/multiz/ladders.dm +++ b/code/modules/multiz/ladders.dm @@ -89,7 +89,7 @@ return FALSE return TRUE -/mob/observer/ghost/may_climb_ladders(var/ladder) +/mob/observer/dead/may_climb_ladders(var/ladder) return TRUE /obj/structure/ladder/proc/climbLadder(var/mob/M, var/obj/target_ladder) diff --git a/code/modules/multiz/movement.dm b/code/modules/multiz/movement.dm index bcf36f0c43..3c87480a5c 100644 --- a/code/modules/multiz/movement.dm +++ b/code/modules/multiz/movement.dm @@ -265,7 +265,7 @@ return //VOREStation Edit End - if(can_fall()) + if(can_fall() && can_fall_to(below)) // We spawn here to let the current move operation complete before we start falling. fall() is normally called from // Entered() which is part of Move(), by spawn()ing we let that complete. But we want to preserve if we were in client movement // or normal movement so other move behavior can continue. @@ -318,6 +318,18 @@ if(..()) return species.can_fall(src) +// Another check that we probably can just merge into can_fall exept for messing up overrides +/atom/movable/proc/can_fall_to(turf/landing) + // Check if there is anything in our turf we are standing on to prevent falling. + for(var/obj/O in loc) + if(!O.CanFallThru(src, landing)) + return FALSE + // See if something in turf below prevents us from falling into it. + for(var/atom/A in landing) + if(!A.CanPass(src, src.loc, 1, 0)) + return FALSE + return TRUE + // Check if this atom prevents things standing on it from falling. Return TRUE to allow the fall. /obj/proc/CanFallThru(atom/movable/mover as mob|obj, turf/target as turf) if(!isturf(mover.loc)) // VORESTATION EDIT. We clearly didn't have enough backup checks. @@ -357,15 +369,6 @@ /atom/movable/proc/handle_fall(var/turf/landing) var/turf/oldloc = loc - // Check if there is anything in our turf we are standing on to prevent falling. - for(var/obj/O in loc) - if(!O.CanFallThru(src, landing)) - return FALSE - // See if something in turf below prevents us from falling into it. - for(var/atom/A in landing) - if(!A.CanPass(src, src.loc, 1, 0)) - return FALSE - // Now lets move there! if(!Move(landing)) return 1 diff --git a/code/modules/nifsoft/nif.dm b/code/modules/nifsoft/nif.dm index 8117293f90..cd2668f1d4 100644 --- a/code/modules/nifsoft/nif.dm +++ b/code/modules/nifsoft/nif.dm @@ -339,8 +339,7 @@ You can also set the stat of a NIF to NIF_TEMPFAIL without any issues to disable //nif_hud.process_hud(human,1) //TODO VIS //Process all the ones that want that - for(var/S in nifsofts_life) - var/datum/nifsoft/nifsoft = S + for(var/datum/nifsoft/nifsoft as anything in nifsofts_life) nifsoft.life(human) if(NIF_POWFAIL) diff --git a/code/modules/nifsoft/nif_softshop.dm b/code/modules/nifsoft/nif_softshop.dm index 9ba72f215e..3fb2f43684 100644 --- a/code/modules/nifsoft/nif_softshop.dm +++ b/code/modules/nifsoft/nif_softshop.dm @@ -60,8 +60,7 @@ if(!starting_legal_nifsoft) starting_legal_nifsoft = list() starting_illegal_nifsoft = list() - for(var/P in (subtypesof(/datum/nifsoft) - typesof(/datum/nifsoft/package))) - var/datum/nifsoft/NS = P + for(var/datum/nifsoft/NS as anything in (subtypesof(/datum/nifsoft) - typesof(/datum/nifsoft/package))) if(initial(NS.vended)) switch(initial(NS.illegal)) if(TRUE) @@ -80,8 +79,7 @@ for(var/current_list in all_products) var/category = current_list[CAT_HIDDEN] - for(var/entry in current_list[CAT_NORMAL]) - var/datum/nifsoft/NS = entry + for(var/datum/nifsoft/NS as anything in current_list[CAT_NORMAL]) var/applies_to = initial(NS.applies_to) var/context = "" if(!(applies_to & NIF_SYNTHETIC)) @@ -89,7 +87,7 @@ else if(!(applies_to & NIF_ORGANIC)) context = " (Syn Only)" var/name = "[initial(NS.name)][context]" - var/datum/stored_item/vending_product/product = new/datum/stored_item/vending_product(src, entry, name) + var/datum/stored_item/vending_product/product = new/datum/stored_item/vending_product(src, NS, name) product.price = initial(NS.cost) product.amount = 10 diff --git a/code/modules/nifsoft/software/05_health.dm b/code/modules/nifsoft/software/05_health.dm index 7ceb260b6e..5e213781fa 100644 --- a/code/modules/nifsoft/software/05_health.dm +++ b/code/modules/nifsoft/software/05_health.dm @@ -115,10 +115,8 @@ //Needs fixing W << 'sound/voice/nifmedsynth_injured.ogg' //CHOMP Add activate() - for(var/eo in nif.human.bad_external_organs) - var/obj/item/organ/external/EO = eo - for(var/w in EO.wounds) - var/datum/wound/W = w + for(var/obj/item/organ/external/EO as anything in nif.human.bad_external_organs) + for(var/datum/wound/W as anything in EO.wounds) if(W.damage <= 30) // Chomp Edit // The current limb break threshold. W.heal_damage(0.1) EO.update_damages() diff --git a/code/modules/nifsoft/software/13_soulcatcher.dm b/code/modules/nifsoft/software/13_soulcatcher.dm index 6bb9536426..750f1b7df2 100644 --- a/code/modules/nifsoft/software/13_soulcatcher.dm +++ b/code/modules/nifsoft/software/13_soulcatcher.dm @@ -75,10 +75,9 @@ to_chat(nif.human,"\[[bicon(nif.big_icon)]NIF\] Soulcatcher displays, \"[message]\"") nif.human << sound - for(var/brainmob in brainmobs) - var/mob/living/carbon/brain/caught_soul/CS = brainmob + for(var/mob/living/carbon/brain/caught_soul/CS as anything in brainmobs) to_chat(CS,"\[[bicon(nif.big_icon)]NIF\] Soulcatcher displays, \"[message]\"") - brainmob << sound + CS << sound /datum/nifsoft/soulcatcher/proc/say_into(var/message, var/mob/living/sender, var/mob/eyeobj) var/sender_name = eyeobj ? eyeobj.name : sender.name @@ -90,8 +89,7 @@ //Not AR Projecting else to_chat(nif.human,"\[[bicon(nif.big_icon)]NIF\] [sender_name] speaks, \"[message]\"") - for(var/brainmob in brainmobs) - var/mob/living/carbon/brain/caught_soul/CS = brainmob + for(var/mob/living/carbon/brain/caught_soul/CS as anything in brainmobs) to_chat(CS,"\[[bicon(nif.big_icon)]NIF\] [sender_name] speaks, \"[message]\"") log_nsay(message,nif.human.real_name,sender) @@ -106,8 +104,7 @@ //Not AR Projecting else to_chat(nif.human,"\[[bicon(nif.big_icon)]NIF\] [sender_name] [message]") - for(var/brainmob in brainmobs) - var/mob/living/carbon/brain/caught_soul/CS = brainmob + for(var/mob/living/carbon/brain/caught_soul/CS as anything in brainmobs) to_chat(CS,"\[[bicon(nif.big_icon)]NIF\] [sender_name] [message]") log_nme(message,nif.human.real_name,sender) @@ -135,8 +132,7 @@ new_flavor = sanitize(new_flavor, MAX_MESSAGE_LEN*2) inside_flavor = new_flavor nif.notify("Updating VR environment...") - for(var/brain in brainmobs) - var/mob/living/carbon/brain/caught_soul/CS = brain + for(var/mob/living/carbon/brain/caught_soul/CS as anything in brainmobs) to_chat(CS,"Your surroundings change to...\n[inside_flavor]") save_settings() return TRUE @@ -179,24 +175,20 @@ nif.clear_flag(NIF_O_SCOTHERS,NIF_FLAGS_OTHER) if(NIF_SC_ALLOW_EARS) if(setting_flags & NIF_SC_ALLOW_EARS) - for(var/brain in brainmobs) - var/mob/living/carbon/brain/caught_soul/brainmob = brain + for(var/mob/living/carbon/brain/caught_soul/brainmob as anything in brainmobs) brainmob.ext_deaf = FALSE notify_message = "External audio input enabled." else - for(var/brain in brainmobs) - var/mob/living/carbon/brain/caught_soul/brainmob = brain + for(var/mob/living/carbon/brain/caught_soul/brainmob as anything in brainmobs) brainmob.ext_deaf = TRUE notify_message = "External audio input disabled." if(NIF_SC_ALLOW_EYES) if(setting_flags & NIF_SC_ALLOW_EYES) - for(var/brain in brainmobs) - var/mob/living/carbon/brain/caught_soul/brainmob = brain + for(var/mob/living/carbon/brain/caught_soul/brainmob as anything in brainmobs) brainmob.ext_blind = FALSE notify_message = "External video input enabled." else - for(var/brain in brainmobs) - var/mob/living/carbon/brain/caught_soul/brainmob = brain + for(var/mob/living/carbon/brain/caught_soul/brainmob as anything in brainmobs) brainmob.ext_blind = TRUE notify_message = "External video input disabled." diff --git a/code/modules/organs/organ_external.dm b/code/modules/organs/organ_external.dm index 01b5a7f1ef..85f76d9aa0 100644 --- a/code/modules/organs/organ_external.dm +++ b/code/modules/organs/organ_external.dm @@ -106,8 +106,7 @@ while(null in owner.organs) owner.organs -= null - for(var/imp in implants) - var/obj/item/weapon/implant/I = imp + for(var/obj/item/weapon/implant/I as anything in implants) if(!istype(I)) continue I.imp_in = I.part = null diff --git a/code/modules/overmap/events/event_handler.dm b/code/modules/overmap/events/event_handler.dm index 67785e95ac..2d9c2badda 100644 --- a/code/modules/overmap/events/event_handler.dm +++ b/code/modules/overmap/events/event_handler.dm @@ -14,8 +14,7 @@ GLOBAL_DATUM_INIT(overmap_event_handler, /decl/overmap_event_handler, new) // Acquire the list of not-yet utilized overmap turfs on this Z-level var/list/overmap_turfs = block(locate(OVERMAP_EDGE, OVERMAP_EDGE, z_level), locate(overmap_size - OVERMAP_EDGE, overmap_size - OVERMAP_EDGE, z_level)) var/list/candidate_turfs = list() - for(var/Trf in overmap_turfs) - var/turf/T = Trf + for(var/turf/T as anything in overmap_turfs) if(!(locate(/obj/effect/overmap/visitable) in T)) candidate_turfs += T diff --git a/code/modules/overmap/sectors.dm b/code/modules/overmap/sectors.dm index 1b422c01d3..1e4cc23634 100644 --- a/code/modules/overmap/sectors.dm +++ b/code/modules/overmap/sectors.dm @@ -240,8 +240,7 @@ testing("Putting overmap on [global.using_map.overmap_z]") var/area/overmap/A = new - for (var/square in block(locate(1,1,global.using_map.overmap_z), locate(global.using_map.overmap_size,global.using_map.overmap_size,global.using_map.overmap_z))) - var/turf/T = square + for(var/turf/T as anything in block(locate(1,1,global.using_map.overmap_z), locate(global.using_map.overmap_size,global.using_map.overmap_size,global.using_map.overmap_z))) if(T.x == 1 || T.y == 1 || T.x == global.using_map.overmap_size || T.y == global.using_map.overmap_size) T = T.ChangeTurf(/turf/unsimulated/map/edge) else diff --git a/code/modules/overmap/ships/engines/gas_thruster.dm b/code/modules/overmap/ships/engines/gas_thruster.dm index 773ed97a64..5510a803de 100644 --- a/code/modules/overmap/ships/engines/gas_thruster.dm +++ b/code/modules/overmap/ships/engines/gas_thruster.dm @@ -86,8 +86,7 @@ controller = new(src) update_nearby_tiles(need_rebuild=1) - for(var/ship in SSshuttles.ships) - var/obj/effect/overmap/visitable/ship/S = ship + for(var/obj/effect/overmap/visitable/ship/S as anything in SSshuttles.ships) if(S.check_ownership(src)) S.engines |= controller if(dir != S.fore_dir) diff --git a/code/modules/overmap/ships/panicbutton.dm b/code/modules/overmap/ships/panicbutton.dm index 4e819db642..dcbcbf500f 100644 --- a/code/modules/overmap/ships/panicbutton.dm +++ b/code/modules/overmap/ships/panicbutton.dm @@ -66,8 +66,7 @@ var/turf/us = get_turf(src) for(var/hz in hear_z) - for(var/m in GLOB.players_by_zlevel[hz]) - var/mob/M = m + for(var/mob/M as anything in GLOB.players_by_zlevel[hz]) var/sound/SND = sound('sound/misc/emergency_beacon_launched.ogg') // Inside the loop because playsound_local modifies it for each person, so, need separate instances var/turf/them = get_turf(M) var/volume = max(0.20, 1-(get_dist(us,them) / mapsize*0.8))*100 diff --git a/code/modules/paperwork/paperplane.dm b/code/modules/paperwork/paperplane.dm index 65c3bff6bf..a8cb28b873 100644 --- a/code/modules/paperwork/paperplane.dm +++ b/code/modules/paperwork/paperplane.dm @@ -40,8 +40,7 @@ if(!stamped) stamped = new else if(stamped) - for(var/S in stamped) - var/obj/item/weapon/stamp/ = S + for(var/obj/item/weapon/stamp/stamp as anything in stamped) var/image/stampoverlay = image('icons/obj/bureaucracy.dmi', "paperplane_[initial(stamp.icon_state)]") add_overlay(stampoverlay) diff --git a/code/modules/paperwork/photocopier.dm b/code/modules/paperwork/photocopier.dm index 74cceb11f6..72eca4beb4 100644 --- a/code/modules/paperwork/photocopier.dm +++ b/code/modules/paperwork/photocopier.dm @@ -286,7 +286,7 @@ temp_img = icon('icons/obj/butts_vr.dmi', "machine") if(SPECIES_WEREBEAST) temp_img = icon('icons/obj/butts_vr.dmi', "vulp") // Give Werewolves their own thicc'er than a boal of oatmeal ass sprite someday? - if(SPECIES_XENOHYBRID, SPECIES_GENA, SPECIES_GENA_DRONE, SPECIES_GENA_HUNTER, SPECIES_GENA_QUEEN, SPECIES_GENA_SENTINEL) // Xenos + Xenohybrids have their own asses, thanks to Pybro. CHOMPedit + if(SPECIES_XENOHYBRID, SPECIES_XENO, SPECIES_XENO_DRONE, SPECIES_XENO_HUNTER, SPECIES_XENO_QUEEN, SPECIES_XENO_SENTINEL) // Xenos + Xenohybrids have their own asses, thanks to Pybro. temp_img = icon('icons/obj/butts_vr.dmi', "xeno") if(SPECIES_ZORREN_HIGH) temp_img = icon('icons/obj/butts_vr.dmi', "vulp") // placeholder until we get zorren butts. diff --git a/code/modules/pda/cart.dm b/code/modules/pda/cart.dm index d391419d91..596486f3df 100644 --- a/code/modules/pda/cart.dm +++ b/code/modules/pda/cart.dm @@ -69,11 +69,9 @@ var/list/civilian_cartridges = list( return ..() /obj/item/weapon/cartridge/proc/update_programs(obj/item/device/pda/pda) - for(var/A in programs) - var/datum/data/pda/P = A + for(var/datum/data/pda/P as anything in programs) P.pda = pda - for(var/A in messenger_plugins) - var/datum/data/pda/messenger_plugin/P = A + for(var/datum/data/pda/messenger_plugin/P as anything in messenger_plugins) P.pda = pda /obj/item/weapon/cartridge/engineering diff --git a/code/modules/pda/cart_apps.dm b/code/modules/pda/cart_apps.dm index acd942aa93..857b7bbc04 100644 --- a/code/modules/pda/cart_apps.dm +++ b/code/modules/pda/cart_apps.dm @@ -136,8 +136,7 @@ records["general"] = general_records.fields return records else - for(var/A in sortRecord(data_core.general)) - var/datum/data/record/R = A + for(var/datum/data/record/R as anything in sortRecord(data_core.general)) if(R) records += list(list(Name = R.fields["name"], "ref" = "\ref[R]")) data["recordsList"] = records @@ -182,8 +181,7 @@ /datum/data/pda/app/crew_records/medical/load_records(datum/data/record/R) ..(R) - for(var/A in data_core.medical) - var/datum/data/record/E = A + for(var/datum/data/record/E as anything in data_core.medical) if(E && (E.fields["name"] == R.fields["name"] || E.fields["id"] == R.fields["id"])) medical_records = E break @@ -208,8 +206,7 @@ /datum/data/pda/app/crew_records/security/load_records(datum/data/record/R) ..(R) - for(var/A in data_core.security) - var/datum/data/record/E = A + for(var/datum/data/record/E as anything in data_core.security) if(E && (E.fields["name"] == R.fields["name"] || E.fields["id"] == R.fields["id"])) security_records = E break @@ -229,8 +226,7 @@ supplyData["shuttle_loc"] = shuttle.at_station() ? "Station" : "Dock" var/supplyOrderCount = 0 var/supplyOrderData[0] - for(var/S in SSsupply.shoppinglist) - var/datum/supply_order/SO = S + for(var/datum/supply_order/SO as anything in SSsupply.shoppinglist) supplyOrderCount++ supplyOrderData[++supplyOrderData.len] = list("Number" = SO.ordernum, "Name" = html_encode(SO.object.name), "ApprovedBy" = SO.ordered_by, "Comment" = html_encode(SO.comment)) @@ -240,8 +236,7 @@ var/requestCount = 0 var/requestData[0] - for(var/S in SSsupply.order_history) - var/datum/supply_order/SO = S + for(var/datum/supply_order/SO as anything in SSsupply.order_history) if(SO.status != SUP_ORDER_REQUESTED) continue diff --git a/code/modules/pda/messenger.dm b/code/modules/pda/messenger.dm index efb87577d5..03996dc35c 100644 --- a/code/modules/pda/messenger.dm +++ b/code/modules/pda/messenger.dm @@ -33,8 +33,7 @@ else var/convopdas[0] var/pdas[0] - for(var/A in PDAs) - var/obj/item/device/pda/P = A + for(var/obj/item/device/pda/P as anything in PDAs) var/datum/data/pda/app/messenger/PM = P.find_program(/datum/data/pda/app/messenger) if(!P.owner || PM.toff || P == pda || PM.m_hidden) @@ -49,8 +48,7 @@ var/list/plugins = list() if(pda.cartridge) - for(var/A in pda.cartridge.messenger_plugins) - var/datum/data/pda/messenger_plugin/P = A + for(var/datum/data/pda/messenger_plugin/P as anything in pda.cartridge.messenger_plugins) plugins += list(list(name = P.name, icon = P.icon, ref = "\ref[P]")) data["plugins"] = plugins @@ -148,8 +146,7 @@ //var/telecomms_intact = telecomms_process(P.owner, owner, t) var/obj/machinery/message_server/useMS = null if(message_servers) - for(var/A in message_servers) - var/obj/machinery/message_server/MS = A + for(var/obj/machinery/message_server/MS as anything in message_servers) //PDAs are now dependent on the Message Server. if(MS.active) useMS = MS @@ -194,8 +191,7 @@ to_chat(usr, "Turn on your receiver in order to send messages.") return - for(var/A in PDAs) - var/obj/item/device/pda/P = A + for(var/obj/item/device/pda/P as anything in PDAs) var/datum/data/pda/app/messenger/PM = P.find_program(/datum/data/pda/app/messenger) if(!P.owner || !PM || PM.hidden || P == pda || PM.toff) diff --git a/code/modules/pda/pda.dm b/code/modules/pda/pda.dm index 274a27857a..a237436974 100644 --- a/code/modules/pda/pda.dm +++ b/code/modules/pda/pda.dm @@ -197,8 +197,7 @@ var/global/list/obj/item/device/pda/PDAs = list() shortcut_cache.Cut() /obj/item/device/pda/proc/update_programs() - for(var/A in programs) - var/datum/data/pda/P = A + for(var/datum/data/pda/P as anything in programs) P.pda = src /obj/item/device/pda/proc/detonate_act(var/obj/item/device/pda/P) diff --git a/code/modules/pda/pda_tgui.dm b/code/modules/pda/pda_tgui.dm index 6d57a6c25e..036ec1fbe4 100644 --- a/code/modules/pda/pda_tgui.dm +++ b/code/modules/pda/pda_tgui.dm @@ -22,8 +22,7 @@ if(cartridge) prog_list |= cartridge.programs - for(var/A in prog_list) - var/datum/data/pda/P = A + for(var/datum/data/pda/P as anything in prog_list) if(P.hidden) continue diff --git a/code/modules/planet/sif.dm b/code/modules/planet/sif.dm index af6f632bdc..1d2e4b0af0 100644 --- a/code/modules/planet/sif.dm +++ b/code/modules/planet/sif.dm @@ -499,8 +499,7 @@ var/datum/planet/sif/planet_sif = null /datum/weather/sif/ash_storm/process_effects() ..() - for(var/thing in living_mob_list) - var/mob/living/L = thing + for(var/mob/living/L as anything in living_mob_list) if(L.z in holder.our_planet.expected_z_levels) var/turf/T = get_turf(L) if(!T.outdoors) @@ -536,8 +535,7 @@ var/datum/planet/sif/planet_sif = null /datum/weather/sif/fallout/process_effects() ..() - for(var/thing in living_mob_list) - var/mob/living/L = thing + for(var/mob/living/L as anything in living_mob_list) if(L.z in holder.our_planet.expected_z_levels) irradiate_nearby_turf(L) var/turf/T = get_turf(L) diff --git a/code/modules/planet/virgo3b_vr.dm b/code/modules/planet/virgo3b_vr.dm index ea441b6f38..d2faf2315d 100644 --- a/code/modules/planet/virgo3b_vr.dm +++ b/code/modules/planet/virgo3b_vr.dm @@ -471,8 +471,7 @@ var/datum/planet/virgo3b/planet_virgo3b = null /datum/weather/virgo3b/ash_storm/process_effects() ..() - for(var/thing in living_mob_list) - var/mob/living/L = thing + for(var/mob/living/L as anything in living_mob_list) if(L.z in holder.our_planet.expected_z_levels) var/turf/T = get_turf(L) if(!T.outdoors) @@ -508,8 +507,7 @@ var/datum/planet/virgo3b/planet_virgo3b = null /datum/weather/virgo3b/fallout/process_effects() ..() - for(var/thing in living_mob_list) - var/mob/living/L = thing + for(var/mob/living/L as anything in living_mob_list) if(L.z in holder.our_planet.expected_z_levels) irradiate_nearby_turf(L) var/turf/T = get_turf(L) diff --git a/code/modules/planet/virgo4_vr.dm b/code/modules/planet/virgo4_vr.dm index 6ac748f421..18f4298aa1 100644 --- a/code/modules/planet/virgo4_vr.dm +++ b/code/modules/planet/virgo4_vr.dm @@ -444,8 +444,7 @@ var/datum/planet/virgo4/planet_virgo4 = null /datum/weather/virgo4/ash_storm/process_effects() ..() - for(var/thing in living_mob_list) - var/mob/living/L = thing + for(var/mob/living/L as anything in living_mob_list) if(L.z in holder.our_planet.expected_z_levels) var/turf/T = get_turf(L) if(!T.outdoors) @@ -481,8 +480,7 @@ var/datum/planet/virgo4/planet_virgo4 = null /datum/weather/virgo4/fallout/process_effects() ..() - for(var/thing in living_mob_list) - var/mob/living/L = thing + for(var/mob/living/L as anything in living_mob_list) if(L.z in holder.our_planet.expected_z_levels) irradiate_nearby_turf(L) var/turf/T = get_turf(L) diff --git a/code/modules/planet/weather.dm b/code/modules/planet/weather.dm index 48953a97f1..bbe2318a27 100644 --- a/code/modules/planet/weather.dm +++ b/code/modules/planet/weather.dm @@ -202,8 +202,7 @@ return for(var/z_level in 1 to world.maxz) - for(var/a in GLOB.players_by_zlevel[z_level]) - var/mob/M = a + for(var/mob/M as anything in GLOB.players_by_zlevel[z_level]) // Check if the mob left the z-levels we control. If so, make the sounds stop for them. if(!(z_level in holder.our_planet.expected_z_levels)) diff --git a/code/modules/power/fusion/fusion_reactions.dm b/code/modules/power/fusion/fusion_reactions.dm index b49fa564bc..54d72b11e8 100644 --- a/code/modules/power/fusion/fusion_reactions.dm +++ b/code/modules/power/fusion/fusion_reactions.dm @@ -17,7 +17,8 @@ var/list/fusion_reactions /proc/get_fusion_reaction(var/p_react, var/s_react, var/m_energy) if(!fusion_reactions) fusion_reactions = list() - for(var/rtype in typesof(/decl/fusion_reaction) - /decl/fusion_reaction) + for(var/rtype in subtypesof(/decl/fusion_reaction) + ) var/decl/fusion_reaction/cur_reaction = new rtype() if(!fusion_reactions[cur_reaction.p_react]) fusion_reactions[cur_reaction.p_react] = list() diff --git a/code/modules/power/gravitygenerator_vr.dm b/code/modules/power/gravitygenerator_vr.dm index cce22b705a..ae282b41ca 100644 --- a/code/modules/power/gravitygenerator_vr.dm +++ b/code/modules/power/gravitygenerator_vr.dm @@ -389,8 +389,7 @@ GLOBAL_LIST_EMPTY(gravity_generators) // Shake everyone on the z level to let them know that gravity was enagaged/disenagaged. /obj/machinery/gravity_generator/main/proc/shake_everyone() var/sound/alert_sound = sound('sound/effects/alert.ogg') - for(var/i in player_list) - var/mob/M = i + for(var/mob/M as anything in player_list) if(!(M.z in levels)) continue M.update_gravity(M.mob_has_gravity()) diff --git a/code/modules/power/singularity/singularity.dm b/code/modules/power/singularity/singularity.dm index 3225030581..39d413677d 100644 --- a/code/modules/power/singularity/singularity.dm +++ b/code/modules/power/singularity/singularity.dm @@ -265,8 +265,7 @@ GLOBAL_LIST_BOILERPLATE(all_singularities, /obj/singularity) return 1 /obj/singularity/proc/eat() - for(var/T in orange(grav_pull, src)) - var/atom/X = T + for(var/atom/X as anything in orange(grav_pull, src)) if(!X.simulated) continue var/dist = get_dist(X, src) diff --git a/code/modules/power/solar.dm b/code/modules/power/solar.dm index 8a20c9e685..17bf6a400a 100644 --- a/code/modules/power/solar.dm +++ b/code/modules/power/solar.dm @@ -314,8 +314,7 @@ GLOBAL_LIST_EMPTY(solars_list) // This would use LateInitialize(), however the powernet does not appear to exist during that time. /hook/roundstart/proc/auto_start_solars() - for(var/a in GLOB.solars_list) - var/obj/machinery/power/solar_control/SC = a + for(var/obj/machinery/power/solar_control/SC as anything in GLOB.solars_list) SC.auto_start() return TRUE diff --git a/code/modules/power/tesla/energy_ball.dm b/code/modules/power/tesla/energy_ball.dm index e3ccafa4cc..cf7aa9e2c1 100644 --- a/code/modules/power/tesla/energy_ball.dm +++ b/code/modules/power/tesla/energy_ball.dm @@ -40,8 +40,7 @@ var/obj/singularity/energy_ball/EB = orbiting.orbiting EB.orbiting_balls -= src - for(var/ball in orbiting_balls) - var/obj/singularity/energy_ball/EB = ball + for(var/obj/singularity/energy_ball/EB as anything in orbiting_balls) qdel(EB) . = ..() diff --git a/code/modules/projectiles/broken.dm b/code/modules/projectiles/broken.dm index f46f7f34e5..57809fdbd1 100644 --- a/code/modules/projectiles/broken.dm +++ b/code/modules/projectiles/broken.dm @@ -31,20 +31,19 @@ if(do_after(user, 5 SECONDS)) to_chat(user, "\The [src] can possibly be restored with:") - for(var/resource in material_needs) - var/obj/item/res = resource - if(material_needs[resource] > 0) + for(var/obj/item/res as anything in material_needs) + if(material_needs[res] > 0) var/res_name = "" if(ispath(res,/obj/item/stack/material)) var/obj/item/stack/material/mat_stack = res var/datum/material/mat = get_material_by_name("[initial(mat_stack.default_type)]") - if(material_needs[resource]>1) + if(material_needs[res]>1) res_name = "[mat.use_name] [mat.sheet_plural_name]" else res_name = "[mat.use_name] [mat.sheet_singular_name]" else res_name = initial(res.name) - to_chat(user, "- x [material_needs[resource]] [res_name]") + to_chat(user, "- x [material_needs[res]] [res_name]") /obj/item/weapon/broken_gun/proc/setup_gun(var/obj/item/weapon/gun/path) if(ispath(path)) diff --git a/code/modules/projectiles/guns/energy/cell_loaded_vr/cell_loaded.dm b/code/modules/projectiles/guns/energy/cell_loaded_vr/cell_loaded.dm index c819e8c603..eaa3a2d9e8 100644 --- a/code/modules/projectiles/guns/energy/cell_loaded_vr/cell_loaded.dm +++ b/code/modules/projectiles/guns/energy/cell_loaded_vr/cell_loaded.dm @@ -34,8 +34,7 @@ if(batt.shots_left) return new chambered.projectile_type() else - for(var/B in ammo_magazine.stored_ammo) - var/obj/item/ammo_casing/microbattery/other_batt = B + for(var/obj/item/ammo_casing/microbattery/other_batt as anything in ammo_magazine.stored_ammo) if(istype(other_batt,chambered.type) && other_batt.shots_left) switch_to(other_batt) return new chambered.projectile_type() @@ -54,8 +53,7 @@ charge_left = batt.shots_left max_charge = initial(batt.shots_left) if(ammo_magazine) //Crawl to find more - for(var/B in ammo_magazine.stored_ammo) - var/obj/item/ammo_casing/microbattery/bullet = B + for(var/obj/item/ammo_casing/microbattery/bullet as anything in ammo_magazine.stored_ammo) if(istype(bullet,batt.type)) charge_left += bullet.shots_left max_charge += initial(bullet.shots_left) @@ -179,8 +177,7 @@ return //Why bother var/current = 0 - for(var/B in stored_ammo) - var/obj/item/ammo_casing/microbattery/batt = B + for(var/obj/item/ammo_casing/microbattery/batt as anything in stored_ammo) var/image/cap = image(icon, icon_state = "[capname]_cap") cap.color = batt.type_color cap.pixel_x = current * x_offset //Caps don't need a pixel_y offset diff --git a/code/modules/projectiles/guns/energy/kinetic_accelerator_vr.dm b/code/modules/projectiles/guns/energy/kinetic_accelerator_vr.dm index 043a353015..581e05d74d 100644 --- a/code/modules/projectiles/guns/energy/kinetic_accelerator_vr.dm +++ b/code/modules/projectiles/guns/energy/kinetic_accelerator_vr.dm @@ -25,8 +25,7 @@ . = ..() if(Adjacent(user) && max_mod_capacity) . += "[get_remaining_mod_capacity()]% mod capacity remaining." - for(var/A in get_modkits()) - var/obj/item/borg/upgrade/modkit/M = A + for(var/obj/item/borg/upgrade/modkit/M as anything in get_modkits()) . += "There is a [M.name] mod installed, using [M.cost]% capacity." /obj/item/weapon/gun/energy/kinetic_accelerator/attackby(obj/item/A, mob/user) @@ -46,8 +45,7 @@ /obj/item/weapon/gun/energy/kinetic_accelerator/proc/get_remaining_mod_capacity() var/current_capacity_used = 0 - for(var/A in get_modkits()) - var/obj/item/borg/upgrade/modkit/M = A + for(var/obj/item/borg/upgrade/modkit/M as anything in get_modkits()) current_capacity_used += M.cost return max_mod_capacity - current_capacity_used @@ -57,8 +55,7 @@ . += A /obj/item/weapon/gun/energy/kinetic_accelerator/proc/modify_projectile(obj/item/projectile/kinetic/K) - for(var/A in get_modkits()) - var/obj/item/borg/upgrade/modkit/M = A + for(var/obj/item/borg/upgrade/modkit/M as anything in get_modkits()) M.modify_projectile(K) /obj/item/weapon/gun/energy/kinetic_accelerator/consume_next_projectile() @@ -185,8 +182,7 @@ . = TRUE if(denied_type) var/number_of_denied = 0 - for(var/A in KA.get_modkits()) - var/obj/item/borg/upgrade/modkit/M = A + for(var/obj/item/borg/upgrade/modkit/M as anything in KA.get_modkits()) if(istype(M, denied_type)) number_of_denied++ if(number_of_denied >= maximum_of_type) diff --git a/code/modules/projectiles/projectile/energy.dm b/code/modules/projectiles/projectile/energy.dm index 91896ed393..bb05ff47cb 100644 --- a/code/modules/projectiles/projectile/energy.dm +++ b/code/modules/projectiles/projectile/energy.dm @@ -144,17 +144,21 @@ agony = 10 check_armour = "bio" armor_penetration = 25 // It's acid + hitsound_wall = 'sound/weapons/effects/alien_spit_wall.ogg' + hitsound = 'sound/weapons/effects/alien_spit_wall.ogg' combustion = FALSE /obj/item/projectile/energy/neurotoxin name = "neurotoxic spit" icon_state = "neurotoxin" - damage = 5 + damage = 0 damage_type = BIOACID agony = 60 //CHOMPedit lowered agony damage check_armour = "bio" armor_penetration = 25 // It's acid-based + hitsound_wall = 'sound/weapons/effects/alien_spit_wall.ogg' + hitsound = 'sound/weapons/effects/alien_spit_wall.ogg' combustion = FALSE diff --git a/code/modules/random_map/drop/droppod.dm b/code/modules/random_map/drop/droppod.dm index e63c31b1a5..31a575212c 100644 --- a/code/modules/random_map/drop/droppod.dm +++ b/code/modules/random_map/drop/droppod.dm @@ -158,7 +158,7 @@ var/mob/living/spawned_mob var/list/spawned_mobs = list() - var/spawn_path = tgui_input_list(usr, "Select a mob type.", "Drop Pod Selection", typesof(/mob/living)-/mob/living) + var/spawn_path = tgui_input_list(usr, "Select a mob type.", "Drop Pod Selection", subtypesof(/mob/living)) if(!spawn_path) return diff --git a/code/modules/random_map/drop/supply.dm b/code/modules/random_map/drop/supply.dm index 912542d654..d1cc04211d 100644 --- a/code/modules/random_map/drop/supply.dm +++ b/code/modules/random_map/drop/supply.dm @@ -55,14 +55,14 @@ choice = tgui_alert(usr, "Do you wish to add structures or machines?","Supply Drop",list("No","Yes")) if(choice == "Yes") while(1) - var/adding_loot_type = tgui_input_list(usr, "Select a new loot path. Cancel to finish.", "Loot Selection", typesof(/obj) - typesof(/obj/item)) + var/adding_loot_type = tgui_input_list(usr, "Select a new loot path. Cancel to finish.", "Loot Selection", subtypesof(/obj)) if(!adding_loot_type) break chosen_loot_types |= adding_loot_type choice = tgui_alert(usr, "Do you wish to add any non-weapon items?","Supply Drop",list("No","Yes")) if(choice == "Yes") while(1) - var/adding_loot_type = tgui_input_list(usr, "Select a new loot path. Cancel to finish.", "Loot Selection", typesof(/obj/item) - typesof(/obj/item/weapon)) + var/adding_loot_type = tgui_input_list(usr, "Select a new loot path. Cancel to finish.", "Loot Selection", subtypesof(/obj/item)) if(!adding_loot_type) break chosen_loot_types |= adding_loot_type diff --git a/code/modules/random_map/noise/desert.dm b/code/modules/random_map/noise/desert.dm index 0264d2a781..ccb768ce3a 100644 --- a/code/modules/random_map/noise/desert.dm +++ b/code/modules/random_map/noise/desert.dm @@ -24,14 +24,14 @@ switch(val) if(2 to 3) if(prob(60)) - var/grass_path = pick(typesof(/obj/structure/flora/grass)-/obj/structure/flora/grass) + var/grass_path = pick(subtypesof(/obj/structure/flora/grass)) new grass_path(T) if(prob(5)) var/mob_type = pick(list(/mob/living/simple_mob/animal/passive/lizard, /mob/living/simple_mob/animal/passive/mouse)) new mob_type(T) if(5 to 6) if(prob(20)) - var/grass_path = pick(typesof(/obj/structure/flora/grass)-/obj/structure/flora/grass) + var/grass_path = pick(subtypesof(/obj/structure/flora/grass)) new grass_path(T) if(7 to 9) if(prob(60)) diff --git a/code/modules/random_map/noise/ore.dm b/code/modules/random_map/noise/ore.dm index 4881154d60..112a01b493 100644 --- a/code/modules/random_map/noise/ore.dm +++ b/code/modules/random_map/noise/ore.dm @@ -64,13 +64,13 @@ T.resources["hydrogen"] = 0 T.resources["verdantium"] = 0 T.resources["lead"] = 0 - T.resources["copper"] = rand(RESOURCE_MID_MIN, RESOURCE_HIGH_MAX) - T.resources["tin"] = rand(RESOURCE_LOW_MIN, RESOURCE_MID_MAX) - T.resources["bauxite"] = rand(RESOURCE_LOW_MIN, RESOURCE_LOW_MAX) + //T.resources["copper"] = rand(RESOURCE_MID_MIN, RESOURCE_HIGH_MAX) + //T.resources["tin"] = rand(RESOURCE_LOW_MIN, RESOURCE_MID_MAX) + //T.resources["bauxite"] = rand(RESOURCE_LOW_MIN, RESOURCE_LOW_MAX) T.resources["rutile"] = 0 - T.resources["void opal"] = 0 - T.resources["quartz"] = 0 - T.resources["painite"] = 0 + //T.resources["void opal"] = 0 + //T.resources["quartz"] = 0 + //T.resources["painite"] = 0 else if(current_cell < deep_val) // Rare metals. T.resources["gold"] = rand(RESOURCE_MID_MIN, RESOURCE_MID_MAX) T.resources["silver"] = rand(RESOURCE_MID_MIN, RESOURCE_MID_MAX) @@ -83,13 +83,13 @@ T.resources["diamond"] = 0 T.resources["hematite"] = 0 T.resources["marble"] = 0 - T.resources["copper"] = 0 - T.resources["tin"] = rand(RESOURCE_MID_MIN, RESOURCE_MID_MAX) - T.resources["bauxite"] = 0 + //T.resources["copper"] = 0 + //T.resources["tin"] = rand(RESOURCE_MID_MIN, RESOURCE_MID_MAX) + //T.resources["bauxite"] = 0 T.resources["rutile"] = rand(RESOURCE_LOW_MIN, RESOURCE_MID_MAX) - T.resources["void opal"] = 0 - T.resources["quartz"] = 0 - T.resources["painite"] = 0 + //T.resources["void opal"] = 0 + //T.resources["quartz"] = 0 + //T.resources["painite"] = 0 else // Deep metals. T.resources["uranium"] = rand(RESOURCE_LOW_MIN, RESOURCE_LOW_MAX) T.resources["diamond"] = rand(RESOURCE_LOW_MIN, RESOURCE_LOW_MAX) @@ -102,13 +102,13 @@ T.resources["hematite"] = 0 T.resources["gold"] = 0 T.resources["silver"] = 0 - T.resources["copper"] = 0 - T.resources["tin"] = 0 - T.resources["bauxite"] = 0 + //T.resources["copper"] = 0 + //T.resources["tin"] = 0 + //T.resources["bauxite"] = 0 T.resources["rutile"] = rand(RESOURCE_MID_MIN, RESOURCE_HIGH_MAX) - T.resources["void opal"] = 0 - T.resources["quartz"] = 0 - T.resources["painite"] = 0 + //T.resources["void opal"] = 0 + //T.resources["quartz"] = 0 + //T.resources["painite"] = 0 return /datum/random_map/noise/ore/get_map_char(var/value) diff --git a/code/modules/random_map/random_map_verbs.dm b/code/modules/random_map/random_map_verbs.dm index c4d572d23f..ff93b73b09 100644 --- a/code/modules/random_map/random_map_verbs.dm +++ b/code/modules/random_map/random_map_verbs.dm @@ -36,7 +36,7 @@ if(!holder) return - var/map_datum = tgui_input_list(usr, "Choose a map to create.", "Map Choice", typesof(/datum/random_map)-/datum/random_map) + var/map_datum = tgui_input_list(usr, "Choose a map to create.", "Map Choice", subtypesof(/datum/random_map)) if(!map_datum) return diff --git a/code/modules/reagents/holder/distilling.dm b/code/modules/reagents/holder/distilling.dm index 1599f395d9..9fb4867901 100644 --- a/code/modules/reagents/holder/distilling.dm +++ b/code/modules/reagents/holder/distilling.dm @@ -8,19 +8,16 @@ var/list/effect_reactions = list() do reaction_occurred = FALSE - for(var/i in reagent_list) - var/datum/reagent/R = i + for(var/datum/reagent/R as anything in reagent_list) if(SSchemistry.distilled_reactions_by_reagent[R.id]) eligible_reactions |= SSchemistry.distilled_reactions_by_reagent[R.id] - for(var/i in eligible_reactions) - var/decl/chemical_reaction/C = i + for(var/decl/chemical_reaction/C as anything in eligible_reactions) if(C.can_happen(src) && C.process(src)) effect_reactions |= C reaction_occurred = TRUE eligible_reactions.len = 0 while(reaction_occurred) - for(var/i in effect_reactions) - var/decl/chemical_reaction/C = i + for(var/decl/chemical_reaction/C as anything in effect_reactions) C.post_reaction(src) update_total() \ No newline at end of file diff --git a/code/modules/reagents/holder/holder.dm b/code/modules/reagents/holder/holder.dm index 26ad557e98..75ad9defcb 100644 --- a/code/modules/reagents/holder/holder.dm +++ b/code/modules/reagents/holder/holder.dm @@ -85,20 +85,17 @@ var/list/effect_reactions = list() do reaction_occurred = FALSE - for(var/i in reagent_list) - var/datum/reagent/R = i + for(var/datum/reagent/R as anything in reagent_list) if(SSchemistry.instant_reactions_by_reagent[R.id]) eligible_reactions |= SSchemistry.instant_reactions_by_reagent[R.id] - for(var/i in eligible_reactions) - var/decl/chemical_reaction/C = i + for(var/decl/chemical_reaction/C as anything in eligible_reactions) if(C.can_happen(src) && C.process(src)) effect_reactions |= C reaction_occurred = TRUE eligible_reactions.len = 0 while(reaction_occurred) - for(var/i in effect_reactions) - var/decl/chemical_reaction/C = i + for(var/decl/chemical_reaction/C as anything in effect_reactions) C.post_reaction(src) update_total() @@ -145,8 +142,7 @@ return 0 /datum/reagents/proc/isolate_reagent(reagent) - for(var/A in reagent_list) - var/datum/reagent/R = A + for(var/datum/reagent/R as anything in reagent_list) if(R.id != reagent) del_reagent(R.id) update_total() @@ -484,19 +480,17 @@ objs += O if (objs.len) var/objportion = (amount * 0.2) / objs.len - for (var/o in objs) - var/obj/O = o + for(var/obj/O as anything in objs) trans_to(O, objportion, multiplier, copy) amount = min(amount, total_volume) if (mobs.len) var/mobportion = (amount * 0.5) / mobs.len - for (var/m in mobs) - var/mob/M = m + for(var/mob/M as anything in mobs) trans_to(M, mobportion, multiplier, copy) trans_to(T, total_volume, multiplier, copy) if (total_volume <= 0) qdel(src) - + /** * Calls [/datum/reagent/proc/on_update] on every reagent in this holder * diff --git a/code/modules/reagents/machinery/grinder.dm b/code/modules/reagents/machinery/grinder.dm index 014305a8f1..3b5ea9e4fd 100644 --- a/code/modules/reagents/machinery/grinder.dm +++ b/code/modules/reagents/machinery/grinder.dm @@ -56,8 +56,7 @@ . += "\The [src] contains:" if(beaker) . += "- \A [beaker]." - for(var/i in holdingitems) - var/obj/item/O = i + for(var/obj/item/O as anything in holdingitems) . += "- \A [O.name]." if(!(stat & (NOPOWER|BROKEN))) diff --git a/code/modules/reagents/reactions/instant/instant_vr.dm b/code/modules/reagents/reactions/instant/instant_vr.dm index a014c0d45f..4eef9c3492 100644 --- a/code/modules/reagents/reactions/instant/instant_vr.dm +++ b/code/modules/reagents/reactions/instant/instant_vr.dm @@ -208,7 +208,8 @@ result_amount = 1 /decl/chemical_reaction/instant/slime_food/on_reaction(var/datum/reagents/holder) - var/list/borks = typesof(/obj/item/weapon/reagent_containers/food/snacks) - /obj/item/weapon/reagent_containers/food/snacks // BORK BORK BORK + var/list/borks = subtypesof(/obj/item/weapon/reagent_containers/food/snacks) + playsound(holder.my_atom, 'sound/effects/phasein.ogg', 100, 1) diff --git a/code/modules/reagents/reagents/vore_vr.dm b/code/modules/reagents/reagents/vore_vr.dm index 5bb366fbe4..0fb3a74b61 100644 --- a/code/modules/reagents/reagents/vore_vr.dm +++ b/code/modules/reagents/reagents/vore_vr.dm @@ -76,8 +76,7 @@ M.make_dizzy(1) M.adjustHalLoss(2) - for(var/belly in M.vore_organs) - var/obj/belly/B = belly + for(var/obj/belly/B as anything in M.vore_organs) for(var/atom/movable/A in B) if(isliving(A)) var/mob/living/P = A @@ -102,8 +101,7 @@ M.confused = max(M.confused, 20) M.hallucination += 15 - for(var/belly in M.vore_organs) - var/obj/belly/B = belly + for(var/obj/belly/B as anything in M.vore_organs) if(B.digest_mode == DM_ABSORB) //Turn off absorbing on bellies B.digest_mode = DM_HOLD diff --git a/code/modules/research/research.dm b/code/modules/research/research.dm index e8ad090e10..81ee392a8b 100644 --- a/code/modules/research/research.dm +++ b/code/modules/research/research.dm @@ -52,12 +52,12 @@ GLOBAL_LIST_INIT(design_datums, list()) /datum/research/New() //Insert techs into possible_tech here. Known_tech automatically updated. if(!LAZYLEN(GLOB.design_datums)) - for(var/T in typesof(/datum/design) - /datum/design) + for(var/T in subtypesof(/datum/design)) GLOB.design_datums += new T possible_designs = GLOB.design_datums if(!LAZYLEN(known_tech)) - for(var/T in typesof(/datum/tech) - /datum/tech) + for(var/T in subtypesof(/datum/tech)) known_tech += new T RefreshResearch() @@ -120,8 +120,7 @@ GLOBAL_LIST_INIT(design_datums, list()) // A simple helper proc to find the name of a tech with a given ID. /proc/CallTechName(var/ID) - for(var/T in subtypesof(/datum/tech)) - var/datum/tech/check_tech = T + for(var/datum/tech/check_tech as anything in subtypesof(/datum/tech)) if(initial(check_tech.id) == ID) return initial(check_tech.name) diff --git a/code/modules/resleeving/infocore_records.dm b/code/modules/resleeving/infocore_records.dm index 5f3cb027c5..0f16a2b3b7 100644 --- a/code/modules/resleeving/infocore_records.dm +++ b/code/modules/resleeving/infocore_records.dm @@ -182,8 +182,7 @@ organ_data[org] = I.robotic //Genetic modifiers - for(var/modifier in M.modifiers) - var/datum/modifier/mod = modifier + for(var/datum/modifier/mod as anything in M.modifiers) if(mod.flags & MODIFIER_GENETIC) genetic_modifiers.Add(mod.type) diff --git a/code/modules/resleeving/infomorph.dm b/code/modules/resleeving/infomorph.dm index 7ba0858334..584ea22aac 100644 --- a/code/modules/resleeving/infomorph.dm +++ b/code/modules/resleeving/infomorph.dm @@ -447,7 +447,7 @@ var/global/list/infomorph_software_by_key = list() var/global/list/default_infomorph_software = list() /hook/startup/proc/populate_infomorph_software_list() var/r = 1 // I would use ., but it'd sacrifice runtime detection - for(var/type in typesof(/datum/infomorph_software) - /datum/infomorph_software) + for(var/type in subtypesof(/datum/infomorph_software)) var/datum/infomorph_software/P = new type() if(infomorph_software_by_key[P.id]) var/datum/infomorph_software/O = infomorph_software_by_key[P.id] diff --git a/code/modules/rogueminer_vr/zonemaster.dm b/code/modules/rogueminer_vr/zonemaster.dm index 2b1f3728f5..15d1887803 100644 --- a/code/modules/rogueminer_vr/zonemaster.dm +++ b/code/modules/rogueminer_vr/zonemaster.dm @@ -191,8 +191,7 @@ return var/farEnough = 1 - for(var/A in SSxenoarch.digsite_spawning_turfs) - var/turf/T = A + for(var/turf/T as anything in SSxenoarch.digsite_spawning_turfs) if(T in range(5, M)) farEnough = 0 break diff --git a/code/modules/security levels/security levels.dm b/code/modules/security levels/security levels.dm index aed060d18e..3ce724f87e 100644 --- a/code/modules/security levels/security levels.dm +++ b/code/modules/security levels/security levels.dm @@ -76,8 +76,7 @@ if(FA.z in using_map.contact_levels) FA.on_alert_changed(newlevel) //VOREStation Add - for(var/hp in GLOB.holoposters) - var/obj/machinery/holoposter/HP = hp + for(var/obj/machinery/holoposter/HP as anything in GLOB.holoposters) HP.update_icon() //VOREStation Add End diff --git a/code/modules/shuttles/crashes.dm b/code/modules/shuttles/crashes.dm index 6f6c66e177..a71ab5e07e 100644 --- a/code/modules/shuttles/crashes.dm +++ b/code/modules/shuttles/crashes.dm @@ -52,8 +52,7 @@ return // Lucky! // Hide people - for(var/living in victims) - var/mob/living/L = living + for(var/mob/living/L as anything in victims) victims[L] = get_turf(L) L.Sleeping(rand(10,20)) L.Life() @@ -70,8 +69,7 @@ command_announcement.Announce("[crash_message]", "Shuttle Alert") // Put people back - for(var/living in victims) - var/mob/living/L = living + for(var/mob/living/L as anything in victims) L.loc = victims[L] L.adjustBruteLoss(5) L.adjustBruteLoss(10) diff --git a/code/modules/shuttles/shuttle_console.dm b/code/modules/shuttles/shuttle_console.dm index 9deff67d7d..5f4dda17be 100644 --- a/code/modules/shuttles/shuttle_console.dm +++ b/code/modules/shuttles/shuttle_console.dm @@ -151,8 +151,7 @@ GLOBAL_LIST_BOILERPLATE(papers_dockingcode, /obj/item/weapon/paper/dockingcodes) /hook/roundstart/proc/populate_dockingcodes() - for(var/paper in GLOB.papers_dockingcode) - var/obj/item/weapon/paper/dockingcodes/dcp = paper + for(var/obj/item/weapon/paper/dockingcodes/dcp as anything in GLOB.papers_dockingcode) dcp.populate_info() return TRUE diff --git a/code/modules/shuttles/shuttles_web.dm b/code/modules/shuttles/shuttles_web.dm index f871f49bdd..935b47ca72 100644 --- a/code/modules/shuttles/shuttles_web.dm +++ b/code/modules/shuttles/shuttles_web.dm @@ -112,8 +112,7 @@ web_master.process_autopath() /datum/shuttle/autodock/web_shuttle/proc/update_helmets() - for(var/helm in helmets) - var/obj/item/clothing/head/pilot/H = helm + for(var/obj/item/clothing/head/pilot/H as anything in helmets) if(QDELETED(H)) helmets -= H continue diff --git a/code/modules/shuttles/web_datums.dm b/code/modules/shuttles/web_datums.dm index 6e34d3750b..d061ebe397 100644 --- a/code/modules/shuttles/web_datums.dm +++ b/code/modules/shuttles/web_datums.dm @@ -193,7 +193,7 @@ /datum/shuttle_web_master/proc/build_destinations() // First, instantiate all the destination subtypes relevant to this datum. - var/list/destination_types = typesof(destination_class) - destination_class + var/list/destination_types = subtypesof(destination_class) for(var/new_type in destination_types) var/datum/shuttle_destination/D = new_type if(initial(D.skip_me)) diff --git a/code/modules/surgery/organs_internal.dm b/code/modules/surgery/organs_internal.dm index 063a313b5b..e5f49cc922 100644 --- a/code/modules/surgery/organs_internal.dm +++ b/code/modules/surgery/organs_internal.dm @@ -14,7 +14,7 @@ return 0 return affected && affected.open == (affected.encased ? 3 : 2) -//CHOMPedit. Removed unused embryo surgery +//Removed unused Embryo Surgery, derelict and broken. ////////////////////////////////////////////////////////////////// // CHEST INTERNAL ORGAN SURGERY // diff --git a/code/modules/tgs/v3210/commands.dm b/code/modules/tgs/v3210/commands.dm index 4ccfc1a8a6..25b171bb52 100644 --- a/code/modules/tgs/v3210/commands.dm +++ b/code/modules/tgs/v3210/commands.dm @@ -8,7 +8,7 @@ var/list/command_name_types = list() var/list/warned_command_names = warnings_only ? list() : null var/warned_about_the_dangers_of_robutussin = !warnings_only - for(var/I in typesof(/datum/tgs_chat_command) - /datum/tgs_chat_command) + for(var/I in subtypesof(/datum/tgs_chat_command)) if(!warned_about_the_dangers_of_robutussin) TGS_ERROR_LOG("Custom chat commands in [ApiVersion()] lacks the /datum/tgs_chat_user/sender.channel field!") warned_about_the_dangers_of_robutussin = TRUE @@ -32,8 +32,7 @@ /datum/tgs_api/v3210/proc/HandleServiceCustomCommand(command, sender, params) if(!cached_custom_tgs_chat_commands) cached_custom_tgs_chat_commands = list() - for(var/I in typesof(/datum/tgs_chat_command) - /datum/tgs_chat_command) - var/datum/tgs_chat_command/stc = I + for(var/datum/tgs_chat_command/stc as anything in subtypesof(/datum/tgs_chat_command)) cached_custom_tgs_chat_commands[lowertext(initial(stc.name))] = stc var/command_type = cached_custom_tgs_chat_commands[command] diff --git a/code/modules/tgs/v4/api.dm b/code/modules/tgs/v4/api.dm index 0e37a7aa24..5e338aaa56 100644 --- a/code/modules/tgs/v4/api.dm +++ b/code/modules/tgs/v4/api.dm @@ -260,8 +260,7 @@ var/list/ids if(length(channels)) ids = list() - for(var/I in channels) - var/datum/tgs_chat_channel/channel = I + for(var/datum/tgs_chat_channel/channel as anything in channels) ids += channel.id message = list("message" = message, "channelIds" = ids) if(intercepted_message_queue) @@ -271,8 +270,7 @@ /datum/tgs_api/v4/ChatTargetedBroadcast(message, admin_only) var/list/channels = list() - for(var/I in ChatChannelInfo()) - var/datum/tgs_chat_channel/channel = I + for(var/datum/tgs_chat_channel/channel as anything in ChatChannelInfo()) if (!channel.is_private_channel && ((channel.is_admin_channel && admin_only) || (!channel.is_admin_channel && !admin_only))) channels += channel.id message = list("message" = message, "channelIds" = channels) diff --git a/code/modules/tgs/v4/commands.dm b/code/modules/tgs/v4/commands.dm index 4ca1500167..770b4864b1 100644 --- a/code/modules/tgs/v4/commands.dm +++ b/code/modules/tgs/v4/commands.dm @@ -1,7 +1,7 @@ /datum/tgs_api/v4/proc/ListCustomCommands() var/results = list() custom_commands = list() - for(var/I in typesof(/datum/tgs_chat_command) - /datum/tgs_chat_command) + for(var/I in subtypesof(/datum/tgs_chat_command)) var/datum/tgs_chat_command/stc = new I var/command_name = stc.name if(!command_name || findtext(command_name, " ") || findtext(command_name, "'") || findtext(command_name, "\"")) diff --git a/code/modules/tgs/v5/api.dm b/code/modules/tgs/v5/api.dm index 704ff873c0..0d5adf2fe5 100644 --- a/code/modules/tgs/v5/api.dm +++ b/code/modules/tgs/v5/api.dm @@ -302,8 +302,7 @@ channels = ChatChannelInfo() var/list/ids = list() - for(var/I in channels) - var/datum/tgs_chat_channel/channel = I + for(var/datum/tgs_chat_channel/channel as anything in channels) ids += channel.id message = list(DMAPI5_CHAT_MESSAGE_TEXT = message, DMAPI5_CHAT_MESSAGE_CHANNEL_IDS = ids) @@ -314,8 +313,7 @@ /datum/tgs_api/v5/ChatTargetedBroadcast(message, admin_only) var/list/channels = list() - for(var/I in ChatChannelInfo()) - var/datum/tgs_chat_channel/channel = I + for(var/datum/tgs_chat_channel/channel as anything in ChatChannelInfo()) if (!channel.is_private_channel && ((channel.is_admin_channel && admin_only) || (!channel.is_admin_channel && !admin_only))) channels += channel.id message = list(DMAPI5_CHAT_MESSAGE_TEXT = message, DMAPI5_CHAT_MESSAGE_CHANNEL_IDS = channels) diff --git a/code/modules/tgs/v5/commands.dm b/code/modules/tgs/v5/commands.dm index 6d31dd3422..e5b2562efe 100644 --- a/code/modules/tgs/v5/commands.dm +++ b/code/modules/tgs/v5/commands.dm @@ -1,7 +1,7 @@ /datum/tgs_api/v5/proc/ListCustomCommands() var/results = list() custom_commands = list() - for(var/I in typesof(/datum/tgs_chat_command) - /datum/tgs_chat_command) + for(var/I in subtypesof(/datum/tgs_chat_command)) var/datum/tgs_chat_command/stc = new I var/command_name = stc.name if(!command_name || findtext(command_name, " ") || findtext(command_name, "'") || findtext(command_name, "\"")) diff --git a/code/modules/tgui/modules/admin_shuttle_controller.dm b/code/modules/tgui/modules/admin_shuttle_controller.dm index a40dec8fca..d03e78b32d 100644 --- a/code/modules/tgui/modules/admin_shuttle_controller.dm +++ b/code/modules/tgui/modules/admin_shuttle_controller.dm @@ -19,8 +19,7 @@ data["shuttles"] = shuttles var/list/overmap_ships = list() - for(var/ship in SSshuttles.ships) - var/obj/effect/overmap/visitable/ship/S = ship + for(var/obj/effect/overmap/visitable/ship/S as anything in SSshuttles.ships) overmap_ships.Add(list(list( "name" = S.name, "ref" = REF(S), diff --git a/code/modules/tgui/modules/appearance_changer.dm b/code/modules/tgui/modules/appearance_changer.dm index 3b84e95d53..fe7bb95440 100644 --- a/code/modules/tgui/modules/appearance_changer.dm +++ b/code/modules/tgui/modules/appearance_changer.dm @@ -45,8 +45,7 @@ cam_plane_masters = get_tgui_plane_masters() - for(var/plane in cam_plane_masters) - var/obj/screen/instance = plane + for(var/obj/screen/instance as anything in cam_plane_masters) instance.assigned_map = map_name instance.del_on_map_removal = FALSE instance.screen_loc = "[map_name]:CENTER" diff --git a/code/modules/tgui/modules/camera.dm b/code/modules/tgui/modules/camera.dm index abfef14be1..fa67030d55 100644 --- a/code/modules/tgui/modules/camera.dm +++ b/code/modules/tgui/modules/camera.dm @@ -37,8 +37,7 @@ cam_plane_masters = get_tgui_plane_masters() - for(var/plane in cam_plane_masters) - var/obj/screen/instance = plane + for(var/obj/screen/instance as anything in cam_plane_masters) instance.assigned_map = map_name instance.del_on_map_removal = FALSE instance.screen_loc = "[map_name]:CENTER" diff --git a/code/modules/tgui/modules/ntos-only/cardmod.dm b/code/modules/tgui/modules/ntos-only/cardmod.dm index fc77417996..8a8ace688f 100644 --- a/code/modules/tgui/modules/ntos-only/cardmod.dm +++ b/code/modules/tgui/modules/ntos-only/cardmod.dm @@ -49,8 +49,7 @@ data["target_name"] = id_card ? id_card.name : "-----" var/list/departments = list() - for(var/D in SSjob.get_all_department_datums()) - var/datum/department/dept = D + for(var/datum/department/dept as anything in SSjob.get_all_department_datums()) if(!dept.assignable) // No AI ID cards for you. continue if(dept.centcom_only && !is_centcom) diff --git a/code/modules/tgui/modules/ntos-only/uav.dm b/code/modules/tgui/modules/ntos-only/uav.dm index b9288457e5..54dcda1675 100644 --- a/code/modules/tgui/modules/ntos-only/uav.dm +++ b/code/modules/tgui/modules/ntos-only/uav.dm @@ -30,8 +30,7 @@ var/list/paired_map = list() var/obj/item/modular_computer/mc_host = tgui_host() if(istype(mc_host)) - for(var/puav in mc_host.paired_uavs) - var/weakref/wr = puav + for(var/weakref/wr as anything in mc_host.paired_uavs) var/obj/item/device/uav/U = wr.resolve() paired_map.Add(list(list("name" = "[U ? U.nickname : "!!Missing!!"]", "uavref" = "\ref[U]"))) @@ -148,8 +147,7 @@ var/list/zlevels_in_long_range = using_map.get_map_levels(their_z, TRUE, om_range = DEFAULT_OVERMAP_RANGE) - zlevels_in_range var/their_signal = 0 // Measure z-distance between the AM passed in and the nearest relay - for(var/relay in ntnet_global.relays) - var/obj/machinery/ntnet_relay/R = relay + for(var/obj/machinery/ntnet_relay/R as anything in ntnet_global.relays) if(!R.operable()) continue if(R.z == their_z) diff --git a/code/modules/virus2/admin.dm b/code/modules/virus2/admin.dm index b0e92139b4..dd9ae7ead7 100644 --- a/code/modules/virus2/admin.dm +++ b/code/modules/virus2/admin.dm @@ -57,10 +57,9 @@ var/list/L = list() - for(var/e in (typesof(/datum/disease2/effect) - /datum/disease2/effect)) - var/datum/disease2/effect/f = e + for(var/datum/disease2/effect/f as anything in subtypesof(/datum/disease2/effect)) if(initial(f.stage) <= stage) - L[initial(f.name)] = e + L[initial(f.name)] = f var/datum/disease2/effect/Eff = s[stage] diff --git a/code/modules/virus2/effect.dm b/code/modules/virus2/effect.dm index dd19e5e3f4..5e3e955574 100644 --- a/code/modules/virus2/effect.dm +++ b/code/modules/virus2/effect.dm @@ -15,9 +15,8 @@ /datum/disease2/effectholder/proc/getrandomeffect(var/badness = 1, exclude_types=list()) var/list/datum/disease2/effect/list = list() - for(var/e in (typesof(/datum/disease2/effect) - /datum/disease2/effect)) - var/datum/disease2/effect/f = e - if(e in exclude_types) + for(var/datum/disease2/effect/f as anything in subtypesof(/datum/disease2/effect)) + if(f in exclude_types) continue if(initial(f.badness) > badness) //we don't want such strong effects continue diff --git a/code/modules/vore/eating/belly_obj_vr.dm b/code/modules/vore/eating/belly_obj_vr.dm index 92724d0f86..16d1280b21 100644 --- a/code/modules/vore/eating/belly_obj_vr.dm +++ b/code/modules/vore/eating/belly_obj_vr.dm @@ -326,8 +326,7 @@ var/count = 0 //Iterate over contents and move them all - for(var/thing in contents) - var/atom/movable/AM = thing + for(var/atom/movable/AM as anything in contents) if(isliving(AM)) var/mob/living/L = AM if(L.absorbed && !include_absorbed) @@ -639,8 +638,7 @@ //This in particular will recurse oddly because if there is absorbed prey of prey of prey... //it will just move them up one belly. This should never happen though since... when they were //absobred, they should have been absorbed as well! - for(var/belly in M.vore_organs) - var/obj/belly/B = belly + for(var/obj/belly/B as anything in M.vore_organs) for(var/mob/living/Mm in B) if(Mm.absorbed) absorb_living(Mm) @@ -777,8 +775,7 @@ else if(prob(transferchance) && transferlocation) //Next, let's have it see if they end up getting into an even bigger mess then when they started. var/obj/belly/dest_belly - for(var/belly in owner.vore_organs) - var/obj/belly/B = belly + for(var/obj/belly/B as anything in owner.vore_organs) if(B.name == transferlocation) dest_belly = B break diff --git a/code/modules/vore/eating/bellymodes_vr.dm b/code/modules/vore/eating/bellymodes_vr.dm index aec57913ee..4687fb30cc 100644 --- a/code/modules/vore/eating/bellymodes_vr.dm +++ b/code/modules/vore/eating/bellymodes_vr.dm @@ -85,11 +85,11 @@ ///////////////////// Time to actually process mobs ///////////////////// - for(var/target in touchable_mobs) - var/mob/living/L = target + for(var/mob/living/L as anything in touchable_mobs) if(!istype(L)) + stack_trace("Touchable mobs had a nonmob: [L]") continue - var/list/returns = DM.process_mob(src, target) + var/list/returns = DM.process_mob(src, L) if(istype(returns) && returns["to_update"]) to_update = TRUE if(istype(returns) && returns["soundToPlay"] && !play_sound) diff --git a/code/modules/vore/eating/living_vr.dm b/code/modules/vore/eating/living_vr.dm index d69ccb25b9..8654f648e7 100644 --- a/code/modules/vore/eating/living_vr.dm +++ b/code/modules/vore/eating/living_vr.dm @@ -251,8 +251,7 @@ var/list/serialized = list() - for(var/belly in src.vore_organs) - var/obj/belly/B = belly + for(var/obj/belly/B as anything in src.vore_organs) serialized += list(B.serialize()) //Can't add a list as an object to another list in Byond. Thanks. P.belly_prefs = serialized @@ -305,8 +304,7 @@ // Release everything in every vore organ // /mob/living/proc/release_vore_contents(var/include_absorbed = TRUE, var/silent = FALSE) - for(var/belly in vore_organs) - var/obj/belly/B = belly + for(var/obj/belly/B as anything in vore_organs) B.release_all_contents(include_absorbed, silent) // @@ -317,10 +315,12 @@ return list() var/list/message_list = list() - for (var/belly in vore_organs) - var/obj/belly/B = belly - message_list += B.get_examine_msg() - message_list += B.get_examine_msg_absorbed() + for(var/obj/belly/B as anything in vore_organs) + var/bellymessage = B.get_examine_msg() + if(bellymessage) message_list += bellymessage + + bellymessage = B.get_examine_msg_absorbed() + if(bellymessage) message_list += bellymessage return message_list diff --git a/code/modules/vore/eating/vorepanel_vr.dm b/code/modules/vore/eating/vorepanel_vr.dm index c506ff98af..82133bf126 100644 --- a/code/modules/vore/eating/vorepanel_vr.dm +++ b/code/modules/vore/eating/vorepanel_vr.dm @@ -139,8 +139,7 @@ data["inside"] = inside var/list/our_bellies = list() - for(var/belly in host.vore_organs) - var/obj/belly/B = belly + for(var/obj/belly/B as anything in host.vore_organs) our_bellies.Add(list(list( "selected" = (B == host.vore_selected), "name" = B.name, @@ -320,8 +319,7 @@ failure_msg = "Entered belly name length invalid (must be longer than [BELLIES_NAME_MIN], no more than than [BELLIES_NAME_MAX])." // else if(whatever) //Next test here. else - for(var/belly in host.vore_organs) - var/obj/belly/B = belly + for(var/obj/belly/B as anything in host.vore_organs) if(lowertext(new_name) == lowertext(B.name)) failure_msg = "No duplicate belly names, please." break @@ -694,8 +692,7 @@ failure_msg = "Entered belly name length invalid (must be longer than [BELLIES_NAME_MIN], no more than than [BELLIES_NAME_MAX])." // else if(whatever) //Next test here. else - for(var/belly in host.vore_organs) - var/obj/belly/B = belly + for(var/obj/belly/B as anything in host.vore_organs) if(lowertext(new_name) == lowertext(B.name)) failure_msg = "No duplicate belly names, please." break @@ -1034,8 +1031,7 @@ var/failure_msg = "" var/dest_for //Check to see if it's the destination of another vore organ. - for(var/belly in host.vore_organs) - var/obj/belly/B = belly + for(var/obj/belly/B as anything in host.vore_organs) if(B.transferlocation == host.vore_selected) dest_for = B.name failure_msg += "This is the destiantion for at least '[dest_for]' belly transfers. Remove it as the destination from any bellies before deleting it. " diff --git a/code/modules/vore/resizing/resize_vr.dm b/code/modules/vore/resizing/resize_vr.dm index 3d7086f9c3..ec2aead7de 100644 --- a/code/modules/vore/resizing/resize_vr.dm +++ b/code/modules/vore/resizing/resize_vr.dm @@ -78,7 +78,7 @@ var/datum/component/resize_guard/guard = GetComponent(/datum/component/resize_guard) if(guard) qdel(guard) - + if(size_multiplier == new_size) return 1 @@ -143,7 +143,7 @@ var/nagmessage = "Adjust your mass to be a size between 25 to 200% (or 1% to 600% in dormitories). (DO NOT ABUSE)" var/new_size = input(nagmessage, "Pick a Size") as num|null if(size_range_check(new_size)) - resize(new_size/100) + resize(new_size/100, uncapped = has_large_resize_bounds(), ignore_prefs = TRUE) // I'm not entirely convinced that `src ? ADMIN_JMP(src) : "null"` here does anything // but just in case it does, I'm leaving the null-src checking message_admins("[key_name(src)] used the resize command in-game to be [new_size]% size. [src ? ADMIN_JMP(src) : "null"]") diff --git a/code/modules/xenoarcheaology/artifacts/artifact.dm b/code/modules/xenoarcheaology/artifacts/artifact.dm index bbf54ed469..e723561a73 100644 --- a/code/modules/xenoarcheaology/artifacts/artifact.dm +++ b/code/modules/xenoarcheaology/artifacts/artifact.dm @@ -33,11 +33,11 @@ secondary_effect.ToggleActivate(0) else - var/effecttype = pick(typesof(/datum/artifact_effect) - /datum/artifact_effect) + var/effecttype = pick(subtypesof(/datum/artifact_effect)) my_effect = new effecttype(src) if(prob(75)) - effecttype = pick(typesof(/datum/artifact_effect) - /datum/artifact_effect) + effecttype = pick(subtypesof(/datum/artifact_effect)) secondary_effect = new effecttype(src) if(prob(75)) secondary_effect.ToggleActivate(0) @@ -85,11 +85,11 @@ secondary_effect.trigger = predefined_trig_secondary /obj/machinery/artifact/proc/choose_effect() - var/effect_type = tgui_input_list(usr, "What type do you want?", "Effect Type", typesof(/datum/artifact_effect) - /datum/artifact_effect) + var/effect_type = tgui_input_list(usr, "What type do you want?", "Effect Type", subtypesof(/datum/artifact_effect)) if(effect_type) my_effect = new effect_type(src) if(tgui_alert(usr, "Do you want a secondary effect?", "Second Effect", list("No", "Yes")) == "Yes") - var/second_effect_type = tgui_input_list(usr, "What type do you want as well?", "Second Effect Type", typesof(/datum/artifact_effect) - list(/datum/artifact_effect, effect_type)) + var/second_effect_type = tgui_input_list(usr, "What type do you want as well?", "Second Effect Type", subtypesof(/datum/artifact_effect) - effect_type) secondary_effect = new second_effect_type(src) else secondary_effect = null diff --git a/code/modules/xenoarcheaology/tools/tools.dm b/code/modules/xenoarcheaology/tools/tools.dm index f16eae5458..14bda53ca2 100644 --- a/code/modules/xenoarcheaology/tools/tools.dm +++ b/code/modules/xenoarcheaology/tools/tools.dm @@ -58,8 +58,7 @@ var/turf/cur_turf = get_turf(src) if(SSxenoarch) //Sanity check due to runtimes ~Z - for(var/A in SSxenoarch.artifact_spawning_turfs) - var/turf/simulated/mineral/T = A + for(var/turf/simulated/mineral/T as anything in SSxenoarch.artifact_spawning_turfs) if(T.density && T.artifact_find) if(T.z == cur_turf.z) var/cur_dist = get_dist(cur_turf, T) * 2 @@ -69,8 +68,7 @@ else SSxenoarch.artifact_spawning_turfs.Remove(T) - for(var/A in SSxenoarch.digsite_spawning_turfs) - var/turf/simulated/mineral/T = A + for(var/turf/simulated/mineral/T as anything in SSxenoarch.digsite_spawning_turfs) if(T.density && T.finds && T.finds.len) if(T.z == cur_turf.z) var/cur_dist = get_dist(cur_turf, T) * 2 diff --git a/code/modules/xenobio2/mob/slime/slime.dm b/code/modules/xenobio2/mob/slime/slime.dm index 3d52c053d8..a3fca442d5 100644 --- a/code/modules/xenobio2/mob/slime/slime.dm +++ b/code/modules/xenobio2/mob/slime/slime.dm @@ -82,7 +82,7 @@ Slime definitions, Life and New live here. /mob/living/simple_mob/xeno/slime/New() ..() - for(var/datum/language/L in (typesof(/datum/language) - /datum/language)) + for(var/datum/language/L in subtypesof(/datum/language)) languages += L speak += "[station_name()]?" traitdat.source = "Slime" diff --git a/code/modules/xgm/xgm_gas_data.dm b/code/modules/xgm/xgm_gas_data.dm index 4ee3e1c501..42c508c4f6 100644 --- a/code/modules/xgm/xgm_gas_data.dm +++ b/code/modules/xgm/xgm_gas_data.dm @@ -29,7 +29,7 @@ /hook/startup/proc/generateGasData() gas_data = new - for(var/p in (typesof(/decl/xgm_gas) - /decl/xgm_gas)) + for(var/p in subtypesof(/decl/xgm_gas)) var/decl/xgm_gas/gas = new p //avoid initial() because of potential New() actions if(gas.id in gas_data.gases) diff --git a/code/unit_tests/integrated_circuits/prefabs.dm b/code/unit_tests/integrated_circuits/prefabs.dm index 04b3136640..1436e7d097 100644 --- a/code/unit_tests/integrated_circuits/prefabs.dm +++ b/code/unit_tests/integrated_circuits/prefabs.dm @@ -10,8 +10,7 @@ var/available_size = initial(assembly.max_components) var/available_complexity = initial(assembly.max_complexity) - for(var/ic in prefab.integrated_circuits) - var/datum/ic_assembly_integrated_circuits/iaic = ic + for(var/datum/ic_assembly_integrated_circuits/iaic as anything in prefab.integrated_circuits) var/obj/item/integrated_circuit/circuit = iaic.circuit_type available_size -= initial(circuit.size) available_complexity -= initial(circuit.complexity) diff --git a/code/unit_tests/loadout_tests.dm b/code/unit_tests/loadout_tests.dm index aba7184229..f6bfd19d5a 100644 --- a/code/unit_tests/loadout_tests.dm +++ b/code/unit_tests/loadout_tests.dm @@ -3,8 +3,7 @@ /datum/unit_test/loadout_test_shall_have_name_cost_path/start_test() var/failed = 0 - for(var/geartype in typesof(/datum/gear) - /datum/gear) - var/datum/gear/G = geartype + for(var/datum/gear/G as anything in subtypesof(/datum/gear)) if(!initial(G.display_name)) log_unit_test("[G]: Loadout - Missing display name.") diff --git a/code/unit_tests/research_tests.dm b/code/unit_tests/research_tests.dm index 9d0174cabe..09de5aaca6 100644 --- a/code/unit_tests/research_tests.dm +++ b/code/unit_tests/research_tests.dm @@ -47,7 +47,7 @@ /datum/unit_test/research_designs_have_valid_materials/start_test() var/number_of_issues = 0 - for(var/design_type in typesof(/datum/design) - /datum/design) + for(var/design_type in subtypesof(/datum/design)) var/datum/design/design = design_type if(initial(design.id) == "id") continue diff --git a/icons/mob/pai_vr.dmi b/icons/mob/pai_vr.dmi index 45ee85a066..0b8b985ff7 100644 Binary files a/icons/mob/pai_vr.dmi and b/icons/mob/pai_vr.dmi differ diff --git a/maps/expedition_vr/aerostat/_aerostat.dm b/maps/expedition_vr/aerostat/_aerostat.dm index 09b5eb3632..04d3b4ad82 100644 --- a/maps/expedition_vr/aerostat/_aerostat.dm +++ b/maps/expedition_vr/aerostat/_aerostat.dm @@ -133,7 +133,7 @@ VIRGO2_TURF_CREATE(/turf/simulated/mineral) if(mineral) return - var/mineral_name = pickweight(list("marble" = 5, "uranium" = 5, "platinum" = 5, "hematite" = 5, "carbon" = 5, "diamond" = 5, "gold" = 5, "silver" = 5, "lead" = 5, "verdantium" = 5, "rutile" = 10, "copper" = 5, "tin" = 5, "bauxite" = 5)) + var/mineral_name = pickweight(list("marble" = 5, "uranium" = 5, "platinum" = 5, "hematite" = 5, "carbon" = 5, "diamond" = 5, "gold" = 5, "silver" = 5, "lead" = 5, "verdantium" = 5, "rutile" = 20)) if(mineral_name && (mineral_name in GLOB.ore_data)) mineral = GLOB.ore_data[mineral_name] @@ -211,4 +211,3 @@ VIRGO2_TURF_CREATE(/turf/simulated/floor/hull) name = "V4 Outpost - Power Room" /area/tether_away/aerostat/surface/outpost/guardpost name = "V4 Outpost - Guard Post" - \ No newline at end of file diff --git a/maps/expedition_vr/aerostat/surface.dmm b/maps/expedition_vr/aerostat/surface.dmm index 6b519879a9..b60deeb4de 100644 --- a/maps/expedition_vr/aerostat/surface.dmm +++ b/maps/expedition_vr/aerostat/surface.dmm @@ -421,6 +421,12 @@ /obj/machinery/atmospherics/pipe/simple/hidden/scrubbers, /turf/simulated/floor/tiled/eris/dark, /area/tether_away/aerostat/surface/outpost/cafe) +"nx" = ( +/obj/structure/sign/painting/away_areas{ + pixel_x = -32 + }, +/turf/simulated/floor/tiled/eris/bcircuit, +/area/tether_away/aerostat/surface/outpost/hallway) "nI" = ( /obj/structure/cable/cyan{ icon_state = "1-2" @@ -550,6 +556,13 @@ }, /turf/simulated/floor/plating/eris/under, /area/tether_away/aerostat/surface/outpost/powerroom) +"ru" = ( +/obj/structure/table/woodentable, +/obj/structure/sign/painting/away_areas{ + pixel_x = 32 + }, +/turf/simulated/floor/tiled/eris/dark, +/area/tether_away/aerostat/surface/outpost/cafe) "rA" = ( /obj/machinery/atmospherics/pipe/simple/hidden/supply{ dir = 6 @@ -1116,6 +1129,13 @@ /obj/structure/medical_stand/anesthetic, /turf/simulated/floor/tiled/eris/bcircuit, /area/tether_away/aerostat/surface/outpost/backroom) +"GH" = ( +/obj/structure/table/woodentable, +/obj/structure/sign/painting/away_areas{ + pixel_x = 32 + }, +/turf/simulated/floor/wood, +/area/tether_away/aerostat/surface/outpost/barracks) "Ha" = ( /obj/structure/cable/cyan{ icon_state = "1-2" @@ -1402,6 +1422,8 @@ "ON" = ( /obj/structure/table/rack/shelf/steel, /obj/item/weapon/storage/box/glasses, +/obj/item/paint_brush, +/obj/item/paint_palette, /turf/simulated/floor/tiled/eris/dark/monofloor, /area/tether_away/aerostat/surface/outpost/cafe) "OT" = ( @@ -1550,6 +1572,8 @@ "Ur" = ( /obj/structure/table/rack/shelf/steel, /obj/item/weapon/storage/box/glasses/pint, +/obj/item/canvas/twentyfour_twentyfour, +/obj/item/canvas/nineteen_nineteen, /turf/simulated/floor/tiled/eris/dark/monofloor, /area/tether_away/aerostat/surface/outpost/cafe) "UC" = ( @@ -2602,9 +2626,9 @@ Ge QJ Zb br -zN -zN -zN +nx +nx +nx br zN dE @@ -5308,9 +5332,9 @@ gq dE zr WC +ru Ra -Ra -Ra +ru iu WF Oi @@ -6301,7 +6325,7 @@ Rw Bs sA nK -nK +GH tG gx gx diff --git a/maps/gateway_vr/carpfarm.dmm b/maps/gateway_vr/carpfarm.dmm index 51a3348abf..34feaf87d4 100644 --- a/maps/gateway_vr/carpfarm.dmm +++ b/maps/gateway_vr/carpfarm.dmm @@ -749,6 +749,10 @@ /obj/effect/overmap/visitable/sector/tether_gateway/carpfarm, /turf/space, /area/space) +"Ia" = ( +/obj/effect/landmark/hidden_level, +/turf/space, +/area/space) "Zb" = ( /obj/effect/shuttle_landmark{ base_area = /area/space; @@ -1182,7 +1186,7 @@ aa aa aa aa -aa +Ia aa "} (4,1,1) = {" diff --git a/maps/gateway_vr/listeningpost.dmm b/maps/gateway_vr/listeningpost.dmm index ef039b722b..8f451550f0 100644 --- a/maps/gateway_vr/listeningpost.dmm +++ b/maps/gateway_vr/listeningpost.dmm @@ -416,6 +416,10 @@ /obj/effect/floor_decal/rust, /turf/simulated/floor/airless, /area/awaymission/listeningpost) +"Hp" = ( +/obj/effect/landmark/hidden_level, +/turf/space, +/area/space) (1,1,1) = {" aa @@ -840,7 +844,7 @@ aa aa aa aa -aa +Hp aa "} (4,1,1) = {" diff --git a/maps/gateway_vr/snowfield.dmm b/maps/gateway_vr/snowfield.dmm index 2d09b9b2b3..1189687dff 100644 --- a/maps/gateway_vr/snowfield.dmm +++ b/maps/gateway_vr/snowfield.dmm @@ -1634,6 +1634,14 @@ temperature = 243.15 }, /area/awaymission/snowfield/base) +"no" = ( +/obj/effect/landmark/hidden_level, +/turf/simulated/floor/outdoors/snow{ + nitrogen = 93.7835; + oxygen = 20.7263; + temperature = 243.15 + }, +/area/awaymission/snowfield/restricted) "Bw" = ( /obj/effect/overmap/visitable/sector/tether_gateway/snowfield, /turf/simulated/floor/outdoors/snow{ @@ -2066,7 +2074,7 @@ ab ab ab ab -ab +no aa "} (4,1,1) = {" diff --git a/maps/gateway_vr/variable/arynthilake_a.dmm b/maps/gateway_vr/variable/arynthilake_a.dmm index 2c982bab65..6da233bf6c 100644 --- a/maps/gateway_vr/variable/arynthilake_a.dmm +++ b/maps/gateway_vr/variable/arynthilake_a.dmm @@ -2068,6 +2068,10 @@ }, /turf/simulated/floor/tiled/eris/white/brown_platform, /area/gateway/arynthilake/dome) +"Or" = ( +/obj/effect/landmark/hidden_level, +/turf/simulated/mineral/ignore_cavegen, +/area/gateway/arynthilake/caves) "OC" = ( /turf/simulated/floor/carpet/blucarpet{ outdoors = 1 @@ -3052,7 +3056,7 @@ Qr Qr Qr Qr -Qr +Or aa "} (5,1,1) = {" diff --git a/maps/gateway_vr/variable/arynthilake_b.dmm b/maps/gateway_vr/variable/arynthilake_b.dmm index a56a67f1b3..5ed87dc765 100644 --- a/maps/gateway_vr/variable/arynthilake_b.dmm +++ b/maps/gateway_vr/variable/arynthilake_b.dmm @@ -2022,6 +2022,10 @@ }, /turf/simulated/floor/tiled/eris/steel/gray_platform, /area/gateway/arynthilake/dome) +"Ry" = ( +/obj/effect/landmark/hidden_level, +/turf/simulated/mineral/ignore_cavegen, +/area/gateway/arynthilake/caves) "RK" = ( /obj/structure/table/fancyblack, /obj/effect/landmark/mcguffin_spawner, @@ -3022,7 +3026,7 @@ ek ek ek ek -ek +Ry nF "} (5,1,1) = {" diff --git a/maps/gateway_vr/variable/arynthilakeunderground_a.dmm b/maps/gateway_vr/variable/arynthilakeunderground_a.dmm index d7282a8095..121b0fac96 100644 --- a/maps/gateway_vr/variable/arynthilakeunderground_a.dmm +++ b/maps/gateway_vr/variable/arynthilakeunderground_a.dmm @@ -121,6 +121,10 @@ /obj/random/awayloot, /turf/simulated/floor/tiled/eris/steel/techfloor, /area/gateway/arynthilake/engine) +"nD" = ( +/obj/effect/landmark/hidden_level, +/turf/simulated/mineral/ignore_cavegen, +/area/gateway/arynthilake/underground) "nO" = ( /turf/simulated/mineral/floor/ignore_cavegen, /area/gateway/arynthilake/underground) @@ -670,7 +674,7 @@ gh gh gh gh -gh +nD Ft "} (3,1,1) = {" diff --git a/maps/gateway_vr/variable/arynthilakeunderground_b.dmm b/maps/gateway_vr/variable/arynthilakeunderground_b.dmm index 8755d3a2a5..75fa807ad5 100644 --- a/maps/gateway_vr/variable/arynthilakeunderground_b.dmm +++ b/maps/gateway_vr/variable/arynthilakeunderground_b.dmm @@ -103,6 +103,10 @@ /obj/random/awayloot, /turf/simulated/floor/tiled/eris/techmaint, /area/gateway/arynthilake/engine) +"jX" = ( +/obj/effect/landmark/hidden_level, +/turf/simulated/mineral/ignore_cavegen, +/area/gateway/arynthilake/underground) "kb" = ( /turf/simulated/wall/r_wall, /area/gateway/arynthilake/engine) @@ -723,7 +727,7 @@ bL bL bL bL -bL +jX bX "} (3,1,1) = {" diff --git a/maps/gateway_vr/variable/honlethhighlands_a.dmm b/maps/gateway_vr/variable/honlethhighlands_a.dmm index e80e463c65..19eebf89a3 100644 --- a/maps/gateway_vr/variable/honlethhighlands_a.dmm +++ b/maps/gateway_vr/variable/honlethhighlands_a.dmm @@ -1984,6 +1984,12 @@ /obj/item/weapon/stool/padded, /turf/simulated/floor/lino, /area/gateway/honlethhighlands/town/bar) +"Ey" = ( +/obj/effect/landmark/hidden_level, +/turf/simulated/floor/water/deep{ + temperature = 253.15 + }, +/area/gateway/honlethhighlands/beach) "EP" = ( /obj/structure/table/glass, /obj/item/weapon/paper_bin, @@ -3504,7 +3510,7 @@ bm bm bm bm -bm +Ey aa "} (5,1,1) = {" diff --git a/maps/gateway_vr/variable/honlethhighlands_b.dmm b/maps/gateway_vr/variable/honlethhighlands_b.dmm index 482c65dc67..1e46fe78df 100644 --- a/maps/gateway_vr/variable/honlethhighlands_b.dmm +++ b/maps/gateway_vr/variable/honlethhighlands_b.dmm @@ -2048,6 +2048,12 @@ }, /turf/simulated/floor/wood, /area/gateway/honlethhighlands) +"Gm" = ( +/obj/effect/landmark/hidden_level, +/turf/simulated/floor/water/deep{ + temperature = 253.15 + }, +/area/gateway/honlethhighlands/beach) "Gn" = ( /obj/structure/cable/pink{ d1 = 2; @@ -3543,7 +3549,7 @@ bm bm bm bm -bm +Gm aa "} (5,1,1) = {" diff --git a/maps/gateway_vr/wildwest.dmm b/maps/gateway_vr/wildwest.dmm index 02354f8abf..16e6a42d3f 100644 --- a/maps/gateway_vr/wildwest.dmm +++ b/maps/gateway_vr/wildwest.dmm @@ -1983,6 +1983,10 @@ /obj/effect/floor_decal/corner/paleblue/diagonal, /turf/simulated/floor/tiled/white, /area/awaymission/wwmines) +"RC" = ( +/obj/effect/landmark/hidden_level, +/turf/space, +/area/space) "RP" = ( /obj/structure/bed/padded, /obj/item/weapon/bedsheet/blue, @@ -2468,7 +2472,7 @@ ia ia ia ia -ia +RC aa "} (3,1,1) = {" diff --git a/maps/offmap_vr/om_ships/curashuttle.dmm b/maps/offmap_vr/om_ships/curashuttle.dmm index e6b4574392..83fe0dde11 100644 --- a/maps/offmap_vr/om_ships/curashuttle.dmm +++ b/maps/offmap_vr/om_ships/curashuttle.dmm @@ -4826,7 +4826,7 @@ aa /area/shuttle/curabitur/curashuttle/med) "bM" = ( /obj/structure/fans/hardlight, -/obj/machinery/door/airlock/external/glass/bolted{ +/obj/machinery/door/airlock/external/bolted{ frequency = 1480; id_tag = "curadocking" }, diff --git a/maps/submaps/pois_vr/debris_field/derelict.dmm b/maps/submaps/pois_vr/debris_field/derelict.dmm index c1dcd09022..cbc325c351 100644 --- a/maps/submaps/pois_vr/debris_field/derelict.dmm +++ b/maps/submaps/pois_vr/debris_field/derelict.dmm @@ -870,7 +870,6 @@ /turf/simulated/floor/tiled/dark, /area/submap/debrisfield/derelict/interior) "cF" = ( -/obj/effect/alien/egg, /obj/effect/alien/weeds, /turf/simulated/floor/tiled/dark, /area/submap/debrisfield/derelict/interior) diff --git a/maps/submaps/pois_vr/debris_field/mining_drones.dmm b/maps/submaps/pois_vr/debris_field/mining_drones.dmm index 5fa8f77d65..c94ba77182 100644 --- a/maps/submaps/pois_vr/debris_field/mining_drones.dmm +++ b/maps/submaps/pois_vr/debris_field/mining_drones.dmm @@ -166,7 +166,7 @@ /turf/simulated/floor/tiled/airless, /area/submap/debrisfield/mining_outpost) "E" = ( -/obj/machinery/door/airlock/external/glass{ +/obj/machinery/door/airlock/external{ density = 0; health = 0; icon_state = "door_open"; @@ -175,7 +175,7 @@ /turf/simulated/floor/airless, /area/submap/debrisfield/mining_outpost) "F" = ( -/obj/machinery/door/airlock/external/glass/bolted, +/obj/machinery/door/airlock/external/bolted, /turf/simulated/floor/airless, /area/submap/debrisfield/mining_outpost) "G" = ( diff --git a/maps/submaps/pois_vr/debris_field/new_escapepod_xeno.dmm b/maps/submaps/pois_vr/debris_field/new_escapepod_xeno.dmm index ed2b127f4f..5042974f3c 100644 --- a/maps/submaps/pois_vr/debris_field/new_escapepod_xeno.dmm +++ b/maps/submaps/pois_vr/debris_field/new_escapepod_xeno.dmm @@ -66,7 +66,6 @@ /area/submap/debrisfield/misc_debris) "W" = ( /obj/effect/alien/weeds, -/obj/effect/alien/egg, /turf/simulated/floor/airless, /area/submap/debrisfield/misc_debris) "X" = ( diff --git a/maps/submaps/surface_submaps/mountains/crashed_ufo_frigate.dmm b/maps/submaps/surface_submaps/mountains/crashed_ufo_frigate.dmm index 5e8267e0fe..e7cc5b471f 100644 --- a/maps/submaps/surface_submaps/mountains/crashed_ufo_frigate.dmm +++ b/maps/submaps/surface_submaps/mountains/crashed_ufo_frigate.dmm @@ -2,7 +2,7 @@ "ab" = (/turf/simulated/shuttle/wall/alien,/area/submap/cave/crashed_ufo_frigate) "ac" = (/turf/simulated/shuttle/floor/alienplating,/area/submap/cave/crashed_ufo_frigate) "ad" = (/turf/simulated/mineral/floor/ignore_mapgen,/area/template_noop) -"ae" = (/obj/structure/closet/secure_closet/egg/xenomorph,/obj/item/organ/internal/intestine/xeno{name = "inert xeno larva"},/turf/simulated/shuttle/floor/alienplating,/area/submap/cave/crashed_ufo_frigate) +"ae" = (/turf/simulated/shuttle/floor/alienplating,/area/submap/cave/crashed_ufo_frigate) "af" = (/mob/living/simple_mob/animal/space/alien/drone,/turf/simulated/shuttle/floor/alienplating,/area/submap/cave/crashed_ufo_frigate) "ag" = (/obj/machinery/porta_turret/alien{faction = "xeno"},/turf/simulated/floor/outdoors/ice,/area/submap/cave/crashed_ufo_frigate) "ah" = (/obj/structure/table/alien,/turf/simulated/floor/outdoors/ice,/area/submap/cave/crashed_ufo_frigate) @@ -11,7 +11,7 @@ "ak" = (/obj/machinery/porta_turret/alien{faction = "xeno"},/turf/simulated/shuttle/floor/alienplating,/area/submap/cave/crashed_ufo_frigate) "al" = (/turf/simulated/floor/outdoors/ice,/area/submap/cave/crashed_ufo_frigate) "am" = (/obj/structure/window/phoronreinforced,/turf/simulated/shuttle/floor/alienplating,/area/submap/cave/crashed_ufo_frigate) -"an" = (/obj/structure/window/phoronreinforced,/obj/structure/closet/secure_closet/egg/xenomorph,/obj/item/organ/internal/intestine/xeno{name = "inert xeno larva"},/turf/simulated/shuttle/floor/alienplating,/area/submap/cave/crashed_ufo_frigate) +"an" = (/obj/structure/window/phoronreinforced,/turf/simulated/shuttle/floor/alienplating,/area/submap/cave/crashed_ufo_frigate) "ao" = (/obj/structure/loot_pile/surface/alien/security,/turf/simulated/shuttle/floor/alienplating,/area/submap/cave/crashed_ufo_frigate) "ap" = (/turf/simulated/shuttle/floor/alien,/area/submap/cave/crashed_ufo_frigate) "aq" = (/obj/structure/prop/alien/pod/open,/turf/simulated/shuttle/floor/alien,/area/submap/cave/crashed_ufo_frigate) @@ -47,8 +47,8 @@ "aU" = (/obj/machinery/replicator,/turf/simulated/shuttle/floor/alienplating,/area/submap/cave/crashed_ufo_frigate) "aV" = (/obj/structure/closet/alien,/obj/random/unidentified_medicine/drug_den,/turf/simulated/shuttle/floor/alienplating,/area/submap/cave/crashed_ufo_frigate) "aW" = (/obj/effect/decal/remains/xeno,/obj/item/clothing/under/psysuit,/turf/simulated/shuttle/floor/alienplating,/area/submap/cave/crashed_ufo_frigate) -"aX" = (/obj/structure/prop/alien/computer/camera/flipped{dir = 4},/turf/simulated/shuttle/floor/alienplating,/area/submap/cave/crashed_ufo_frigate) -"aY" = (/obj/structure/prop/alien/computer/camera{dir = 8},/turf/simulated/shuttle/floor/alienplating,/area/submap/cave/crashed_ufo_frigate) +"aX" = (/obj/structure/prop/alien/computer/camera/flipped{icon_state = "camera_flipped"; dir = 4},/turf/simulated/shuttle/floor/alienplating,/area/submap/cave/crashed_ufo_frigate) +"aY" = (/obj/structure/prop/alien/computer/camera{icon_state = "camera"; dir = 8},/turf/simulated/shuttle/floor/alienplating,/area/submap/cave/crashed_ufo_frigate) "aZ" = (/obj/machinery/porta_turret/alien/destroyed,/turf/simulated/shuttle/floor/alienplating,/area/submap/cave/crashed_ufo_frigate) "ba" = (/obj/structure/closet/alien,/obj/random/unidentified_medicine/scientific,/turf/simulated/shuttle/floor/alien,/area/submap/cave/crashed_ufo_frigate) "bb" = (/obj/structure/closet/alien,/obj/random/unidentified_medicine/nanites,/turf/simulated/floor/outdoors/ice,/area/submap/cave/crashed_ufo_frigate) @@ -67,7 +67,7 @@ "bo" = (/obj/machinery/porta_turret/alien{faction = "xeno"},/turf/simulated/shuttle/floor/alien,/area/submap/cave/crashed_ufo_frigate) "bp" = (/obj/structure/foamedmetal,/turf/simulated/shuttle/floor/alienplating,/area/submap/cave/crashed_ufo_frigate) "bq" = (/obj/machinery/implantchair,/turf/simulated/shuttle/floor/alienplating,/area/submap/cave/crashed_ufo_frigate) -"br" = (/obj/structure/prop/alien/computer{dir = 8},/turf/simulated/shuttle/floor/alienplating,/area/submap/cave/crashed_ufo_frigate) +"br" = (/obj/structure/prop/alien/computer{icon_state = "console-c"; dir = 8},/turf/simulated/shuttle/floor/alienplating,/area/submap/cave/crashed_ufo_frigate) "bs" = (/obj/effect/alien/weeds/node,/mob/living/simple_mob/animal/space/alien/sentinel/praetorian,/turf/simulated/shuttle/floor/alien,/area/submap/cave/crashed_ufo_frigate) "bt" = (/obj/structure/loot_pile/maint/technical,/turf/simulated/shuttle/floor/alienplating,/area/submap/cave/crashed_ufo_frigate) "bu" = (/obj/structure/loot_pile/surface/drone,/turf/simulated/shuttle/floor/alienplating,/area/submap/cave/crashed_ufo_frigate) @@ -78,14 +78,14 @@ "bz" = (/obj/structure/mopbucket,/turf/simulated/shuttle/floor/alienplating,/area/submap/cave/crashed_ufo_frigate) "bA" = (/obj/item/brokenbug,/turf/simulated/mineral/floor/ignore_mapgen,/area/template_noop) "bB" = (/mob/living/simple_mob/animal/space/alien/sentinel,/turf/simulated/shuttle/floor/alien,/area/submap/cave/crashed_ufo_frigate) -"bC" = (/obj/structure/prop/alien/computer/camera/flipped{dir = 4},/turf/simulated/shuttle/floor/alien,/area/submap/cave/crashed_ufo_frigate) -"bD" = (/obj/structure/prop/alien/computer/camera{dir = 8},/turf/simulated/shuttle/floor/alien,/area/submap/cave/crashed_ufo_frigate) +"bC" = (/obj/structure/prop/alien/computer/camera/flipped{icon_state = "camera_flipped"; dir = 4},/turf/simulated/shuttle/floor/alien,/area/submap/cave/crashed_ufo_frigate) +"bD" = (/obj/structure/prop/alien/computer/camera{icon_state = "camera"; dir = 8},/turf/simulated/shuttle/floor/alien,/area/submap/cave/crashed_ufo_frigate) "bE" = (/obj/structure/loot_pile/maint/boxfort,/turf/simulated/shuttle/floor/alienplating,/area/submap/cave/crashed_ufo_frigate) "bF" = (/obj/structure/prop/blackbox/xenofrigate,/turf/simulated/shuttle/floor/alienplating,/area/submap/cave/crashed_ufo_frigate) "bG" = (/obj/random/outcrop,/turf/simulated/mineral/floor/ignore_mapgen,/area/template_noop) "bH" = (/obj/structure/loot_pile/maint/junk,/turf/simulated/shuttle/floor/alienplating,/area/submap/cave/crashed_ufo_frigate) "bI" = (/obj/structure/table/alien,/obj/structure/loot_pile/surface/alien/medical,/turf/simulated/shuttle/floor/alienplating,/area/submap/cave/crashed_ufo_frigate) -"bJ" = (/obj/structure/window/phoronreinforced{dir = 8},/turf/simulated/shuttle/floor/alienplating,/area/submap/cave/crashed_ufo_frigate) +"bJ" = (/obj/structure/window/phoronreinforced{icon_state = "phoronrwindow"; dir = 8},/turf/simulated/shuttle/floor/alienplating,/area/submap/cave/crashed_ufo_frigate) "bK" = (/obj/structure/table/alien,/obj/item/prop/alien/junk,/turf/simulated/shuttle/floor/alienplating,/area/submap/cave/crashed_ufo_frigate) "bL" = (/obj/structure/table/alien,/obj/item/weapon/paper/alien{icon_state = "alienpaper_words"; info = "\[i]This tablet has a large collection of symbols that you've never seen before outside this ship. You have no hope of figuring out what any of the mean...\[/i]"},/obj/item/device/gps/internal/poi,/turf/simulated/shuttle/floor/alienplating,/area/submap/cave/crashed_ufo_frigate) "bM" = (/obj/structure/window/phoronreinforced{dir = 4},/turf/simulated/shuttle/floor/alienplating,/area/submap/cave/crashed_ufo_frigate) @@ -95,7 +95,7 @@ "bQ" = (/obj/structure/table/alien,/obj/structure/window/phoronreinforced{dir = 4},/obj/item/weapon/paper/alien{icon_state = "alienpaper_words"; info = "\[i]This tablet has a large collection of symbols that you've never seen before outside this ship. You have no hope of figuring out what any of the mean...\[/i]"},/turf/simulated/shuttle/floor/alien,/area/submap/cave/crashed_ufo_frigate) "bR" = (/obj/structure/table/alien,/obj/structure/foamedmetal,/turf/simulated/shuttle/floor/alienplating,/area/submap/cave/crashed_ufo_frigate) "bS" = (/obj/structure/closet/alien,/turf/simulated/shuttle/floor/alienplating,/area/submap/cave/crashed_ufo_frigate) -"bT" = (/obj/structure/window/phoronreinforced{dir = 8},/obj/structure/window/phoronreinforced,/turf/simulated/shuttle/floor/alienplating,/area/submap/cave/crashed_ufo_frigate) +"bT" = (/obj/structure/window/phoronreinforced{icon_state = "phoronrwindow"; dir = 8},/obj/structure/window/phoronreinforced,/turf/simulated/shuttle/floor/alienplating,/area/submap/cave/crashed_ufo_frigate) "bU" = (/obj/structure/window/phoronreinforced,/obj/structure/window/phoronreinforced{dir = 4},/turf/simulated/floor/outdoors/ice,/area/submap/cave/crashed_ufo_frigate) "bV" = (/obj/structure/table/alien,/obj/structure/window/phoronreinforced,/obj/item/weapon/paper/alien,/turf/simulated/shuttle/floor/alien,/area/submap/cave/crashed_ufo_frigate) "bW" = (/obj/structure/table/alien,/obj/structure/window/phoronreinforced{dir = 4},/obj/structure/window/phoronreinforced,/turf/simulated/shuttle/floor/alien,/area/submap/cave/crashed_ufo_frigate) diff --git a/maps/submaps/surface_submaps/mountains/vault4.dmm b/maps/submaps/surface_submaps/mountains/vault4.dmm index 6ea85a27e9..43939ca317 100644 --- a/maps/submaps/surface_submaps/mountains/vault4.dmm +++ b/maps/submaps/surface_submaps/mountains/vault4.dmm @@ -7,7 +7,7 @@ "g" = (/obj/effect/alien/weeds/node,/turf/simulated/mineral/floor/ignore_mapgen,/area/submap/cave/vault4) "h" = (/obj/effect/alien/weeds,/obj/random/multiple/minevault,/turf/simulated/mineral/floor/ignore_mapgen,/area/submap/cave/vault4) "i" = (/obj/effect/alien/weeds,/mob/living/simple_mob/animal/space/alien,/turf/simulated/mineral/floor/ignore_mapgen,/area/submap/cave/vault4) -"j" = (/obj/effect/alien/weeds,/obj/structure/closet/secure_closet/egg/xenomorph,/obj/item/organ/internal/intestine/xeno{name = "inert xeno larva"},/obj/item/organ/internal/intestine/xeno{name = "inert xeno larva"},/turf/simulated/mineral/floor/ignore_mapgen,/area/submap/cave/vault4) +"j" = (/obj/effect/alien/weeds,/turf/simulated/mineral/floor/ignore_mapgen,/area/submap/cave/vault4) (1,1,1) = {" aaaaaaaaa diff --git a/maps/submaps/surface_submaps/mountains/vault5.dmm b/maps/submaps/surface_submaps/mountains/vault5.dmm index 8daebc236f..19b3a3d910 100644 --- a/maps/submaps/surface_submaps/mountains/vault5.dmm +++ b/maps/submaps/surface_submaps/mountains/vault5.dmm @@ -6,7 +6,7 @@ "f" = (/obj/effect/alien/weeds,/obj/item/clothing/suit/storage/vest/tactical,/turf/simulated/mineral/floor/ignore_mapgen,/area/submap/cave/vault5) "g" = (/obj/effect/alien/weeds,/obj/structure/bed/nest,/turf/simulated/mineral/floor/ignore_mapgen,/area/submap/cave/vault5) "h" = (/obj/effect/alien/weeds,/obj/random/multiple/minevault,/mob/living/simple_mob/animal/space/alien/sentinel/praetorian,/turf/simulated/mineral/floor/ignore_mapgen,/area/submap/cave/vault5) -"i" = (/obj/effect/alien/weeds,/obj/structure/closet/secure_closet/egg/xenomorph,/obj/item/organ/internal/intestine/xeno{name = "inert xeno larva"},/turf/simulated/mineral/floor/ignore_mapgen,/area/submap/cave/vault5) +"i" = (/obj/effect/alien/weeds,/turf/simulated/mineral/floor/ignore_mapgen,/area/submap/cave/vault5) "j" = (/obj/effect/alien/weeds,/obj/effect/alien/weeds/node,/mob/living/simple_mob/animal/space/alien/queen/empress,/turf/simulated/mineral/floor/ignore_mapgen,/area/submap/cave/vault5) "k" = (/obj/effect/alien/weeds,/obj/item/clothing/head/helmet/tac,/obj/item/weapon/gun/projectile/SVD,/turf/simulated/mineral/floor/ignore_mapgen,/area/submap/cave/vault5) diff --git a/maps/tether/tether-05-station1.dmm b/maps/tether/tether-05-station1.dmm index 9e54c7210b..62a7debfd9 100644 --- a/maps/tether/tether-05-station1.dmm +++ b/maps/tether/tether-05-station1.dmm @@ -34249,8 +34249,8 @@ }, /obj/machinery/door/airlock/science{ name = "Pathfinder"; - req_access = list(62,43,67); - req_one_access = newlist() + req_access = null; + req_one_access = list(44) }, /turf/simulated/floor/tiled/steel_grid, /area/tether/exploration/pathfinder_office) diff --git a/maps/tether/tether_defines.dm b/maps/tether/tether_defines.dm index 863ee39b2a..ecfd1c1d58 100644 --- a/maps/tether/tether_defines.dm +++ b/maps/tether/tether_defines.dm @@ -167,8 +167,7 @@ list("Carp Farm"), list("Snow Field"), list("Listening Post"), - list("Honleth Highlands A"), - list("Honleth Highlands B"), + list(list("Honleth Highlands A", "Honleth Highlands B")), list("Arynthi Lake Underground A","Arynthi Lake A"), list("Arynthi Lake Underground B","Arynthi Lake B"), list("Eggnog Town Underground","Eggnog Town"), diff --git a/maps/tether/tether_shuttles.dm b/maps/tether/tether_shuttles.dm index 0481ba9741..f8e126d024 100644 --- a/maps/tether/tether_shuttles.dm +++ b/maps/tether/tether_shuttles.dm @@ -94,8 +94,7 @@ /datum/shuttle/ferry/tether_backup/process_longjump(var/area/origin, var/area/intended_destination) var/failures = engines.len - for(var/engine in engines) - var/obj/structure/shuttle/engine/E = engine + for(var/obj/structure/shuttle/engine/E as anything in engines) failures -= E.jump() #define MOVE_PER(x) move_time*(x/100) SECONDS diff --git a/maps/tether/tether_turfs.dm b/maps/tether/tether_turfs.dm index e10c6a5fe0..0bf0ef290f 100644 --- a/maps/tether/tether_turfs.dm +++ b/maps/tether/tether_turfs.dm @@ -69,10 +69,6 @@ VIRGO3B_TURF_CREATE(/turf/simulated/mineral/floor) "uranium" = 10, "platinum" = 10, "hematite" = 20, - "copper" = 8, -// "tin" = 4, - "bauxite" = 4, - "rutile" = 4, "carbon" = 20, "diamond" = 1, "gold" = 8, @@ -86,10 +82,6 @@ VIRGO3B_TURF_CREATE(/turf/simulated/mineral/floor) "uranium" = 5, "platinum" = 5, "hematite" = 35, - "copper" = 15, -// "tin" = 10, - "bauxite" = 10, - "rutile" = 10, "carbon" = 35, "gold" = 3, "silver" = 3, @@ -272,7 +264,7 @@ VIRGO3B_TURF_CREATE(/turf/simulated/mineral/floor) new_junction |= (1<<5) icon_state = "[base_icon_state]-[new_junction]" - + add_vis_overlay('icons/effects/effects.dmi', "white", plane = SPACE_PLANE, add_vis_flags = VIS_INHERIT_ID|VIS_UNDERLAY) /turf/space/v3b_midpoint/Initialize() @@ -283,4 +275,3 @@ VIRGO3B_TURF_CREATE(/turf/simulated/mineral/floor) . = ..() for(var/obj/effect/step_trigger/teleporter/planetary_fall/virgo3b/F in src) qdel(F) - \ No newline at end of file diff --git a/maps/~map_system/maps.dm b/maps/~map_system/maps.dm index 4a6b06fc77..9c3839f46c 100644 --- a/maps/~map_system/maps.dm +++ b/maps/~map_system/maps.dm @@ -3,7 +3,7 @@ var/datum/map/using_map = new USING_MAP_DATUM var/list/all_maps = list() /hook/startup/proc/initialise_map_list() - for(var/type in typesof(/datum/map) - /datum/map) + for(var/type in subtypesof(/datum/map)) var/datum/map/M if(type == using_map.type) M = using_map @@ -35,6 +35,7 @@ var/list/all_maps = list() var/static/list/xenoarch_exempt_levels = list() //Z-levels exempt from xenoarch finds and digsites spawning. var/static/list/persist_levels = list() // Z-levels where SSpersistence should persist between rounds. Defaults to station_levels if unset. var/static/list/secret_levels = list() // Z-levels that (non-admin) ghosts can't get to + var/static/list/hidden_levels = list() // Z-levels who's contents are hidden, but not forbidden (gateways) var/static/list/empty_levels = list() // Empty Z-levels that may be used for various things var/static/list/vorespawn_levels = list() //Z-levels where players are allowed to vore latejoin to. //CHOMPedit: the number of missing chompedits is giving me an aneurysm var/static/list/mappable_levels = list()// List of levels where mapping or other similar devices might work fully diff --git a/sound/machines/door/airlock_tear_apart.ogg b/sound/machines/door/airlock_tear_apart.ogg new file mode 100644 index 0000000000..aba517475f Binary files /dev/null and b/sound/machines/door/airlock_tear_apart.ogg differ diff --git a/sound/weapons/alien_spitacid.ogg b/sound/weapons/alien_spitacid.ogg new file mode 100644 index 0000000000..db630d0e8c Binary files /dev/null and b/sound/weapons/alien_spitacid.ogg differ diff --git a/sound/weapons/effects/alien_spit_wall.ogg b/sound/weapons/effects/alien_spit_wall.ogg new file mode 100644 index 0000000000..3d4fc90d27 Binary files /dev/null and b/sound/weapons/effects/alien_spit_wall.ogg differ diff --git a/vorestation.dme b/vorestation.dme index a0685571f0..24611116ae 100644 --- a/vorestation.dme +++ b/vorestation.dme @@ -790,7 +790,6 @@ #include "code\game\jobs\access.dm" #include "code\game\jobs\access_datum.dm" #include "code\game\jobs\access_datum_vr.dm" -#include "code\game\jobs\access_datum_yw.dm" #include "code\game\jobs\job_controller.dm" #include "code\game\jobs\jobs.dm" #include "code\game\jobs\whitelist.dm" @@ -1143,8 +1142,6 @@ #include "code\game\objects\effects\zone_divider.dm" #include "code\game\objects\effects\zz_portals_ch.dm" #include "code\game\objects\effects\zz_triggers_ch.dm" -#include "code\game\objects\effects\alien\alien egg.dm" -#include "code\game\objects\effects\alien\alien.dm" #include "code\game\objects\effects\alien\aliens.dm" #include "code\game\objects\effects\chem\chemsmoke.dm" #include "code\game\objects\effects\chem\coating.dm" @@ -1574,6 +1571,8 @@ #include "code\game\objects\structures\window.dm" #include "code\game\objects\structures\window_spawner.dm" #include "code\game\objects\structures\window_vr.dm" +#include "code\game\objects\structures\alien\alien egg.dm" +#include "code\game\objects\structures\alien\alien.dm" #include "code\game\objects\structures\crates_lockers\__closets.dm" #include "code\game\objects\structures\crates_lockers\_closets_appearance_definitions.dm" #include "code\game\objects\structures\crates_lockers\_closets_appearance_definitions_vr.dm"