diff --git a/code/__defines/doors.dm b/code/__defines/doors.dm index 2060e68bf7a66..f7a2a4c5c0362 100644 --- a/code/__defines/doors.dm +++ b/code/__defines/doors.dm @@ -5,14 +5,3 @@ #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 7f7d475c40098..1d6cae0f1116c 100644 --- a/code/__defines/materials.dm +++ b/code/__defines/materials.dm @@ -137,3 +137,10 @@ #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 84f043c2886b6..8f9796681cef4 100644 --- a/code/_global_vars/lists/objects.dm +++ b/code/_global_vars/lists/objects.dm @@ -20,3 +20,24 @@ 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 f342acac9d865..a625d28d238c0 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 `AIRLOCK_PAINTABLE_*`). Determines what parts of the airlock can be recolored with paint. - var/paintable = AIRLOCK_PAINTABLE_MAIN | AIRLOCK_PAINTABLE_STRIPE + /// Bitflag (Any of `MATERIAL_PAINTABLE*`). Determines what parts of the airlock can be recolored with paint. + var/paintable = MATERIAL_PAINTABLE_MAIN | MATERIAL_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 = AIRLOCK_PAINTABLE_MAIN + paintable = MATERIAL_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 = AIRLOCK_PAINTABLE_STRIPE + paintable = MATERIAL_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 |= AIRLOCK_PAINTABLE_WINDOW + paintable |= MATERIAL_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 a798296b2d032..9feaa101d9c08 100644 --- a/code/game/objects/effects/misc.dm +++ b/code/game/objects/effects/misc.dm @@ -19,11 +19,15 @@ /obj/paint/LateInitialize(mapload) var/turf/simulated/wall/W = get_turf(src) if(istype(W)) - W.paint_color = color + 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.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 2acb9213db83e..a08cabe227d76 100644 --- a/code/game/objects/items/devices/paint_sprayer.dm +++ b/code/game/objects/items/devices/paint_sprayer.dm @@ -1,6 +1,6 @@ -#define AIRLOCK_REGION_PAINT "Paint" -#define AIRLOCK_REGION_STRIPE "Stripe" -#define AIRLOCK_REGION_WINDOW "Window" +#define PAINT_REGION_PAINT "Paint" +#define PAINT_REGION_STRIPE "Stripe" +#define PAINT_REGION_WINDOW "Window" #define PLACEMENT_MODE_QUARTERS 1 #define PLACEMENT_MODE_TRIANGLES 2 @@ -19,6 +19,7 @@ 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( @@ -109,6 +110,7 @@ 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)) @@ -121,6 +123,9 @@ 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) @@ -178,6 +183,11 @@ 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)) @@ -185,15 +195,19 @@ 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 (A.atom_flags & ATOM_FLAG_CAN_BE_PAINTED) - A.set_color(paint_color) - . = TRUE + if (istype(A, /turf/simulated/wall)) + . = paint_wall(A, user) 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 . @@ -207,6 +221,14 @@ 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) @@ -308,11 +330,11 @@ if (!D.paintable) return FALSE switch (select_airlock_region(D, user, "Where do you wish to pick the color from?")) - if (AIRLOCK_REGION_PAINT) + if (PAINT_REGION_PAINT) return D.door_color - if (AIRLOCK_REGION_STRIPE) + if (PAINT_REGION_STRIPE) return D.stripe_color - if (AIRLOCK_REGION_WINDOW) + if (PAINT_REGION_WINDOW) return D.window_color else return FALSE @@ -323,30 +345,80 @@ return FALSE switch (select_airlock_region(D, user, "What do you wish to paint?")) - if (AIRLOCK_REGION_PAINT) + if (PAINT_REGION_PAINT) D.paint_airlock(paint_color) - if (AIRLOCK_REGION_STRIPE) + if (PAINT_REGION_STRIPE) D.stripe_airlock(paint_color) - if (AIRLOCK_REGION_WINDOW) + if (PAINT_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/D, mob/user, input_text) +/obj/item/device/paint_sprayer/proc/select_airlock_region(obj/machinery/door/airlock/door, mob/user, input_text) var/choice var/list/choices = list() - 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 + 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 choice = input(user, input_text) as null|anything in sortList(choices) - if (user.incapacitated() || !D || !user.Adjacent(D)) + if (!user.use_sanity_check(door, src)) 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 @@ -382,6 +454,14 @@ 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." @@ -409,9 +489,9 @@ return user.ClickOn(A, params) -#undef AIRLOCK_REGION_PAINT -#undef AIRLOCK_REGION_STRIPE -#undef AIRLOCK_REGION_WINDOW +#undef PAINT_REGION_PAINT +#undef PAINT_REGION_STRIPE +#undef PAINT_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 421c4481e3adb..16cf981efa826 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 = AIRLOCK_PAINTABLE_MAIN|AIRLOCK_PAINTABLE_STRIPE + var/paintable = MATERIAL_PAINTABLE_MAIN|MATERIAL_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 933c2cf87df21..dc4b09434d96b 100644 --- a/code/game/objects/structures/wall_frame.dm +++ b/code/game/objects/structures/wall_frame.dm @@ -139,24 +139,23 @@ ClearOverlays() var/image/I - var/new_color = (paint_color ? paint_color : material.icon_colour) - color = new_color + var/new_color = stripe_color ? stripe_color : material.icon_colour 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) - 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/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() /obj/structure/wall_frame/hull/Initialize() . = ..() @@ -171,6 +170,7 @@ 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,6 +190,7 @@ //Subtypes /obj/structure/wall_frame/standard paint_color = COLOR_WALL_GUNMETAL + stripe_color = COLOR_GUNMETAL /obj/structure/wall_frame/titanium material = MATERIAL_TITANIUM @@ -200,9 +201,12 @@ /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 c8e188b87c9fa..023258ca4b656 100644 --- a/code/game/turfs/simulated/wall_icon.dm +++ b/code/game/turfs/simulated/wall_icon.dm @@ -30,6 +30,13 @@ 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 @@ -60,9 +67,13 @@ 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(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 + 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 AddOverlays(I) if(reinf_material) @@ -82,17 +93,16 @@ 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 @@ -117,47 +127,50 @@ var/list/wall_dirs = list() var/list/other_dirs = list() - 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)) + 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() var/success = 0 - for(var/obj/O in T) - for(var/b_type in blend_objects) + for(var/O in T) + for(var/b_type in GLOB.wall_blend_objects) if(istype(O, b_type)) - success = 1 - for(var/nb_type in noblend_objects) - if(istype(O, nb_type)) - success = 0 - if(success) + success = TRUE + break + for(var/nb_type in GLOB.wall_noblend_objects) + if(istype(O, nb_type)) + success = FALSE 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 - - 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) + 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 && 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)) + 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) + return 1 return 0 diff --git a/code/game/turfs/simulated/wall_types.dm b/code/game/turfs/simulated/wall_types.dm index d1947c33ae25a..af025eeb39828 100644 --- a/code/game/turfs/simulated/wall_types.dm +++ b/code/game/turfs/simulated/wall_types.dm @@ -1,9 +1,4 @@ //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" @@ -21,12 +16,16 @@ /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 @@ -39,6 +38,7 @@ 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,35 +90,30 @@ ..(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) @@ -155,7 +150,6 @@ /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) @@ -163,7 +157,6 @@ //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 c9adce1661d20..4a0f40dc59f2d 100644 --- a/code/game/turfs/simulated/walls.dm +++ b/code/game/turfs/simulated/walls.dm @@ -26,9 +26,6 @@ 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 849bfcc203371..09f4eaf54aba3 100644 --- a/code/modules/materials/_materials.dm +++ b/code/modules/materials/_materials.dm @@ -16,6 +16,7 @@ stone metal solid + wood cult DOORS stone @@ -90,6 +91,10 @@ 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 f7da50c3954e5..e7e31da62927e 100644 --- a/code/modules/materials/definitions/materials_metal.dm +++ b/code/modules/materials/definitions/materials_metal.dm @@ -7,6 +7,12 @@ 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" @@ -121,6 +127,11 @@ 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( @@ -159,6 +170,11 @@ 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 @@ -184,6 +200,11 @@ 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 @@ -209,6 +230,11 @@ 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" @@ -225,6 +251,11 @@ 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 @@ -386,6 +417,11 @@ /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 a2e7fad21e3b2..9cdf27d236e9f 100644 --- a/code/modules/materials/definitions/materials_mineral.dm +++ b/code/modules/materials/definitions/materials_mineral.dm @@ -18,6 +18,13 @@ 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 @@ -83,6 +90,12 @@ 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 @@ -104,6 +117,12 @@ 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 @@ -126,6 +145,12 @@ 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 @@ -147,6 +172,12 @@ 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 @@ -168,6 +199,12 @@ 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 @@ -189,6 +226,12 @@ 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 @@ -210,6 +253,12 @@ 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 @@ -230,6 +279,12 @@ 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 @@ -253,6 +308,12 @@ 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 2a5b9e10bb590..0566a34ca24df 100644 --- a/code/modules/materials/definitions/materials_organic.dm +++ b/code/modules/materials/definitions/materials_organic.dm @@ -6,6 +6,10 @@ 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 @@ -36,6 +40,11 @@ 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 @@ -314,6 +323,14 @@ 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 f6a69a9e19679..4c9a3f138d7f2 100644 --- a/code/modules/materials/definitions/materials_other.dm +++ b/code/modules/materials/definitions/materials_other.dm @@ -12,6 +12,13 @@ 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 7ece6965b682e..f68441c16a832 100644 --- a/code/modules/materials/definitions/materials_stone.dm +++ b/code/modules/materials/definitions/materials_stone.dm @@ -40,6 +40,12 @@ 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 75e87ac0e9f06..00748eb3dc6f8 100644 --- a/code/modules/materials/definitions/materials_wood.dm +++ b/code/modules/materials/definitions/materials_wood.dm @@ -7,6 +7,12 @@ 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 20b38c710bb99..c19b20dde6512 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 = AIRLOCK_PAINTABLE_WINDOW + paintable = MATERIAL_PAINTABLE_WINDOW var/datum/turbolift/lift var/datum/turbolift_floor/floor diff --git a/html/changelogs/Cakey-prettywalls.yml b/html/changelogs/Cakey-prettywalls.yml new file mode 100644 index 0000000000000..d2e354bb5720f --- /dev/null +++ b/html/changelogs/Cakey-prettywalls.yml @@ -0,0 +1,39 @@ +################################ +# Example Changelog File +# +# Note: This file, and files beginning with ".", and files that don't end in ".yml" will not be read. If you change this file, you will look really dumb. +# +# Your changelog will be merged with a master changelog. (New stuff added only, and only on the date entry for the day it was merged.) +# When it is, any changes listed below will disappear. +# +# Valid Prefixes: +# bugfix +# wip (For works in progress) +# tweak +# soundadd +# sounddel +# rscadd (general adding of nice things) +# rscdel (general deleting of nice things) +# imageadd +# imagedel +# maptweak +# spellcheck (typo fixes) +# experiment +# admin +################################# + +# Your name. +author: Cakey + +# Optional: Remove this file after generating master changelog. Useful for PR changelogs that won't get used again. +delete-after: True + +# Any changes you've made. See valid prefix list above. +# INDENT WITH TWO SPACES. NOT TABS. SPACES. +# SCREW THIS UP AND IT WON'T WORK. +# Also, all entries are changed into a single [] after a master changelog generation. Just remove the brackets when you add new entries. +# Please surround your changes in double quotes ("), as certain characters otherwise screws up compiling. The quotes will not show up in the changelog. +changes: + - rscadd: "Added wall paint layering system. You can now paint walls in two-tones using main and stripe layering via the paint tool." + - tweak: "Torch walls now have a two-tone of gunmetal and a slightly lighter gunmetal." + - imageadd: "Updated wall and wall frame sprites to be better contrasted." diff --git a/icons/obj/structures/wall_frame.dmi b/icons/obj/structures/wall_frame.dmi index 74df196d0b2eb..dbd03e631b273 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 e4c3d52cde6bf..c94debf433ef6 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 f60de15fd869c..e0cc514c37f35 100644 Binary files a/icons/turf/wall_masks.dmi and b/icons/turf/wall_masks.dmi differ