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
+21 -18
View File
@@ -75,28 +75,31 @@ using metal and glass, it uses glass and reagents (usually sulfuric acis).
return round(A / max(1, (all_materials[M] * efficiency_coeff)))
/obj/machinery/r_n_d/circuit_imprinter/attackby(obj/item/O as obj, mob/user as mob, params)
if(default_deconstruction_screwdriver(user, "circuit_imprinter_t", "circuit_imprinter", O))
if(linked_console)
linked_console.linked_imprinter = null
linked_console = null
return
if(exchange_parts(user, O))
return
if(panel_open)
if(istype(O, /obj/item/crowbar))
for(var/obj/I in component_parts)
if(istype(I, /obj/item/reagent_containers/glass/beaker))
reagents.trans_to(I, reagents.total_volume)
I.loc = src.loc
materials.retrieve_all()
default_deconstruction_crowbar(user, O)
return
else
to_chat(user, "<span class='warning'>You can't load [src] while it's opened.</span>")
return
to_chat(user, "<span class='warning'>You can't load [src] while it's opened.</span>")
return
if(O.is_open_container())
return FALSE
else
return ..()
/obj/machinery/r_n_d/circuit_imprinter/crowbar_act(mob/living/user, obj/item/I)
if(!panel_open)
return
. = TRUE
for(var/obj/component in component_parts)
if(istype(component, /obj/item/reagent_containers/glass/beaker))
reagents.trans_to(component, reagents.total_volume)
component.loc = src.loc
materials.retrieve_all()
default_deconstruction_crowbar(user, I)
/obj/machinery/r_n_d/circuit_imprinter/screwdriver_act(mob/living/user, obj/item/I)
. = TRUE
if(!default_deconstruction_screwdriver(user, "circuit_imprinter_t", "circuit_imprinter", I))
return
if(linked_console)
linked_console.linked_imprinter = null
linked_console = null
+15 -13
View File
@@ -87,21 +87,23 @@ Note: Must be placed west/left of and R&D console to function.
return FALSE
if(panel_open)
if(istype(O, /obj/item/crowbar))
for(var/obj/I in component_parts)
if(istype(I, /obj/item/reagent_containers/glass/beaker))
reagents.trans_to(I, reagents.total_volume)
I.loc = src.loc
for(var/obj/item/reagent_containers/glass/G in component_parts)
reagents.trans_to(G, G.reagents.maximum_volume)
materials.retrieve_all()
default_deconstruction_crowbar(user, O)
return TRUE
else
to_chat(user, "<span class='warning'>You can't load [src] while it's opened.</span>")
return TRUE
to_chat(user, "<span class='warning'>You can't load [src] while it's opened.</span>")
return TRUE
if(O.is_open_container())
return FALSE
else
return ..()
/obj/machinery/r_n_d/protolathe/crowbar_act(mob/living/user, obj/item/I)
if(!panel_open)
return
. = TRUE
for(var/obj/component in component_parts)
if(istype(component, /obj/item/reagent_containers/glass/beaker))
reagents.trans_to(component, reagents.total_volume)
component.loc = src.loc
for(var/obj/item/reagent_containers/glass/G in component_parts)
reagents.trans_to(G, G.reagents.maximum_volume)
materials.retrieve_all()
default_deconstruction_crowbar(user, I)
+8 -8
View File
@@ -142,15 +142,15 @@
/obj/machinery/r_n_d/server/attackby(obj/item/O as obj, mob/user as mob, params)
if(exchange_parts(user, O))
return 1
return TRUE
return ..()
if(panel_open)
if(istype(O, /obj/item/crowbar))
griefProtection()
default_deconstruction_crowbar(user, O)
return 1
else
return ..()
/obj/machinery/r_n_d/server/crowbar_act(mob/living/user, obj/item/I)
if(!panel_open)
return
. = TRUE
griefProtection()
default_deconstruction_crowbar(user, I)
/obj/machinery/r_n_d/server/screwdriver_act(mob/living/user, obj/item/I)
default_deconstruction_screwdriver(user, "RD-server-on_t", "RD-server-on", I)