diff --git a/code/__defines/misc_ch.dm b/code/__defines/misc_ch.dm index dbdf8ef926..31f35d8493 100644 --- a/code/__defines/misc_ch.dm +++ b/code/__defines/misc_ch.dm @@ -1,4 +1,15 @@ +//Material defines +#define MAT_CARPET "red carpet" +#define MAT_CARPET_TEAL "teal carpet" +#define MAT_CARPET_BLACK "black carpet" +#define MAT_CARPET_BLUE "blue carpet" +#define MAT_CARPET_TURQUOISE "turquoise carpet" +#define MAT_CARPET_SILVERBLUE "silver blue carpet" +#define MAT_CARPET_PINK "pink carpet" +#define MAT_CARPET_PURPLE "purple carpet" +#define MAT_CARPET_ORANGE "orange carpet" + //Casino prize dispenser stuff #define CAT_WEAPONS 1 #define CAT_GEAR 2 diff --git a/code/game/machinery/jukebox.dm b/code/game/machinery/jukebox.dm index a9e5d7c154..2a6f35f033 100644 --- a/code/game/machinery/jukebox.dm +++ b/code/game/machinery/jukebox.dm @@ -75,6 +75,9 @@ secret_tracks |= T else tracks |= T + if(T.casino) //CHOMPEDIT: preventing casion tracks from being added to other jukeboxes + tracks -= T + else if(!LAZYLEN(tracks)) //We don't even have default tracks stat |= BROKEN // No tracks configured this round! diff --git a/code/game/objects/items/stacks/tiles/tile_types.dm b/code/game/objects/items/stacks/tiles/tile_types.dm index 7c441e8169..865d1cbfc1 100644 --- a/code/game/objects/items/stacks/tiles/tile_types.dm +++ b/code/game/objects/items/stacks/tiles/tile_types.dm @@ -17,6 +17,11 @@ w_class = ITEMSIZE_NORMAL max_amount = 60 + var/material/material //CHOMPEDIT: Start, To make tiles have material variables + var/default_type = DEFAULT_WALL_MATERIAL + var/perunit = SHEET_MATERIAL_AMOUNT + var/apply_colour //CHOMPEDIT: End + /obj/item/stack/tile/New() ..() pixel_x = rand(-7, 7) @@ -66,9 +71,9 @@ stacktype = /obj/item/stack/tile/wood build_type = /obj/item/stack/tile/wood + +//CHOMPEDIT: Moving carpets to tile_types_ch to give them proper names, descriptions and material variables /* - * Carpets - */ /obj/item/stack/tile/carpet name = "carpet" singular_name = "carpet" @@ -102,6 +107,7 @@ icon_state = "tile-carpet" /obj/item/stack/tile/carpet/oracarpet icon_state = "tile-carpet" + */ /obj/item/stack/tile/floor name = "floor tile" diff --git a/code/game/objects/items/stacks/tiles/tile_types_ch.dm b/code/game/objects/items/stacks/tiles/tile_types_ch.dm new file mode 100644 index 0000000000..cd919466e6 --- /dev/null +++ b/code/game/objects/items/stacks/tiles/tile_types_ch.dm @@ -0,0 +1,102 @@ +// Procs to allow tiles to have material variables, consider unifying this on stack parent? +// Uncertain if any of these procs can result in unforseen issues with tile objects, if there are bugs with tiles check if any of these procs are the cause + +/obj/item/stack/tile/New() + ..() + + if(!default_type) + default_type = DEFAULT_WALL_MATERIAL + material = get_material_by_name("[default_type]") + if(!material) + qdel(src) + return 0 + + recipes = material.get_recipes() + stacktype = material.stack_type + if(islist(material.stack_origin_tech)) + origin_tech = material.stack_origin_tech.Copy() + + if(apply_colour) + color = material.icon_colour + + if(!material.conductive) + flags |= NOCONDUCT + + matter = material.get_matter() + return 1 + + +/obj/item/stack/material/get_material() + return material + +/* + * Carpets + */ +/obj/item/stack/tile/carpet + name = "red carpet" + singular_name = "red carpet" + desc = "A piece of red carpet. It is the same size as a normal floor tile!" + icon_state = "tile-carpet" + force = 1.0 + throwforce = 1.0 + throw_speed = 5 + throw_range = 20 + flags = 0 + no_variants = FALSE + default_type = MAT_CARPET + +/obj/item/stack/tile/carpet/teal + name = "teal carpet" + singular_name = "teal carpet" + desc = "A piece of teal carpet. It is the same size as a normal floor tile!" + icon_state = "tile-tealcarpet" + default_type = MAT_CARPET_TEAL + +/obj/item/stack/tile/carpet/bcarpet + name = "black carpet" + singular_name = "black carpet" + desc = "A piece of black carpet. It is the same size as a normal floor tile!" + icon_state = "tile-carpet" + default_type = MAT_CARPET_BLACK + +/obj/item/stack/tile/carpet/blucarpet + name = "blue carpet" + singular_name = "blue carpet" + desc = "A piece of blue carpet. It is the same size as a normal floor tile!" + icon_state = "tile-carpet" + default_type = MAT_CARPET_BLUE + +/obj/item/stack/tile/carpet/turcarpet + name = "turquoise carpet" + singular_name = "turquoise carpet" + desc = "A piece of turquoise carpet. It is the same size as a normal floor tile!" + icon_state = "tile-carpet" + default_type = MAT_CARPET_TURQUOISE + +/obj/item/stack/tile/carpet/sblucarpet + name = "silver blue carpet" + singular_name = "silver blue carpet" + desc = "A piece of silver blue carpet. It is the same size as a normal floor tile!" + icon_state = "tile-carpet" + default_type = MAT_CARPET_SILVERBLUE + +/obj/item/stack/tile/carpet/gaycarpet + name = "clown carpet" + singular_name = "clown carpet" + desc = "A piece of clown carpet. It is the same size as a normal floor tile!" + icon_state = "tile-carpet" + default_type = MAT_CARPET_PINK + +/obj/item/stack/tile/carpet/purcarpet + name = "purple carpet" + singular_name = "purple carpet" + desc = "A piece of purple carpet. It is the same size as a normal floor tile!" + icon_state = "tile-carpet" + default_type = MAT_CARPET_PURPLE + +/obj/item/stack/tile/carpet/oracarpet + name = "orange carpet" + singular_name = "orange carpet" + desc = "A piece of orange carpet. It is the same size as a normal floor tile!" + icon_state = "tile-carpet" + default_type = MAT_CARPET_ORANGE \ No newline at end of file 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 72edab89e3..fdd40ef785 100644 --- a/code/game/objects/structures/stool_bed_chair_nest/bed.dm +++ b/code/game/objects/structures/stool_bed_chair_nest/bed.dm @@ -102,9 +102,11 @@ user.drop_from_inventory(C) qdel(C) return - var/padding_type //This is awful but it needs to be like this until tiles are given a material var. - if(istype(W,/obj/item/stack/tile/carpet)) - padding_type = "carpet" + var/padding_type + if(istype(W,/obj/item/stack/tile/carpet)) //CHOMPEDIT: making carpets different and not just the boring basic red no matter carpet type, consider merging material variables at stack level in future - Jack + var/obj/item/stack/tile/carpet/M = W + if(M.material && (M.material.flags & MATERIAL_PADDING)) + padding_type = "[M.material.name]" else if(istype(W,/obj/item/stack/material)) var/obj/item/stack/material/M = W if(M.material && (M.material.flags & MATERIAL_PADDING)) 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 8950533b8e..1b931fc65f 100644 --- a/code/game/objects/structures/stool_bed_chair_nest/chairs.dm +++ b/code/game/objects/structures/stool_bed_chair_nest/chairs.dm @@ -93,7 +93,9 @@ // Leaving this in for the sake of compilation. /obj/structure/bed/chair/comfy desc = "It's a chair. It looks comfy." - icon_state = "comfychair_preview" + icon = 'icons/obj/furniture_ch.dmi' //CHOMPEDIT START: Making the premade chairs not have the basic chair visible, sometime make the constructed ones work as well + icon_state = "comfychair" + base_icon = "comfychair" //CHOMPEDIT END /obj/structure/bed/chair/comfy/brown/New(var/newloc,var/newmaterial) ..(newloc,"steel","leather") diff --git a/code/game/objects/structures/stool_bed_chair_nest/chairs_ch.dm b/code/game/objects/structures/stool_bed_chair_nest/chairs_ch.dm index 7918f450d2..ecdebf4305 100644 --- a/code/game/objects/structures/stool_bed_chair_nest/chairs_ch.dm +++ b/code/game/objects/structures/stool_bed_chair_nest/chairs_ch.dm @@ -16,4 +16,16 @@ /obj/structure/bed/chair/oldsofa/corner icon_state = "sofacornerOLD" - base_icon = "sofacornerOLD" \ No newline at end of file + base_icon = "sofacornerOLD" + +/obj/structure/bed/chair/sofa/sif_ora/New(var/newloc,var/newmaterial) + ..(newloc,MAT_SIFWOOD,MAT_CARPET_ORANGE) + +/obj/structure/bed/chair/sofa/left/sif_ora/New(var/newloc,var/newmaterial) + ..(newloc,MAT_SIFWOOD,MAT_CARPET_ORANGE) + +/obj/structure/bed/chair/sofa/right/sif_ora/New(var/newloc,var/newmaterial) + ..(newloc,MAT_SIFWOOD,MAT_CARPET_ORANGE) + +/obj/structure/bed/chair/sofa/corner/sif_ora/New(var/newloc,var/newmaterial) + ..(newloc,MAT_SIFWOOD,MAT_CARPET_ORANGE) \ No newline at end of file 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 d86c9d4606..190bf61ab3 100644 --- a/code/game/objects/structures/stool_bed_chair_nest/stools.dm +++ b/code/game/objects/structures/stool_bed_chair_nest/stools.dm @@ -30,7 +30,7 @@ var/global/list/stool_cache = list() //haha stool update_icon() /obj/item/weapon/stool/padded/New(var/newloc, var/new_material) - ..(newloc, "steel", "carpet") + ..(newloc,"steel",MAT_CARPET) //CHOMPEDIT: New tile material system /obj/item/weapon/stool/update_icon() // Prep icon. @@ -121,9 +121,11 @@ var/global/list/stool_cache = list() //haha stool user.drop_from_inventory(C) qdel(C) return - var/padding_type //This is awful but it needs to be like this until tiles are given a material var. - if(istype(W,/obj/item/stack/tile/carpet)) - padding_type = "carpet" + var/padding_type + if(istype(W,/obj/item/stack/tile/carpet)) //CHOMPEDIT: making carpets different and not just the boring basic red no matter carpet type, consider merging material variables at stack level in future + var/obj/item/stack/tile/carpet/M = W + if(M.material && (M.material.flags & MATERIAL_PADDING)) + padding_type = "[M.material.name]" else if(istype(W,/obj/item/stack/material)) var/obj/item/stack/material/M = W if(M.material && (M.material.flags & MATERIAL_PADDING)) diff --git a/code/game/turfs/flooring/flooring.dm b/code/game/turfs/flooring/flooring.dm index 2f45eb7b51..78ff6746cb 100644 --- a/code/game/turfs/flooring/flooring.dm +++ b/code/game/turfs/flooring/flooring.dm @@ -100,7 +100,7 @@ var/list/flooring_types icon_base = "snowyplayingdrift" /decl/flooring/carpet - name = "carpet" + name = "red carpet" //CHOMPEDIT renamed to red carpet desc = "Imported and comfy." icon = 'icons/turf/flooring/carpet.dmi' icon_base = "carpet" @@ -125,7 +125,7 @@ var/list/flooring_types build_type = /obj/item/stack/tile/carpet/blucarpet /decl/flooring/carpet/turcarpet - name = "tur carpet" + name = "turquoise carpet" //CHOMPEDIT: changing name to turquoise icon_base = "turcarpet" build_type = /obj/item/stack/tile/carpet/turcarpet diff --git a/code/modules/materials/material_recipes_ch.dm b/code/modules/materials/material_recipes_ch.dm index 26b6c93ba3..bf99c375cf 100644 --- a/code/modules/materials/material_recipes_ch.dm +++ b/code/modules/materials/material_recipes_ch.dm @@ -1,7 +1,23 @@ +//In future consider cleaning up often used recipes by adding them to the general recipe list with material criteria + /material/plasteel/generate_recipes() . = ..() recipes += new/datum/stack_recipe("Hammer Head", /obj/item/weapon/hammer_head, 2) - + recipes += new/datum/stack_recipe_list("sofas", list( \ + new/datum/stack_recipe("sofa middle", /obj/structure/bed/chair/sofa, 1, one_per_turf = 1, on_floor = 1), \ + new/datum/stack_recipe("sofa left", /obj/structure/bed/chair/sofa/left, 1, one_per_turf = 1, on_floor = 1), \ + new/datum/stack_recipe("sofa right", /obj/structure/bed/chair/sofa/right, 1, one_per_turf = 1, on_floor = 1), \ + new/datum/stack_recipe("sofa corner", /obj/structure/bed/chair/sofa/corner, 1, one_per_turf = 1, on_floor = 1), \ + )) + +/material/plastic/generate_recipes() + . = ..() + recipes += new/datum/stack_recipe_list("sofas", list( \ + new/datum/stack_recipe("sofa middle", /obj/structure/bed/chair/sofa, 1, one_per_turf = 1, on_floor = 1, supplied_material = "[name]"), \ + new/datum/stack_recipe("sofa left", /obj/structure/bed/chair/sofa/left, 1, one_per_turf = 1, on_floor = 1, supplied_material = "[name]"), \ + new/datum/stack_recipe("sofa right", /obj/structure/bed/chair/sofa/right, 1, one_per_turf = 1, on_floor = 1, supplied_material = "[name]"), \ + new/datum/stack_recipe("sofa corner", /obj/structure/bed/chair/sofa/corner, 1, one_per_turf = 1, on_floor = 1, supplied_material = "[name]"), \ + )) /material/wood/generate_recipes() //Is a little sad we cant have lovely wooden sofa . = ..() diff --git a/code/modules/materials/materials.dm b/code/modules/materials/materials.dm index 724f4771f6..65fa1580af 100644 --- a/code/modules/materials/materials.dm +++ b/code/modules/materials/materials.dm @@ -1011,6 +1011,8 @@ var/list/name_to_material protectiveness = 3 // 13% conductive = 0 +//CHOMPEDIT: Moved to materials_ch and changed to allow for material var +/* /material/carpet name = "carpet" display_name = "comfy" @@ -1023,6 +1025,7 @@ var/list/name_to_material sheet_plural_name = "tiles" protectiveness = 1 // 4% conductive = 0 +*/ /material/cotton name = "cotton" diff --git a/code/modules/materials/materials_ch.dm b/code/modules/materials/materials_ch.dm new file mode 100644 index 0000000000..94a1516f38 --- /dev/null +++ b/code/modules/materials/materials_ch.dm @@ -0,0 +1,55 @@ +//CARPET materials + +/material/carpet + name = MAT_CARPET + display_name = "comfy" + use_name = "upholstery" + icon_colour = "#DB2626" + flags = MATERIAL_PADDING + stack_type = /obj/item/stack/tile/carpet + ignition_point = T0C+232 + melting_point = T0C+300 + sheet_singular_name = "tile" + sheet_plural_name = "tiles" + protectiveness = 1 // 4% + conductive = 0 + +/material/carpet/teal + name = MAT_CARPET_TEAL + icon_colour = "#007575" + stack_type = /obj/item/stack/tile/carpet/teal + +/material/carpet/bcarpet + name = MAT_CARPET_BLACK + icon_colour = "#1B171E" + stack_type = /obj/item/stack/tile/carpet/bcarpet + +/material/carpet/blucarpet + name = MAT_CARPET_BLUE + icon_colour = "#122CDF" + stack_type = /obj/item/stack/tile/carpet/blucarpet + +/material/carpet/turcarpet + name = MAT_CARPET_TURQUOISE + icon_colour = "#41A997" + stack_type = /obj/item/stack/tile/carpet/turcarpet + +/material/carpet/sblucarpet + name = MAT_CARPET_SILVERBLUE + icon_colour = "#547EC6" + stack_type = /obj/item/stack/tile/carpet/sblucarpet + +/material/carpet/gaycarpet + name = MAT_CARPET_PINK + icon_colour = "#E12C87" + stack_type = /obj/item/stack/tile/carpet/gaycarpet + +/material/carpet/purcarpet + name = MAT_CARPET_PURPLE + icon_colour = "#B500A6" + stack_type = /obj/item/stack/tile/carpet/purcarpet + +/material/carpet/oracarpet + name = MAT_CARPET_ORANGE + icon_colour = "#D1D000" + stack_type = /obj/item/stack/tile/carpet/oracarpet \ No newline at end of file diff --git a/icons/obj/furniture_ch.dmi b/icons/obj/furniture_ch.dmi index f013a520c4..576f661a7a 100644 Binary files a/icons/obj/furniture_ch.dmi and b/icons/obj/furniture_ch.dmi differ diff --git a/vorestation.dme b/vorestation.dme index 11dbedfaa2..527d019cd0 100644 --- a/vorestation.dme +++ b/vorestation.dme @@ -1143,6 +1143,7 @@ #include "code\game\objects\items\stacks\sheets\leather.dm" #include "code\game\objects\items\stacks\tiles\fifty_spawner_tiles.dm" #include "code\game\objects\items\stacks\tiles\tile_types.dm" +#include "code\game\objects\items\stacks\tiles\tile_types_ch.dm" #include "code\game\objects\items\weapons\AI_modules.dm" #include "code\game\objects\items\weapons\autopsy.dm" #include "code\game\objects\items\weapons\bones.dm" @@ -2232,6 +2233,7 @@ #include "code\modules\materials\material_sheets.dm" #include "code\modules\materials\material_synth.dm" #include "code\modules\materials\materials.dm" +#include "code\modules\materials\materials_ch.dm" #include "code\modules\materials\materials_vr.dm" #include "code\modules\media\media_machinery.dm" #include "code\modules\media\media_player_html5.dm"