Skip to content

v1.1.0

Choose a tag to compare

@Github-Samuel Github-Samuel released this 17 Oct 15:59
· 2 commits to main since this release

Added

  • Custom apps. Other resources can now put their own programs on the desktop. An app is a web page from your resource: register it from your server with exports['sd-computers']:AddCustomApp({...}) and it gets an icon, a window, a taskbar and dock entry and a count badge, in all three looks.
    • Decide who gets it on which computer: by computer, by look, by job or gang, by an item they carry, or by a check of your own. Apps appear and disappear on open desktops as they are registered, removed, or as their gates change.
    • The page gets the desktop's API as window.computer: calls to your server that only ever run for a player signed in at a computer with your app, the desktop's own dialogs and context menus, notifications, the Photos picker, printing to a printer in the room, storage per character or per computer, opening Mail or the Browser, lines in the Event Viewer, its window, and the desktop's colours to match them.
    • Your server and client push to the page with SendAppMessage / SendCustomAppMessage, and onOpen / onClose run on your server as the window opens and closes.
    • Players watching the screen on the prop see your app's name, never its page.
  • App templates. sd-computers-app-templates has the same small app in plain JavaScript, React (JavaScript and TypeScript), Vue and Svelte, ready to copy and rename, and Wrenchworks, a garage's work-order book that uses every call.

The guide is at docs.samueldev.shop/resources/computers/custom-apps.

Fixed

  • Printed pages with a long line beside the letterhead no longer break the letterhead in the middle of a word.
  • The games' windows no longer close when the desktop's list of apps changes, such as when a phone is linked.

Updating

Download sd-computers.zip below and unzip it over your sd-computers folder, keeping your own copies of anything you changed in configs/. There is one new config file, configs/shared/apps.lua (the limits on custom apps), and configs/config.lua has one new line for it, Apps = require 'configs.shared.apps'. Without that line the defaults apply. The new computers_app_data table creates itself on first start.

Not "Source code (zip)". That is the source, without the built interface, and a computer opens to a blank screen until you build it yourself.