Skip to content

Commit

Permalink
Revert "Merge branch 'master' of https://github.com/PvE-CMSS13/PvE-CM…
Browse files Browse the repository at this point in the history
…SS13 into conscripts-gone"

This reverts commit 9136358, reversing
changes made to 3089b4e.
  • Loading branch information
AmoryBlaine committed Sep 13, 2024
1 parent 9136358 commit 36660a0
Show file tree
Hide file tree
Showing 2,307 changed files with 905,548 additions and 792,615 deletions.
6 changes: 0 additions & 6 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
Expand Up @@ -24,14 +24,8 @@
/tools/docker/ @Fira
/Dockerfile @Fira

# Nanu

/maps @Nanu308

# Zonespace

/code/datums/tutorial/ @Zonespace27
/code/modules/admin/verbs/SDQL2/ @Zonespace27
/maps/tutorial/ @Zonespace27

# MULTIPLE OWNERS
15 changes: 4 additions & 11 deletions .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -159,10 +159,6 @@ There is no strict process when it comes to merging pull requests. Pull requests

* After leaving reviews on an open pull request, maintainers should convert it to a draft. Once you have addressed all their comments to the best of your ability, feel free to mark the pull as `Ready for Review` again.

* We ask that you refrain from pinging staff about getting your pull request reviewed until after it is automatically marked stale pending review. If it ends up stale exempt, give it a week, but usually this situation will be explained such as when a relevant maintainer is currently unavailable.

* Whenever sprites are added, please include screenshots or video(s) of them in game in the pull request description.

### A note on balance impacting PRs

Certain PRs, such as those which directly change number values (i.e. health, recoil, damage) or add large pieces of content to the game (i.e. a new gun, a new dropship weapon, or a new xeno structure) can have the potential to highly impact game balance or gameflow.
Expand All @@ -178,7 +174,7 @@ If you are porting features/tools from other codebases, you must give them credi
Regarding sprites & sounds, you must credit the artist and possibly the codebase.

## Things you can work on
The following list is non-exhaustive, but should give you a good idea of what we would like to see in Pull Requests.
The following list is non-exhaustive, but should give you a good idea of what the dev team would like to see in Pull Requests.

### Spriting

Expand All @@ -203,7 +199,7 @@ The following list is non-exhaustive, but should give you a good idea of what we
- Bug fixes and inconsistency fixes

**A note on new maps.**
Entirely new maps are generally considered to be stepping stones into the maintainers’ mapping dept. proper. However, making a new map is a months long process that requires dedication and constant communication and oversight from mappers on the Maintainer team. Mapping, like spriting and coding is an acquired skill, and it is highly likely your first map is going to suck. Maps are fluid entities that are never absolutely complete, don’t wed yourself to your initial layout, always be prepared to remap half the project when going in.
Entirely new maps are generally considered to be stepping stones into the Development team’s mapping dept. proper. However, making a new map is a months long process that requires dedication and constant communication and oversight from mappers on the Maintainer team. Mapping, like spriting and coding is an acquired skill, and it is highly likely your first map is going to suck. Maps are fluid entities that are never absolutely complete, don’t wed yourself to your initial layout, always be prepared to remap half the project when going in.


### Coding
Expand All @@ -220,7 +216,7 @@ Entirely new maps are generally considered to be stepping stones into the mainta
- New TGUI

## What we don't want
The following list is non-exhaustive, but should give you a good idea of what we don't want to see in Pull Requests.
The following list is non-exhaustive, but should give you a good idea of what the dev team don't want to see in Pull Requests.

### Spriting
- Resprites of recently updated content, such as uniforms, guns, marine armor
Expand All @@ -240,10 +236,7 @@ The following list is non-exhaustive, but should give you a good idea of what we
- Player-facing HTML UIs
- Prior denied content/PRs (without approval)

