Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

wall trim and wall paints #281

Merged
merged 10 commits into from
Aug 21, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion _maps/map_files/tramstation/tramstation.dmm
Original file line number Diff line number Diff line change
Expand Up @@ -64931,7 +64931,6 @@
},
/obj/effect/decal/cleanable/dirt,
/obj/effect/mapping_helpers/airlock/access/all/supply/general,
/obj/structure/cable,
/obj/machinery/atmospherics/pipe/smart/manifold4w/scrubbers/hidden/layer2,
/obj/machinery/atmospherics/pipe/smart/manifold4w/supply/hidden/layer4,
/turf/open/floor/catwalk_floor,
Expand Down
1 change: 1 addition & 0 deletions code/__DEFINES/~monkestation/smoothing.dm
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
// wall don't need adapter with another wall
#define SMOOTH_ADAPTERS_WALLS_FOR_WALLS list( \
/obj/machinery/door/airlock = "wall", \
/turf/closed/wall = "wall", \
)

#define SMOOTH_ADAPTERS_ICON 'monkestation/icons/obj/structures/window/adapters.dmi'
Expand Down
1 change: 1 addition & 0 deletions code/__HELPERS/icon_smoothing.dm
Original file line number Diff line number Diff line change
Expand Up @@ -529,6 +529,7 @@ DEFINE_BITFIELD(smoothing_junction, list(
smoothing_flags = SMOOTH_CORNERS|SMOOTH_DIAGONAL_CORNERS|SMOOTH_BORDER
smoothing_groups = null
canSmoothWith = null
wall_trim = null //monkestation edit

#undef NORTH_JUNCTION
#undef SOUTH_JUNCTION
Expand Down
23 changes: 20 additions & 3 deletions code/__HELPERS/~monkestation-helpers/icon_smoothing.dm
Original file line number Diff line number Diff line change
Expand Up @@ -19,16 +19,33 @@
var/skip_content_loop = FALSE
for(var/type in smooth_adapters)
if(istype(T, type))
overlays_adapters += image("icon" = SMOOTH_ADAPTERS_ICON, "icon_state" = smooth_adapters[type], dir = get_dir(src, T))
skip_content_loop = TRUE
if(iswallturf(T) && iswallturf(src))
var/turf/closed/wall/wall_atom = src
var/turf/closed/wall/turf_atom = T
if(turf_atom.trim_color != wall_atom.trim_color)
var/image/adapater = image("icon" = SMOOTH_ADAPTERS_ICON, "icon_state" = smooth_adapters[type], "layer" = src.layer + 0.03, dir = get_dir(src, T))
adapater.color = wall_atom.trim_color
overlays_adapters += adapater

else
var/image/adapater = image("icon" = SMOOTH_ADAPTERS_ICON, "icon_state" = smooth_adapters[type], "layer" = src.layer + 0.03, dir = get_dir(src, T))
if(iswallturf(src))
var/turf/closed/wall/wall_atom = src
adapater.color = wall_atom.trim_color
overlays_adapters += adapater
skip_content_loop = TRUE

if(skip_content_loop) // remove it in case if we need more that one adapter per dir
continue

for(var/atom/A in T)
for(var/type in smooth_adapters)
if(istype(A, type))
overlays_adapters += image("icon" = SMOOTH_ADAPTERS_ICON, "icon_state" = smooth_adapters[type], dir = get_dir(src, A))
var/image/adapater = image("icon" = SMOOTH_ADAPTERS_ICON, "icon_state" = smooth_adapters[type], "layer" = src.layer + 0.03, dir = get_dir(src, A))
if(iswallturf(src))
var/turf/closed/wall/wall_atom = src
adapater.color = wall_atom.trim_color
overlays_adapters += adapater
break

if(length(overlays_adapters))
Expand Down
1 change: 1 addition & 0 deletions code/game/area/areas/ruins/icemoon.dm
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
base_icon_state = "block"
smoothing_flags = NONE
canSmoothWith = null
wall_trim = null //monkestation edit

/area/ruin/powered/mailroom
name = "\improper Abandoned Post Office"
Expand Down
1 change: 1 addition & 0 deletions code/game/turfs/closed/wall/material_walls.dm
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
canSmoothWith = SMOOTH_GROUP_MATERIAL_WALLS
rcd_memory = null
material_flags = MATERIAL_EFFECTS | MATERIAL_ADD_PREFIX | MATERIAL_COLOR | MATERIAL_AFFECT_STATISTICS
wall_trim = null //monkestation edit

/turf/closed/wall/material/break_wall()
for(var/i in custom_materials)
Expand Down
1 change: 1 addition & 0 deletions code/game/turfs/closed/wall/mineral_walls.dm
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
canSmoothWith = null
rcd_memory = null
material_flags = MATERIAL_EFFECTS
wall_trim = null //monkestation edit

/turf/closed/wall/mineral/gold
name = "gold wall"
Expand Down
6 changes: 6 additions & 0 deletions code/game/turfs/closed/wall/misc_walls.dm
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@
canSmoothWith = null
smoothing_groups = null
rcd_memory = null
wall_trim = null //monkestation edit

/turf/closed/wall/vault/rock
name = "rocky wall"
Expand Down Expand Up @@ -76,11 +77,13 @@
hardness = 35
slicing_duration = 150 //welding through the ice+metal
bullet_sizzle = TRUE
wall_trim = null //monkestation edit

/turf/closed/wall/rust
//SDMM supports colors, this is simply for easier mapping
//and should be removed on initialize
color = COLOR_ORANGE_BROWN
wall_trim = null //monkestation edit

/turf/closed/wall/rust/Initialize(mapload)
. = ..()
Expand All @@ -91,6 +94,7 @@
//SDMM supports colors, this is simply for easier mapping
//and should be removed on initialize
color = COLOR_ORANGE_BROWN
wall_trim = null //monkestation edit

/turf/closed/wall/r_wall/rust/Initialize(mapload)
. = ..()
Expand Down Expand Up @@ -120,6 +124,7 @@
hardness = 50
girder_type = null
decon_type = /turf/closed/mineral/asteroid
wall_trim = null //monkestation edit

/turf/closed/wall/rock/porous
name = "reinforced porous rock"
Expand All @@ -135,6 +140,7 @@
smoothing_flags = NONE
canSmoothWith = null
smoothing_groups = null
wall_trim = null //monkestation edit

/turf/closed/wall/material/meat
name = "living wall"
Expand Down
4 changes: 4 additions & 0 deletions code/game/turfs/closed/walls.dm
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,10 @@
fixed_underlay = string_assoc_list(fixed_underlay)
underlays += underlay_appearance

//monkestation edit start
if(SSstation_coloring.wall_trims)
trim_color = SSstation_coloring.get_default_color()

/turf/closed/wall/atom_destruction(damage_flag)
. = ..()
dismantle_wall(TRUE, FALSE)
Expand Down
2 changes: 2 additions & 0 deletions code/modules/unit_tests/orderable_items.dm
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,6 @@
all_paths += item_path

if (item_instance.desc != initial_desc)
if(istype(item_instance, /obj/item/food/grown/banana))
continue
TEST_FAIL("[orderable_item] has an item ([item_path]) that has a dynamic description. [item_instance.desc] (dynamic description) != [initial_desc] (initial description)")
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
base_icon_state = "window_sill"
icon_state = "window_sill-0"
layer = ABOVE_OBJ_LAYER - 0.02
canSmoothWith = SMOOTH_GROUP_WINDOW_SILL + SMOOTH_GROUP_WALLS
canSmoothWith = SMOOTH_GROUP_WINDOW_SILL + SMOOTH_GROUP_AIRLOCK + SMOOTH_GROUP_WALLS
smoothing_flags = SMOOTH_BITMASK | SMOOTH_OBJ
smoothing_groups = SMOOTH_GROUP_WINDOW_SILL
smooth_adapters = SMOOTH_ADAPTERS_WALLS
Expand Down
10 changes: 5 additions & 5 deletions monkestation/code/modules/aesthetics/objects/windows.dm
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,12 @@

/obj/structure/window/fulltile
icon = 'monkestation/icons/obj/structures/window/window.dmi'
canSmoothWith = SMOOTH_GROUP_WINDOW_FULLTILE + SMOOTH_GROUP_WALLS
canSmoothWith = SMOOTH_GROUP_AIRLOCK + SMOOTH_GROUP_WINDOW_FULLTILE + SMOOTH_GROUP_WALLS
smooth_adapters = SMOOTH_ADAPTERS_WALLS

/obj/structure/window/reinforced/plasma/fulltile
icon = 'monkestation/icons/obj/structures/window/reinforced_window.dmi'
canSmoothWith = SMOOTH_GROUP_WINDOW_FULLTILE + SMOOTH_GROUP_WALLS
canSmoothWith = SMOOTH_GROUP_AIRLOCK + SMOOTH_GROUP_WINDOW_FULLTILE + SMOOTH_GROUP_WALLS
base_icon_state = "reinforced_window"
icon_state = "reinforced_window-0"
glass_color_blend_to_color = "#8000ff"
Expand All @@ -29,14 +29,14 @@

/obj/structure/window/reinforced/fulltile
icon = 'monkestation/icons/obj/structures/window/reinforced_window.dmi'
canSmoothWith = SMOOTH_GROUP_WINDOW_FULLTILE + SMOOTH_GROUP_WALLS
canSmoothWith = SMOOTH_GROUP_AIRLOCK + SMOOTH_GROUP_WINDOW_FULLTILE + SMOOTH_GROUP_WALLS
base_icon_state = "reinforced_window"
icon_state = "reinforced_window-0"
smooth_adapters = SMOOTH_ADAPTERS_WALLS

/obj/structure/window/plasma/fulltile
icon = 'monkestation/icons/obj/structures/window/window.dmi'
canSmoothWith = SMOOTH_GROUP_WINDOW_FULLTILE + SMOOTH_GROUP_WALLS
canSmoothWith = SMOOTH_GROUP_AIRLOCK + SMOOTH_GROUP_WINDOW_FULLTILE + SMOOTH_GROUP_WALLS
base_icon_state = "window"
icon_state = "window-0"
glass_color_blend_to_color = "#8000ff"
Expand All @@ -48,7 +48,7 @@
icon_state = "grille-0"
layer = ABOVE_OBJ_LAYER - 0.01
base_icon_state = "grille"
canSmoothWith = SMOOTH_GROUP_GRILLE + SMOOTH_GROUP_WALLS
canSmoothWith = SMOOTH_GROUP_GRILLE + SMOOTH_GROUP_AIRLOCK + SMOOTH_GROUP_WALLS
smoothing_flags = SMOOTH_BITMASK
smoothing_groups = SMOOTH_GROUP_GRILLE

Expand Down
23 changes: 7 additions & 16 deletions monkestation/code/modules/aesthetics/subsystem/coloring.dm
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@ SUBSYSTEM_DEF(station_coloring)
name = "Station Coloring"
init_order = INIT_ORDER_ICON_COLORING // before SSicon_smooth
flags = SS_NO_FIRE

///do we bother with wall trims?
var/wall_trims = FALSE
//RED (Only sec stuff honestly)
var/list/red = list("#d0294c", "#d6292f", "#d62f29", "#d63a29")
//BAR
Expand All @@ -18,20 +19,6 @@ SUBSYSTEM_DEF(station_coloring)
var/list/blue = list("#336f92", "#5d99bc", "#3f87ae", "#6eabce", "#307199")

/datum/controller/subsystem/station_coloring/Initialize()

//RED (Only sec stuff honestly)
var/list/red = list("#d0294c", "#d6292f", "#d62f29", "#d63a29")
//BAR
var/list/bar = list("#3790aa", "#5ca9c1", "#5cb092", "#4daf9b", "#4a9bdf", "#30cedf", "#c7804a", "#b0cedf")
//PURPLE (RnD + Research outpost)
var/list/purple = list("#674dba", "#6b43bc", "#864ec5", "#8d40c3")
//BROWN (Mining + Cargo)
var/list/brown = list("#826627", "#825327", "#a9682b", "#a9542b")
//GREEN (Virology and Hydro areas)
var/list/green = list("#50b47c", "#59b25d", "#46955a", "#4ba17b")
//BLUE (Some of Medbay areas)
var/list/blue = list("#336f92", "#5d99bc", "#3f87ae", "#6eabce", "#307199")

var/list/color_palette = list(
pick(red) = typesof(/area/station/security),
pick(purple) = typesof(/area/station/science),
Expand All @@ -53,9 +40,13 @@ SUBSYSTEM_DEF(station_coloring)
for(var/type in possible_areas)
for(var/obj/structure/window/W in GLOB.areas_by_type[type]) // for in area is slow by refs, but we have a time while in lobby so just to-do-sometime
W.change_color(color)
if(wall_trims)
for(var/turf/closed/wall/wall in GLOB.areas_by_type[type])
if(wall.wall_trim)
wall.change_trim_color(color)

/datum/controller/subsystem/station_coloring/proc/get_default_color()
var/static/default_color = pick(list("#1a356e", "#361a6e", "#164f41"))
var/static/default_color = pick(list("#1a356e", "#305a6d", "#164f41"))

return default_color

Expand Down
60 changes: 56 additions & 4 deletions monkestation/code/modules/aesthetics/walls/iron.dm
Original file line number Diff line number Diff line change
@@ -1,16 +1,68 @@
/turf/closed/wall
icon = 'monkestation/icons/turf/walls/wall.dmi'
canSmoothWith = SMOOTH_GROUP_WINDOW_FULLTILE + SMOOTH_GROUP_WALLS
canSmoothWith = SMOOTH_GROUP_AIRLOCK + SMOOTH_GROUP_WINDOW_FULLTILE + SMOOTH_GROUP_WALLS
smooth_adapters = SMOOTH_ADAPTERS_WALLS_FOR_WALLS
var/wall_trim = 'monkestation/icons/turf/walls/wall_trim.dmi'
var/trim_color
var/list/managed_wall_trim = list()
var/list/managed_wall_paint = list()
var/paint_color

/turf/closed/wall/proc/change_trim_color(color)
trim_color = color
update_appearance()

/turf/closed/wall/proc/change_paint_color(color)
paint_color = color
update_appearance()

/turf/closed/wall/attacked_by(obj/item/attacking_item, mob/living/user)
. = ..()
if(wall_trim)
if(istype(attacking_item, /obj/item/airlock_painter/decal))
var/obj/item/airlock_painter/decal/new_painter = attacking_item
if(user.istate & ISTATE_SECONDARY)
if(new_painter.stored_custom_color)
change_trim_color(new_painter.stored_custom_color)
else
if(new_painter.stored_custom_color)
change_paint_color(new_painter.stored_custom_color)

/turf/closed/wall/update_appearance()
. = ..()
if(wall_trim)
cut_overlay(managed_wall_trim)
managed_wall_trim = list()
var/image/new_trim = image("icon" = wall_trim, "icon_state" = icon_state, "layer" = src.layer + 0.02)
new_trim.color = trim_color
managed_wall_trim += new_trim
add_overlay(managed_wall_trim)
if(paint_color)
cut_overlay(managed_wall_paint)
managed_wall_paint = list()
var/image/new_trim = image("icon" = icon, "icon_state" = icon_state, "layer" = src.layer + 0.01)
new_trim.color = paint_color
managed_wall_paint += new_trim
add_overlay(managed_wall_paint)

/turf/closed/wall/smooth_icon()
. = ..()
update_appearance()

/turf/closed/wall/r_wall
icon = 'monkestation/icons/turf/walls/reinforced_wall.dmi'
canSmoothWith = SMOOTH_GROUP_WINDOW_FULLTILE + SMOOTH_GROUP_WALLS
canSmoothWith = SMOOTH_GROUP_AIRLOCK + SMOOTH_GROUP_WINDOW_FULLTILE + SMOOTH_GROUP_WALLS
wall_trim = 'monkestation/icons/turf/walls/reinforced_wall_trim.dmi'

/obj/structure/falsewall
icon = 'monkestation/icons/turf/walls/wall.dmi'
canSmoothWith = SMOOTH_GROUP_WINDOW_FULLTILE + SMOOTH_GROUP_WALLS
canSmoothWith = SMOOTH_GROUP_AIRLOCK + SMOOTH_GROUP_WINDOW_FULLTILE + SMOOTH_GROUP_WALLS
///pulled from the wall
var/wall_trim = 'monkestation/icons/turf/walls/wall_trim.dmi'
var/trim_color

/obj/structure/falsewall/reinforced
icon = 'monkestation/icons/turf/walls/reinforced_wall.dmi'
canSmoothWith = SMOOTH_GROUP_WINDOW_FULLTILE + SMOOTH_GROUP_WALLS
canSmoothWith = SMOOTH_GROUP_AIRLOCK + SMOOTH_GROUP_WINDOW_FULLTILE + SMOOTH_GROUP_WALLS
///pulled from the wall
wall_trim = 'monkestation/icons/turf/walls/reinforced_wall_trim.dmi'
1 change: 1 addition & 0 deletions monkestation/code/modules/antagonists/clock_cult/turf.dm
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,7 @@
hardness = 3 //very hard for hulks to break
//for deconstruction
var/d_state = INTACT
wall_trim = null //monkestation edit

/turf/closed/wall/clockwork/hulk_recoil(obj/item/bodypart/arm, mob/living/carbon/human/hulkman, damage = 41)
if(IS_CLOCK(hulkman)) //dont recoil for clock cultists
Expand Down
Binary file modified monkestation/icons/turf/walls/reinforced_wall.dmi
Binary file not shown.
Binary file not shown.
Binary file modified monkestation/icons/turf/walls/wall.dmi
Binary file not shown.
Binary file added monkestation/icons/turf/walls/wall_trim.dmi
Binary file not shown.