diff --git a/code/__defines/materials.dm b/code/__defines/materials.dm index 38a84e7169..12a671b464 100644 --- a/code/__defines/materials.dm +++ b/code/__defines/materials.dm @@ -34,6 +34,7 @@ #define MAT_CHITIN "chitin" #define MAT_CLOTH "cloth" #define MAT_SYNCLOTH "syncloth" +#define MAT_FIBERS "fibers" #define MAT_COPPER "copper" #define MAT_QUARTZ "quartz" #define MAT_TIN "tin" diff --git a/code/game/objects/structures/flora/flora.dm b/code/game/objects/structures/flora/flora.dm index ccb3106886..6f7963509e 100644 --- a/code/game/objects/structures/flora/flora.dm +++ b/code/game/objects/structures/flora/flora.dm @@ -15,6 +15,7 @@ var/harvest_tool = null // The type of item used to harvest the plant. var/harvest_count = 0 + var/destroy_on_harvest = FALSE var/randomize_harvest_count = TRUE var/max_harvests = 0 @@ -53,6 +54,8 @@ else to_chat(user, "You harvest \the [AM] from \the [src].") + if(harvest_count >= max_harvests && destroy_on_harvest) + qdel(src) return ..(W, user) @@ -66,11 +69,12 @@ /obj/structure/flora/proc/spawn_harvest(var/path = null, var/mob/user = null) if(!ispath(path)) return 0 - var/turf/Target = get_turf(src) + + var/atom/movable/AM = new path() if(user) - Target = get_turf(user) - - var/atom/movable/AM = new path(Target) + user.put_in_hands(AM) + else + AM.forceMove(drop_location()) harvest_count++ return AM @@ -80,6 +84,12 @@ name = "bush" icon = 'icons/obj/flora/snowflora.dmi' icon_state = "snowbush1" + + destroy_on_harvest = TRUE + harvest_tool = /obj/item/weapon/material/knife + randomize_harvest_count = FALSE + harvest_loot = list(/obj/item/stack/material/fiber = 1) + max_harvests = 1 /obj/structure/flora/bush/New() ..() @@ -99,6 +109,12 @@ name = "bush" icon = 'icons/obj/flora/ausflora.dmi' icon_state = "firstbush_1" + + destroy_on_harvest = TRUE + harvest_tool = /obj/item/weapon/material/knife + randomize_harvest_count = FALSE + harvest_loot = list(/obj/item/stack/material/fiber = 1) + max_harvests = 1 /obj/structure/flora/ausbushes/New() ..() diff --git a/code/modules/materials/fifty_spawner_mats.dm b/code/modules/materials/fifty_spawner_mats.dm index af2e3703e8..24f3985c4a 100644 --- a/code/modules/materials/fifty_spawner_mats.dm +++ b/code/modules/materials/fifty_spawner_mats.dm @@ -104,6 +104,10 @@ name = "stack of cloth" type_to_spawn = /obj/item/stack/material/cloth +/obj/fiftyspawner/fiber + name = "stack of plant fibers" + type_to_spawn = /obj/item/stack/material/fiber + /obj/fiftyspawner/cardboard name = "stack of cardboard" type_to_spawn = /obj/item/stack/material/cardboard diff --git a/code/modules/materials/materials/organic/cloth.dm b/code/modules/materials/materials/organic/cloth.dm index 260c47f5b0..1908597d32 100644 --- a/code/modules/materials/materials/organic/cloth.dm +++ b/code/modules/materials/materials/organic/cloth.dm @@ -123,4 +123,17 @@ ignition_point = T0C+232 melting_point = T0C+300 protectiveness = 1 // 4% - conductive = 0 \ No newline at end of file + conductive = 0 + +/datum/material/fibers + name = MAT_FIBERS + display_name = "plant" + sheet_singular_name = "fiber" + sheet_singular_name = "fibers" + icon_colour = "#006b0e" + flags = MATERIAL_PADDING + ignition_point = T0C+232 + melting_point = T0C+300 + protectiveness = 1 // 4% + conductive = 0 + pass_stack_colors = TRUE diff --git a/code/modules/materials/sheets/organic/textiles.dm b/code/modules/materials/sheets/organic/textiles.dm index a534ee19b1..8e5594eaa0 100644 --- a/code/modules/materials/sheets/organic/textiles.dm +++ b/code/modules/materials/sheets/organic/textiles.dm @@ -11,6 +11,7 @@ /obj/item/stack/material/cloth name = "cloth" + desc = "Individual fibers woven into a cloth." icon_state = "sheet-cloth" default_type = "cloth" no_variants = FALSE @@ -21,3 +22,13 @@ /obj/item/stack/material/cloth/diyaab color = "#c6ccf0" + +/obj/item/stack/material/fiber + name = "plant fiber" + desc = "Some all-natural plant fibers." + icon_state = "sheet-fiber" + default_type = MAT_FIBERS + pass_color = TRUE + apply_colour = TRUE + drop_sound = 'sound/items/drop/clothing.ogg' + pickup_sound = 'sound/items/pickup/clothing.ogg' diff --git a/icons/obj/stacks.dmi b/icons/obj/stacks.dmi index 1e8faff31f..430314b223 100644 Binary files a/icons/obj/stacks.dmi and b/icons/obj/stacks.dmi differ