diff --git a/.editorconfig b/.editorconfig new file mode 100644 index 0000000..7d5ef1f --- /dev/null +++ b/.editorconfig @@ -0,0 +1,19 @@ + +# EditorConfig is awesome: https://EditorConfig.org + +# top-most EditorConfig file +root = true + +[*] +charset = utf-8 +end_of_line = lf +insert_final_newline = true +trim_trailing_whitespace = true + +[*.dm] +end_of_line = crlf +indent_style = tab +indent_size = 4 + +[*.dmm] +end_of_line = crlf diff --git a/.git-blame-ignore-revs b/.git-blame-ignore-revs new file mode 100644 index 0000000..00f5ecf --- /dev/null +++ b/.git-blame-ignore-revs @@ -0,0 +1,4 @@ + +# Ignores big formatting commits when checking blame. +# To make use of this file by default, run 'git config blame.ignoreRevsFile .git-blame-ignore-revs' +# in the project folder diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..9bbb47e --- /dev/null +++ b/.gitattributes @@ -0,0 +1,38 @@ + +* text=auto + +## Enforce text mode and LF line breaks +*.bat text eol=lf +*.dm text eol=lf +*.dme text eol=lf +*.dmf text eol=lf +*.htm text eol=lf +*.html text eol=lf +*.js text eol=lf +*.json text eol=lf +*.md text eol=lf +*.ps1 text eol=lf +*.sh text eol=lf +*.txt text eol=lf +*.yaml text eol=lf +*.yml text eol=lf + +## Enforce binary mode +*.bmp binary +*.dll binary +*.dmb binary +*.exe binary +*.gif binary +*.jpg binary +*.png binary +*.so binary + +## Merger hooks, run tools/hooks/install.bat or install.sh to set up +*.dmm text eol=lf merge=dmm +*.dmi binary merge=dmi + +## Force tab indents on dm files +*.dm whitespace=indent-with-non-tab + +## Force changelog merging to use union +code/changelog/* text eol=lf merge=union diff --git a/.gitignore b/.gitignore index 45e3e36..46d379b 100644 --- a/.gitignore +++ b/.gitignore @@ -1,47 +1,556 @@ -# Compiled source # -################### -*.com -*.class -*.dll -*.exe -*.o -*.so -# Packages # -############ -# it's better to unpack these files and commit the raw source -# git has its own built in compression methods -*.7z -*.dmg -*.gz +# Created by https://www.toptal.com/developers/gitignore/api/visualstudiocode,windows,linux,macos,archive,dm,c,nohup,vim,database,archives,compressedarchive,games,react,git,executable,java,strapi +# Edit at https://www.toptal.com/developers/gitignore?templates=visualstudiocode,windows,linux,macos,archive,dm,c,nohup,vim,database,archives,compressedarchive,games,react,git,executable,java,strapi + +### Archive ### + +### Mostly from https://en.wikipedia.org/wiki/List_of_archive_formats + +## Archiving only +# The traditional archive format on Unix-like systems, now used mainly for the creation of static libraries. +*.a +*.ar +# RPM files consist of metadata concatenated with (usually) a cpio archive. Newer RPM systems also support other archives, as cpio is becoming obsolete. cpio is also used with initramfs. +*.cpio + +# A self-extracting archive that uses the Bourne shell (sh). +*.shar +# A system for storing multiple files. LBR archives typically contained files processed by SQ, or the archive itself was compressed with SQ. LBR archives that were compressed with SQ ended with the extension .LQR +*.LBR +# An archive format originally used mainly for archiving and distribution of the exact, nearly-exact, or custom-modified contents of an optical storage medium such as a CD-ROM or DVD-ROM. However, it can be used to archive the contents of other storage media, selected partitions, folders, and/or files. The resulting archive is typically optimized for convenient rendering to (re-)writable CD or DVD media. *.iso +# A library format used primarily on the Commodore 64 and 128 lines of computers. This bears no resemblance to the DOS LBR format. While library files were quick to implement (a number of programs exist to work with them) they are crippled in that they cannot grow with use: once a file has been created it cannot be amended (files added, changed or deleted) without recreating the entire file. +*.lbr +# An archive format used by Mozilla for storing binary diffs. Used in conjunction with bzip2. +*.mar +# A common archive format used on Unix-like systems. Generally used in conjunction with compressors such as gzip, bzip2, compress or xz to create .tar.gz, .tar.bz2, .tar.Z or tar.xz files. +*.tar + +# Package managers +# Red Hat Package Manager +*.rpm +# Debian package +*.deb +# MicroSoft Installer +*.msi +*.msm +*.msp +# Mozilla package installer +*.xpi +# Ruby Package +*.gem + + +### Archives ### +# It's better to unpack these files and commit the raw source because +# git has its own built in compression methods. +*.7z *.jar *.rar -*.tar *.zip +*.gz +*.gzip +*.tgz +*.bzip +*.bzip2 +*.bz2 +*.xz +*.lzma +*.cab +*.xar -# Logs and databases # -###################### +# Packing-only formats + +# Package management formats +*.dmg +*.egg +*.txz + +### C ### +# Prerequisites +*.d + +# Object files +*.o +*.ko +*.obj +*.elf + +# Linker output +*.ilk +*.map +*.exp + +# Precompiled Headers +*.gch +*.pch + +# Libraries +*.lib +*.la +*.lo + +# Shared objects (inc. Windows DLLs) +*.dll +*.so +*.so.* +*.dylib + +# Executables +*.exe +*.out +*.app +*.i*86 +*.x86_64 +*.hex + +# Debug files +*.dSYM/ +*.su +*.idb +*.pdb + +# Kernel Module Compile Results +*.mod* +*.cmd +.tmp_versions/ +modules.order +Module.symvers +Mkfile.old +dkms.conf + +### CompressedArchive ### + + +## Archiving and compression +# Open source file format. Used by 7-Zip. +# Mac OS X, restoration on different platforms is possible although not immediate Yes Based on 7z. Preserves Spotlight metadata, resource forks, owner/group information, dates and other data which would be otherwise lost with compression. +*.s7z +# Old archive versions only Proprietary format +*.ace +# A format that compresses and doubly encrypt the data (AES256 and CAS256) avoiding brute force attacks, also hide files in an AFA file. It has two ways to safeguard data integrity and subsequent repair of the file if has an error (repair with AstroA2P (online) or Astrotite (offline)). +*.afa +# A mainly Korean format designed for very large archives. +*.alz +# Android application package (variant of JAR file format). +*.apk +# ?? +*.arc +# Originally DOS, now multiple +*.arj +# Open archive format, used by B1 Free Archiver (http://dev.b1.org/standard/archive-format.html) +*.b1 +# Binary Archive with external header +*.ba +# Proprietary format from the ZipTV Compression Components +*.bh +# The Microsoft Windows native archive format, which is also used by many commercial installers such as InstallShield and WISE. +# Originally DOS, now DOS and Windows Created by Yaakov Gringeler; released last in 2003 (Compressia 1.0.0.1 beta), now apparently defunct. Free trial of 30 days lets user create and extract archives; after that it is possible to extract, but not to create. +*.car +# Open source file format. +*.cfs +# Compact Pro archive, a common archiver used on Mac platforms until about Mac OS 7.5.x. Competed with StuffIt; now obsolete. +*.cpt +# Windows, Unix-like, Mac OS X Open source file format. Files are compressed individually with either gzip, bzip2 or lzo. +*.dar +# DiskDoubler Mac OS obsolete +*.dd +# ?? +*.dgc +# Apple Disk Image upports "Internet-enabled" disk images, which, once downloaded, are automatically decompressed, mounted, have the contents extracted, and thrown away. Currently, Safari is the only browser that supports this form of extraction; however, the images can be manually extracted as well. This format can also be password-protected or encrypted with 128-bit or 256-bit AES encryption. +# Enterprise Java Archive archive +*.ear +# ETSoft compressed archive +# The predecessor of DGCA. +*.gca +# Originally DOS Yes, but may be covered by patents DOS era format; uses arithmetic/Markov coding +*.ha +# MS Windows HKI +*.hki +# Produced by ICEOWS program. Excels at text file compression. +*.ice +# Java archive, compatible with ZIP files +# Open sourced archiver with compression using the PAQ family of algorithms and optional encryption. +*.kgb +# Originally DOS, now multiple Multiple Yes The standard format on Amiga. +*.lzh +*.lha +# Archiver originally used on The Amiga. Now copied by Microsoft to use in their .cab and .chm files. +*.lzx +# file format from NoGate Consultings, a rival from ARC-Compressor. +*.pak +# A disk image archive format that supports several compression methods as well as splitting the archive into smaller pieces. +*.partimg +# An experimental open source packager (http://mattmahoney.net/dc) +*.paq* +# Open source archiver supporting authenticated encryption, volume spanning, customizable object level and volume level integrity checks (form CRCs to SHA-512 and Whirlpool hashes), fast deflate based compression +*.pea +# The format from the PIM - a freeware compression tool by Ilia Muraviev. It uses an LZP-based compression algorithm with set of filters for executable, image and audio files. +*.pim +# PackIt Mac OS obsolete +*.pit +# Used for data in games written using the Quadruple D library for Delphi. Uses byte pair compression. +*.qda +# A proprietary archive format, second in popularity to .zip files. +# The format from a commercial archiving package. Odd among commercial packages in that they focus on incorporating experimental algorithms with the highest possible compression (at the expense of speed and memory), such as PAQ, PPMD and PPMZ (PPMD with unlimited-length strings), as well as a proprietary algorithms. +*.rk +# Self Dissolving ARChive Commodore 64, Commodore 128 Commodore 64, Commodore 128 Yes SDAs refer to Self Dissolving ARC files, and are based on the Commodore 64 and Commodore 128 versions of ARC, originally written by Chris Smeets. While the files share the same extension, they are not compatible between platforms. That is, an SDA created on a Commodore 64 but run on a Commodore 128 in Commodore 128 mode will crash the machine, and vice versa. The intended successor to SDA is SFX. +*.sda +# A pre-Mac OS X Self-Extracting Archive format. StuffIt, Compact Pro, Disk Doubler and others could create .sea files, though the StuffIt versions were the most common. +*.sea +# Scifer Archive with internal header +*.sen +# Commodore 64, Commodore 128 SFX is a Self Extracting Archive which uses the LHArc compression algorithm. It was originally developed by Chris Smeets on the Commodore platform, and runs primarily using the CS-DOS extension for the Commodore 128. Unlike its predecessor SDA, SFX files will run on both the Commodore 64 and Commodore 128 regardless of which machine they were created on. +*.sfx +# An archive format designed for the Apple II series of computers. The canonical implementation is ShrinkIt, which can operate on disk images as well as files. Preferred compression algorithm is a combination of RLE and 12-bit LZW. Archives can be manipulated with the command-line NuLib tool, or the Windows-based CiderPress. +*.shk +# A compression format common on Apple Macintosh computers. The free StuffIt Expander is available for Windows and OS X. +*.sit +# The replacement for the .sit format that supports more compression methods, UNIX file permissions, long file names, very large files, more encryption options, data specific compressors (JPEG, Zip, PDF, 24-bit image, MP3). The free StuffIt Expander is available for Windows and OS X. +*.sitx +# A royalty-free compressing format +*.sqx +# The "tarball" format combines tar archives with a file-based compression scheme (usually gzip). Commonly used for source and binary distribution on Unix-like platforms, widely available elsewhere. +*.tar.gz +*.tar.Z +*.tar.bz2 +*.tbz2 +*.tar.lzma +*.tlz +# UltraCompressor 2.3 was developed to act as an alternative to the then popular PKZIP application. The main feature of the application is its ability to create large archives. This means that compressed archives with the UC2 file extension can hold almost 1 million files. +*.uc +*.uc0 +*.uc2 +*.ucn +*.ur2 +*.ue2 +# Based on PAQ, RZM, CSC, CCM, and 7zip. The format consists of a PAQ, RZM, CSC, or CCM compressed file and a manifest with compression settings stored in a 7z archive. +*.uca +# A high compression rate archive format originally for DOS. +*.uha +# Web Application archive (Java-based web app) +*.war +# File-based disk image format developed to deploy Microsoft Windows. +*.wim +# XAR +# Native format of the Open Source KiriKiri Visual Novel engine. Uses combination of block splitting and zlib compression. The filenames and pathes are stored in UTF-16 format. For integrity check, the Adler-32 hashsum is used. For many commercial games, the files are encrypted (and decoded on runtime) via so-called "cxdec" module, which implements xor-based encryption. +*.xp3 +# Yamazaki zipper archive. Compression format used in DeepFreezer archiver utility created by Yamazaki Satoshi. Read and write support exists in TUGZip, IZArc and ZipZag +*.yz1 +# The most widely used compression format on Microsoft Windows. Commonly used on Macintosh and Unix systems as well. +*.zipx +# application/x-zoo zoo Multiple Multiple Yes +*.zoo +# Journaling (append-only) archive format with rollback capability. Supports deduplication and incremental update based on last-modified dates. Multi-threaded. Compresses in LZ77, BWT, and context mixing formats. Open source. +*.zpaq +# Archiver with a compression algorithm based on the Burrows-Wheeler transform method. +*.zz + + +### Database ### +*.accdb +*.db +*.dbf +*.mdb +*.sqlite3 + +### DM ### +*.dmb +*.rsc +*.int +*.lk + +### Executable ### +*.bat +*.cgi +*.com +*.gadget +*.pif +*.vb +*.wsf + +### Games ### +*.gam +*.nes +*.rom +*.sav + +### Git ### +# Created by git for backups. To disable backups in Git: +# $ git config --global mergetool.keepBackup false +*.orig + +# Created by git when using merge tools for conflicts +*.BACKUP.* +*.BASE.* +*.LOCAL.* +*.REMOTE.* +*_BACKUP_*.txt +*_BASE_*.txt +*_LOCAL_*.txt +*_REMOTE_*.txt + +### Java ### +# Compiled class file +*.class + +# Log file *.log -*.sql -*.sqlite -# OS generated files # -###################### +# BlueJ files +*.ctxt + +# Mobile Tools for Java (J2ME) +.mtj.tmp/ + +# Package Files # +*.nar + +# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml +hs_err_pid* + +### Linux ### +*~ + +# temporary files which can be created if a process still has a handle open of a deleted file +.fuse_hidden* + +# KDE directory preferences +.directory + +# Linux trash folder which might appear on any partition or disk +.Trash-* + +# .nfs files are created when an open file is removed but is still being accessed +.nfs* + +### macOS ### +# General .DS_Store -.DS_Store? +.AppleDouble +.LSOverride + +# Icon must end with two \r +Icon + + +# Thumbnails ._* + +# Files that might appear in the root of a volume +.DocumentRevisions-V100 +.fseventsd .Spotlight-V100 +.TemporaryItems .Trashes -ehthumbs.db +.VolumeIcon.icns +.com.apple.timemachine.donotpresent + +# Directories potentially created on remote AFP share +.AppleDB +.AppleDesktop +Network Trash Folder +Temporary Items +.apdisk + +### Nohup ### +nohup.out + +### react ### +.DS_* +logs +**/*.backup.* +**/*.back.* + +node_modules +bower_components + +*.sublime* + +psd +thumb +sketch + +### Strapi ### + +.env +license.txt +exports +*.cache +build +.strapi-updater.json + +############################ +# OS X + +Icon + +# Linux + + + +# Windows + Thumbs.db +ehthumbs.db +Desktop.ini +$RECYCLE.BIN/ + + +# Packages + +*.csv +*.dat +*.seed +*.swo +*.swp +*.swn +*.swm +*.pid + +# Logs and databases + +.tmp +*.sql +*.sqlite + + +# Misc. + +*# +ssl +.idea +nbproject +public/uploads/* +!public/uploads/.gitkeep + +# Node.js + +lib-cov +lcov.info +pids +results +.node_history + +# Tests + +testApp +coverage + +### Vim ### +# Swap +[._]*.s[a-v][a-z] +!*.svg # comment out if you don't need vector files +[._]*.sw[a-p] +[._]s[a-rt-v][a-z] +[._]ss[a-gi-z] +[._]sw[a-p] + +# Session +Session.vim +Sessionx.vim + +# Temporary +.netrwhist +# Auto-generated tag files +tags +# Persistent undo +[._]*.un~ + +### VisualStudioCode ### +.vscode/* +!.vscode/settings.json +!.vscode/tasks.json +!.vscode/launch.json +!.vscode/extensions.json +*.code-workspace + +# Local History for Visual Studio Code +.history/ + +### VisualStudioCode Patch ### +# Ignore all local history of files +.history +.ionide + +### Windows ### +# Windows thumbnail cache files +Thumbs.db:encryptable +ehthumbs_vista.db + +# Dump file +*.stackdump + +# Folder config file +[Dd]esktop.ini + +# Recycle Bin used on file shares + +# Windows Installer files +*.msix + +# Windows shortcuts +*.lnk + +# End of https://www.toptal.com/developers/gitignore/api/visualstudiocode,windows,linux,macos,archive,dm,c,nohup,vim,database,archives,compressedarchive,games,react,git,executable,java,strapi + + + + + + + + + + + + + + + +# ignore misc BYOND files +*.backup +*.before +data/ +dmdoc/ +cfg/ +build_log.txt +use_map +stopserver +reboot_called +atupdate + +# sometimes something create backups of maps +maps/*/backup/*.dmm + +# ignore config, but not subdirs +config/* +!config/*/ +sql/test_db + +# swap +[._]s[a-v][a-z] + +# https://github.com/SpaceManiac/SpacemanDMM +data/minimaps + +config +!config/custom_items +!config/example +!config/info +!config/names + + + + + + +# OS generated files # +###################### +.DS_Store? # BYOND Stuff # ############### - -*.dmb -*.rsc -*.lk -*.int -*.sav -saves/* \ No newline at end of file +saves/* +config/door_codes.json +config/admins.json diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 0000000..e69de29 diff --git a/.vscode/extensions.json b/.vscode/extensions.json new file mode 100644 index 0000000..cb19c03 --- /dev/null +++ b/.vscode/extensions.json @@ -0,0 +1,11 @@ +{ + "recommendations": [ + "arcanis.vscode-zipfs", + "dbaeumer.vscode-eslint", + "Donkie.vscode-tgstation-test-adapter", + "EditorConfig.EditorConfig", + "gbasood.byond-dm-language-support", + "platymuus.dm-langclient", + "stylemistake.auto-comment-blocks" + ] +} diff --git a/.vscode/launch.json b/.vscode/launch.json new file mode 100644 index 0000000..686f5ea --- /dev/null +++ b/.vscode/launch.json @@ -0,0 +1,12 @@ +{ + "version": "0.2.0", + "configurations": [ + { + "type": "byond", + "request": "launch", + "name": "Launch DreamSeeker", + "preLaunchTask": "Build All", + "dmb": "${workspaceFolder}/${command:CurrentDMB}" + } + ] +} diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 0000000..9ca08b9 --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,34 @@ +{ + "editor.detectIndentation": false, + "editor.insertSpaces": false, + "editor.tabSize": 4, + "files.encoding": "utf8", + "files.eol": "\r\n", + "files.insertFinalNewline": true, + "files.trimFinalNewlines": true, + "gitlens.advanced.blame.customArguments": ["-w"], + "tgstationTestExplorer.project.resultsType": "json", + "workbench.editorAssociations": { + "*.ipynb": "jupyter-notebook", + "*.dmi": "imagePreview.previewEditor", + "*.swf": "default" + }, + "files.trimTrailingWhitespace": true, + "files.exclude": { + "**/.git": false, + "**/.svn": false, + "**/.hg": false, + "**/CVS": false, + "**/.DS_Store": false, + "**/.classpath": false, + "**/.project": false, + "**/.settings": false, + "**/.factorypath": false, + "**/.vscode": false, + "**/*.dmb": false, + "**/*.lk": false, + "**/*.rsc": false, + "**/~playground": false + }, + "explorerExclude.backup": null, +} diff --git a/.vscode/tasks.json b/.vscode/tasks.json new file mode 100644 index 0000000..c61bf94 --- /dev/null +++ b/.vscode/tasks.json @@ -0,0 +1,26 @@ +{ + "version": "2.0.0", + "tasks": [ + { + "type": "dreammaker", + "dme": "console.dme", + "problemMatcher": [ + "$dreammaker" + ], + "group": { + "kind": "build", + "isDefault": true + }, + "label": "dm: build - console.dme", + "options": { + "env": { + "DM_EXE": "${config:dreammaker.byondPath}" + } + }, + "presentation": { + "clear": true, // Before starting a new session in an terminal, clear the terminal. + "panel": "shared" + } + } + ] +} diff --git a/books/tutorial.txt b/books/tutorial.txt new file mode 100644 index 0000000..31608d9 --- /dev/null +++ b/books/tutorial.txt @@ -0,0 +1,152 @@ + +[page]Lesson 1: Using Console[body]

