Skip to content

Commit

Permalink
Merge branch 'master' into more_hotkeys_mapping
Browse files Browse the repository at this point in the history
  • Loading branch information
FluffyGhoster committed Jun 26, 2023
2 parents 2a306bc + 5e1332d commit 1b4a4c7
Show file tree
Hide file tree
Showing 1,874 changed files with 248,130 additions and 62,297 deletions.
38 changes: 0 additions & 38 deletions .drone.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,44 +31,6 @@ steps:
image: aurorastation/dm-buildimage:latest
commands:
- /opt/dreamchecker
- name: "Restore NPM Cache"
image: appleboy/drone-sftp-cache
settings:
server:
from_secret: sftp_server
port:
from_secret: sftp_port
username:
from_secret: sftp_user
password:
from_secret: sftp_pass
path: /upload/nodecache
mount:
- vueui/node_modules
restore: true
- name: "Vue - Lint and Compile"
image: node:10-buster
commands:
- cd vueui
- npm install
- (npm run lint | tee lint.log)
- grep "No lint errors found!" lint.log
- npm run build
- name: "Rebuild NPM Cache"
image: appleboy/drone-sftp-cache
settings:
server:
from_secret: sftp_server
port:
from_secret: sftp_port
username:
from_secret: sftp_user
password:
from_secret: sftp_pass
path: /upload/nodecache
mount:
- vueui/node_modules
rebuild: true
---
kind: pipeline
type: docker
Expand Down
8 changes: 4 additions & 4 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,10 @@
/code/__defines/organs.dm @NonQueueingMatt
/code/modules/organs/ @NonQueueingMatt

# VueUI, it would be @Karolis2011 but no repo write access
/code/modules/vueui/ @NonQueueingMatt
/vueui/ @NonQueueingMatt
/code/__defines/vueui.dm @NonQueueingMatt
# UIs. Wildkins or Matt.
/tgui/ @JohnWildkins
code/__defines/tgui.dm @JohnWildkins
code/modules/tgui @JohnWildkins

# Tools, often binary in nature, let arrow and alb know
/tools/ @Arrow768 @Alberyk
Expand Down
12 changes: 2 additions & 10 deletions .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -225,20 +225,12 @@ All tables for the database should be prefixed according to the following list:
# HTML UI Standards

### UI conversion policy
Due to our current situation with 5 different HTML UI systems we are now enforcing a policy that all new UIs should be made using the VueUi UI system. This policy also applies to editing existing UIs, with the following exceptions:
Due to our current situation with 5 different HTML UI systems we are now enforcing a policy that all new UIs should be made using the TGUI system. This policy also applies to editing existing UIs, with the following exceptions:

1. Modification is security / severe bug fix.
0. It is typo fix.
0. Touched UI file is too large.
0. VueUi can't accommodate that type of UI.
0. TGUI can't accommodate that type of UI.

### Responsiveness
All new UIs must be responsive, that means that when parameters change in game world, UI data must update as quickly as possible to reflect that change. If change is time dependant, then client side time approximation should be used.

### Conditional usage policy
If you need to use conditional rendering inside UI, then try to put conditional statements on elements you want to hide, then try using `<template>` to apply condition to multiple components.

For conditional rendering try to prefer to use `v-show` attribute when change is expected to be often occurring. Use `v-if` when you need `v-else` and switch is expected expected not often.

### Reusability
If there is segment of UI that is used multiple times with different content, then we strongly encourage making of new component. If that component is general or may be reused globally, then it should be made in to global component (placed in `vui` folder), else it should be made in to UI specific component that must be placed in folder inside `view` folder.
37 changes: 34 additions & 3 deletions .github/workflows/byond.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
name: BYOND tests
name: CI Suite

on:
merge_group:
branches:
- master
push:
branches:
- master
Expand All @@ -12,7 +14,7 @@ on:
env:
MACRO_COUNT: 0
GENDER_COUNT: 6
TO_WORLD_COUNT: 202
TO_WORLD_COUNT: 199
TGM_CHECK: "//MAP CONVERTED BY dmm2tgm.py THIS HEADER COMMENT PREVENTS RECONVERSION, DO NOT REMOVE"

