Adds wooden chapel pews (#42712)

* Adds wooden chapel pews

This adds wooden chapel pews to the game. They function much like ratty couches, in that there are several different pieces which can be mixed and matched to make different length pews. They can be built from 3 wooden sheets.

The change to sheet_types.dm adds the pew crafting recipies to the end of the wood sheets crafting list.

The added file pew.dm  is the code which makes the pews work.

The added file pew.dmi is the sprites for the pews, including the overlays for the armrests.

the change to tgstation.dme is a single line which includes pew.dm.

This is my first PR ever, so please let me know if I made any mistakes in approved process.

* merged pew.dmi into sofa.dmi

As per the instructions of several commenters, I merged pew.dmi into sofa.dmi. pew.dm has been updated to reflect this.
This commit is contained in:
Caiggas
2019-02-10 19:43:32 -05:00
committed by oranges
parent f2830c84db
commit 0979aa0cd3
4 changed files with 80 additions and 0 deletions
@@ -205,6 +205,13 @@ GLOBAL_LIST_INIT(wood_recipes, list ( \
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), \
null, \
new/datum/stack_recipe_list("pews", 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)
)),
null, \
))
/obj/item/stack/sheet/mineral/wood
@@ -0,0 +1,72 @@
/obj/structure/chair/pew
name = "wooden pew"
desc = "Kneel here and pray."
icon = 'icons/obj/sofa.dmi'
icon_state = "pewmiddle"
resistance_flags = FLAMMABLE
max_integrity = 70
buildstacktype = /obj/item/stack/sheet/mineral/wood
buildstackamount = 3
item_chair = null
/obj/structure/chair/pew/left
name = "left wooden pew end"
icon_state = "pewend_left"
var/mutable_appearance/leftpewarmrest
/obj/structure/chair/pew/left/Initialize()
leftpewarmrest = GetLeftPewArmrest()
leftpewarmrest.layer = ABOVE_MOB_LAYER
return ..()
/obj/structure/chair/pew/left/proc/GetLeftPewArmrest()
return mutable_appearance('icons/obj/sofa.dmi', "pewend_left_armrest")
/obj/structure/chair/pew/left/Destroy()
QDEL_NULL(leftpewarmrest)
return ..()
/obj/structure/chair/pew/left/post_buckle_mob(mob/living/M)
. = ..()
update_leftpewarmrest()
/obj/structure/chair/pew/left/proc/update_leftpewarmrest()
if(has_buckled_mobs())
add_overlay(leftpewarmrest)
else
cut_overlay(leftpewarmrest)
/obj/structure/chair/pew/left/post_unbuckle_mob()
. = ..()
update_leftpewarmrest()
/obj/structure/chair/pew/right
name = "left wooden pew end"
icon_state = "pewend_right"
var/mutable_appearance/rightpewarmrest
/obj/structure/chair/pew/right/Initialize()
rightpewarmrest = GetRightPewArmrest()
rightpewarmrest.layer = ABOVE_MOB_LAYER
return ..()
/obj/structure/chair/pew/right/proc/GetRightPewArmrest()
return mutable_appearance('icons/obj/sofa.dmi', "pewend_right_armrest")
/obj/structure/chair/pew/right/Destroy()
QDEL_NULL(rightpewarmrest)
return ..()
/obj/structure/chair/pew/right/post_buckle_mob(mob/living/M)
. = ..()
update_rightpewarmrest()
/obj/structure/chair/pew/right/proc/update_rightpewarmrest()
if(has_buckled_mobs())
add_overlay(rightpewarmrest)
else
cut_overlay(rightpewarmrest)
/obj/structure/chair/pew/right/post_unbuckle_mob()
. = ..()
update_rightpewarmrest()