Files
Bubberstation/code/game/objects/structures/beds_chairs/sofa.dm
SkyratBot ef3deed131 [MIRROR] Fixes the benches' appearance and odd sitting offset [MDB IGNORE] (#19338)
* Fixes the benches' appearance and odd sitting offset (#73397)

## About The Pull Request
Introduced in https://github.com/tgstation/tgstation/pull/73057,
undocumented, was a change in the offset of players sitting in benches,
which just made it look like if everyone was standing on benches, rather
than sitting on them. I can understand the original goal behind that
change (after discussing with LT3 about it), but I still think that, for
one direction where it might _arguably_ look better, _every_ other
direction looks absolutely awful, and goes against the norm when it
comes to sitting on an chair/sofa/anything you can buckle onto that
serves as a place to sit.

Introduced in https://github.com/tgstation/tgstation/pull/73243,
undocumented, was a new color for benches that just made them look blue
rather than the brown they were meant to be. I'm returning them to their
prior color, as I think that it fits a lot better in its surroundings in
light brown than it did with dirty blue.

This fixes both of these issues, bringing the benches back to
consistency with the rest.

## Why It's Good For The Game
It just looks more consistent with everything else.

![image](https://user-images.githubusercontent.com/58045821/218340276-ee42d15b-fc54-4e56-b565-164b8a8b4db2.png)

## Changelog

🆑 GoldenAlpharex
fix: Sitting on benches no longer gives you a weird offset that makes
you look like you're standing on them.
fix: Returns benches to their original light brown color, rather than
the middle between brown and cyan that they were at for a bit.
/🆑

* Fixes the benches' appearance and odd sitting offset

---------

Co-authored-by: GoldenAlpharex <58045821+GoldenAlpharex@users.noreply.github.com>
2023-02-13 20:07:20 -08:00

139 lines
3.7 KiB
Plaintext

/// Create colored subtypes for sofas
#define COLORED_SOFA(path, color_name, sofa_color) \
path/middle/color_name {\
color = sofa_color; \
} \
path/right/color_name {\
color = sofa_color; \
} \
path/left/color_name {\
color = sofa_color; \
} \
path/corner/color_name {\
color = sofa_color; \
}
/obj/structure/chair/sofa
name = "old ratty sofa"
icon_state = "error"
icon = 'icons/obj/sofa.dmi'
buildstackamount = 1
item_chair = null
var/mutable_appearance/armrest
/obj/structure/chair/sofa/Initialize(mapload)
. = ..()
gen_armrest()
AddElement(/datum/element/soft_landing)
/obj/structure/chair/sofa/on_changed_z_level(turf/old_turf, turf/new_turf, same_z_layer, notify_contents)
if(same_z_layer)
return ..()
cut_overlay(armrest)
QDEL_NULL(armrest)
gen_armrest()
return ..()
/obj/structure/chair/sofa/proc/gen_armrest()
armrest = mutable_appearance(initial(icon), "[icon_state]_armrest", ABOVE_MOB_LAYER)
SET_PLANE_EXPLICIT(armrest, GAME_PLANE_UPPER, src)
update_armrest()
/obj/structure/chair/sofa/electrify_self(obj/item/assembly/shock_kit/input_shock_kit, mob/user, list/overlays_from_child_procs)
if(!overlays_from_child_procs)
overlays_from_child_procs = list(image('icons/obj/chairs.dmi', loc, "echair_over", pixel_x = -1))
. = ..()
/obj/structure/chair/sofa/post_buckle_mob(mob/living/M)
. = ..()
update_armrest()
/obj/structure/chair/sofa/proc/update_armrest()
if(has_buckled_mobs())
add_overlay(armrest)
else
cut_overlay(armrest)
/obj/structure/chair/sofa/post_unbuckle_mob()
. = ..()
update_armrest()
/obj/structure/chair/sofa/corner/handle_layer() //only the armrest/back of this chair should cover the mob.
return
/obj/structure/chair/sofa/middle
icon_state = "sofamiddle"
/obj/structure/chair/sofa/left
icon_state = "sofaend_left"
/obj/structure/chair/sofa/right
icon_state = "sofaend_right"
/obj/structure/chair/sofa/corner
icon_state = "sofacorner"
COLORED_SOFA(/obj/structure/chair/sofa, brown, SOFA_BROWN)
COLORED_SOFA(/obj/structure/chair/sofa, maroon, SOFA_MAROON)
// Original icon ported from Eris(?) and updated to work here.
/obj/structure/chair/sofa/corp
name = "sofa"
desc = "Soft and cushy."
icon_state = "corp_sofamiddle"
/obj/structure/chair/sofa/corp/left
icon_state = "corp_sofaend_left"
/obj/structure/chair/sofa/corp/right
icon_state = "corp_sofaend_right"
/obj/structure/chair/sofa/corp/corner
icon_state = "corp_sofacorner"
/obj/structure/chair/sofa/corp/corner/handle_layer() //only the armrest/back of this chair should cover the mob.
return
// Ported from Skyrat
/obj/structure/chair/sofa/bench
name = "bench"
desc = "Perfectly designed to be comfortable to sit on, and hellish to sleep on."
icon_state = "bench_middle"
greyscale_config = /datum/greyscale_config/bench_middle
greyscale_colors = "#af7d28"
/obj/structure/chair/sofa/bench/left
icon_state = "bench_left"
greyscale_config = /datum/greyscale_config/bench_left
/obj/structure/chair/sofa/bench/right
icon_state = "bench_right"
greyscale_config = /datum/greyscale_config/bench_right
/obj/structure/chair/sofa/bench/corner
icon_state = "bench_corner"
greyscale_config = /datum/greyscale_config/bench_corner
/obj/structure/chair/sofa/bench/solo
icon_state = "bench_solo"
greyscale_config = /datum/greyscale_config/bench_solo
// Bamboo benches
/obj/structure/chair/sofa/bamboo
name = "bamboo bench"
desc = "A makeshift bench with a rustic aesthetic."
icon_state = "bamboo_sofamiddle"
resistance_flags = FLAMMABLE
max_integrity = 60
buildstacktype = /obj/item/stack/sheet/mineral/bamboo
buildstackamount = 3
/obj/structure/chair/sofa/bamboo/left
icon_state = "bamboo_sofaend_left"
/obj/structure/chair/sofa/bamboo/right
icon_state = "bamboo_sofaend_right"
#undef COLORED_SOFA