{"action":"created","issue":{"url":"https://api.github.com/repos/KSP-KOS/KOS/issues/1036","labels_url":"https://api.github.com/repos/KSP-KOS/KOS/issues/1036/labels{/name}","comments_url":"https://api.github.com/repos/KSP-KOS/KOS/issues/1036/comments","events_url":"https://api.github.com/repos/KSP-KOS/KOS/issues/1036/events","html_url":"https://github.com/KSP-KOS/KOS/issues/1036","id":78711172,"number":1036,"title":"Add beep sound to in-game terminal. ","user":{"login":"akrasuski1","id":5507813,"avatar_url":"https://avatars.githubusercontent.com/u/5507813?v=3","gravatar_id":"","url":"https://api.github.com/users/akrasuski1","html_url":"https://github.com/akrasuski1","followers_url":"https://api.github.com/users/akrasuski1/followers","following_url":"https://api.github.com/users/akrasuski1/following{/other_user}","gists_url":"https://api.github.com/users/akrasuski1/gists{/gist_id}","starred_url":"https://api.github.com/users/akrasuski1/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/akrasuski1/subscriptions","organizations_url":"https://api.github.com/users/akrasuski1/orgs","repos_url":"https://api.github.com/users/akrasuski1/repos","events_url":"https://api.github.com/users/akrasuski1/events{/privacy}","received_events_url":"https://api.github.com/users/akrasuski1/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2015-05-20T21:47:54Z","updated_at":"2015-05-21T16:40:30Z","closed_at":null,"body":"EDIT: Changed description.\r\n\r\nIt is already possible to do beep via telnet interface, but the in-game tutorial should also respond to ASCII 7th character (BEL)."},"comment":{"url":"https://api.github.com/repos/KSP-KOS/KOS/issues/comments/104348066","html_url":"https://github.com/KSP-KOS/KOS/issues/1036#issuecomment-104348066","issue_url":"https://api.github.com/repos/KSP-KOS/KOS/issues/1036","id":104348066,"user":{"login":"Dunbaratu","id":5216848,"avatar_url":"https://avatars.githubusercontent.com/u/5216848?v=3","gravatar_id":"","url":"https://api.github.com/users/Dunbaratu","html_url":"https://github.com/Dunbaratu","followers_url":"https://api.github.com/users/Dunbaratu/followers","following_url":"https://api.github.com/users/Dunbaratu/following{/other_user}","gists_url":"https://api.github.com/users/Dunbaratu/gists{/gist_id}","starred_url":"https://api.github.com/users/Dunbaratu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Dunbaratu/subscriptions","organizations_url":"https://api.github.com/users/Dunbaratu/orgs","repos_url":"https://api.github.com/users/Dunbaratu/repos","events_url":"https://api.github.com/users/Dunbaratu/events{/privacy}","received_events_url":"https://api.github.com/users/Dunbaratu/received_events","type":"User","site_admin":false},"created_at":"2015-05-21T16:40:30Z","updated_at":"2015-05-21T16:40:30Z","body":"Darn it, I really hate it when something supposedly simple ends up being a major pain because of how the infrastructure is laid out.\r\n\r\nI ran into this problem:\r\n\r\nWhen you ``PRINT blarg.``, for any blarg, the path the code takes to make this work is as follows:\r\n\r\nGet the current ScreenBuffer.  Tell the ScreenBuffer to Print the string Blarg. \r\nWhen the ScreenBuffer prints the string Blarg, it stores the resulting chars in the buffer array.\r\n\r\nMultiple times a second, the GUI terminal wakes up and checks its screenbuffer to display what it sees there.\r\n\r\nTherefore the system doesn't support \"printing\" characters that don't take up an actual cell on the terminal grid.  The Terminal has a reference to the ScreenBuffer, but the ScreenBuffer doesn't have a reference to the Terminal in it, so ScreenBuffer.Print() can't just tell the terminal to beep when it sees a 0x07 char.\r\n\r\nI think the ScreenBuffer needs a \"beep is pending\" flag. When it is on, the next update will issue a beep and clear the flag.  Therefore when you ScreenBuffer.Type() a beep, the next update will issue the beep from somewhere (it doesn't matter where) on the screen as it prints the characters.\r\n\r\n"}}