Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
Valtosin committed Apr 22, 2023
2 parents 9d90fa1 + 790c42a commit 1b9508b
Show file tree
Hide file tree
Showing 1,436 changed files with 54,766 additions and 136,103 deletions.
2 changes: 1 addition & 1 deletion +secret
80 changes: 3 additions & 77 deletions .github/CODE_GUIDELINES.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@
* Bitflags (`&`) - Write as `bitfield & bitflag`
* Use `'foo.ogg'` instead of `"foo.ogg"` for resources unless you need to build a string (e.g. `"foo_[rand(2)].ogg"`).
* Use `FALSE` and `TRUE` instead of `0` and `1` for booleans.
* Use `x in y` rather than `y.Find(x)` unless you need the index.
* Does not apply to regexes, of course.

# Syntax

Expand Down Expand Up @@ -277,83 +279,7 @@ proc/move_ghost_to_turf(mob/dead/ghost/target, turf/T)
```

## Flowchart: Check distances between things
```mermaid
%%{init: {'themeVariables': { 'fontSize': '26px'}}}%%
flowchart TD
root([I need to check something's distance to some other thing])
literal([I need the literal range value])
diag([Diagonal Moves Allowed])
tile([Tile-Based])
notile([Non-Tile-Based])
ndiag([Diagonal Moves Not Allowed])
adj([I need to check if two things are literally touching/directly adjacent])
touch([I need to check if a mob can touch something])
goto([I need to check if a mob go to a tile])
subgraph in_interact_range["in_interact_range(atom/target, mob/user)" - can i use a thing]
direction RL
IIR("Checks that a mob is in range to interact with a target.
Accounts for corner cases like telekinesis, silicon
machinery interactions, and bibles.")
end
subgraph GET_DIST["GET_DIST(atom/A, atom/B) - distance in tiles"]
direction RL
GD("Gets the distance in tiles between A and B.
The position of objects is equivalent to the position of
the turf the object is on, through any number of layers
(a pen in a bag on a person on a tile is calculated as being on the tile).
Different Z levels returns INFINITY.")
end
subgraph euclidean["Euclidean Distance - direct line distance"]
direction RL
subgraph euclidean_dist["GET_EUCLIDEAN_DIST"]
ED("The exact euclidean distance from A to B.")
end
subgraph squared_euclidean_dist["GET_SQUARED_EUCLIDEAN_DIST"]
SED("The squared euclidean distance sqrt(x^2 + y^2) from A to B.<br>Avoids a square root which saves on performance,<br>so this should be used if possible (such as if you're<br>calculating a ratio of squared distances).<br>Different Z levels returns INFINITY.")
end
end
subgraph manhattan["GET_MANHATTAN_DIST(A, B) - distance in city blocks"]
direction RL
MAN("The exact manhattan distance from A to B.")
end
subgraph BOUNDS_DIST["BOUNDS_DIST(atom/A, atom/B) - distance in pixels"]
direction RL
BD("Wrapper around BYOND's 'bounds_dist' built-in proc.
Returns the number of pixels A would have to move to be touching B,
Returning a negative value if they are already overlapping.
We don't ordinarily care about pixel distances, so this should
only be used to check adjacency.
Notably, functions fine for large (2x2 tile, 3x3 tile, etc) objects.")
subgraph bounds_dist_notouch["BOUNDS_DIST(A, B) > 0"]
BDNT("returns TRUE if A and B are not adjacent or overlapping.")
end
subgraph bounds_dist_touch["BOUNDS_DIST(A, B) == 0"]
BDT("returns TRUE if A and B are adjacent or overlapping.")
end
end
subgraph pathfind["get_path_to(atom/movable/mover, atom/target, ...optional args)" - can i go somewhere]
direction RL
PA("Attempts to pathfind a mover to the turf the target(s) is on.
Returns a list of turfs from the caller to the target or
a list of lists of the former if multiple targets are specified.
If no paths were found, returns an empty list.")
end

root ------> literal
literal --> tile
tile --> diag
diag --> GET_DIST
tile --> ndiag
ndiag --> manhattan
literal --> notile
notile ---> euclidean
root --> adj
adj ---> BOUNDS_DIST
root --> touch
touch --> in_interact_range
root --> goto
goto ----> pathfind
```
![](https://mermaid.ink/img/pako:eNqVV21vGkcQ_iujkyxAxU7lSP1gNZYguClSQlobN0pNg5a7BTY-dvHunjG1_N_7zN4bbw0JH-DYm5l9duaZl32OYpPI6CI6OXlWWvkLem74uVzIv4RVYpJK18ASNaZG-xv1r8S_xvkvy6fGy8vLyclIT1OziufCehr2Rprwscb45l2ftJQJeUPxXMb35MxC-rnSs4ajRDkvdCz5La-TwY6Wwut_WrmVVHlpRVobmstyjazQM0mPIs1kKZ4oMWve9fBtNCQ-mEfpqJMCnExKGa9S2bwb4v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zjoBdUp5eiok_tt6VYBUhO3c7g_scnFd2jTlgLBfjXENbrL3aboDFyCr_zHvU8i4O1kji_GjjsYxUVfD4x0CdGHp2xb_PjCtZTCa4TujEiX7F9IlBft69_-tpvsoekbg2jHqj6Wt0b7hDJL0-vrO6ndqUImb53usswNYFw7HnYo9KF8IWS6PqrlP4ZIPR6BVLhTdTix9cy9gWFNGBSj62qqYXKRFOG32YL96sssWghVZ_DSNqhSk83BwXgHn4Llym1qS5i4NIk7e8q1zuaGUPPQYedZtO2HlQ7bqhGAWPEzjuq8ElJeAaE2kC5KSfopW5Js3dO-zb_tUglbUh5yc4JeIFqLoh-CJegg2Hk6wMEU1sLU1jauX77qKJsqN2KGis0HyD_YZg3KNMm6le447zZ3_ZEQdguReM1WZnNNUQI_N90J7mchHd48sEYiraru-5fIfWZ9tXr-__d--XhPuSZ044ULn8DyqI_fki4eZPj2TQpS5iCML0ZpC8xP-Qz3kKMtcoAfn99vAffxtVzQjcobtGFcoTozI07o9H1M3drkhZ86WY-SZLsHdv3x7374-X4z4iyR5gkD-NclzoxxGWj44mhLbpu8Zt1X-tjFOKJEBRu_IjXeCt1S9lK2KUq_zOeQ5fyWWVy817RQqvSfTpV0r0iaLvG1qu7f7CfXvbRaOxMhZH4-R4CaQLktIkh53yXKZfMDtcjNpvKYImiBbtcgRVjRWh6bxFn8Md7wCJG90WPK9Ek_zTUjasfvADPTf9KnZK5gOaEG_6teZMNG0qZ0uf6BwXu0scop-sf5Aiwv14TTsSqQrGbrp4utioz3oyvSYXUlHj7Q361MRUHxPuJ-I9kWTO6J3uBfPpa6DzBvUVjnUn65SYkxVqsg0KWQooy7MGfaOMpk3-E4usMjrphjbIa3rltXeVrexnkmu3WkW80yY6n11Xqg6YZ6qNbnmwZXYdfYu90K1R1AvNUQpF6SH9vyD_Nnz-Aqqx9s0?bgColor=5B5F67)
Expand Down
4 changes: 3 additions & 1 deletion .github/DEV_GUIDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,9 @@ Help and support is *not offered whatsoever* if you skip portions of the guide.

### Step 1: Downloading Visual Studio Code :arrow_down:

Visual Studio Code is a free program you can use to edit and manage your code, as well as connect with GitHub to publish it. You can also use BYOND's built-in DreamMaker software to edit, though you'll probably still find VS Code useful.
#### ***No, Visual Studio is not the same thing as Visual Studio Code - the icon should be blue and the UI should look like below. Only VSCode will work and be supported.***

Visual Studio Code (VSCode/VSC) is a free program you can use to edit and manage your code, as well as connect with GitHub to publish it. You can also use BYOND's built-in DreamMaker software to edit, though you'll probably still find VSCode useful.

Visit https://code.visualstudio.com/ to download the appropriate installation for your operating system. Then, run the installer.

Expand Down
35 changes: 25 additions & 10 deletions .github/workflows/automaton.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Automaton, a beepsky supplement for checking runtime violations in maps
# Automaton, a beepsky supplement for checking runtime violations in maps and much more
# Based on Turdis by Yogstation

name: Automaton
Expand All @@ -14,7 +14,7 @@ jobs:

runtime:
name: Runtime Checker
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04
if: "!contains(github.event.head_commit.message, 'skip ci')"
strategy:
fail-fast: false
Expand All @@ -27,9 +27,14 @@ jobs:
- name: Install Dependencies
run: |
sudo dpkg --add-architecture i386
sudo sed -i 's/azure\.//' /etc/apt/sources.list
sudo sed -i'' -E 's/^(deb|deb-src) http:\/\/(azure.archive|security).ubuntu.com/\1 [arch=amd64,i386] http:\/\/\2.ubuntu.com/' /etc/apt/sources.list
sudo apt-get update
sudo apt install -o Acquire::Retries=3 libstdc++6:i386 libssl1.1:i386
- name: Fetch cached i386 packages
uses: awalsh128/cache-apt-pkgs-action@v1
with:
packages: libstdc++6:i386 libssl-dev:i386
version: automaton

- name: Cache BYOND
uses: actions/cache@v3
Expand Down Expand Up @@ -84,13 +89,13 @@ jobs:
runtime_full:
name: "Runtime Checker with Secret Submodule"
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04
if: |
((github.event_name == 'push' && github.repository == 'goonstation/goonstation') || (github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name == 'goonstation/goonstation')) && !contains(github.event.head_commit.message, 'skip ci')
strategy:
fail-fast: false
matrix:
map: ["COGMAP", "COGMAP2", "CLARION", "DESTINY", "DONUT3", "DONUT2", "OSHAN", "KONDARU", "NADIR", "ATLAS", "SPACE_PREFAB", "UNDERWATER_PREFAB", "FULL"]
map: ["COGMAP", "COGMAP2", "CLARION", "DONUT3", "DONUT2", "OSHAN", "KONDARU", "NADIR", "ATLAS", "SPACE_PREFAB", "UNDERWATER_PREFAB", "FULL"]
compiletype: ["default"]

steps:
Expand All @@ -102,9 +107,14 @@ jobs:
- name: Install Dependencies
run: |
sudo dpkg --add-architecture i386
sudo sed -i 's/azure\.//' /etc/apt/sources.list
sudo sed -i'' -E 's/^(deb|deb-src) http:\/\/(azure.archive|security).ubuntu.com/\1 [arch=amd64,i386] http:\/\/\2.ubuntu.com/' /etc/apt/sources.list
sudo apt-get update
sudo apt install -o Acquire::Retries=3 libstdc++6:i386 libssl1.1:i386
- name: Fetch cached i386 packages
uses: awalsh128/cache-apt-pkgs-action@v1
with:
packages: libstdc++6:i386 libssl-dev:i386
version: automaton

- name: Cache BYOND
uses: actions/cache@v3
Expand Down Expand Up @@ -159,7 +169,7 @@ jobs:
unit_test:
name: Unit Tests
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04
if: "!contains(github.event.head_commit.message, 'skip ci')"
steps:
- uses: actions/checkout@v3
Expand All @@ -169,7 +179,12 @@ jobs:
sudo dpkg --add-architecture i386
sudo sed -i 's/azure\.//' /etc/apt/sources.list
sudo apt-get update
sudo apt install -o Acquire::Retries=3 libstdc++6:i386 libssl1.1:i386
- name: Fetch cached i386 packages
uses: awalsh128/cache-apt-pkgs-action@v1
with:
packages: libstdc++6:i386 libssl-dev:i386
version: automaton

- name: Cache BYOND
uses: actions/cache@v3
Expand Down
28 changes: 19 additions & 9 deletions .github/workflows/beepsky.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ on:
jobs:
lint:
name: Run Linters
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04
if: "!contains(github.event.head_commit.message, 'skip ci')"
steps:
- uses: actions/checkout@v3
Expand Down Expand Up @@ -49,17 +49,22 @@ jobs:
compile:
name: Compile
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04
if: "!contains(github.event.head_commit.message, 'skip ci')"
steps:
- uses: actions/checkout@v3

- name: Install Dependencies
- name: Install i386 Architecture
run: |
sudo dpkg --add-architecture i386
sudo sed -i 's/azure\.//' /etc/apt/sources.list
sudo sed -i'' -E 's/^(deb|deb-src) http:\/\/(azure.archive|security).ubuntu.com/\1 [arch=amd64,i386] http:\/\/\2.ubuntu.com/' /etc/apt/sources.list
sudo apt-get update
sudo apt install -o Acquire::Retries=3 libstdc++6:i386
- name: Fetch cached i386 packages
uses: awalsh128/cache-apt-pkgs-action@v1
with:
packages: libstdc++6:i386
version: beepsky

- name: Cache BYOND
uses: actions/cache@v3
Expand Down Expand Up @@ -96,7 +101,7 @@ jobs:

compile_full:
name: "Compile and Lint with Secret Submodule"
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04
if: |
((github.event_name == 'push' && github.repository == 'goonstation/goonstation') || (github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name == 'goonstation/goonstation')) && !contains(github.event.head_commit.message, 'skip ci')
steps:
Expand All @@ -105,12 +110,17 @@ jobs:
submodules: true
token: '${{ secrets.ROBUDDYBOT_PAT }}'

- name: Install Dependencies
- name: Install i386 Architecture
run: |
sudo dpkg --add-architecture i386
sudo sed -i 's/azure\.//' /etc/apt/sources.list
sudo sed -i'' -E 's/^(deb|deb-src) http:\/\/(azure.archive|security).ubuntu.com/\1 [arch=amd64,i386] http:\/\/\2.ubuntu.com/' /etc/apt/sources.list
sudo apt-get update
sudo apt install -o Acquire::Retries=3 libstdc++6:i386
- name: Fetch cached i386 packages
uses: awalsh128/cache-apt-pkgs-action@v1
with:
packages: libstdc++6:i386
version: beepsky

- name: Cache BYOND
uses: actions/cache@v3
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/merge_conflict_labeler.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@ jobs:
runs-on: ubuntu-latest
if: github.repository == 'goonstation/goonstation'
steps:
- uses: prince-chrismc/label-merge-conflicts-action@v3
- uses: goonstation/label-merge-conflicts-action@v3-G
with:
CONFLICT_LABEL_NAME: "S-Merge-Conflict"
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
MAX_RETRIES: 12
WAIT_MS: 8008
MAX_RETRIES: 8
WAIT_MS: 9000
conflict_comment: ''
2 changes: 1 addition & 1 deletion .github/workflows/merge_upstream.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ on:
jobs:
merge-upstream:
if: ${{ github.event.issue.pull_request && github.event.comment.body == '!merge_upstream' }}
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04
steps:

- name: PR Data
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/stale.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
days-before-pr-stale: 14
days-before-pr-close: 7
stale-pr-label: 'S-Stale'
exempt-pr-labels: 'E-Certified-Organic,E-Contest'
exempt-pr-labels: 'E-Certified-Organic,E-Contest,S-Testmerged'

close-issue-message: "This issue has been marked as 'Needs Reproducing' for a month, and is being closed automatically. If you find a way to reproduce this bug, make another issue with more detailed reproduction steps."
days-before-issue-stale: -1
Expand Down
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ cfg/admin.txt

# Build files
/_stdlib/__build.dm
/testmerges/
/testmerges
z_build_opts.dm

# Pre-processor related
Expand Down
Loading

0 comments on commit 1b9508b

Please sign in to comment.