diff --git a/computer/commands/command.dm b/computer/commands/command.dm index fc3586a..bcd6127 100644 --- a/computer/commands/command.dm +++ b/computer/commands/command.dm @@ -939,4 +939,17 @@ /datum/command/ip/Run(var/list/args) if(source.this_ip == null) GetAdress(source.holder) - source.Message(source.this_ip.String()+":[source.this_ip.count]") \ No newline at end of file + source.Message(source.this_ip.String()+":[source.this_ip.count]") + +//clear, clears the screen// + +/datum/command/clear + names = list("cls") + help_text = "help {CLS}: Clears the screen of all text." +/datum/command/clear/Run(var/list/args) + source.screen = list() + for(var/mob/A in source.mob_users) + A.client << output(null, "console.text") + +//End aliases + diff --git a/computer/def.dm b/computer/def.dm index 966dc4f..9e9b638 100644 --- a/computer/def.dm +++ b/computer/def.dm @@ -34,6 +34,7 @@ mob/verb/cmd(msg as text) var/list/tasks = list() var/list/ip_list = list() var/list/config = list("webserver" = 0,motd = "Welcome to the server") + var/list/screen = list() /datum/os/Del() for(var/datum/praser/P in process) del(P) @@ -87,5 +88,9 @@ mob/verb/cmd(msg as text) return Y /datum/os/proc/Message(var/msg) + screen.Add(msg) for(var/mob/A in src.mob_users) - A.client << output(msg, "console.text") \ No newline at end of file + if(get_dist(A, holder) <= 1) + A.client << output(msg, "console.text") + else + winshow(A.client,"console",0) \ No newline at end of file diff --git a/computer/mob.dm b/computer/mob.dm index 1016cd1..ead7d06 100644 --- a/computer/mob.dm +++ b/computer/mob.dm @@ -8,7 +8,12 @@ mob/proc/SetActiveSystem(var/datum/os/sys) current.mob_users -= src current = sys current.mob_users += src + winshow(src.client,"console",1) + src.client << output(null, "console.text") + for(var/entry in sys.screen) + src.client << output(entry, "console.text") + mob/verb/say(msg as text) for(var/mob/A in viewers()) A << "[src.name] said, \"[msg]\"" \ No newline at end of file