Deprecate the stream operator

This commit is contained in:
Arokha Sieyes
2020-02-12 17:26:44 -05:00
committed by Leshana
parent c8a8987610
commit 47ccc655db
762 changed files with 4492 additions and 4464 deletions

View File

@@ -44,27 +44,27 @@
/obj/item/device/multitool/hacktool/proc/attempt_hack(var/mob/user, var/atom/target)
if(is_hacking)
user << "<span class='warning'>You are already hacking!</span>"
to_chat(user, "<span class='warning'>You are already hacking!</span>")
return 0
if(!is_type_in_list(target, supported_types))
user << "\icon[src] <span class='warning'>Unable to hack this target!</span>"
to_chat(user, "\icon[src] <span class='warning'>Unable to hack this target!</span>")
return 0
var/found = known_targets.Find(target)
if(found)
known_targets.Swap(1, found) // Move the last hacked item first
return 1
user << "<span class='notice'>You begin hacking \the [target]...</span>"
to_chat(user, "<span class='notice'>You begin hacking \the [target]...</span>")
is_hacking = 1
// On average hackin takes ~30 seconds. Fairly small random span to avoid people simply aborting and trying again
var/hack_result = do_after(user, (20 SECONDS + rand(0, 10 SECONDS) + rand(0, 10 SECONDS)))
is_hacking = 0
if(hack_result && in_hack_mode)
user << "<span class='notice'>Your hacking attempt was succesful!</span>"
to_chat(user, "<span class='notice'>Your hacking attempt was succesful!</span>")
user.playsound_local(get_turf(src), 'sound/instruments/piano/An6.ogg', 50)
else
user << "<span class='warning'>Your hacking attempt failed!</span>"
to_chat(user, "<span class='warning'>Your hacking attempt failed!</span>")
return 0
known_targets.Insert(1, target) // Insert the newly hacked target first,