Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/master' into gaming!
Browse files Browse the repository at this point in the history
  • Loading branch information
silicons committed Sep 26, 2024
2 parents dbe790e + b5d3f1b commit 9c7fff4
Show file tree
Hide file tree
Showing 2,796 changed files with 535,676 additions and 82,397 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/size_labeling.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: size-label
uses: pascalgn/size-label-action@v0.4.3
uses: pascalgn/size-label-action@v0.5.4
env:
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
IGNORED: "**/*.bundle.*\n**/*.chunk.*" # **/*.dmm\n
11 changes: 6 additions & 5 deletions .github/workflows/update_tgs_dmapi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,12 @@ on:

jobs:
update-dmapi:
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04
if: github.repository == 'Citadel-Station-13/Citadel-Station-13-RP' # Don't run on forks!
name: Update the TGS DMAPI
steps:
- name: Clone
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Branch
run: |
Expand All @@ -22,15 +22,16 @@ jobs:
- name: Apply DMAPI update
uses: tgstation/tgs-dmapi-updater@v2
id: dmapi-update
with:
header-path: 'code/__DEFINES/tgs.dm'
library-path: 'code/modules/tgs'

- name: Commit and Push
continue-on-error: true
run: |
git config user.name tgstation-server
git config user.email tgstation-server@users.noreply.github.com
git config user.name "tgstation-server-ci[bot]"
git config user.email "161980869+tgstation-server-ci[bot]@users.noreply.github.com"
git add .
git commit -m 'Update TGS DMAPI'
git push -f -u origin tgs-dmapi-update
Expand All @@ -42,7 +43,7 @@ jobs:
source_branch: "tgs-dmapi-update"
destination_branch: "master"
pr_title: "Automatic TGS DMAPI Update"
pr_body: "This pull request updates the TGS DMAPI to the latest version. Please note any breaking or unimplemented changes before merging."
pr_body: "This pull request updates the TGS DMAPI to the latest version. Please note any changes that may be breaking or unimplemented in your codebase by checking what changes are in the definitions file: code/__DEFINES/tgs.dm before merging.\n\n${{ steps.dmapi-update.outputs.release-notes }}"
pr_label: "Tools"
pr_allow_empty: false
github_token: ${{ secrets.SILICONS_BOT_TOKEN }}
5 changes: 5 additions & 0 deletions _mapload/victory.dm
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#ifdef FORCE_MAP
#error Duplicate FORCE_MAP, what are you doing!?
#endif

#define FORCE_MAP "victory"
773 changes: 498 additions & 275 deletions citadel.dme

Large diffs are not rendered by default.

6 changes: 6 additions & 0 deletions code/__DEFINES/MC.dm
Original file line number Diff line number Diff line change
Expand Up @@ -45,10 +45,16 @@
/// (implies all runlevels because of how it works)
/// (overrides SS_BACKGROUND)
/// This is designed for basically anything that works as a mini-mc (like SStimer)
///
/// * Ticker is its own priority bucket. The highest one. Be careful.
/// * Ticker disables tick overrun punishment.
#define SS_TICKER (1<<4)

/** keep the subsystem's timing on point by firing early if it fired late last fire because of lag */
/// ie: if a 20ds subsystem fires say 5 ds late due to lag or what not, its next fire would be in 15ds, not 20ds.
///
/// * This will only keep timing past the last 10 seconds, it will not attempt to catch the subsystem up without bounds.
/// * This disables tick overrun punishment.
#define SS_KEEP_TIMING (1<<5)

/** Calculate its next fire after its fired. */
Expand Down
10 changes: 10 additions & 0 deletions code/__DEFINES/_bitfields.dm
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,13 @@
// todo: get rid of this, rename BITFIELD_NAMED to this
#define BITFIELD(thing) #thing = thing
#define BITFIELD_NAMED(name, thing) name = thing

// todo: impl
/// KEY: must be unique, may be arbitrary; not a string, as it's used in typepath generation
/// CONSTRAINTS: list(/type = list(varname, ...), ...)
/// BITFIELDS: list of BITFIELD_NEW().
#define DEFINE_BITFIELD_NEW(KEY, CONSTRAINTS, BITFIELDS)
// todo: impl
/// NAME: must be a string
/// VALUE: the actual enum value, whatever it is
#define BITFIELD_NEW(NAME, VALUE) ##NAME = ##VALUE
3 changes: 3 additions & 0 deletions code/__DEFINES/_core.dm
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,8 @@
/// * put the stack trace in stack trace storage
#define stack_trace(message) _stack_trace(message, __FILE__, __LINE__)

