mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-26 05:27:01 +01:00
[Testmerge ready] Ports tool behaviours; refactors all tools; adds functionality for self-filling reagent containers (#11700)
* Adds support for self-filling reagent containers * Sets tool_behaviour on the default set of tools * Fixing merge conflicts * Refactors welder to use tool behaviour * The refactor: part I * The refactor: part II * Tool Refactor Part III: Revenge of the Maint * Tool Refactor Part IV: A New Hope * Tool Refactor Part V: The Oldcoder Strikes Back * Tool Refactor Part VI: Return of the Coder * VII * Holy shit, it compiles?! * Nannek I completed your TODO, you owe me ice cream * Tool helpers; telepad is compliant * Bugtest, Round 1: Fight Fuck refactoring disposals * Buggfixing, Round 2: Electric Boogaloo * Personal crafting uses tool behaviours now * Construction datums use new tool behaviours; better way of handling fueltank refuelling; more bugfixing * multitool_check_buffer change; removes some useless things in tool_helpers * proc name change * TRUE/FALSE changes * Bugfixing, Round 3: A Good Day To Bugfix Hard Fixes multiple issues raised by the testmerge * Minor style changes
This commit is contained in:
@@ -33,17 +33,18 @@
|
||||
. = ..()
|
||||
. += "<span class='info'>[src] is assembled in the [parent_organ == "r_arm" ? "right" : "left"] arm configuration. You can use a screwdriver to reassemble it.</span>"
|
||||
|
||||
/obj/item/organ/internal/cyberimp/arm/attackby(obj/item/I, mob/user, params)
|
||||
if(isscrewdriver(I))
|
||||
if(parent_organ == "r_arm")
|
||||
parent_organ = "l_arm"
|
||||
else
|
||||
parent_organ = "r_arm"
|
||||
slot = parent_organ + "_device"
|
||||
to_chat(user, "<span class='notice'>You modify [src] to be installed on the [parent_organ == "r_arm" ? "right" : "left"] arm.</span>")
|
||||
update_icon()
|
||||
/obj/item/organ/internal/cyberimp/arm/screwdriver_act(mob/user, obj/item/I)
|
||||
. = TRUE
|
||||
if(!I.use_tool(src, user, 0, volume = I.tool_volume))
|
||||
return
|
||||
if(parent_organ == "r_arm")
|
||||
parent_organ = "l_arm"
|
||||
else
|
||||
return ..()
|
||||
parent_organ = "r_arm"
|
||||
slot = parent_organ + "_device"
|
||||
to_chat(user, "<span class='notice'>You modify [src] to be installed on the [parent_organ == "r_arm" ? "right" : "left"] arm.</span>")
|
||||
update_icon()
|
||||
|
||||
|
||||
/obj/item/organ/internal/cyberimp/arm/remove(mob/living/carbon/M, special = 0)
|
||||
Retract()
|
||||
|
||||
@@ -31,10 +31,11 @@
|
||||
/datum/surgery_step/hardsuit/can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
if(!istype(target))
|
||||
return 0
|
||||
if(istype(tool,/obj/item/weldingtool))
|
||||
var/obj/item/weldingtool/welder = tool
|
||||
if(!welder.isOn() || !welder.remove_fuel(1,user))
|
||||
return 0
|
||||
if(tool.tool_behaviour == TOOL_WELDER)
|
||||
if(!tool.tool_use_check(user, 0))
|
||||
return
|
||||
if(!tool.use(1))
|
||||
return
|
||||
return (target_zone == "chest") && istype(target.back, /obj/item/rig) && (target.back.flags&NODROP)
|
||||
|
||||
/datum/surgery_step/rigsuit/begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
|
||||
@@ -225,9 +225,8 @@
|
||||
if(!(affected.brute_dam > 0 || affected.disfigured))
|
||||
to_chat(user, "<span class='warning'>The [affected] does not require welding repair!</span>")
|
||||
return -1
|
||||
if(istype(tool,/obj/item/weldingtool))
|
||||
var/obj/item/weldingtool/welder = tool
|
||||
if(!welder.isOn() || !welder.remove_fuel(1,user))
|
||||
if(tool.tool_behaviour == TOOL_WELDER)
|
||||
if(!tool.use(1))
|
||||
return -1
|
||||
user.visible_message("[user] begins to patch damage to [target]'s [affected.name]'s support structure with \the [tool]." , \
|
||||
"You begin to patch damage to [target]'s [affected.name]'s support structure with \the [tool].")
|
||||
|
||||
Reference in New Issue
Block a user