Skip to content

Commit

Permalink
Merge remote-tracking branch 'cmss13-devs/master' into provosttablets
Browse files Browse the repository at this point in the history
  • Loading branch information
ItsVyzo committed Apr 15, 2024
2 parents f3fd664 + 81a8b69 commit 7581655
Show file tree
Hide file tree
Showing 891 changed files with 71,672 additions and 45,359 deletions.
2 changes: 0 additions & 2 deletions .github/alternate_byond_versions.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,3 @@
# Format is version: map
# Example:
# 500.1337: runtimestation

515.1610: lv624
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]: **PUT DOCUMENTATION LINK HERE**
[DOCUMENTATION]: https://docs.cm-ss13.com/

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

[DMDOC]: https://github.com/SpaceManiac/SpacemanDMM/tree/master/src/dmdoc
[DMDOC]: https://github.com/SpaceManiac/SpacemanDMM/tree/master/crates/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 /tg/station codebase structure and api reference.
gain understanding of the CM-SS13 codebase structure and api reference.

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

Expand Down
30 changes: 8 additions & 22 deletions .github/workflows/ci_suite.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,30 +63,16 @@ jobs:

odlint:
name: Lint with OpenDream
runs-on: ubuntu-20.04
runs-on: ubuntu-22.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
- uses: actions/checkout@v4
- uses: robinraju/[email protected]
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
repository: "OpenDreamProject/OpenDream"
tag: "latest"
fileName: "DMCompiler_linux-x64.tar.gz"
extract: true
- run: ./DMCompiler_linux-x64/DMCompiler --suppress-unimplemented colonialmarines.dme

compile_all_maps:
if: "!contains(github.event.head_commit.message, '[ci skip]')"
Expand Down
2 changes: 1 addition & 1 deletion .tgs.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
version: 1
byond: "514.1588"
byond: "515.1627"
static_files:
- name: config
- name: data
Expand Down
13 changes: 13 additions & 0 deletions .vscode/tasks.json
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,19 @@
],
"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"
}
]
}
2 changes: 2 additions & 0 deletions bin/tgfont.cmd
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
@echo off
call "%~dp0\..\tools\build\build.bat" --wait-on-error tg-font %*
33 changes: 22 additions & 11 deletions code/__DEFINES/ARES.dm
Original file line number Diff line number Diff line change
@@ -1,21 +1,22 @@
#define ARES_ACCESS_LOGOUT 0
/// Generic access for 1:1 conversations with ARES and unrestricted commands.
#define ARES_ACCESS_BASIC 0
#define ARES_ACCESS_BASIC 1
/// Secure Access, can read ARES Announcements and Bioscans.
#define ARES_ACCESS_COMMAND 1
#define ARES_ACCESS_JOE 2
#define ARES_ACCESS_COMMAND 2
#define ARES_ACCESS_JOE 3
/// CL, can read Apollo Log and also Delete Announcements.
#define ARES_ACCESS_CORPORATE 3
#define ARES_ACCESS_CORPORATE 4
/// Senior Command, can Delete Bioscans.
#define ARES_ACCESS_SENIOR 4
#define ARES_ACCESS_SENIOR 5
/// Synth, CE & Commanding Officer, can read the access log.
#define ARES_ACCESS_CE 5
#define ARES_ACCESS_SYNTH 6
#define ARES_ACCESS_CO 7
#define ARES_ACCESS_CE 6
#define ARES_ACCESS_SYNTH 7
#define ARES_ACCESS_CO 8
/// High Command, can read the deletion log.
#define ARES_ACCESS_HIGH 8
#define ARES_ACCESS_WY_COMMAND 9
#define ARES_ACCESS_HIGH 9
#define ARES_ACCESS_WY_COMMAND 10
/// Debugging. Allows me to view everything without using a high command rank. Unlikely to stay in a full merge.
#define ARES_ACCESS_DEBUG 10
#define ARES_ACCESS_DEBUG 11

