diff --git a/code/__defines/doors.dm b/code/__defines/doors.dm index f7a2a4c5c0362..2060e68bf7a66 100644 --- a/code/__defines/doors.dm +++ b/code/__defines/doors.dm @@ -5,3 +5,14 @@ #define DOOR_OPERATING_YES 1 /// Door has been emagged or is otherwise non functional. #define DOOR_OPERATING_BROKEN -1 + + +// Flags for `/obj/machinery/door/airlock/var/paintable` +/// The main airlock body is paintable. +#define AIRLOCK_PAINTABLE_MAIN FLAG(0) +/// The stripe decal is paintable. +#define AIRLOCK_PAINTABLE_STRIPE FLAG(1) +/// Other detailing is paintable. +#define AIRLOCK_PAINTABLE_DETAIL FLAG(2) +/// The window is paintable. +#define AIRLOCK_PAINTABLE_WINDOW FLAG(3) diff --git a/code/__defines/materials.dm b/code/__defines/materials.dm index 1d6cae0f1116c..7f7d475c40098 100644 --- a/code/__defines/materials.dm +++ b/code/__defines/materials.dm @@ -137,10 +137,3 @@ #define MATERIAL_RIGID 40 #define MATERIAL_HARD 60 #define MATERIAL_VERY_HARD 80 - -//Wall & Airlock layering flags -#define MATERIAL_PAINTABLE_MAIN FLAG(0) -#define MATERIAL_PAINTABLE_STRIPE FLAG(1) -#define MATERIAL_PAINTABLE_DETAIL FLAG(2) -#define MATERIAL_PAINTABLE_WINDOW FLAG(3) -#define MATERIAL_WALL_HAS_EDGES FLAG(4) diff --git a/code/_global_vars/lists/objects.dm b/code/_global_vars/lists/objects.dm index 8f9796681cef4..84f043c2886b6 100644 --- a/code/_global_vars/lists/objects.dm +++ b/code/_global_vars/lists/objects.dm @@ -20,24 +20,3 @@ GLOBAL_DATUM_INIT(universe, /datum/universal_state, new) GLOBAL_LIST_INIT(full_alphabet, list("a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z")) GLOBAL_LIST_EMPTY(meteor_list) - -GLOBAL_LIST_EMPTY(shield_generators) // All shield generators - -GLOBAL_LIST_INIT(wall_blend_objects, list( - /obj/machinery/door, - /obj/structure/wall_frame, - /obj/structure/grille, - /obj/structure/window/reinforced/full, - /obj/structure/window/reinforced/polarized/full, - /obj/structure/window/shuttle, - /obj/structure/window/boron_basic/full, - /obj/structure/window/boron_reinforced/full -)) - -GLOBAL_LIST_INIT(wall_noblend_objects, list( - /obj/machinery/door/window -)) - -GLOBAL_LIST_INIT(wall_fullblend_objects, list( - /obj/structure/wall_frame -)) diff --git a/code/game/machinery/doors/airlock.dm b/code/game/machinery/doors/airlock.dm index a625d28d238c0..f342acac9d865 100644 --- a/code/game/machinery/doors/airlock.dm +++ b/code/game/machinery/doors/airlock.dm @@ -79,8 +79,8 @@ /// String. Partial icon state for generating the airlock appearance overlay. var/airlock_type = "Standard" var/static/list/airlock_icon_cache = list() - /// Bitflag (Any of `MATERIAL_PAINTABLE*`). Determines what parts of the airlock can be recolored with paint. - var/paintable = MATERIAL_PAINTABLE_MAIN | MATERIAL_PAINTABLE_STRIPE + /// Bitflag (Any of `AIRLOCK_PAINTABLE_*`). Determines what parts of the airlock can be recolored with paint. + var/paintable = AIRLOCK_PAINTABLE_MAIN | AIRLOCK_PAINTABLE_STRIPE /// Color. The color of the main door body. var/door_color = null /// Color. The color of the stripe detail. @@ -255,7 +255,7 @@ emag_file = 'icons/obj/doors/external/emag.dmi' assembly_type = /obj/structure/door_assembly/door_assembly_ext door_color = COLOR_NT_RED - paintable = MATERIAL_PAINTABLE_MAIN + paintable = AIRLOCK_PAINTABLE_MAIN /obj/machinery/door/airlock/external/inherit_access_from_area() ..() @@ -380,7 +380,7 @@ explosion_resistance = 20 opacity = 1 assembly_type = /obj/structure/door_assembly/door_assembly_hatch - paintable = MATERIAL_PAINTABLE_STRIPE + paintable = AIRLOCK_PAINTABLE_STRIPE /obj/machinery/door/airlock/hatch/maintenance name = "Maintenance Hatch" @@ -1344,7 +1344,7 @@ About the new airlock wires panel: brace.update_access() update_icon() if (glass) - paintable |= MATERIAL_PAINTABLE_WINDOW + paintable |= AIRLOCK_PAINTABLE_WINDOW window_material = SSmaterials.get_material_by_name(init_material_window) if (!window_color) window_color = window_material.icon_colour diff --git a/code/game/objects/effects/misc.dm b/code/game/objects/effects/misc.dm index 9feaa101d9c08..a798296b2d032 100644 --- a/code/game/objects/effects/misc.dm +++ b/code/game/objects/effects/misc.dm @@ -19,15 +19,11 @@ /obj/paint/LateInitialize(mapload) var/turf/simulated/wall/W = get_turf(src) if(istype(W)) - if(W.material.wall_flags & MATERIAL_PAINTABLE_MAIN) - W.paint_color = color - if(W.material.wall_flags & MATERIAL_PAINTABLE_STRIPE) - W.stripe_color = color + W.paint_color = color W.update_icon() var/obj/structure/wall_frame/WF = locate() in loc if(WF) WF.paint_color = color - WF.stripe_color = color WF.update_icon() qdel(src) diff --git a/code/game/objects/items/devices/paint_sprayer.dm b/code/game/objects/items/devices/paint_sprayer.dm index a08cabe227d76..2acb9213db83e 100644 --- a/code/game/objects/items/devices/paint_sprayer.dm +++ b/code/game/objects/items/devices/paint_sprayer.dm @@ -1,6 +1,6 @@ -#define PAINT_REGION_PAINT "Paint" -#define PAINT_REGION_STRIPE "Stripe" -#define PAINT_REGION_WINDOW "Window" +#define AIRLOCK_REGION_PAINT "Paint" +#define AIRLOCK_REGION_STRIPE "Stripe" +#define AIRLOCK_REGION_WINDOW "Window" #define PLACEMENT_MODE_QUARTERS 1 #define PLACEMENT_MODE_TRIANGLES 2 @@ -19,7 +19,6 @@ desc = "A slender and none-too-sophisticated device capable of applying paint on floors, walls, exosuits and certain airlocks." var/decal = "Quarter-Tile" var/paint_color - var/wall_paint_region = PAINT_REGION_PAINT var/category var/list/decals = list( @@ -110,7 +109,6 @@ var/radial = list() radial["Remove all decals"] = mutable_appearance("icons/screen/radial.dmi", "cable_invalid") radial["Pick color"] = mutable_appearance("icons/screen/radial.dmi", "color_hexagon") - radial["Switch wall paint region"] = mutable_appearance("icons/screen/radial.dmi", "wall_paint_swap") for (var/key in categories) radial[key] = mutable_appearance("icons/screen/radial.dmi", categories[key]["icon_state"]) var/choice = show_radial_menu(user, user, radial, require_near = TRUE, radius = 50, tooltips = TRUE, check_locs = list(src)) @@ -123,9 +121,6 @@ if ("Pick color") choose_color(user) return - if ("Switch wall paint region") - choose_wall_paint_region(user) - return category = categories[choice]["id"] show_decals_by_category(user) @@ -183,11 +178,6 @@ new_color = pick_color_from_floor(A, user) else if (istype(A, /obj/machinery/door/airlock)) new_color = pick_color_from_airlock(A, user) - else if (istype(A, /turf/simulated/wall)) - new_color = pick_color_from_wall(A, user) - else if (istype(A, /obj/structure/wall_frame)) - var/obj/structure/wall_frame/wall_frame = A - new_color = wall_frame.stripe_color else if (A.atom_flags & ATOM_FLAG_CAN_BE_PAINTED) new_color = A.get_color() if (!change_color(new_color, user)) @@ -195,19 +185,15 @@ return TRUE // There was an attempt to pick a color. /obj/item/device/paint_sprayer/proc/apply_paint(atom/A, mob/user, click_parameters) - if (istype(A, /turf/simulated/wall)) - . = paint_wall(A, user) + if (A.atom_flags & ATOM_FLAG_CAN_BE_PAINTED) + A.set_color(paint_color) + . = TRUE else if (istype(A, /turf/simulated/floor)) . = paint_floor(A, user, click_parameters) else if (istype(A, /obj/machinery/door/airlock)) . = paint_airlock(A, user) - else if (istype(A, /obj/structure/wall_frame)) - . = paint_wall_frame(A, user) else if (istype(A, /mob/living/exosuit)) to_chat(user, SPAN_WARNING("You can't paint an active exosuit. Dismantle it first.")) - else if (A.atom_flags & ATOM_FLAG_CAN_BE_PAINTED) - A.set_color(paint_color) - . = TRUE if (.) playsound(get_turf(src), 'sound/effects/spray3.ogg', 30, 1, -6) return . @@ -221,14 +207,6 @@ LIST_DEC(F.decals) F.update_icon() . = TRUE - else if (istype(A, /turf/simulated/wall)) - var/turf/simulated/wall/wall = A - wall.paint_wall(null) - wall.stripe_wall(null) - . = TRUE - else if (istype(A, /obj/structure/wall_frame)) - var/obj/structure/wall_frame/wall_frame = A - . = wall_frame.stripe_wall_frame(null) else if (istype(A, /obj/machinery/door/airlock)) var/obj/machinery/door/airlock/D = A if (D.paintable) @@ -330,11 +308,11 @@ if (!D.paintable) return FALSE switch (select_airlock_region(D, user, "Where do you wish to pick the color from?")) - if (PAINT_REGION_PAINT) + if (AIRLOCK_REGION_PAINT) return D.door_color - if (PAINT_REGION_STRIPE) + if (AIRLOCK_REGION_STRIPE) return D.stripe_color - if (PAINT_REGION_WINDOW) + if (AIRLOCK_REGION_WINDOW) return D.window_color else return FALSE @@ -345,80 +323,30 @@ return FALSE switch (select_airlock_region(D, user, "What do you wish to paint?")) - if (PAINT_REGION_PAINT) + if (AIRLOCK_REGION_PAINT) D.paint_airlock(paint_color) - if (PAINT_REGION_STRIPE) + if (AIRLOCK_REGION_STRIPE) D.stripe_airlock(paint_color) - if (PAINT_REGION_WINDOW) + if (AIRLOCK_REGION_WINDOW) D.paint_window(paint_color) else return FALSE return TRUE -/obj/item/device/paint_sprayer/proc/select_airlock_region(obj/machinery/door/airlock/door, mob/user, input_text) +/obj/item/device/paint_sprayer/proc/select_airlock_region(obj/machinery/door/airlock/D, mob/user, input_text) var/choice var/list/choices = list() - if (door.paintable & MATERIAL_PAINTABLE_MAIN) - choices |= PAINT_REGION_PAINT - if (door.paintable & MATERIAL_PAINTABLE_STRIPE) - choices |= PAINT_REGION_STRIPE - if (door.paintable & MATERIAL_PAINTABLE_WINDOW) - choices |= PAINT_REGION_WINDOW + if (D.paintable & AIRLOCK_PAINTABLE_MAIN) + choices |= AIRLOCK_REGION_PAINT + if (D.paintable & AIRLOCK_PAINTABLE_STRIPE) + choices |= AIRLOCK_REGION_STRIPE + if (D.paintable & AIRLOCK_PAINTABLE_WINDOW) + choices |= AIRLOCK_REGION_WINDOW choice = input(user, input_text) as null|anything in sortList(choices) - if (!user.use_sanity_check(door, src)) + if (user.incapacitated() || !D || !user.Adjacent(D)) return FALSE return choice -/obj/item/device/paint_sprayer/proc/paint_wall(turf/simulated/wall/wall, mob/user) - if(istype(wall) && (!wall.material?.wall_flags)) - to_chat(user, SPAN_WARNING("You can't paint this wall type.")) - return - if (!user.use_sanity_check(wall, src)) - return FALSE - if(istype(wall)) - if(wall_paint_region == PAINT_REGION_PAINT) - if(!(wall.material?.wall_flags & MATERIAL_PAINTABLE_MAIN)) - to_chat(user, SPAN_WARNING("You can't paint this wall type.")) - return FALSE - wall.paint_wall(paint_color) - return TRUE - else if(wall_paint_region == PAINT_REGION_STRIPE) - if(!(wall.material?.wall_flags & MATERIAL_PAINTABLE_STRIPE)) - to_chat(user, SPAN_WARNING("You can't stripe this wall type.")) - return FALSE - wall.stripe_wall(paint_color) - return TRUE - - -/obj/item/device/paint_sprayer/proc/pick_color_from_wall(turf/simulated/wall/wall, mob/user) - if (!wall.material || !wall.material.wall_flags) - return FALSE - - switch (select_wall_region(wall, user, "Where do you wish to select the color from?")) - if (PAINT_REGION_PAINT) - return wall.paint_color - if (PAINT_REGION_STRIPE) - return wall.stripe_color - else - return FALSE - -/obj/item/device/paint_sprayer/proc/select_wall_region(turf/simulated/wall/wall, mob/user, input_text) - var/list/choices = list() - if (wall.material.wall_flags & MATERIAL_PAINTABLE_MAIN) - choices |= PAINT_REGION_PAINT - if (wall.material.wall_flags & MATERIAL_PAINTABLE_STRIPE) - choices |= PAINT_REGION_STRIPE - var/choice = input(user, input_text) as null|anything in sortTim(choices, /proc/cmp_text_asc) - if (!user.use_sanity_check(wall, src)) - return FALSE - return choice - -/obj/item/device/paint_sprayer/proc/paint_wall_frame(obj/structure/wall_frame/wall_frame, mob/user) - if (!user.use_sanity_check(wall_frame, src)) - return FALSE - wall_frame.stripe_wall_frame(paint_color) - return TRUE - /obj/item/device/paint_sprayer/proc/change_color(new_color, mob/user) if (new_color) paint_color = new_color @@ -454,14 +382,6 @@ return change_color(new_color, user) -/obj/item/device/paint_sprayer/proc/choose_wall_paint_region(mob/user) - if(wall_paint_region == PAINT_REGION_STRIPE) - wall_paint_region = PAINT_REGION_PAINT - to_chat(user, SPAN_NOTICE("You set \the [src] to paint walls.")) - else - wall_paint_region = PAINT_REGION_STRIPE - to_chat(user, SPAN_NOTICE("You set \the [src] to stripe walls.")) - /obj/item/device/paint_sprayer/verb/choose_preset_color() set name = "Choose Preset Color" set desc = "Choose a preset color." @@ -489,9 +409,9 @@ return user.ClickOn(A, params) -#undef PAINT_REGION_PAINT -#undef PAINT_REGION_STRIPE -#undef PAINT_REGION_WINDOW +#undef AIRLOCK_REGION_PAINT +#undef AIRLOCK_REGION_STRIPE +#undef AIRLOCK_REGION_WINDOW #undef PLACEMENT_MODE_QUARTERS #undef PLACEMENT_MODE_TRIANGLES diff --git a/code/game/objects/structures/door_assembly.dm b/code/game/objects/structures/door_assembly.dm index 16cf981efa826..421c4481e3adb 100644 --- a/code/game/objects/structures/door_assembly.dm +++ b/code/game/objects/structures/door_assembly.dm @@ -31,7 +31,7 @@ var/panel_icon = 'icons/obj/doors/station/panel.dmi' var/fill_icon = 'icons/obj/doors/station/fill_steel.dmi' var/glass_icon = 'icons/obj/doors/station/fill_glass.dmi' - var/paintable = MATERIAL_PAINTABLE_MAIN|MATERIAL_PAINTABLE_STRIPE + var/paintable = AIRLOCK_PAINTABLE_MAIN|AIRLOCK_PAINTABLE_STRIPE var/door_color = "none" var/stripe_color = "none" var/symbol_color = "none" diff --git a/code/game/objects/structures/wall_frame.dm b/code/game/objects/structures/wall_frame.dm index dc4b09434d96b..933c2cf87df21 100644 --- a/code/game/objects/structures/wall_frame.dm +++ b/code/game/objects/structures/wall_frame.dm @@ -139,23 +139,24 @@ ClearOverlays() var/image/I - var/new_color = stripe_color ? stripe_color : material.icon_colour + var/new_color = (paint_color ? paint_color : material.icon_colour) + color = new_color for(var/i = 1 to 4) if(other_connections[i] != "0") I = image('icons/obj/structures/wall_frame.dmi', "frame_other[connections[i]]", dir = SHIFTL(1, i - 1)) else I = image('icons/obj/structures/wall_frame.dmi', "frame[connections[i]]", dir = SHIFTL(1, i - 1)) - I.color = new_color AddOverlays(I) -/obj/structure/wall_frame/proc/paint_wall_frame(new_paint_color) - paint_color = new_paint_color - update_icon() - -/obj/structure/wall_frame/proc/stripe_wall_frame(new_paint_color) - stripe_color = new_paint_color - update_icon() + if(stripe_color) + for(var/i = 1 to 4) + if(other_connections[i] != "0") + I = image('icons/obj/structures/wall_frame.dmi', "stripe_other[connections[i]]", dir = SHIFTL(1, i - 1)) + else + I = image('icons/obj/structures/wall_frame.dmi', "stripe[connections[i]]", dir = SHIFTL(1, i - 1)) + I.color = stripe_color + AddOverlays(I) /obj/structure/wall_frame/hull/Initialize() . = ..() @@ -170,7 +171,6 @@ if(spacefacing) var/bleach_factor = rand(10,50) paint_color = adjust_brightness(paint_color, bleach_factor) - stripe_color = adjust_brightness(stripe_color, bleach_factor) update_icon() /obj/structure/wall_frame/on_death() @@ -190,7 +190,6 @@ //Subtypes /obj/structure/wall_frame/standard paint_color = COLOR_WALL_GUNMETAL - stripe_color = COLOR_GUNMETAL /obj/structure/wall_frame/titanium material = MATERIAL_TITANIUM @@ -201,12 +200,9 @@ /obj/structure/wall_frame/hull paint_color = COLOR_SOL - stripe_color = COLOR_SOL /obj/structure/wall_frame/hull/vox paint_color = COLOR_GREEN_GRAY - stripe_color = COLOR_GREEN_GRAY /obj/structure/wall_frame/hull/verne paint_color = COLOR_GUNMETAL - stripe_color = COLOR_GUNMETAL diff --git a/code/game/turfs/simulated/wall_icon.dm b/code/game/turfs/simulated/wall_icon.dm index 023258ca4b656..c8e188b87c9fa 100644 --- a/code/game/turfs/simulated/wall_icon.dm +++ b/code/game/turfs/simulated/wall_icon.dm @@ -30,13 +30,6 @@ update_icon() calculate_damage_data() -/turf/simulated/wall/proc/paint_wall(new_paint_color) - paint_color = new_paint_color - update_icon() - -/turf/simulated/wall/proc/stripe_wall(new_paint_color) - stripe_color = new_paint_color - update_icon() /turf/simulated/wall/proc/set_material(material/newmaterial, material/newrmaterial) material = newmaterial @@ -67,13 +60,9 @@ I = image('icons/turf/wall_masks.dmi', "[material.wall_icon_base][wall_connections[i]]", dir = SHIFTL(1, i - 1)) I.color = base_color AddOverlays(I) - if(paint_color) - I = image('icons/turf/wall_masks.dmi', "[material.wall_icon_base]_paint[wall_connections[i]]", dir = SHIFTL(1, i-1)) - I.color = paint_color - AddOverlays(I) - if(stripe_color) - I = image('icons/turf/wall_masks.dmi', "[material.wall_icon_base]_stripe[wall_connections[i]]", dir = SHIFTL(1, i-1)) - I.color = stripe_color + if(other_connections[i] != "0") + I = image('icons/turf/wall_masks.dmi', "[material.wall_icon_base]_other[wall_connections[i]]", dir = SHIFTL(1, i - 1)) + I.color = base_color AddOverlays(I) if(reinf_material) @@ -93,16 +82,17 @@ I = image('icons/turf/wall_masks.dmi', material.wall_icon_reinf) I.color = reinf_color AddOverlays(I) - - if(material.wall_flags & MATERIAL_WALL_HAS_EDGES) - for(var/i = 1 to 4) - I = image('icons/turf/wall_masks.dmi', "[material.wall_icon_base]_other[other_connections[i]]", dir = SHIFTL(1, i-1)) - I.color = stripe_color ? stripe_color : base_color - AddOverlays(I) - var/image/texture = material.get_wall_texture() if(texture) AddOverlays(texture) + if(stripe_color) + for(var/i = 1 to 4) + if(other_connections[i] != "0") + I = image('icons/turf/wall_masks.dmi', "stripe_other[wall_connections[i]]", dir = SHIFTL(1, i - 1)) + else + I = image('icons/turf/wall_masks.dmi', "stripe[wall_connections[i]]", dir = SHIFTL(1, i - 1)) + I.color = stripe_color + AddOverlays(I) if(get_damage_value() != 0) var/overlay = round((get_damage_percentage() / 100) * length(damage_overlays)) + 1 @@ -127,50 +117,47 @@ var/list/wall_dirs = list() var/list/other_dirs = list() - for(var/stepdir in GLOB.alldirs) - var/turf/T = get_step(src, stepdir) - if(!T) - continue - if(istype(T, /turf/simulated/wall)) - switch(can_join_with(T)) - if(0) - continue - if(1) - wall_dirs += get_dir(src, T) - if(2) - wall_dirs += get_dir(src, T) - other_dirs += get_dir(src, T) - if(propagate) - var/turf/simulated/wall/W = T - W.update_connections() - W.update_icon() + for(var/turf/simulated/wall/W in orange(src, 1)) + switch(can_join_with(W)) + if(0) + continue + if(1) + wall_dirs += get_dir(src, W) + if(2) + wall_dirs += get_dir(src, W) + other_dirs += get_dir(src, W) + if(propagate) + W.update_connections() + W.update_icon() + + for(var/turf/T in orange(src, 1)) var/success = 0 - for(var/O in T) - for(var/b_type in GLOB.wall_blend_objects) + for(var/obj/O in T) + for(var/b_type in blend_objects) if(istype(O, b_type)) - success = TRUE - break - for(var/nb_type in GLOB.wall_noblend_objects) - if(istype(O, nb_type)) - success = FALSE + success = 1 + for(var/nb_type in noblend_objects) + if(istype(O, nb_type)) + success = 0 + if(success) break if(success) - wall_dirs += get_dir(src, T) - var/blendable = FALSE - for(var/fb_type in GLOB.wall_fullblend_objects) - if(istype(O, fb_type)) - blendable = TRUE - break - if(!blendable) - other_dirs += get_dir(src, T) break - wall_connections = dirs_to_corner_states(wall_dirs) - other_connections = dirs_to_corner_states(other_dirs) + + if(success) + wall_dirs += get_dir(src, T) + if(get_dir(src, T) in GLOB.cardinal) + other_dirs += get_dir(src, T) + + wall_connections = dirs_to_corner_states(wall_dirs) + other_connections = dirs_to_corner_states(other_dirs) /turf/simulated/wall/proc/can_join_with(turf/simulated/wall/W) - if(material && istype(W.material)) - if(material.wall_blend_icons[W.material.wall_icon_base]) - return 2 - if(material.wall_icon_base == W.material.wall_icon_base) + if(material && W.material && material.wall_icon_base == W.material.wall_icon_base) + if((reinf_material && W.reinf_material) || (!reinf_material && !W.reinf_material)) return 1 + return 2 + for(var/wb_type in blend_turfs) + if(istype(W, wb_type)) + return 2 return 0 diff --git a/code/game/turfs/simulated/wall_types.dm b/code/game/turfs/simulated/wall_types.dm index af025eeb39828..d1947c33ae25a 100644 --- a/code/game/turfs/simulated/wall_types.dm +++ b/code/game/turfs/simulated/wall_types.dm @@ -1,4 +1,9 @@ //Commonly used +/turf/simulated/wall/prepainted + paint_color = COLOR_GUNMETAL + +/turf/simulated/wall/r_wall/prepainted + paint_color = COLOR_GUNMETAL /turf/simulated/wall/r_wall icon_state = "r_generic" @@ -16,16 +21,12 @@ /turf/simulated/wall/prepainted paint_color = COLOR_WALL_GUNMETAL - stripe_color = COLOR_GUNMETAL - /turf/simulated/wall/r_wall/prepainted paint_color = COLOR_WALL_GUNMETAL - stripe_color = COLOR_GUNMETAL /turf/simulated/wall/r_wall/hull/Initialize() . = ..() paint_color = color - stripe_color = color color = null //color is just for mapping if(prob(40)) var/spacefacing = FALSE @@ -38,7 +39,6 @@ if(spacefacing) var/bleach_factor = rand(10,50) paint_color = adjust_brightness(paint_color, bleach_factor) - stripe_color = adjust_brightness(stripe_color, bleach_factor) update_icon() /turf/simulated/wall/titanium @@ -90,30 +90,35 @@ ..(newloc,MATERIAL_RUTILE) /turf/simulated/wall/wood + blend_turfs = list(/turf/simulated/wall/cult, /turf/simulated/wall) icon_state = "woodneric" /turf/simulated/wall/wood/New(newloc) ..(newloc,MATERIAL_WOOD) /turf/simulated/wall/mahogany + blend_turfs = list(/turf/simulated/wall/cult, /turf/simulated/wall) icon_state = "woodneric" /turf/simulated/wall/mahogany/New(newloc) ..(newloc,MATERIAL_MAHOGANY) /turf/simulated/wall/maple + blend_turfs = list(/turf/simulated/wall/cult, /turf/simulated/wall) icon_state = "woodneric" /turf/simulated/wall/maple/New(newloc) ..(newloc,MATERIAL_MAPLE) /turf/simulated/wall/ebony + blend_turfs = list(/turf/simulated/wall/cult, /turf/simulated/wall) icon_state = "woodneric" /turf/simulated/wall/ebony/New(newloc) ..(newloc,MATERIAL_EBONY) /turf/simulated/wall/walnut + blend_turfs = list(/turf/simulated/wall/cult, /turf/simulated/wall) icon_state = "woodneric" /turf/simulated/wall/walnut/New(newloc) @@ -150,6 +155,7 @@ /turf/simulated/wall/alium icon_state = "jaggy" floor_type = /turf/simulated/floor/fixed/alium + blend_objects = newlist() /turf/simulated/wall/alium/New(newloc) ..(newloc,MATERIAL_ALIENALLOY) @@ -157,6 +163,7 @@ //Cult wall /turf/simulated/wall/cult icon_state = "cult" + blend_turfs = list(/turf/simulated/wall) /turf/simulated/wall/cult/New(newloc, reinforce = 0) ..(newloc, MATERIAL_CULT, reinforce ? MATERIAL_REINFORCED_CULT : null) diff --git a/code/game/turfs/simulated/walls.dm b/code/game/turfs/simulated/walls.dm index 4a0f40dc59f2d..c9adce1661d20 100644 --- a/code/game/turfs/simulated/walls.dm +++ b/code/game/turfs/simulated/walls.dm @@ -26,6 +26,9 @@ var/paint_color var/stripe_color var/static/list/wall_stripe_cache = list() + var/list/blend_turfs = list(/turf/simulated/wall/cult, /turf/simulated/wall/wood, /turf/simulated/wall/walnut, /turf/simulated/wall/maple, /turf/simulated/wall/mahogany, /turf/simulated/wall/ebony) + var/list/blend_objects = list(/obj/machinery/door, /obj/structure/wall_frame, /obj/structure/grille, /obj/structure/window/reinforced/full, /obj/structure/window/reinforced/polarized/full, /obj/structure/window/shuttle, ,/obj/structure/window/boron_basic/full, /obj/structure/window/boron_reinforced/full) // Objects which to blend with + var/list/noblend_objects = list(/obj/machinery/door/window) //Objects to avoid blending with (such as children of listed blend objects.) /turf/simulated/wall/New(newloc, materialtype, rmaterialtype) ..(newloc) diff --git a/code/modules/materials/_materials.dm b/code/modules/materials/_materials.dm index 09f4eaf54aba3..849bfcc203371 100644 --- a/code/modules/materials/_materials.dm +++ b/code/modules/materials/_materials.dm @@ -16,7 +16,6 @@ stone metal solid - wood cult DOORS stone @@ -91,10 +90,6 @@ var/wall_icon_base = "metal" /// String. Icon overlay used for reinforced walls. var/wall_icon_reinf = "reinf_metal" - /// Bitflag. What icon layers to look for - var/wall_flags = MATERIAL_PAINTABLE_MAIN - /// Which wall icon types walls of this material type will consider blending with. Assoc list (icon string = TRUE/FALSE) - var/list/wall_blend_icons = list() /// String. Unpowered door base icon state. See header. var/door_icon_base = "metal" /// String. Table base icon state. diff --git a/code/modules/materials/definitions/materials_metal.dm b/code/modules/materials/definitions/materials_metal.dm index e7e31da62927e..f7da50c3954e5 100644 --- a/code/modules/materials/definitions/materials_metal.dm +++ b/code/modules/materials/definitions/materials_metal.dm @@ -7,12 +7,6 @@ radioactivity = 12 sheet_icon_base = "puck" wall_icon_base = "stone" - wall_flags = EMPTY_BITFIELD - wall_blend_icons = list( - "solid" = TRUE, - "wood" = TRUE, - "metal" = TRUE - ) door_icon_base = "stone" table_icon_base = "stone" wall_icon_reinf = "reinf_stone" @@ -127,11 +121,6 @@ brute_armor = 7 wall_icon_base = "solid" wall_icon_reinf = "reinf_over" - wall_flags = MATERIAL_PAINTABLE_MAIN|MATERIAL_PAINTABLE_STRIPE|MATERIAL_WALL_HAS_EDGES - wall_blend_icons = list( - "wood" = TRUE, - "stone" = TRUE - ) icon_colour = COLOR_STEEL hitsound = 'sound/weapons/smash.ogg' chem_products = list( @@ -170,11 +159,6 @@ sheet_icon_base = "sheet-sheen" wall_icon_base = "solid" wall_icon_reinf = "reinf_over" - wall_flags = MATERIAL_PAINTABLE_MAIN|MATERIAL_PAINTABLE_STRIPE|MATERIAL_WALL_HAS_EDGES - wall_blend_icons = list( - "wood" = TRUE, - "stone" = TRUE - ) icon_colour = "#cccdcc" hitsound = 'sound/weapons/smash.ogg' sale_price = 1 @@ -200,11 +184,6 @@ sheet_icon_base = "sheet-reinf" wall_icon_base = "solid" wall_icon_reinf = "reinf_over" - wall_flags = MATERIAL_PAINTABLE_MAIN|MATERIAL_PAINTABLE_STRIPE|MATERIAL_WALL_HAS_EDGES - wall_blend_icons = list( - "wood" = TRUE, - "stone" = TRUE - ) icon_colour = "#a8a9b2" explosion_resistance = 7.5 brute_armor = 8 @@ -230,11 +209,6 @@ weight = 18 stack_type = /obj/item/stack/material/titanium wall_icon_base = "metal" - wall_flags = MATERIAL_PAINTABLE_MAIN - wall_blend_icons = list( - "wood" = TRUE, - "stone" = TRUE - ) door_icon_base = "metal" icon_colour = "#d1e6e3" wall_icon_reinf = "reinf_metal" @@ -251,11 +225,6 @@ sheet_icon_base = "sheet-reinf" wall_icon_base = "solid" wall_icon_reinf = "reinf_over" - wall_flags = MATERIAL_PAINTABLE_MAIN|MATERIAL_PAINTABLE_STRIPE|MATERIAL_WALL_HAS_EDGES - wall_blend_icons = list( - "wood" = TRUE, - "stone" = TRUE - ) icon_colour = "#9bc6f2" brute_armor = 4 burn_armor = 20 @@ -417,11 +386,6 @@ /material/aliumium/New() wall_icon_base = "metal" - wall_flags = MATERIAL_PAINTABLE_MAIN - wall_blend_icons = list( - "wood" = TRUE, - "stone" = TRUE - ) icon_colour = rgb(rand(10,150),rand(10,150),rand(10,150)) explosion_resistance = rand(25,40) brute_armor = rand(10,20) diff --git a/code/modules/materials/definitions/materials_mineral.dm b/code/modules/materials/definitions/materials_mineral.dm index 9cdf27d236e9f..a2e7fad21e3b2 100644 --- a/code/modules/materials/definitions/materials_mineral.dm +++ b/code/modules/materials/definitions/materials_mineral.dm @@ -18,13 +18,6 @@ sheet_singular_name = "brick" sheet_plural_name = "bricks" wall_icon_base = "stone" - wall_flags = EMPTY_BITFIELD - wall_blend_icons = list( - "solid" = TRUE, - "wood" = TRUE, - "metal" = TRUE, - "brick" = TRUE - ) table_icon_base = "stone" wall_icon_reinf = "reinf_stone" sale_price = 2 @@ -90,12 +83,6 @@ sheet_singular_name = "brick" sheet_plural_name = "bricks" wall_icon_base = "stone" - wall_flags = EMPTY_BITFIELD - wall_blend_icons = list( - "solid" = TRUE, - "wood" = TRUE, - "metal" = TRUE - ) table_icon_base = "stone" wall_icon_reinf = "reinf_stone" sale_price = 2 @@ -117,12 +104,6 @@ sheet_singular_name = "brick" sheet_plural_name = "bricks" wall_icon_base = "stone" - wall_flags = EMPTY_BITFIELD - wall_blend_icons = list( - "solid" = TRUE, - "wood" = TRUE, - "metal" = TRUE - ) table_icon_base = "stone" wall_icon_reinf = "reinf_stone" ore_compresses_to = MATERIAL_PYRITE @@ -145,12 +126,6 @@ sheet_singular_name = "brick" sheet_plural_name = "bricks" wall_icon_base = "stone" - wall_flags = EMPTY_BITFIELD - wall_blend_icons = list( - "solid" = TRUE, - "wood" = TRUE, - "metal" = TRUE - ) table_icon_base = "stone" wall_icon_reinf = "reinf_stone" sale_price = 2 @@ -172,12 +147,6 @@ sheet_singular_name = "brick" sheet_plural_name = "bricks" wall_icon_base = "stone" - wall_flags = EMPTY_BITFIELD - wall_blend_icons = list( - "solid" = TRUE, - "wood" = TRUE, - "metal" = TRUE - ) table_icon_base = "stone" wall_icon_reinf = "reinf_stone" sale_price = 2 @@ -199,12 +168,6 @@ sheet_singular_name = "brick" sheet_plural_name = "bricks" wall_icon_base = "stone" - wall_flags = EMPTY_BITFIELD - wall_blend_icons = list( - "solid" = TRUE, - "wood" = TRUE, - "metal" = TRUE - ) table_icon_base = "stone" wall_icon_reinf = "reinf_stone" sale_price = 2 @@ -226,12 +189,6 @@ sheet_singular_name = "brick" sheet_plural_name = "bricks" wall_icon_base = "stone" - wall_flags = EMPTY_BITFIELD - wall_blend_icons = list( - "solid" = TRUE, - "wood" = TRUE, - "metal" = TRUE - ) table_icon_base = "stone" wall_icon_reinf = "reinf_stone" sale_price = 2 @@ -253,12 +210,6 @@ sheet_singular_name = "brick" sheet_plural_name = "bricks" wall_icon_base = "stone" - wall_flags = EMPTY_BITFIELD - wall_blend_icons = list( - "solid" = TRUE, - "wood" = TRUE, - "metal" = TRUE - ) table_icon_base = "stone" wall_icon_reinf = "reinf_stone" sale_price = 2 @@ -279,12 +230,6 @@ sheet_singular_name = "brick" sheet_plural_name = "bricks" wall_icon_base = "stone" - wall_flags = EMPTY_BITFIELD - wall_blend_icons = list( - "solid" = TRUE, - "wood" = TRUE, - "metal" = TRUE - ) table_icon_base = "stone" wall_icon_reinf = "reinf_stone" ore_smelts_to = MATERIAL_ALUMINIUM @@ -308,12 +253,6 @@ stack_type = /obj/item/stack/material/phoron ignition_point = PHORON_MINIMUM_BURN_TEMPERATURE wall_icon_base = "stone" - wall_flags = EMPTY_BITFIELD - wall_blend_icons = list( - "solid" = TRUE, - "wood" = TRUE, - "metal" = TRUE - ) table_icon_base = "stone" icon_colour = "#e37108" shard_type = SHARD_SHARD diff --git a/code/modules/materials/definitions/materials_organic.dm b/code/modules/materials/definitions/materials_organic.dm index 0566a34ca24df..2a5b9e10bb590 100644 --- a/code/modules/materials/definitions/materials_organic.dm +++ b/code/modules/materials/definitions/materials_organic.dm @@ -6,10 +6,6 @@ wall_icon_base = "solid" door_icon_base = "plastic" wall_icon_reinf = "reinf_over" - wall_blend_icons = list( - "wood" = TRUE, - "stone" = TRUE - ) icon_colour = COLOR_WHITE hardness = MATERIAL_FLEXIBLE weight = 5 @@ -40,11 +36,6 @@ sheet_icon_base = "sheet-card" wall_icon_base = "solid" wall_icon_reinf = "reinf_over" - wall_flags = MATERIAL_PAINTABLE_MAIN|MATERIAL_PAINTABLE_STRIPE|MATERIAL_WALL_HAS_EDGES - wall_blend_icons = list( - "wood" = TRUE, - "stone" = TRUE - ) icon_colour = "#aaaaaa" hardness = MATERIAL_SOFT brute_armor = 1 @@ -323,14 +314,6 @@ display_name = "organic material" sheet_icon_base = "skin" wall_icon_base = "cult" - wall_flags = EMPTY_BITFIELD - wall_blend_icons = list( - "solid" = TRUE, - "wood" = TRUE, - "metal" = TRUE, - "stone" = TRUE - ) - wall_flags = EMPTY_BITFIELD door_icon_base = "cult" table_icon_base = "cult" wall_icon_reinf = "reinf_cult" diff --git a/code/modules/materials/definitions/materials_other.dm b/code/modules/materials/definitions/materials_other.dm index 4c9a3f138d7f2..f6a69a9e19679 100644 --- a/code/modules/materials/definitions/materials_other.dm +++ b/code/modules/materials/definitions/materials_other.dm @@ -12,13 +12,6 @@ name = MATERIAL_CULT display_name = "disturbing stone" wall_icon_base = "cult" - wall_flags = EMPTY_BITFIELD - wall_blend_icons = list( - "solid" = TRUE, - "wood" = TRUE, - "metal" = TRUE, - "stone" = TRUE - ) icon_colour = "#402821" wall_icon_reinf = "reinf_cult" shard_type = SHARD_STONE_PIECE diff --git a/code/modules/materials/definitions/materials_stone.dm b/code/modules/materials/definitions/materials_stone.dm index f68441c16a832..7ece6965b682e 100644 --- a/code/modules/materials/definitions/materials_stone.dm +++ b/code/modules/materials/definitions/materials_stone.dm @@ -40,12 +40,6 @@ lore_text = "A clastic sedimentary rock. The cost of boosting it to orbit is almost universally much higher than the actual value of the material." stack_type = /obj/item/stack/material/sandstone wall_icon_base = "stone" - wall_flags = EMPTY_BITFIELD - wall_blend_icons = list( - "solid" = TRUE, - "wood" = TRUE, - "metal" = TRUE - ) table_icon_base = "stone" wall_icon_reinf = "reinf_stone" icon_colour = "#d9c179" diff --git a/code/modules/materials/definitions/materials_wood.dm b/code/modules/materials/definitions/materials_wood.dm index 00748eb3dc6f8..75e87ac0e9f06 100644 --- a/code/modules/materials/definitions/materials_wood.dm +++ b/code/modules/materials/definitions/materials_wood.dm @@ -7,12 +7,6 @@ integrity = 75 sheet_icon_base = "sheet-wood" wall_icon_base = "wood" - wall_flags = MATERIAL_PAINTABLE_MAIN|MATERIAL_PAINTABLE_STRIPE|MATERIAL_WALL_HAS_EDGES - wall_blend_icons = list( - "solid" = TRUE, - "stone" = TRUE, - "metal" = TRUE - ) table_icon_base = "wood" explosion_resistance = 2 shard_type = SHARD_SPLINTER diff --git a/code/modules/turbolift/turbolift_door.dm b/code/modules/turbolift/turbolift_door.dm index c19b20dde6512..20b38c710bb99 100644 --- a/code/modules/turbolift/turbolift_door.dm +++ b/code/modules/turbolift/turbolift_door.dm @@ -12,7 +12,7 @@ deny_file = 'icons/obj/doors/elevator/lights_deny.dmi' lights_file = 'icons/obj/doors/elevator/lights_green.dmi' - paintable = MATERIAL_PAINTABLE_WINDOW + paintable = AIRLOCK_PAINTABLE_WINDOW var/datum/turbolift/lift var/datum/turbolift_floor/floor diff --git a/icons/obj/structures/wall_frame.dmi b/icons/obj/structures/wall_frame.dmi index dbd03e631b273..74df196d0b2eb 100644 Binary files a/icons/obj/structures/wall_frame.dmi and b/icons/obj/structures/wall_frame.dmi differ diff --git a/icons/screen/radial.dmi b/icons/screen/radial.dmi index c94debf433ef6..e4c3d52cde6bf 100644 Binary files a/icons/screen/radial.dmi and b/icons/screen/radial.dmi differ diff --git a/icons/turf/wall_masks.dmi b/icons/turf/wall_masks.dmi index e0cc514c37f35..f60de15fd869c 100644 Binary files a/icons/turf/wall_masks.dmi and b/icons/turf/wall_masks.dmi differ