Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/cmss13-devs/cmss13 into a…
Browse files Browse the repository at this point in the history
…ccessory_removal_radial_menu
  • Loading branch information
AndroBetel committed May 26, 2024
2 parents ec98cb3 + 7c476f8 commit 4a05170
Show file tree
Hide file tree
Showing 586 changed files with 20,600 additions and 19,405 deletions.
Binary file added .github/assets/discord-dark.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added .github/assets/discord-light.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added .github/assets/docs-dark.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added .github/assets/docs-light.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added .github/assets/logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added .github/assets/website-dark.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added .github/assets/website-light.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added .github/assets/wiki-dark.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added .github/assets/wiki-light.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
3 changes: 2 additions & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"eslint.nodePath": "./tgui/.yarn/sdks",
"eslint.workingDirectories": ["./tgui"],
"prettier.prettierPath": "./tgui/.yarn/sdks/prettier/index.js",
"prettier.prettierPath": "./tgui/.yarn/sdks/prettier/index.cjs",
"typescript.tsdk": "./tgui/.yarn/sdks/typescript/lib",
"typescript.enablePromptUseWorkspaceTsdk": true,
"search.exclude": {
Expand All @@ -14,6 +14,7 @@
"files.eol": "\n",
"files.insertFinalNewline": true,
"gitlens.advanced.blame.customArguments": ["-w"],
"tgstationTestExplorer.project.resultsType": "json",
"[javascript]": {
"editor.rulers": [80],
"editor.defaultFormatter": "esbenp.prettier-vscode",
Expand Down
661 changes: 0 additions & 661 deletions LICENSE

This file was deleted.

File renamed without changes.
360 changes: 360 additions & 0 deletions LICENSE-CC-BY-NC-SA-3.0.txt

Large diffs are not rendered by default.

File renamed without changes.
122 changes: 85 additions & 37 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,37 +1,85 @@
## CM-SS13 codebase

<a href="https://www.monkeyuser.com/assets/images/2019/131-bug-free.png"><img src="https://img.shields.io/badge/Built_with-Resentment-orange?style=for-the-badge&labelColor=%23D47439&color=%23C36436" width=260px></a> <a href="https://user-images.githubusercontent.com/8171642/50290880-ffef5500-043a-11e9-8270-a2e5b697c86c.png"><img src="https://img.shields.io/badge/Contains-Technical_Debt-blue?style=for-the-badge&color=5598D0&labelColor=62C1EE" width=280px></a> [![forinfinityandbyond](https://user-images.githubusercontent.com/5211576/29499758-4efff304-85e6-11e7-8267-62919c3688a9.gif)](https://www.reddit.com/r/SS13/comments/5oplxp/what_is_the_main_problem_with_byond_as_an_engine/dclbu1a)

[![Build Status](https://github.com/cmss13-devs/cmss13/workflows/CI%20Suite/badge.svg)](https://github.com/cmss13-devs/cmss13/actions?query=workflow%3A%22CI+Suite%22)
* **Website:** https://forum.cm-ss13.com/
* **Code:** https://github.com/cmss13-devs/cmss13
* **Wiki:** https://cm-ss13.com/wiki/Main_Page

This is the codebase for the CM-SS13 flavoured fork of SpaceStation 13

Space Station 13 is a paranoia-laden round-based roleplaying game set against the backdrop of a nonsensical, metal death trap masquerading as a space station, with charming spritework designed to represent the sci-fi setting and its dangerous undertones. Have fun, and survive! CM-SS13 has wildly adapted this idea into a strategic roleplay-based team deathmatch game.

## :exclamation: How to compile :exclamation:

On **2022-04-06** we have changed the way to compile the codebase.

**The quick way**. Find `bin/server.cmd` in this folder and double click it to automatically build and host the server on port 1337.

**The long way**. Find `bin/build.cmd` in this folder, and double click it to initiate the build. It consists of multiple steps and might take around 1-5 minutes to compile. If it closes, it means it has finished its job. You can then set up the server normally by opening `colonialmarines.dmb` in DreamDaemon.

**Building colonialmarines in DreamMaker directly is now deprecated and might produce errors**, such as `'tgui.bundle.js': cannot find file`.

**[How to compile in VSCode and other build options](tools/build/README.md).**

## Contributors
[Guides for Contributors](.github/CONTRIBUTING.md)

[Setting up a Development Environment](https://cm-ss13.com/wiki/Guide_to_Git)

## LICENSE

The code for CM-SS13 is licensed under the [GNU Affero General Public License v3](http://www.gnu.org/licenses/agpl.html), which can be found in full in [/LICENSE-AGPL3](/LICENSE-AGPL3).

Assets including icons and sound are under the [Creative Commons 3.0 BY-SA license](https://creativecommons.org/licenses/by-sa/3.0/) unless otherwise indicated. Authorship for assets including art and sound under the CC BY-SA license is defined as the active development team of CM-SS13 unless stated otherwise (by author of the commit).

All code is assumed to be licensed under AGPL v3 unless stated otherwise by file header. Commits before 9a001bf520f889b434acd295253a1052420860af are assumed to be licensed under GPLv3 and can be used in closed source repo.
<p align="center">
<a href="#"><img src=".github/assets/logo.png" alt="CM-SS13" align="center"></a>
</p>
<hr />

<p align="center">
<a href="https://github.com/cmss13-devs/cmss13/actions?query=workflow%3A%22CI+Suite%22"><img src="https://github.com/cmss13-devs/cmss13/workflows/CI%20Suite/badge.svg"></a>
<a href="https://github.com/cmss13-devs/cmss13/actions/workflows/generate_documentation.yml"><img src="https://github.com/cmss13-devs/cmss13/actions/workflows/generate_documentation.yml/badge.svg"></a>
</p>

<p align="center">
<a href="https://www.monkeyuser.com/assets/images/2019/131-bug-free.png"><img src="https://img.shields.io/badge/Built_with-Resentment-orange?style=for-the-badge&labelColor=%23D47439&color=%23C36436" width=260px></a>
<a href="https://user-images.githubusercontent.com/8171642/50290880-ffef5500-043a-11e9-8270-a2e5b697c86c.png"><img src="https://img.shields.io/badge/Contains-Technical_Debt-blue?style=for-the-badge&color=5598D0&labelColor=62C1EE" width=280px></a>
<a href="https://www.reddit.com/r/SS13/comments/5oplxp/what_is_the_main_problem_with_byond_as_an_engine/dclbu1a"><img src="https://user-images.githubusercontent.com/5211576/29499758-4efff304-85e6-11e7-8267-62919c3688a9.gif"></a>
</p>

<p align="center">
<a href="https://discord.gg/cmss13">
<picture>
<source media="(prefers-color-scheme: dark)" srcset=".github/assets/discord-light.png">
<source media="(prefers-color-scheme: light)" srcset=".github/assets/discord-dark.png">
<img width="15%" alt="Discord" hspace="3%" src=".github/assets/discord-dark.png">
</picture>
</a>
<a href="https://docs.cm-ss13.com">
<picture>
<source media="(prefers-color-scheme: dark)" srcset=".github/assets/docs-light.png">
<source media="(prefers-color-scheme: light)" srcset=".github/assets/docs-dark.png">
<img alt="Code docs" width="15%" hspace="3%" src=".github/assets/docs-dark.png">
</picture>
</a>
<a href="https://cm-ss13.com">
<picture>
<source media="(prefers-color-scheme: dark)" srcset=".github/assets/website-light.png">
<source media="(prefers-color-scheme: light)" srcset=".github/assets/website-dark.png">
<img width="15%" alt="Website" hspace="3%" src=".github/assets/website-dark.png">
</picture>
</a>
<a href="https://cm-ss13.com/wiki">
<picture>
<source media="(prefers-color-scheme: dark)" srcset=".github/assets/wiki-light.png">
<source media="(prefers-color-scheme: light)" srcset=".github/assets/wiki-dark.png">
<img width="15%" alt="Game Wiki" hspace="3%" src=".github/assets/wiki-dark.png">
</picture>
</a>
</p>
<hr />

> [!IMPORTANT]
> CM-SS13 cannot be compiled exclusively using BYOND - **you must use our build tool**.
> Firstly, you need to install [BYOND](https://www.byond.com/download/), and run the `bin/server.cmd` file to start the server.
> You can learn more in our [Installation Guide](tools/build/README.md). **Building colonialmarines in DreamMaker directly is now deprecated and will cause errors.**
CM-SS13 is a game based on [Space Station 13](https://spacestation13.com), made in [BYOND](https://www.byond.com). CM-SS13 has wildly adapted the SS13 model into a strategic roleplay-based team deathmatch game.

# Useful Links

- ## [Setting up a Development Environment](https://cm-ss13.com/wiki/Guide_to_Git)
> [!TIP]
> Want to contribute for the first time but unsure where to start? Take a look at our community maintained [Guide to Contributing](https://cm-ss13.com/wiki/Contributing_to_the_Game)!
This guide will get you set up with a Visual Studio Code development environment, complete with BYOND debugger, which will allow you to contribute back to this repository.

- ## [Contributing Rules](.github/CONTRIBUTING.md)
This is our canonical, maintainer-maintained contributing guide, which contains information on our maintainer team structure and pull request rules.

- ## [Code Standards](github/guides/STANDARDS.md)
Our standards documents details how to structure your code to comply with CM-SS13 code standards, and provides some information on DreamMaker quirks.

- ## [Code Style](github/guides/STYLES.md)
The styles document tells you how to style your code to match the rest of the code in our codebase.

- ## [tgui README](tgui/README.md)
All new interfaces in CM must be created using tgui - this document will help get you set up for tgui development.

# Licenses

### <a href="LICENSE-AGPLv3.txt"><img src="https://img.shields.io/badge/licence-AGPL_3-red?style=for-the-badge" alt="AGPLv3 license"></a>
> The code for CM-SS13 is licensed under the [GNU Affero General Public License v3](http://www.gnu.org/licenses/agpl.html). All code is assumed to be licensed under AGPL v3 unless stated otherwise by file header, or this document.
### <a href="LICENSE-CC-BY-NC-SA-3.0.txt"><img src="https://img.shields.io/badge/licence-CC_3.0_BY--SA-lightblue?style=for-the-badge" alt="Creative Commons 3.0 BY-SA"></a>
> Assets including icons and sound are under the [Creative Commons 3.0 BY-SA license](https://creativecommons.org/licenses/by-sa/3.0/) unless otherwise indicated. Authorship for assets including art and sound under the CC BY-SA license is defined as the active development team of CM-SS13 unless stated otherwise (by author of the commit).
### <a href="LICENSE-GPLv3.txt"><img src="https://img.shields.io/badge/licence-GPL_3-orange?style=for-the-badge" alt="GPLv3 license"></a>
> Commits before [9a001bf520f889b434acd295253a1052420860af on Mon, 14 Sep 2020 09:13:32 +0000](https://github.com/cmss13-devs/cmss13/commit/9a001bf520f889b434acd295253a1052420860af) are assumed to be licensed under [GNU General Public License v3](https://www.gnu.org/licenses/gpl-3.0.html) and can be used in closed source repositories.
1 change: 1 addition & 0 deletions code/__DEFINES/client_prefs.dm
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
#define TOGGLE_START_JOIN_CURRENT_SLOT (1<<16) // Whether joining at roundstart ignores assigned character slot for the job and uses currently selected slot.
#define TOGGLE_LATE_JOIN_CURRENT_SLOT (1<<17) //Whether joining during the round ignores assigned character slot for the job and uses currently selected slot.
#define TOGGLE_ABILITY_DEACTIVATION_OFF (1<<18) // This toggles whether selecting the same ability again can toggle it off
#define TOGGLE_AMMO_DISPLAY_TYPE (1<<19)/// limit how often the ammo is displayed when using semi-automatic fire

#define JOB_SLOT_RANDOMISED_SLOT -1
#define JOB_SLOT_CURRENT_SLOT 0
Expand Down
1 change: 1 addition & 0 deletions code/__DEFINES/mode.dm
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@
#define ROUNDSTATUS_FOG_DOWN 1
#define ROUNDSTATUS_PODDOORS_OPEN 2

#define LATEJOIN_MARINES_PER_LATEJOIN_LARVA_EARLY 4
#define LATEJOIN_MARINES_PER_LATEJOIN_LARVA 2.5

//=================================================
Expand Down
6 changes: 6 additions & 0 deletions code/__DEFINES/tgui.dm
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,12 @@
"%7b%22type%22%3a%22[type]%22%2c%22payload%22%3a[url_encode(json_encode(payload))]%7d" \
)

/// Creates a message packet for sending via output() specifically for opening tgsay using an embedded winget
// This is {"type":"open","payload":{"channel":channel,"mapfocus":[[map.focus]]}}, but pre-encoded.
#define TGUI_CREATE_OPEN_MESSAGE(channel) ( \
"%7b%22type%22%3a%22open%22%2c%22payload%22%3a%7B%22channel%22%3a%22[channel]%22%2c%22mapfocus%22%3a\[\[map.focus\]\]%7d%7d" \
)

/*
*Defines for the TGUI health analyser interface
*The higher the level, the more information you can see
Expand Down
2 changes: 1 addition & 1 deletion code/__DEFINES/traits.dm
Original file line number Diff line number Diff line change
Expand Up @@ -267,7 +267,7 @@

#define TRAIT_GUN_BIPODDED "t_gun_bipodded"

#define TRAIT_GUN_LIGHT_DEACTIVATED "t_gun_light_deactivated"
#define TRAIT_GUN_LIGHT_FORCE_DEACTIVATED "t_gun_light_deactivated"

/// If this ID belongs to an ERT member
#define TRAIT_ERT_ID "ert_id"
Expand Down
15 changes: 9 additions & 6 deletions code/_onclick/adjacent.dm
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
* If you are diagonally adjacent, ensure you can pass through at least one of the mutually adjacent square.
* Passing through in this case ignores anything with the throwpass flag, such as tables, racks, and morgue trays.
*/
/turf/Adjacent(atom/neighbor, atom/target = null)
/turf/Adjacent(atom/neighbor, atom/target = null, list/ignore_list)
var/turf/T0 = get_turf(neighbor)
if(T0 == src)
return TRUE
Expand All @@ -34,22 +34,22 @@

if(T0.x == x || T0.y == y)
// Check for border blockages
return T0.ClickCross(get_dir(T0,src), border_only = 1) && src.ClickCross(get_dir(src,T0), border_only = 1, target_atom = target)
return T0.ClickCross(get_dir(T0,src), border_only = 1, ignore_list = ignore_list) && src.ClickCross(get_dir(src,T0), border_only = 1, target_atom = target, ignore_list = ignore_list)

// Not orthagonal
var/in_dir = get_dir(neighbor,src) // eg. northwest (1+8)
var/d1 = in_dir&(in_dir-1) // eg west (1+8)&(8) = 8
var/d2 = in_dir - d1 // eg north (1+8) - 8 = 1

for(var/d in list(d1,d2))
if(!T0.ClickCross(d, border_only = 1))
if(!T0.ClickCross(d, border_only = 1, ignore_list = ignore_list))
continue // could not leave T0 in that direction

var/turf/T1 = get_step(T0,d)
if(!T1 || T1.density || !T1.ClickCross(get_dir(T1,T0)|get_dir(T1,src), border_only = 0))
if(!T1 || T1.density || !T1.ClickCross(get_dir(T1,T0)|get_dir(T1,src), border_only = 0, ignore_list = ignore_list))
continue // couldn't enter or couldn't leave T1

if(!src.ClickCross(get_dir(src,T1), border_only = 1, target_atom = target))
if(!src.ClickCross(get_dir(src,T1), border_only = 1, target_atom = target, ignore_list = ignore_list))
continue // could not enter src

return TRUE // we don't care about our own density
Expand Down Expand Up @@ -131,8 +131,11 @@ Quick adjacency (to turf):
This is defined as any dense ON_BORDER object, or any dense object without throwpass.
The border_only flag allows you to not objects (for source and destination squares)
*/
/turf/proc/ClickCross(target_dir, border_only, target_atom = null)
/turf/proc/ClickCross(target_dir, border_only, target_atom = null, list/ignore_list)
for(var/obj/O in src)
if(O in ignore_list)
continue

if(!O.density || O == target_atom || O.throwpass)
continue // throwpass is used for anything you can click through

Expand Down
4 changes: 2 additions & 2 deletions code/_onclick/hud/rendering/plane_master_controller.dm
Original file line number Diff line number Diff line change
Expand Up @@ -51,11 +51,11 @@ INITIALIZE_IMMEDIATE(/atom/movable/plane_master_controller)
. += pm_iterator.get_filter(name)

///Transitions all filters owned by this plane master controller
/atom/movable/plane_master_controller/transition_filter(name, time, list/new_params, easing, loop)
/atom/movable/plane_master_controller/transition_filter(name, list/new_params, time, easing, loop)
. = ..()
for(var/i in controlled_planes)
var/atom/movable/screen/plane_master/pm_iterator = controlled_planes[i]
pm_iterator.transition_filter(name, time, new_params, easing, loop)
pm_iterator.transition_filter(name, new_params, time, easing, loop)


/atom/movable/plane_master_controller/game
Expand Down
Loading

0 comments on commit 4a05170

Please sign in to comment.