Skip to content

Commit

Permalink
Merge branch 'master' into uno-boat
Browse files Browse the repository at this point in the history
  • Loading branch information
harryob authored May 26, 2024
2 parents a3fef62 + 1ac626a commit 0398be6
Show file tree
Hide file tree
Showing 59 changed files with 738 additions and 946 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.
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.
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
8 changes: 4 additions & 4 deletions code/datums/ammo/bullet/sniper.dm
Original file line number Diff line number Diff line change
Expand Up @@ -132,10 +132,10 @@
old_target = amr.focused_fire_target

if(target_mob == (amr.focused_fire_target?.resolve()))
if(amr.focused_fire_counter < 2) // Can stack up to twice.
if(amr.focused_fire_counter < 3) // Can stack up to twice.
amr.focused_fire_counter += 1
else
amr.focused_fire_counter = 2
amr.focused_fire_counter = 0
else // If it's a new target
amr.focused_fire_counter = 0 // Stacks to 0
if(human_firer && !(target_mob.is_dead()))
Expand All @@ -144,7 +144,7 @@
human_firer.focused_fire_marker = focused_fire_marker_temp // Store new marker ref
human_firer.client?.images += focused_fire_marker_temp // Add new marker

amr_counter = amr.focused_fire_counter + 1
amr_counter = min(amr.focused_fire_counter + 1, 3)
amr.focused_fire_target = WEAKREF(target_mob)

var/size_damage_mod = 0.8 // 1.8x vs Non-Xenos (225)
Expand Down Expand Up @@ -194,7 +194,7 @@
if(2)
to_chat(aimed_projectile.firer, SPAN_WARNING("Two hits! You're starting to get a good read on the target's patterns."))
if(3)
to_chat(aimed_projectile.firer, SPAN_WARNING("Bullseye! You're fully focused on the target."))
to_chat(aimed_projectile.firer, SPAN_WARNING("Bullseye! You're fully focused on the target. You notice they are starting to change their patterns."))
else
to_chat(aimed_projectile.firer, SPAN_WARNING("Bullseye!"))
else
Expand Down
5 changes: 5 additions & 0 deletions code/datums/ammo/misc.dm
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,8 @@
/datum/ammo/flamethrower/tank_flamer
flamer_reagent_id = "napalmx"

max_range = 8

/datum/ammo/flamethrower/sentry_flamer
flags_ammo_behavior = AMMO_IGNORE_ARMOR|AMMO_IGNORE_COVER|AMMO_FLAME
flamer_reagent_id = "napalmx"
Expand Down Expand Up @@ -267,6 +269,9 @@
nade_type = /obj/item/explosive/grenade/smokebomb
icon_state = "smoke_shell"

/datum/ammo/grenade_container/tank_glauncher
max_range = 8

/datum/ammo/hugger_container
name = "hugger shell"
ping = null
Expand Down
2 changes: 2 additions & 0 deletions code/datums/ammo/rocket.dm
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,8 @@
return
return ..()

/datum/ammo/rocket/ap/tank_towlauncher
max_range = 8

/datum/ammo/rocket/ltb
name = "cannon round"
Expand Down
4 changes: 4 additions & 0 deletions code/game/area/shiva.dm
Original file line number Diff line number Diff line change
Expand Up @@ -262,3 +262,7 @@
/area/shiva/interior/lz2_habs
name = "Shiva's Snowball - Argentinian Research Headquarters"
icon_state = "bar1"

/area/shiva/interior/aux_power
name = "Shiva's Snowball - Auxiliary Generator Station"
icon_state = "hangars0"
7 changes: 3 additions & 4 deletions code/game/machinery/kitchen/gibber.dm
Original file line number Diff line number Diff line change
Expand Up @@ -262,13 +262,12 @@
occupant.death(create_cause_data("gibber", user), TRUE)
occupant.ghostize()

addtimer(CALLBACK(src, PROC_REF(create_gibs), totalslabs, allmeat), gibtime)
if(synthetic)
to_chat(occupant, SPAN_HIGHDANGER("You can detect your limbs being ripped off your body, but it begins to malfunction as it reaches your torso!"))
addtimer(CALLBACK(src, PROC_REF(create_gibs), totalslabs, allmeat), gibtime)
addtimer(CALLBACK(src, PROC_REF(go_out), TRUE), gibtime)
return

QDEL_NULL(occupant)
else
QDEL_NULL(occupant)

/obj/structure/machinery/gibber/proc/create_gibs(totalslabs, list/obj/item/reagent_container/food/snacks/allmeat)
playsound(loc, 'sound/effects/splat.ogg', 25, 1)
Expand Down
40 changes: 33 additions & 7 deletions code/game/machinery/sentry_holder.dm
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
var/ox = 0
var/oy = 0
var/require_red_alert = FALSE
var/base_icon_state = "sentry_system"

/obj/structure/machinery/sentry_holder/Initialize()
. = ..()
Expand Down Expand Up @@ -76,13 +77,14 @@
deployment_cooldown = world.time + 50
deployed_turret.turned_on = TRUE
deployed_turret.forceMove(loc)
icon_state = "sentry_system_deployed"
icon_state = "[base_icon_state]_deployed"

for(var/mob/M in deployed_turret.loc)
if(deployed_turret.loc == src.loc)
step(M, deployed_turret.dir)
else
step(M, get_dir(src,deployed_turret))
if(deployed_turret.density)
for(var/mob/blocking_mob in deployed_turret.loc)
if(deployed_turret.loc == loc)
step(blocking_mob, deployed_turret.dir)
else
step(blocking_mob, get_dir(src, deployed_turret))

