mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-07-13 16:13:19 +01:00
to_chat()'
This commit is contained in:
@@ -3,11 +3,11 @@
|
||||
return FALSE
|
||||
|
||||
if(H.w_class > max_hardware_size)
|
||||
user << "<span class='warning'>This component is too large for \the [src]!</span>"
|
||||
to_chat(user, "<span class='warning'>This component is too large for \the [src]!</span>")
|
||||
return FALSE
|
||||
|
||||
if(all_components[H.device_type])
|
||||
user << "<span class='warning'>This computer's hardware slot is already occupied by \the [all_components[H.device_type]].</span>"
|
||||
to_chat(user, "<span class='warning'>This computer's hardware slot is already occupied by \the [all_components[H.device_type]].</span>")
|
||||
return FALSE
|
||||
return TRUE
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
|
||||
all_components[H.device_type] = H
|
||||
|
||||
user << "<span class='notice'>You install \the [H] into \the [src].</span>"
|
||||
to_chat(user, "<span class='notice'>You install \the [H] into \the [src].</span>")
|
||||
H.holder = src
|
||||
H.on_install(src, user)
|
||||
|
||||
@@ -35,7 +35,7 @@
|
||||
|
||||
all_components.Remove(H.device_type)
|
||||
|
||||
user << "<span class='notice'>You remove \the [H] from \the [src].</span>"
|
||||
to_chat(user, "<span class='notice'>You remove \the [H] from \the [src].</span>")
|
||||
|
||||
H.forceMove(get_turf(src))
|
||||
H.holder = null
|
||||
|
||||
@@ -88,7 +88,7 @@
|
||||
return 1
|
||||
|
||||
P.kill_program(forced = TRUE)
|
||||
user << "<span class='notice'>Program [P.filename].[P.filetype] with PID [rand(100,999)] has been killed.</span>"
|
||||
to_chat(user, "<span class='notice'>Program [P.filename].[P.filetype] with PID [rand(100,999)] has been killed.</span>")
|
||||
|
||||
if("PC_runprogram")
|
||||
var/prog = href_list["name"]
|
||||
@@ -98,7 +98,7 @@
|
||||
P = hard_drive.find_file_by_name(prog)
|
||||
|
||||
if(!P || !istype(P)) // Program not found or it's not executable program.
|
||||
user << "<span class='danger'>\The [src]'s screen shows \"I/O ERROR - Unable to run program\" warning.</span>"
|
||||
to_chat(user, "<span class='danger'>\The [src]'s screen shows \"I/O ERROR - Unable to run program\" warning.</span>")
|
||||
return 1
|
||||
|
||||
P.computer = src
|
||||
@@ -117,11 +117,11 @@
|
||||
var/obj/item/weapon/computer_hardware/processor_unit/PU = all_components[MC_CPU]
|
||||
|
||||
if(idle_threads.len > PU.max_idle_programs)
|
||||
user << "<span class='danger'>\The [src] displays a \"Maximal CPU load reached. Unable to run another program.\" error.</span>"
|
||||
to_chat(user, "<span class='danger'>\The [src] displays a \"Maximal CPU load reached. Unable to run another program.\" error.</span>")
|
||||
return 1
|
||||
|
||||
if(P.requires_ntnet && !get_ntnet_status(P.requires_ntnet_feature)) // The program requires NTNet connection, but we are not connected to NTNet.
|
||||
user << "<span class='danger'>\The [src]'s screen shows \"Unable to connect to NTNet. Please retry. If problem persists contact your system administrator.\" warning.</span>"
|
||||
to_chat(user, "<span class='danger'>\The [src]'s screen shows \"Unable to connect to NTNet. Please retry. If problem persists contact your system administrator.\" warning.</span>")
|
||||
return 1
|
||||
if(P.run_program(user))
|
||||
active_program = P
|
||||
|
||||
@@ -89,11 +89,11 @@
|
||||
|
||||
/obj/item/device/modular_computer/laptop/proc/toggle_open(mob/living/user=null)
|
||||
if(screen_on)
|
||||
user << "<span class='notice'>You close \the [src].</span>"
|
||||
to_chat(user, "<span class='notice'>You close \the [src].</span>")
|
||||
slowdown = initial(slowdown)
|
||||
w_class = initial(w_class)
|
||||
else
|
||||
user << "<span class='notice'>You open \the [src].</span>"
|
||||
to_chat(user, "<span class='notice'>You open \the [src].</span>")
|
||||
slowdown = slowdown_open
|
||||
w_class = w_class_open
|
||||
|
||||
|
||||
@@ -51,7 +51,7 @@
|
||||
/datum/computer_file/program/proc/is_supported_by_hardware(hardware_flag = 0, loud = 0, mob/user = null)
|
||||
if(!(hardware_flag & usage_flags))
|
||||
if(loud && computer && user)
|
||||
user << "<span class='danger'>\The [computer] flashes an \"Hardware Error - Incompatible software\" warning.</span>"
|
||||
to_chat(user, "<span class='danger'>\The [computer] flashes an \"Hardware Error - Incompatible software\" warning.</span>")
|
||||
return 0
|
||||
return 1
|
||||
|
||||
@@ -102,7 +102,7 @@
|
||||
|
||||
if(!I && !C && !D)
|
||||
if(loud)
|
||||
user << "<span class='danger'>\The [computer] flashes an \"RFID Error - Unable to scan ID\" warning.</span>"
|
||||
to_chat(user, "<span class='danger'>\The [computer] flashes an \"RFID Error - Unable to scan ID\" warning.</span>")
|
||||
return 0
|
||||
|
||||
if(I)
|
||||
@@ -115,7 +115,7 @@
|
||||
if(access_to_check in D.GetAccess())
|
||||
return 1
|
||||
if(loud)
|
||||
user << "<span class='danger'>\The [computer] flashes an \"Access Denied\" warning.</span>"
|
||||
to_chat(user, "<span class='danger'>\The [computer] flashes an \"Access Denied\" warning.</span>")
|
||||
return 0
|
||||
|
||||
// This attempts to retrieve header data for UIs. If implementing completely new device of different type than existing ones
|
||||
|
||||
@@ -37,19 +37,19 @@
|
||||
/obj/item/weapon/computer_hardware/attackby(obj/item/I, mob/living/user)
|
||||
// Multitool. Runs diagnostics
|
||||
if(istype(I, /obj/item/device/multitool))
|
||||
user << "***** DIAGNOSTICS REPORT *****"
|
||||
to_chat(user, "***** DIAGNOSTICS REPORT *****")
|
||||
diagnostics(user)
|
||||
user << "******************************"
|
||||
to_chat(user, "******************************")
|
||||
return 1
|
||||
|
||||
// Cable coil. Works as repair method, but will probably require multiple applications and more cable.
|
||||
if(istype(I, /obj/item/stack/cable_coil))
|
||||
var/obj/item/stack/S = I
|
||||
if(obj_integrity == max_integrity)
|
||||
user << "<span class='warning'>\The [src] doesn't seem to require repairs.</span>"
|
||||
to_chat(user, "<span class='warning'>\The [src] doesn't seem to require repairs.</span>")
|
||||
return 1
|
||||
if(S.use(1))
|
||||
user << "<span class='notice'>You patch up \the [src] with a bit of \the [I].</span>"
|
||||
to_chat(user, "<span class='notice'>You patch up \the [src] with a bit of \the [I].</span>")
|
||||
obj_integrity = min(obj_integrity + 10, max_integrity)
|
||||
return 1
|
||||
|
||||
@@ -60,7 +60,7 @@
|
||||
|
||||
// Called on multitool click, prints diagnostic information to the user.
|
||||
/obj/item/weapon/computer_hardware/proc/diagnostics(var/mob/user)
|
||||
user << "Hardware Integrity Test... (Corruption: [damage]/[max_damage]) [damage > damage_failure ? "FAIL" : damage > damage_malfunction ? "WARN" : "PASS"]"
|
||||
to_chat(user, "Hardware Integrity Test... (Corruption: [damage]/[max_damage]) [damage > damage_failure ? "FAIL" : damage > damage_malfunction ? "WARN" : "PASS"]")
|
||||
|
||||
// Handles damage checks
|
||||
/obj/item/weapon/computer_hardware/proc/check_functionality()
|
||||
@@ -83,11 +83,11 @@
|
||||
/obj/item/weapon/computer_hardware/examine(var/mob/user)
|
||||
. = ..()
|
||||
if(damage > damage_failure)
|
||||
user << "<span class='danger'>It seems to be severely damaged!</span>"
|
||||
to_chat(user, "<span class='danger'>It seems to be severely damaged!</span>")
|
||||
else if(damage > damage_malfunction)
|
||||
user << "<span class='warning'>It seems to be damaged!</span>"
|
||||
to_chat(user, "<span class='warning'>It seems to be damaged!</span>")
|
||||
else if(damage)
|
||||
user << "<span class='notice'>It seems to be slightly damaged.</span>"
|
||||
to_chat(user, "<span class='notice'>It seems to be slightly damaged.</span>")
|
||||
|
||||
// Component-side compatibility check.
|
||||
/obj/item/weapon/computer_hardware/proc/can_install(obj/item/device/modular_computer/M, mob/living/user = null)
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
/obj/item/weapon/computer_hardware/ai_slot/examine(mob/user)
|
||||
..()
|
||||
if(stored_card)
|
||||
user << "There appears to be an intelliCard loaded. There appears to be a pinhole protecting a manual eject button. A screwdriver could probably press it"
|
||||
to_chat(user, "There appears to be an intelliCard loaded. There appears to be a pinhole protecting a manual eject button. A screwdriver could probably press it")
|
||||
|
||||
/obj/item/weapon/computer_hardware/ai_slot/on_install(obj/item/device/modular_computer/M, mob/living/user = null)
|
||||
M.add_verb(device_type)
|
||||
@@ -30,25 +30,25 @@
|
||||
return FALSE
|
||||
|
||||
if(stored_card)
|
||||
user << "<span class='warning'>You try to insert \the [I] into \the [src], but the slot is occupied.</span>"
|
||||
to_chat(user, "<span class='warning'>You try to insert \the [I] into \the [src], but the slot is occupied.</span>")
|
||||
return FALSE
|
||||
if(user && !user.unEquip(I))
|
||||
return FALSE
|
||||
|
||||
I.forceMove(src)
|
||||
stored_card = I
|
||||
user << "<span class='notice'>You insert \the [I] into \the [src].</span>"
|
||||
to_chat(user, "<span class='notice'>You insert \the [I] into \the [src].</span>")
|
||||
|
||||
return TRUE
|
||||
|
||||
|
||||
/obj/item/weapon/computer_hardware/ai_slot/try_eject(slot=0,mob/living/user = null,forced = 0)
|
||||
if(!stored_card)
|
||||
user << "<span class='warning'>There is no card in \the [src].</span>"
|
||||
to_chat(user, "<span class='warning'>There is no card in \the [src].</span>")
|
||||
return FALSE
|
||||
|
||||
if(locked && !forced)
|
||||
user << "<span class='warning'>Safeties prevent you from removing the card until reconstruction is complete...</span>"
|
||||
to_chat(user, "<span class='warning'>Safeties prevent you from removing the card until reconstruction is complete...</span>")
|
||||
return FALSE
|
||||
|
||||
if(stored_card)
|
||||
@@ -57,7 +57,7 @@
|
||||
stored_card.verb_pickup()
|
||||
stored_card = null
|
||||
|
||||
user << "<span class='notice'>You remove the card from \the [src].</span>"
|
||||
to_chat(user, "<span class='notice'>You remove the card from \the [src].</span>")
|
||||
return TRUE
|
||||
return FALSE
|
||||
|
||||
@@ -65,6 +65,6 @@
|
||||
if(..())
|
||||
return
|
||||
if(istype(I, /obj/item/weapon/screwdriver))
|
||||
user << "<span class='notice'>You press down on the manual eject button with \the [I].</span>"
|
||||
to_chat(user, "<span class='notice'>You press down on the manual eject button with \the [I].</span>")
|
||||
try_eject(,user,1)
|
||||
return
|
||||
@@ -21,11 +21,11 @@
|
||||
return FALSE
|
||||
|
||||
if(battery)
|
||||
user << "<span class='warning'>You try to connect \the [I] to \the [src], but its connectors are occupied.</span>"
|
||||
to_chat(user, "<span class='warning'>You try to connect \the [I] to \the [src], but its connectors are occupied.</span>")
|
||||
return FALSE
|
||||
|
||||
if(I.w_class > holder.max_hardware_size)
|
||||
user << "<span class='warning'>This power cell is too large for \the [holder]!</span>"
|
||||
to_chat(user, "<span class='warning'>This power cell is too large for \the [holder]!</span>")
|
||||
return FALSE
|
||||
|
||||
if(user && !user.unEquip(I))
|
||||
@@ -33,18 +33,18 @@
|
||||
|
||||
I.forceMove(src)
|
||||
battery = I
|
||||
user << "<span class='notice'>You connect \the [I] to \the [src].</span>"
|
||||
to_chat(user, "<span class='notice'>You connect \the [I] to \the [src].</span>")
|
||||
|
||||
return TRUE
|
||||
|
||||
|
||||
/obj/item/weapon/computer_hardware/battery/try_eject(slot=0, mob/living/user = null, forced = 0)
|
||||
if(!battery)
|
||||
user << "<span class='warning'>There is no power cell connected to \the [src].</span>"
|
||||
to_chat(user, "<span class='warning'>There is no power cell connected to \the [src].</span>")
|
||||
return FALSE
|
||||
else
|
||||
battery.forceMove(get_turf(src))
|
||||
user << "<span class='notice'>You detach \the [battery] from \the [src].</span>"
|
||||
to_chat(user, "<span class='notice'>You detach \the [battery] from \the [src].</span>")
|
||||
battery = null
|
||||
|
||||
if(holder)
|
||||
|
||||
@@ -44,7 +44,7 @@
|
||||
return FALSE
|
||||
|
||||
if(stored_card && stored_card2)
|
||||
user << "<span class='warning'>You try to insert \the [I] into \the [src], but its slots are occupied.</span>"
|
||||
to_chat(user, "<span class='warning'>You try to insert \the [I] into \the [src], but its slots are occupied.</span>")
|
||||
return FALSE
|
||||
if(user && !user.unEquip(I))
|
||||
return FALSE
|
||||
@@ -55,14 +55,14 @@
|
||||
stored_card = I
|
||||
else
|
||||
stored_card2 = I
|
||||
user << "<span class='notice'>You insert \the [I] into \the [src].</span>"
|
||||
to_chat(user, "<span class='notice'>You insert \the [I] into \the [src].</span>")
|
||||
|
||||
return TRUE
|
||||
|
||||
|
||||
/obj/item/weapon/computer_hardware/card_slot/try_eject(slot=0, mob/living/user = null, forced = 0)
|
||||
if(!stored_card && !stored_card2)
|
||||
user << "<span class='warning'>There are no cards in \the [src].</span>"
|
||||
to_chat(user, "<span class='warning'>There are no cards in \the [src].</span>")
|
||||
return FALSE
|
||||
|
||||
var/ejected = 0
|
||||
@@ -87,7 +87,7 @@
|
||||
var/datum/computer_file/program/P = I
|
||||
P.event_idremoved(1, slot)
|
||||
|
||||
user << "<span class='notice'>You remove the card[ejected>1 ? "s" : ""] from \the [src].</span>"
|
||||
to_chat(user, "<span class='notice'>You remove the card[ejected>1 ? "s" : ""] from \the [src].</span>")
|
||||
return TRUE
|
||||
return FALSE
|
||||
|
||||
@@ -95,11 +95,11 @@
|
||||
if(..())
|
||||
return
|
||||
if(istype(I, /obj/item/weapon/screwdriver))
|
||||
user << "<span class='notice'>You press down on the manual eject button with \the [I].</span>"
|
||||
to_chat(user, "<span class='notice'>You press down on the manual eject button with \the [I].</span>")
|
||||
try_eject(0,user)
|
||||
return
|
||||
|
||||
/obj/item/weapon/computer_hardware/card_slot/examine(mob/user)
|
||||
..()
|
||||
if(stored_card || stored_card2)
|
||||
user << "There appears to be something loaded in the card slots."
|
||||
to_chat(user, "There appears to be something loaded in the card slots.")
|
||||
|
||||
@@ -21,13 +21,13 @@
|
||||
|
||||
/obj/item/weapon/computer_hardware/hard_drive/examine(user)
|
||||
..()
|
||||
user << "<span class='notice'>It has [max_capacity] GQ of storage capacity.</span>"
|
||||
to_chat(user, "<span class='notice'>It has [max_capacity] GQ of storage capacity.</span>")
|
||||
|
||||
/obj/item/weapon/computer_hardware/hard_drive/diagnostics(var/mob/user)
|
||||
..()
|
||||
// 999 is a byond limit that is in place. It's unlikely someone will reach that many files anyway, since you would sooner run out of space.
|
||||
user << "NT-NFS File Table Status: [stored_files.len]/999"
|
||||
user << "Storage capacity: [used_capacity]/[max_capacity]GQ"
|
||||
to_chat(user, "NT-NFS File Table Status: [stored_files.len]/999")
|
||||
to_chat(user, "Storage capacity: [used_capacity]/[max_capacity]GQ")
|
||||
|
||||
// Use this proc to add file to the drive. Returns 1 on success and 0 on failure. Contains necessary sanity checks.
|
||||
/obj/item/weapon/computer_hardware/hard_drive/proc/store_file(var/datum/computer_file/F)
|
||||
|
||||
@@ -15,14 +15,14 @@ var/global/ntnet_card_uid = 1
|
||||
|
||||
/obj/item/weapon/computer_hardware/network_card/diagnostics(var/mob/user)
|
||||
..()
|
||||
user << "NIX Unique ID: [identification_id]"
|
||||
user << "NIX User Tag: [identification_string]"
|
||||
user << "Supported protocols:"
|
||||
user << "511.m SFS (Subspace) - Standard Frequency Spread"
|
||||
to_chat(user, "NIX Unique ID: [identification_id]")
|
||||
to_chat(user, "NIX User Tag: [identification_string]")
|
||||
to_chat(user, "Supported protocols:")
|
||||
to_chat(user, "511.m SFS (Subspace) - Standard Frequency Spread")
|
||||
if(long_range)
|
||||
user << "511.n WFS/HB (Subspace) - Wide Frequency Spread/High Bandiwdth"
|
||||
to_chat(user, "511.n WFS/HB (Subspace) - Wide Frequency Spread/High Bandiwdth")
|
||||
if(ethernet)
|
||||
user << "OpenEth (Physical Connection) - Physical network connection port"
|
||||
to_chat(user, "OpenEth (Physical Connection) - Physical network connection port")
|
||||
|
||||
/obj/item/weapon/computer_hardware/network_card/New(var/l)
|
||||
..(l)
|
||||
|
||||
@@ -11,11 +11,11 @@
|
||||
|
||||
/obj/item/weapon/computer_hardware/printer/diagnostics(mob/living/user)
|
||||
..()
|
||||
user << "Paper level: [stored_paper]/[max_paper]"
|
||||
to_chat(user, "Paper level: [stored_paper]/[max_paper]")
|
||||
|
||||
/obj/item/weapon/computer_hardware/printer/examine(mob/user)
|
||||
..()
|
||||
user << "<span class='notice'>Paper level: [stored_paper]/[max_paper]</span>"
|
||||
to_chat(user, "<span class='notice'>Paper level: [stored_paper]/[max_paper]</span>")
|
||||
|
||||
|
||||
/obj/item/weapon/computer_hardware/printer/proc/print_text(var/text_to_print, var/paper_title = "")
|
||||
@@ -41,13 +41,13 @@
|
||||
/obj/item/weapon/computer_hardware/printer/try_insert(obj/item/I, mob/living/user = null)
|
||||
if(istype(I, /obj/item/weapon/paper))
|
||||
if(stored_paper >= max_paper)
|
||||
user << "<span class='warning'>You try to add \the [I] into [src], but its paper bin is full!</span>"
|
||||
to_chat(user, "<span class='warning'>You try to add \the [I] into [src], but its paper bin is full!</span>")
|
||||
return FALSE
|
||||
|
||||
if(user && !user.unEquip(I))
|
||||
return FALSE
|
||||
|
||||
user << "<span class='notice'>You insert \the [I] into [src]'s paper recycler.</span>"
|
||||
to_chat(user, "<span class='notice'>You insert \the [I] into [src]'s paper recycler.</span>")
|
||||
qdel(I)
|
||||
stored_paper++
|
||||
return TRUE
|
||||
|
||||
@@ -57,7 +57,7 @@
|
||||
/obj/item/weapon/computer_hardware/recharger/wired/can_install(obj/item/device/modular_computer/M, mob/living/user = null)
|
||||
if(istype(M.physical, /obj/machinery) && M.physical.anchored)
|
||||
return ..()
|
||||
user << "<span class='warning'>\The [src] is incompatible with portable computers!</span>"
|
||||
to_chat(user, "<span class='warning'>\The [src] is incompatible with portable computers!</span>")
|
||||
return 0
|
||||
|
||||
/obj/item/weapon/computer_hardware/recharger/wired/use_power(amount, charging=0)
|
||||
|
||||
Reference in New Issue
Block a user