[MIRROR] Fix stacking of blast doors and shutters from crafting (#3822)

* Fix stacking of blast doors and shutters from crafting (#57360)

* Fix stacking of blast doors and shutters from crafting

Co-authored-by: Ghilker <42839747+Ghilker@users.noreply.github.com>
This commit is contained in:
SkyratBot
2021-03-04 01:01:44 +00:00
committed by GitHub
co-authored by Ghilker
parent 7f7a55ea40
commit d9ca6addde
2 changed files with 8 additions and 0 deletions
@@ -195,6 +195,10 @@
var/send_feedback = 1
if(check_contents(a, R, contents))
if(check_tools(a, R, contents))
if(R.one_per_turf)
for(var/content as anything in get_turf(a))
if(istype(content, R.result))
return ", object already present."
//If we're a mob we'll try a do_after; non mobs will instead instantly construct the item
if(ismob(a) && !do_after(a, R.time, target = a))
return "."
@@ -22,6 +22,8 @@
var/additional_req_text
///Required machines for the craft, set the assigned value of the typepath to CRAFTING_MACHINERY_CONSUME or CRAFTING_MACHINERY_USE. Lazy associative list: type_path key -> flag value.
var/list/machinery
///Should only one object exist on the same turf?
var/one_per_turf = FALSE
/datum/crafting_recipe/New()
if(!(result in reqs))
@@ -1165,6 +1167,7 @@
tool_behaviors = list(TOOL_SCREWDRIVER, TOOL_MULTITOOL, TOOL_WIRECUTTER, TOOL_WELDER)
time = 15 SECONDS
category = CAT_MISC
one_per_turf = TRUE
/datum/crafting_recipe/blast_doors
name = "Blast Door"
@@ -1176,6 +1179,7 @@
tool_behaviors = list(TOOL_SCREWDRIVER, TOOL_MULTITOOL, TOOL_WIRECUTTER, TOOL_WELDER)
time = 30 SECONDS
category = CAT_MISC
one_per_turf = TRUE
/datum/crafting_recipe/aquarium
name = "Aquarium"