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 13:37:08 +03:00
committed by GitHub
parent a2e7d95306
commit 7daf219ec0
23 changed files with 293 additions and 220 deletions
+11 -5
View File
@@ -209,12 +209,7 @@
add_fingerprint()
/obj/machinery/mineral/equipment_vendor/attackby(obj/item/I, mob/user, params)
if(default_deconstruction_screwdriver(user, "mining-open", "mining", I))
return
if(panel_open)
if(istype(I, /obj/item/crowbar))
remove_id()
default_deconstruction_crowbar(user, I)
return TRUE
if(istype(I, /obj/item/mining_voucher))
if(!has_power())
@@ -234,6 +229,17 @@
return
return ..()
/obj/machinery/mineral/equipment_vendor/crowbar_act(mob/living/user, obj/item/I)
if(!panel_open)
return
. = TRUE
remove_id()
default_deconstruction_crowbar(user, I)
/obj/machinery/mineral/equipment_vendor/screwdriver_act(mob/living/user, obj/item/I)
if(default_deconstruction_screwdriver(user, "mining-open", "mining", I))
return TRUE
/**
* Called when someone slaps the machine with a mining voucher
*
+7 -6
View File
@@ -21,15 +21,16 @@
S.remove_from_storage(O, src) //This will move the item to this item's contents
CHECK_TICK
to_chat(user, "<span class='notice'>You empty the satchel into the box.</span>")
else if(istype(W, /obj/item/crowbar))
playsound(src, W.usesound, 50, 1)
var/obj/item/crowbar/C = W
if(do_after(user, 50 * C.toolspeed, target = src))
user.visible_message("<span class='notice'>[user] pries [src] apart.</span>", "<span class='notice'>You pry apart [src].</span>", "<span class='italics'>You hear splitting wood.</span>")
deconstruct(TRUE, user)
else
return ..()
/obj/structure/ore_box/crowbar_act(mob/living/user, obj/item/I)
. = TRUE
if(!I.use_tool(src, user, 5 SECONDS, I.tool_volume))
return
user.visible_message("<span class='notice'>[user] pries [src] apart.</span>", "<span class='notice'>You pry apart [src].</span>", "<span class='italics'>You hear splitting wood.</span>")
deconstruct(TRUE, user)
/obj/structure/ore_box/attack_hand(mob/user)
if(Adjacent(user))
show_contents(user)