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:
@@ -81,7 +81,7 @@
|
||||
if(0)
|
||||
if(istype(P, /obj/item/weapon/wrench))
|
||||
playsound(src.loc, 'sound/items/Ratchet.ogg', 50, 1)
|
||||
if(do_after(user, 20))
|
||||
if(do_after(user, 20, target = src))
|
||||
user << "\blue You wrench the frame into place."
|
||||
src.anchored = 1
|
||||
src.state = 1
|
||||
@@ -91,7 +91,7 @@
|
||||
user << "The welding tool must be on to complete this task."
|
||||
return
|
||||
playsound(src.loc, 'sound/items/Welder.ogg', 50, 1)
|
||||
if(do_after(user, 20))
|
||||
if(do_after(user, 20, target = src))
|
||||
if(!src || !WT.isOn()) return
|
||||
user << "\blue You deconstruct the frame."
|
||||
new /obj/item/stack/sheet/metal( src.loc, 5 )
|
||||
@@ -99,7 +99,7 @@
|
||||
if(1)
|
||||
if(istype(P, /obj/item/weapon/wrench))
|
||||
playsound(src.loc, 'sound/items/Ratchet.ogg', 50, 1)
|
||||
if(do_after(user, 20))
|
||||
if(do_after(user, 20, target = src))
|
||||
user << "\blue You unfasten the frame."
|
||||
src.anchored = 0
|
||||
src.state = 0
|
||||
@@ -136,7 +136,7 @@
|
||||
if(istype(P, /obj/item/weapon/crowbar))
|
||||
if(battery)
|
||||
playsound(src.loc, 'sound/items/Crowbar.ogg', 50, 1)
|
||||
if(do_after(10))
|
||||
if(do_after(10, target = src))
|
||||
battery.loc = loc
|
||||
user << "\blue You remove [battery]."
|
||||
battery = null
|
||||
@@ -146,7 +146,7 @@
|
||||
if(istype(P, /obj/item/weapon/stock_parts/cell))
|
||||
if(!battery)
|
||||
playsound(src.loc, 'sound/items/Deconstruct.ogg', 50, 1)
|
||||
if(do_after(5))
|
||||
if(do_after(5, target = src))
|
||||
battery = P
|
||||
P.loc = src
|
||||
user << "\blue You insert [battery]."
|
||||
@@ -157,7 +157,7 @@
|
||||
if(istype(P, /obj/item/stack/cable_coil))
|
||||
if(P:amount >= 5)
|
||||
playsound(src.loc, 'sound/items/Deconstruct.ogg', 50, 1)
|
||||
if(do_after(user, 20))
|
||||
if(do_after(user, 20, target = src))
|
||||
if(P)
|
||||
P:amount -= 5
|
||||
if(!P:amount) qdel(P)
|
||||
@@ -182,7 +182,7 @@
|
||||
if(istype(P, /obj/item/stack/sheet/glass))
|
||||
if(P:amount >= 2)
|
||||
playsound(src.loc, 'sound/items/Deconstruct.ogg', 50, 1)
|
||||
if(do_after(user, 20))
|
||||
if(do_after(user, 20, target = src))
|
||||
if(P)
|
||||
P:use(2)
|
||||
user << "\blue You put in the glass panel."
|
||||
@@ -227,7 +227,7 @@
|
||||
|
||||
if(I)
|
||||
playsound(src.loc, 'sound/items/Crowbar.ogg', 50, 1)
|
||||
if(do_after(usr,25))
|
||||
if(do_after(usr,25, target = src))
|
||||
if(I==hdd)
|
||||
components -= hdd
|
||||
hdd.loc = loc
|
||||
|
||||
@@ -37,7 +37,7 @@ var/prison_shuttle_timeleft = 0
|
||||
attackby(I as obj, user as mob, params)
|
||||
if(istype(I, /obj/item/tool/screwdriver))
|
||||
playsound(src.loc, 'sound/items/Screwdriver.ogg', 50, 1)
|
||||
if(do_after(user, 20))
|
||||
if(do_after(user, 20, target = src))
|
||||
var/obj/structure/computerframe/A = new /obj/structure/computerframe( src.loc )
|
||||
var/obj/item/part/board/circuit/prison_shuttle/M = new /obj/item/part/board/circuit/prison_shuttle( A )
|
||||
for (var/obj/C in src)
|
||||
|
||||
Reference in New Issue
Block a user