mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2026-08-26 22:42:26 +01:00
Ports use_tool proc from /tg/ (#13411)
This commit is contained in:
@@ -335,7 +335,7 @@
|
||||
if(3)
|
||||
if(W.iswelder())
|
||||
var/obj/item/weldingtool/WT = W
|
||||
if(WT.remove_fuel(0, user))
|
||||
if(WT.use(0, user))
|
||||
build_step++
|
||||
name = "shielded frame assembly"
|
||||
to_chat(user, "<span class='notice'>You welded the armor to [src].</span>")
|
||||
@@ -369,7 +369,7 @@
|
||||
to_chat(user, "<span class='warning'>You need one coil of wire to wire [src].</span>")
|
||||
return
|
||||
to_chat(user, "<span class='notice'>You start to wire [src].</span>")
|
||||
if(do_after(user, 40) && build_step == 6)
|
||||
if(W.use_tool(src, user, 40, volume = 50) && build_step == 6)
|
||||
if(C.use(1))
|
||||
build_step++
|
||||
to_chat(user, "<span class='notice'>You wire the ED-209 assembly.</span>")
|
||||
@@ -389,10 +389,9 @@
|
||||
|
||||
if(8)
|
||||
if(W.isscrewdriver())
|
||||
playsound(src.loc, W.usesound, 100, 1)
|
||||
var/turf/T = get_turf(user)
|
||||
to_chat(user, "<span class='notice'>Now attaching the gun to the frame...</span>")
|
||||
sleep(40)
|
||||
if(!W.use_tool(src, user, 40, volume = 50)) return
|
||||
if(get_turf(user) == T && build_step == 8)
|
||||
build_step++
|
||||
name = "armed [name]"
|
||||
|
||||
@@ -676,7 +676,7 @@
|
||||
..()
|
||||
if(O.iswelder() && !build_step)
|
||||
var/obj/item/weldingtool/WT = O
|
||||
if(WT.remove_fuel(0, user))
|
||||
if(WT.use(0, user))
|
||||
build_step = 1
|
||||
add_overlay("hs_hole")
|
||||
to_chat(user, "You weld a hole in \the [src].")
|
||||
|
||||
@@ -116,7 +116,7 @@
|
||||
set_cradle_state(STATE_NODIODES)
|
||||
else if(I.iswelder())
|
||||
var/obj/item/weldingtool/WT = I
|
||||
if(WT.remove_fuel(0, user))
|
||||
if(WT.use(0, user))
|
||||
user.visible_message("<b>[user]</b> welds the two parts of the braincase together, permanently sealing \the [brainobj] inside.", SPAN_NOTICE("You weld the two parts of the braincase together, permanently sealing \the [brainobj] inside."))
|
||||
to_chat(brainmob, SPAN_NOTICE("As the braincase comes online, you feel your sense of self ebbing away, your memories suppressed by the onboard software."))
|
||||
set_cradle_state(STATE_SEALED)
|
||||
@@ -127,7 +127,7 @@
|
||||
return
|
||||
else if(istype(I, /obj/item/surgery/circular_saw))
|
||||
user.visible_message("<b>[user]</b> starts sawing \the [src] open...", SPAN_NOTICE("You start sawing \the [src] open, [SPAN_WARNING("this WILL destroy the brain inside")]."))
|
||||
if(do_after(user, 3 SECONDS))
|
||||
if(I.use_tool(src, user, 30, volume = 50))
|
||||
user.visible_message("<b>[user]</b> saws \the [src] open, leaving \the [brainobj] a gory mess.", SPAN_NOTICE("You saw \the [src] open, leaving \the [brainobj] a gory mess."))
|
||||
var/obj/item/organ/internal/brain/brain_holder = brainobj
|
||||
transfer_mob_to_brain()
|
||||
|
||||
@@ -137,7 +137,7 @@
|
||||
user.visible_message("<span class='danger'>\The [user] begins to slit [src]'s throat with \the [W]!</span>")
|
||||
|
||||
user.next_move = world.time + 20 //also should prevent user from triggering this repeatedly
|
||||
if(!do_after(user, 20/W.toolspeed))
|
||||
if(!W.use_tool(src, user, 20, volume = 50))
|
||||
return 0
|
||||
if(!(G && G.assailant == user && G.affecting == src)) //check that we still have a grab
|
||||
return 0
|
||||
|
||||
@@ -732,7 +732,7 @@ var/list/ai_verbs_default = list(
|
||||
else if(W.iswrench())
|
||||
if(anchored)
|
||||
user.visible_message("<span class='notice'>\The [user] starts to unbolt \the [src] from the plating...</span>")
|
||||
if(!do_after(user, 40/W.toolspeed))
|
||||
if(!W.use_tool(src, user, 40, volume = 50))
|
||||
user.visible_message("<span class='notice'>\The [user] decides not to unbolt \the [src].</span>")
|
||||
return
|
||||
user.visible_message("<span class='notice'>\The [user] finishes unfastening \the [src]!</span>")
|
||||
@@ -741,7 +741,7 @@ var/list/ai_verbs_default = list(
|
||||
return
|
||||
else
|
||||
user.visible_message("<span class='notice'>\The [user] starts to bolt \the [src] to the plating.</span>..")
|
||||
if(!do_after(user,40/W.toolspeed))
|
||||
if(!W.use_tool(src, user, 40, volume = 50))
|
||||
user.visible_message("<span class='notice'>\The [user] decides not to bolt \the [src].</span>")
|
||||
return
|
||||
user.visible_message("<span class='notice'>\The [user] finishes fastening down \the [src]!</span>")
|
||||
|
||||
@@ -603,7 +603,7 @@
|
||||
if(!WT.welding)
|
||||
to_chat(user, SPAN_WARNING("Your welding tool is not lit!")) // it aint lit fam :fire:
|
||||
return
|
||||
if(WT.remove_fuel(1))
|
||||
if(WT.use(1))
|
||||
user.setClickCooldown(DEFAULT_ATTACK_COOLDOWN)
|
||||
adjustBruteLoss(-30)
|
||||
updatehealth()
|
||||
@@ -625,7 +625,7 @@
|
||||
if(opened)
|
||||
if(cell)
|
||||
user.visible_message(SPAN_NOTICE("\The [user] begins clasping shut \the [src]'s maintenance hatch."), SPAN_NOTICE("You begin closing up \the [src]'s maintenance hatch."))
|
||||
if(do_after(user, 50 / W.toolspeed, act_target = src))
|
||||
if(W.use_tool(src, user, 50, volume = 50))
|
||||
if(!Adjacent(user))
|
||||
to_chat(user, SPAN_WARNING("You are too far from \the [src] to close its hatch."))
|
||||
return
|
||||
@@ -638,7 +638,7 @@
|
||||
to_chat(user, SPAN_WARNING("\The [src] has no brain to remove.")) // me irl - geeves
|
||||
return
|
||||
user.visible_message(SPAN_NOTICE("\The [user] begins ripping \the [mmi] from \the [src]."), SPAN_NOTICE("You jam the crowbar into the robot and begin levering out \the [mmi]."))
|
||||
if(do_after(user, 50 / W.toolspeed, act_target = src))
|
||||
if(W.use_tool(src, user, 50, volume = 50))
|
||||
to_chat(user, SPAN_NOTICE("You damage some parts of the chassis, but eventually manage to rip out \the [mmi]!"))
|
||||
new /obj/item/robot_parts/robot_suit/equipped(get_turf(src))
|
||||
new /obj/item/robot_parts/chest(get_turf(src))
|
||||
@@ -672,7 +672,7 @@
|
||||
to_chat(user, SPAN_WARNING("The cover is locked and cannot be opened."))
|
||||
else
|
||||
user.visible_message(SPAN_NOTICE("\The [user] begins prying open \the [src]'s maintenance hatch."), SPAN_NOTICE("You start opening \the [src]'s maintenance hatch."))
|
||||
if(do_after(user, 50 / W.toolspeed, act_target = src))
|
||||
if(W.use_tool(src, user, 50, volume = 50))
|
||||
if(!Adjacent(user))
|
||||
to_chat(user, SPAN_NOTICE("You are too far from \the [src] to open its hatch."))
|
||||
return
|
||||
|
||||
@@ -107,7 +107,7 @@
|
||||
|
||||
if (O.iswelder())
|
||||
var/obj/item/weldingtool/WT = O
|
||||
if (WT.remove_fuel(0))
|
||||
if (WT.use(0))
|
||||
if(health < maxHealth)
|
||||
health += pick(1,1,1,2,2,3)
|
||||
if(health > maxHealth)
|
||||
|
||||
Reference in New Issue
Block a user