diff --git a/code/game/objects/structures/stool_bed_chair_nest/bed.dm b/code/game/objects/structures/stool_bed_chair_nest/bed.dm index fb13813970..603d77c346 100644 --- a/code/game/objects/structures/stool_bed_chair_nest/bed.dm +++ b/code/game/objects/structures/stool_bed_chair_nest/bed.dm @@ -16,6 +16,24 @@ anchored = 1 can_buckle = 1 buckle_lying = 1 + var/material/material + var/apply_colour = 1 + var/apply_strings = 1 + +/obj/structure/bed/New(var/newloc, var/new_material) + ..(newloc) + if(!new_material) + new_material = DEFAULT_WALL_MATERIAL + + material = get_material_by_name(new_material) + if(!istype(material)) + qdel(src) + return + if(apply_colour) + color = material.icon_colour + if(apply_strings) + name = "[material.display_name] [initial(name)]" + desc = "[initial(desc)] It's made of [material.display_name]." /obj/structure/bed/ex_act(severity) switch(severity) @@ -33,13 +51,13 @@ /obj/structure/bed/blob_act() if(prob(75)) - new /obj/item/stack/material/steel(src.loc) + material.place_sheet(get_turf(src)) qdel(src) /obj/structure/bed/attackby(obj/item/weapon/W as obj, mob/user as mob) if(istype(W, /obj/item/weapon/wrench)) playsound(src.loc, 'sound/items/Ratchet.ogg', 50, 1) - new /obj/item/stack/material/steel(src.loc) + material.place_sheet(get_turf(src)) qdel(src) else if(istype(W, /obj/item/weapon/grab)) user.visible_message("[user] attempts to buckle [W:affecting] into \the [src]!") @@ -54,14 +72,24 @@ ..() /obj/structure/bed/psych - name = "psychiatrists couch" + name = "psychiatrist's couch" desc = "For prime comfort during psychiatric evaluations." icon_state = "psychbed" + apply_colour = 0 + apply_strings = 0 + +/obj/structure/bed/psych/New(var/newloc) + ..(newloc,"leather") /obj/structure/bed/alien name = "resting contraption" desc = "This looks similar to contraptions from earth. Could aliens be stealing our technology?" icon_state = "abed" + apply_colour = 0 + apply_strings = 0 + +/obj/structure/bed/alien/New(var/newloc) + ..(newloc,"resin") /* * Roller beds @@ -71,6 +99,8 @@ icon = 'icons/obj/rollerbed.dmi' icon_state = "down" anchored = 0 + apply_colour = 0 + apply_strings = 0 /obj/structure/bed/roller/attackby(obj/item/weapon/W as obj, mob/user as mob) if(istype(W,/obj/item/roller_holder)) diff --git a/code/game/objects/structures/stool_bed_chair_nest/chairs.dm b/code/game/objects/structures/stool_bed_chair_nest/chairs.dm index c49e6f8b86..c76cf57f8d 100644 --- a/code/game/objects/structures/stool_bed_chair_nest/chairs.dm +++ b/code/game/objects/structures/stool_bed_chair_nest/chairs.dm @@ -3,11 +3,10 @@ desc = "You sit in this. Either by will or force." icon_state = "chair" buckle_lying = 0 //force people to sit up in chairs when buckled - var/propelled = 0 // Check for fire-extinguisher-driven chairs -/obj/structure/bed/chair/New() - ..() +/obj/structure/bed/chair/New(var/newloc, var/material) + ..(newloc, material) //Todo make metal/stone chairs display as thrones spawn(3) //sorry. i don't think there's a better way to do this. update_layer() return @@ -20,7 +19,7 @@ user << "[SK] is not ready to be attached!" return user.drop_item() - var/obj/structure/bed/chair/e_chair/E = new /obj/structure/bed/chair/e_chair(src.loc) + var/obj/structure/bed/chair/e_chair/E = new (src.loc, material.name) playsound(src.loc, 'sound/items/Deconstruct.ogg', 50, 1) E.set_dir(dir) E.part = SK @@ -71,24 +70,23 @@ icon_state = "wooden_chair" name = "wooden chair" desc = "Old is never too old to not be in fashion." + apply_colour = 0 + apply_strings = 0 + +/obj/structure/bed/chair/wood/New(var/newloc) + ..(newloc, "wood") /obj/structure/bed/chair/wood/wings icon_state = "wooden_chair_wings" -/obj/structure/bed/chair/wood/attackby(obj/item/weapon/W as obj, mob/user as mob) - if(istype(W, /obj/item/weapon/wrench)) - playsound(src.loc, 'sound/items/Ratchet.ogg', 50, 1) - new /obj/item/stack/material/wood(src.loc) - qdel(src) - else - ..() - /obj/structure/bed/chair/comfy name = "comfy chair" desc = "It looks comfy." icon_state = "comfychair" color = rgb(255,255,255) var/image/armrest = null + apply_colour = 0 + apply_strings = 0 /obj/structure/bed/chair/comfy/New() armrest = image("icons/obj/objects.dmi", "comfychair_armrest") @@ -129,6 +127,8 @@ /obj/structure/bed/chair/office anchored = 0 buckle_movable = 1 + apply_colour = 0 + apply_strings = 0 /obj/structure/bed/chair/comfy/lime color = rgb(255,251,0) diff --git a/code/game/objects/structures/stool_bed_chair_nest/stools.dm b/code/game/objects/structures/stool_bed_chair_nest/stools.dm index 77d20c1f7a..6b05b9c85c 100644 --- a/code/game/objects/structures/stool_bed_chair_nest/stools.dm +++ b/code/game/objects/structures/stool_bed_chair_nest/stools.dm @@ -6,13 +6,26 @@ force = 10 throwforce = 10 w_class = 5 + var/material/material + +/obj/item/weapon/stool/New(var/newloc, var/new_material) + ..(newloc) + if(!new_material) + new_material = DEFAULT_WALL_MATERIAL + material = get_material_by_name(new_material) + if(!istype(material)) + qdel(src) + return + force = round(material.get_blunt_damage()*0.4) + color = material.icon_colour + name = "[material.display_name] [initial(name)]" + desc = "[initial(desc)] It's made of [material.display_name]." /obj/item/weapon/stool/attack(mob/M as mob, mob/user as mob) if (prob(5) && istype(M,/mob/living)) user.visible_message("\red [user] breaks [src] over [M]'s back!") user.remove_from_mob(src) - var/obj/item/stack/material/steel/m = new/obj/item/stack/material/steel - m.loc = get_turf(src) + material.place_sheet(get_turf(src)) qdel(src) var/mob/living/T = M T.Weaken(10) @@ -36,12 +49,12 @@ /obj/item/weapon/stool/blob_act() if(prob(75)) - new /obj/item/stack/material/steel(src.loc) + material.place_sheet(get_turf(src)) qdel(src) /obj/item/weapon/stool/attackby(obj/item/weapon/W as obj, mob/user as mob) if(istype(W, /obj/item/weapon/wrench)) playsound(src.loc, 'sound/items/Ratchet.ogg', 50, 1) - new /obj/item/stack/material/steel(src.loc) + material.place_sheet(get_turf(src)) qdel(src) ..() diff --git a/code/modules/materials/material_recipes.dm b/code/modules/materials/material_recipes.dm index feb7abc945..6cfa22fb5c 100644 --- a/code/modules/materials/material_recipes.dm +++ b/code/modules/materials/material_recipes.dm @@ -12,9 +12,9 @@ recipes += new/datum/stack_recipe("[display_name] spoon", /obj/item/weapon/material/kitchen/utensil/spoon/plastic, 1, on_floor = 1, supplied_material = "[name]") recipes += new/datum/stack_recipe("[display_name] knife", /obj/item/weapon/material/kitchen/utensil/knife/plastic, 1, on_floor = 1, supplied_material = "[name]") recipes += new/datum/stack_recipe("[display_name] baseball bat", /obj/item/weapon/material/twohanded/baseballbat/metal, 10, time = 20, one_per_turf = 0, on_floor = 1, supplied_material = "[name]") - recipes += new/datum/stack_recipe("stool", /obj/item/weapon/stool, one_per_turf = 1, on_floor = 1, supplied_material = "[name]") - recipes += new/datum/stack_recipe("chair", /obj/structure/bed/chair, one_per_turf = 1, on_floor = 1, supplied_material = "[name]") - recipes += new/datum/stack_recipe("bed", /obj/structure/bed, 2, one_per_turf = 1, on_floor = 1, supplied_material = "[name]") + recipes += new/datum/stack_recipe("[display_name] stool", /obj/item/weapon/stool, one_per_turf = 1, on_floor = 1, supplied_material = "[name]") + recipes += new/datum/stack_recipe("[display_name] chair", /obj/structure/bed/chair, one_per_turf = 1, on_floor = 1, supplied_material = "[name]") + recipes += new/datum/stack_recipe("[display_name] bed", /obj/structure/bed, 2, one_per_turf = 1, on_floor = 1, supplied_material = "[name]") /material/steel/generate_recipes() ..() diff --git a/code/modules/materials/materials.dm b/code/modules/materials/materials.dm index 29cd325ee3..9f2ead01e7 100644 --- a/code/modules/materials/materials.dm +++ b/code/modules/materials/materials.dm @@ -353,4 +353,8 @@ var/list/name_to_material var/mob/living/carbon/M = user if(istype(M) && locate(/obj/item/organ/xenos/hivenode) in M.internal_organs) return 1 - return 0 \ No newline at end of file + return 0 + +/material/leather //todo + name = "leather" + icon_colour = "#5C4831" \ No newline at end of file diff --git a/icons/obj/objects.dmi b/icons/obj/objects.dmi index cf366f75ea..30056c1c5d 100644 Binary files a/icons/obj/objects.dmi and b/icons/obj/objects.dmi differ