dr-scripts
dr-scripts copied to clipboard
[script][workorders] Adds self-repair option to workorders
This is an advanced option we could potentially offer that would really ONLY be used by folks with Proper Forging Tool repair technique from the blacksmithing technique tree, which offers you 2 hours of damage immunity when you manually repair your tools.
Why: shop repair for light damage on 5 tools takes about a minute and a half. Self repair with this technique takes about two minutes 30 seconds. However, if you use those same tools within that 2 hour window, that averages out to ~20 seconds saved. If, like me, you do more, multiple crafts, the time savings on the stamp alone is probably substantial.
Who: Largely people who have gone hard into forging, especially blacksmithing, as this is a deep tier option.
Perks: The edit to the recently added common-crafting method for checking consumables opens up the option to set your own consumables limits down the road, and different consumables can be conserved in situations where, like oil, you really only ever use just the 1, but with pins, you can use as many as 3. Default remains 3 unless you send a new value when you call the method.
Even leaving aside the time savings, anyone with MT or high end tools knows you fork out a decent chunk at every repair. With this, if you have the techs, it's one use of the brush and one use of the oil, about 40copper no matter the tool.
Got a big tool order? throw ;workorders blacksmithing repair in after your first item and sail through the rest with pristine tools.
This is what it looks like when the tools are receptive to repair:
[workorders]>get my engineering logbook
You get an engineering work order logbook from inside your backpack.
[workorders]>give log to Master
You hand Master your logbook and bundled items, and are given 6,511 Dokoras in return.
[workorders]>put my logbook in my backpack
You put your logbook in your backpack.
[workorders]>get my oil from my backpack
You get a flask of oil from inside your backpack.
Gained: Trading(+7)
[workorders]>count my oil
The oil has 43 uses remaining.
[workorders]>put my oil in my backpack
You put your oil in your backpack.
[workorders]>get my stamp
You get a basic glaes stamp from inside your backpack.
[workorders]>get my wire brush
You get an iron wire brush from inside your backpack.
[workorders]>rub stamp with my wire brush
The basic stamp is not damaged enough to warrant repair.
[workorders]>put my wire brush in my backpack
You put your brush in your backpack.
[workorders]>put my stamp in my backpack
You put your stamp in your backpack.
[workorders]>get my sharpened drawknife
You get a sharpened steel drawknife from inside your backpack.
[workorders]>get my wire brush
You get an iron wire brush from inside your backpack.
[workorders]>rub sharpened drawknife with my wire brush
Gently you begin rubbing the wire brush along the surface of the sharpened drawknife.
Swipe after swipe removes substantial amounts of grime and debris from the drawknife. Using steady strokes you bring the material's surface to a smooth finish.
Roundtime: 13 sec.
Gained: Forging(+1)
[workorders]>put my wire brush in my backpack
You put your brush in your backpack.
[workorders]>get my oil
You get a flask of oil from inside your backpack.
[workorders]>pour my oil on my sharpened drawknife
You pour a small amount of the oil onto the sharpened drawknife and work it in using a cloth. Wiping away the excess, you have completed the repair work.
Roundtime: 13 sec.
Your excellent training in the ways of tool repair will keep this tool free from wear for the next 4 anlaen.
[workorders]>put my oil in my backpack
You put your oil in your backpack.
[workorders]>put my sharpened drawknife in my backpack
You put your drawknife in your backpack.
[workorders]>get my carving knife
You get a glaes carving knife from inside your backpack.
[workorders]>get my wire brush
You get an iron wire brush from inside your backpack.
[workorders]>rub carving knife with my wire brush
Gently you begin rubbing the wire brush along the surface of the carving knife.
Swipe after swipe removes substantial amounts of grime and debris from the knife. Using steady strokes you bring the material's surface to a smooth finish.
Roundtime: 13 sec.
[workorders]>put my wire brush in my backpack
You put your brush in your backpack.
[workorders]>get my oil
You get a flask of oil from inside your backpack.
[workorders]>pour my oil on my carving knife
You pour a small amount of the oil onto the carving knife and work it in using a cloth. Wiping away the excess, you have completed the repair work.
Roundtime: 14 sec.
Your excellent training in the ways of tool repair will keep this tool free from wear for the next 4 anlaen.
[workorders]>put my oil in my backpack
You put your oil in your backpack.
[workorders]>put my carving knife in my backpack
You put your knife in your backpack.
[workorders]>get my textured rasp
You get a textured steel rasp from inside your backpack.
[workorders]>get my wire brush
You get an iron wire brush from inside your backpack.
[workorders]>rub textured rasp with my wire brush
Gently you begin rubbing the wire brush along the surface of the textured rasp.
Swipe after swipe removes substantial amounts of grime and debris from the rasp. Using steady strokes you bring the material's surface to a smooth finish.
Roundtime: 14 sec.
Gained: Forging(+1)
You've gained a new rank in your ability to perform.
[workorders]>put my wire brush in my backpack
You put your brush in your backpack.
[workorders]>get my oil
You get a flask of oil from inside your backpack.
[workorders]>pour my oil on my textured rasp
You pour a small amount of the oil onto the textured rasp and work it in using a cloth. Wiping away the excess, you have completed the repair work.
Roundtime: 13 sec.
Your excellent training in the ways of tool repair will keep this tool free from wear for the next 4 anlaen.
[workorders]>put my oil in my backpack
You put your oil in your backpack.
[workorders]>put my textured rasp in my backpack
You put your rasp in your backpack.
[workorders]>get my jagged shaper
You get a steel jagged wood shaper from inside your backpack.
[workorders]>get my wire brush
You get an iron wire brush from inside your backpack.
[workorders]>rub jagged shaper with my wire brush
Gently you begin rubbing the wire brush along the surface of the jagged wood shaper.
Swipe after swipe removes substantial amounts of grime and debris from the shaper. Using steady strokes you bring the material's surface to a smooth finish.
Roundtime: 13 sec.
[workorders]>put my wire brush in my backpack
You put your brush in your backpack.
[workorders]>get my oil
You get a flask of oil from inside your backpack.
[workorders]>pour my oil on my jagged shaper
You pour a small amount of the oil onto the jagged wood shaper and work it in using a cloth. Wiping away the excess, you have completed the repair work.
Roundtime: 13 sec.
Your excellent training in the ways of tool repair will keep this tool free from wear for the next 4 anlaen.
[workorders]>put my oil in my backpack
You put your oil in your backpack.
[workorders]>put my jagged shaper in my backpack
You put your shaper in your backpack.
Next and all subsequent repairs within 2 hour window:
[workorders]>give log to Serric
You hand Serric your logbook and bundled items, and are given 36,722 Dokoras in return.
[workorders]>put my logbook in my backpack
You put your logbook in your backpack.
[workorders]>get my oil from my backpack
You get a flask of oil from inside your backpack.
[workorders]>count my oil
The oil has 36 uses remaining.
[workorders]>put my oil in my backpack
Gained: Trading(+6)
You put your oil in your backpack.
[workorders]>get my stamp
You get a basic glaes stamp from inside your backpack.
[workorders]>get my wire brush
You get an iron wire brush from inside your backpack.
[workorders]>rub stamp with my wire brush
The basic stamp is not damaged enough to warrant repair.
[workorders]>put my wire brush in my backpack
You put your brush in your backpack.
[workorders]>put my stamp in my backpack
Serric puffs upon his pipe and surveys the area for several moments before returning to work.
You put your stamp in your backpack.
[workorders]>untie my blunt hammer from my forger's belt
You untie a glaes blunt forging hammer from the straps of your forger's belt.
[workorders]>get my wire brush
You get an iron wire brush from inside your backpack.
[workorders]>rub blunt hammer with my wire brush
The blunt forging hammer is not damaged enough to warrant repair.
[workorders]>put my wire brush in my backpack
You put your brush in your backpack.
[workorders]>tie my blunt hammer to my forger's belt
You attach a glaes blunt forging hammer to a strap on your forger's belt.
[workorders]>untie my muracite tongs from my forger's belt
You untie some muracite tongs with icesteel clamps from the straps of your forger's belt.
[workorders]>get my wire brush
You get an iron wire brush from inside your backpack.
[workorders]>rub muracite tongs with my wire brush
The muracite tongs is not damaged enough to warrant repair.
[workorders]>put my wire brush in my backpack
You put your brush in your backpack.
[workorders]>tie my muracite tongs to my forger's belt
You attach some muracite tongs with icesteel clamps to a strap on your forger's belt.
[workorders]>untie my stirring rod from my forger's belt
You untie a long jet stirring rod tinted with oceanic blue hues from the straps of your forger's belt.
[workorders]>get my wire brush
You get an iron wire brush from inside your backpack.
[workorders]>rub stirring rod with my wire brush
The stirring rod is not damaged enough to warrant repair.
[workorders]>put my wire brush in my backpack
You put your brush in your backpack.
[workorders]>tie my stirring rod to my forger's belt
You attach a long jet stirring rod tinted with oceanic blue hues to a strap on your forger's belt.
[workorders]>untie my corrugated-hide bellows from my forger's belt
You untie a corrugated-hide bellows embroidered with a raging whirlpool from the straps of your forger's belt.
[workorders]>get my wire brush
You get an iron wire brush from inside your backpack.
[workorders]>rub corrugated-hide bellows with my wire brush
The corrugated-hide bellows is not damaged enough to warrant repair.
[workorders]>put my wire brush in my backpack
You put your brush in your backpack.
[workorders]>tie my corrugated-hide bellows to my forger's belt
You attach a corrugated-hide bellows embroidered with a raging whirlpool to a strap on your forger's belt.
[workorders]>untie my wide shovel from my forger's belt
Intolerant Valherun came through some thick oak doors.
You untie a steel wide shovel from the straps of your forger's belt.
[workorders]>get my wire brush
You get an iron wire brush from inside your backpack.
[workorders]>rub wide shovel with my wire brush
Valherun gets a forging work order logbook from inside his crafting satchel.
The wide shovel is not damaged enough to warrant repair.
[workorders]>put my wire brush in my backpack
You put your brush in your backpack.
Valherun puts his logbook in his crafting satchel.
[workorders]>tie my wide shovel to my forger's belt
You attach a steel wide shovel to a strap on your forger's belt.
Currently out to testing, invite more!
Bumped #check to 6, could possibly match that off the size of the array.
Accurate count, method runs:
>;workorders shaping repair
[workorders: 5]
[workorders]>get my oil from my backpack
You get a flask of oil from inside your backpack.
>
[workorders]>count my oil
The oil has 22 uses remaining.
>
[workorders]>put my oil in my backpack
You put your oil in your backpack.
missing a tool?
>;workorders shaping repair
[workorders]>get my oil from my backpack
You get a flask of oil from inside your backpack.
>
[workorders]>count my oil
The oil has 22 uses remaining.
>
[workorders]>put my oil in my backpack
You put your oil in your backpack.
>
[workorders]>get my wire brush from my backpack
You get an iron wire brush from inside your backpack.
>
[workorders]>count my wire brush
The wire brush has 32 uses remaining.
>
[workorders]>put my wire brush in my backpack
You put your brush in your backpack.
>
[workorders]>get my stamp
You get a basic glaes stamp from inside your backpack.
>
[workorders]>get my wire brush
You get an iron wire brush from inside your backpack.
>
[workorders]>rub my stamp with my wire brush
The basic stamp is not damaged enough to warrant repair.
>
[workorders]>put my wire brush in my backpack
You put your brush in your backpack.
>
[workorders]>put my stamp in my backpack
You put your stamp in your backpack.
>
[workorders]>get my sharpened drawknife
What were you referring to?
>
[workorders: ]
[workorders: You seem to be missing: sharpened drawknife]
[workorders]>get my carving knife
What were you referring to?
>
[workorders: ]
[workorders: You seem to be missing: carving knife]
[workorders]>get my textured rasp
What were you referring to?
>
[workorders: ]
[workorders: You seem to be missing: textured rasp]
[workorders]>get my jagged shaper
What were you referring to?
>
[workorders: ]
[workorders: You seem to be missing: jagged shaper]
repair WITH tools:
>;workorders shaping repair
[workorders]>get my oil from my backpack
You get a flask of oil from inside your backpack.
>
[workorders]>count my oil
The oil has 22 uses remaining.
>
[workorders]>put my oil in my backpack
You put your oil in your backpack.
>
[workorders]>get my wire brush from my backpack
You get an iron wire brush from inside your backpack.
>
[workorders]>count my wire brush
The wire brush has 32 uses remaining.
>
[workorders]>put my wire brush in my backpack
Mailicyian taps a steel lockpick ring that he is wearing.
>
You put your brush in your backpack.
>
[workorders]>get my stamp
You get a basic glaes stamp from inside your backpack.
>
[workorders]>get my wire brush
Mailicyian goes south.
>
You get an iron wire brush from inside your backpack.
>
[workorders]>rub my stamp with my wire brush
The basic stamp is not damaged enough to warrant repair.
>
[workorders]>put my wire brush in my backpack
You put your brush in your backpack.
>
[workorders]>put my stamp in my backpack
You put your stamp in your backpack.
>
[workorders]>get my sharpened drawknife
You get a sharpened steel drawknife from inside your backpack.
>
[workorders]>get my wire brush
You get an iron wire brush from inside your backpack.
>
[workorders]>rub my sharpened drawknife with my wire brush
The sharpened drawknife is not damaged enough to warrant repair.
>
[workorders]>put my wire brush in my backpack
You put your brush in your backpack.
>
[workorders]>put my sharpened drawknife in my backpack
You put your drawknife in your backpack.
>
[workorders]>get my carving knife
You get a glaes carving knife from inside your backpack.
>
[workorders]>get my wire brush
You get an iron wire brush from inside your backpack.
>
[workorders]>rub my carving knife with my wire brush
The carving knife is not damaged enough to warrant repair.
>
[workorders]>put my wire brush in my backpack
You put your brush in your backpack.
>
[workorders]>put my carving knife in my backpack
You put your knife in your backpack.
>
[workorders]>get my textured rasp
You get a textured steel rasp from inside your backpack.
>
[workorders]>get my wire brush
You get an iron wire brush from inside your backpack.
>
[workorders]>rub my textured rasp with my wire brush
The textured rasp is not damaged enough to warrant repair.
>
[workorders]>put my wire brush in my backpack
You put your brush in your backpack.
>
[workorders]>put my textured rasp in my backpack
You put your rasp in your backpack.
>
[workorders]>get my jagged shaper
You get a steel jagged wood shaper from inside your backpack.
>
[workorders]>get my wire brush
>
You get an iron wire brush from inside your backpack.
>
[workorders]>rub my jagged shaper with my wire brush
The jagged wood shaper is not damaged enough to warrant repair.
>
[workorders]>put my wire brush in my backpack
You put your brush in your backpack.
>
[workorders]>put my jagged shaper in my backpack
You put your shaper in your backpack.
>
Ok, so moved this method to common-crafting in order to retain the hash containing repairs and timers. Removed testing language in the flag with ECHO in place to demonstrate function:
>;workorders blacksmithing repair
[workorders: tools not eligible for repair and timers:: {}]
[workorders]>get my oil from my backpack
You get a flask of oil from inside your backpack.
>
[workorders]>count my oil
The oil has 48 uses remaining.
>
[workorders]>put my oil in my backpack
You put your oil in your backpack.
>
[workorders]>get my wire brush from my backpack
You get an iron wire brush from inside your backpack.
>
[workorders]>count my wire brush
The wire brush has 26 uses remaining.
>
[workorders]>put my wire brush in my backpack
You put your brush in your backpack.
>
[workorders: Current tool :: stamp]
[workorders: Current tool repair timer status:: ]
[workorders: Current tool repair ineligible?:: ]
[workorders]>get my stamp
Kropos raises his palms skyward, chanting.
>
You get a basic glaes stamp from inside your backpack.
>
[workorders]>get my wire brush
You get an iron wire brush from inside your backpack.
>
[workorders]>rub my stamp with my wire brush
The basic stamp is not damaged enough to warrant repair.
>
[workorders]>put my wire brush in my backpack
You put your brush in your backpack.
>
[workorders: List before flag check:: {}]
[workorders: Flag status:: not damaged enough to warrant repair]
[workorders: List after flag check:: {"stamp"=>2022-07-20 15:49:40 -0400}]
[workorders]>put my stamp in my backpack
You put your stamp in your backpack.
>
[workorders: Current tool :: blunt hammer]
[workorders: Current tool repair timer status:: ]
[workorders: Current tool repair ineligible?:: ]
[workorders]>untie my blunt hammer from my forger's belt
You untie a glaes blunt forging hammer from the straps of your forger's belt.
>
[workorders]>get my wire brush
You get an iron wire brush from inside your backpack.
>
[workorders]>rub my blunt hammer with my wire brush
The blunt forging hammer is not damaged enough to warrant repair.
>
[workorders]>put my wire brush in my backpack
You put your brush in your backpack.
>
[workorders: List before flag check:: {"stamp"=>2022-07-20 15:49:40 -0400}]
[workorders: Flag status:: not damaged enough to warrant repair]
[workorders: List after flag check:: {"stamp"=>2022-07-20 15:49:40 -0400, "blunt hammer"=>2022-07-20 15:49:41 -0400}]
[workorders]>tie my blunt hammer to my forger's belt
You attach a glaes blunt forging hammer to a strap on your forger's belt.
>
[workorders: Current tool :: muracite tongs]
[workorders: Current tool repair timer status:: ]
[workorders: Current tool repair ineligible?:: ]
[workorders]>untie my muracite tongs from my forger's belt
You untie some muracite tongs with icesteel clamps from the straps of your forger's belt.
>
[workorders]>get my wire brush
You get an iron wire brush from inside your backpack.
>
[workorders]>rub my muracite tongs with my wire brush
The muracite tongs is not damaged enough to warrant repair.
>
[workorders]>put my wire brush in my backpack
You put your brush in your backpack.
>
[workorders: List before flag check:: {"stamp"=>2022-07-20 15:49:40 -0400, "blunt hammer"=>2022-07-20 15:49:41 -0400}]
[workorders: Flag status:: not damaged enough to warrant repair]
[workorders: List after flag check:: {"stamp"=>2022-07-20 15:49:40 -0400, "blunt hammer"=>2022-07-20 15:49:41 -0400, "muracite tongs"=>2022-07-20 15:49:43 -0400}]
[workorders]>tie my muracite tongs to my forger's belt
You attach some muracite tongs with icesteel clamps to a strap on your forger's belt.
>
[workorders: Current tool :: stirring rod]
[workorders: Current tool repair timer status:: ]
[workorders: Current tool repair ineligible?:: ]
[workorders]>untie my stirring rod from my forger's belt
You untie a long jet stirring rod tinted with oceanic blue hues from the straps of your forger's belt.
>
Berserker Radagon just arrived.
>
[workorders]>get my wire brush
Berserker Radagon went through an elm door.
>
You get an iron wire brush from inside your backpack.
>
[workorders]>rub my stirring rod with my wire brush
The stirring rod is not damaged enough to warrant repair.
>
[workorders]>put my wire brush in my backpack
You put your brush in your backpack.
>
[workorders: List before flag check:: {"stamp"=>2022-07-20 15:49:40 -0400, "blunt hammer"=>2022-07-20 15:49:41 -0400, "muracite tongs"=>2022-07-20 15:49:43 -0400}]
[workorders: Flag status:: not damaged enough to warrant repair]
[workorders: List after flag check:: {"stamp"=>2022-07-20 15:49:40 -0400, "blunt hammer"=>2022-07-20 15:49:41 -0400, "muracite tongs"=>2022-07-20 15:49:43 -0400, "stirring rod"=>2022-07-20 15:49:44 -0400}]
[workorders]>tie my stirring rod to my forger's belt
You attach a long jet stirring rod tinted with oceanic blue hues to a strap on your forger's belt.
>
[workorders: Current tool :: corrugated-hide bellows]
[workorders: Current tool repair timer status:: ]
[workorders: Current tool repair ineligible?:: ]
[workorders]>untie my corrugated-hide bellows from my forger's belt
You untie a corrugated-hide bellows embroidered with a raging whirlpool from the straps of your forger's belt.
>
[workorders]>get my wire brush
You get an iron wire brush from inside your backpack.
>
[workorders]>rub my corrugated-hide bellows with my wire brush
The corrugated-hide bellows is not damaged enough to warrant repair.
>
[workorders]>put my wire brush in my backpack
You put your brush in your backpack.
>
[workorders: List before flag check:: {"stamp"=>2022-07-20 15:49:40 -0400, "blunt hammer"=>2022-07-20 15:49:41 -0400, "muracite tongs"=>2022-07-20 15:49:43 -0400, "stirring rod"=>2022-07-20 15:49:44 -0400}]
[workorders: Flag status:: not damaged enough to warrant repair]
[workorders: List after flag check:: {"stamp"=>2022-07-20 15:49:40 -0400, "blunt hammer"=>2022-07-20 15:49:41 -0400, "muracite tongs"=>2022-07-20 15:49:43 -0400, "stirring rod"=>2022-07-20 15:49:44 -0400, "corrugated-hide bellows"=>2022-07-20 15:49:45 -0400}]
[workorders]>tie my corrugated-hide bellows to my forger's belt
You attach a corrugated-hide bellows embroidered with a raging whirlpool to a strap on your forger's belt.
>
[workorders: Current tool :: wide shovel]
[workorders: Current tool repair timer status:: ]
[workorders: Current tool repair ineligible?:: ]
[workorders]>untie my wide shovel from my forger's belt
You untie a steel wide shovel from the straps of your forger's belt.
>
[workorders]>get my wire brush
You get an iron wire brush from inside your backpack.
>
[workorders]>rub my wide shovel with my wire brush
The wide shovel is not damaged enough to warrant repair.
>
[workorders]>put my wire brush in my backpack
You put your brush in your backpack.
>
[workorders: List before flag check:: {"stamp"=>2022-07-20 15:49:40 -0400, "blunt hammer"=>2022-07-20 15:49:41 -0400, "muracite tongs"=>2022-07-20 15:49:43 -0400, "stirring rod"=>2022-07-20 15:49:44 -0400, "corrugated-hide bellows"=>2022-07-20 15:49:45 -0400}]
[workorders: Flag status:: not damaged enough to warrant repair]
[workorders: List after flag check:: {"stamp"=>2022-07-20 15:49:40 -0400, "blunt hammer"=>2022-07-20 15:49:41 -0400, "muracite tongs"=>2022-07-20 15:49:43 -0400, "stirring rod"=>2022-07-20 15:49:44 -0400, "corrugated-hide bellows"=>2022-07-20 15:49:45 -0400, "wide shovel"=>2022-07-20 15:49:47 -0400}]
[workorders]>tie my wide shovel to my forger's belt
You attach a steel wide shovel to a strap on your forger's belt.
That's the testing language in the flag, since all my tools were immune, but it shows the variable being built as each tool would complete a successful repair and the flag received the correct language "Your excellent training in the ways of tool repair"
Next repair:
>;workorders blacksmithing repair
[workorders: tools not eligible for repair and timers:: {"stamp"=>2022-07-20 15:49:40 -0400, "blunt hammer"=>2022-07-20 15:49:41 -0400, "muracite tongs"=>2022-07-20 15:49:43 -0400, "stirring rod"=>2022-07-20 15:49:44 -0400, "corrugated-hide bellows"=>2022-07-20 15:49:45 -0400, "wide shovel"=>2022-07-20 15:49:47 -0400, "sharpened drawknife"=>2022-07-20 15:49:51 -0400, "carving knife"=>2022-07-20 15:49:53 -0400, "textured rasp"=>2022-07-20 15:49:54 -0400, "jagged shaper"=>2022-07-20 15:49:55 -0400}]
[workorders]>get my oil from my backpack
You've gained a new rank in your knowledge of lunar magic.
>
You get a flask of oil from inside your backpack.
>
[workorders]>count my oil
The oil has 48 uses remaining.
>
[workorders]>put my oil in my backpack
You put your oil in your backpack.
>
[workorders]>get my wire brush from my backpack
You get an iron wire brush from inside your backpack.
>
[workorders]>count my wire brush
The wire brush has 26 uses remaining.
>
[workorders]>put my wire brush in my backpack
You put your brush in your backpack.
>
[workorders: Current tool :: stamp]
[workorders: Current tool repair timer status:: 2022-07-20 15:49:40 -0400]
[workorders: Current tool repair ineligible?:: true]
[workorders: Current tool :: blunt hammer]
[workorders: Current tool repair timer status:: 2022-07-20 15:49:41 -0400]
[workorders: Current tool repair ineligible?:: true]
[workorders: Current tool :: muracite tongs]
[workorders: Current tool repair timer status:: 2022-07-20 15:49:43 -0400]
[workorders: Current tool repair ineligible?:: true]
[workorders: Current tool :: stirring rod]
[workorders: Current tool repair timer status:: 2022-07-20 15:49:44 -0400]
[workorders: Current tool repair ineligible?:: true]
[workorders: Current tool :: corrugated-hide bellows]
[workorders: Current tool repair timer status:: 2022-07-20 15:49:45 -0400]
[workorders: Current tool repair ineligible?:: true]
[workorders: Current tool :: wide shovel]
[workorders: Current tool repair timer status:: 2022-07-20 15:49:47 -0400]
[workorders: Current tool repair ineligible?:: true]
As you can see, the list is populated with tools and repair timers, which are then checked against the timer for eligibility. This also means each tool gets overwritten when the timer expires.
Here, i changed the timer to 7 seconds, ran repair, waited 10 seconds, ran it again:
>;workorders blacksmithing repair
[workorders: tools not eligible for repair and timers:: {"stamp"=>2022-07-20 13:58:51 -0400, "blunt hammer"=>2022-07-20 13:58:53 -0400, "muracite tongs"=>2022-07-20 13:58:54 -0400, "stirring rod"=>2022-07-20 13:58:55 -0400, "corrugated-hide bellows"=>2022-07-20 13:58:56 -0400, "wide shovel"=>2022-07-20 13:58:58 -0400}]
[workorders]>get my oil from my backpack
You get a flask of oil from inside your backpack.
>
[workorders]>count my oil
Berserker Radagon just arrived.
>
The oil has 48 uses remaining.
>
[workorders]>put my oil in my backpack
Berserker Radagon went through an elm door.
>
You put your oil in your backpack.
>
[workorders]>get my wire brush from my backpack
You get an iron wire brush from inside your backpack.
>
[workorders]>count my wire brush
The wire brush has 26 uses remaining.
>
[workorders]>put my wire brush in my backpack
You put your brush in your backpack.
>
[workorders: Current tool :: stamp]
[workorders: Current tool repair timer status:: 2022-07-20 13:58:51 -0400]
[workorders: Current tool repair ineligible?:: false]
[workorders]>get my stamp
You get a basic glaes stamp from inside your backpack.
>
Berserker Radagon came through an elm door.
>
[workorders]>get my wire brush
You get an iron wire brush from inside your backpack.
>
Berserker Radagon runs southwest.
>
[workorders]>rub my stamp with my wire brush
The basic stamp is not damaged enough to warrant repair.
>
[workorders]>put my wire brush in my backpack
You put your brush in your backpack.
>
[workorders: List before flag check:: {"stamp"=>2022-07-20 13:58:51 -0400, "blunt hammer"=>2022-07-20 13:58:53 -0400, "muracite tongs"=>2022-07-20 13:58:54 -0400, "stirring rod"=>2022-07-20 13:58:55 -0400, "corrugated-hide bellows"=>2022-07-20 13:58:56 -0400, "wide shovel"=>2022-07-20 13:58:58 -0400}]
[workorders: Flag status:: not damaged enough to warrant repair]
[workorders: List after flag check:: {"stamp"=>2022-07-20 13:59:15 -0400, "blunt hammer"=>2022-07-20 13:58:53 -0400, "muracite tongs"=>2022-07-20 13:58:54 -0400, "stirring rod"=>2022-07-20 13:58:55 -0400, "corrugated-hide bellows"=>2022-07-20 13:58:56 -0400, "wide shovel"=>2022-07-20 13:58:58 -0400}]
[workorders]>put my stamp in my backpack
You put your stamp in your backpack.
As you can see, the timer exists for the tool, but has expired, so tool becomes eligible for repair, and repairs are attempted. Again, the flag here is wrong, but this is for testing and logic purposes.
Set the timer to 7000 which is a couple minutes shy of 2 hours, so we start attempting repairs a little early, as a failsafe. This also incorporates a change to workorders to allow custom # checks for consumables, which doesn't appear to have gone through previously.
Added function that checks the list of @immune_tools and removes any that have expired timers. This list is then compared to the list of tools sent for repair, and any tools that are still on the immune list get removed from the list of tools to be repair. Then, if no tools remain, the method returns. Otherwise, it verifies that there is sufficient oil/brush uses for only the number of tools that are actually eligible for repair, and commences repairs on those tools only.
This is to cut down on spamming through all your tools every time repair runs, even if those tools are immune to damage anyways.
I put my tools in my equipment list and they are repaired when I go to repair weapons and armor. I can see the appeal to some but the techs for cutting repairing down are not worth it, to me anyway. The money is moot too.
Since this method was adopted from self-repair in mining-buddy, I went ahead and remoevd that from mining buddy and let it use this method as well.
Added flag deletion on both workorders and mining-buddy.