dibasic / ss13paperworksimulator Goto Github PK
View Code? Open in Web Editor NEWWYSIWYG editor for SS13 paperwork pencode
Home Page: http://ps.ss13.net/
License: Other
WYSIWYG editor for SS13 paperwork pencode
Home Page: http://ps.ss13.net/
License: Other
Is your feature request related to a problem? Please describe.
Currently formatting actions (buttons & hotkeys) work by adding a block to the caret position. That's the beginning of text selection.
Users are used to UX, like in MS-Word, where selecting text and pressing the "Bold" button makes the selected text bold. This is not the case for us right now.
Describe the solution you'd like
If user selected text, and performs a formatting action, make it apply on the entire selection.
Describe alternatives you've considered
Or don't
Additional context
N/A
Describe the bug
To Reproduce
Steps to reproduce the behavior:
Expected behavior
Web Browser (please complete the following information):
Pen Code
N/A
Additional context
I understand the prompt is there to mimic the way the editor looks/works in-game. That UX is broken, there's no need to mimic it.
I'd suggest adding a .json file to /templates, using
Describe the bug
Pen code format for security arrest report is missing a line
To Reproduce
Load the security arrest report, scroll down to the BRIG CHIEF MUST STAMP line
Expected behavior
https://i.gyazo.com/13a5068b153bac16a713166064a8a034.png
Web Browser (please complete the following information):
Screenshots
https://i.gyazo.com/8554c0c55573af7d19ea66f7ef9f7b60.png
Pen Code
[center][solcrest][h1]Arrest Report[/h1][field][/center]
[i]Revision [date] - [time][/i]
[b]Offense/Incident Type: [/b][field]
[b]Location: [/b][field]
[hr][h3]Arrestee Information[/h3]
[small][i](B##-Brigged, ## time, H-Indefinite Hold, C-Court Martial, P-Parole/Probation, V-Verbal Warning)
[table][row][cell][b]Rank[/b][cell][b]Name[/b][cell][b]Position[/b][cell][b]Charge(s)[/b][cell][b]Disposition[/b]
[row][cell][b][field][/b][cell][field][cell][field][cell][field][cell][field]
[/table][/i][/small][br][br][hr][h3]Personnel Involved in Incident[/h3]
[b]Arresting Officer(s): [/b][field][br]
[b]Other Personnel[/b]
[small][i](V-Victim, S-Suspect, W-Witness, M-Missing, A-Arrested, RP-Reporting Person, D-Deceased)[/i][/small][br]
[table][row][cell][b]Rank[/b][cell][b]Name[/b][cell][b]Position[/b][cell][b]Relation[/b]
[row][cell][b][field][/b][cell][field][cell][field][cell][field]
[row][cell][b][field][/b][cell][field][cell][field][cell][field]
[row][cell][b][field][/b][cell][field][cell][field][cell][field]
[row][cell][b][field][/b][cell][field][cell][field][cell][field]
[row][cell][b][field][/b][cell][field][cell][field][cell][field]
[/table][br][br][hr][h3]Booking Checklist[/h3]
[b]Booking Officer: [/b][field][br]
[table][row][cell][b]Escape Risk[/b][cell][field]
[row][cell][b]Suicide Risk[/b][cell][field]
[row][cell][b]Combative[/b][cell][field]
[row][cell][b]Provided Required Medical Treatment[/b][cell][field]
[row][cell][b]Warrant Presented[/b][cell][field]
[row][cell][b]Advised of Rights[/b][cell][field]
[row][cell][b]Prisoner Searched[/b][cell][field]
[row][cell][b]Provided an Opportunity for Statement[/b][cell][field]
[hr][small]BRIG OFFICER MUST STAMP OR SIGN THIS DOCUMENT
ATTACH ALL RELEVANT DOCUMENTS TO THIS ARREST REPORT[/small][hr]
Additional context
Add any other context about the problem here.
Is your feature request related to a problem? Please describe.
No.
Describe the solution you'd like
User 1 asks for the 'example' template.
User 2 sends them this: http://ps.ss13.net/#example
User 1 clicks the link. The page loads and brings up the 'example' template.
Describe alternatives you've considered
Option 1: The anchor is to '#department/example' and opens the template at templates/department/example.txt
Option 2: The anchor is to '#example' and there exists some way to map that to the correct path.
Additional context
Is your feature request related to a problem? Please describe.
The selectmenu for picking a template is so large that it extends past the bottom of the viewport on most displays.
Describe the solution you'd like
The implementation of a jQuery UI menu with submenus:
Describe alternatives you've considered
I haven't considered any other solutions.
Additional context
https://jqueryui.com/menu/
Digital mode should be a checkbox in settings or on the toolbar.
Digital mode on should allow digital tags but not pen styles.
Digital mode off should allow pen styles but not digital tags.
Is your feature request related to a problem? Please describe.
Raw CSS is limiting and bloated. Sass can be used for dev convenience, which is then compiled to CSS.
Describe the solution you'd like
https://sass-lang.com/
Describe alternatives you've considered
... Or don't use Sass. That's fine too.
Additional context
https://sass-lang.com/
Describe the bug
The only unintended behavior here is that changing your pen color back to 'black' locks it at black and isn't overwritten by color schemes.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
Combining these features should do one of two things:
Web Browser (please complete the following information):
Pen Code
Additional context
Describe the bug
Sometimes, but not all times, loading a template will result in the left side getting updated but the right side not. Usually happens with templates with a lot of content.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
Both left and right side get updated
Web Browser (please complete the following information):
Pen Code
N/A
Additional context
N/A
Describe the bug
Only part of the text color is changed when switching themes
To Reproduce
Steps to reproduce the behavior:
Expected behavior
All the text is the same color
Web Browser (please complete the following information):
Firefox 66.0 (64-bit)
Pen Code
Additional context
Tested in Firefox and Chrome on Windows 10.
Steps to reproduce:
Is your feature request related to a problem? Please describe.
No.
Describe the solution you'd like
The user has access to a new control in the top fieldset, a selectmenu which when an item is chosen from its menu will insert a commonly used block of pencode at the cursor. Commonly used blocks might be: [grid] (prompt for rows/columns), [table] (same), paperwork header with centered title and logo, etc.
Describe alternatives you've considered
These blocks could be stored in a global JS list, stored in a .json file and accessed when needed, loaded after startup and then available as a global list, or stored as an element somewhere.
Additional context
Adding this control as a inside the top fieldset will apply jQuery UI selectmenu styling with our color scheme already applied.
Is your feature request related to a problem? Please describe.
No.
Describe the solution you'd like
A control added to the Preview Settings menu with two additional select menus:
These default to a black pen setting.
When changed, the style of the output adjusts based on setting.
Describe alternatives you've considered
Instead of offering all ingame colors, we could offer
The ingame colors may be better to offer, if more restrictive and theoretically a source of maintenance if pencode is ever touched. WYSIWYG, and unless adminbus is involved (or antag pens with a few extra colors), you only get the common colors. There's the rainbow crayon, however, which gets a color picker.
Additional context
Pen styles: clerical kit pins have any of these colors, color changing pens have black/red/blue/green, and the fancy pen only has their one color.
Crayon styles: Comic Sans MS font; as far as I know, all the same colors as clerical kit pens. The rainbow crayon can pick any color and defaults to FFF000
Is your feature request related to a problem? Please describe.
JS, due to its dynamic nature, tends to fail in production. Currently there's no way to know if the JS code is problemantic other than running it manually.
Describe the solution you'd like
Set up linter rules. Linting is a form of static code analysis that allows you to see potential issues with your code before it's run.
Describe alternatives you've considered
Or dont.
Additional context
https://eslint.org/
Is your feature request related to a problem? Please describe.
No.
Describe the solution you'd like
Line up all labels, inputs, and info icons with each other.
Describe alternatives you've considered
A flexbox with empty cells on the left where there are no checkboxes might work, but that's a bit of a hack. Moving controls to the right side and info icons to the left side might look more intuitive, involve a simpler solution and would force future commits to add an info icon but that's a good thing, actually.
Additional context
Add any other context or screenshots about the feature request here.
Is your feature request related to a problem? Please describe.
No.
Describe the solution you'd like
Some external markup file, or just an .html file, that contains everything currently in #credits-dialog
Describe alternatives you've considered
Additional context
The developer credits are half of index.html in terms of LOC and I'd like to keep index.html as clean as possible.
Describe the bug
Angle brackets show up as unrendered < or > in the output.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
The angle brackets should appear correctly in the output, but html tags such as <script> should not be interpreted.
Web Browser (please complete the following information):
Pen Code
><
Additional context
Introduced in 9e14ed1 to fix #1 . We replace < and > with < and > to avoid html from being interpreted when output is displayed. The fix for this issue needs to make sure that it doesn't reintroduce that problem.
Describe the bug
Description links to https://dibasic.github.io/SS13Paperwo...
To Reproduce
Expected behavior
Should link to http://ps.ss13.net/
Web Browser (please complete the following information):
Irrelevant
Pen Code
Irrelevant
Additional context
Null
[large]
- Ctrl
+Shift
+>
[small]
- Ctrl
+ Shift
+ <
[center]
- Ctrl
+ e
Just like in MS-Word.
If anyone wants to do some digging in Baystation12/Baystation12, this would be a nice thing to get right.
As someone who plays a lot of Medical, those two are by far the most requested pieces of Paperwork from my department, and can be crucial for Antag Intensive rounds.
While the Autopsy Scanner does give a basic report, it's quite spartan in terms of presenting a narrative for a death, and can be difficult to understand for those without the Medical know how. As such, an Autopsy Form is essential for organizing the information resulting from an Autopsy.
The Psych Eval has a great number of uses, especially during a Cult or Deity round. It can be presented to a CMO for declaring certain people unfit for duty or to be sectioned, it can be presented to a CoS for understanding the Psychology of certain criminals, it can be presented to a Court Martial to prevent a hard punishment as the person wasn't aware of their actions, etc.
Is your feature request related to a problem? Please describe.
N/A
Describe the solution you'd like
One-stop resource for paperwork.
Describe alternatives you've considered
Add all templates from here to the wiki.
Additional context
N/A
Is your feature request related to a problem? Please describe.
Sometimes I want to prepare a template late at night, or I want to use the site to preview something I'm writing and not have to do corrections in-game, but the full-white color scheme really hurts my eyes.
Describe the solution you'd like
A button or setting that can turn the color scheme more night-friendly, so my eyes don't hurt.
Describe alternatives you've considered
None.
Additional context
Just open the site at night, and you'll see what I mean.
Describe the bug
Each nested [small]
or [large]
tag continues to decrease or increase the size of text. This can result in very small or very large text or nested opposite tags cancelling each other out.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
[small]
and [large]
should be possible. There should be no difference between [small]X[/small]
and [small][small]X[/small][/small]
.[small]
and [large]
tags should not negate each other. Instead, text should be the size set by the first tag it's in (text in a large tag should be large, even if that large tag is inside a small tag)Web Browser (please complete the following information):
Screenshots
Ingame:
Simulator:
Pen Code
TEST1[small]TEST2[small]TEST3[small]TEST4[/small][/small][/small]
TEST1[small]TEST2[large]TEST3[/large]TEST4[/small]TEST5
Additional context
We are using <small>
and <large>
tags, while the game uses <font>
. Fixing this may require some snowflakey checks.
Is your feature request related to a problem? Please describe.
Currently, every time you do a formatting action (use a hotkey, or press a button), it adds a new tag.
This is not intuitive, because users are used to UX like in MS-Word, where for example pressing Bold on already bold text makes it not bold.
Describe the solution you'd like
Make formatting actions toggle instead of only adding
Describe alternatives you've considered
Or don't.
Additional context
N/A
Is your feature request related to a problem? Please describe.
Writing backwards-compatible JavaScript is a pain, especially when considering how old browsers can get. ES6 is very fun.
Describe the solution you'd like
Set up a transpiler like Babel to turn valid modern JS in to backwards compatible old-style JS automatically.
Describe alternatives you've considered
Or not.
Additional context
https://babeljs.io/
[small] should affect all text in all elements before the first occurrence of [/small]. This may not work correctly because text in a grid cell has no element around it for nextUntil to select.
Possible fix: add
or to [cell] and a closing tag to [/cell]
Doesn't pose much of a security risk but should be sanitized in case users wish to use special characters like <>.
Describe the bug
The simulator does not limit the amount of fields a document can have, and atleast one document, the Pre-Flight Checklist, is unusable in-game because of this,
To Reproduce
Steps to reproduce the behavior:
Expected behavior
For the template to work in-game as well as it did in the simulator.
Web Browser (please complete the following information):
Screenshots
Pen Code
[center][eclogo][/center][hr][hr][h3]SCGEC FORM UF301a: PREFLIGHT CHECKLIST - SINGLE-SEAT CRAFT, SMALL SPACECRAFT OR OTHER BOAT[/h3][/center][hr][hr][grid][row][cell][b]DATE[/b][cell]: [date]
[row][cell][b]LOCAL TIME[/b][cell]: [time]
[row][cell][b]CRAFT[/b][cell]: [field]
[row][cell][b]SHIP[/b][cell]: SEV TORCH
[row][cell]
[row][cell][b]DESTINATION[/b][cell]: [field]
[row][cell][b]PURPOSE[/b][cell]: [field]
[row][/grid][hr][hr][h3]CHECKLIST[/h3][hr][hr]
[small][table][row][cell][b]#[/b][cell][b]INSTRUCTION OR CHECK[/b][cell][b]PASS/FAIL[/b][cell][b]AMT/QTY/NOTE[/b]
[row][cell]1a[cell]Port side of hull shows no signs of damage or fatigue[cell][field][cell][field]
[row][cell]1b[cell]Starboard side of hull shows no signs of damage or fatigue[cell][field][cell][field]
[row][cell]1c[cell]Windows and glass panels have no visible cracks, loose
or missing fastening screws, or loose or missing brackets[cell][field][cell][field]
[row][cell]2a[cell]Engine nozzles show no damage or fatigue, debris, loose
objects, or objects blocking nozzle exhaust[cell][field][cell][field]
[row][cell]2b[cell]Area behind and below engine nozzles is free of spilled or
leaking fluid, loose fastening screws, and other debris[cell][field][cell][field]
[row][cell]3a[cell]Short-range or chemical fuel tank above 300 kPa*
[i]for 70L H2 at 293K; 8.62 mol H2 for other calculations[/i][cell][field][cell][field]
[row][cell]3b[cell]Short-range fuel tank connected with no sign of leak[cell][field][cell][field]
[row][cell]3c[cell]Short-range fuel access panel closed and latched[cell][field][cell][field]
[row][cell]4a[cell]Long-range fuel pump or regulator state is ON or OPEN[cell][field][cell][field]
[row][cell]4b[cell]Long-range fuel pump or regulator target pressure set to
15MPa or applicable maximum[cell][field][cell][field]
[row][cell]4c[cell]Long-range fuel pump or regulator flow rate set to 500L/s
or applicable maximum[cell][field][cell][field]
[row][cell]4d[cell]Long-range fuel tank connected to long-range fuel port[cell][field][cell][field]
[row][cell]5a[cell]All area power controllers show GREEN (100% charge) or
BLUE (<100% charge, increasing) status[cell][field][cell][field]
[row][cell]5b[cell]SMES or PSU total charge is at or above 80% of maximum[cell][field][cell][field]
[row][cell]5c[cell]SMES or PSU connected to terminal; no wires are missing,
damaged, or disconnected[cell][field][cell][field]
[row][cell]5d[cell]Visible power cables show no signs of damage[cell][field][cell][field]
[row][cell]6a[cell]PACMAN, MRSPACMAN, SUPERPACMAN, or other electrical
generator is fixed in place and connected to power cable[cell][field][cell][field]
[row][cell]6b[cell]Generator power cable leads directly to SMES or PSU
terminal and not to any other power draw[cell][field][cell][field]
[row][cell]6c[cell]Generator solid fuel is present and loaded into generator
unit or stored in fireproof locker or crate[cell][field][cell][field]
[row][cell]6d[cell]Generator power setting is equal to or less than the
maximum safe output listed on bottom or rear of unit[cell][field][cell][field]
[row][cell]6e[cell]Generator setting is OFF if connected to ship powernet[cell][field][cell][field]
[row][cell]7a[cell]All internal atmospheric vents and scrubbers are enabled
and all environmental controls are set to 'Filtering' mode[cell][field][cell][field]
[row][cell]7b[cell]Air distribution tank is full or above 4MPa and air scrubber
tank is empty or below 100kPa[cell][field][cell][field]
[row][cell]7c[cell]Airlock buffer tank is between 200kPa and 600kPa, or
airlock pressure regulator or pump is ON or OPEN and set
between 100 and 120kPa with 500L/s or maximum flow[cell][field][cell][field]
[row][cell]8a[cell]Enough O2 or airmix tanks for mission and crew are on
board and all are set to safe distribution pressure
[i]see manufacturer for safe distribution pressures[cell][field][cell][field]
[row][cell]8b[cell]Enough breath masks are on board for mission[cell][field][cell][field]
[row][cell]8c[cell]Enough voidsuits or protective equipment for mission and
crew are on board, all equipment is attached, and no suits
show signs of punctures, melting, or tearing[cell][field][cell][field]
[row][cell]8d[cell]Other mission-related cargo matches mission manifest
[i]see form UF311[cell][field][cell][field]
[row][cell]9a[cell]Sensors console shows status "VACUUM SEAL BROKEN"
(if atmospheric) or "OK" (if in vacuum)[cell][field][cell][field]
[row][cell]9b[cell]Engine control console shows all nozzles present and
power is equal for all engines on the same line[cell][field][cell][field]
[row][cell]9c[cell]Engines are all turned ON and throttled to ideal limit
*[i]see manual UF3-04-1134 for discussion of ideal limits[cell][field][cell][field]
[row][cell]9d[cell]Helm console shows acceleration above 0.0 and within
expected range[cell][field][cell][field]
[row][cell]10a[cell]All mission crew are on board and match mission manifest
*[i]see form UF312 or forms UF322a or UF322b[cell][field][cell][field]
[row][cell]10b[cell]All external airlocks are sealed[cell][field][cell][field]
[row][cell]10c[cell]Relevant manifests submitted and departure authorization
received from hangar control or command if required[cell][field][cell][field][/table]
[b]IMPORTANT: YOU MUST WRITE "PASS", "FAIL", OR "N/A" FOR EVERY CHECK. DO NOT IGNORE OR SKIP ANY APPLICABLE CHECKS. DO NOT COMPLETE THIS CHECKLIST OUT OF ORDER. DO NOT MEMORIZE THIS CHECKLIST. DO NOT COMPLETE THIS CHECKLIST AT ANY TIME OTHER THAN WHILE PERFORMING YOUR PREFLIGHT CHECK. NEGLIGENT OPERATION OF SPACECRAFT IS PUNISHABLE BY CRIMINAL LAW AND THE SCUJ.[/b][/small]
[hr][hr][h3]VERIFICATION[/h3][hr][hr]
[b]PREPARING[/b] pilot, technician or flight officer
[small][i]I take responsibility for any negligent preparation of the craft listed above. I verify to the best of my knowledge that I have completed all checks listed above, that I have completed them fully and in their listed order, and that I am trained and authorized to operate this craft and its equipment.[/i][/small]
[grid]
[row][cell][b]RANK / RATE[/b][cell]: [field]
[row][cell][b]FULL NAME[/b][cell]: [field]
[row][cell][b]ASSIGNMENT[/b][cell]: [field]
[row][cell][b]SIGN[/b][cell]: [field]
[row][cell][b]DATE[/b][cell]: [field][/grid]
[hr]
Additional context
Add any other context about the problem here.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.