### Frozen
- See pinned [issues](https://github.com/cmss13-devs/cmss13/issues) for anything that requires explicit permission.

Remember that the list is not exhaustive. And you can freely contribute an PR with content that can be shuffled into the “What we don’t want” category, and still get it merged. It is just unlikely without prior talk/approval from a maintainer.
Remember that the following lists are not exhaustive. And you can freely contribute an PR with content that can be shuffled into the “What we don’t want” category, and still get it merged. It is just unlikely without prior talk/approval from a maintainer.

## Banned content
Do not add any of the following in a Pull Request or risk getting the PR closed:
Expand Down
3 changes: 0 additions & 3 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,6 @@ Remember: something that is self-evident to you might not be to others. Explain

# Testing Photographs and Procedure
<!-- Include any screenshots/videos/debugging steps of the modified code functioning successfully, ideally including edge cases. -->

<!-- !! If you are modifying sprites, you **must** include one or more in-game screenshots or videos of the new sprites. !! -->

<details>
<summary>Screenshots & Videos</summary>

Expand Down
158 changes: 70 additions & 88 deletions .github/add_labels.py
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
import os, re
from github import Github, GithubException
from github import Github

# Format - Key: Array[Label, [StringsToIgnore]]
changelogToPrefix = {
'fix': ["Fix", ["fixed a few things"]],
'qol': ["Quality of Life", ["made something easier to use"]],
'add': ["Feature", ["Added new mechanics or gameplay changes", "Added more things"]],
'del': ["Removal", ["Removed old things"]],
'spellcheck': ["Grammar and Formatting", ["fixed a few typos"]],
'balance': ["Balance", ["rebalanced something"]],
'code': ["Code Improvement", ["changed some code"]],
'refactor': ["Refactor", ["refactored some code"]],
'config': ["Config", ["changed some config setting"]],
'admin': ["Admin", ["messed with admin stuff"]],
'server': ["Server", ["something server ops should know"]],
'fix': ["Fix", ["fixed a few things"]],
'qol': ["Quality of Life", ["made something easier to use"]],
'add': ["Feature", ["Added new mechanics or gameplay changes", "Added more things"]],
'del': ["Removal", ["Removed old things"]],
'spellcheck': ["Grammar and Formatting", ["fixed a few typos"]],
'balance': ["Balance", ["rebalanced something"]],
'code': ["Code Improvement", ["changed some code"]],
'refactor': ["Refactor", ["refactored some code"]],
'config': ["Config", ["changed some config setting"]],
'admin': ["Admin", ["messed with admin stuff"]],
'server': ["Server", ["something server ops should know"]],
'soundadd': ["Sound", ["added a new sound thingy"]],
'sounddel': ["Sound", ["removed an old sound thingy"]],
'imageadd': ["Sprites", ["added some icons and images"]],
Expand All @@ -24,96 +24,78 @@
}

fileToPrefix = {
'wav': 'Sound',
'ogg': 'Sound',
'wav': 'Sound',
'ogg': 'Sound',
'mp3': 'Sound', ## Can't believe they forgot about the best sound format
'dmm': 'Mapping',
'dmm': 'Mapping',

'js': 'UI',
'tsx': 'UI',
'ts': 'UI',
'jsx': 'UI',
'scss': 'UI',
'js': 'UI',
'tsx': 'UI',
'ts': 'UI',
'jsx': 'UI',
'scss': 'UI',

'dmi': "Sprites",
'dmi': "Sprites",
}

githubLabel = "Github"
missingLogLabel = "Missing Changelog"

def get_labels(pr):
labels = {}
failed = False

files = pr.get_files()
for file in files:
prefix = file.filename.split(".")[-1]
if file.filename.startswith(".github"):
labels[githubLabel] = True
if not prefix in fileToPrefix:
continue
labels[fileToPrefix[prefix]] = True

changelog_match = re.search(r"🆑(.*)/🆑", pr.body, re.S | re.M)
if changelog_match is None:
changelog_match = re.search(r":cl:(.*)/:cl:", pr.body, re.S | re.M)
if changelog_match is None:
print("::warning ::No changelog detected.")
labels[missingLogLabel] = True
return labels, False

lines = changelog_match.group(1).split('\n')
failed = len(lines) <= 2 # Make sure its not an empty changelog
if failed:
print("::error ::Empty changelog.")

for line in lines[1:-1]: # Skip first line with authors and last
line = line.strip()
if not line:
continue

contentSplit = line.split(":")

key = contentSplit.pop(0).strip()
content = ":".join(contentSplit).strip()

if not key in changelogToPrefix: # Some key that we didn't expect
print(f"::error ::Invalid changelog entry: {line}")
failed = True
continue

if content in changelogToPrefix[key][1]: # They left the template entry in
print(f"::error ::Invalid changelog entry: {line}")
failed = True
continue

labels[changelogToPrefix[key][0]] = True

return list(labels), failed
labels = {}

files = pr.get_files()
for file in files:
prefix = file.filename.split(".")[-1]
if file.filename.startswith(".github"):
labels[githubLabel] = True
if not prefix in fileToPrefix:
continue
labels[fileToPrefix[prefix]] = True

changelog_match = re.search(r"🆑(.*)/🆑", pr.body, re.S | re.M)
if changelog_match is None:
changelog_match = re.search(r":cl:(.*)/:cl:", pr.body, re.S | re.M)
if changelog_match is None:
return labels
lines = changelog_match.group(1).split('\n')
for line in lines:
line = line.strip()
if not line:
continue

contentSplit = line.split(":")

key = contentSplit.pop(0).strip()
content = ":".join(contentSplit).strip()

if not key in changelogToPrefix:
continue

if content in changelogToPrefix[key][1]:
continue

labels[changelogToPrefix[key][0]] = True

return list(labels)

def main():
g = Github(os.environ["TOKEN"])
repo = g.get_repo(os.environ['REPO'])
g = Github(os.environ["TOKEN"])
repo = g.get_repo(os.environ['REPO'])

pr = repo.get_pull(int(os.environ["PR_NUMBER"]))
if not pr:
print("::warning ::Not a PR.")
return
pr = repo.get_pull(int(os.environ["PR_NUMBER"]))
if not pr:
print("Not a PR.")
return

labels, failed = get_labels(pr)
labels = get_labels(pr)

if not missingLogLabel in labels:
try:
pr.remove_from_labels(missingLogLabel)
except GithubException as e:
if e.status == 404:
pass # 404 if we try to remove a label that isn't set
if labels is None: # no labels to add
print("No labels to add.")
return

for label in labels:
pr.add_to_labels(label)
for label in labels:
pr.add_to_labels(label)

if failed:
exit(1)

if __name__ == '__main__':
main()
main()
Binary file removed .github/assets/discord-dark.png
Binary file not shown.
Binary file removed .github/assets/discord-light.png
Binary file not shown.
Binary file removed .github/assets/docs-dark.png
Binary file not shown.
Binary file removed .github/assets/docs-light.png
Binary file not shown.
Binary file removed .github/assets/logo.png
Binary file not shown.
Binary file removed .github/assets/website-dark.png
Binary file not shown.
Binary file removed .github/assets/website-light.png
Binary file not shown.
Binary file removed .github/assets/wiki-dark.png
Binary file not shown.
Binary file removed .github/assets/wiki-light.png
Binary file not shown.
8 changes: 4 additions & 4 deletions .github/guides/AUTODOC.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
# dmdoc
[DOCUMENTATION]: https://docs.cm-ss13.com/
[DOCUMENTATION]: **PUT DOCUMENTATION LINK HERE**

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

[DMDOC]: https://github.com/SpaceManiac/SpacemanDMM/tree/master/crates/dmdoc
[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 @@ -13,9 +13,9 @@ We use **dmdoc** to generate [DOCUMENTATION] for our code, and that documentatio
is automatically generated and built on every new commit to the master branch

This gives new developers a clickable reference [DOCUMENTATION] they can browse to better help
gain understanding of the CM-SS13 codebase structure and api reference.
gain understanding of the /tg/station codebase structure and api reference.

## Documenting code on CM-SS13
## Documenting code on /tg/station
We use block comments to document procs and classes, and we use `///` line comments
when documenting individual variables.

Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/labeler.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: Labeling and Verification
name: Labeling
on:
pull_request_target:
types: [opened, reopened, synchronize, edited]
types: [opened]
jobs:
label:
runs-on: ubuntu-latest
Expand All @@ -13,7 +13,7 @@ jobs:
run: |
unset SECRET_EXISTS
if [ -n "$ENABLER_SECRET" ]; then SECRET_EXISTS=true ; fi
echo "ACTIONS_ENABLED=$SECRET_EXISTS" >> $GITHUB_OUTPUT
echo "::set-output name=ACTIONS_ENABLED::$SECRET_EXISTS"
- name: Get The Script
if: steps.value_holder.outputs.ACTIONS_ENABLED
run: |
Expand All @@ -29,7 +29,7 @@ jobs:
python -m pip install --upgrade pip
python -m pip install pygithub
sudo apt-get install dos2unix
- name: Add and verify labels
- name: Add Labels
if: steps.value_holder.outputs.ACTIONS_ENABLED
run: |
python add_labels.py
Expand Down
13 changes: 0 additions & 13 deletions .vscode/tasks.json
Original file line number Diff line number Diff line change
Expand Up @@ -89,19 +89,6 @@
],
"group": "build",
"label": "tgui: sonar"
},
{
"type": "shell",
"command": "bin/tgfont",
"windows": {
"command": ".\\bin\\tgfont.cmd"
},
"problemMatcher": [
"$tsc",
"$eslint-stylish"
],
"group": "build",
"label": "tgui: rebuild tgfont"
}
]
}
Loading

0 comments on commit 36660a0

Please sign in to comment.