Merge branch 'master' into donut

This commit is contained in:
Trilbyspaceclone
2019-12-17 15:12:51 -05:00
committed by GitHub
700 changed files with 12811 additions and 3750 deletions
@@ -39,6 +39,9 @@ GLOBAL_LIST_INIT(glass_recipes, list ( \
/obj/item/stack/sheet/glass/fifty
amount = 50
/obj/item/stack/sheet/glass/five
amount = 5
/obj/item/stack/sheet/glass/Initialize(mapload, new_amount, merge = TRUE)
recipes = GLOB.glass_recipes
return ..()
@@ -55,6 +55,9 @@ GLOBAL_LIST_INIT(sandstone_recipes, list ( \
/obj/item/stack/sheet/mineral/sandstone/thirty
amount = 30
/obj/item/stack/sheet/mineral/sandstone/twelve
amount = 12
/*
* Sandbags
*/
@@ -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 ..()
@@ -247,6 +276,33 @@ GLOBAL_LIST_INIT(wood_recipes, list ( \
/obj/item/stack/sheet/mineral/wood/fifty
amount = 50
/*
* Bamboo
*/
GLOBAL_LIST_INIT(bamboo_recipes, list ( \
new/datum/stack_recipe("punji sticks trap", /obj/structure/punji_sticks, 5, time = 30, one_per_turf = TRUE, on_floor = TRUE), \
new/datum/stack_recipe("blow gun", /obj/item/gun/syringe/blowgun, 10, time = 70), \
))
/obj/item/stack/sheet/mineral/bamboo
name = "bamboo cuttings"
desc = "Finely cut bamboo sticks."
singular_name = "cut bamboo"
icon_state = "sheet-bamboo"
item_state = "sheet-bamboo"
icon = 'icons/obj/stack_objects.dmi'
throwforce = 15
armor = list("melee" = 0, "bullet" = 0, "laser" = 0, "energy" = 0, "bomb" = 0, "bio" = 0, "rad" = 0, "fire" = 50, "acid" = 0)
resistance_flags = FLAMMABLE
merge_type = /obj/item/stack/sheet/mineral/bamboo
grind_results = list("carbon" = 5)
/obj/item/stack/sheet/mineral/bamboo/Initialize(mapload, new_amount, merge = TRUE)
recipes = GLOB.bamboo_recipes
return ..()
/*
* Cloth
*/
@@ -696,5 +752,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
+3 -1
View File
@@ -350,6 +350,7 @@
. = ..()
/obj/item/stack/AltClick(mob/living/user)
. = ..()
if(!istype(user) || !user.canUseTopic(src, BE_CLOSE, ismonkey(user)))
return
if(is_cyborg)
@@ -363,10 +364,11 @@
max = get_amount()
stackmaterial = min(max, stackmaterial)
if(stackmaterial == null || stackmaterial <= 0 || !user.canUseTopic(src, BE_CLOSE, ismonkey(user)))
return
return TRUE
else
change_stack(user, stackmaterial)
to_chat(user, "<span class='notice'>You take [stackmaterial] sheets out of the stack</span>")
return TRUE
/obj/item/stack/proc/change_stack(mob/user, amount)
if(!use(amount, TRUE, FALSE))