mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-22 11:37:40 +01:00
Progress bars + Wall Rationalization
This commit does the following: - Ports progress bars from -tg- (tgstation/-tg-station#9921) - Refactors wall attackby code to make it 100% less insane; Instead of manually checking every little thing, it uses do_after, consequentially, making the new progress bars affect dealing with walls as well. Wall code makes a tiger sad.
This commit is contained in:
@@ -266,7 +266,7 @@
|
||||
var/obj/item/weapon/weldingtool/WT = W
|
||||
if (WT.remove_fuel(0,user))
|
||||
user << "<span class='notice'>Now welding the vent.</span>"
|
||||
if(do_after(user, 20))
|
||||
if(do_after(user, 20, target = src))
|
||||
if(!src || !WT.isOn()) return
|
||||
playsound(get_turf(src), 'sound/items/Welder2.ogg', 50, 1)
|
||||
if(!welded)
|
||||
@@ -302,7 +302,7 @@
|
||||
return 1
|
||||
playsound(get_turf(src), 'sound/items/Ratchet.ogg', 50, 1)
|
||||
user << "<span class='notice'>You begin to unfasten \the [src]...</span>"
|
||||
if (do_after(user, 40))
|
||||
if (do_after(user, 40, target = src))
|
||||
user.visible_message( \
|
||||
"[user] unfastens \the [src].", \
|
||||
"<span class='notice'>You have unfastened \the [src].</span>", \
|
||||
|
||||
@@ -166,7 +166,7 @@
|
||||
return 1
|
||||
playsound(src.loc, 'sound/items/Ratchet.ogg', 50, 1)
|
||||
user << "<span class='notice'>You begin to unfasten \the [src]...</span>"
|
||||
if (do_after(user, 40))
|
||||
if (do_after(user, 40, target = src))
|
||||
user.visible_message( \
|
||||
"[user] unfastens \the [src].", \
|
||||
"<span class='notice'>You have unfastened \the [src].</span>", \
|
||||
|
||||
@@ -198,7 +198,7 @@ Thus, the two variables affect pump operation are set in New():
|
||||
return 1
|
||||
playsound(src.loc, 'sound/items/Ratchet.ogg', 50, 1)
|
||||
user << "<span class='notice'>You begin to unfasten \the [src]...</span>"
|
||||
if (do_after(user, 40))
|
||||
if (do_after(user, 40, target = src))
|
||||
user.visible_message( \
|
||||
"[user] unfastens \the [src].", \
|
||||
"<span class='notice'>You have unfastened \the [src].</span>", \
|
||||
|
||||
@@ -185,7 +185,7 @@ Thus, the two variables affect pump operation are set in New():
|
||||
return 1
|
||||
playsound(src.loc, 'sound/items/Ratchet.ogg', 50, 1)
|
||||
user << "<span class='notice'>You begin to unfasten \the [src]...</span>"
|
||||
if (do_after(user, 40))
|
||||
if (do_after(user, 40, target = src))
|
||||
user.visible_message( \
|
||||
"[user] unfastens \the [src].", \
|
||||
"<span class='notice'>You have unfastened \the [src].</span>", \
|
||||
|
||||
Reference in New Issue
Block a user