Merge branch 'tool_behavior-replacing' of https://github.com/SandPoot/Citadel-Station-13 into tool_behavior-replacing

This commit is contained in:
SandPoot
2021-02-18 15:04:22 -03:00
223 changed files with 1458 additions and 737 deletions
@@ -45,8 +45,8 @@
/datum/crafting_recipe/bloodsucker/blackcoffin
name = "Black Coffin"
result = /obj/structure/closet/crate/coffin/blackcoffin
tools = list(/obj/item/weldingtool,
/obj/item/screwdriver)
tools = list(TOOL_WELDER,
TOOL_SCREWDRIVER)
reqs = list(/obj/item/stack/sheet/cloth = 1,
/obj/item/stack/sheet/mineral/wood = 5,
/obj/item/stack/sheet/metal = 1)
@@ -72,8 +72,8 @@
/datum/crafting_recipe/bloodsucker/metalcoffin
name = "Metal Coffin"
result =/obj/structure/closet/crate/coffin/metalcoffin
tools = list(/obj/item/weldingtool,
/obj/item/screwdriver)
tools = list(TOOL_WELDER,
TOOL_SCREWDRIVER)
reqs = list(/obj/item/stack/sheet/metal = 5)
time = 100
subcategory = CAT_FURNITURE
@@ -84,9 +84,9 @@
name = "Persuasion Rack"
//desc = "For converting crewmembers into loyal Vassals."
result = /obj/structure/bloodsucker/vassalrack
tools = list(/obj/item/weldingtool,
//obj/item/screwdriver,
/obj/item/wrench
tools = list(TOOL_WELDER,
//TOOL_SCREWDRIVER,
TOOL_WRENCH
)
reqs = list(/obj/item/stack/sheet/mineral/wood = 3,
/obj/item/stack/sheet/metal = 2,
@@ -108,8 +108,8 @@
name = "Candelabrum"
//desc = "For converting crewmembers into loyal Vassals."
result = /obj/structure/bloodsucker/candelabrum
tools = list(/obj/item/weldingtool,
/obj/item/wrench
tools = list(TOOL_WELDER,
TOOL_WRENCH
)
reqs = list(/obj/item/stack/sheet/metal = 3,
/obj/item/stack/rods = 1,
+10 -11
View File
@@ -84,38 +84,37 @@ handles linking back and forth.
_MakeLocal()
/datum/component/remote_materials/proc/OnAttackBy(datum/source, obj/item/I, mob/user)
if (istype(I, /obj/item/multitool))
var/obj/item/multitool/M = I
if (!QDELETED(M.buffer) && istype(M.buffer, /obj/machinery/ore_silo))
if (silo == M.buffer)
if(I.tool_behaviour == TOOL_MULTITOOL)
if(!(I.buffer) && istype(I.buffer, /obj/machinery/ore_silo))
if(silo == I.buffer)
to_chat(user, "<span class='notice'>[parent] is already connected to [silo].</span>")
return COMPONENT_NO_AFTERATTACK
if (silo)
if(silo)
silo.connected -= src
silo.updateUsrDialog()
else if (mat_container)
else if(mat_container)
mat_container.retrieve_all()
qdel(mat_container)
silo = M.buffer
silo = I.buffer
silo.connected += src
silo.updateUsrDialog()
mat_container = silo.GetComponent(/datum/component/material_container)
to_chat(user, "<span class='notice'>You connect [parent] to [silo] from the multitool's buffer.</span>")
return COMPONENT_NO_AFTERATTACK
else if (silo && istype(I, /obj/item/stack))
if (silo.remote_attackby(parent, user, I))
else if(silo && istype(I, /obj/item/stack))
if(silo.remote_attackby(parent, user, I))
return COMPONENT_NO_AFTERATTACK
/datum/component/remote_materials/proc/on_hold()
return silo && silo.holds["[get_area(parent)]/[category]"]
/datum/component/remote_materials/proc/silo_log(obj/machinery/M, action, amount, noun, list/mats)
if (silo)
if(silo)
silo.silo_log(M || parent, action, amount, noun, mats)
/datum/component/remote_materials/proc/format_amount()
if (mat_container)
if(mat_container)
return "[mat_container.total_amount] / [mat_container.max_amount == INFINITY ? "Unlimited" : mat_container.max_amount] ([silo ? "remote" : "local"])"
else
return "0 / 0"
+1 -1
View File
@@ -125,7 +125,7 @@
else
if(!default_can_user_rotate(user, default_rotation_direction))
return
if(istype(I,/obj/item/wrench))
if(I.tool_behaviour == TOOL_WRENCH)
BaseRot(user,default_rotation_direction)
return COMPONENT_NO_AFTERATTACK
+4 -5
View File
@@ -265,11 +265,10 @@
reveal_wires = TRUE
// Same for anyone with an abductor multitool.
else if(user.is_holding_item_of_type(/obj/item/multitool/abductor))
reveal_wires = TRUE
// and advanced multitool
else if(user.is_holding_item_of_type(/obj/item/multitool/advanced))
reveal_wires = TRUE
else if(user.is_holding_tool_quality(TOOL_MULTITOOL))
var/obj/item/tool = user.is_holding_tool_quality(TOOL_MULTITOOL)
if(tool.show_wires)
reveal_wires = TRUE
// Station blueprints do that too, but only if the wires are not randomized.
else if(user.is_holding_item_of_type(/obj/item/areaeditor/blueprints) && !randomize)
+5 -1
View File
@@ -70,19 +70,23 @@
if(R.shell)
R.undeploy()
R.set_connected_ai(null)
R.logevent("AI connection fault [mend?"cleared":"detected"]")
if(WIRE_LAWSYNC) // Cut the law wire, and the borg will no longer receive law updates from its AI. Repair and it will re-sync.
if(mend)
if(!R.emagged)
R.lawupdate = TRUE
else if(!R.deployed) //AI shells must always have the same laws as the AI
R.lawupdate = FALSE
R.logevent("Lawsync Module fault [mend?"cleared":"detected"]")
if (WIRE_CAMERA) // Disable the camera.
if(!QDELETED(R.builtInCamera) && !R.scrambledcodes)
R.builtInCamera.status = mend
R.builtInCamera.toggle_cam(usr, 0)
R.visible_message("[R]'s camera lens focuses loudly.", "Your camera lens focuses loudly.")
R.visible_message("<span class='notice'>[R]'s camera lens focuses loudly.</span>", "<span class='notice'>Your camera lens focuses loudly.</span>")
R.logevent("Camera Module fault [mend?"cleared":"detected"]")
if(WIRE_LOCKDOWN) // Simple lockdown.
R.SetLockdown(!mend)
R.logevent("Motor Controller fault [mend?"cleared":"detected"]")
if(WIRE_RESET_MODULE)
if(R.has_module() && !mend)
R.ResetModule()