All + computers on Console must be operated, to be used. You can right click a + computer and click operate to start this. After the computer loads up, +you will be in the root/usr directory. The root, is the highest point of + the computer. It's where everything begins. Many of Console's commands +can be listed just by typing help. The ones you will be using most often though, are make and append. + Append is actually not a built-in console command, but is tied to the +registry (located in the sys) folder. It's a program that comes with +most Console computers. If you try make file.txt you will make a file called file.txt. You can then append file.txt to start writing in it. Others can then read file.txt by typing read file.txt. Try experimenting with the various commands under help. If you want help on a specific command, like for example, make, you would type help make. The last command of note, would be cd. It is what takes you to various parts of the computer.

cd .. would take you to the higher level of the directory. The highest level is always the root.

cd / or cd root takes you to the root of the computer.

cd [foldername] takes you to the folder you want to see. To see a list of files and folders, you would type display.

And lastly noted, a computer can only run around 5 programs/scripts at once.

+ +[page]Lesson 2: Scripting[body]

Scripting + is the basic form of programming in Console. Scripts are files that +simply use Console commands in an order. An example script would be...

echo Hello;delay 30;echo Goodbye

The + echo means, to display on the screen. Anything following an echo +appears on the screen, such as the Hello. A ; seperates commands from +one another. The delay, delays the game for that many ticks. 10 ticks +equals 1 second, so that script delays for 3 seconds before continuing +the next action. And then the last echo says Goodbye before ending the +script.

Scripts can be compiled to prevent people from reading +them. The program scr_compiler.exe in a Console's bin folder can do +this. run /bin/scr_compiler.exe file.txt would compile file.txt +as a script. And anytime someone ran file.txt, it would execute it's +contents. You cannot use the regular compiler however, as that is for +ExCode only.

+ +[page]Lesson 3: Simple Networking[body]

The + most simple way to network computers, is to hook them up directly. With + wire you can hook two computers by double clicking each of them with +the wire equipped. [You can make wire from under the make tab]

When + computers are hooked up, you can send files from one to another, or +commands using the extern function. Extern is quite advanced though, and + not listed in this book. send 01 21 file.txt would normally send + a file.txt from the computer on port 01 to the computer on port 21. The + ports are decided based on where they are hooked into a router, hub, or + other networking device. If two computers are directly linked though, +it will not matter what numbers are used. One number of note is 100. It +sends the file to everything on the network. An example of this would be + send 100 100 file.txt.

This is an easy way to email +others. You can have computers in different rooms hooked up by wire and +communicate with each other. All files that are sent to each other will +be in the computer's root/tmp directory. This is also a great way to +print files. Hook a computer directly to a printer, and send the printer + files to print!

+ +[page]Lesson 4: Networking with Hubs[body]

Hubs + are the basic network utility for a console computer. Anything hooked +up to a hub sends to everything else hooked up to the hub. For this +lesson you will need two Console computers, wire, and a hub.

Hook + the first computer up to the hub. It should say something about 0 to +20. This is in-accurate. Console doesn't give the correct numbers. 0-20 +is actually 0-19, 20-40 is 20-39, and so on and so forth. But the +numbers mean nothing for now because hubs send everything to all the +devices on the network. Hook the second computer up, and it will talk +about 20-40 which again is actually 20-39, for your own reference.

Make a file on the first computer, and type send 100 100 [file]. + Replace [file] with the name of the file you made. Go to the other +computer, and go to it's root/tmp directory. You should find that file +there. If you wrote anything in it, you can read it. Congratulations, +you've used your first hub. Hubs are great for sharing files and +information across many computers, but not for things like emailing. +Because the email would be sent to all the computers, rather than just +one. For something like that you want wireless or router networking.

+ +[page]Lesson 5: Basic ExCode[body]

ExCode + is easy, once you've had the time to associate yourself with it. Taking + a look at source code, even after being around it for a day or two, can + still be confusing. That is why there is this guide to ExCode. Basic +ExCode will teach you how to make a program that uses Console commands, +like scripting, except it does not have the limit of just using console +commands. The lesson after this will teach you more.

The main part of ExCode having to deal with Console is shell;. This runs a command through Console's shell. So, a shell;"restart + would restart the computer. Why is there a " there? Because without it, + it would try to use a variable named restart. Since we haven't made a +variable named restart, it would be empty, and the program would run a +useless command.

ExCode must also be put in differently than a script. You must mass-add ExCode, in a form like the following...

shell;"echo Hello world.
shell;"delay 30
shell;"echo 3 seconds have passed.
shell;"delay 30
shell;"echo 3 more seconds have passed. Goodbye.


Every + new function of ExCode is on a new line. Recognize the echo and delay? +That's right. You use those in scripting. Anything you would use in +scripting can be used with the shell function of ExCode. But it's +important to have the " placed before anything you would use as a +command.

There is also the id and goto functions. The goto function takes you to the ID named in Goto, and continues the program from there.

shell;"echo SHUTTING DOWN!!
goto;cancel
shell;"shutdown
id;cancel
shell;"echo Just kidding.


If you can understand this so far, it would look like this is going to shutdown the computer. But the goto;cancel will skip the program's code until it reaches id;cancel. It will then continue from there, and echo the Just Kidding message.

The + last, and most important thing to know about ExCode, is that it CANNOT +run uncompiled. After making your program (most ExCode programs are +named with a .exe extension) you need to compile it. Most Console +computers include the proper Compiler. Try run /bin/compiler.exe [filename] but replace [filename] with the name of your ExCode program.

+ +[page]Lesson 6: Menus in ExCode[body]

ExCode + can be used to create menus. Obviously, you would want these if you +were to make a program that asked questions, right? Below is a source +code to a yes or no prompt.

shell;"echo Would you like to restart?
id;null_input
set;input:"1;null
id;null
if;input:"1;==;null;null
if;input:"1;==;"yes;go
if;input:"1;==;"no;stop
shell;"echo yes or no only please.
goto;null_input
id;go
shell;"restart
id;stop
shell;"echo Ending program.


input:"1 is a variable that changes to anything a user types into a computer. The if + function of ExCode checks if a variable is equal to a certain value. +That value can be another variable, or a specific value you code in. In if;input:"1;==;"yes;go it checks to see if the variable input:"1 equals the value "yes. + As shown in the previous lesson, the " distinguishes it from a value +and a variable. Without the " it would compare it to another variable +named yes. If the input does equal yes, then it goes to the id named go.

We + also have to null the current input before we ask for a yes or no, and +set the program to loop at that spot until the user types something in. +If the input is null (nothing in it), then it goes to the id null, by +what the above example says. Where it says, shell;"echo yes or no only please + it echoes the shown message if you input something that's not in your +options menu. Below that, is a goto function that takes it back to the +id null_input.

That is the end of Lesson 6. If you combine what +you know with lesson 5, you should be able to make programs that do +functions in console based on what you type in. Such as, if you wanted +to make someone type yes or no, to copy a specific file. That would make + an easy install file. To copy a file using ExCode, you would use the +shell. shell;"copy [filename] [location] but replace the items in brackets with what you would like to do.

+ +[page]Lesson 7: Console Commands[body]

These commands run once console is called for in the computer. It is by default in a console computer when it turns on.

help - Brings up the help menu in Console.
cd [dir] - The default 'go' command in Console. It moves from directory to directory. The [dir] needs to be replaced with .. , / , or a full directory path.
console + - This is actually used in a boot file only, and activates console so +that you may input commands into the computer. Read /sys/boot.sys for an + example.
copy [file] [location] - Copies the [file] to [location].
del [file/dir] - Deletes the file or directory.
delay # - Delays a script or program for # ticks. 10 ticks is equal to 1 second.
display - Displays the contents of the directory you're currently in.
drive - Takes you to the A:/ drive if you have a disk put in the computer.
echo [text] - Displays [text] on the screen. Used mostly in programming.
eject - Ejects the disk from the computer.
make [name] - Makes a file named [name].
makedir [name] - Makes a directory named [name].
restart - Restarts the computer.
read [file] - Reads the contents of [file].
rename [file] [name] - Renames the [file] to [name].
root - Takes you to the root directory.
run [file] - Runs [file] as a script or program, based on if and how it's compiled.
shutdown - Shuts the computer off.

If the Console still has all of it's default contents, you can also use the following two commands.

append [file] - Runs the built-in word processor on [file].
write [file] - Erases the contents of [file] and runs the built-in word processor on [file].

+ +[page]Lesson 8: OS Commands[body]

OS Commands can be used in scripting and ExCode, once the os.sys is loaded. It is loaded by default on most console computers.

file_clear [file] - Clears all of the text in the file.
file_exists [file] - Needs to be used in ExCode to work properly. Tells you if the [file] exists or not.

shell;"file_exists /usr/test.txt
if;err_level;==;"true;file_exist

If test.txt does exist, the program goes to id;file_exist.
file_add [file] [text] + - Adds to [file] the [text]. [newline] creates a new line in the file +(useful if CREATING ExCode directly) and any semicolons (;) need to be +replaced with [semi].
send [source] [destination] [file] - Sends [file] from the computer on port [source] to the computer on port [destination].
extern [source] [destination] [id] [parameters] + - Sends [parameters] to the [id] on the computer in port [destination] +from the computer on port [source]. -2 should not be used for the ID, -1 + is reserved, 0 will try to execute shell.scr, anything besides 0 or -1 +executes packet[id].scr [src_id] [parameters]. If the packet is not +there, it makes packet[id].dat with text [src_id];[parameters].
error - Unknown by Stari. Information on this is not included in this book.
e_key # + - Sets the encryption key to #. The highest Encryption key available is + 600. Used on wireless devices only. Laptops are wireless.
hide [file] - Hides [file] from view on display.
reveal [file] - Reveals [file] for viewing on display.
timestamp - Sets the error level to the current time/date. In order to assign this to a variable ExCode is needed.
timer - Sets the error level to the current amount of ticks in the game. In order to assign this to a variable ExCode is needed.
bios_[1-3] [file_path] + Sets the bootup file to [file_path]. The actual boot order the file +goes in is bios_1, bios_2, or bios_3. By default, bios_1 is A:/boot.sys. + By default, bios_2 is /sys/boot.sys. By default, bios_3 is none.
pass_[1-3] [password] Passwords the bootup for a specific boot level.