#define ARES_RECORD_ANNOUNCE "Announcement Record"
#define ARES_RECORD_ANTIAIR "AntiAir Control Log"
Expand All @@ -27,6 +28,7 @@
#define ARES_RECORD_MAINTENANCE "Maintenance Ticket"
#define ARES_RECORD_ACCESS "Access Ticket"
#define ARES_RECORD_FLIGHT "Flight Record"
#define ARES_RECORD_TECH "Tech Control Record"

/// Not by ARES logged through marine_announcement()
#define ARES_LOG_NONE 0
Expand Down Expand Up @@ -67,6 +69,15 @@
#define TICKET_OPEN "OPEN"
#define TICKET_CLOSED "CLOSED"

// Priority status changes.
/// Upgraded to Priority
#define TICKET_PRIORITY "priority"
/// Downgraded from Priority
#define TICKET_NON_PRIORITY "non-priority"

/// Cooldowns
#define COOLDOWN_ARES_SENSOR 60 SECONDS
#define COOLDOWN_ARES_ACCESS_CONTROL 20 SECONDS

/// Time until someone can respawn as Working Joe
#define JOE_JOIN_DEAD_TIME (15 MINUTES)
14 changes: 5 additions & 9 deletions code/__DEFINES/__game.dm
Original file line number Diff line number Diff line change
@@ -1,9 +1,3 @@
#define RANGE_TURFS(RADIUS, CENTER) \
block( \
locate(max(CENTER.x-(RADIUS),1), max(CENTER.y-(RADIUS),1), CENTER.z), \
locate(min(CENTER.x+(RADIUS),world.maxx), min(CENTER.y+(RADIUS),world.maxy), CENTER.z) \
)

//Admin perms are in global.dm.