jobs:
Expand All @@ -27,22 +29,51 @@ jobs:
pip install --user -r ./tools/requirements.txt
chmod +x ./scripts/code_check.sh && ./scripts/code_check.sh $PWD
bash tools/ci/install_spaceman_dmm.sh dreamchecker
bash tools/ci/setup_od.sh
- name: Code checks
run: |
awk -f tools/indentation.awk **/*.dm
python3 tools/TagMatcher/tag-matcher.py ../..
python3 tools/GenerateChangelog/ss13_genchangelog.py html/changelog.html html/changelogs --dry-run
python3 tools/mapmerge2/travis_mapcheck.py
echo "6a5ae087fe5bfa66e52e508655e57120 *html/changelogs/example.yml" | md5sum -c -
- name: Run dreamchecker
id: runDreamchecker
run: ~/dreamchecker > ${GITHUB_WORKSPACE}/output-annotations.txt 2>&1
- name: Run OpenDream Lint
id: runOpenDreamLint
run: bash tools/ci/run_od.sh
- name: Annotate Lints
if: failure() && steps.runDreamchecker.outcome == 'failure'
uses: yogstation13/DreamAnnotate@v2
with:
outputFile: output-annotations.txt

# TODO: Move that to the linters at some point
tgui-test:
if: "!contains(github.event.head_commit.message, '[ci skip]')"
runs-on: ubuntu-22.04
steps:
- name: Install Node
uses: actions/setup-node@v3
with:
node-version: 14

- name: Checkout Repository
uses: actions/checkout@v3

- name: Restore Yarn cache
uses: actions/cache@v3
with:
path: tgui/.yarn/cache
key: ${{ runner.os }}-yarn-${{ hashFiles('tgui/yarn.lock') }}
restore-keys: |
${{ runner.os }}-build-
${{ runner.os }}-
- name: Lint TGUI
run: |
tools/build/build --ci lint tgui-test
unit-test-linux:
if: "!contains(github.event.head_commit.message, '[ci skip]')"
strategy:
Expand Down
47 changes: 47 additions & 0 deletions .github/workflows/update_tgs_dmapi.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
name: Update TGS DMAPI

on:
schedule:
- cron: "0 0 * * *"
workflow_dispatch:

jobs:
update-dmapi:
runs-on: ubuntu-20.04
name: Update the TGS DMAPI
steps:
- name: Clone
uses: actions/checkout@v3

- name: Branch
run: |
git branch -f tgs-dmapi-update
git checkout tgs-dmapi-update
git reset --hard master
- name: Apply DMAPI update
uses: tgstation/tgs-dmapi-updater@v2
with:
header-path: 'code/__defines/tgs.dm'
library-path: 'code/modules/tgs'

- name: Commit and Push
continue-on-error: true
run: |
git config --local user.email "[email protected]"
git config --local user.name "AuroraBuildBot"
git add .
git commit -m 'Update TGS DMAPI'
git push -f -u origin tgs-dmapi-update
- name: Create Pull Request
uses: repo-sync/pull-request@v2
if: ${{ success() }}
with:
source_branch: "tgs-dmapi-update"
destination_branch: "master"
pr_title: "Automatic TGS DMAPI Update"
pr_body: "This pull request updates the TGS DMAPI to the latest version. Please note any changes that may be breaking or unimplemented in your codebase by checking what changes are in the definitions file: code/__DEFINES/tgs.dm before merging."
pr_label: "Tools"
pr_allow_empty: false
github_token: ${{ secrets.BOT_TOKEN_AURORA }}
50 changes: 50 additions & 0 deletions .github/workflows/update_tgui.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
name: "Build TGUI"
on:
workflow_dispatch:
push:
branches:
- master
paths:
- 'tgui/**'

jobs:
update-tgui:
concurrency: tgui
runs-on: ubuntu-22.04
steps:
- name: Install Node
uses: actions/setup-node@v3
with:
node-version: 14

- name: Checkout Repository
uses: actions/checkout@v3
with:
token: ${{ secrets.BOT_TOKEN_AURORA }}

- name: Restore Yarn cache
uses: actions/cache@v3
with:
path: tgui/.yarn/cache
key: ${{ runner.os }}-yarn-${{ hashFiles('tgui/yarn.lock') }}
restore-keys: |
${{ runner.os }}-build-
${{ runner.os }}-
- name: Update TGUI
run: |
chmod +x tools/bootstrap/node
tools/bootstrap/node tools/build/build.js tgui
- name: Commit
run: |
git pull origin master
git config --local user.email "[email protected]"
git config --local user.name "AuroraBuildBot"
git add --force tgui/public/*
git commit -m "Automatic TGUI compile [ci skip]" -a || true
- name: Push
uses: ad-m/github-push-action@master
with:
github_token: ${{ secrets.BOT_TOKEN_AURORA }}
51 changes: 0 additions & 51 deletions .github/workflows/vueui.yml

This file was deleted.

6 changes: 4 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,7 @@ __pycache__/
*.py[cod]
*$py.class
/.atom-build.json
.vscode/
.vs/
.vscode/*
!.vscode/launch.json
!.vscode/tasks.json
.vs/
5 changes: 5 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# We don't want prettier to run on anything outside of the TGUI folder, so we have to do this.
/*

# We want it to run into the TGUI folder, however.
!/tgui
6 changes: 0 additions & 6 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ cache:
directories:
- $HOME/BYOND-${BYOND_MAJOR}.${BYOND_MINOR}
- $HOME/flyway-${FLYWAY_BUILD}
- vueui/dist
- $HOME/rust_g-${RUST_G_VERSION}

addons:
Expand Down Expand Up @@ -72,8 +71,6 @@ jobs:
- pip install --user -r ./tools/requirements.txt
- pip install --user PyYaml -q
- pip install --user beautifulsoup4 -q
- chmod +x ./vueui/install
- ./vueui/install
- chmod +x ./scripts/install-spaceman-dmm.sh
- ./scripts/install-spaceman-dmm.sh dreamchecker
- chmod +x ./scripts/rust_g.sh
Expand All @@ -84,9 +81,6 @@ jobs:
- (! grep -E "<\s*span\s+class\s*=\s*('[^'>]+|[^'>]+')\s*>" **/*.dm)
- (! grep -r --include=\*.dm '#define UIDEBUG' ./)
- (! grep -r --include=\*.dm 'to_chat(.*,\s*link(' ./)
- (cd vueui && (npm run lint | tee lint.log))
- grep "No lint errors found!" vueui/lint.log
- (cd vueui && npm run build)
- (num=`grep -E '\\\\(red|blue|green|black|b|i[^mc])' **/*.dm | wc -l`; echo "$num escapes (expecting ${MACRO_COUNT} or less)"; [ $num -eq ${MACRO_COUNT} ])
- (num=`grep -EIr '\\\\(he|him|his|she|hers|He|His|She|himself|herself)\b' code | wc -l`; echo "$num gender-based escapes (expecting ${GENDER_COUNT} or less)"; [ $num -eq ${GENDER_COUNT} ])
- (num=`grep -r --include \*.dm -oh to_world\( . | wc -w`; echo "$num to_worlds (expecting ${TO_WORLD_COUNT})"; [ $num -eq ${TO_WORLD_COUNT} ])
Expand Down
4 changes: 4 additions & 0 deletions .versions.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,7 @@ export BYOND_MINOR=1589
export RUST_G_VERSION=v1.2.0+a4
export FLYWAY_BUILD=9.9.0
export SPACEMAN_DMM_VERSION=suite-1.7.3

#node version
export NODE_VERSION=14
export NODE_VERSION_PRECISE=14.16.1
21 changes: 21 additions & 0 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"type": "byond",
"request": "launch",
"name": "Launch with build",
"preLaunchTask": "dm: build - aurorastation.dme",
"dmb": "${workspaceFolder}/${command:CurrentDMB}"
},
{
"type": "byond",
"request": "launch",
"name": "Launch WITHOUT BUILD",
"dmb": "${workspaceFolder}/${command:CurrentDMB}",
}
]
}
Loading

0 comments on commit 1b4a4c7

Please sign in to comment.