+ +[page]Lesson 9: Default Console System Data[body]

Directories
usr - Default directory for bootup.
bin - Default programs are kept here.
sys - System files are kept here.
log - System logs are kept here.
tmp - Temporary files, and files recieved from networks are kept here.

Programs
/bin/wp.exe - This is the builtin word processor. Use the write and append commands.
/sys/kernel.sys - This should be run first on startup.
/sys/os.sys - This should be run after the kernel.

Logs
If + a log file is deleted, a new log file is created with a different +startup time. Logs cannot be kept if there is no root/log folder. The +logs are named as the tick when it started logging.

Scripts
See scripting.

Registry
Located in /sys/registry/. + Programs here are named [name].com. If you type [name] while using +Console, it will run a program in the /sys/registry/ directory named +[name].com.

Shell
Externel shell access can be made if +you create a file called shell.scr in the /usr directory. The computer +sending commands via extern will automatically transfer the data +directly to the command line IF the id is 0.

Tasks
Only one program can be run at a time. But several processes can be run in the background via the back + command. If a program is run, it locks up console until the program +finishes. If a program is backgrounded, console will still run and the +program will complete it's duties but there will be a slight delay to +it's function. If you run a program from a previous program, the new +program will take over and freeze the old program until the new program +finishes.

+ +[page]Lesson 10: List of ExCode Functions/Commands[body]

comment;[text]
Just makes [text] the comment
***
shell;[var]
Passes the contents of [var] to the command prompt
***
shell;"[sting]
Passes the string [string] to the command prompt
***
id;[string]
Makes a id called [string]
***
goto;[string]
Goes to id [string]
***
set;[string];"[string2]
Makes a variable called [string] and it is filled with whats in [string2]
***
if;[variable1];[function];[variable2];[id]
The if command tests if [variable1] is [function] [variable2] ifso... it gotos
[id] [variable2] can be a string like "1 or "Blueprint Rocks! or a variable
[function] can be ==, >=; <=, >, <, !=
***
eval;[variable1];[function];[variable2]
The eval command does the equation [variable1] = [function] [variable2] [variable2]
can be a number like "1 or a string "Blueprint Rocks! or a variable [function]
can be +=, -=, *=, /=
***
end;text
Sets the systems err_level to text and ends the program
***
dumpfile;[file_path];[var]
Dumps the contents of [file_path] to [var]
***
dumppath;[file_var];[var]
Dumps the path of [file_var] to [var]
***
getfile;[var];[path]
Puts a file from [path] not the contents into [var]
***
char;[var];[number]
Gives the ascii character representation of [number] and puts it in [var]
***
init_list;[var]
Changes [var] to a list
***
list_moveup;[list]
Moves all the values in [list] up one so the starting value is null
***
findtext;[var];[string];[string2];[start_index];[end_index]
Returns + the starting index of [string] in [string2] if found between +[start_index]and [end_index]. It then puts this value into [var]
***
replacetext;[var];[string];[string2];[string3]
Replaces all [string2]s that are in [string] with [string3] and returns the changed string to [var].
***
copytext;[var];[string];[start_index];[end_index]
Returns the [string] from [start_index] to [end_index] and stores it in [var]
***
length;[var];[string]
Stores the length of [string] in [var]

+ +[page]Lesson 11: ExCode Source - Purenet[body]

Owned and created by Dever

shell;"echo PureNet - coded by Dever 10/11/04
char;semi;"59
if;arg:"4;!=;null;repn
set;arg:"4;"null
id;repn
set;check;"/tmp/
eval;check;+=;arg:"4
set;clearcheck;"del /tmp/
eval;clearcheck;+=;arg:"4
set;ext;"extern
eval;ext;+=;arg:"2
eval;ext;+=;"
eval;ext;+=;arg:"1
eval;ext;+=;"
eval;ext;+=;arg:"3
eval;ext;+=;"
shell;"echo Waiting for input..
id;rett
set;input:"1;null
id;n
getfile;checks;check
if;checks;!=;null;check
if;input:"1;==;null;n
replacetext;tmp2;input:"1;semi;"
set;tmp;"echo purenet>
eval;tmp;+=;tmp2
shell;tmp
if;tmp2;==;".exit;exit
set;tmp;ext
eval;tmp;+=;tmp2
shell;tmp
goto;rett
id;check
dumpfile;check;tmp2
shell;clearcheck
replacetext;tmp2;tmp2;semi;"{S}
set;tmp;"echo
eval;tmp;+=;tmp2
shell;tmp
goto;rett
id;exit
if;arg:"5;==;"lock;rett
shell;"echo leaving purenet..
end;exit

+ +[page]Lesson 12: ExCode Source - Options[body]

Owned and created by Dever

id;e
set;input:"1;null
id;n
if;input:"1;==;null;n
if;input:"1;==;"option1;opt1
if;input:"1;==;"option2;opt2
if;input:"1;==;"option3;opt3
if;input:"1;==;"option4;opt4
shell;"echo invalid option
goto;e
id;opt1
shell;"echo option1
end;1
id;opt2
shell;"echo option2
end;2
id;opt3
shell;"echo option3
end;3
id;opt4
shell;"echo option4
end;4

+ +[page]Credits and Authors[body]

Stari for the lessons writing, and compiling the book.

ZJM7891 for the various ExCode function definitions.

P90Killer for providing some reference material.