/// To make it even more clear that something is a bitfield.
Expand Down Expand Up @@ -108,6 +102,7 @@ block( \
#define SOUND_ADMIN_MEME (1<<6)
#define SOUND_ADMIN_ATMOSPHERIC (1<<7)
#define SOUND_ARES_MESSAGE (1<<8)
#define SOUND_OBSERVER_ANNOUNCEMENTS (1<<9)

//toggles_chat
#define CHAT_OOC (1<<0)
Expand Down Expand Up @@ -162,7 +157,7 @@ block( \

#define TOGGLES_LANGCHAT_DEFAULT (LANGCHAT_SEE_EMOTES)

#define TOGGLES_SOUND_DEFAULT (SOUND_ADMINHELP|SOUND_MIDI|SOUND_AMBIENCE|SOUND_LOBBY|SOUND_INTERNET|SOUND_ADMIN_MEME|SOUND_ADMIN_ATMOSPHERIC)
#define TOGGLES_SOUND_DEFAULT (SOUND_ADMINHELP|SOUND_MIDI|SOUND_AMBIENCE|SOUND_LOBBY|SOUND_INTERNET|SOUND_ADMIN_MEME|SOUND_ADMIN_ATMOSPHERIC|SOUND_OBSERVER_ANNOUNCEMENTS)

#define TOGGLES_FLASHING_DEFAULT (FLASH_ROUNDSTART|FLASH_ROUNDEND|FLASH_CORPSEREVIVE|FLASH_ADMINPM|FLASH_UNNEST)

Expand Down Expand Up @@ -283,7 +278,7 @@ block( \

// Helpers
/// Only use the CEILING_PROTECTION_TIER_X defines for `protection_level`
#define CEILING_IS_PROTECTED(ceiling, protection_level) (ceiling >= protection_level)
#define CEILING_IS_PROTECTED(ceiling, protection_level) ((ceiling) >= (protection_level))

// Default font settings
#define FONT_SIZE "5pt"
Expand Down Expand Up @@ -379,6 +374,7 @@ block( \
#define WALL_DEVWALL "devwall"
#define WALL_DEVWALL_R "devwall_r"
#define WALL_HUNTERSHIP "metal"//DMI specific name
#define WALL_AICORE "aiwall"

//Defines for dropship weapon gimbals
#define GIMBAL_LEFT -1
Expand Down Expand Up @@ -536,7 +532,7 @@ block( \
/// `amount` - The number to get per time
/// `time` - The time period in which to gain this amount
/// To be used with delta_time. Multiplied by 10 to convert from deciseconds to seconds
#define AMOUNT_PER_TIME(amount, time) ((amount / (time))*10)
#define AMOUNT_PER_TIME(amount, time) (((amount) / (time))*10)

// Local message mode. Used to decide wheter message should be dispatched on the radio.
#define MESSAGE_MODE_LOCAL 1
Expand Down
2 changes: 1 addition & 1 deletion code/__DEFINES/__spacemandmm.dm
Original file line number Diff line number Diff line change
Expand Up @@ -40,5 +40,5 @@
/world/Del()
var/debug_server = world.GetConfig("env", "AUXTOOLS_DEBUG_DLL")
if (debug_server)
LIBCALL(debug_server, "auxtools_shutdown")()
call_ext(debug_server, "auxtools_shutdown")()
. = ..()
9 changes: 0 additions & 9 deletions code/__DEFINES/_macros.dm
Original file line number Diff line number Diff line change
Expand Up @@ -8,17 +8,8 @@

#define subtypesof(A) (typesof(A) - A)

#ifdef EXPERIMENT_515_DONT_CACHE_REF
/// Takes a datum as input, returns its ref string
#define text_ref(datum) ref(datum)
#else
/// Takes a datum as input, returns its ref string, or a cached version of it
/// This allows us to cache \ref creation, which ensures it'll only ever happen once per datum, saving string tree time
/// It is slightly less optimal then a []'d datum, but the cost is massively outweighed by the potential savings
/// It will only work for datums mind, for datum reasons
/// : because of the embedded typecheck
#define text_ref(datum) (isdatum(datum) ? (datum:cached_ref ||= "\ref[datum]") : ("\ref[datum]"))
#endif

#define addToListNoDupe(L, index) if(L) L[index] = null; else L = list(index)

Expand Down
8 changes: 5 additions & 3 deletions code/__DEFINES/_math.dm
Original file line number Diff line number Diff line change
Expand Up @@ -14,17 +14,19 @@

#define CEILING(x, y) ( -round(-(x) / (y)) * (y) )

#define ROUND_UP(x) ( -round(-(x)))

// round() acts like floor(x, 1) by default but can't handle other values
#define FLOOR(x, y) ( round((x) / (y)) * (y) )

// Real modulus that handles decimals
#define MODULUS(x, y) ( (x) - (y) * round((x) / (y)) )

// Returns true if val is from min to max, inclusive.
#define ISINRANGE(val, min, max) (min <= val && val <= max)
#define ISINRANGE(val, min, max) ((min) <= (val) && (val) <= (max))

// Same as above, exclusive.
#define ISINRANGE_EX(val, min, max) (min < val && val < max)
#define ISINRANGE_EX(val, min, max) ((min) < (val) && (val) < (max))

// Will filter out extra rotations and negative rotations
// E.g: 540 becomes 180. -180 becomes 180.
Expand All @@ -34,4 +36,4 @@
#define SIGN(x) ( ((x) > 0) - ((x) < 0) )

/// Performs a linear interpolation between a and b. Note that amount=0 returns a, amount=1 returns b, and amount=0.5 returns the mean of a and b.
#define LERP(a, b, amount) ( amount ? ((a) + ((b) - (a)) * (amount)) : a )
#define LERP(a, b, amount) ( (amount) ? ((a) + ((b) - (a)) * (amount)) : (a) )
1 change: 1 addition & 0 deletions code/__DEFINES/camera.dm
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
#define CAMERA_NET_VEHICLE "Vehicle"
#define CAMERA_NET_LANDING_ZONES "Landing Zones"
#define CAMERA_NET_LASER_TARGETS "Laser Targets"
#define CAMERA_NET_CORRESPONDENT "Combat Correspondent Live"

#define CAMERA_NET_POWER_ALARMS "Power Alarms"
#define CAMERA_NET_ATMOSPHERE_ALARMS "Atmosphere Alarms"
Expand Down
1 change: 1 addition & 0 deletions code/__DEFINES/chat.dm
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
#define MESSAGE_TYPE_ADMINLOG "adminlog"
#define MESSAGE_TYPE_ATTACKLOG "attacklog"
#define MESSAGE_TYPE_DEBUG "debug"
#define MESSAGE_TYPE_NICHE "niche"

/// Adds a generic box around whatever message you're sending in chat. Really makes things stand out.
#define examine_block(str) ("<div class='examine_block'>" + str + "</div>")
7 changes: 7 additions & 0 deletions code/__DEFINES/dcs/signals/atom/mob/living/signals_xeno.dm
Original file line number Diff line number Diff line change
Expand Up @@ -71,3 +71,10 @@

/// From /obj/effect/alien/resin/special/eggmorph/attack_alien: (mob/living/carbon/xenomorph/M)
#define COMSIG_XENO_TAKE_HUGGER_FROM_MORPHER "xeno_take_hugger_from_morpher"

/// From /mob/living/carbon/xenomorph/proc/handle_crit()
#define COMSIG_XENO_ENTER_CRIT "xeno_entering_critical"

/// From /mob/living/carbon/xenomorph/proc/hivemind_talk(): (message)
#define COMSIG_XENO_TRY_HIVEMIND_TALK "xeno_try_hivemind_talk"
#define COMPONENT_OVERRIDE_HIVEMIND_TALK (1<<0)
14 changes: 12 additions & 2 deletions code/__DEFINES/dcs/signals/atom/mob/signals_mob.dm
Original file line number Diff line number Diff line change
Expand Up @@ -75,9 +75,13 @@
#define COMSIG_MOB_PRE_CLICK "mob_pre_click"
#define COMPONENT_INTERRUPT_CLICK (1<<0)

///from base of /mob/Login(): ()
/// From base of /mob/Login(), called when a client logs into this mob: ()
/// Not to be confused with [COMSIG_MOB_LOGGED_IN]
#define COMSIG_MOB_LOGIN "mob_login"
///from base of /mob/Logout(): ()
/// From base of /mob/Login(), called after a client logs into this mob: ()
/// Not to be confused with [COMSIG_MOB_LOGIN]
#define COMSIG_MOB_LOGGED_IN "mob_logged_in"
/// From base of /mob/Logout(): ()
#define COMSIG_MOB_LOGOUT "mob_logout"

/// From /mob/proc/change_real_name(): (old_name, new_name)
Expand Down Expand Up @@ -109,6 +113,12 @@

#define COMSIG_MOB_EMOTED(emote_key) "mob_emoted_[emote_key]"

#define COMSIG_MOB_TRY_EMOTE "mob_try_emote"
#define COMPONENT_OVERRIDE_EMOTE (1<<0)

#define COMSIG_MOB_TRY_POINT "mob_try_point"
#define COMPONENT_OVERRIDE_POINT (1<<0)

//from /mob/living/set_stat()
#define COMSIG_MOB_STAT_SET_ALIVE "mob_stat_set_alive"
//from /mob/living/set_stat()
Expand Down
3 changes: 2 additions & 1 deletion code/__DEFINES/dcs/signals/atom/signals_atom.dm
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
/// From /atom/proc/Decorate
#define COMSIG_ATOM_DECORATED "atom_decorated"

//from SSatoms InitAtom - Only if the atom was not deleted or failed initialization and has a loc
#define COMSIG_ATOM_AFTER_SUCCESSFUL_INITIALIZED_ON "atom_init_success_on"
///from base of atom/setDir(): (old_dir, new_dir). Called before the direction changes.
#define COMSIG_ATOM_DIR_CHANGE "atom_dir_change"

Expand Down
3 changes: 3 additions & 0 deletions code/__DEFINES/dcs/signals/atom/signals_item.dm
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,9 @@

#define COMSIG_ITEM_PICKUP "item_pickup"

///from /obj/item/device/camera/broadcasting/attack_self
#define COMSIG_BROADCAST_GO_LIVE "broadcast_live"

/// from /obj/item/proc/mob_can_equip
#define COMSIG_ITEM_ATTEMPTING_EQUIP "item_attempting_equip"
///Return this in response if you don't want items equipped
Expand Down
3 changes: 3 additions & 0 deletions code/__DEFINES/dcs/signals/atom/signals_turf.dm
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,6 @@

///from /turf/closed/wall/proc/place_poster
#define COMSIG_POSTER_PLACED "poster_placed"

///from base of /datum/turf_reservation/proc/Release: (datum/turf_reservation/reservation)
#define COMSIG_TURF_RESERVATION_RELEASED "turf_reservation_released"
4 changes: 2 additions & 2 deletions code/__DEFINES/dcs/signals/signals_client.dm
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@
/// Called after one or more verbs are added: (list of verbs added)
#define COMSIG_CLIENT_VERB_REMOVED "client_verb_removed"

/// Called after a client logs into a mob: (mob)
#define COMSIG_CLIENT_MOB_LOGIN "client_mob_changed"
/// Called from /mob/Login() after a client logs into a mob: (mob)
#define COMSIG_CLIENT_MOB_LOGGED_IN "client_mob_logged_in"

/// Called when something is added to a client's screen : /client/proc/add_to_screen(screen_add)
#define COMSIG_CLIENT_SCREEN_ADD "client_screen_add"
Expand Down
3 changes: 3 additions & 0 deletions code/__DEFINES/dcs/signals/signals_datum.dm
Original file line number Diff line number Diff line change
Expand Up @@ -64,3 +64,6 @@

// from /proc/update_living_queens() : /mob/living/carbon/xenomorph/queen
#define COMSIG_HIVE_NEW_QUEEN "hive_new_queen"

/// Fired on the lazy template datum when the template is finished loading. (list/loaded_atom_movables, list/loaded_turfs, list/loaded_areas)
#define COMSIG_LAZY_TEMPLATE_LOADED "lazy_template_loaded"
10 changes: 7 additions & 3 deletions code/__DEFINES/dcs/signals/signals_global.dm
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@

///from base of datum/controller/subsystem/mapping/proc/add_new_zlevel(): (list/args)
#define COMSIG_GLOB_NEW_Z "!new_z"
/// sent after world.maxx and/or world.maxy are expanded: (has_exapnded_world_maxx, has_expanded_world_maxy)
#define COMSIG_GLOB_EXPANDED_WORLD_BOUNDS "!expanded_world_bounds"
///from base of datum/controller/subsystem/mapping/proc/add_new_zlevel(): (list/args)
#define COMSIG_GLOB_VEHICLE_ORDERED "!vehicle_ordered"
/// from /datum/controller/subsystem/ticker/fire
Expand All @@ -32,9 +34,11 @@

#define COMSIG_GLOB_REMOVE_VOTE_BUTTON "!remove_vote_button"

#define COMSIG_GLOB_CLIENT_LOGIN "!client_login"
/// Called from /client/New() when a client logs in to the game: (client)
#define COMSIG_GLOB_CLIENT_LOGGED_IN "!client_logged_in"

#define COMSIG_GLOB_MOB_LOGIN "!mob_login"
/// Called from /mob/Login() when a client logs into a mob: (mob)
#define COMSIG_GLOB_MOB_LOGGED_IN "!mob_logged_in"

///from /datum/controller/subsystem/ticker/PostSetup
#define COMSIG_GLOB_POST_SETUP "!post_setup"
Expand Down Expand Up @@ -66,7 +70,7 @@
#define COMSIG_GLOB_RESEARCH_LOCKDOWN "!research_lockdown_closed"
#define COMSIG_GLOB_RESEARCH_LIFT "!research_lockdown_opened"

/// From /obj/structure/machinery/power/fusion_engine/proc/set_overloading() : (set_overloading)
/// From /obj/structure/machinery/power/reactor/proc/set_overloading() : (set_overloading)
#define COMSIG_GLOB_GENERATOR_SET_OVERLOADING "!generator_set_overloading"

#define COMSIG_GLOB_HIJACK_IMPACTED "!hijack_impacted"
Expand Down
Loading

0 comments on commit 7581655

Please sign in to comment.