deployed_turret.setDir(dir)
deployed_turret.pixel_x = 0
Expand All @@ -103,7 +105,7 @@
deployed_turret.unset_range()
pixel_x = ox
pixel_y = oy
icon_state = "sentry_system_installed"
icon_state = "[base_icon_state]_installed"

/obj/structure/machinery/sentry_holder/Destroy()
QDEL_NULL(deployed_turret)
Expand All @@ -115,5 +117,29 @@
turret_path = /obj/structure/machinery/defenses/sentry/premade/deployable/colony

/obj/structure/machinery/sentry_holder/almayer
icon_state = "floor_sentry_installed"
turret_path = /obj/structure/machinery/defenses/sentry/premade/deployable/almayer
base_icon_state = "floor_sentry"
require_red_alert = TRUE

/obj/structure/machinery/sentry_holder/almayer/mini
turret_path = /obj/structure/machinery/defenses/sentry/premade/deployable/almayer/mini

/obj/structure/machinery/sentry_holder/almayer/mini/aicore

/obj/structure/machinery/sentry_holder/almayer/mini/aicore/Initialize()
. = ..()
RegisterSignal(SSdcs, COMSIG_GLOB_AICORE_LOCKDOWN, PROC_REF(auto_deploy))
RegisterSignal(SSdcs, COMSIG_GLOB_AICORE_LIFT, PROC_REF(undeploy_sentry))

/obj/structure/machinery/sentry_holder/almayer/mini/aicore/proc/auto_deploy()
if(deployed_turret.loc == src) //not deployed
if(stat & NOPOWER)
return FALSE

deploy_sentry()
return TRUE

/obj/structure/machinery/sentry_holder/almayer/mini/aicore/attack_hand(mob/user)
to_chat(user, SPAN_WARNING("[src] can only be deployed remotely."))
return
1 change: 1 addition & 0 deletions code/game/machinery/vending/vendor_types/crew/synthetic.dm
Original file line number Diff line number Diff line change
Expand Up @@ -387,4 +387,5 @@ GLOBAL_LIST_INIT(cm_vending_synth_tools, list(
/obj/item/weapon/gun/smg/nailgun/compact,
/obj/item/ammo_magazine/smg/nailgun,
/obj/item/ammo_magazine/smg/nailgun,
/obj/item/storage/belt/gun/m4a3/nailgun,
)
16 changes: 16 additions & 0 deletions code/game/objects/items/storage/belt.dm
Original file line number Diff line number Diff line change
Expand Up @@ -1209,6 +1209,22 @@
for(var/i = 1 to storage_slots - 1)
new /obj/item/ammo_magazine/pistol/highpower/black(src)

/obj/item/storage/belt/gun/m4a3/nailgun
name = "customized nailgun holster"
desc = "Combination of a M276 pistol holster and engineering toolbelt that have been cannibalized into a unique belt that can holster a compact nailgun and two spare nailgun magazines."
icon_state = "nailgun_holster"
storage_slots = 3
can_hold = list(
/obj/item/weapon/gun/smg/nailgun/compact,
/obj/item/ammo_magazine/smg/nailgun,
)
has_gamemode_skin = FALSE

/obj/item/storage/belt/gun/m4a3/nailgun/prefilled/fill_preset_inventory()
handle_item_insertion(new /obj/item/weapon/gun/smg/nailgun/compact())
for(var/i = 1 to storage_slots - 1)
new /obj/item/ammo_magazine/smg/nailgun(src)

/obj/item/storage/belt/gun/m39
name = "\improper M276 pattern M39 holster rig"
desc = "Special issue variant of the M276 designed to holster a M39 submachine gun and two spare magazines. Uncommonly issued to USCM support and specialist personnel."
Expand Down
4 changes: 4 additions & 0 deletions code/game/supplyshuttle.dm
Original file line number Diff line number Diff line change
Expand Up @@ -316,6 +316,10 @@ GLOBAL_DATUM_INIT(supply_controller, /datum/controller/supply, new())
to_chat(usr, "[icon2html(src, usr)] [SPAN_WARNING("The landing zone appears to be obstructed or out of bounds. Package would be lost on drop.")]")
return

if(crate.opened)
to_chat(usr, "[icon2html(src, usr)] [SPAN_WARNING("The crate is not secure on the drop pad. Please close it!")]")
return

crate.visible_message(SPAN_WARNING("\The [crate] loads into a launch tube. Stand clear!"))
current_squad.send_message("'[crate.name]' supply drop incoming. Heads up!")
current_squad.send_maptext(crate.name, "Incoming Supply Drop:")
Expand Down
4 changes: 4 additions & 0 deletions code/modules/cm_marines/overwatch.dm
Original file line number Diff line number Diff line change
Expand Up @@ -843,6 +843,10 @@
to_chat(usr, "[icon2html(src, usr)] [SPAN_WARNING("The landing zone appears to be obstructed or out of bounds. Package would be lost on drop.")]")
return

if(crate.opened)
to_chat(usr, "[icon2html(src, usr)] [SPAN_WARNING("The crate is not secure on the drop pad. Get Requisitions to close the crate!")]")
return

busy = TRUE
crate.visible_message(SPAN_WARNING("\The [crate] loads into a launch tube. Stand clear!"))
SEND_SIGNAL(crate, COMSIG_STRUCTURE_CRATE_SQUAD_LAUNCHED, current_squad)
Expand Down
Loading

0 comments on commit 0398be6

Please sign in to comment.