/// get variable if not null or
#define VALUE_OR_DEFAULT(VAL, DEFAULT) (isnull(VAL)? (DEFAULT) : (VAL))

/// byond bug https://secure.byond.com/forum/?post=2072419
#define BLOCK_BYOND_BUG_2072419
13 changes: 11 additions & 2 deletions code/__DEFINES/_flags/atom_flags.dm
Original file line number Diff line number Diff line change
Expand Up @@ -59,11 +59,16 @@ DEFINE_BITFIELD(atom_flags, list(
#define MOVABLE_NO_THROW_DAMAGE_SCALING (1<<1)
/// Do not spin when thrown.
#define MOVABLE_NO_THROW_SPIN (1<<2)
/// We are currently about to be yanked by a Moved(), Entered(), or Exited() triggering a Move()
///
/// * used so things like projectile hitscans know to yield
#define MOVABLE_IN_MOVED_YANK (1<<3)

DEFINE_BITFIELD(movable_flags, list(
BITFIELD(MOVABLE_NO_THROW_SPEED_SCALING),
BITFIELD(MOVABLE_NO_THROW_DAMAGE_SCALING),
BITFIELD(MOVABLE_NO_THROW_SPIN),
BITFIELD(MOVABLE_IN_MOVED_YANK),
))

// Flags for pass_flags. - Used in /atom/movable/var/pass_flags, and /atom/var/pass_flags_self
Expand All @@ -80,11 +85,13 @@ DEFINE_BITFIELD(movable_flags, list(
#define ATOM_PASS_OVERHEAD_THROW (1<<7)
/// let buckled mobs pass always
#define ATOM_PASS_BUCKLED (1<<8)
/// "please don't interact with us"
#define ATOM_PASS_INCORPOREAL (1<<9)

/// all actual pass flags / maximum pass
#define ATOM_PASS_ALL (ATOM_PASS_TABLE | ATOM_PASS_GLASS | ATOM_PASS_GRILLE | \
ATOM_PASS_BLOB | ATOM_PASS_MOB | ATOM_PASS_THROWN | ATOM_PASS_CLICK | \
ATOM_PASS_OVERHEAD_THROW | ATOM_PASS_BUCKLED)
ATOM_PASS_OVERHEAD_THROW | ATOM_PASS_BUCKLED | ATOM_PASS_INCORPOREAL)

DEFINE_BITFIELD(pass_flags, list(
BITFIELD(ATOM_PASS_TABLE),
Expand All @@ -96,6 +103,7 @@ DEFINE_BITFIELD(pass_flags, list(
BITFIELD(ATOM_PASS_CLICK),
BITFIELD(ATOM_PASS_OVERHEAD_THROW),
BITFIELD(ATOM_PASS_BUCKLED),
BITFIELD(ATOM_PASS_INCORPOREAL),
))

DEFINE_BITFIELD(pass_flags_self, list(
Expand All @@ -108,9 +116,10 @@ DEFINE_BITFIELD(pass_flags_self, list(
BITFIELD(ATOM_PASS_CLICK),
BITFIELD(ATOM_PASS_OVERHEAD_THROW),
BITFIELD(ATOM_PASS_BUCKLED),
BITFIELD(ATOM_PASS_INCORPOREAL),
))

//? /atom/movable movement_type - only one should be on the atom at a time, but these are flags for quick checks.
//? /atom/movable movement_type - only one primary type should be on the atom at a time, but these are flags for quick checks.
/// Can not be stopped from moving from Cross(), CanPass(), or Uncross() failing. Still bumps everything it passes through, though.
#define MOVEMENT_UNSTOPPABLE (1<<0)
/// Ground movement.
Expand Down
3 changes: 3 additions & 0 deletions code/__DEFINES/_flags/obj_flags.dm
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@
#define OBJ_NO_SCULPTING (1<<10)
/// wall-mounted; facing *towards* the wall we're mounted on (e.g. be NORTH if we're shifted north)
#define OBJ_WALL_MOUNTED (1<<11)
/// Allow throwing stuff through us if we get destroyed by a throw
#define OBJ_ALLOW_THROW_THROUGH (1<<3)

DEFINE_BITFIELD(obj_flags, list(
BITFIELD(OBJ_EMAGGED),
Expand All @@ -37,6 +39,7 @@ DEFINE_BITFIELD(obj_flags, list(
BITFIELD(OBJ_MATERIAL_INITIALIZED),
BITFIELD(OBJ_NO_SCULPTING),
BITFIELD_NAMED("Wall Mounted", OBJ_WALL_MOUNTED),
BITFIELD_NAMED("Allow Thrown to Pass if Devastated", OBJ_ALLOW_THROW_THROUGH), // dumb, rename later
))

//* /obj/var/obj_rotation_flags
Expand Down
4 changes: 2 additions & 2 deletions code/__DEFINES/_flags/turf_flags.dm
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
/// This is used in literally one place, turf.dm, to block ethwereal jaunt.
#define NO_JAUNT (1<<0)
/// Unused reservation turf
#define UNUSED_RESERVATION_TURF (1<<2)
#define TURF_FLAG_UNUSED_RESERVATION (1<<2)
/// queued for planet turf addition
#define TURF_PLANET_QUEUED (1<<3)
/// registered to a planet
Expand All @@ -28,7 +28,7 @@

DEFINE_BITFIELD(turf_flags, list(
BITFIELD(NO_JAUNT),
BITFIELD(UNUSED_RESERVATION_TURF),
BITFIELD(TURF_FLAG_UNUSED_RESERVATION),
BITFIELD(TURF_PLANET_QUEUED),
BITFIELD(TURF_PLANET_REGISTERED),
BITFIELD(TURF_ZONE_REBUILD_QUEUED),
Expand Down
9 changes: 9 additions & 0 deletions code/__DEFINES/_planes+layers.dm
Original file line number Diff line number Diff line change
Expand Up @@ -178,6 +178,7 @@
#define STAIRS_LAYER (TURF_LAYER+0.5) /// Layer for stairs.
#define DOOR_OPEN_LAYER (TURF_LAYER+0.7) /// Under all objects if opened. 2.7 due to tables being at 2.6.
#define TABLE_LAYER (TURF_LAYER+0.8) /// Just under stuff that wants to be slightly below common objects.
/// Below this layer, projectiles won't collide with things unless it's a directly clicked target.
#define PROJECTILE_HIT_THRESHOLD_LAYER 2.8
#define UNDER_JUNK_LAYER (TURF_LAYER+0.9) /// Things that want to be slightly below common objects.

Expand Down Expand Up @@ -322,6 +323,14 @@
#define ABOVE_LIGHTING_PLANE 20
#define ABOVE_LIGHTING_LAYER_MAIN 1

/**
*! -- Debug Plane
*? For things like map landmarks
*/
#define DEBUG_PLANE 23
#define DEBUG_LAYER_AREA_OVERLAYS 100
#define DEBUG_LAYER_SHUTTLE_MARKERS 500

/**
*! -- Ghost Plane
*? Where ghosts live.
Expand Down
12 changes: 12 additions & 0 deletions code/__DEFINES/access.dm
Original file line number Diff line number Diff line change
Expand Up @@ -411,6 +411,18 @@ STANDARD_ACCESS_DATUM(ACCESS_FACTION_PIRATE, faction/pirate, "Pirate")
#define ACCESS_FACTION_TRADER 160//General Beruang Trader Access
STANDARD_ACCESS_DATUM(ACCESS_FACTION_TRADER, faction/trader, "Trader")

//? Gaia Station

#define ACCESS_GAIA_GUEST 250//Gaia Station Basic Access
STANDARD_ACCESS_DATUM(ACCESS_GAIA_GUEST, faction/resort/guest, "Gaia Station Guest")

#define ACCESS_GAIA_VIP 251//Gaia Station Premium Access
STANDARD_ACCESS_DATUM(ACCESS_GAIA_VIP, faction/resort/vip, "Gaia Station VIP")

#define ACCESS_GAIA_STAFF 252//Gaia Staff Access
STANDARD_ACCESS_DATUM(ACCESS_GAIA_STAFF, faction/resort/staff, "Gaia Station Staff")


//? Alien

#define ACCESS_FACTION_ALIEN 300 // For things like crashed ships.
Expand Down
1 change: 1 addition & 0 deletions code/__DEFINES/admin/admin.dm
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@
#define SMITE_DROP_LIMB_RANDOM "Remove one(1) arm and one(1) leg"
#define SMITE_DROP_LIMB_ALL "Remove all(4) limbs"
#define SMITE_DROP_LIMB_PICK "Remove one specific limb"
#define SMITE_VALIDHUNT "Declare KOS (and optionally noncanon)"

#define ADMIN_LOOKUP(user) ("[key_name_admin(user)][ADMIN_QUE(user)]")
#define ADMIN_LOOKUPFLW(user) ("[key_name_admin(user)][ADMIN_QUE(user)] [ADMIN_FLW(user)]")
Expand Down
19 changes: 19 additions & 0 deletions code/__DEFINES/ai/ai_holder.dm
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
//* This file is explicitly licensed under the MIT license. *//
//* Copyright (c) 2024 silicons *//

//* Ticking

/// AI scheduling bucket limit
///
/// this is set to 10 seconds because it is the same duration
/// as the garbage collector,
/// which means things aren't considered to be leaking.
///
/// the AI scheduler does not explicitly clean up references; it just drops things
/// if they're no longer valid during the bucket scan.
#define AI_SCHEDULING_LIMIT (10 SECONDS)

/// AI scheduling bucket limit
///
/// 5 seconds of tolerance is allowed before AI callbacks are dropped.
#define AI_SCHEDULING_TOLERANCE (5 SECONDS)
11 changes: 11 additions & 0 deletions code/__DEFINES/ai/debug.dm
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
//* This file is explicitly licensed under the MIT license. *//
//* Copyright (c) 2024 silicons *//

/// Enable debugging mode. This enables the AI debug interface, but will generally cause a decent bit of overhead/lag.
// #define AI_DEBUGGING

#ifdef AI_DEBUGGING
#define AI_DEBUGGING_ENABLED TRUE
#else
#define AI_DEBUGGING_ENABLED FALSE
#endif
5 changes: 5 additions & 0 deletions code/__DEFINES/bound_proc.dm
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
//* This file is explicitly licensed under the MIT license. *//
//* Copyright (c) 2024 silicons *//

/// much like callback syntax,
#define BOUND_PROC new /datum/bound_proc
6 changes: 4 additions & 2 deletions code/__DEFINES/callbacks.dm
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
/// Arbitrary sentinel value for global proc callbacks
#define GLOBAL_PROC "some_magic_bullshit"
/// Arbitrary sentinel value for making sure a callback didn't sleep
#define CALLBACK_SLEEP_SENTINEL "___THE PROC SLEPT___"
/// A shorthand for the callback datum, [documented here](datum/callback.html)
#define CALLBACK new /datum/callback
///Per the DM reference, spawn(-1) will execute the spawned code immediately until a block is met.
/// Per the DM reference, spawn(-1) will execute the spawned code immediately until a block is met.
#define MAKE_SPAWN_ACT_LIKE_WAITFOR -1
///Create a codeblock that will not block the callstack if a block is met.
/// Create a codeblock that will not block the callstack if a block is met.
#define ASYNC spawn(MAKE_SPAWN_ACT_LIKE_WAITFOR)

#define INVOKE_ASYNC(proc_owner, proc_path, proc_arguments...) \
Expand Down
25 changes: 25 additions & 0 deletions code/__DEFINES/coloration.dm
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
//* This file is explicitly licensed under the MIT license. *//
//* Copyright (c) 2024 Citadel Station developers. *//

//* coloration_mode; only bitfields for quick checks. only one can be applied at a time!

/// no recoloring
#define COLORATION_MODE_NONE (1<<0)
/// free normal multiply color
#define COLORATION_MODE_MULTIPLY (1<<1)
/// free matrix or normal multiply color
#define COLORATION_MODE_MATRIX (1<<2)
/// red-green matrix for parts 1, 2.
#define COLORATION_MODE_RG_MATRIX (1<<3)
/// red-blue matrix for parts 1, 2
#define COLORATION_MODE_RB_MATRIX (1<<4)
/// green-blue matrix for parts 1, 2
#define COLORATION_MODE_GB_MATRIX (1<<5)
/// red-green-blue matrix for parts 1, 2, 3
#define COLORATION_MODE_RGB_MATRIX (1<<6)
/// overlays - dynamic amount
// todo: implement
#define COLORATION_MODE_OVERLAYS (1<<7)

#define COLORATION_MODES_COMPLEX (COLORATION_MODE_RG_MATRIX | COLORATION_MODE_RB_MATRIX | COLORATION_MODE_GB_MATRIX \
| COLORATION_MODE_RGB_MATRIX | COLORATION_MODE_OVERLAYS )
Loading

0 comments on commit 9c7fff4

Please sign in to comment.