Merge pull request #10011 from Arturlang/Bloodsuckers

Bloodsuckers, or, yknow, vampires.
This commit is contained in:
Putnam3145
2019-12-15 14:41:36 -08:00
committed by GitHub
104 changed files with 6026 additions and 35 deletions
@@ -228,7 +228,7 @@ GLOBAL_LIST_INIT(wood_recipes, list ( \
/obj/item/stack/sheet/mineral/wood
name = "wooden plank"
desc = "One can only guess that this is a bunch of wood."
desc = "One can only guess that this is a bunch of wood. You might be able to make a stake with this if you use something sharp on it"
singular_name = "wood plank"
icon_state = "sheet-wood"
item_state = "sheet-wood"
@@ -240,6 +240,35 @@ GLOBAL_LIST_INIT(wood_recipes, list ( \
novariants = TRUE
grind_results = list("carbon" = 20)
/obj/item/stack/sheet/mineral/wood/attackby(obj/item/W, mob/user, params) // NOTE: sheet_types.dm is where the WOOD stack lives. Maybe move this over there.
// Taken from /obj/item/stack/rods/attackby in [rods.dm]
if(W.get_sharpness())
user.visible_message("[user] begins whittling [src] into a pointy object.", \
"<span class='notice'>You begin whittling [src] into a sharp point at one end.</span>", \
"<span class='italics'>You hear wood carving.</span>")
// 8 Second Timer
if(!do_after(user, 80, TRUE, src))
return
// Make Stake
var/obj/item/stake/basic/new_item = new(user.loc)
user.visible_message("[user] finishes carving a stake out of [src].", \
"<span class='notice'>You finish carving a stake out of [src].</span>")
// Prepare to Put in Hands (if holding wood)
var/obj/item/stack/sheet/mineral/wood/N = src
var/replace = (user.get_inactive_held_item() == N)
// Use Wood
N.use(1)
// If stack depleted, put item in that hand (if it had one)
if (!N && replace)
user.put_in_hands(new_item)
if(istype(W, merge_type))
var/obj/item/stack/S = W
if(merge(S))
to_chat(user, "<span class='notice'>Your [S.name] stack now contains [S.get_amount()] [S.singular_name]\s.</span>")
else
. = ..()
/obj/item/stack/sheet/mineral/wood/Initialize(mapload, new_amount, merge = TRUE)
recipes = GLOB.wood_recipes
return ..()
@@ -696,5 +725,3 @@ new /datum/stack_recipe("paper frame door", /obj/structure/mineral_door/paperfra
merge_type = /obj/item/stack/sheet/cotton/durathread
pull_effort = 70
loom_result = /obj/item/stack/sheet/durathread