Skip to content

Commit

Permalink
Merge branch 'master' into lurker-scary
Browse files Browse the repository at this point in the history
  • Loading branch information
morrowwolf committed Oct 27, 2023
2 parents c8d1723 + f89cbfe commit 593ea10
Show file tree
Hide file tree
Showing 199 changed files with 5,439 additions and 4,463 deletions.
6 changes: 6 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,12 @@ body:
placeholder: "#1, #2, #3, etc"
validations:
required: true
- type: input
id: round-id
attributes:
label: Round ID
description: If known, what was the Round ID this bug was found on? Can be left blank if unknown or occured across multiple rounds.
placeholder: "12345"
- type: textarea
id: what-happened
attributes:
Expand Down
28 changes: 28 additions & 0 deletions .github/workflows/ci_suite.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,34 @@ jobs:
with:
outputFile: output-annotations.txt


odlint:
name: Lint with OpenDream
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v3
- name: Get OpenDream Version
run: |
source dependencies.sh
echo "OPENDREAM_VERSION=$OPENDREAM_VERSION" >> $GITHUB_ENV
- name: Restore OpenDream cache
uses: actions/cache@v3
id: cache-od
with:
path: ~/OpenDream
key: ${{ runner.os }}-opendream-${{ env.OPENDREAM_VERSION }}
- name: Download OpenDream
if: steps.cache-od.outputs.cache-hit != 'true'
run: |
bash tools/ci/download_od.sh
- name: Setup OpenDream
if: steps.cache-od.outputs.cache-hit != 'true'
run: |
bash tools/ci/setup_od.sh
- name: Run OpenDream
run: |
bash tools/ci/run_od.sh
compile_all_maps:
if: "!contains(github.event.head_commit.message, '[ci skip]')"
name: Compile Maps
Expand Down
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -31,3 +31,6 @@ test_environment.txt
# byond-tracy backend, not shipped with the codebase so it shouldn't be maintained
prof.dll
libprof.so

# OpenDream compatibility stuff
colonialmarines.json
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

