More Crowbar Acts (#24986)

* crowbar acts part 1

* livings checked

* convert istypes to tool behaviour

* solars

* use tool_volume

* Update code/modules/research/server.dm

Co-authored-by: Luc <89928798+lewcc@users.noreply.github.com>
Signed-off-by: larentoun <31931237+larentoun@users.noreply.github.com>

* Update code/modules/power/generators/portable generators/pacman.dm

Co-authored-by: Luc <89928798+lewcc@users.noreply.github.com>
Signed-off-by: larentoun <31931237+larentoun@users.noreply.github.com>

* return

* return returns

* Update code/modules/mob/living/simple_animal/bot/mulebot.dm

Co-authored-by: Henri215 <77684085+Henri215@users.noreply.github.com>
Signed-off-by: larentoun <31931237+larentoun@users.noreply.github.com>

* Update code/game/objects/structures/janicart.dm

Co-authored-by: Henri215 <77684085+Henri215@users.noreply.github.com>
Signed-off-by: larentoun <31931237+larentoun@users.noreply.github.com>

---------

Signed-off-by: larentoun <31931237+larentoun@users.noreply.github.com>
Co-authored-by: Luc <89928798+lewcc@users.noreply.github.com>
Co-authored-by: Henri215 <77684085+Henri215@users.noreply.github.com>
This commit is contained in:
larentoun
2024-05-01 10:37:08 +00:00
committed by GitHub
co-authored by Luc Henri215
parent a2e7d95306
commit 7daf219ec0
23 changed files with 293 additions and 220 deletions
@@ -154,7 +154,7 @@
to_chat(user, "<span class='warning'>Turn off [src] before you perform this action!</span>")
return FALSE
user.visible_message("<span class='notice'>[user] unscrews [src]'s maintenance panel and begins fiddling with its innards...</span>", "<span class='notice'>You begin resetting [src]...</span>")
if(!I.use_tool(src, user, 40, volume = 50))
if(!I.use_tool(src, user, 40, I.tool_volume))
return FALSE
user.visible_message("<span class='notice'>[user] refastens [src]'s maintenance panel!</span>", "<span class='notice'>You reset [src] to its factory settings!</span>")
emagged = FALSE
@@ -1,5 +1,7 @@
// Called when a mob tries to use the item as a tool.
// Handles most checks.
/**
* Called when a mob tries to use the item as a tool.
* Handles most checks.
*/
/obj/item/proc/use_tool(atom/target, mob/living/user, delay, amount=0, volume=0, datum/callback/extra_checks)
// No delay means there is no start message, and no reason to call tool_start_check before use_tool.
// Run the start check here so we wouldn't have to call it manually.