mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-25 13:07:46 +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:
@@ -39,7 +39,7 @@
|
||||
if(!proximity) return
|
||||
if(istype(A) && src in user)
|
||||
user.visible_message("[user] starts to wipe down [A] with [src]!")
|
||||
if(do_after(user,30))
|
||||
if(do_after(user,30, target = A))
|
||||
user.visible_message("[user] finishes wiping off the [A]!")
|
||||
A.clean_blood()
|
||||
return
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -72,7 +72,7 @@
|
||||
/obj/structure/table/proc/construct_item(mob/user, datum/table_recipe/R)
|
||||
check_table()
|
||||
if(check_contents(R) && check_tools(user, R))
|
||||
if(do_after(user, R.time))
|
||||
if(do_after(user, R.time, target = src))
|
||||
if(!check_contents(R) || !check_tools(user, R))
|
||||
return 0
|
||||
var/atom/movable/I = new R.result (loc)
|
||||
|
||||
@@ -659,7 +659,7 @@
|
||||
if(water_level == 0)
|
||||
usr << "<span class='notice'>Now disassembling [src].</span>"
|
||||
playsound(src.loc, 'sound/items/Ratchet.ogg', 50, 1)
|
||||
if(do_after(user,50))
|
||||
if(do_after(user,50, target = src))
|
||||
destroy(1)
|
||||
else
|
||||
usr << "[src] must be empty before you disassemble it!"
|
||||
|
||||
@@ -69,7 +69,7 @@
|
||||
angry_swarm(user)
|
||||
else
|
||||
user << "\blue You begin to dislodge the dead apiary from the tray."
|
||||
if(do_after(user, 50))
|
||||
if(do_after(user, 50, target = src))
|
||||
new hydrotray_type(src.loc)
|
||||
new /obj/item/apiary(src.loc)
|
||||
user << "\red You dislodge the apiary from the tray."
|
||||
@@ -90,7 +90,7 @@
|
||||
angry_swarm(user)
|
||||
else
|
||||
user << "\blue You begin to harvest the honey."
|
||||
if(do_after(user,50))
|
||||
if(do_after(user,50, target = src))
|
||||
G.reagents.add_reagent("honey",harvestable_honey)
|
||||
harvestable_honey = 0
|
||||
user << "\blue You successfully harvest the honey."
|
||||
|
||||
@@ -34,7 +34,7 @@
|
||||
else if(istype(O, /obj/item/weapon/wrench))
|
||||
user << "\blue Now disassembling bookcase"
|
||||
playsound(get_turf(src), 'sound/items/Ratchet.ogg', 50, 1)
|
||||
if(do_after(user,50))
|
||||
if(do_after(user,50, target = src))
|
||||
new /obj/item/stack/sheet/wood(get_turf(src))
|
||||
new /obj/item/stack/sheet/wood(get_turf(src))
|
||||
new /obj/item/stack/sheet/wood(get_turf(src))
|
||||
@@ -251,7 +251,7 @@
|
||||
else if(istype(W, /obj/item/weapon/kitchenknife) || istype(W, /obj/item/weapon/wirecutters))
|
||||
if(carved) return
|
||||
user << "<span class='notice'>You begin to carve out [title].</span>"
|
||||
if(do_after(user, 30))
|
||||
if(do_after(user, 30, target = src))
|
||||
user << "<span class='notice'>You carve out the pages from [title]! You didn't want to read it anyway.</span>"
|
||||
carved = 1
|
||||
return
|
||||
|
||||
@@ -169,7 +169,7 @@ var/global/loopModeNames=list(
|
||||
else if(istype(W,/obj/item/weapon/wrench))
|
||||
var/un = !anchored ? "" : "un"
|
||||
user.visible_message("\blue [user.name] begins [un]locking \the [src.name]'s casters.","\blue You begin [un]locking \the [src.name]'s casters.")
|
||||
if(do_after(user,30))
|
||||
if(do_after(user,30, target = src))
|
||||
playsound(get_turf(src), 'sound/items/Ratchet.ogg', 50, 1)
|
||||
anchored = !anchored
|
||||
user.visible_message("\blue [user.name] [un]locks \the [src.name]'s casters.","\red You [un]lock \the [src.name]'s casters.")
|
||||
|
||||
@@ -133,7 +133,7 @@
|
||||
flick("coin_[cmineral]_flip", src)
|
||||
icon_state = "coin_[cmineral]_[coinflip]"
|
||||
playsound(user.loc, 'sound/items/coinflip.ogg', 50, 1)
|
||||
if(do_after(user, 15))
|
||||
if(do_after(user, 15, target = src))
|
||||
user.visible_message("<span class='notice'>[user] has flipped [src]. It lands on [coinflip].</span>", \
|
||||
"<span class='notice'>You flip [src]. It lands on [coinflip].</span>", \
|
||||
"<span class='notice'>You hear the clattering of loose change.</span>")
|
||||
@@ -12,7 +12,7 @@
|
||||
|
||||
user << "You begin sweeping \the [src] about, scanning for metal deposits."
|
||||
|
||||
if(!do_after(user,50)) return
|
||||
if(!do_after(user,50, target = src)) return
|
||||
|
||||
if(!user || !src) return
|
||||
|
||||
|
||||
@@ -362,7 +362,7 @@ var/global/list/rockTurfEdgeCache
|
||||
user << "<span class='notice'>You start picking...</span>"
|
||||
P.playDigSound()
|
||||
|
||||
if(do_after(user, P.digspeed))
|
||||
if(do_after(user, P.digspeed, target = src))
|
||||
if(istype(src, /turf/simulated/mineral)) //sanity check against turf being deleted during digspeed delay
|
||||
user << "<span class='notice'>You finish cutting into the rock.</span>"
|
||||
P.update_icon()
|
||||
|
||||
@@ -333,7 +333,7 @@ var/list/ventcrawl_machinery = list(/obj/machinery/atmospherics/unary/vent_pump,
|
||||
visible_message("<span class='notice'>[src] begins climbing into the ventilation system...</span>", \
|
||||
"<span class='notice'>You begin climbing into the ventilation system...</span>")
|
||||
|
||||
if(!do_after(src, 45))
|
||||
if(!do_after(src, 45, target = src))
|
||||
return
|
||||
|
||||
if(!client)
|
||||
|
||||
@@ -787,7 +787,7 @@
|
||||
|
||||
if(SUPER_FART in mutations)
|
||||
visible_message("\red <b>[name]</b> hunches down and grits their teeth!")
|
||||
if(do_after(usr,30))
|
||||
if(do_after(usr,30, target = src))
|
||||
visible_message("\red <b>[name]</b> unleashes a [pick("tremendous","gigantic","colossal")] fart!","You hear a [pick("tremendous","gigantic","colossal")] fart.")
|
||||
//playsound(L.loc, 'superfart.ogg', 50, 0)
|
||||
for(var/mob/living/V in range(location,aoe_range))
|
||||
|
||||
@@ -59,7 +59,7 @@
|
||||
|
||||
M.visible_message("<span class='notice'>[M] begins to violently pull off [H]'s antennae.</span>")
|
||||
H << "<span class='danger'><B>[M] grips your antennae and starts violently pulling!<B></span>"
|
||||
do_after(H, 250)
|
||||
do_after(H, 250, target = src)
|
||||
if(p_loc == M.loc && p_loc_m == H.loc)
|
||||
qdel(H.internal_organs_by_name["antennae"])
|
||||
H.remove_language("Wryn Hivemind")
|
||||
|
||||
@@ -610,7 +610,7 @@
|
||||
O.show_message("\red <B>[usr] attempts to unbuckle themself!</B>", 1)
|
||||
|
||||
spawn(0)
|
||||
if(do_after(usr, 1200))
|
||||
if(do_after(usr, 1200, target = C))
|
||||
if(!C.buckled)
|
||||
return
|
||||
for(var/mob/O in viewers(C))
|
||||
@@ -648,7 +648,7 @@
|
||||
|
||||
|
||||
spawn(0)
|
||||
if(do_after(usr,(breakout_time*60*10))) //minutes * 60seconds * 10deciseconds
|
||||
if(do_after(usr,(breakout_time*60*10), target = C)) //minutes * 60seconds * 10deciseconds
|
||||
if(!C || !L || L.stat != CONSCIOUS || L.loc != C || C.opened) //closet/user destroyed OR user dead/unconcious OR user no longer in closet OR closet opened
|
||||
return
|
||||
|
||||
@@ -743,7 +743,7 @@
|
||||
for(var/mob/O in viewers(CM))
|
||||
O.show_message( "\red <B>[usr] attempts to [hulklien ? "break" : "remove"] \the [HC]!</B>", 1)
|
||||
spawn(0)
|
||||
if(do_after(CM, breakouttime))
|
||||
if(do_after(CM, breakouttime, target = src))
|
||||
if(!CM.handcuffed || CM.buckled)
|
||||
return // time leniency for lag which also might make this whole thing pointless but the server
|
||||
|
||||
@@ -786,7 +786,7 @@
|
||||
O.show_message( "\red <B>[usr] attempts to [hulklien ? "break" : "remove"] \the [HC]!</B>", 1)
|
||||
|
||||
spawn(0)
|
||||
if(do_after(CM, breakouttime))
|
||||
if(do_after(CM, breakouttime, target = src))
|
||||
if(!CM.legcuffed || CM.buckled)
|
||||
return // time leniency for lag which also might make this whole thing pointless but the server
|
||||
for(var/mob/O in viewers(CM))// lags so hard that 40s isn't lenient enough - Quarxink
|
||||
@@ -937,4 +937,3 @@
|
||||
|
||||
/mob/living/proc/spawn_dust()
|
||||
new /obj/effect/decal/cleanable/ash(loc)
|
||||
|
||||
@@ -900,7 +900,7 @@ var/list/ai_verbs_default = list(
|
||||
if(istype(W, /obj/item/weapon/wrench))
|
||||
if(anchored)
|
||||
user.visible_message("\blue \The [user] starts to unbolt \the [src] from the plating...")
|
||||
if(!do_after(user,40))
|
||||
if(!do_after(user,40, target = src))
|
||||
user.visible_message("\blue \The [user] decides not to unbolt \the [src].")
|
||||
return
|
||||
user.visible_message("\blue \The [user] finishes unfastening \the [src]!")
|
||||
@@ -908,7 +908,7 @@ var/list/ai_verbs_default = list(
|
||||
return
|
||||
else
|
||||
user.visible_message("\blue \The [user] starts to bolt \the [src] to the plating...")
|
||||
if(!do_after(user,40))
|
||||
if(!do_after(user,40, target = src))
|
||||
user.visible_message("\blue \The [user] decides not to bolt \the [src].")
|
||||
return
|
||||
user.visible_message("\blue \The [user] finishes fastening down \the [src]!")
|
||||
|
||||
@@ -192,7 +192,7 @@
|
||||
|
||||
D << "\red You begin decompiling the other drone."
|
||||
|
||||
if(!do_after(D,50))
|
||||
if(!do_after(D,50, target = target))
|
||||
D << "\red You need to remain still while decompiling such a large object."
|
||||
return
|
||||
|
||||
|
||||
@@ -616,7 +616,7 @@ var/list/robot_verbs_default = list(
|
||||
return
|
||||
|
||||
user << "You jam the crowbar into the robot and begin levering [mmi]."
|
||||
if(do_after(user,3 SECONDS))
|
||||
if(do_after(user,3 SECONDS, target = src))
|
||||
user << "You damage some parts of the chassis, but eventually manage to rip out [mmi]!"
|
||||
var/obj/item/robot_parts/robot_suit/C = new/obj/item/robot_parts/robot_suit(loc)
|
||||
C.l_leg = new/obj/item/robot_parts/l_leg(C)
|
||||
|
||||
@@ -406,7 +406,7 @@ mob/living/simple_animal/borer/proc/detatch()
|
||||
|
||||
src << "You slither up [M] and begin probing at their ear canal..."
|
||||
|
||||
if(!do_after(src,50))
|
||||
if(!do_after(src,50, target = M))
|
||||
src << "As [M] moves away, you are dislodged and fall to the ground."
|
||||
return
|
||||
|
||||
|
||||
@@ -105,7 +105,7 @@
|
||||
user << "<span class='warning'>You can't shave this corgi, it's already been shaved!</span>"
|
||||
return
|
||||
user.visible_message("[user] starts to shave [src] using \the [O].", "<span class='notice'>You start to shave [src] using \the [O]...</span>")
|
||||
if(do_after(user, 50))
|
||||
if(do_after(user, 50, target = src))
|
||||
user.visible_message("[user] shaves [src]'s hair using \the [O].")
|
||||
playsound(loc, 'sound/items/Welder2.ogg', 20, 1)
|
||||
shaved = 1
|
||||
|
||||
@@ -165,7 +165,7 @@
|
||||
|
||||
src.visible_message("<span class='userdanger'>\the [src] starts to eat \the [noms]!</span>","<span class='notice'>You start to eat \the [noms]. (This will take about [ufnomDelay] seconds.)</span>","<span class='userdanger'>You hear gnashing.</span>") //inform everyone what the fucking worm is doing.
|
||||
|
||||
if(do_after(src, nomDelay,5,0))
|
||||
if(do_after(src, nomDelay,5,0, target = noms))
|
||||
if(noms && Adjacent(noms) && (currentlyEating == noms))//It exists, were next to it, and it's still the thing were eating
|
||||
if(W)
|
||||
W.ChangeTurf(/turf/simulated/floor/plating)
|
||||
|
||||
@@ -56,8 +56,8 @@
|
||||
return 1 //Immune to the effects of explosions.
|
||||
|
||||
/mob/living/simple_animal/revenant/blob_act()
|
||||
return 1 //blah blah blobs aren't in tune with the spirit world, or something.
|
||||
|
||||
return 1 //blah blah blobs aren't in tune with the spirit world, or something.
|
||||
|
||||
/mob/living/simple_animal/revenant/ClickOn(var/atom/A, var/params) //Copypaste from ghost code - revenants can't interact with the world directly.
|
||||
if(client.buildmode)
|
||||
build_click(src, client.buildmode, params, A)
|
||||
@@ -82,7 +82,7 @@
|
||||
A.attack_ghost(src)
|
||||
if(ishuman(A) && in_range(src, A))
|
||||
Harvest(A)
|
||||
|
||||
|
||||
/mob/living/simple_animal/revenant/proc/Harvest(mob/living/carbon/human/target)
|
||||
if(!castcheck(0))
|
||||
return
|
||||
@@ -100,7 +100,7 @@
|
||||
draining = 1
|
||||
essence_drained = 2
|
||||
src << "<span class='notice'>You search for the soul of [target].</span>"
|
||||
if(do_after(src, 10, 3, 0, target)) //did they get deleted in that second?
|
||||
if(do_after(src, 10, 3, 0, target = target)) //did they get deleted in that second?
|
||||
if(target.ckey)
|
||||
src << "<span class='notice'>Their soul burns with intelligence.</span>"
|
||||
essence_drained += 2
|
||||
@@ -109,7 +109,7 @@
|
||||
essence_drained += 2
|
||||
else
|
||||
src << "<span class='notice'>Their soul is weak and faltering.</span>"
|
||||
if(do_after(src, 20, 6, 0, target)) //did they get deleted NOW?
|
||||
if(do_after(src, 20, 6, 0, target = target)) //did they get deleted NOW?
|
||||
switch(essence_drained)
|
||||
if(1 to 2)
|
||||
src << "<span class='info'>[target] will not yield much essence. Still, every bit counts.</span>"
|
||||
@@ -117,7 +117,7 @@
|
||||
src << "<span class='info'>[target] will yield an average amount of essence.</span>"
|
||||
if(5 to INFINITY)
|
||||
src << "<span class='info'>Such a feast! [target] will yield much essence to you.</span>"
|
||||
if(do_after(src, 30, 9, 0, target)) //how about now
|
||||
if(do_after(src, 30, 9, 0, target = target)) //how about now
|
||||
if(!target.stat)
|
||||
src << "<span class='warning'>They are now powerful enough to fight off your draining.</span>"
|
||||
target << "<span class='boldannounce'>You feel something tugging across your body before subsiding.</span>"
|
||||
@@ -221,7 +221,7 @@
|
||||
inhibited = 1
|
||||
spawn(30)
|
||||
inhibited = 0
|
||||
|
||||
|
||||
..()
|
||||
|
||||
/mob/living/simple_animal/revenant/proc/castcheck(essence_cost)
|
||||
@@ -278,8 +278,8 @@
|
||||
src << "<span class='warning'>You cannot move!</span>"
|
||||
spawn(time)
|
||||
notransform = 0
|
||||
src << "<span class='notice'>You can move again!</span>"
|
||||
|
||||
src << "<span class='notice'>You can move again!</span>"
|
||||
|
||||
/datum/objective/revenant
|
||||
var/targetAmount = 100
|
||||
|
||||
|
||||
@@ -1229,7 +1229,7 @@ mob/proc/yank_out_object()
|
||||
else
|
||||
U << "<span class='warning'>You attempt to get a good grip on [selection] in [S]'s body.</span>"
|
||||
|
||||
if(!do_after(U, 80))
|
||||
if(!do_after(U, 80, target = S))
|
||||
return
|
||||
if(!selection || !S || !U)
|
||||
return
|
||||
|
||||
@@ -391,7 +391,7 @@
|
||||
var/mob/living/carbon/attacker = user
|
||||
user.visible_message("<span class='danger'>[user] is attempting to devour \the [affecting]!</span>")
|
||||
|
||||
if(!do_mob(user, affecting) || !do_after(user, checktime(user, affecting))) return
|
||||
if(!do_mob(user, affecting) || !do_after(user, checktime(user, affecting, target = affecting))) return
|
||||
|
||||
user.visible_message("<span class='danger'>[user] devours \the [affecting]!</span>")
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
var/obj/item/weapon/stock_parts/cell/CELL
|
||||
if(CELL.maxcharge > cell.maxcharge && suitGloves)
|
||||
U << "<span class='notice'>Higher maximum capacity detected.\nUpgrading...</span>"
|
||||
if (n_gloves && n_gloves.candrain && do_after(U,s_delay))
|
||||
if (n_gloves && n_gloves.candrain && do_after(U,s_delay, target = U))
|
||||
U.drop_item()
|
||||
CELL.loc = src
|
||||
CELL.charge = min(CELL.charge+cell.charge, CELL.maxcharge)
|
||||
|
||||
@@ -59,11 +59,11 @@
|
||||
usr << "<span class='notice'>You have to go closer if you want to read it.</span>"
|
||||
return
|
||||
|
||||
/obj/item/weapon/paper/proc/show_content(var/mob/user, var/forceshow = 0, var/forcestars = 0, var/infolinks = 0, var/view = 1)
|
||||
/obj/item/weapon/paper/proc/show_content(var/mob/user, var/forceshow = 0, var/forcestars = 0, var/infolinks = 0, var/view = 1)
|
||||
set src in oview(1)
|
||||
if(user.client) // Send the paper images to the client
|
||||
var/datum/asset/simple/S = new/datum/asset/simple/paper()
|
||||
send_asset_list(user.client, S.assets)
|
||||
send_asset_list(user.client, S.assets)
|
||||
|
||||
var/data
|
||||
if((!(istype(usr, /mob/living/carbon/human) || istype(usr, /mob/dead/observer) || istype(usr, /mob/living/silicon)) && !forceshow) || forcestars)
|
||||
@@ -134,7 +134,7 @@
|
||||
else
|
||||
user.visible_message("<span class='warning'>[user] begins to wipe [H]'s face clean with \the [src].</span>", \
|
||||
"<span class='notice'>You begin to wipe off [H]'s face.</span>")
|
||||
if(do_after(user, 10) && do_after(H, 10, 5, 0)) //user needs to keep their active hand, H does not.
|
||||
if(do_after(user, 10, target = H) && do_after(H, 10, 5, 0)) //user needs to keep their active hand, H does not.
|
||||
user.visible_message("<span class='notice'>[user] wipes [H]'s face clean with \the [src].</span>", \
|
||||
"<span class='notice'>You wipe off [H]'s face.</span>")
|
||||
H.lip_style = null
|
||||
|
||||
@@ -409,7 +409,7 @@
|
||||
return
|
||||
playsound(src.loc, 'sound/items/Crowbar.ogg', 50, 1)
|
||||
user << "You are trying to remove the power control board..." //lpeters - fixed grammar issues
|
||||
if(do_after(user, 50))
|
||||
if(do_after(user, 50, target = src))
|
||||
if (has_electronics==1)
|
||||
has_electronics = 0
|
||||
if ((stat & BROKEN) || malfhack)
|
||||
@@ -502,7 +502,7 @@
|
||||
return
|
||||
user << "You start adding cables to the APC frame..."
|
||||
playsound(src.loc, 'sound/items/Deconstruct.ogg', 50, 1)
|
||||
if(do_after(user, 20))
|
||||
if(do_after(user, 20, target = src))
|
||||
if (C.amount >= 10 && !terminal && opened && has_electronics != 2)
|
||||
var/turf/T = get_turf(src)
|
||||
var/obj/structure/cable/N = T.get_cable_node()
|
||||
@@ -523,7 +523,7 @@
|
||||
return
|
||||
user << "You begin to cut the cables..."
|
||||
playsound(src.loc, 'sound/items/Deconstruct.ogg', 50, 1)
|
||||
if(do_after(user, 50))
|
||||
if(do_after(user, 50, target = src))
|
||||
if(terminal && opened && has_electronics!=2)
|
||||
if (prob(50) && electrocute_mob(usr, terminal.powernet, terminal))
|
||||
var/datum/effect/effect/system/spark_spread/s = new /datum/effect/effect/system/spark_spread
|
||||
@@ -536,7 +536,7 @@
|
||||
else if (istype(W, /obj/item/weapon/module/power_control) && opened && has_electronics==0 && !((stat & BROKEN) || malfhack))
|
||||
user << "You trying to insert the power control board into the frame..."
|
||||
playsound(src.loc, 'sound/items/Deconstruct.ogg', 50, 1)
|
||||
if(do_after(user, 10))
|
||||
if(do_after(user, 10, target = src))
|
||||
if(has_electronics==0)
|
||||
has_electronics = 1
|
||||
user << "<span class='notice'>You place the power control board inside the frame.</span>"
|
||||
@@ -553,7 +553,7 @@
|
||||
"You start welding the APC frame...", \
|
||||
"You hear welding.")
|
||||
playsound(src.loc, 'sound/items/Welder.ogg', 50, 1)
|
||||
if(do_after(user, 50))
|
||||
if(do_after(user, 50, target = src))
|
||||
if(!src || !WT.remove_fuel(3, user)) return
|
||||
if (emagged || malfhack || (stat & BROKEN) || opened==2)
|
||||
new /obj/item/stack/sheet/metal(loc)
|
||||
@@ -583,7 +583,7 @@
|
||||
user << "You cannot repair this APC until you remove the electronics still inside."
|
||||
return
|
||||
user << "You begin to replace the damaged APC frame..."
|
||||
if(do_after(user, 50))
|
||||
if(do_after(user, 50, target = src))
|
||||
user.visible_message(\
|
||||
"<span class='notice'>[user.name] has replaced the damaged APC frame with new one.</span>",\
|
||||
"You replace the damaged APC frame with new one.")
|
||||
|
||||
@@ -47,7 +47,7 @@
|
||||
if (src.stage == 1)
|
||||
playsound(src.loc, 'sound/items/Ratchet.ogg', 75, 1)
|
||||
usr << "You begin deconstructing [src]."
|
||||
if (!do_after(usr, 30))
|
||||
if (!do_after(usr, 30, target = src))
|
||||
return
|
||||
new /obj/item/stack/sheet/metal( get_turf(src.loc), sheets_refunded )
|
||||
user.visible_message("[user.name] deconstructs [src].", \
|
||||
|
||||
@@ -258,7 +258,7 @@
|
||||
user.visible_message("[user.name] starts to weld the [src.name] to the floor.", \
|
||||
"You start to weld the [src] to the floor.", \
|
||||
"You hear welding")
|
||||
if (do_after(user,20))
|
||||
if (do_after(user,20, target = src))
|
||||
if(!src || !WT.isOn()) return
|
||||
state = 2
|
||||
user << "You weld the [src] to the floor."
|
||||
@@ -271,7 +271,7 @@
|
||||
user.visible_message("[user.name] starts to cut the [src.name] free from the floor.", \
|
||||
"You start to cut the [src] free from the floor.", \
|
||||
"You hear welding")
|
||||
if (do_after(user,20))
|
||||
if (do_after(user,20, target = src))
|
||||
if(!src || !WT.isOn()) return
|
||||
state = 1
|
||||
user << "You cut the [src] free from the floor."
|
||||
|
||||
@@ -130,7 +130,7 @@ field_generator power level display
|
||||
user.visible_message("[user.name] starts to weld the [src.name] to the floor.", \
|
||||
"You start to weld the [src] to the floor.", \
|
||||
"You hear welding")
|
||||
if (do_after(user,20))
|
||||
if (do_after(user,20, target = src))
|
||||
if(!src || !WT.isOn()) return
|
||||
state = 2
|
||||
user << "You weld the field generator to the floor."
|
||||
@@ -142,7 +142,7 @@ field_generator power level display
|
||||
user.visible_message("[user.name] starts to cut the [src.name] free from the floor.", \
|
||||
"You start to cut the [src] free from the floor.", \
|
||||
"You hear welding")
|
||||
if (do_after(user,20))
|
||||
if (do_after(user,20, target = src))
|
||||
if(!src || !WT.isOn()) return
|
||||
state = 1
|
||||
user << "You cut the [src] free from the floor."
|
||||
|
||||
@@ -182,7 +182,7 @@
|
||||
user << "<span class='notice'>You begin to dismantle the power terminal...</span>"
|
||||
playsound(src.loc, 'sound/items/Deconstruct.ogg', 50, 1)
|
||||
|
||||
if(do_after(user, 50))
|
||||
if(do_after(user, 50, target = src))
|
||||
if (prob(50) && electrocute_mob(usr, terminal.powernet, terminal)) //animate the electrocution if uncautious and unlucky
|
||||
var/datum/effect/effect/system/spark_spread/s = new /datum/effect/effect/system/spark_spread
|
||||
s.set_up(5, 1, src)
|
||||
@@ -321,7 +321,7 @@
|
||||
user << "<span class='warning'>You must remove the floor plating first.</span>"
|
||||
return 1
|
||||
user << "<span class='notice'>You start adding cable to the [src].</span>"
|
||||
if(do_after(user, 50))
|
||||
if(do_after(user, 50, target = src))
|
||||
var/turf/T = get_turf(user)
|
||||
var/obj/structure/cable/N = T.get_cable_node() //get the connecting node cable, if there's one
|
||||
if (prob(50) && electrocute_mob(user, N, N)) //animate the electrocution if uncautious and unlucky
|
||||
|
||||
@@ -60,7 +60,7 @@
|
||||
if(istype(W, /obj/item/weapon/crowbar))
|
||||
playsound(src.loc, 'sound/machines/click.ogg', 50, 1)
|
||||
user.visible_message("[user] begins to take the glass off the solar panel.", "<span class='notice'>You begin to take the glass off the solar panel...</span>")
|
||||
if(do_after(user, 50))
|
||||
if(do_after(user, 50, target = src))
|
||||
var/obj/item/solar_assembly/S = locate() in src
|
||||
if(S)
|
||||
S.loc = src.loc
|
||||
@@ -416,7 +416,7 @@
|
||||
/obj/machinery/power/solar_control/attackby(I as obj, user as mob, params)
|
||||
if(istype(I, /obj/item/weapon/screwdriver))
|
||||
playsound(src.loc, 'sound/items/Screwdriver.ogg', 50, 1)
|
||||
if(do_after(user, 20))
|
||||
if(do_after(user, 20, target = src))
|
||||
if (src.stat & BROKEN)
|
||||
user << "<span class='notice'>The broken glass falls out.</span>"
|
||||
var/obj/structure/computerframe/A = new /obj/structure/computerframe( src.loc )
|
||||
|
||||
@@ -42,12 +42,12 @@
|
||||
|
||||
busy = 1
|
||||
for(var/mob/O in viewers(user))
|
||||
O.show_message(text("\red [user] started pulling the [src]."), 1)
|
||||
O.show_message(text("\red [user] starts pulling the [src]."), 1)
|
||||
|
||||
if(do_after(user, 50))
|
||||
if(do_after(user, 50, target = src))
|
||||
set_state(!on)
|
||||
for(var/mob/O in viewers(user))
|
||||
O.show_message(text("\red [user] flipped the [src] into the [on ? "on": "off"] position."), 1)
|
||||
O.show_message(text("\red [user] flips the [src] into the [on ? "on": "off"] position."), 1)
|
||||
busy = 0
|
||||
|
||||
/obj/structure/powerswitch/proc/set_state(var/state)
|
||||
|
||||
@@ -63,7 +63,7 @@
|
||||
if(istype(W, /obj/item/weapon/crowbar))
|
||||
playsound(src.loc, 'sound/machines/click.ogg', 50, 1)
|
||||
user.visible_message("<span class='notice'>[user] begins to take the glass off the solar tracker.</span>")
|
||||
if(do_after(user, 50))
|
||||
if(do_after(user, 50, target = src))
|
||||
var/obj/item/solar_assembly/S = locate() in src
|
||||
if(S)
|
||||
S.loc = src.loc
|
||||
|
||||
@@ -224,7 +224,7 @@
|
||||
/obj/machinery/computer/turbine_computer/attackby(I as obj, user as mob, params)
|
||||
if(istype(I, /obj/item/weapon/screwdriver))
|
||||
playsound(src.loc, 'sound/items/Screwdriver.ogg', 50, 1)
|
||||
if(do_after(user, 20))
|
||||
if(do_after(user, 20, target = src))
|
||||
if (src.stat & BROKEN)
|
||||
user << "\blue The broken glass falls out."
|
||||
var/obj/structure/computerframe/A = new /obj/structure/computerframe( src.loc )
|
||||
|
||||
@@ -264,7 +264,7 @@
|
||||
if (M == user && user.zone_sel.selecting == "mouth" && !mouthshoot)
|
||||
mouthshoot = 1
|
||||
M.visible_message("\red [user] sticks their gun in their mouth, ready to pull the trigger...")
|
||||
if(!do_after(user, 40))
|
||||
if(!do_after(user, 40, target = M))
|
||||
M.visible_message("\blue [user] decided life was worth living")
|
||||
mouthshoot = 0
|
||||
return
|
||||
|
||||
@@ -124,7 +124,7 @@
|
||||
afterattack(user, user) //you know the drill
|
||||
user.visible_message("<span class='danger'>[src] goes off!</span>", "<span class='danger'>[src] goes off in your face!</span>")
|
||||
return
|
||||
if(do_after(user, 30))
|
||||
if(do_after(user, 30, target = src))
|
||||
if(magazine.ammo_count())
|
||||
user << "<span class='notice'>You can't modify it!</span>"
|
||||
return
|
||||
@@ -141,7 +141,7 @@
|
||||
afterattack(user, user) //and again
|
||||
user.visible_message("<span class='danger'>[src] goes off!</span>", "<span class='danger'>[src] goes off in your face!</span>")
|
||||
return
|
||||
if(do_after(user, 30))
|
||||
if(do_after(user, 30, target = src))
|
||||
if(magazine.ammo_count())
|
||||
user << "<span class='notice'>You can't modify it!</span>"
|
||||
return
|
||||
|
||||
@@ -224,7 +224,7 @@
|
||||
|
||||
sawn_state = SAWN_SAWING
|
||||
|
||||
if(do_after(user, 30))
|
||||
if(do_after(user, 30, target = src))
|
||||
user.visible_message("<span class='warning'>[user] shortens \the [src]!</span>", "<span class='warning'>You shorten \the [src]!</span>")
|
||||
name = "sawn-off [src.name]"
|
||||
desc = sawn_desc
|
||||
|
||||
@@ -118,7 +118,7 @@
|
||||
/obj/structure/reagent_dispensers/fueltank/attack_hand()
|
||||
if (rig)
|
||||
usr.visible_message("[usr] begins to detach [rig] from \the [src].", "You begin to detach [rig] from \the [src]")
|
||||
if(do_after(usr, 20))
|
||||
if(do_after(usr, 20, target = src))
|
||||
usr.visible_message("\blue [usr] detaches [rig] from \the [src].", "\blue You detach [rig] from \the [src]")
|
||||
rig.loc = get_turf(usr)
|
||||
rig = null
|
||||
@@ -130,7 +130,7 @@
|
||||
user << "\red There is another device in the way."
|
||||
return ..()
|
||||
user.visible_message("[user] begins rigging [W] to \the [src].", "You begin rigging [W] to \the [src]")
|
||||
if(do_after(user, 20))
|
||||
if(do_after(user, 20, target = src))
|
||||
user.visible_message("\blue [user] rigs [W] to \the [src].", "\blue You rig [W] to \the [src]")
|
||||
|
||||
var/obj/item/device/assembly_holder/H = W
|
||||
|
||||
@@ -214,7 +214,7 @@
|
||||
if(W.remove_fuel(0,user))
|
||||
playsound(src.loc, 'sound/items/Welder2.ogg', 100, 1)
|
||||
user << "Welding the [nicetype] in place."
|
||||
if(do_after(user, 20))
|
||||
if(do_after(user, 20, target = src))
|
||||
if(!src || !W.isOn()) return
|
||||
user << "The [nicetype] has been welded in place!"
|
||||
update() // TODO: Make this neat
|
||||
|
||||
@@ -78,7 +78,7 @@
|
||||
playsound(src.loc, 'sound/items/Welder2.ogg', 100, 1)
|
||||
user << "You start slicing the floorweld off the disposal unit."
|
||||
|
||||
if(do_after(user,20))
|
||||
if(do_after(user,20, target = src))
|
||||
if(!src || !W.isOn()) return
|
||||
user << "You sliced the floorweld off the disposal unit."
|
||||
var/obj/structure/disposalconstruct/C = new (src.loc)
|
||||
@@ -114,7 +114,7 @@
|
||||
var/mob/GM = G.affecting
|
||||
for (var/mob/V in viewers(usr))
|
||||
V.show_message("[usr] starts putting [GM.name] into the disposal.", 3)
|
||||
if(do_after(usr, 20))
|
||||
if(do_after(usr, 20, target = GM))
|
||||
if (GM.client)
|
||||
GM.client.perspective = EYE_PERSPECTIVE
|
||||
GM.client.eye = src
|
||||
@@ -157,7 +157,7 @@
|
||||
if(target != user && !user.restrained() && !user.stat && !user.weakened && !user.stunned && !user.paralysis)
|
||||
if(target.anchored) return
|
||||
V.show_message("[usr] starts stuffing [target.name] into the disposal.", 3)
|
||||
if(!do_after(usr, 20))
|
||||
if(!do_after(usr, 20, target = target))
|
||||
return
|
||||
if(target_loc != target.loc)
|
||||
return
|
||||
@@ -745,7 +745,7 @@
|
||||
|
||||
if(!T)
|
||||
return
|
||||
|
||||
|
||||
var/turf/target
|
||||
|
||||
if(T.density) // dense ouput turf, so stop holder
|
||||
@@ -1319,7 +1319,7 @@
|
||||
if(W.remove_fuel(0,user))
|
||||
playsound(src.loc, 'sound/items/Welder2.ogg', 100, 1)
|
||||
user << "You start slicing the floorweld off the disposal outlet."
|
||||
if(do_after(user,20))
|
||||
if(do_after(user,20, target = src))
|
||||
if(!src || !W.isOn()) return
|
||||
user << "You sliced the floorweld off the disposal outlet."
|
||||
var/obj/structure/disposalconstruct/C = new (src.loc)
|
||||
|
||||
@@ -319,7 +319,7 @@
|
||||
if(W.remove_fuel(0,user))
|
||||
playsound(src.loc, 'sound/items/Welder2.ogg', 100, 1)
|
||||
user << "You start slicing the floorweld off the delivery chute."
|
||||
if(do_after(user,20))
|
||||
if(do_after(user,20, target = src))
|
||||
if(!src || !W.isOn()) return
|
||||
user << "You sliced the floorweld off the delivery chute."
|
||||
var/obj/structure/disposalconstruct/C = new (src.loc)
|
||||
|
||||
@@ -80,7 +80,7 @@
|
||||
if (istype(W, /obj/item/device/measuring_tape))
|
||||
var/obj/item/device/measuring_tape/P = W
|
||||
user.visible_message("\blue[user] extends [P] towards [src].","\blue You extend [P] towards [src].")
|
||||
if(do_after(user,40))
|
||||
if(do_after(user,40, target = src))
|
||||
user << "\blue \icon[P] [src] has been excavated to a depth of [2*src.excavation_level]cm."
|
||||
return
|
||||
|
||||
@@ -89,7 +89,7 @@
|
||||
|
||||
user << "\red You start [P.drill_verb] [src]."
|
||||
|
||||
if(!do_after(user,P.digspeed))
|
||||
if(!do_after(user,P.digspeed, target = src))
|
||||
return
|
||||
|
||||
user << "\blue You finish [P.drill_verb] [src]."
|
||||
|
||||
@@ -27,7 +27,7 @@
|
||||
if(!src.check_for_support())
|
||||
src.pr_inertial_movement.start(list(src,direction))
|
||||
src.log_message("Movement control lost. Inertial movement started.")*/
|
||||
if(do_after(step_in))
|
||||
if(do_after(step_in, target = src))
|
||||
can_move = 1
|
||||
return 1
|
||||
return 0
|
||||
|
||||
Reference in New Issue
Block a user