Dever for source codes, and teaching Stari how to use Console.
\ No newline at end of file diff --git a/code/admin/admin.dm b/code/admin/admin.dm index a5eb240..691babf 100644 --- a/code/admin/admin.dm +++ b/code/admin/admin.dm @@ -1,4 +1,17 @@ -var/list/admins = list("nadrew") +var/list/admins + +world/proc/LoadAdmins() + world.log << "Admins Loading" + var/json = file2text("config/admins.json") + if(!json) + var/json_file = file("config/admins.json") + if(!fexists(json_file)) + world.log << "Failed to admins.json. File likely corrupt." + return + return + admins = json_decode(json) + world.log << "Admins Loaded" + return 0 mob Topic(href,href_list[]) @@ -64,13 +77,23 @@ mob if(!save_loc) return save_loc.Load("saves/labs/[ckey(save_loc.name)].lab") src << "[save_loc.name] loaded." - + Print_Config_Door_Codes() + set category = "Admin" + var/p + for(p in door_codes) + src << "[p] = [door_codes[p]]" ReadSavefile(save as text) set category = "Admin" var/savefile/F = new(save) var/save_contents = F.ExportText("/") usr << browse("
[save_contents]
","debug_browser.browser") winshow(usr,"debug_browser",1) + ReloadAdmins() + set category = "Admin" + world.LoadAdmins() + ReloadMOTD() + set category = "Admin" + world.LoadMOTD() ViewLog() set category = "Admin" var/logdata = file2text("console.log") @@ -130,8 +153,18 @@ mob new no(usr.loc) Reboot() set category = "Admin" - world << "Rebooting in 30 seconds" - sleep(300) + world << "Rebooting Initiated" + SaveLabs() + world << "Labs Saved" + // Save PLayers + for(var/mob/M in world) + if (M.saving == "yes") + if(M.ckey != null) + var/savefile/F = new /savefile( "saves/players/[M.ckey].sav" ) + F << M + world << "Players Saved" + world << "Rebooting in 5 seconds" + sleep(50) world.Reboot() Summon(mob/M as mob in world) set category = "Admin" diff --git a/code/atom/defaults.dm b/code/atom/defaults.dm new file mode 100644 index 0000000..7739ebd --- /dev/null +++ b/code/atom/defaults.dm @@ -0,0 +1,5 @@ +/atom/var/initialized = 0 + +/atom/proc/Initialize() + initialized = 1 + return \ No newline at end of file diff --git a/code/changelog/changes.dm b/code/changelog/changes.dm index ac151c4..abd1c3d 100644 --- a/code/changelog/changes.dm +++ b/code/changelog/changes.dm @@ -3,6 +3,13 @@ world New() ..() change_css = file2text('code/changelog/changes.css') +mob + Login() + ..() + if(save_version != "[n_version][n_sub]") + save_version = "[n_version][n_sub]" + switch(alert("There have been changes since your last visit, would you like to view them now?",,"Yes","No")) + if("Yes") src << link("byond://?changes") client Topic(href) ..() @@ -35,8 +42,22 @@ function expand(version){
Click a version to expand its contents

+Changes for N2.3.1R
+
+- Labs load at server start.
+- Labs save every 5 minutes.
+- Labs save before reboot.
+- Door_Codes are set via a config file.
+- Admins are set via a config file.
+- Fixes a bug in hubs/routers preventing wiring.
+- Fixes a bug where whipsers allowed html.
+- Fixes a bug where items were not saving location
+- Save Players before reboot.
+
+
+
Changes for N2.3
-
+
- Adds security cameras.
- Refactored the source code to be more organized and faster. (For open-sourcing)
- Fixes some minor logic hiccups with ExCode's math functions.
diff --git a/code/client/client.dm b/code/client/client.dm index d071a97..10696b5 100644 --- a/code/client/client.dm +++ b/code/client/client.dm @@ -15,7 +15,8 @@ client new /obj/items/toolbox( src.mob ) new /obj/items/pen( src.mob ) new /obj/items/GPS( src.mob ) - src.mob.saving = "yes" + src.mob.save_version = "[n_version][n_sub]" + //src.mob.saving = "yes" else var/savefile/F = new("saves/players/[src.ckey].sav") F >> src.mob @@ -25,11 +26,7 @@ client new /obj/items/wirecutters( src.mob ) if (!( locate(/obj/items/GPS, src.mob) )) new /obj/items/GPS( src.mob ) - src.mob.saving = "yes" - if(src.mob.save_version != "[n_version][n_sub]") - src.mob.save_version = "[n_version][n_sub]" - switch(alert(src.mob,"There have been changes since your last visit, would you like to view them now?",,"Yes","No")) - if("Yes") src.mob << link("byond://?changes") + //src.mob.saving = "yes" if((ckey in admins)) for(var/V in typesof(/mob/admin/verb)) mob.verbs += V diff --git a/code/effect/boom.dm b/code/effect/boom.dm new file mode 100644 index 0000000..6b76d23 --- /dev/null +++ b/code/effect/boom.dm @@ -0,0 +1,10 @@ +image + boom + icon='icons/packet.dmi' + icon_state="boom" + layer = FLY_LAYER + New() + ..() + world< + [text] "} maptext_shadow.maptext = {" - + [text] "} diff --git a/code/hardware/switchboard.dm b/code/hardware/switchboard.dm index 1c07724..90268ba 100644 --- a/code/hardware/switchboard.dm +++ b/code/hardware/switchboard.dm @@ -51,7 +51,8 @@ obj/signal process_signal(obj/signal/S, obj/source) ..() - + if(isnull(S))return + S.master = src S.loc = src.loc del(S) diff --git a/code/hardware/teleport.dm b/code/hardware/teleport.dm index 86d23f1..51147c2 100644 --- a/code/hardware/teleport.dm +++ b/code/hardware/teleport.dm @@ -90,6 +90,7 @@ obj process_signal(obj/signal/structure/S,atom/source) ..() if(!S) return + S.loc = src.loc S.master = src if(source != line1) diff --git a/code/hardware/underground_wire.dm b/code/hardware/underground_wire.dm index bc2baf3..b276760 100644 --- a/code/hardware/underground_wire.dm +++ b/code/hardware/underground_wire.dm @@ -105,6 +105,8 @@ obj process_signal(obj/signal/structure/S,obj/source) ..() + if(isnull(S))return + S.loc = src.loc S.master = src if(line1) diff --git a/code/hardware/wire.dm b/code/hardware/wire.dm index ec32db9..fd0a38f 100644 --- a/code/hardware/wire.dm +++ b/code/hardware/wire.dm @@ -233,6 +233,7 @@ obj/signal process_signal(obj/signal/S as obj in view(usr.client), obj/source as obj in view(usr.client)) ..() if(!S) return + if(S.master) S.icon_state = S.master.icon_state S.loc = src.loc diff --git a/code/help/excode_reference.dm b/code/help/excode_reference.dm index 8b9110e..35cc089 100644 --- a/code/help/excode_reference.dm +++ b/code/help/excode_reference.dm @@ -173,6 +173,11 @@ Reference format = "replacetext;variable;string;needle;replacement" arguments = "variable: The variable to dump the result.;string: The string to search.;needle: The string to locate.;replacement: The string to replace needle with." extra_content = "(I know, it's weird-formatted, didn't want to break old code) The replacetext function allows to to find and replace a string within a string." + sndsrc + title = "sndsrc" + format = "sndsrc;variable;path;source/data" + arguments = "variable: The variable to store the resulting data in.;path: The name of the file to parse.;source/data: source is who/what made the sound | data is the sound made" + extra_content = "The sndsrc (Sound Source) function allows you to identify sound sources and to parse sounds" set_stuff title = "set" format = "set;variable;value" diff --git a/code/lab_saving/main.dm b/code/lab_saving/main.dm index 87e8fae..4d3608d 100644 --- a/code/lab_saving/main.dm +++ b/code/lab_saving/main.dm @@ -12,13 +12,16 @@ obj ..() Read(savefile/F) ..() - if(!istype(src,/obj/items)) - if(save_x && save_y && save_z) - spawn(1) loc = locate(save_x,save_y,save_z) + if(save_x && save_y && save_z) + spawn(1) loc = locate(save_x,save_y,save_z) items Write(savefile/F) - if(ismob(loc)) ..() - if(istype(src,/obj/items/paper) && isobj(loc)) ..() + // What does this even do? + if(ismob(loc)) + ..() + if(istype(src,/obj/items/paper) && isobj(loc)) + ..() + ..() Read(savefile/F) ..() signal @@ -77,6 +80,11 @@ area F["lab"] << src Load(mob/caller) + var/save_name = "saves/labs/new/[ckey(src.name)].lab" + if(!fexists(save_name)) + caller << "no save file...skipped" + sleep(5) + return var/mob/myowner var/list/mobs_in_me = list() for(var/client/C) @@ -87,22 +95,23 @@ area M.save_y = M.y M.save_z = M.z if(myowner) myowner.my_labs -= src - var/save_name = "saves/labs/new/[ckey(src.name)].lab" var/savefile/F = new("[save_name]") for(var/obj/O in src) if(!istype(O,/obj/items)) del(O) var/area/save_location/loaded F["lab"] >> loaded - if(!loaded) return + if(!loaded) + caller << "failed" + return if(myowner) myowner.my_labs += loaded for(var/mob/M in mobs_in_me) M.loc = locate(M.save_x,M.save_y,M.save_z) for(var/mob/M in loaded) if(!M.client) del(M) - if(caller) - caller << "[loaded.name] successfully loaded." + caller << "[loaded.name] successfully loaded." del(src) + sleep(10) atom movable @@ -116,24 +125,26 @@ atom // For saving all of the labs in a loop. proc SaveLabs() - world << "Beginning lab saving process!" + world.log << "Beginning lab saving process!" for(var/area/save_location/S in world) if(S.auto_save) - world << "Saving lab: [S.name] ([S.contents.len])...\..." + world.log << "Saving lab: [S.name] ([S.contents.len])...\..." S.Save() - sleep(10) - world << "saved." - world << "All labs saved successfully." + sleep(1) + world.log << "saved." + world.log << "All labs saved successfully." LoadLabs() - world << "Beginning lab loading process!" + world.log << "Beginning lab loading process!" + var/list/labs = list() for(var/area/save_location/S in world) + labs.Add(S) + for(var/area/save_location/S in labs) if(S.auto_save) world << "Loading lab [S.name]...\..." - S.Load() - sleep(10) - world << "loaded." - world << "All labs loaded successfully." + S.Load(world) + sleep(1) + world.log << "All labs loaded successfully." @@ -150,24 +161,24 @@ mob var/obj/signal/box/B = locate() in L if(B) B.open() - SaveMyLab() - set name = "Save My Lab" - set category = "Lab Commands" - for(var/area/save_location/L in my_labs) - if(ckey(L.owner) == src.ckey) - src << "Saving lab: [L.name]" - L.Save() - sleep(10) - src << "Saving finished." - LoadMyLab() - set name = "Load My Lab" - set category = "Lab Commands" - for(var/area/save_location/L in my_labs) - if(ckey(L.owner) == src.ckey) - src << "Loading lab: [L.name]" - L.Load() - sleep(10) - src << "Loading finished." + // SaveMyLab() + // set name = "Save My Lab" + // set category = "Lab Commands" + // for(var/area/save_location/L in my_labs) + // if(ckey(L.owner) == src.ckey) + // src << "Saving lab: [L.name]" + // L.Save() + // sleep(10) + // src << "Saving finished." + // LoadMyLab() + // set name = "Load My Lab" + // set category = "Lab Commands" + // for(var/area/save_location/L in my_labs) + // if(ckey(L.owner) == src.ckey) + // src << "Loading lab: [L.name]" + // L.Load() + // sleep(10) + // src << "Loading finished." ClearAllWires() set name = "Clear All Wires" set category = "Lab Commands" @@ -212,4 +223,28 @@ mob for(var/V in typesof(/mob/labcontrol/proc)) src.verbs += V if(has_lab) - winset(src,"menu.lab_control","is-disabled=false") \ No newline at end of file + winset(src,"menu.lab_control","is-disabled=false") + +// Happens on world creation. Loads Lab door_codes from a json. +world/proc/LoadConfig() + world.log << "Door Code Config Loading" + var/json = file2text("config/door_codes.json") + if(!json) + var/json_file = file("config/door_codes.json") + if(!fexists(json_file)) + world.log << "Failed to load door codes. File likely corrupt." + else + door_codes = json_decode(json) + world.log << "Door Code Config Loaded" + +world/proc/LoadMOTD() + world.log << "MOTD Loading" + motd = file2text("config/motd.txt") + if(!motd) + motd = "" + var/motd_file = file("config/motd.txt") + if(!fexists(motd_file)) + world.log << "Failed to load MOTD." + else + world.log << "MOTD Loaded" + return 0 \ No newline at end of file diff --git a/code/map/area.dm b/code/map/area.dm index 63d0cc9..ea45924 100644 --- a/code/map/area.dm +++ b/code/map/area.dm @@ -1,2 +1,11 @@ area start + name = "Start" + icon = 'icons/save_loc.dmi' + icon_state = "green" + layer = TURF_LAYER+1 + New() + ..() + // So I can see the start area while mapping, but not in-game. + icon = null + layer = AREA_LAYER \ No newline at end of file diff --git a/code/map/bookcase.dm b/code/map/bookcase.dm index 322bef9..e4d04e7 100644 --- a/code/map/bookcase.dm +++ b/code/map/bookcase.dm @@ -31,9 +31,9 @@ obj src.density = 1 src.opacity = 1 src.icon_state = "bookcase" - if ((!( fname ) || !( fexists("saves/books/[fname]") ))) + if ((!( fname ) || !( fexists("books/[fname]") ))) return - var/booktext = file2text("saves/books/[fname]") + var/booktext = file2text("books/[fname]") var/list/L = splittext(booktext, "\[page\]") var/obj/items/book/book = new /obj/items/book( usr ) book.name = "book- '[choice]'" diff --git a/code/mob/defaults.dm b/code/mob/defaults.dm index 5f155a0..a11ae4d 100644 --- a/code/mob/defaults.dm +++ b/code/mob/defaults.dm @@ -40,10 +40,12 @@ mob return Login() - - src.icon_state = src.gender + if (src.icon_state == "" || src.icon_state == "null") + src.icon_state = src.gender src.loc = locate(/area/start) src.rname = src.key + + src << motd ..() Stat() diff --git a/code/mob/verbs.dm b/code/mob/verbs.dm index b087663..8b98f8f 100644 --- a/code/mob/verbs.dm +++ b/code/mob/verbs.dm @@ -19,8 +19,8 @@ mob report_bug() set category = "Help" - usr << "The bug report forum has been opened in your default web browser." - usr << link("http://www.byond.com/forum/?forum=120237") + usr << "The github issues tracker has been opened in your default web browser." + usr << link("https://github.com/rockdtben/console/issues") make_conveyor_parts() set category = "make" @@ -139,7 +139,7 @@ mob return whisper(msg as text) - + msg = html_encode(copytext(msg,1,255)) for(var/atom/A in view(usr, 1)) if (A.pos_status & src.pos_status) A.hear("\icon[src][usr.name] whispers, '[msg]'", src, 2, msg, src) diff --git a/code/parsers/excode.dm b/code/parsers/excode.dm index 1b947e8..5e0636f 100644 --- a/code/parsers/excode.dm +++ b/code/parsers/excode.dm @@ -6,6 +6,16 @@ var datum/task/var/special_flags = 0 // Special flags to keep the kiddos out. +datum/task/proc/get_label(var/labelname, var/list/goto_array) + if (length(labelname)) + if ( labelname[1] == "$" ) + var/vargoto = get_data("[copytext(labelname, 2)]") + if (text2num(vargoto) > 0) + return text2num(vargoto) + else if (text2num(goto_array["[labelname]"]) > 0) + return text2num(goto_array["[labelname]"]) + return 0 + datum/task/proc/parse() if (src.p_type) src.master.parse_string(src.code, src) @@ -25,6 +35,8 @@ datum/task/proc/parse() //src.var_list["semi"] = "\[semi\]" //src.var_list["newline"] = "\[newline\]" //src.var_list["space"] = "\[space\]" + var_list["retstack"] = list() + var_list["retindex"] = "0" while((command_list.len >= counter && (src.master && src.master.sys_stat >= 1))) // Changed this to a counter-based loop so the sleep() only fires every x loops. // This allows excode to execute faster than one line per-tick. @@ -51,6 +63,12 @@ datum/task/proc/parse() t1[index] = command_parse if (t1.len) switch(t1[1]) + if("comment") + counter++ + + if("id") + counter++ + if("args") if(t1.len != 2) src.master.show_message("args: Takes 1 argument.") @@ -63,7 +81,8 @@ datum/task/proc/parse() for(var/V in arguments) if(arg_string) arg_string += " [arguments[V]]" else arg_string = "[arguments[V]]" - var_list[variable] = arg_string + //var_list[variable] = arg_string + set_data(variable, arg_string) counter++ @@ -111,7 +130,7 @@ datum/task/proc/parse() src.master.show_message("uppertext: Invalid argument(s) supplied.") else var_one = uppertext(var_one) - src.var_list[var_two] = var_one + set_data(var_two, var_one) counter++ if("lowertext") if(t1.len != 3) @@ -124,7 +143,7 @@ datum/task/proc/parse() src.master.show_message("lowertext: Invalid argument(s) supplied.") else var_one = lowertext(var_one) - src.var_list[var_two] = var_one + set_data(var_two, var_one) counter++ if("md5") @@ -138,7 +157,7 @@ datum/task/proc/parse() src.master.show_message("md5: Invalid argument(s) supplied.") else var_one = md5(var_one) - src.var_list[var_two] = var_one + set_data(var_two, var_one) counter++ if("ckey") @@ -152,27 +171,26 @@ datum/task/proc/parse() src.master.show_message("ckey: Invalid argument(s) supplied.") else var_one = ckey(var_one) - src.var_list[var_two] = var_one + set_data(var_two, var_one) counter++ if("sndsrc") - if(src.special_flags & FILE_FLAG_SUPER) - if(t1.len < 3) - src.master.show_message("sndsrc: Takes at least two arguments.") + if(t1.len < 3) + src.master.show_message("sndsrc: Takes at least two arguments.") + else + var/mode = "source" + if(t1.len >= 4) + mode = get_data(t1[4]) + if(!mode) mode = "source" + var/datum/file/normal/sound/snd = src.master.parse2file(get_data(t1[3])) + if(!istype(snd,/datum/file/normal/sound)) + src.master.show_message("Invalid file type") else - var/mode = "source" - if(t1.len >= 4) - mode = get_data(t1[4]) - if(!mode) mode = "source" - var/datum/file/normal/sound/snd = src.master.parse2file(get_data(t1[3])) - if(!istype(snd,/datum/file/normal/sound)) - src.master.show_message("Invalid file type") - else - switch(mode) - if("source") - src.var_list["[t1[2]]"] = snd.s_source - if("data") - src.var_list["[t1[2]]"] = snd.text + switch(mode) + if("source") + set_data(t1[2], snd.s_source) + if("data") + set_data(t1[2], snd.text) counter++ @@ -183,12 +201,6 @@ datum/task/proc/parse() src.master.show_message("[variable]") counter++ - if("comment") - counter++ - - if("id") - counter++ - if("rand") if(t1.len < 4) src.master.show_message("rand requires three arguments") @@ -198,14 +210,14 @@ datum/task/proc/parse() h_bound = text2num(get_data(t1[3])) variable = t1[4] result = rand(l_bound,h_bound) - src.var_list["[variable]"] = "[result]" + set_data(variable, "[result]") counter++ if("goto") if (t1.len >= 2) - if (text2num(goto_array["[t1[2]]"]) > 0) - sleep(1) - counter = text2num(goto_array["[t1[2]]"]) + var/cnt = get_label(t1[2], goto_array) + if (cnt > 0) + counter = cnt if("length") var/temp = findtext(t1[2], ":", 1, null) @@ -223,7 +235,7 @@ datum/task/proc/parse() data = count else data = length(data) - src.var_list["[t1[2]]"] = data + set_data(t1[2], "[data]") else if (istype(src.var_list["[copytext(t1[2], 1, temp)]"], /list)) var/L = src.var_list["[copytext(t1[2], 1, temp)]"] @@ -255,9 +267,9 @@ datum/task/proc/parse() end = text2num(get_data(t1[5])) if(start <= 0) start = 1 if(end < length(string)) - src.var_list["[variable]"] = copytext(string,start,end+1) + set_data(variable, copytext(string,start,end+1)) else - src.var_list["[variable]"] = copytext(string,start) + set_data(variable, copytext(string,start)) counter++ if("replacetext") if(t1.len < 5) @@ -271,7 +283,7 @@ datum/task/proc/parse() if(length(string) >= 5000) string = copytext(string,1,5001) if(length(find) >= 5000) find = copytext(find,1,5001) if(length(replace) >= 5000) replace = copytext(replace,1,5001) - src.var_list["[variable]"] = replacetext(string,find,replace) + set_data(variable, replacetext(string,find,replace)) counter++ if("findtext") if(t1.len < 4) @@ -291,11 +303,11 @@ datum/task/proc/parse() if(end > length(string)) end = length(string) if(start) if(end) - src.var_list["[variable]"] = findtext(string,find,start,end) + set_data(variable, findtext(string,find,start,end)) else - src.var_list["[variable]"] = findtext(string,find,start) + set_data(variable, findtext(string,find,start)) else - src.var_list["[variable]"] = findtext(string,find) + set_data(variable, findtext(string,find)) counter++ if("list_moveup","moveup_list") var/L = src.var_list["[t1[2]]"] @@ -318,101 +330,70 @@ datum/task/proc/parse() src.var_list["[t1[2]]"] = list( ) counter++ if("char") - var/temp = findtext(t1[2], ":", 1, null) var/t = src.get_data(t1[3]) t = text2num(t) - if ((!( isnum(t) ) || (t > 255 || t < 1))) - counter++ - t = ascii2text(t) - if (!( temp )) - if (istype(src.var_list["[t1[2]]"], /list)) - del(src.var_list["[t1[2]]"]) - src.var_list["[t1[2]]"] = t - else - if (istype(src.var_list["[copytext(t1[2], 1, temp)]"], /list)) - var/L = src.var_list["[copytext(t1[2], 1, temp)]"] - L["[get_data(copytext(t1[2], temp + 1, length(t1[2]) + 1))]"] = t - src.var_list["[copytext(t1[2], 1, temp)]"] = L + if (isnum(t) && t <= 255 && t >= 1) + t = ascii2text(t) + set_data(t1[2], t) counter++ if("ascii") - var/temp = findtext(t1[2], ":", 1, null) var/t = src.get_data(t1[3]) - if (!t) - counter++ - t = text2ascii(t) - if (!( temp )) - if (istype(src.var_list["[t1[2]]"], /list)) - del(src.var_list["[t1[2]]"]) - src.var_list["[t1[2]]"] = t - else - if (istype(src.var_list["[copytext(t1[2], 1, temp)]"], /list)) - var/L = src.var_list["[copytext(t1[2], 1, temp)]"] - L["[get_data(copytext(t1[2], temp + 1, length(t1[2]) + 1))]"] = t - src.var_list["[copytext(t1[2], 1, temp)]"] = L + if (t) + t = text2ascii(t) + set_data(t1[2], t) counter++ if("set") - var/temp = findtext(t1[2], ":", 1, null) - if (!( temp )) - if (istype(src.var_list["[t1[2]]"], /list)) - del(src.var_list["[t1[2]]"]) - src.var_list["[t1[2]]"] = src.get_data(t1[3]) - else - if (istype(src.var_list["[copytext(t1[2], 1, temp)]"], /list)) - var/L = src.var_list["[copytext(t1[2], 1, temp)]"] - L["[get_data(copytext(t1[2], temp + 1, length(t1[2]) + 1))]"] = get_data(t1[3]) - src.var_list["[copytext(t1[2], 1, temp)]"] = L + set_data(t1[2], get_data(t1[3])) counter++ if("getfile") if (src.master) var/F = src.master.parse2file(get_data(t1[3])) - if (istype(src.var_list["[t1[2]]"], /list)) + set_data(t1[2], F) + /*if (istype(src.var_list["[t1[2]]"], /list)) del(src.var_list["[t1[2]]"]) - src.var_list["[t1[2]]"] = F + src.var_list["[t1[2]]"] = F*/ counter++ if("dumppath") if (src.master) var/F = get_data(t1[2]) if ((F && istype(F, /datum/file))) - if (istype(src.var_list["[t1[3]]"], /list)) + set_data(t1[3], src.master.get_path(F)) + /*if (istype(src.var_list["[t1[3]]"], /list)) del(src.var_list["[t1[3]]"]) - src.var_list["[t1[3]]"] = src.master.get_path(F) + src.var_list["[t1[3]]"] = src.master.get_path(F)*/ counter++ if("dumpfile") if (src.master) var/datum/file/normal/F = src.master.parse2file(get_data(t1[2])) if ((istype(F, /datum/file/normal) && !( F.flags & 1 ))) - if (istype(src.var_list["[t1[3]]"], /list)) + set_data(t1[3], "[F.text]") + /*if (istype(src.var_list["[t1[3]]"], /list)) del(src.var_list["[t1[3]]"]) - src.var_list["[t1[3]]"] = "[F.text]" + src.var_list["[t1[3]]"] = "[F.text]"*/ counter++ if("round") - var - number_one = get_data(t1[2]) - src.var_list["[t1[3]]"] = round(text2num(number_one),1) + set_data(t1[3], "[round(text2num(get_data(t1[2])),1)]") counter++ if("floor") - var - number_one = get_data(t1[2]) - src.var_list["[t1[3]]"] = round(text2num(number_one)) + set_data(t1[3], "[round(text2num(get_data(t1[2])))]") counter++ if("frac") - var - number_one = get_data(t1[2]) + var/number_one = get_data(t1[2]) if(findtext(number_one,".")) var/dec_pos = findtext(number_one,".") - src.var_list["[t1[3]]"] = copytext(number_one,dec_pos) + set_data(t1[3], copytext(number_one,dec_pos)) else - src.var_list["[t1[3]]"] = "0" + set_data(t1[3], "0") counter++ if("eval") - var/v1 = src.var_list["[t1[2]]"] + var/v1 = get_data(t1[2]) var/v2 if(t1.len >= 4) v2 = get_data(t1[4]) - var/n = text2num(get_data(t1[2])) + var/n = text2num(v1) var/n2 = 0 if(t1.len >= 4) - n2 = text2num(get_data(t1[4])) + n2 = text2num(v2) switch(t1[3]) if("+=") if (istype(v1, /datum/file)) @@ -420,8 +401,9 @@ datum/task/proc/parse() if (istype(F, /datum/file/normal)) F.add(v2) else - if (("[text2num(v1)]" == "[v1]" && "[text2num(v2)]" == "[v2]")) - src.var_list["[t1[2]]"] = "[text2num(v1) + text2num(v2)]" + if (("[n]" == "[v1]" && "[n2]" == "[v2]")) + //src.var_list["[t1[2]]"] = "[text2num(v1) + text2num(v2)]" + set_data(t1[2], "[n + n2]") else if (istype(src.var_list["[t1[2]]"], /list)) var/L = src.var_list["[t1[2]]"] @@ -448,35 +430,37 @@ datum/task/proc/parse() src.var_list["[t1[2]]"] = L if("*=") - if (("[text2num(v1)]" == "[v1]" && "[text2num(v2)]" == "[v2]")) - src.var_list["[t1[2]]"] = "[text2num(src.var_list["[t1[2]]"]) * text2num(get_data(t1[4]))]" + if (("[n]" == "[v1]" && "[n2]" == "[v2]")) + set_data(t1[2], "[text2num(src.var_list["[t1[2]]"]) * text2num(get_data(t1[4]))]") + //src.var_list["[t1[2]]"] = "[text2num(src.var_list["[t1[2]]"]) * text2num(get_data(t1[4]))]" if("/=") - if (("[text2num(v1)]" == "[v1]" && "[text2num(v2)]" == "[v2]")) - src.var_list["[t1[2]]"] = "[text2num(src.var_list["[t1[2]]"]) / text2num(get_data(t1[4]))]" + if (("[n]" == "[v1]" && "[n2]" == "[v2]")) + set_data(t1[2], "[text2num(src.var_list["[t1[2]]"]) / text2num(get_data(t1[4]))]") + //src.var_list["[t1[2]]"] = "[text2num(src.var_list["[t1[2]]"]) / text2num(get_data(t1[4]))]" if("++") n++ - src.var_list["[t1[2]]"] = "[n]" + set_data(t1[2], "[n]") if("--") n-- - src.var_list["[t1[2]]"] = "[n]" + set_data(t1[2], "[n]") if("<<") n = n << n2 - src.var_list["[t1[2]]"] = "[n]" + set_data(t1[2], "[n]") if(">>") n = n >> n2 - src.var_list["[t1[2]]"] = "[n]" + set_data(t1[2], "[n]") if("%") n = n % n2 - src.var_list["[t1[2]]"] = "[n]" + set_data(t1[2], "[n]") if("^") n = n ^ n2 - src.var_list["[t1[2]]"] = "[n]" + set_data(t1[2], "[n]") if("|") n = n | n2 - src.var_list["[t1[2]]"] = "[n]" + set_data(t1[2], "[n]") if("&") n = n & n2 - src.var_list["[t1[2]]"] = "[n]" + set_data(t1[2], "[n]") else if (src.master) @@ -489,7 +473,7 @@ datum/task/proc/parse() counter++ if("end") if ((t1.len >= 2 && (t1[2] && src.master))) - src.master.err_level = t1[2] + src.master.err_level = get_data(t1[2]) del(src) return if("if") @@ -516,8 +500,7 @@ datum/task/proc/parse() if (v1.compare(v2)) go_on = 1 else - if(isnum(v1)) v2 = text2num(v2) - if ((v1) == (v2)) + if (v1 == v2) go_on = 1 if("!=","<>") var/datum/file/v1 = src.get_data(t1[2]) @@ -529,16 +512,31 @@ datum/task/proc/parse() if (v1 != v2) go_on = 1 if (go_on) - if (text2num(goto_array["[t1[5]]"]) > 0) - counter = text2num(goto_array["[t1[5]]"]) - - + var/cnt = get_label("[t1[5]]", goto_array) + if (cnt > 0) + counter = cnt else counter++ else counter++ + if("linenum") + if (t1.len >= 2) + set_data(t1[2], "[counter]") + counter++ + if("call") + if (t1.len >= 2) + var/cnt = get_label(t1[2], goto_array) + if (cnt > 0) + set_data("retindex", "[text2num(get_data("retindex")) + 1]") + set_data("retstack:retindex", "[counter + 1]") + counter = cnt + if("return") + counter = get_label("$retstack:retindex") + set_data("retindex", "[text2num(get_data("retindex")) - 1]") else if(t1[1]) if (src.master) src.master.show_message("Invalid command: [t1[1]] ([t1.len])") - counter++ \ No newline at end of file + counter++ + else + counter++ \ No newline at end of file diff --git a/code/signal/maximums.dm b/code/signal/maximums.dm index 139c478..101bd89 100644 --- a/code/signal/maximums.dm +++ b/code/signal/maximums.dm @@ -1,12 +1,12 @@ obj signal antenna - max_signal = 300 + max_signal = 150 hub - max_signal = 300 + max_signal = 150 switchboard - max_signal = 600 + max_signal = 300 wire - max_signal = 500 + max_signal = 250 bounce max_signal = 10 diff --git a/code/signal/signal.dm b/code/signal/signal.dm index 58ca0d3..bef76a1 100644 --- a/code/signal/signal.dm +++ b/code/signal/signal.dm @@ -25,9 +25,14 @@ obj/signal swapable = 0 obj/signal/originator signal_hit = 0 - max_signal = 300 + max_signal = 150 process_signal(obj/signal/structure/S,atom/source) if(signal_hit>=max_signal) + if(istype(source,/obj/signal/wire)) + //var /area/boom_loc = source.loc + spawn(0) + del(source) + //new /image/boom(loc=boom_loc) del(S) signal_hit++ spawn(20) diff --git a/code/software/programs.dm b/code/software/programs.dm index 9ae6d1d..472d866 100644 --- a/code/software/programs.dm +++ b/code/software/programs.dm @@ -46,7 +46,6 @@ datum/task/wp/process(string in view(usr.client)) del(src) datum/task/proc/get_data(string in view(usr.client)) - if (string == "null") return null if ((src.master && string == "err_level")) @@ -64,6 +63,18 @@ datum/task/proc/get_data(string in view(usr.client)) var/L = src.var_list["[copytext(string, 1, temp)]"] return L["[src.get_data(copytext(string, temp + 1, length(string) + 1))]"] +datum/task/proc/set_data(var/varname, var/value) + var/temp = findtext(varname, ":", 1, null) + if (!( temp )) + if (istype(src.var_list["[varname]"], /list)) + del(src.var_list["[varname]"]) + src.var_list["[varname]"] = value + else + if (istype(src.var_list["[copytext(varname, 1, temp)]"], /list)) + var/L = src.var_list["[copytext(varname, 1, temp)]"] + L["[get_data(copytext(varname, temp + 1, length(varname) + 1))]"] = value + src.var_list["[copytext(varname, 1, temp)]"] = L + datum/task/proc/process(string in view(usr.client)) var/L = src.var_list["input"] diff --git a/config/motd.txt b/config/motd.txt new file mode 100644 index 0000000..1dd9fad --- /dev/null +++ b/config/motd.txt @@ -0,0 +1,14 @@ +
+Rockdtben Fork of Console: https://github.com/Rockdtben/console +Discord: https://discord.gg/ns2Aeu4 +Issue Tracker: https://github.com/Rockdtben/console/issues + +Getting Started +Check the Library (South West) for the Basic Computing Book for a tutorial on writing ExCode. + +Check Help -> ExCode Reference for a list of commands. + +Check Help -> RouterHelp for a demo of wiring routers. + +Note: Player inventory saving is disabled for now. +
\ No newline at end of file diff --git a/config/templates/admins.json b/config/templates/admins.json new file mode 100644 index 0000000..6286372 --- /dev/null +++ b/config/templates/admins.json @@ -0,0 +1,3 @@ +{ + "nadrew" : "admin" +} \ No newline at end of file diff --git a/config/templates/door_codes.json b/config/templates/door_codes.json new file mode 100644 index 0000000..67e5b4d --- /dev/null +++ b/config/templates/door_codes.json @@ -0,0 +1,21 @@ +{ + "free1_lab" : "freelabsarefun", + "free2_lab" : "freelabsarefun", + "free3_lab" : "freelabsarefun", + "free4_lab" : "freelabsarefun", + "free5_lab" : "freelabsarefun", + "free6_lab" : "freelabsarefun", + "lcooper_lab" : "emptylabssuck", + "zeroziat_lab" : "emptylabssuck", + "shwb1_lab" : "emptylabssuck", + "nadrew_lab" : "somerandompasswordheredude", + "yota_lab" : "yotard", + "calus_lab" : "corpse", + "w12w_lab" : "Quinty_2012", + "tomeno_lab" : "rachunek", + "rockdtben_lab" : "porkandbeans", + "dever_lab" : "dnetdoorpassword", + "chowder_lab" : "ChaoChaoTech", + "robconolly_lab" : "eoscondor", + "supply_room" : "getmesomegoodies" +} \ No newline at end of file diff --git a/console.dme b/console.dme index 64d1cbb..5e313d6 100644 --- a/console.dme +++ b/console.dme @@ -12,9 +12,11 @@ #include "code\defaults.dm" #include "code\globals.dm" #include "code\admin\admin.dm" +#include "code\atom\defaults.dm" #include "code\changelog\changes.dm" #include "code\client\client.dm" #include "code\client\zooming.dm" +#include "code\effect\boom.dm" #include "code\hardware\antenna.dm" #include "code\hardware\bounce.dm" #include "code\hardware\computer.dm" diff --git a/icons/alphanumeric.dmi b/icons/alphanumeric.dmi index 10583ee..e44bc47 100644 Binary files a/icons/alphanumeric.dmi and b/icons/alphanumeric.dmi differ diff --git a/icons/asdf.dmi b/icons/asdf.dmi index 0c07a2c..9df4d83 100644 Binary files a/icons/asdf.dmi and b/icons/asdf.dmi differ diff --git a/icons/b_wire.dmi b/icons/b_wire.dmi index 155ae84..5ef18b9 100644 Binary files a/icons/b_wire.dmi and b/icons/b_wire.dmi differ diff --git a/icons/camera_screen.dmi b/icons/camera_screen.dmi index cd627a3..ee6fdbf 100644 Binary files a/icons/camera_screen.dmi and b/icons/camera_screen.dmi differ diff --git a/icons/chairs.dmi b/icons/chairs.dmi index 0bb1520..1f30ea8 100644 Binary files a/icons/chairs.dmi and b/icons/chairs.dmi differ diff --git a/icons/concealed_wiring.dmi b/icons/concealed_wiring.dmi index 55e22c8..c972fad 100644 Binary files a/icons/concealed_wiring.dmi and b/icons/concealed_wiring.dmi differ diff --git a/icons/conveyor_belt_active.dmi b/icons/conveyor_belt_active.dmi index f06ab0d..4ea3ea1 100644 Binary files a/icons/conveyor_belt_active.dmi and b/icons/conveyor_belt_active.dmi differ diff --git a/icons/disk_p.dmi b/icons/disk_p.dmi index e3d87fc..55bb81d 100644 Binary files a/icons/disk_p.dmi and b/icons/disk_p.dmi differ diff --git a/icons/door.dmi b/icons/door.dmi index fc1deb1..9b68a96 100644 Binary files a/icons/door.dmi and b/icons/door.dmi differ diff --git a/icons/g_wire.dmi b/icons/g_wire.dmi index eb1327f..c953041 100644 Binary files a/icons/g_wire.dmi and b/icons/g_wire.dmi differ diff --git a/icons/gps.dmi b/icons/gps.dmi index 557b6d3..5163081 100644 Binary files a/icons/gps.dmi and b/icons/gps.dmi differ diff --git a/icons/hub.dmi b/icons/hub.dmi index 703b56e..bb7577c 100644 Binary files a/icons/hub.dmi and b/icons/hub.dmi differ diff --git a/icons/hub_board.dmi b/icons/hub_board.dmi index c8a8bae..71a9c60 100644 Binary files a/icons/hub_board.dmi and b/icons/hub_board.dmi differ diff --git a/icons/hyperwire.dmi b/icons/hyperwire.dmi index a512b5a..09a1e3e 100644 Binary files a/icons/hyperwire.dmi and b/icons/hyperwire.dmi differ diff --git a/icons/icon_desktop.dmi b/icons/icon_desktop.dmi index a63a94d..e6c5e18 100644 Binary files a/icons/icon_desktop.dmi and b/icons/icon_desktop.dmi differ diff --git a/icons/icon_laptop.dmi b/icons/icon_laptop.dmi index 07b0ace..fa98a67 100644 Binary files a/icons/icon_laptop.dmi and b/icons/icon_laptop.dmi differ diff --git a/icons/infared.dmi b/icons/infared.dmi index 4518a64..afe0f16 100644 Binary files a/icons/infared.dmi and b/icons/infared.dmi differ diff --git a/icons/items.dmi b/icons/items.dmi index 8a0a141..d29090f 100644 Binary files a/icons/items.dmi and b/icons/items.dmi differ diff --git a/icons/laptop.dmi b/icons/laptop.dmi index e892969..8fd92d3 100644 Binary files a/icons/laptop.dmi and b/icons/laptop.dmi differ diff --git a/icons/mini.dmi b/icons/mini.dmi index 7d7a249..4fe9146 100644 Binary files a/icons/mini.dmi and b/icons/mini.dmi differ diff --git a/icons/misc.dmi b/icons/misc.dmi index 09fc670..a834e40 100644 Binary files a/icons/misc.dmi and b/icons/misc.dmi differ diff --git a/icons/new_computer.dmi b/icons/new_computer.dmi index 4e30e05..40dc5da 100644 Binary files a/icons/new_computer.dmi and b/icons/new_computer.dmi differ diff --git a/icons/objects.dmi b/icons/objects.dmi index 6471898..3fecd0d 100644 Binary files a/icons/objects.dmi and b/icons/objects.dmi differ diff --git a/icons/packet.dmi b/icons/packet.dmi index 3a4c24e..b246131 100644 Binary files a/icons/packet.dmi and b/icons/packet.dmi differ diff --git a/icons/r_wire.dmi b/icons/r_wire.dmi index 9f6fead..d6833df 100644 Binary files a/icons/r_wire.dmi and b/icons/r_wire.dmi differ diff --git a/icons/rackmount.dmi b/icons/rackmount.dmi index 8e8ba4f..2092c5b 100644 Binary files a/icons/rackmount.dmi and b/icons/rackmount.dmi differ diff --git a/icons/repeater.dmi b/icons/repeater.dmi index 27bf525..9153643 100644 Binary files a/icons/repeater.dmi and b/icons/repeater.dmi differ diff --git a/icons/save_loc.dmi b/icons/save_loc.dmi index 1e81d5e..ec0a745 100644 Binary files a/icons/save_loc.dmi and b/icons/save_loc.dmi differ diff --git a/icons/screen.dmi b/icons/screen.dmi index 6cab6e7..98d85f2 100644 Binary files a/icons/screen.dmi and b/icons/screen.dmi differ diff --git a/icons/shutter.dmi b/icons/shutter.dmi index 303b0db..d2da4c4 100644 Binary files a/icons/shutter.dmi and b/icons/shutter.dmi differ diff --git a/icons/table.dmi b/icons/table.dmi index d49d5db..f6fe88d 100644 Binary files a/icons/table.dmi and b/icons/table.dmi differ diff --git a/icons/teleport.dmi b/icons/teleport.dmi index f0c1fdd..d95df6c 100644 Binary files a/icons/teleport.dmi and b/icons/teleport.dmi differ diff --git a/icons/wire.dmi b/icons/wire.dmi index 7d942f2..df26615 100644 Binary files a/icons/wire.dmi and b/icons/wire.dmi differ diff --git a/icons/wire_junction.dmi b/icons/wire_junction.dmi index 08c25e4..65c13d0 100644 Binary files a/icons/wire_junction.dmi and b/icons/wire_junction.dmi differ diff --git a/maps/new_map.dmm b/maps/new_map.dmm index 0f14a92..273039c 100644 --- a/maps/new_map.dmm +++ b/maps/new_map.dmm @@ -79,29 +79,29 @@ "bA" = (/obj/signal/computer,/turf/floor,/area/save_location{auto_save = 0; name = "Free Lab 6"}) "bB" = (/obj/signal/hub/router,/turf/floor,/area/save_location{auto_save = 0; name = "Free Lab 6"}) "bC" = (/obj/signal/antenna,/turf/floor,/area/save_location{name = "Free Lab 1"; auto_save = 0}) -"bD" = (/obj/signal/box{keycode = "freelabsarefun"; open_lab = 1},/turf/floor,/area/save_location{name = "Free Lab 1"; auto_save = 0}) +"bD" = (/obj/signal/box{keycode = "freelabsarefun"; doorcode_ref = "free1_lab"; open_lab = 1},/turf/floor,/area/save_location{name = "Free Lab 1"; auto_save = 0}) "bE" = (/obj/signal/sign_box{default_text = "Free Lab"; sign_dir = 10},/turf/floor,/area/save_location{name = "Free Lab 1"; auto_save = 0}) "bF" = (/obj/trashcan,/turf/floor,/area/save_location{name = "Free Lab 1"; auto_save = 0}) "bG" = (/obj/signal/antenna,/turf/floor,/area/save_location{auto_save = 0; name = "Free Lab 2"}) -"bH" = (/obj/signal/box{keycode = "freelabsarefun"; open_lab = 1},/turf/floor,/area/save_location{auto_save = 0; name = "Free Lab 2"}) +"bH" = (/obj/signal/box{keycode = "freelabsarefun"; doorcode_ref = "free2_lab"; open_lab = 1},/turf/floor,/area/save_location{auto_save = 0; name = "Free Lab 2"}) "bI" = (/obj/signal/sign_box{default_text = "Free Lab"; sign_dir = 10},/turf/floor,/area/save_location{auto_save = 0; name = "Free Lab 2"}) "bJ" = (/obj/trashcan,/turf/floor,/area/save_location{auto_save = 0; name = "Free Lab 2"}) "bK" = (/obj/signal/antenna,/turf/floor,/area/save_location{name = "Free Lab 3"; auto_save = 0}) -"bL" = (/obj/signal/box{keycode = "freelabsarefun"; open_lab = 1},/turf/floor,/area/save_location{name = "Free Lab 3"; auto_save = 0}) +"bL" = (/obj/signal/box{keycode = "freelabsarefun"; doorcode_ref = "free3_lab"; open_lab = 1},/turf/floor,/area/save_location{name = "Free Lab 3"; auto_save = 0}) "bM" = (/obj/signal/sign_box{default_text = "Free Lab"; sign_dir = 10},/turf/floor,/area/save_location{name = "Free Lab 3"; auto_save = 0}) "bN" = (/obj/trashcan,/turf/floor,/area/save_location{name = "Free Lab 3"; auto_save = 0}) "bO" = (/obj/table{icon_state = "sides"; dir = 4},/obj/signal/notarizer,/turf/floor,/area) "bP" = (/obj/table{icon_state = "sides"; dir = 8},/obj/signal/printer,/turf/floor,/area) "bQ" = (/obj/signal/antenna,/turf/floor,/area/save_location{name = "Free Lab 4"; auto_save = 0}) -"bR" = (/obj/signal/box{keycode = "freelabsarefun"; open_lab = 1},/turf/floor,/area/save_location{name = "Free Lab 4"; auto_save = 0}) +"bR" = (/obj/signal/box{keycode = "freelabsarefun"; doorcode_ref = "free4_lab"; open_lab = 1},/turf/floor,/area/save_location{name = "Free Lab 4"; auto_save = 0}) "bS" = (/obj/signal/sign_box{default_text = "Free Lab"; sign_dir = 10},/turf/floor,/area/save_location{name = "Free Lab 4"; auto_save = 0}) "bT" = (/obj/trashcan,/turf/floor,/area/save_location{name = "Free Lab 4"; auto_save = 0}) "bU" = (/obj/signal/antenna,/turf/floor,/area/save_location{auto_save = 0; name = "Free Lab 5"}) -"bV" = (/obj/signal/box{keycode = "freelabsarefun"; open_lab = 1},/turf/floor,/area/save_location{auto_save = 0; name = "Free Lab 5"}) +"bV" = (/obj/signal/box{keycode = "freelabsarefun"; doorcode_ref = "free5_lab"; open_lab = 1},/turf/floor,/area/save_location{auto_save = 0; name = "Free Lab 5"}) "bW" = (/obj/signal/sign_box{default_text = "Free Lab"; sign_dir = 10},/turf/floor,/area/save_location{auto_save = 0; name = "Free Lab 5"}) "bX" = (/obj/trashcan,/turf/floor,/area/save_location{auto_save = 0; name = "Free Lab 5"}) "bY" = (/obj/signal/antenna,/turf/floor,/area/save_location{auto_save = 0; name = "Free Lab 6"}) -"bZ" = (/obj/signal/box{keycode = "freelabsarefun"; open_lab = 1},/turf/floor,/area/save_location{auto_save = 0; name = "Free Lab 6"}) +"bZ" = (/obj/signal/box{keycode = "freelabsarefun"; doorcode_ref = "free6_lab"; open_lab = 1},/turf/floor,/area/save_location{auto_save = 0; name = "Free Lab 6"}) "ca" = (/obj/signal/sign_box{default_text = "Free Lab"; sign_dir = 10},/turf/floor,/area/save_location{auto_save = 0; name = "Free Lab 6"}) "cb" = (/obj/trashcan,/turf/floor,/area/save_location{auto_save = 0; name = "Free Lab 6"}) "cc" = (/obj/window{tag = "icon-window (EAST)"; icon_state = "window"; dir = 4},/turf/floor,/area) @@ -121,17 +121,17 @@ "cq" = (/obj/signal/intercom,/turf/wall,/area) "cr" = (/obj/signal/antenna,/turf/floor,/area/save_location{auto_save = 1; name = "Lcooper's Lab"; owner = "lcooper"}) "cs" = (/obj/signal/sign_box{default_text = "Lcooper's Lab"; dir = 1; sign_dir = 9},/turf/floor,/area/save_location{auto_save = 1; name = "Lcooper's Lab"; owner = "lcooper"}) -"ct" = (/obj/signal/box{d_dir = 5; dir = 1; keycode = "emptylabssuck"},/turf/floor,/area/save_location{auto_save = 1; name = "Lcooper's Lab"; owner = "lcooper"}) +"ct" = (/obj/signal/box{d_dir = 5; dir = 1; keycode = "emptylabssuck"; doorcode_ref = "lcooper_lab"},/turf/floor,/area/save_location{auto_save = 1; name = "Lcooper's Lab"; owner = "lcooper"}) "cu" = (/obj/filecabinet,/turf/floor,/area/save_location{auto_save = 1; name = "Lcooper's Lab"; owner = "lcooper"}) "cv" = (/obj/trashcan,/turf/floor,/area/save_location{auto_save = 1; name = "Lcooper's Lab"; owner = "lcooper"}) "cw" = (/obj/signal/antenna,/turf/floor,/area/save_location{auto_save = 1; name = "Zero Ziat's Lab"; owner = "zeroziat"}) "cx" = (/obj/signal/sign_box{default_text = "Zero Ziat's Lab"; dir = 1; sign_dir = 9},/turf/floor,/area/save_location{auto_save = 1; name = "Zero Ziat's Lab"; owner = "zeroziat"}) -"cy" = (/obj/signal/box{d_dir = 5; dir = 1; keycode = "emptylabssuck"},/turf/floor,/area/save_location{auto_save = 1; name = "Zero Ziat's Lab"; owner = "zeroziat"}) +"cy" = (/obj/signal/box{d_dir = 5; dir = 1; keycode = "emptylabssuck"; doorcode_ref = "zeroziat_lab"},/turf/floor,/area/save_location{auto_save = 1; name = "Zero Ziat's Lab"; owner = "zeroziat"}) "cz" = (/obj/filecabinet,/turf/floor,/area/save_location{auto_save = 1; name = "Zero Ziat's Lab"; owner = "zeroziat"}) "cA" = (/obj/trashcan,/turf/floor,/area/save_location{auto_save = 1; name = "Zero Ziat's Lab"; owner = "zeroziat"}) "cB" = (/obj/signal/antenna,/turf/floor,/area/save_location{auto_save = 1; name = "Shwb1's Lab"; owner = "shwb1"}) "cC" = (/obj/signal/sign_box{default_text = "Shwb1's Lab"; dir = 1; sign_dir = 9},/turf/floor,/area/save_location{auto_save = 1; name = "Shwb1's Lab"; owner = "shwb1"}) -"cD" = (/obj/signal/box{d_dir = 5; dir = 1; keycode = "emptylabssuck"},/turf/floor,/area/save_location{auto_save = 1; name = "Shwb1's Lab"; owner = "shwb1"}) +"cD" = (/obj/signal/box{d_dir = 5; dir = 1; keycode = "emptylabssuck"; doorcode_ref = "shwb1_lab"},/turf/floor,/area/save_location{auto_save = 1; name = "Shwb1's Lab"; owner = "shwb1"}) "cE" = (/obj/filecabinet,/turf/floor,/area/save_location{auto_save = 1; name = "Shwb1's Lab"; owner = "shwb1"}) "cF" = (/obj/trashcan,/turf/floor,/area/save_location{auto_save = 1; name = "Shwb1's Lab"; owner = "shwb1"}) "cG" = (/obj/signal/antenna,/turf/floor,/area) @@ -238,17 +238,17 @@ "eD" = (/obj/signal/dir_ant,/turf/floor,/area/save_location{auto_save = 1; name = "Calus CoRPS' Lab"; owner = "caluscorps"}) "eE" = (/turf/floor,/area/start) "eF" = (/obj/signal/antenna,/turf/floor,/area/save_location{name = "Nadrew's Lab"; owner = "nadrew"}) -"eG" = (/obj/signal/box{keycode = "somerandompasswordheredude"},/turf/floor,/area/save_location{name = "Nadrew's Lab"; owner = "nadrew"}) +"eG" = (/obj/signal/box{keycode = "somerandompasswordheredude"; doorcode_ref = "nadrew_lab"},/turf/floor,/area/save_location{name = "Nadrew's Lab"; owner = "nadrew"}) "eH" = (/obj/signal/sign_box{default_text = "Nadrew's Lab"; sign_dir = 10},/turf/floor,/area/save_location{name = "Nadrew's Lab"; owner = "nadrew"}) "eI" = (/obj/filecabinet,/turf/floor,/area/save_location{name = "Nadrew's Lab"; owner = "nadrew"}) "eJ" = (/obj/trashcan,/turf/floor,/area/save_location{name = "Nadrew's Lab"; owner = "nadrew"}) "eK" = (/obj/signal/antenna,/turf/floor,/area/save_location{name = "Yota's Lab"; owner = "yota"}) -"eL" = (/obj/signal/box{keycode = "yotard"},/turf/floor,/area/save_location{name = "Yota's Lab"; owner = "yota"}) +"eL" = (/obj/signal/box{keycode = "yotard"; doorcode_ref = "yota_lab"},/turf/floor,/area/save_location{name = "Yota's Lab"; owner = "yota"}) "eM" = (/obj/signal/sign_box{default_text = "Yota's Lab"; sign_dir = 10},/turf/floor,/area/save_location{name = "Yota's Lab"; owner = "yota"}) "eN" = (/obj/filecabinet,/turf/floor,/area/save_location{name = "Yota's Lab"; owner = "yota"}) "eO" = (/obj/trashcan,/turf/floor,/area/save_location{name = "Yota's Lab"; owner = "yota"}) "eP" = (/obj/signal/antenna,/turf/floor,/area/save_location{auto_save = 1; name = "Calus CoRPS' Lab"; owner = "caluscorps"}) -"eQ" = (/obj/signal/box{keycode = "corpse"},/turf/floor,/area/save_location{auto_save = 1; name = "Calus CoRPS' Lab"; owner = "caluscorps"}) +"eQ" = (/obj/signal/box{keycode = "corpse"; doorcode_ref = "calus_lab"},/turf/floor,/area/save_location{auto_save = 1; name = "Calus CoRPS' Lab"; owner = "caluscorps"}) "eR" = (/obj/signal/sign_box{default_text = "Calus' Lab"; sign_dir = 10},/turf/floor,/area/save_location{auto_save = 1; name = "Calus CoRPS' Lab"; owner = "caluscorps"}) "eS" = (/obj/filecabinet,/turf/floor,/area/save_location{auto_save = 1; name = "Calus CoRPS' Lab"; owner = "caluscorps"}) "eT" = (/obj/trashcan,/turf/floor,/area/save_location{auto_save = 1; name = "Calus CoRPS' Lab"; owner = "caluscorps"}) @@ -265,17 +265,17 @@ "fe" = (/obj/signal/intercom,/turf/wall,/area/save_location{auto_save = 1; name = "Rockdtben's Lab"; owner = "rockdtben"}) "ff" = (/obj/signal/antenna,/turf/floor,/area/save_location{name = "W12W's Lab"; owner = "W12W"}) "fg" = (/obj/signal/sign_box{default_text = "W12W's Lab"; dir = 1; sign_dir = 9},/turf/floor,/area/save_location{name = "W12W's Lab"; owner = "W12W"}) -"fh" = (/obj/signal/box{d_dir = 5; dir = 1; keycode = "Quinty_2012"},/turf/floor,/area/save_location{name = "W12W's Lab"; owner = "W12W"}) +"fh" = (/obj/signal/box{d_dir = 5; dir = 1; keycode = "Quinty_2012"; doorcode_ref = "w12w_lab"},/turf/floor,/area/save_location{name = "W12W's Lab"; owner = "W12W"}) "fi" = (/obj/filecabinet,/turf/floor,/area/save_location{name = "W12W's Lab"; owner = "W12W"}) "fj" = (/obj/trashcan,/turf/floor,/area/save_location{name = "W12W's Lab"; owner = "W12W"}) "fk" = (/obj/signal/antenna,/turf/floor,/area/save_location{auto_save = 1; name = "Tomeno's Lab"; owner = "tomeno"}) "fl" = (/obj/signal/sign_box{default_text = "Tomeno's Lab"; dir = 1; sign_dir = 9},/turf/floor,/area/save_location{auto_save = 1; name = "Tomeno's Lab"; owner = "tomeno"}) -"fm" = (/obj/signal/box{d_dir = 5; dir = 1; keycode = "rachunek"},/turf/floor,/area/save_location{auto_save = 1; name = "Tomeno's Lab"; owner = "tomeno"}) +"fm" = (/obj/signal/box{d_dir = 5; dir = 1; keycode = "rachunek"; doorcode_ref = "tomeno_lab"},/turf/floor,/area/save_location{auto_save = 1; name = "Tomeno's Lab"; owner = "tomeno"}) "fn" = (/obj/filecabinet,/turf/floor,/area/save_location{auto_save = 1; name = "Tomeno's Lab"; owner = "tomeno"}) "fo" = (/obj/trashcan,/turf/floor,/area/save_location{auto_save = 1; name = "Tomeno's Lab"; owner = "tomeno"}) "fp" = (/obj/signal/antenna,/turf/floor,/area/save_location{auto_save = 1; name = "Rockdtben's Lab"; owner = "rockdtben"}) "fq" = (/obj/signal/sign_box{default_text = "Rockdtben's Lab"; dir = 1; sign_dir = 9},/turf/floor,/area/save_location{auto_save = 1; name = "Rockdtben's Lab"; owner = "rockdtben"}) -"fr" = (/obj/signal/box{d_dir = 5; dir = 1; keycode = "beansandcorn"},/turf/floor,/area/save_location{auto_save = 1; name = "Rockdtben's Lab"; owner = "rockdtben"}) +"fr" = (/obj/signal/box{d_dir = 5; dir = 1; keycode = "beansandcorn"; doorcode_ref = "rockdtben_lab"},/turf/floor,/area/save_location{auto_save = 1; name = "Rockdtben's Lab"; owner = "rockdtben"}) "fs" = (/obj/filecabinet,/turf/floor,/area/save_location{auto_save = 1; name = "Rockdtben's Lab"; owner = "rockdtben"}) "ft" = (/obj/trashcan,/turf/floor,/area/save_location{auto_save = 1; name = "Rockdtben's Lab"; owner = "rockdtben"}) "fu" = (/obj/signal/hub,/turf/floor,/area/save_location{name = "W12W's Lab"; owner = "W12W"}) @@ -360,17 +360,17 @@ "gV" = (/obj/signal/dir_ant,/turf/floor,/area/save_location{name = "Chowder's Lab"; owner = "chowder"; auto_save = 1}) "gW" = (/obj/signal/dir_ant,/turf/floor,/area/save_location{name = "Robconolly's Lab"; owner = "Robconolly"}) "gX" = (/obj/signal/antenna,/turf/floor,/area/save_location{name = "Dever's Lab"; owner = "dever"}) -"gY" = (/obj/signal/box{keycode = "dnetdoorpassword"},/turf/floor,/area/save_location{name = "Dever's Lab"; owner = "dever"}) +"gY" = (/obj/signal/box{keycode = "dnetdoorpassword"; doorcode_ref = "dever_lab"},/turf/floor,/area/save_location{name = "Dever's Lab"; owner = "dever"}) "gZ" = (/obj/signal/sign_box{default_text = "Dever's Lab"; sign_dir = 10},/turf/floor,/area/save_location{name = "Dever's Lab"; owner = "dever"}) "ha" = (/obj/filecabinet,/turf/floor,/area/save_location{name = "Dever's Lab"; owner = "dever"}) "hb" = (/obj/trashcan,/turf/floor,/area/save_location{name = "Dever's Lab"; owner = "dever"}) "hc" = (/obj/signal/antenna,/turf/floor,/area/save_location{name = "Chowder's Lab"; owner = "chowder"; auto_save = 1}) -"hd" = (/obj/signal/box{keycode = "ChaoChaoTech"},/turf/floor,/area/save_location{name = "Chowder's Lab"; owner = "chowder"; auto_save = 1}) +"hd" = (/obj/signal/box{keycode = "ChaoChaoTech"; doorcode_ref = "chowder_lab"},/turf/floor,/area/save_location{name = "Chowder's Lab"; owner = "chowder"; auto_save = 1}) "he" = (/obj/signal/sign_box{default_text = "Chowder's Lab"; sign_dir = 10},/turf/floor,/area/save_location{name = "Chowder's Lab"; owner = "chowder"; auto_save = 1}) "hf" = (/obj/filecabinet,/turf/floor,/area/save_location{name = "Chowder's Lab"; owner = "chowder"; auto_save = 1}) "hg" = (/obj/trashcan,/turf/floor,/area/save_location{name = "Chowder's Lab"; owner = "chowder"; auto_save = 1}) "hh" = (/obj/signal/antenna,/turf/floor,/area/save_location{name = "Robconolly's Lab"; owner = "Robconolly"}) -"hi" = (/obj/signal/box{keycode = "eoscondor"},/turf/floor,/area/save_location{name = "Robconolly's Lab"; owner = "Robconolly"}) +"hi" = (/obj/signal/box{keycode = "eoscondor"; doorcode_ref = "robconolly_lab"},/turf/floor,/area/save_location{name = "Robconolly's Lab"; owner = "Robconolly"}) "hj" = (/obj/signal/sign_box{default_text = "Robconolly's Lab"; sign_dir = 10},/turf/floor,/area/save_location{name = "Robconolly's Lab"; owner = "Robconolly"}) "hk" = (/obj/filecabinet,/turf/floor,/area/save_location{name = "Robconolly's Lab"; owner = "Robconolly"}) "hl" = (/obj/trashcan,/turf/floor,/area/save_location{name = "Robconolly's Lab"; owner = "Robconolly"}) @@ -379,7 +379,7 @@ "ho" = (/obj/signal/intercom,/turf/wall,/area/save_location{name = "Robconolly's Lab"; owner = "Robconolly"}) "hp" = (/obj/bookcase,/turf/floor,/area) "hq" = (/obj/bookcase,/obj/signal/sign_box{default_text = "The Library"; dir = 1; sign_dir = 9},/turf/floor,/area) -"hr" = (/obj/signal/box{d_dir = 5; dir = 1; keycode = "getmesomegoodies"},/turf/floor,/area) +"hr" = (/obj/signal/box{d_dir = 5; dir = 1; keycode = "getmesomegoodies"; doorcode_ref = "supply_room"},/turf/floor,/area) "hs" = (/obj/signal/sign_box{default_text = "Supplies"; dir = 1; sign_dir = 5},/turf/floor,/area) "ht" = (/obj/signal/converter,/turf/floor,/area) "hu" = (/obj/signal/disk_producer,/turf/floor,/area) @@ -391,6 +391,9 @@ "hA" = (/obj/table,/turf/floor,/area) "hB" = (/obj/conveyor,/turf/wall,/area) "hC" = (/obj/electronic,/turf/wall,/area) +"hD" = (/obj/table,/obj/shutter,/turf/floor,/area/save_location{auto_save = 1; name = "Rockdtben's Lab"; owner = "rockdtben"}) +"hE" = (/obj/signal/shutter_box{dir = 4},/turf/floor,/area/save_location{auto_save = 1; name = "Rockdtben's Lab"; owner = "rockdtben"}) +"hF" = (/obj/table{dir = 4; icon_state = "sides"},/obj/shutter,/turf/floor,/area/save_location{auto_save = 1; name = "Rockdtben's Lab"; owner = "rockdtben"}) (1,1,1) = {" aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa @@ -447,12 +450,12 @@ aaaaacacacacacacacacacacacacacacacacacacacacacacacacacacacacacacacacacacacacacac aaaaacacacacacacacacacacacacacacacacacacacacacacacacacacacacacacacacacacacacacacacacacacacaceEeEeEeEeEeEeEacacacacacacacacacacacacacacacacacacacacacacacacacacacacacacacacacacacacacacacacacacacacacaaaa aaaaaaaaacacacaaaaaaaaaaaaaaeZfaaaaaaaaaaaaaaaaafbfcaaaaaaaaaaaaaaaafdfeaaaaaaaaacacacacacaceEeEeEeEeEeEeEacacacacacacaaaaaaaaaaaccqaaaaaaaaaaaaaaaaaccqaaaaaaaaaaaaaaaaaccqaaaaaaaaaaaaaaacacacaaaaaaaa aaaaadacacacacacacaaffeZfgfheZeZeZfifjaafkfbflfmfbfbfbfnfoaafpfdfqfrfdfdfdfsftaaacadacacacadeEeEeEeEeEeEeEadacacacadacaacGaccHcIacacaccJaeaacGaccHcIacacaccJaeaacGaccHcIacacaccJaeaaacacacacacacacadaaaa -aaaaacacacacacacacaaeZeZeZeZeZeZeZeZeZaafbfbfbfbfbfbfbfbfbaafdfdfdfdfdfdfdfdfdaaacacacacacaceEeEeEeEeEeEeEacacacacacacaaacacacacacacacacacaaacacacacacacacacacaaacacacacacacacacacaaacacacacacacacacaaaa -aaaaacacacacacacadaaeZeZeZeZeZeZeZeZeZaafbfbfbfbfbfbfbfbfbaafdfdfdfdfdfdfdfdfdaaacacacacacacacacacacacacacacacacacacacaaacacacacacacacacacaaacacacacacacacacacaaacacacacacacacacacaaadacacacacacacacaaaa -aaaaacacacacacacacaafueZeZfveZfveZeZfwaafxfbfbfyfbfyfbfbfzaafAfdfdfBfdfBfdfdfCaaacacacacacacacacacacacacacacacacacacacaaazacacadacadacacabaaazacacadacadacacabaaazacacadacadacacabaaacacacacacacacacaaaa -aaaaadacacacacacacaafueZeZfveZfveZeZfwaafxfbfbfyfbfyfbfbfzaafAfdfdfBfdfBfdfdfCaaacacacacacacacacacacacacacacacacacacacaaazacacadacadacacabaaazacacadacadacacabaaazacacadacadacacabaaacacacacacacacadaaaa -aaaaacacacacacacacaafueZeZfvfDfveZeZfwaafxfbfbfyfEfyfbfbfzaafAfdfdfBfFfBfdfdfCaaacacacacacacacacacacacacacacacacacacacaaazacacadcWadacacabaaazacacadcWadacacabaaazacacadcWadacacabaaacacacacacacacacaaaa -aaaaacacacacacacadaafueZeZfveZfveZeZfwaafxfbfbfyfbfyfbfbfzaafAfdfdfBfdfBfdfdfCaaaeadacacacadacacacacacacacadacacacadacaaazacacadacadacacabaaazacacadacadacacabaaazacacadacadacacabaaadacacacacacacacaaaa +aaaaacacacacacacacaaeZeZeZeZeZeZeZeZeZaafbfbfbfbfbfbfbfbfbaafdfdfdfdfdfdfdfdfdhDacacacacacaceEeEeEeEeEeEeEacacacacacacaaacacacacacacacacacaaacacacacacacacacacaaacacacacacacacacacaaacacacacacacacacaaaa +aaaaacacacacacacadaaeZeZeZeZeZeZeZeZeZaafbfbfbfbfbfbfbfbfbaafdfdfdfdfdfdfdfdfdhFacacacacacacacacacacacacacacacacacacacaaacacacacacacacacacaaacacacacacacacacacaaacacacacacacacacacaaadacacacacacacacaaaa +aaaaacacacacacacacaafueZeZfveZfveZeZfwaafxfbfbfyfbfyfbfbfzaafAfdfdfBfdfBfdfdfChDacacacacacacacacacacacacacacacacacacacaaazacacadacadacacabaaazacacadacadacacabaaazacacadacadacacabaaacacacacacacacacaaaa +aaaaadacacacacacacaafueZeZfveZfveZeZfwaafxfbfbfyfbfyfbfbfzaafAfdfdfBfdfBfdfdfChDacacacacacacacacacacacacacacacacacacacaaazacacadacadacacabaaazacacadacadacacabaaazacacadacadacacabaaacacacacacacacadaaaa +aaaaacacacacacacacaafueZeZfvfDfveZeZfwaafxfbfbfyfEfyfbfbfzaafAfdfdfBfFfBfdfdhEhDacacacacacacacacacacacacacacacacacacacaaazacacadcWadacacabaaazacacadcWadacacabaaazacacadcWadacacabaaacacacacacacacacaaaa +aaaaacacacacacacadaafueZeZfveZfveZeZfwaafxfbfbfyfbfyfbfbfzaafAfdfdfBfdfBfdfdfdaaaeadacacacadacacacacacacacadacacacadacaaazacacadacadacacabaaazacacadacadacacabaaazacacadacadacacabaaadacacacacacacacaaaa aaaaacacacacacacacaafueZeZfveZfveZeZfwaafxfbfbfyfbfyfbfbfzaafAfdfdfBfdfBfdfdfCaaaaaaacacacaaaaaaacacacaaaaaaacacacaaaaaaazacacadacadacacabaaazacacadacadacacabaaazacacadacadacacabaaacacacacacacacacaaaa aaaaadacacacacacacaaeZeZeZeZeZeZeZeZeZaafbfbfbfbfbfbfbfbfbaafdfdfdfdfdfdfdfdfdaaadacacacacacacaaacacacaaacacacacacacadaaacacacacacacacacacaaacacacacacacacacacaaacacacacacacacacacaaacacacacacacacadaaaa aaaaacacacacacacacaaeZeZeZeZeZeZeZeZeZaafbfbfbfbfbfbfbfbfbaafdfdfdfdfdfdfdfdfdaaacacacacacacadaaacacacaaadacacacacacacaaacacacacacacacacacaaacacacacacacacacacaaacacacacacacacacacaaacacacacacacacacaaaa diff --git a/saves/books/tutorial.txt b/saves/books/tutorial.txt new file mode 100644 index 0000000..31608d9 --- /dev/null +++ b/saves/books/tutorial.txt @@ -0,0 +1,152 @@ + +[page]Lesson 1: Using Console[body]

All + computers on Console must be operated, to be used. You can right click a + computer and click operate to start this. After the computer loads up, +you will be in the root/usr directory. The root, is the highest point of + the computer. It's where everything begins. Many of Console's commands +can be listed just by typing help. The ones you will be using most often though, are make and append. + Append is actually not a built-in console command, but is tied to the +registry (located in the sys) folder. It's a program that comes with +most Console computers. If you try make file.txt you will make a file called file.txt. You can then append file.txt to start writing in it. Others can then read file.txt by typing read file.txt. Try experimenting with the various commands under help. If you want help on a specific command, like for example, make, you would type help make. The last command of note, would be cd. It is what takes you to various parts of the computer.

cd .. would take you to the higher level of the directory. The highest level is always the root.

cd / or cd root takes you to the root of the computer.

cd [foldername] takes you to the folder you want to see. To see a list of files and folders, you would type display.

And lastly noted, a computer can only run around 5 programs/scripts at once.

+ +[page]Lesson 2: Scripting[body]

Scripting + is the basic form of programming in Console. Scripts are files that +simply use Console commands in an order. An example script would be...

echo Hello;delay 30;echo Goodbye

The + echo means, to display on the screen. Anything following an echo +appears on the screen, such as the Hello. A ; seperates commands from +one another. The delay, delays the game for that many ticks. 10 ticks +equals 1 second, so that script delays for 3 seconds before continuing +the next action. And then the last echo says Goodbye before ending the +script.

Scripts can be compiled to prevent people from reading +them. The program scr_compiler.exe in a Console's bin folder can do +this. run /bin/scr_compiler.exe file.txt would compile file.txt +as a script. And anytime someone ran file.txt, it would execute it's +contents. You cannot use the regular compiler however, as that is for +ExCode only.

+ +[page]Lesson 3: Simple Networking[body]

The + most simple way to network computers, is to hook them up directly. With + wire you can hook two computers by double clicking each of them with +the wire equipped. [You can make wire from under the make tab]

When + computers are hooked up, you can send files from one to another, or +commands using the extern function. Extern is quite advanced though, and + not listed in this book. send 01 21 file.txt would normally send + a file.txt from the computer on port 01 to the computer on port 21. The + ports are decided based on where they are hooked into a router, hub, or + other networking device. If two computers are directly linked though, +it will not matter what numbers are used. One number of note is 100. It +sends the file to everything on the network. An example of this would be + send 100 100 file.txt.

This is an easy way to email +others. You can have computers in different rooms hooked up by wire and +communicate with each other. All files that are sent to each other will +be in the computer's root/tmp directory. This is also a great way to +print files. Hook a computer directly to a printer, and send the printer + files to print!

+ +[page]Lesson 4: Networking with Hubs[body]

Hubs + are the basic network utility for a console computer. Anything hooked +up to a hub sends to everything else hooked up to the hub. For this +lesson you will need two Console computers, wire, and a hub.

Hook + the first computer up to the hub. It should say something about 0 to +20. This is in-accurate. Console doesn't give the correct numbers. 0-20 +is actually 0-19, 20-40 is 20-39, and so on and so forth. But the +numbers mean nothing for now because hubs send everything to all the +devices on the network. Hook the second computer up, and it will talk +about 20-40 which again is actually 20-39, for your own reference.

Make a file on the first computer, and type send 100 100 [file]. + Replace [file] with the name of the file you made. Go to the other +computer, and go to it's root/tmp directory. You should find that file +there. If you wrote anything in it, you can read it. Congratulations, +you've used your first hub. Hubs are great for sharing files and +information across many computers, but not for things like emailing. +Because the email would be sent to all the computers, rather than just +one. For something like that you want wireless or router networking.

+ +[page]Lesson 5: Basic ExCode[body]

ExCode + is easy, once you've had the time to associate yourself with it. Taking + a look at source code, even after being around it for a day or two, can + still be confusing. That is why there is this guide to ExCode. Basic +ExCode will teach you how to make a program that uses Console commands, +like scripting, except it does not have the limit of just using console +commands. The lesson after this will teach you more.

The main part of ExCode having to deal with Console is shell;. This runs a command through Console's shell. So, a shell;"restart + would restart the computer. Why is there a " there? Because without it, + it would try to use a variable named restart. Since we haven't made a +variable named restart, it would be empty, and the program would run a +useless command.

ExCode must also be put in differently than a script. You must mass-add ExCode, in a form like the following...

shell;"echo Hello world.
shell;"delay 30
shell;"echo 3 seconds have passed.
shell;"delay 30
shell;"echo 3 more seconds have passed. Goodbye.


Every + new function of ExCode is on a new line. Recognize the echo and delay? +That's right. You use those in scripting. Anything you would use in +scripting can be used with the shell function of ExCode. But it's +important to have the " placed before anything you would use as a +command.

There is also the id and goto functions. The goto function takes you to the ID named in Goto, and continues the program from there.

shell;"echo SHUTTING DOWN!!
goto;cancel
shell;"shutdown
id;cancel
shell;"echo Just kidding.


If you can understand this so far, it would look like this is going to shutdown the computer. But the goto;cancel will skip the program's code until it reaches id;cancel. It will then continue from there, and echo the Just Kidding message.

The + last, and most important thing to know about ExCode, is that it CANNOT +run uncompiled. After making your program (most ExCode programs are +named with a .exe extension) you need to compile it. Most Console +computers include the proper Compiler. Try run /bin/compiler.exe [filename] but replace [filename] with the name of your ExCode program.

+ +[page]Lesson 6: Menus in ExCode[body]

ExCode + can be used to create menus. Obviously, you would want these if you +were to make a program that asked questions, right? Below is a source +code to a yes or no prompt.

shell;"echo Would you like to restart?
id;null_input
set;input:"1;null
id;null
if;input:"1;==;null;null
if;input:"1;==;"yes;go
if;input:"1;==;"no;stop
shell;"echo yes or no only please.
goto;null_input
id;go
shell;"restart
id;stop
shell;"echo Ending program.


input:"1 is a variable that changes to anything a user types into a computer. The if + function of ExCode checks if a variable is equal to a certain value. +That value can be another variable, or a specific value you code in. In if;input:"1;==;"yes;go it checks to see if the variable input:"1 equals the value "yes. + As shown in the previous lesson, the " distinguishes it from a value +and a variable. Without the " it would compare it to another variable +named yes. If the input does equal yes, then it goes to the id named go.

We + also have to null the current input before we ask for a yes or no, and +set the program to loop at that spot until the user types something in. +If the input is null (nothing in it), then it goes to the id null, by +what the above example says. Where it says, shell;"echo yes or no only please + it echoes the shown message if you input something that's not in your +options menu. Below that, is a goto function that takes it back to the +id null_input.

That is the end of Lesson 6. If you combine what +you know with lesson 5, you should be able to make programs that do +functions in console based on what you type in. Such as, if you wanted +to make someone type yes or no, to copy a specific file. That would make + an easy install file. To copy a file using ExCode, you would use the +shell. shell;"copy [filename] [location] but replace the items in brackets with what you would like to do.

+ +[page]Lesson 7: Console Commands[body]

These commands run once console is called for in the computer. It is by default in a console computer when it turns on.

help - Brings up the help menu in Console.
cd [dir] - The default 'go' command in Console. It moves from directory to directory. The [dir] needs to be replaced with .. , / , or a full directory path.
console + - This is actually used in a boot file only, and activates console so +that you may input commands into the computer. Read /sys/boot.sys for an + example.
copy [file] [location] - Copies the [file] to [location].
del [file/dir] - Deletes the file or directory.
delay # - Delays a script or program for # ticks. 10 ticks is equal to 1 second.
display - Displays the contents of the directory you're currently in.
drive - Takes you to the A:/ drive if you have a disk put in the computer.
echo [text] - Displays [text] on the screen. Used mostly in programming.
eject - Ejects the disk from the computer.
make [name] - Makes a file named [name].
makedir [name] - Makes a directory named [name].
restart - Restarts the computer.
read [file] - Reads the contents of [file].
rename [file] [name] - Renames the [file] to [name].
root - Takes you to the root directory.
run [file] - Runs [file] as a script or program, based on if and how it's compiled.
shutdown - Shuts the computer off.

If the Console still has all of it's default contents, you can also use the following two commands.

append [file] - Runs the built-in word processor on [file].
write [file] - Erases the contents of [file] and runs the built-in word processor on [file].

+ +[page]Lesson 8: OS Commands[body]

OS Commands can be used in scripting and ExCode, once the os.sys is loaded. It is loaded by default on most console computers.

file_clear [file] - Clears all of the text in the file.
file_exists [file] - Needs to be used in ExCode to work properly. Tells you if the [file] exists or not.

shell;"file_exists /usr/test.txt
if;err_level;==;"true;file_exist

If test.txt does exist, the program goes to id;file_exist.
file_add [file] [text] + - Adds to [file] the [text]. [newline] creates a new line in the file +(useful if CREATING ExCode directly) and any semicolons (;) need to be +replaced with [semi].
send [source] [destination] [file] - Sends [file] from the computer on port [source] to the computer on port [destination].
extern [source] [destination] [id] [parameters] + - Sends [parameters] to the [id] on the computer in port [destination] +from the computer on port [source]. -2 should not be used for the ID, -1 + is reserved, 0 will try to execute shell.scr, anything besides 0 or -1 +executes packet[id].scr [src_id] [parameters]. If the packet is not +there, it makes packet[id].dat with text [src_id];[parameters].
error - Unknown by Stari. Information on this is not included in this book.
e_key # + - Sets the encryption key to #. The highest Encryption key available is + 600. Used on wireless devices only. Laptops are wireless.
hide [file] - Hides [file] from view on display.
reveal [file] - Reveals [file] for viewing on display.
timestamp - Sets the error level to the current time/date. In order to assign this to a variable ExCode is needed.
timer - Sets the error level to the current amount of ticks in the game. In order to assign this to a variable ExCode is needed.
bios_[1-3] [file_path] + Sets the bootup file to [file_path]. The actual boot order the file +goes in is bios_1, bios_2, or bios_3. By default, bios_1 is A:/boot.sys. + By default, bios_2 is /sys/boot.sys. By default, bios_3 is none.
pass_[1-3] [password] Passwords the bootup for a specific boot level.

+ +[page]Lesson 9: Default Console System Data[body]

Directories
usr - Default directory for bootup.
bin - Default programs are kept here.
sys - System files are kept here.
log - System logs are kept here.
tmp - Temporary files, and files recieved from networks are kept here.

Programs
/bin/wp.exe - This is the builtin word processor. Use the write and append commands.
/sys/kernel.sys - This should be run first on startup.
/sys/os.sys - This should be run after the kernel.

Logs
If + a log file is deleted, a new log file is created with a different +startup time. Logs cannot be kept if there is no root/log folder. The +logs are named as the tick when it started logging.

Scripts
See scripting.

Registry
Located in /sys/registry/. + Programs here are named [name].com. If you type [name] while using +Console, it will run a program in the /sys/registry/ directory named +[name].com.

Shell
Externel shell access can be made if +you create a file called shell.scr in the /usr directory. The computer +sending commands via extern will automatically transfer the data +directly to the command line IF the id is 0.

Tasks
Only one program can be run at a time. But several processes can be run in the background via the back + command. If a program is run, it locks up console until the program +finishes. If a program is backgrounded, console will still run and the +program will complete it's duties but there will be a slight delay to +it's function. If you run a program from a previous program, the new +program will take over and freeze the old program until the new program +finishes.

+ +[page]Lesson 10: List of ExCode Functions/Commands[body]

comment;[text]
Just makes [text] the comment
***
shell;[var]
Passes the contents of [var] to the command prompt
***
shell;"[sting]
Passes the string [string] to the command prompt
***
id;[string]
Makes a id called [string]
***
goto;[string]
Goes to id [string]
***
set;[string];"[string2]
Makes a variable called [string] and it is filled with whats in [string2]
***
if;[variable1];[function];[variable2];[id]
The if command tests if [variable1] is [function] [variable2] ifso... it gotos
[id] [variable2] can be a string like "1 or "Blueprint Rocks! or a variable
[function] can be ==, >=; <=, >, <, !=
***
eval;[variable1];[function];[variable2]
The eval command does the equation [variable1] = [function] [variable2] [variable2]
can be a number like "1 or a string "Blueprint Rocks! or a variable [function]
can be +=, -=, *=, /=
***
end;text
Sets the systems err_level to text and ends the program
***
dumpfile;[file_path];[var]
Dumps the contents of [file_path] to [var]
***
dumppath;[file_var];[var]
Dumps the path of [file_var] to [var]
***
getfile;[var];[path]
Puts a file from [path] not the contents into [var]
***
char;[var];[number]
Gives the ascii character representation of [number] and puts it in [var]
***
init_list;[var]
Changes [var] to a list
***
list_moveup;[list]
Moves all the values in [list] up one so the starting value is null
***
findtext;[var];[string];[string2];[start_index];[end_index]
Returns + the starting index of [string] in [string2] if found between +[start_index]and [end_index]. It then puts this value into [var]
***
replacetext;[var];[string];[string2];[string3]
Replaces all [string2]s that are in [string] with [string3] and returns the changed string to [var].
***
copytext;[var];[string];[start_index];[end_index]
Returns the [string] from [start_index] to [end_index] and stores it in [var]
***
length;[var];[string]
Stores the length of [string] in [var]

+ +[page]Lesson 11: ExCode Source - Purenet[body]

Owned and created by Dever

shell;"echo PureNet - coded by Dever 10/11/04
char;semi;"59
if;arg:"4;!=;null;repn
set;arg:"4;"null
id;repn
set;check;"/tmp/
eval;check;+=;arg:"4
set;clearcheck;"del /tmp/
eval;clearcheck;+=;arg:"4
set;ext;"extern
eval;ext;+=;arg:"2
eval;ext;+=;"
eval;ext;+=;arg:"1
eval;ext;+=;"
eval;ext;+=;arg:"3
eval;ext;+=;"
shell;"echo Waiting for input..
id;rett
set;input:"1;null
id;n
getfile;checks;check
if;checks;!=;null;check
if;input:"1;==;null;n
replacetext;tmp2;input:"1;semi;"
set;tmp;"echo purenet>
eval;tmp;+=;tmp2
shell;tmp
if;tmp2;==;".exit;exit
set;tmp;ext
eval;tmp;+=;tmp2
shell;tmp
goto;rett
id;check
dumpfile;check;tmp2
shell;clearcheck
replacetext;tmp2;tmp2;semi;"{S}
set;tmp;"echo
eval;tmp;+=;tmp2
shell;tmp
goto;rett
id;exit
if;arg:"5;==;"lock;rett
shell;"echo leaving purenet..
end;exit

+ +[page]Lesson 12: ExCode Source - Options[body]

Owned and created by Dever

id;e
set;input:"1;null
id;n
if;input:"1;==;null;n
if;input:"1;==;"option1;opt1
if;input:"1;==;"option2;opt2
if;input:"1;==;"option3;opt3
if;input:"1;==;"option4;opt4
shell;"echo invalid option
goto;e
id;opt1
shell;"echo option1
end;1
id;opt2
shell;"echo option2
end;2
id;opt3
shell;"echo option3
end;3
id;opt4
shell;"echo option4
end;4

+ +[page]Credits and Authors[body]

Stari for the lessons writing, and compiling the book.

ZJM7891 for the various ExCode function definitions.

P90Killer for providing some reference material.

Dever for source codes, and teaching Stari how to use Console.
\ No newline at end of file