From fa4bcbb246a6645b279516b8c77e7453170c6eae Mon Sep 17 00:00:00 2001 From: MortoSasye Date: Fri, 20 Sep 2024 02:55:27 -0300 Subject: [PATCH] freedom ? --- .../code/primitive_tools.dm | 9 ++++++ .../primitive_structures/code/calling_horn.dm | 24 ++++++++++++---- .../primitive_structures/code/furniture.dm | 28 +++++++++++++++---- .../code/hearthkin_rune_stone.dm | 24 ++++++++++++---- 4 files changed, 67 insertions(+), 18 deletions(-) diff --git a/modular_doppler/hearthkin/primitive_production/code/primitive_tools.dm b/modular_doppler/hearthkin/primitive_production/code/primitive_tools.dm index 6b33fbc1e5421..16861598339ed 100644 --- a/modular_doppler/hearthkin/primitive_production/code/primitive_tools.dm +++ b/modular_doppler/hearthkin/primitive_production/code/primitive_tools.dm @@ -1,3 +1,12 @@ +//generic primitive recipe +/datum/crafting_recipe/primitive_recipe + reqs = list( + /obj/item/stack/sheet/bone = 1, + /obj/item/stack/sheet/sinew = 1, + ) + time = 4 SECONDS + category = CAT_TOOLS + //ASH TOOL /obj/item/screwdriver/primitive name = "primitive screwdriver" diff --git a/modular_doppler/hearthkin/primitive_structures/code/calling_horn.dm b/modular_doppler/hearthkin/primitive_structures/code/calling_horn.dm index 4ccdb7b651cbd..a2ede88617218 100644 --- a/modular_doppler/hearthkin/primitive_structures/code/calling_horn.dm +++ b/modular_doppler/hearthkin/primitive_structures/code/calling_horn.dm @@ -8,14 +8,26 @@ resistance_flags = FLAMMABLE max_integrity = 100 integrity_failure = 0.35 - var/build_stack_type = /obj/item/stack/sheet/bronze - /// How many mats to drop when deconstructed - var/build_stack_amount = 10 - /// If this horn can be deconstructed using a wrench - var/can_deconstruct = TRUE -//Crafting code. +//Deconstruct code +/obj/structure/calling_horn/hearthkin/wrench_act(mob/living/user, obj/item/tool) + . = ..() + balloon_alert_to_viewers("disassembling...") + if(!do_after(user, 2 SECONDS, src)) + return + deconstruct(TRUE) + +/obj/structure/calling_horn/hearthkin/atom_deconstruct(disassembled) + var/obj/item/stack/sheet/bronze/bronze = new(drop_location(), 10) + transfer_fingerprints_to(bronze) + return ..() +//Anchor code +/obj/structure/calling_horn/hearthkin/click_ctrl(mob/user) + set_anchored(!anchored) + balloon_alert(user, "[anchored ? "secured" : "unsecured"]") + +//Crafting code. /datum/crafting_recipe/bronze_calling_horn name = "Bronze Calling Horn" category = CAT_FURNITURE diff --git a/modular_doppler/hearthkin/primitive_structures/code/furniture.dm b/modular_doppler/hearthkin/primitive_structures/code/furniture.dm index 76869bb2a0c3a..96c4b9833472d 100644 --- a/modular_doppler/hearthkin/primitive_structures/code/furniture.dm +++ b/modular_doppler/hearthkin/primitive_structures/code/furniture.dm @@ -82,12 +82,28 @@ max_integrity = 100 integrity_failure = 0.35 bound_height = 64 - /// What material this rug is made of - var/build_stack_type = /obj/item/stack/sheet/animalhide/goliath_hide/polar_bear_hide - /// How many mats to drop when deconstructed - var/build_stack_amount = 4 - /// If this rug can be deconstructed using a wrench - var/can_deconstruct = TRUE + +//Deconstruct code +/obj/structure/rugs/pelt/attackby(obj/item/attacking_item, mob/user, params) + if(!istype(attacking_item, /obj/item/knife/)) + return ..() + balloon_alert_to_viewers("cutting...") + if(!do_after(user, 5 SECONDS, target = src)) + balloon_alert_to_viewers("stopped cutting") + return FALSE + deconstruct(TRUE) + +/obj/structure/rugs/pelt/atom_deconstruct(disassembled) + var/obj/item/stack/sheet/animalhide/goliath_hide/polar_bear_hide/polar_bear_hide = new(drop_location(), 4) + transfer_fingerprints_to(polar_bear_hide) + return ..() + +//Anchor code +/obj/structure/rugs/pelt/click_ctrl(mob/user) + set_anchored(!anchored) + balloon_alert(user, "[anchored ? "secured" : "unsecured"]") + +//Crafting code /datum/crafting_recipe/white_pelts_rug name = "White Pelts Rug" diff --git a/modular_doppler/hearthkin/primitive_structures/code/hearthkin_rune_stone.dm b/modular_doppler/hearthkin/primitive_structures/code/hearthkin_rune_stone.dm index 83f382945dfa6..76ba6c0815833 100644 --- a/modular_doppler/hearthkin/primitive_structures/code/hearthkin_rune_stone.dm +++ b/modular_doppler/hearthkin/primitive_structures/code/hearthkin_rune_stone.dm @@ -8,14 +8,26 @@ resistance_flags = FLAMMABLE max_integrity = 100 integrity_failure = 0.35 - var/build_stack_type = /obj/item/stack/sheet/mineral/stone/ - /// How many mats to drop when deconstructed - var/build_stack_amount = 10 - /// If this rune stone can be deconstructed using a wrench - var/can_deconstruct = TRUE -//Crafting code. +//Deconstruct code +/obj/structure/hearthkin_rune_stone/crowbar_act(mob/living/user, obj/item/tool) + . = ..() + balloon_alert_to_viewers("disassembling...") + if(!do_after(user, 2 SECONDS, src)) + return + deconstruct(TRUE) + +/obj/structure/hearthkin_rune_stone/atom_deconstruct(disassembled) + var/obj/item/stack/sheet/mineral/stone/stone = new(drop_location(), 10) + transfer_fingerprints_to(stone) + return ..() +//Anchor code +/obj/structure/hearthkin_rune_stone/click_ctrl(mob/user) + set_anchored(!anchored) + balloon_alert(user, "[anchored ? "secured" : "unsecured"]") + +//Crafting code. /datum/crafting_recipe/hearthkin_rune_stone name = "Rune Stone" category = CAT_FURNITURE