Skip to content

Commit

Permalink
[READY][TM-REQ] Ports the CBT and TGUI refactors from /TG/ (shiptest-…
Browse files Browse the repository at this point in the history
…ss13#1349)

* shipowners v1. let's see what the tests think

* "missing trailing comma" yeah okay. ill trail your fucking commas

* added option to withhold ckey

* merge conflict resolution test 2

* updates shipowners application-sending UI

* trailing comma

* damn the tgui linters to hell

* null client checks

* fucking god dammit

* line length

* phase 1

* phase 2 - 5

* to_chat changes

* subsys changes

* replace old tools

* why did you commit you meanie

* should catch the rest of these

* why are you failing on the changelog???

* agony

* asset changes

* map ci

* undo this garbo

* missed these

* I hate you

* fine

* maybe?

* ignore changelogs

* just copy paste the tg linters

* windows bs

* tg uses this version of py

* prettify

* prettier cfg

* force prettier reeval

* resolve issues with prettier vsx

* remove smart cable check

* remove barricade issues

* remove table issues

* resolve chair issues

* resolve nanotrasen spelling

* not in the check grep file idiot

* remove var from proc params
regex: (/proc/\w+\()var/(.*) -> $1$2

* remove var from proc params
regex: (/proc/\w+\()var/(.*) -> $1$2

* correct lattic issues

* fix airlock names

* fix incorrect apc pixel shifts

* remove invalid lattices

* resolve turf issues

* resolve spacing issues

* remove mixed indentation

* damn you regexp

* remove missed merge conflicts

* this is a comment

* trailing newline

* proc var names and spacing

* resolve duplicate firelocks

* resolve lattice issues
ignore example configs in json validation

* disable check regex until issues with pygit are resolved

* run the checks batman

* temporarily removed check regex from linters

* do this perhaps

* just work

* update usages for python and checkout

* remove these

* perhaps?

* perhaps???

* e

* god just fucking work

* please run mr checks

* ?

* oops

* I cannot describe simply how much I hate you and all that you stand for

* agony

* do it like this

* perhaps?

* ag

* bgone

* fix unbound

* pipefail

* agggg

* prettier rerun

* perhaps?

* reorder?

* hhh

* wrong version

* yet another prettier rerun

* resolve tguis incorrectly handling ping replies

* resolve game panel not inlining object datums

* resolve ping not functioning

* prettier once again

* resolve outpost terminal hard faulting on cargo

* prettier

* prettier again

* resolve map issues

* get looc color back in here

* I hate you

Makes create mob work again

* fixes issues where paper text would not save

Co-authored-by: tmtmtl30 <[email protected]>
  • Loading branch information
ZephyrTFA and tmtmtl30 authored Jul 21, 2022
1 parent 07407f4 commit 9542244
Show file tree
Hide file tree
Showing 1,367 changed files with 112,062 additions and 77,244 deletions.
2 changes: 2 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
root = true

[*]
indent_style = tab
indent_size = 4
Expand Down
25 changes: 17 additions & 8 deletions .github/AUTODOC_GUIDE.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
# dmdoc
[DOCUMENTATION]: https://codedocs.shiptest.net/

[BYOND]: https://secure.byond.com/

[DMDOC]: https://github.com/SpaceManiac/SpacemanDMM/tree/master/src/dmdoc
[documentation]: https://codedocs.shiptest.net/
[byond]: https://secure.byond.com/
[dmdoc]: https://github.com/SpaceManiac/SpacemanDMM/tree/master/src/dmdoc

[DMDOC] is a documentation generator for DreamMaker, the scripting language
of the [BYOND] game engine. It produces simple static HTML files based on
Expand All @@ -16,6 +15,7 @@ This gives new developers a clickable reference [DOCUMENTATION] they can browse
gain understanding of the /tg/code codebase structure and api reference.

## Documenting code on /tg/code

We use block comments to document procs and classes, and we use `///` line comments
when documenting individual variables.

Expand All @@ -25,22 +25,24 @@ We also require that when you touch older code, you must document the functions
have touched in the process of updating that code

### Required
A class *must* always be autodocumented, and all public functions *must* be documented

All class level defined variables *must* be documented
A class _must_ always be autodocumented, and all public functions _must_ be documented

Internal functions *should* be documented, but may not be
All class level defined variables _must_ be documented

Internal functions _should_ be documented, but may not be

A public function is any function that a developer might reasonably call while using
or interacting with your object. Internal functions are helper functions that your
public functions rely on to implement logic


### Documenting a proc

When documenting a proc, we give a short one line description (as this is shown
next to the proc definition in the list of all procs for a type or global
namespace), then a longer paragraph which will be shown when the user clicks on
the proc to jump to it's definition

```
/**
* Short description of the proc
Expand All @@ -54,12 +56,14 @@ the proc to jump to it's definition
```

### Documenting a class

We first give the name of the class as a header, this can be omitted if the name is
just going to be the typepath of the class, as dmdoc uses that by default

Then we give a short oneline description of the class

Finally we give a longer multi paragraph description of the class and it's details

```
/**
* # Classname (Can be omitted if it's just going to be the typepath)
Expand All @@ -74,13 +78,16 @@ Finally we give a longer multi paragraph description of the class and it's detai
```

### Documenting a variable

Give a short explanation of what the variable is in the context of the class.

```
/// Type path of item to go in suit slot
var/suit = null
```

## Module level description of code

Modules are the best way to describe the structure/intent of a package of code
where you don't want to be tied to the formal layout of the class structure.

Expand All @@ -92,7 +99,9 @@ you would like.
[Here is a representative example of what you might write](https://codedocs.shiptest.net/code/game/atoms.html)

## Special variables

You can use certain special template variables in DM DOC comments and they will be expanded

```
[DEFINE_NAME] - Expands to a link to the define definition if documented
[/mob] - Expands to a link to the docs for the /mob class
Expand Down
249 changes: 157 additions & 92 deletions .github/CONTRIBUTING.md

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion .github/FUNDING.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
github: # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2]
patreon: shiptest_ss13
open_collective: # Replace with a single Open Collective username
ko_fi: #
ko_fi: #
tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel
community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry
liberapay: # Replace with a single Liberapay username
Expand Down
4 changes: 2 additions & 2 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@ name: Bug report
about: Create a report to help reproduce and fix an issue
title: "[BUG]"
labels: Bug
assignees: ''

assignees: ""
---

<!-- Write **BELOW** The Headers and **ABOVE** The comments else it may not be viewable -->

## Round ID:

<!--- **INCLUDE THE ROUND ID**
Expand Down
7 changes: 5 additions & 2 deletions .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,19 @@ name: Feature request
about: Suggest an idea for the codebase
title: "[FEATURE]"
labels: Feature
assignees: ''

assignees: ""
---

<!-- Write **BELOW** The Headers and **ABOVE** The comments else it may not be viewable -->

## Name of feature:

<!-- PLEASE at least include a name. -->

### Related Pull Request on other codebase:

<!-- Include a link if you can, e.g. https://github.com/BeeStation/BeeStation-Hornet/pull/1014 -->

### Additional Info:

<!-- Include any other needed info here! -->
4 changes: 2 additions & 2 deletions .github/MAPS_AND_AWAY_MISSIONS.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# MAPS

All maps have their own code file that is in the base of the _maps directory. Maps are loaded dynamically when the game starts. Follow this guideline when adding your own map, to your fork, for easy compatibility.
All maps have their own code file that is in the base of the \_maps directory. Maps are loaded dynamically when the game starts. Follow this guideline when adding your own map, to your fork, for easy compatibility.

The map that will be loaded for the upcoming round is determined by reading data/next_map.json, which is a copy of the json files found in the _maps tree. If this file does not exist, the default map from config/maps.txt will be loaded. Failing that, BoxStation will be loaded. If you want to set a specific map to load next round you can use the Change Map verb in game before restarting the server or copy a json from _maps to data/next_map.json before starting the server. Also, for debugging purposes, ticking a corresponding map's code file in Dream Maker will force that map to load every round.
The map that will be loaded for the upcoming round is determined by reading data/next_map.json, which is a copy of the json files found in the \_maps tree. If this file does not exist, the default map from config/maps.txt will be loaded. Failing that, BoxStation will be loaded. If you want to set a specific map to load next round you can use the Change Map verb in game before restarting the server or copy a json from \_maps to data/next_map.json before starting the server. Also, for debugging purposes, ticking a corresponding map's code file in Dream Maker will force that map to load every round.

If you are hosting a server, and want randomly picked maps to be played each round, you can enable map rotation in [config.txt](config/config.txt) and then set the maps to be picked in the [maps.txt](config/maps.txt) file.

Expand Down
5 changes: 5 additions & 0 deletions .github/POLICYCONFIG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,11 @@ Welcome to this short guide to the POLICY config mechanism.
You are probably reading this guide because you have been informed your antagonist or ghost role needs to support policy configuration.

## Requirements

It is a requirement of /tg/station development that all ghost roles, antags, minor antags and event mobs of any kind must support the policy system when implemented.

## What is policy configuration

Policy configuration is a json file that the administrators of a server can edit, which contains a dictionary of keywords -> string message.

The policy text for a specific keyword should be displayed when relevant and appropriate, to allow server administrators to define the broad strokes of policy for some feature or mob.
Expand All @@ -25,10 +27,13 @@ This will return a configured string of text, or blank/null if no policy string
This is also accessible to the user if they use `/client/verb/policy()` which will display to them a list of all the policy texts for keywords applicable to the mob, you can add/modify the list of keywords by modifying the `get_policy_keywords()` proc of a mob type where that is relevant.

### Example

Here is a simple example taken from the slime pyroclastic event

```
var/policy = get_policy(ROLE_PYROCLASTIC_SLIME)
if (policy)
to_chat(S, policy)
```

It's recommended to use a define for your policy keyword to make it easily changeable by a developer
1 change: 1 addition & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
<!-- Please add a short description of why you think these changes would benefit the game. If you can't justify it in words, it might not be worth adding. -->

## Changelog

:cl:
add: Added new things
add: Added more things
Expand Down
9 changes: 5 additions & 4 deletions .github/RUNNING_A_SERVER.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# INSTALLATION

First-time installation should be fairly straightforward. First, you'll need
BYOND installed. You can get it from https://www.byond.com/download. Once you've done
that, extract the game files to wherever you want to keep them. This is a
Expand Down Expand Up @@ -56,7 +57,7 @@ as these store your server configuration, player preferences and banlist.
Then, extract the new files (preferably into a clean directory, but updating in
place should work fine), copy your /config and /data folders back into the new
install, overwriting when prompted except if we've specified otherwise, and
recompile the game. Once you start the server up again, you should be running
recompile the game. Once you start the server up again, you should be running
the new version.

## HOSTING
Expand All @@ -67,7 +68,7 @@ https://github.com/tgstation/tgstation-server

## SQL SETUP

The SQL backend requires a Mariadb server running 10.2 or later. Mysql is not supported but Mariadb is a drop in replacement for mysql. SQL is required for the library, stats tracking, admin notes, and job-only bans, among other features, mostly related to server administration. Your server details go in /config/dbconfig.txt, and the SQL schema is in /SQL/tgstation_schema.sql and /SQL/tgstation_schema_prefix.sql depending on if you want table prefixes. More detailed setup instructions are located here: https://wiki.white-sands.space/Downloading_the_source_code#Setting_up_the_database
The SQL backend requires a Mariadb server running 10.2 or later. Mysql is not supported but Mariadb is a drop in replacement for mysql. SQL is required for the library, stats tracking, admin notes, and job-only bans, among other features, mostly related to server administration. Your server details go in /config/dbconfig.txt, and the SQL schema is in /SQL/tgstation_schema.sql and /SQL/tgstation_schema_prefix.sql depending on if you want table prefixes. More detailed setup instructions are located here: https://wiki.white-sands.space/Downloading_the_source_code#Setting_up_the_database

If you are hosting a testing server on windows you can use a standalone version of MariaDB pre load with a blank (but initialized) tgdb database. Find them here: https://tgstation13.download/database/ Just unzip and run for a working (but insecure) database server. Includes a zipped copy of the data folder for easy resetting back to square one.

Expand All @@ -77,8 +78,8 @@ Web delivery of game resources makes it quicker for players to join and reduces

1. Edit compile_options.dm to set the `PRELOAD_RSC` define to `0`
1. Add a url to config/external_rsc_urls pointing to a .zip file containing the .rsc.
* If you keep up to date with White Sands you could reuse White Sands' rsc cdn at https://cdn.white-sands.space/rsc/tgstation.rsc. Otherwise you can use cdn services like CDN77 or cloudflare (requires adding a page rule to enable caching of the zip), or roll your own cdn using route 53 and vps providers.
* Regardless even offloading the rsc to a website without a CDN will be a massive improvement over the in game system for transferring files.
- If you keep up to date with White Sands you could reuse White Sands' rsc cdn at https://cdn.white-sands.space/rsc/tgstation.rsc. Otherwise you can use cdn services like CDN77 or cloudflare (requires adding a page rule to enable caching of the zip), or roll your own cdn using route 53 and vps providers.
- Regardless even offloading the rsc to a website without a CDN will be a massive improvement over the in game system for transferring files.

## IRC BOT SETUP

Expand Down
96 changes: 48 additions & 48 deletions .github/keylabeler.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,51 +9,51 @@ caseSensitive: false

# Explicit keyword mappings to labels. Form of match:label. Required.
labelMappings:
"fix:": &fix_type Fix
"fixes:": *fix_type
"bugfix:": *fix_type
"[critical]": *fix_type
"[fix]": *fix_type
"[bugfix]": *fix_type
"[runtime]": *fix_type
"[bug]": Bug
"rsctweak:": &tweak_type Tweak
"tweak:": *tweak_type
"tweaks:": *tweak_type
"soundadd:": Sound
"sounddel:": Sound
"add:": &add_type Feature
"adds:": *add_type
"rscadd:": *add_type
"[enhancement]": *add_type
"[qol]": *add_type
"[feature]": *add_type
"del:": &del_type Removal
"dels:": *del_type
"rscdel:": *del_type
"[removal]": *del_type
"[revert]": *del_type
"imageadd:": Sprites
"imagedel:": Sprites
"typo:": &typo_type Grammar and Formatting
"spellcheck:": *typo_type
"balance:": &balance_type Balance/Rebalance
"rebalance:": *balance_type
"[rebalance]": *balance_type
"[balance]": *balance_type
"tgs:": &tgs_type TGS
"[tgs]": *tgs_type
"[dmapi]": *tgs_type
"code_imp:": &code_type Code Improvement
"code:": *code_type
"refactor:": Refactor
"config:": Config Update
"admin:": Administration
"server:": server
"[dnm]": &dnm_type Do not merge
"[do not merge]": *dnm_type
"[tgui]": &ui_type tgui
"[ui]": *ui_type
"[rework]": Rework
"[wiki]": Wiki Edit
"[wip]": WIP
"fix:": &fix_type Fix
"fixes:": *fix_type
"bugfix:": *fix_type
"[critical]": *fix_type
"[fix]": *fix_type
"[bugfix]": *fix_type
"[runtime]": *fix_type
"[bug]": Bug
"rsctweak:": &tweak_type Tweak
"tweak:": *tweak_type
"tweaks:": *tweak_type
"soundadd:": Sound
"sounddel:": Sound
"add:": &add_type Feature
"adds:": *add_type
"rscadd:": *add_type
"[enhancement]": *add_type
"[qol]": *add_type
"[feature]": *add_type
"del:": &del_type Removal
"dels:": *del_type
"rscdel:": *del_type
"[removal]": *del_type
"[revert]": *del_type
"imageadd:": Sprites
"imagedel:": Sprites
"typo:": &typo_type Grammar and Formatting
"spellcheck:": *typo_type
"balance:": &balance_type Balance/Rebalance
"rebalance:": *balance_type
"[rebalance]": *balance_type
"[balance]": *balance_type
"tgs:": &tgs_type TGS
"[tgs]": *tgs_type
"[dmapi]": *tgs_type
"code_imp:": &code_type Code Improvement
"code:": *code_type
"refactor:": Refactor
"config:": Config Update
"admin:": Administration
"server:": server
"[dnm]": &dnm_type Do not merge
"[do not merge]": *dnm_type
"[tgui]": &ui_type tgui
"[ui]": *ui_type
"[rework]": Rework
"[wiki]": Wiki Edit
"[wip]": WIP
30 changes: 15 additions & 15 deletions .github/labeler.yml
Original file line number Diff line number Diff line change
@@ -1,44 +1,44 @@
Admin:
- 'code/modules/admin/**'
- "code/modules/admin/**"

# Any file within the config subfolder
Config:
- 'config/**'
- "config/**"

Dependencies:
- '**/package.json'
- '**/package-lock.json'
- '**/yarn.lock'
- "**/package.json"
- "**/package-lock.json"
- "**/yarn.lock"

# When the .DME is changed
DME Edit:
- './*.dme'
- '**/*.dme'
- "./*.dme"
- "**/*.dme"

# Any .dmi changes
Sprites:
- '**/*.dmi'
- "**/*.dmi"

# Changes to a .dmm or anything in the _map subfolder
Map Change:
- '**/*.dmm'
- '_maps/**'
- "**/*.dmm"
- "_maps/**"

# Any changes to .ogg files are marked as sound
Sound:
- '**/*.ogg'
- "**/*.ogg"

# Changes to the SQL subfolder
SQL:
- 'SQL/**'
- "SQL/**"

# Changes to the tgui subfolder
tgui:
- 'tgui/**'
- "tgui/**"

# Changes to the .Github subfolder
Github:
- '.github/**'
- ".github/**"

Deprecated Modularization:
- 'whitesands/**'
- "whitesands/**"
Loading

0 comments on commit 9542244

Please sign in to comment.