[![Build Status](https://github.com/PvE-CMSS13/PvE-CMSS13/workflows/CI%20Suite/badge.svg)](https://github.com/PvE-CMSS13/PvE-CMSS13/actions?query=workflow%3A%22CI+Suite%22)
* **Code:** https://github.com/PvE-CMSS13/PvE-CMSS13
* **Discord:** https://discord.gg/v6P6wns5dN
* **Discord:** https://discord.gg/pve-cmss13

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

Expand Down
13 changes: 12 additions & 1 deletion code/__DEFINES/__game.dm
Original file line number Diff line number Diff line change
Expand Up @@ -283,7 +283,6 @@ block( \
/// Only use the CEILING_PROTECTION_TIER_X defines for `protection_level`
#define CEILING_IS_PROTECTED(ceiling, protection_level) (ceiling >= protection_level)


// Default font settings
#define FONT_SIZE "5pt"
#define DEFAULT_FONT_COLOR "#09f"
Expand Down Expand Up @@ -493,6 +492,18 @@ block( \
#define TURF_PROTECTION_CAS 2
#define TURF_PROTECTION_OB 3

/// Convert a turf protection level to a ceiling protection level
/proc/get_ceiling_protection_level(turf_protection_level)
switch(turf_protection_level)
if(TURF_PROTECTION_OB)
return CEILING_PROTECTION_TIER_4
if(TURF_PROTECTION_CAS)
return CEILING_PROTECTION_TIER_3
if(TURF_PROTECTION_MORTAR)
return CEILING_PROTECTION_TIER_2
else
return CEILING_NO_PROTECTION

// Anything above the deck boundary is the upper deck, anything below is the lower deck
// This is exclusive, so anything ON the boundary is an edge case that's neither on the upper nor the lower deck
#define ALMAYER_DECK_BOUNDARY 101
Expand Down
2 changes: 1 addition & 1 deletion code/__DEFINES/bullet_traits.dm
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
// list of args if there are any args
/// An entry to a list for giving projectiles bullet traits
/// Must be placed inside of a list
#define BULLET_TRAIT_ENTRY(trait, args...) trait = #args ? list(##args) : null
#define BULLET_TRAIT_ENTRY(trait, args...) trait = list(##args)
/// An entry to a list for giving projectiles bullet traits with a unique ID
/// Must be placed inside of a list
#define BULLET_TRAIT_ENTRY_ID(id, trait, args...) id = list(trait, ##args)
Expand Down
1 change: 1 addition & 0 deletions code/__DEFINES/chemistry.dm
Original file line number Diff line number Diff line change
Expand Up @@ -221,6 +221,7 @@
#define PROPERTY_ANTICARCINOGENIC "anti-carcinogenic"
#define PROPERTY_UNKNOWN "unknown" //just has an OD effect
#define PROPERTY_HEMOSITIC "hemositic"
#define PROPERTY_REVITALIZING "revitalizing"


//Property rarity
Expand Down
2 changes: 1 addition & 1 deletion code/__DEFINES/client_prefs.dm
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@

#define AGE_MIN 19 //youngest a character can be
#define AGE_MAX 90 //oldest a character can be //no. you are not allowed to be 160.
#define MAX_GEAR_COST 7 //Used in chargen for loadout limit.
#define MAX_GEAR_COST 10 //Used in chargen for loadout limit.

///dual_wield_pref from /datum/preferences
///Fire both weapons when dual wielding
Expand Down
4 changes: 4 additions & 0 deletions code/__DEFINES/dcs/signals/atom/mob/living/signals_human.dm
Original file line number Diff line number Diff line change
Expand Up @@ -67,3 +67,7 @@
#define COMSIG_HUMAN_SURGERY_APPLY_MODIFIERS "human_surgery_apply_modifiers"
/// From /mob/living/carbon/human/proc/get_flags_cold_protection()
#define COMSIG_HUMAN_COLD_PROTECTION_APPLY_MODIFIERS "human_cold_protection_apply_modifiers"

/// From /mob/living/carbon/human/UnarmedAttack()
#define COMSIG_HUMAN_BEFORE_ATTACK_HAND "human_before_attack_hand"
#define COMPONENT_CANCEL_HUMAN_ATTACK_HAND (1<<0)
4 changes: 4 additions & 0 deletions code/__DEFINES/dcs/signals/atom/mob/signals_mob.dm
Original file line number Diff line number Diff line change
Expand Up @@ -128,3 +128,7 @@

/// From /obj/item/proc/pickup() : (obj/item/picked_up)
#define COMSIG_MOB_PICKUP_ITEM "mob_pickup_item"

/// From /mob/proc/say_dead(message)
#define COMSIG_DEAD_SPEAK "comsig_dead_speak"
#define COMPONENT_OVERRIDE_DEAD_SPEAK (1<<0)
20 changes: 20 additions & 0 deletions code/__DEFINES/dcs/signals/atom/signals_atom.dm
Original file line number Diff line number Diff line change
Expand Up @@ -45,3 +45,23 @@

///When the transform or an atom is varedited through vv topic.
#define COMSIG_ATOM_VV_MODIFY_TRANSFORM "atom_vv_modify_transform"

/// From /mob/living/carbon/human/UnarmedAttack()
#define COMSIG_ATOM_BEFORE_HUMAN_ATTACK_HAND "atom_before_human_attack_hand"
#define COMPONENT_CANCEL_ATTACK_HAND (1<<0)

/// From /mob/proc/click_adjacent()
#define COMSIG_ATOM_MOB_ATTACKBY "atom_mob_attackby"
#define COMPONENT_CANCEL_ATTACKBY (1<<0)

/// From /atom/proc/attack_hand()
#define COMSIG_ATOM_ATTACK_HAND "atom_attack_hand"

/// From /datum/component/phone/proc/picked_up_call() and /datum/component/phone/proc/post_call_phone()
#define COMSIG_ATOM_PHONE_PICKED_UP "atom_phone_picked_up"
/// From /datum/component/phone/proc/recall_handset()
#define COMSIG_ATOM_PHONE_HUNG_UP "atom_phone_hung_up"
/// From /datum/component/phone/proc/call_phone()
#define COMSIG_ATOM_PHONE_RINGING "atom_phone_ringing"
/// From /datum/component/phone/proc/reset_call()
#define COMSIG_ATOM_PHONE_STOPPED_RINGING "atom_phone_stopped_ringing"
5 changes: 5 additions & 0 deletions code/__DEFINES/dcs/signals/atom/signals_movable.dm
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,15 @@
/// From /atom/movable/proc/launch_towards
#define COMSIG_MOVABLE_PRE_THROW "movable_pre_throw"
#define COMPONENT_CANCEL_THROW (1<<0)

///from base of atom/movable/Moved(): (/atom, dir, forced)
#define COMSIG_MOVABLE_MOVED "movable_moved"
/// From /atom/movable/Move(): (atom/NewLoc)
#define COMSIG_MOVABLE_PRE_MOVE "movable_pre_move"
#define COMPONENT_CANCEL_MOVE (1<<0)
/// From /atom/movable/proc/forceMove(): (atom/NewLoc)
#define COMSIG_MOVABLE_FORCEMOVED "movable_forcemove"

/// From /turf/open/gm/river/Entered(): (turf/open/gm/river/river, covered)
#define COMSIG_MOVABLE_ENTERED_RIVER "movable_entered_river"

Expand All @@ -29,3 +33,4 @@
#define COMSIG_MOVABLE_UPDATE_GLIDE_SIZE "movable_glide_size"

#define COMSIG_MOVABLE_TURF_ENTER "movable_turf_enter"

3 changes: 0 additions & 3 deletions code/__DEFINES/dcs/signals/atom/signals_obj.dm
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,6 @@
#define COMSIG_SENTRY_EMPTY_AMMO_ALERT "signal_sentry_empty_ammo"
#define COMSIG_SENTRY_DESTROYED_ALERT "signal_sentry_destroyed"

/// from /obj/structure/transmitter/update_icon()
#define COMSIG_TRANSMITTER_UPDATE_ICON "transmitter_update_icon"

#define COMSIG_TENT_COLLAPSING "tent_collapsing"

/// from /obj/proc/afterbuckle()
Expand Down
2 changes: 1 addition & 1 deletion code/__DEFINES/dcs/signals/atom/signals_turf.dm
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@

/// From /turf/closed/wall/resin/attackby(): (obj/item/I, mob/M)
#define COMSIG_WALL_RESIN_ATTACKBY "wall_resin_attackby"
#define COMPONENT_CANCEL_ATTACKBY (1<<0)
#define COMPONENT_CANCEL_RESIN_ATTACKBY (1<<0)

///from /turf/closed/wall/proc/place_poster
#define COMSIG_POSTER_PLACED "poster_placed"
12 changes: 8 additions & 4 deletions code/__DEFINES/equipment.dm
Original file line number Diff line number Diff line change
Expand Up @@ -552,7 +552,11 @@ var/global/list/uniform_categories = list(
#define PHONE_UPP_SOLDIER "Soldier"
#define PHONE_IO "IO"

#define PHONE_DND_FORCED 2
#define PHONE_DND_ON 1
#define PHONE_DND_OFF 0
#define PHONE_DND_FORBIDDEN -1
#define PHONE_DO_NOT_DISTURB_FORCED 2
#define PHONE_DO_NOT_DISTURB_ON 1
#define PHONE_DO_NOT_DISTURB_OFF 0
#define PHONE_DO_NOT_DISTURB_FORBIDDEN -1

#define PHONE_ON_BASE_UNIT_ICON_STATE "[initial(icon_state)]"
#define PHONE_OFF_BASE_UNIT_ICON_STATE "[initial(icon_state)]_ear"
#define PHONE_RINGING_ICON_STATE "[initial(icon_state)]_ring"
2 changes: 1 addition & 1 deletion code/__DEFINES/mode.dm
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@
#define MODE_RANDOM_HIVE (1<<12)// Makes Join-as-Xeno choose a hive to join as burrowed larva at random rather than at user's input..
#define MODE_THUNDERSTORM (1<<13)// Enables thunderstorm effects on maps that are compatible with it. (Lit exterior tiles, rain effects)
#define MODE_FACTION_CLASH (1<<14)// Disables scopes, sniper sentries, OBs, shooting corpses, dragging enemy corpses, stripping enemy corpses
#define MODE_NO_XENO_EVOLVE (1<<15) // Stops all xenos from evolving
#define MODE_NO_XENO_EVOLVE (1<<15) // Stops all xenos from evolving or straining

// Gamemode Toggleable Flags
#define MODE_NO_SNIPER_SENTRY (1<<0) /// Upgrade kits will no longer allow you to select long-range upgrades
Expand Down
13 changes: 12 additions & 1 deletion code/__DEFINES/tgs.dm
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// tgstation-server DMAPI

#define TGS_DMAPI_VERSION "6.5.3"
#define TGS_DMAPI_VERSION "6.6.0"

// All functions and datums outside this document are subject to change with any version and should not be relied on.

Expand Down Expand Up @@ -129,6 +129,13 @@
/// DreamDaemon Ultrasafe security level.
#define TGS_SECURITY_ULTRASAFE 2

/// DreamDaemon public visibility level.
#define TGS_VISIBILITY_PUBLIC 0
/// DreamDaemon private visibility level.
#define TGS_VISIBILITY_PRIVATE 1
/// DreamDaemon invisible visibility level.
#define TGS_VISIBILITY_INVISIBLE 2

//REQUIRED HOOKS

/**
Expand Down Expand Up @@ -458,6 +465,10 @@
/world/proc/TgsSecurityLevel()
return

/// Returns the current BYOND visibility level as a TGS_VISIBILITY_ define if TGS is present, null otherwise. Requires TGS to be using interop API version 5 or higher otherwise the string "___unimplemented" wil be returned. This function may sleep if the call to [/world/proc/TgsNew] is sleeping!
/world/proc/TgsVisibility()
return

/// Returns a list of active [/datum/tgs_revision_information/test_merge]s if TGS is present, null otherwise. This function may sleep if the call to [/world/proc/TgsNew] is sleeping!
/world/proc/TgsTestMerges()
return
Expand Down
5 changes: 3 additions & 2 deletions code/__HELPERS/icons.dm
Original file line number Diff line number Diff line change
Expand Up @@ -732,11 +732,12 @@ world
if (isnull(dir))
dir = thing.dir

if (ishuman(thing)) // Shitty workaround for a BYOND issue.
// Commented out because this is seemingly our source of bad icon operations
/* if (ishuman(thing)) // Shitty workaround for a BYOND issue.
var/icon/temp = icon2collapse
icon2collapse = icon()
icon2collapse.Insert(temp, dir = SOUTH)
dir = SOUTH
dir = SOUTH*/
else
if (isnull(dir))
dir = SOUTH
Expand Down
5 changes: 1 addition & 4 deletions code/__HELPERS/type2type.dm
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
var/char = copytext(hex, i, i + 1)
switch(char)
if("0")
//Apparently, switch works with empty statements, yay! If that doesn't work, blame me, though. -- Urist
pass()
if("9", "8", "7", "6", "5", "4", "3", "2", "1")
num += text2num(char) * 16 ** power
if("a", "A")
Expand Down Expand Up @@ -77,7 +77,6 @@
hex += "E"
if(15.0)
hex += "F"
else
power--
while(length(hex) < placeholder)
hex = text("0[]", hex)
Expand Down Expand Up @@ -165,8 +164,6 @@
return 6
if("SOUTHWEST")
return 10
else
return

//Converts an angle (degrees) into an ss13 direction
/proc/angle2dir(degree)
Expand Down
11 changes: 11 additions & 0 deletions code/__odlint.dm
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
// This file is included right at the start of the DME.
// Its purpose is to enable multiple lints (pragmas) that are supported by OpenDream to better validate the codebase
// These are essentially nitpicks the DM compiler should pick up on but doesnt

#ifndef SPACEMAN_DMM
#ifdef OPENDREAM
// These are in their own file as you need to do it with an include as a hack to avoid
// SpacemanDMM evaluating the #pragma lines, even if its outside a block it cares about
#include "__pragmas.dm"
#endif
#endif
27 changes: 27 additions & 0 deletions code/__pragmas.dm
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
//1000-1999
#pragma FileAlreadyIncluded error
#pragma MissingIncludedFile error
#pragma MisplacedDirective error
#pragma UndefineMissingDirective error
#pragma DefinedMissingParen error
#pragma ErrorDirective error
#pragma WarningDirective error
#pragma MiscapitalizedDirective error

//2000-2999
#pragma SoftReservedKeyword error
#pragma DuplicateVariable error
#pragma DuplicateProcDefinition error
#pragma TooManyArguments error
#pragma PointlessParentCall error
#pragma PointlessBuiltinCall error
#pragma SuspiciousMatrixCall error
#pragma MalformedRange error
#pragma InvalidRange error
#pragma InvalidSetStatement error
#pragma InvalidOverride error
#pragma DanglingVarType error
#pragma MissingInterpolatedExpression error

//3000-3999
#pragma EmptyBlock error
2 changes: 1 addition & 1 deletion code/_byond_version_compat.dm
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
//Update this whenever you need to take advantage of more recent byond features
#define MIN_COMPILER_VERSION 514
#define MIN_COMPILER_BUILD 1588
#if (DM_VERSION < MIN_COMPILER_VERSION || DM_BUILD < MIN_COMPILER_BUILD) && !defined(SPACEMAN_DMM)
#if (DM_VERSION < MIN_COMPILER_VERSION || DM_BUILD < MIN_COMPILER_BUILD) && !defined(SPACEMAN_DMM) && !defined(OPENDREAM)
//Don't forget to update this part
#error Your version of BYOND is too out-of-date to compile this project. Go to https://secure.byond.com/download and update.
#error You need version 514.1588 or higher
Expand Down
2 changes: 1 addition & 1 deletion code/_compile_options.dm
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
#define CBT
#endif

#if !defined(CBT) && !defined(SPACEMAN_DMM)
#if !defined(CBT) && !defined(SPACEMAN_DMM) && !defined(OPENDREAM)
#warn Building with Dream Maker is no longer supported and will result in errors.
#warn In order to build, run BUILD.bat in the bin directory.
#warn Consider switching to VSCode editor instead, where you can press Ctrl+Shift+B to build.
Expand Down
3 changes: 3 additions & 0 deletions code/_onclick/click.dm
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,9 @@
if(W.attack_speed && !src.contains(A)) //Not being worn or carried in the user's inventory somewhere, including internal storages.
next_move += W.attack_speed

if(SEND_SIGNAL(A, COMSIG_ATOM_MOB_ATTACKBY, W, src) & COMPONENT_CANCEL_ATTACKBY)
return

if(!A.attackby(W, src, mods) && A && !QDELETED(A))
// in case the attackby slept
if(!W)
Expand Down
4 changes: 4 additions & 0 deletions code/_onclick/human.dm
Original file line number Diff line number Diff line change
Expand Up @@ -80,12 +80,16 @@
to_chat(src, SPAN_NOTICE("You try to move your [temp.display_name], but cannot!"))
return

if(SEND_SIGNAL(A, COMSIG_ATOM_BEFORE_HUMAN_ATTACK_HAND, src, click_parameters) & COMPONENT_CANCEL_HUMAN_ATTACK_HAND)
return

A.attack_hand(src, click_parameters)

/datum/proc/handle_click(mob/living/carbon/human/user, atom/A, params) //Heres our handle click relay proc thing.
return HANDLE_CLICK_PASS_THRU

/atom/proc/attack_hand(mob/user)
SEND_SIGNAL(src, COMSIG_ATOM_ATTACK_HAND, user)
return

/mob/living/carbon/human/MouseDrop_T(atom/dropping, mob/user)
Expand Down
2 changes: 1 addition & 1 deletion code/controllers/subsystem/atoms.dm
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ SUBSYSTEM_DEF(atoms)

switch(result)
if (INITIALIZE_HINT_NORMAL)
// pass
pass()
if(INITIALIZE_HINT_LATELOAD)
if(arguments[1]) //mapload
late_loaders += A
Expand Down
Loading

0 comments on commit 593ea10

Please sign in to comment.