Skip to content

Commit

Permalink
Revert "Better repairs"
Browse files Browse the repository at this point in the history
This reverts commit 52ed66a.
  • Loading branch information
ihatethisengine committed Jul 27, 2023
1 parent 52ed66a commit 6e84aba
Showing 1 changed file with 3 additions and 8 deletions.
11 changes: 3 additions & 8 deletions code/game/objects/structures/barricade/deployable.dm
Original file line number Diff line number Diff line change
Expand Up @@ -204,24 +204,19 @@
if(user.action_busy)
return

var/need_repairs = 0
for(var/counter in 1 to length(stack_health))
if(stack_health[counter] < maxhealth)
need_repairs++

if(!need_repairs)
var/obj/item/tool/weldingtool/welder = item
if(min(stack_health) == maxhealth)
to_chat(user, SPAN_WARNING("[src.singular_name] doesn't need repairs."))
return

var/obj/item/tool/weldingtool/welder = item
if(!(welder.remove_fuel(2, user)))
return

user.visible_message(SPAN_NOTICE("[user] begins repairing damage to [src]."),
SPAN_NOTICE("You begin repairing the damage to [src]."))
playsound(src.loc, 'sound/items/Welder2.ogg', 25, TRUE)

var/welding_time = (skillcheck(user, SKILL_CONSTRUCTION, SKILL_CONSTRUCTION_TRAINED) ? 5 SECONDS : 10 SECONDS) * need_repairs
var/welding_time = (skillcheck(user, SKILL_CONSTRUCTION, SKILL_CONSTRUCTION_TRAINED) ? 5 SECONDS : 10 SECONDS) * amount

if(src != user.get_inactive_hand())
if(!do_after(user, welding_time, INTERRUPT_NO_NEEDHAND|BEHAVIOR_IMMOBILE, BUSY_ICON_FRIENDLY, src))
Expand Down

0 comments on commit 6e84aba

Please sign in to comment.