Skip to content
This repository has been archived by the owner on Sep 8, 2022. It is now read-only.

[MIRROR] Fix for Corporate Benches and Chair deconstruction + Time to build for chairs #1008

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
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
72 changes: 72 additions & 0 deletions code/datums/greyscale/greyscale_configs.dm
Original file line number Diff line number Diff line change
Expand Up @@ -117,3 +117,75 @@
name = "Sneakers marisa"
icon_file = 'icons/obj/clothing/shoes.dmi'
json_config = 'code/datums/greyscale/json_configs/sneakers_marisa.json'
<<<<<<< HEAD
=======

/datum/greyscale_config/plasmaman_helmet_default
name = "Default plasmaman helmet"
icon_file = 'icons/obj/clothing/hats.dmi'
json_config = 'code/datums/greyscale/json_configs/plasmaman_helmet_default.json'

/datum/greyscale_config/plasmaman_helmet_default_worn
name = "Default plasmaman helmet"
icon_file = 'icons/mob/clothing/head.dmi'
json_config = 'code/datums/greyscale/json_configs/plasmaman_helmet_default_worn.json'

/datum/greyscale_config/plasmaman_helmet_mark2
name = "Mark II plasmaman helmet"
icon_file = 'icons/obj/clothing/hats.dmi'
json_config = 'code/datums/greyscale/json_configs/plasmaman_helmet_mk2.json'

/datum/greyscale_config/plasmaman_helmet_mark2_worn
name = "Mark II plasmaman helmet"
icon_file = 'icons/mob/clothing/head.dmi'
json_config = 'code/datums/greyscale/json_configs/plasmaman_helmet_mk2_worn.json'

/datum/greyscale_config/plasmaman_helmet_protective
name = "Protective plasmaman helmet"
icon_file = 'icons/obj/clothing/hats.dmi'
json_config = 'code/datums/greyscale/json_configs/plasmaman_helmet_protective.json'

/datum/greyscale_config/plasmaman_helmet_protective_worn
name = "Protective plasmaman helmet"
icon_file = 'icons/mob/clothing/head.dmi'
json_config = 'code/datums/greyscale/json_configs/plasmaman_helmet_protective_worn.json'

/datum/greyscale_config/plasmaman_helmet_default_inhand_left
name = "Held Default plasmam helmet, left"
icon_file = 'icons/mob/inhands/clothing_lefthand.dmi'
json_config = 'code/datums/greyscale/json_configs/plasmaman_helmet_default_inhand.json'

/datum/greyscale_config/plasmaman_helmet_default_inhand_right
name = "Held Default plasmam helmet, right"
icon_file = 'icons/mob/inhands/clothing_righthand.dmi'
json_config = 'code/datums/greyscale/json_configs/plasmaman_helmet_default_inhand.json'

/datum/greyscale_config/plasmaman_helmet_protective_inhand_left
name = "Held Protective plasmam helmet, left"
icon_file = 'icons/mob/inhands/clothing_lefthand.dmi'
json_config = 'code/datums/greyscale/json_configs/plasmaman_helmet_protective_inhand.json'

/datum/greyscale_config/plasmaman_helmet_protective_inhand_right
name = "Held Protective plasmam helmet, right"
icon_file = 'icons/mob/inhands/clothing_righthand.dmi'
json_config = 'code/datums/greyscale/json_configs/plasmaman_helmet_protective_inhand.json'

/datum/greyscale_config/plasmaman_helmet_mark2_inhand_left
name = "Held Mark II plasmam helmet, left"
icon_file = 'icons/mob/inhands/clothing_lefthand.dmi'
json_config = 'code/datums/greyscale/json_configs/plasmaman_helmet_mk2_inhand.json'

/datum/greyscale_config/plasmaman_helmet_mark2_inhand_right
name = "Held Mark II plasmam helmet, right"
icon_file = 'icons/mob/inhands/clothing_righthand.dmi'
json_config = 'code/datums/greyscale/json_configs/plasmaman_helmet_mk2_inhand.json'

