mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-07-19 02:54:41 +01:00
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:
@@ -157,10 +157,6 @@
|
||||
to_chat(user, "<span class='warning'>The maintenance drone chassis is not compatible with [I].</span>")
|
||||
return
|
||||
|
||||
else if(istype(I, /obj/item/crowbar))
|
||||
to_chat(user, "<span class='warning'>The machine is hermetically sealed. You can't open the case.</span>")
|
||||
return
|
||||
|
||||
else if(istype(I, /obj/item/card/id) || istype(I, /obj/item/pda))
|
||||
if(stat == DEAD)
|
||||
// Currently not functional, so commenting out until it's fixed to avoid confusion
|
||||
@@ -206,6 +202,10 @@
|
||||
|
||||
..()
|
||||
|
||||
/mob/living/silicon/robot/drone/crowbar_act(mob/user, obj/item/I)
|
||||
. = TRUE
|
||||
to_chat(user, "<span class='warning'>The machine is hermetically sealed. You can't open the case.</span>")
|
||||
|
||||
/mob/living/silicon/robot/drone/Destroy()
|
||||
. = ..()
|
||||
QDEL_NULL(stack_glass)
|
||||
|
||||
@@ -106,25 +106,6 @@
|
||||
visible_message("[user] inserts a cell into [src].",
|
||||
"<span class='notice'>You insert the new cell into [src].</span>")
|
||||
update_controls()
|
||||
else if(istype(I, /obj/item/crowbar) && open && cell)
|
||||
cell.add_fingerprint(usr)
|
||||
cell.forceMove(loc)
|
||||
cell = null
|
||||
visible_message("[user] crowbars out the power cell from [src].",
|
||||
"<span class='notice'>You pry the powercell out of [src].</span>")
|
||||
update_controls()
|
||||
else if(istype(I, /obj/item/wrench))
|
||||
if(health < maxHealth)
|
||||
adjustBruteLoss(-25)
|
||||
updatehealth()
|
||||
user.visible_message(
|
||||
"<span class='notice'>[user] repairs [src]!</span>",
|
||||
"<span class='notice'>You repair [src]!</span>"
|
||||
)
|
||||
else
|
||||
to_chat(user, "<span class='notice'>[src] does not need a repair!</span>")
|
||||
else if((istype(I, /obj/item/multitool) || istype(I, /obj/item/wirecutters)) && open)
|
||||
return attack_hand(user)
|
||||
else if(load && ismob(load)) // chance to knock off rider
|
||||
if(prob(1 + I.force * 2))
|
||||
unload(0)
|
||||
@@ -138,16 +119,58 @@
|
||||
update_icon()
|
||||
return
|
||||
|
||||
/mob/living/simple_animal/bot/mulebot/crowbar_act(mob/living/user, obj/item/I)
|
||||
if(!open || !cell)
|
||||
return
|
||||
. = TRUE
|
||||
if(!I.use_tool(src, user, I.tool_volume))
|
||||
return
|
||||
cell.add_fingerprint(user)
|
||||
cell.forceMove(loc)
|
||||
cell = null
|
||||
visible_message("[user] crowbars out the power cell from [src].",
|
||||
"<span class='notice'>You pry the powercell out of [src].</span>")
|
||||
update_controls()
|
||||
|
||||
/mob/living/simple_animal/bot/mulebot/multitool_act(mob/living/user, obj/item/I)
|
||||
if(!open)
|
||||
return
|
||||
. = TRUE
|
||||
if(!I.use_tool(src, user, I.tool_volume))
|
||||
return
|
||||
attack_hand(user)
|
||||
|
||||
/mob/living/simple_animal/bot/mulebot/screwdriver_act(mob/living/user, obj/item/I)
|
||||
. = ..()
|
||||
if(!.)
|
||||
return
|
||||
|
||||
if(open)
|
||||
on = FALSE
|
||||
update_controls()
|
||||
update_icon()
|
||||
|
||||
/mob/living/simple_animal/bot/mulebot/wrench_act(mob/living/user, obj/item/I)
|
||||
. = TRUE
|
||||
if(health >= maxHealth)
|
||||
to_chat(user, "<span class='notice'>[src] does not need a repair!</span>")
|
||||
return
|
||||
if(!I.use_tool(src, user, I.tool_volume))
|
||||
return
|
||||
adjustBruteLoss(-25)
|
||||
updatehealth()
|
||||
user.visible_message(
|
||||
"<span class='notice'>[user] repairs [src]!</span>",
|
||||
"<span class='notice'>You repair [src]!</span>"
|
||||
)
|
||||
|
||||
/mob/living/simple_animal/bot/mulebot/wirecutter_act(mob/living/user, obj/item/I)
|
||||
if(!open)
|
||||
return
|
||||
. = TRUE
|
||||
if(!I.use_tool(src, user, I.tool_volume))
|
||||
return
|
||||
attack_hand(user)
|
||||
|
||||
/mob/living/simple_animal/bot/mulebot/emag_act(mob/user)
|
||||
if(!emagged)
|
||||
emagged = TRUE
|
||||
|
||||
Reference in New Issue
Block a user