diff --git a/code/game/machinery/porta_turret/portable_turret.dm b/code/game/machinery/porta_turret/portable_turret.dm index 29883a073a..ee0a8224a8 100644 --- a/code/game/machinery/porta_turret/portable_turret.dm +++ b/code/game/machinery/porta_turret/portable_turret.dm @@ -393,6 +393,27 @@ spark_system.start() //creates some sparks because they look cool qdel(cover) //deletes the cover - no need on keeping it there! +//turret healing +/obj/machinery/porta_turret/examine(mob/user) + . = ..() + if(obj_integrity < max_integrity) + . += "[src] is damaged, use a lit welder to fix it." + +/obj/machinery/porta_turret/welder_act(mob/living/user, obj/item/I) + . = TRUE + if(cover && obj_integrity < max_integrity) + if(!I.tool_start_check(user, amount=0)) + return + user.visible_message("[user] is welding the turret.", \ + "You begin repairing the turret...", \ + "You hear welding.") + if(I.use_tool(src, user, 40, volume=50)) + obj_integrity = max_integrity + user.visible_message("[user.name] has repaired [src].", \ + "You finish repairing the turret.") + else + to_chat(user, "The turret doesn't need repairing.") + /obj/machinery/porta_turret/process() //the main machinery process if(cover == null && anchored) //if it has no cover and is anchored