/datum/greyscale_config/carp
name = "Space Carp"
icon_file = 'icons/mob/carp.dmi'
json_config = 'code/datums/greyscale/json_configs/carp.json'

/datum/greyscale_config/carp/disk_mouth
name = "Space Carp Disk in Mouth"
json_config = 'code/datums/greyscale/json_configs/carp_disk_mouth.json'
>>>>>>> 94c6a7a7ee... Fix for Corporate Benches and Chair deconstruction + Time to build for chairs (#7594)
4 changes: 3 additions & 1 deletion code/datums/mutable_appearance.dm
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,12 @@
// And yes this does have to be in the constructor, BYOND ignores it if you set it as a normal var

// Helper similar to image()
/proc/mutable_appearance(icon, icon_state = "", layer = FLOAT_LAYER, plane = FLOAT_PLANE)
/proc/mutable_appearance(icon, icon_state = "", layer = FLOAT_LAYER, plane = FLOAT_PLANE, color)
var/mutable_appearance/MA = new()
MA.icon = icon
MA.icon_state = icon_state
MA.layer = layer
MA.plane = plane
if(color)
MA.color = color
return MA
93 changes: 93 additions & 0 deletions code/game/objects/items/stacks/sheets/sheet_types.dm
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
* Metal
*/
GLOBAL_LIST_INIT(metal_recipes, list ( \
<<<<<<< HEAD
new/datum/stack_recipe("stool", /obj/structure/chair/stool, one_per_turf = TRUE, on_floor = TRUE), \
new/datum/stack_recipe("bar stool", /obj/structure/chair/stool/bar, one_per_turf = TRUE, on_floor = TRUE), \
new/datum/stack_recipe("chair", /obj/structure/chair, one_per_turf = TRUE, on_floor = TRUE), \
Expand Down Expand Up @@ -45,6 +46,49 @@ GLOBAL_LIST_INIT(metal_recipes, list ( \
new /datum/stack_recipe("sofa (left)", /obj/structure/chair/sofa/corp/left, one_per_turf = TRUE, on_floor = TRUE), \
new /datum/stack_recipe("sofa (right)", /obj/structure/chair/sofa/corp/right, one_per_turf = TRUE, on_floor = TRUE), \
new /datum/stack_recipe("sofa (corner)", /obj/structure/chair/sofa/corp/corner, one_per_turf = TRUE, on_floor = TRUE), \
=======
new/datum/stack_recipe("stool", /obj/structure/chair/stool, one_per_turf = TRUE, on_floor = TRUE, time = 15), \
new/datum/stack_recipe("bar stool", /obj/structure/chair/stool/bar, one_per_turf = TRUE, on_floor = TRUE, time = 15), \
new/datum/stack_recipe("chair", /obj/structure/chair, one_per_turf = TRUE, on_floor = TRUE, time = 20), \

null, \
new/datum/stack_recipe_list("office chairs", list( \
new/datum/stack_recipe("dark office chair", /obj/structure/chair/office, 5, one_per_turf = TRUE, on_floor = TRUE, time = 15), \
new/datum/stack_recipe("light office chair", /obj/structure/chair/office/light, 5, one_per_turf = TRUE, on_floor = TRUE, time = 15), \
)), \
new/datum/stack_recipe_list("beds", list( \
new/datum/stack_recipe("single bed", /obj/structure/bed, 2, one_per_turf = TRUE, on_floor = TRUE, time = 20), \
new/datum/stack_recipe("double bed", /obj/structure/bed/double, 2, one_per_turf = TRUE, on_floor = TRUE, time = 40), \
)), \
new/datum/stack_recipe_list("comfy chairs", list( \
new/datum/stack_recipe("comfy chair", /obj/structure/chair/fancy/comfy, 2, one_per_turf = TRUE, on_floor = TRUE, time = 20), \
new/datum/stack_recipe("corporate chair", /obj/structure/chair/fancy/corp, 2, one_per_turf = TRUE, on_floor = TRUE, time = 20), \
new/datum/stack_recipe("shuttle seat", /obj/structure/chair/fancy/shuttle, 2, one_per_turf = TRUE, on_floor = TRUE, time = 20), \
)), \
new/datum/stack_recipe_list("old sofa", list(
new /datum/stack_recipe("old sofa (middle)", /obj/structure/chair/fancy/sofa/old, 1, one_per_turf = TRUE, on_floor = TRUE, time = 20), \
new /datum/stack_recipe("old sofa (left)", /obj/structure/chair/fancy/sofa/old/left, 1, one_per_turf = TRUE, on_floor = TRUE, time = 20), \
new /datum/stack_recipe("old sofa (right)", /obj/structure/chair/fancy/sofa/old/right, 1, one_per_turf = TRUE, on_floor = TRUE, time = 20), \
new /datum/stack_recipe("old sofa (concave corner)", /obj/structure/chair/fancy/sofa/old/corner/concave, 1, one_per_turf = TRUE, on_floor = TRUE, time = 20), \
new /datum/stack_recipe("old sofa (convex corner)", /obj/structure/chair/fancy/sofa/old/corner/convex, 1, one_per_turf = TRUE, on_floor = TRUE, time = 20), \
)), \
new /datum/stack_recipe_list("corporate sofas", list( \
new /datum/stack_recipe("corporate sofa (middle)", /obj/structure/chair/fancy/sofa/corp, 1, one_per_turf = TRUE, on_floor = TRUE, time = 20), \
new /datum/stack_recipe("corporate sofa (left)", /obj/structure/chair/fancy/sofa/corp/left, 1, one_per_turf = TRUE, on_floor = TRUE, time = 20), \
new /datum/stack_recipe("corporate sofa (right)", /obj/structure/chair/fancy/sofa/corp/right, 1, one_per_turf = TRUE, on_floor = TRUE, time = 20), \
new /datum/stack_recipe("corporate sofa (concave corner)", /obj/structure/chair/fancy/sofa/corp/corner/concave, 1, one_per_turf = TRUE, on_floor = TRUE, time = 20), \
new /datum/stack_recipe("corporate sofa (convex corner)", /obj/structure/chair/fancy/sofa/corp/corner/convex, 1, one_per_turf = TRUE, on_floor = TRUE, time = 20), \
)), \
new /datum/stack_recipe_list("benches", list( \
new /datum/stack_recipe("bench (middle)", /obj/structure/chair/fancy/bench, 1, one_per_turf = TRUE, on_floor = TRUE, time = 20), \
new /datum/stack_recipe("bench (left)", /obj/structure/chair/fancy/bench/left, 1, one_per_turf = TRUE, on_floor = TRUE, time = 20), \
new /datum/stack_recipe("bench (right)", /obj/structure/chair/fancy/bench/right, 1, one_per_turf = TRUE, on_floor = TRUE, time = 20), \
)), \
new /datum/stack_recipe_list("corporate benches", list( \
new /datum/stack_recipe("corporate bench (middle)", /obj/structure/chair/fancy/bench/corporate, 1, one_per_turf = TRUE, on_floor = TRUE, time = 20), \
new /datum/stack_recipe("corporate bench (left)", /obj/structure/chair/fancy/bench/corporate/left, 1, one_per_turf = TRUE, on_floor = TRUE, time = 20), \
new /datum/stack_recipe("corporate bench (right)", /obj/structure/chair/fancy/bench/corporate/right, 1, one_per_turf = TRUE, on_floor = TRUE, time = 20), \
>>>>>>> 94c6a7a7ee... Fix for Corporate Benches and Chair deconstruction + Time to build for chairs (#7594)
)),
null, \
new/datum/stack_recipe("rack parts", /obj/item/rack_parts), \
Expand Down Expand Up @@ -196,6 +240,7 @@ GLOBAL_LIST_INIT(plasteel_recipes, list ( \
* Wood
*/
GLOBAL_LIST_INIT(wood_recipes, list ( \
<<<<<<< HEAD
new/datum/stack_recipe("wooden sandals", /obj/item/clothing/shoes/sandal, 1), \
new/datum/stack_recipe("wood floor tile", /obj/item/stack/tile/wood, 1, 4, 20), \
new/datum/stack_recipe("wood table frame", /obj/structure/table_frame/wood, 2, time = 10), \
Expand Down Expand Up @@ -229,6 +274,41 @@ GLOBAL_LIST_INIT(wood_recipes, list ( \
new /datum/stack_recipe("pew (middle)", /obj/structure/chair/pew, 3, one_per_turf = TRUE, on_floor = TRUE),
new /datum/stack_recipe("pew (left)", /obj/structure/chair/pew/left, 3, one_per_turf = TRUE, on_floor = TRUE),
new /datum/stack_recipe("pew (right)", /obj/structure/chair/pew/right, 3, one_per_turf = TRUE, on_floor = TRUE)
=======
new/datum/stack_recipe("wooden sandals", /obj/item/clothing/shoes/sandal, 1), \
new/datum/stack_recipe("wood floor tile", /obj/item/stack/tile/wood, 1, 4, 20), \
new/datum/stack_recipe("wood table frame", /obj/structure/table_frame/wood, 2, time = 10), \
new/datum/stack_recipe("rifle stock", /obj/item/weaponcrafting/stock, 10, time = 40), \
new/datum/stack_recipe("rolling pin", /obj/item/kitchen/rollingpin, 2, time = 30), \
new/datum/stack_recipe("wooden chair", /obj/structure/chair/wood/, 3, time = 20, one_per_turf = TRUE, on_floor = TRUE), \
new/datum/stack_recipe("winged wooden chair", /obj/structure/chair/wood/wings, 3, time = 30, one_per_turf = TRUE, on_floor = TRUE), \
new/datum/stack_recipe("wooden barricade", /obj/structure/barricade/wooden, 5, time = 50, one_per_turf = TRUE, on_floor = TRUE), \
new/datum/stack_recipe("wooden door", /obj/structure/mineral_door/wood, 10, time = 20, one_per_turf = TRUE, on_floor = TRUE), \
new/datum/stack_recipe("coffin", /obj/structure/closet/crate/coffin, 5, time = 15, one_per_turf = TRUE, on_floor = TRUE), \
new/datum/stack_recipe("book case", /obj/structure/bookcase, 4, time = 15, one_per_turf = TRUE, on_floor = TRUE), \
new/datum/stack_recipe("drying rack", /obj/machinery/smartfridge/drying_rack, 10, time = 15, one_per_turf = TRUE, on_floor = TRUE), \
new/datum/stack_recipe("dog bed", /obj/structure/bed/dogbed, 10, time = 10, one_per_turf = TRUE, on_floor = TRUE), \
new/datum/stack_recipe("dresser", /obj/structure/dresser, 10, time = 15, one_per_turf = TRUE, on_floor = TRUE), \
new/datum/stack_recipe("picture frame", /obj/item/wallframe/picture, 1, time = 10),\
new/datum/stack_recipe("painting frame", /obj/item/wallframe/painting, 1, time = 10),\
new/datum/stack_recipe("display case chassis", /obj/structure/displaycase_chassis, 5, one_per_turf = TRUE, on_floor = TRUE), \
new/datum/stack_recipe("easel", /obj/structure/easel, 5, time = 10, one_per_turf = TRUE, on_floor = TRUE), \
new/datum/stack_recipe("wooden buckler", /obj/item/shield/riot/buckler, 20, time = 40), \
new/datum/stack_recipe("apiary", /obj/structure/beebox, 40, time = 50),\
new/datum/stack_recipe("tiki mask", /obj/item/clothing/mask/gas/tiki_mask, 2), \
new/datum/stack_recipe("honey frame", /obj/item/honey_frame, 5, time = 10),\
new/datum/stack_recipe("ore box", /obj/structure/ore_box, 4, time = 50, one_per_turf = TRUE, on_floor = TRUE),\
new/datum/stack_recipe("wooden crate", /obj/structure/closet/crate/wooden, 6, time = 50, one_per_turf = TRUE, on_floor = TRUE),\
new/datum/stack_recipe("baseball bat", /obj/item/melee/baseball_bat, 5, time = 15),\
new/datum/stack_recipe("loom", /obj/structure/loom, 10, time = 15, one_per_turf = TRUE, on_floor = TRUE), \
new/datum/stack_recipe("mortar", /obj/item/reagent_containers/glass/mortar, 3), \
new/datum/stack_recipe("firebrand", /obj/item/match/firebrand, 2, time = 100), \
null, \
new/datum/stack_recipe_list("pews", list(
new /datum/stack_recipe("pew (middle)", /obj/structure/chair/fancy/bench/pew, 3, one_per_turf = TRUE, on_floor = TRUE, time = 20),
new /datum/stack_recipe("pew (left)", /obj/structure/chair/fancy/bench/pew/left, 3, one_per_turf = TRUE, on_floor = TRUE, time = 20),
new /datum/stack_recipe("pew (right)", /obj/structure/chair/fancy/bench/pew/right, 3, one_per_turf = TRUE, on_floor = TRUE, time = 20)
>>>>>>> 94c6a7a7ee... Fix for Corporate Benches and Chair deconstruction + Time to build for chairs (#7594)
)),
null, \
))
Expand Down Expand Up @@ -651,7 +731,11 @@ GLOBAL_LIST_INIT(bronze_recipes, list ( \
new/datum/stack_recipe("bronze suit", /obj/item/clothing/suit/bronze), \
new/datum/stack_recipe("bronze boots", /obj/item/clothing/shoes/bronze), \
null,
<<<<<<< HEAD
new/datum/stack_recipe("bronze chair", /obj/structure/chair/bronze, 1, time = 0, one_per_turf = TRUE, on_floor = TRUE), \
=======
new/datum/stack_recipe("bronze chair", /obj/structure/chair/fancy/brass/bronze, 1, time = 40, one_per_turf = TRUE, on_floor = TRUE), \
>>>>>>> 94c6a7a7ee... Fix for Corporate Benches and Chair deconstruction + Time to build for chairs (#7594)
))

/obj/item/stack/tile/bronze
Expand Down Expand Up @@ -726,10 +810,19 @@ GLOBAL_LIST_INIT(bronze_recipes, list ( \
merge_type = /obj/item/stack/sheet/bone

GLOBAL_LIST_INIT(plastic_recipes, list(
<<<<<<< HEAD
new /datum/stack_recipe("plastic flaps", /obj/structure/plasticflaps, 5, one_per_turf = TRUE, on_floor = TRUE, time = 40), \
new /datum/stack_recipe("water bottle", /obj/item/reagent_containers/glass/waterbottle/empty), \
new /datum/stack_recipe("large water bottle", /obj/item/reagent_containers/glass/waterbottle/large/empty,3), \
new /datum/stack_recipe("wet floor sign", /obj/item/clothing/suit/caution, 2)))
=======
new /datum/stack_recipe("plastic flaps", /obj/structure/plasticflaps, 5, one_per_turf = TRUE, on_floor = TRUE, time = 40), \
new /datum/stack_recipe("water bottle", /obj/item/reagent_containers/glass/waterbottle/empty), \
new /datum/stack_recipe("large water bottle", /obj/item/reagent_containers/glass/waterbottle/large/empty,3), \
new /datum/stack_recipe("wet floor sign", /obj/item/clothing/suit/caution, 2), \
new /datum/stack_recipe("plastic chair", /obj/structure/chair/fancy/plastic, one_per_turf = TRUE, on_floor = TRUE, time = 20), \
))
>>>>>>> 94c6a7a7ee... Fix for Corporate Benches and Chair deconstruction + Time to build for chairs (#7594)

/obj/item/stack/sheet/plastic
name = "plastic"
Expand Down
90 changes: 90 additions & 0 deletions code/game/objects/structures/beds_chairs/bench.dm
Original file line number Diff line number Diff line change
@@ -0,0 +1,90 @@
/obj/structure/chair/fancy/bench
name = "bench"
desc = "You sit in this. Either by will or force, but maybe not alone."
icon = 'icons/obj/beds_chairs/benches.dmi'
max_integrity = 250
integrity_failure = 25
icon_state = "bench_center"

/obj/structure/chair/fancy/bench/left
icon_state = "bench_left"

/obj/structure/chair/fancy/bench/right
icon_state = "bench_right"

/obj/structure/chair/fancy/bench/pew
name = "wooden pew"
desc = "Kneel here and pray."
icon_state = "pewmiddle"
resistance_flags = FLAMMABLE
max_integrity = 70
buildstacktype = /obj/item/stack/sheet/mineral/wood
buildstackamount = 3
item_chair = null

/obj/structure/chair/fancy/bench/pew/left
name = "left wooden pew end"
icon_state = "pewend_left"

/obj/structure/chair/fancy/bench/pew/right
name = "right wooden pew end"
icon_state = "pewend_right"

// Bamboo benches
/obj/structure/chair/fancy/bench/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/fancy/bench/bamboo/left
icon_state = "bamboo_sofaend_left"

/obj/structure/chair/fancy/bench/bamboo/right
icon_state = "bamboo_sofaend_right"

// Ported from tg ported from Skyrat, oh and this version is off Paradise, aka GAGless but almost GAGs!
/obj/structure/chair/fancy/bench/corporate
name = "corporate bench"
desc = "Perfectly designed to be comfortable to sit on, and hellish to sleep on."
icon_state = "corporate_bench_middle_mapping"
var/base_icon_state = "corporate_bench_middle"
///icon for the cover seat
var/image/cover
///cover seat color, by default this one
var/cover_color = rgb(175, 125, 40)
color = null
colorable = FALSE

/obj/structure/chair/fancy/bench/corporate/Initialize(mapload)
icon_state = base_icon_state //so the rainbow seats for mapper clarity are not in-game
GetCover()
return ..()

/obj/structure/chair/fancy/bench/corporate/proc/GetCover()
if(cover)
cut_overlay(cover)
cover = mutable_appearance('icons/obj/beds_chairs/benches.dmi', "[icon_state]_cover", color = cover_color) //this supports colouring, but not the base bench
add_overlay(cover)

/obj/structure/chair/fancy/bench/corporate/attacked_by(obj/item/I, mob/living/user)
. = ..()
if(istype(I, /obj/item/toy/crayon))
var/obj/item/toy/crayon/C = I
cover_color = C.crayon_color
if(cover_color)
GetCover()

/obj/structure/chair/fancy/bench/corporate/handle_layer()
return

/obj/structure/chair/fancy/bench/corporate/left
icon_state = "corporate_bench_left_mapping"
base_icon_state = "corporate_bench_left"

/obj/structure/chair/fancy/bench/corporate/right
icon_state = "corporate_bench_right_mapping"
base_icon_state = "corporate_bench_right"
8 changes: 8 additions & 0 deletions code/game/objects/structures/beds_chairs/chair.dm
Original file line number Diff line number Diff line change
Expand Up @@ -71,9 +71,17 @@
qdel(src)

/obj/structure/chair/attackby(obj/item/W, mob/user, params)
<<<<<<< HEAD
if(W.tool_behaviour == TOOL_WRENCH && !(flags_1&NODECONSTRUCT_1))
W.play_tool_sound(src)
deconstruct()
=======
if(W.tool_behaviour == TOOL_WRENCH && !(flags_1 & NODECONSTRUCT_1))
to_chat(user, "<span class='notice'>You start deconstructing [src]...</span>")
if(W.use_tool(src, user, 30, volume=50))
playsound(src.loc, 'sound/items/deconstruct.ogg', 50, 1)
deconstruct(TRUE, 1)
>>>>>>> 94c6a7a7ee... Fix for Corporate Benches and Chair deconstruction + Time to build for chairs (#7594)
else if(istype(W, /obj/item/assembly/shock_kit))
if(!user.temporarilyRemoveItemFromInventory(W))
return
Expand Down
Binary file added icons/obj/beds_chairs/benches.dmi
Binary file not shown.