[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:
Citinited
2020-02-15 13:31:08 -07:00
committed by GitHub
parent 5b1941e784
commit fddff1049b
238 changed files with 6681 additions and 5544 deletions
+16 -8
View File
@@ -244,17 +244,14 @@
scanner.computer.inventory.Add(src)
to_chat(user, "[W]'s screen flashes: 'Book stored in buffer. Title added to general inventory.'")
return 1
else if(istype(W, /obj/item/kitchen/knife) || iswirecutter(W))
if(carved)
return 1
to_chat(user, "<span class='notice'>You begin to carve out [title].</span>")
if(do_after(user, 30 * W.toolspeed, target = src))
to_chat(user, "<span class='notice'>You carve out the pages from [title]! You didn't want to read it anyway.</span>")
carved = 1
return 1
else if(istype(W, /obj/item/kitchen/knife) && !carved)
carve_book(user, W)
else
return ..()
/obj/item/book/wirecutter_act(mob/user, obj/item/I)
return carve_book(user, I)
/obj/item/book/attack(mob/M, mob/living/user)
if(user.a_intent == INTENT_HELP)
force = 0
@@ -264,6 +261,17 @@
attack_verb = list("bashed", "whacked")
..()
/obj/item/book/proc/carve_book(mob/user, obj/item/I)
if(!I.sharp && I.tool_behaviour != TOOL_WIRECUTTER) //Only sharp and wirecutter things can carve books
to_chat(user, "<span class='warning>You can't carve [title] using that!</span>")
return
if(carved)
return
to_chat(user, "<span class='notice'>You begin to carve out [title].</span>")
if(I.use_tool(src, user, 30, volume = I.tool_volume))
to_chat(user, "<span class='notice'>You carve out the pages from [title]! You didn't want to read it anyway.</span>")
carved = TRUE
return TRUE
/*
* Barcode Scanner
*/