diff --git a/.github/workflows/autowiki.yml b/.github/workflows/autowiki.yml
index c6f85bade91d..10d3cea1e676 100644
--- a/.github/workflows/autowiki.yml
+++ b/.github/workflows/autowiki.yml
@@ -43,7 +43,7 @@ jobs:
sudo apt update || true
sudo apt install -o APT::Immediate-configure=false libssl-dev:i386
bash tools/ci/install_rust_g.sh
-
+
- name: Cache dependencies
if: steps.secrets_set.outputs.SECRETS_ENABLED
uses: actions/cache@v3
diff --git a/.github/workflows/ci_suite.yml b/.github/workflows/ci_suite.yml
index 915b6021e98c..33af3581a22b 100644
--- a/.github/workflows/ci_suite.yml
+++ b/.github/workflows/ci_suite.yml
@@ -3,17 +3,34 @@ on:
push:
branches:
- master
+ - "project/**"
pull_request:
branches:
- master
+ - "project/**"
merge_group:
branches:
- master
+
+concurrency:
+ group: ${{ github.workflow }}-${{ github.ref }}
+ cancel-in-progress: true
+
jobs:
+ start_gate:
+ if: ( !contains(github.event.head_commit.message, '[ci skip]') )
+ name: Start Gate
+ runs-on: ubuntu-latest
+ steps:
+ - name: Mandatory Empty Step
+ run: exit 0
+
run_linters:
- if: ${{ ! contains(github.event.head_commit.message, '[ci skip]') }}
name: Run Linters
+ needs: start_gate
runs-on: ubuntu-22.04
+ timeout-minutes: 5
+
steps:
- uses: actions/checkout@v3
with:
@@ -53,40 +70,62 @@ jobs:
run: |
pip3 install setuptools
bash tools/ci/install_node.sh
- bash tools/ci/install_spaceman_dmm.sh dreamchecker
cargo install ripgrep --features pcre2
tools/bootstrap/python -c ''
- - name: Run Linters
+ - name: Give Linters A Go
+ id: linter-setup
+ run: exit 0
+ - name: Run Grep Checks
+ if: steps.linter-setup.conclusion == 'success' && !cancelled()
+ run: bash tools/ci/check_grep.sh
+ - name: Run DreamChecker
+ if: steps.linter-setup.conclusion == 'success' && !cancelled()
+ run: ~/dreamchecker 2>&1 | bash tools/ci/annotate_dm.sh
+ - name: Run Map Checks
+ if: steps.linter-setup.conclusion == 'success' && !cancelled()
run: |
- tools/bootstrap/python -m tools.maplint.source --github
- tools/build/build --ci lint tgui-test
- bash tools/ci/check_filedirs.sh shiptest.dme
- bash tools/ci/check_changelogs.sh
- bash tools/ci/check_misc.sh
- bash tools/ci/check_grep.sh
- tools/bootstrap/python -m dmi.test
tools/bootstrap/python -m mapmerge2.dmm_test
- ~/dreamchecker > ${GITHUB_WORKSPACE}/output-annotations.txt 2>&1
-
- - name: Annotate Lints
- if: always()
- uses: yogstation13/DreamAnnotate@v2
- with:
- outputFile: output-annotations.txt
-
- - name: Run Check Regex
+ tools/bootstrap/python -m tools.maplint.source
+ - name: Run DMI Tests
+ if: steps.linter-setup.conclusion == 'success' && !cancelled()
+ run: tools/bootstrap/python -m dmi.test
+ - name: Check File Directories
+ if: steps.linter-setup.conclusion == 'success' && !cancelled()
+ run: bash tools/ci/check_filedirs.sh shiptest.dme
+ - name: Check Changelogs
+ if: steps.linter-setup.conclusion == 'success' && !cancelled()
+ run: bash tools/ci/check_changelogs.sh
+ - name: Check Miscellaneous Files
+ if: steps.linter-setup.conclusion == 'success' && !cancelled()
+ run: bash tools/ci/check_misc.sh
+ - name: Run TGUI Checks
+ if: steps.linter-setup.conclusion == 'success' && !cancelled()
+ run: tools/build/build --ci lint tgui-test
+ - name: Run Regex Checks
+ if: steps.linter-setup.conclusion == 'success' && !cancelled()
run: |
tools/bootstrap/python -m ci.check_regex --log-changes-only --github-actions
+ cat check_regex_output.txt
+
+ - name: Install OpenDream
+ uses: robinraju/release-downloader@v1.9
+ with:
+ repository: "OpenDreamProject/OpenDream"
+ tag: "latest"
+ fileName: "DMCompiler_linux-x64.tar.gz"
+ extract: true
- - name: Annotate Regex Matches
+ - name: Run OpenDream Linter
run: |
- cat check_regex_output.txt
+ ./DMCompiler_linux-x64/DMCompiler shiptest.dme --suppress-unimplemented --define=CIBUILDING | bash tools/ci/annotate_od.sh
compile_all_maps:
- if: ${{ ! contains(github.event.head_commit.message, '[ci skip]') }}
name: Compile Maps
+ needs: start_gate
runs-on: ubuntu-latest
+ timeout-minutes: 5
+
steps:
- uses: actions/checkout@v3
@@ -106,39 +145,41 @@ jobs:
tools/build/build --ci dm -DCIBUILDING -DCITESTING -DALL_MAPS -DFULL_INIT
run_all_tests:
- if: ${{ ! contains(github.event.head_commit.message, '[ci skip]') }}
name: Integration Tests
+ needs: start_gate
strategy:
fail-fast: false
matrix:
- arg: [
- "BASIC_TESTS",
- "CREATE_AND_DESTROY_TEST",
- "PLANET_GEN_TEST",
- "RUIN_PLACEMENT_TEST",
- "SHIP_PLACEMENT_TEST"
- ]
+ arg:
+ [
+ "BASIC_TESTS",
+ "CREATE_AND_DESTROY_TEST",
+ "PLANET_GEN_TEST",
+ "RUIN_PLACEMENT_TEST",
+ "SHIP_PLACEMENT_TEST",
+ ]
uses: ./.github/workflows/run_integration_tests.yml
with:
arg: ${{ matrix.arg }}
-# run_alternate_tests:
-# if: "!contains(github.event.head_commit.message, '[ci skip]')"
-# name: Alternate Tests
-# strategy:
-# fail-fast: false
-# matrix:
-# major: [515]
-# minor: [1614]
-# uses: ./.github/workflows/run_integration_tests.yml
-# with:
-# major: ${{ matrix.major }}
-# minor: ${{ matrix.minor }}
+ # run_alternate_tests:
+ # if: "!contains(github.event.head_commit.message, '[ci skip]')"
+ # name: Alternate Tests
+ # strategy:
+ # fail-fast: false
+ # matrix:
+ # major: [515]
+ # minor: [1614]
+ # uses: ./.github/workflows/run_integration_tests.yml
+ # with:
+ # major: ${{ matrix.major }}
+ # minor: ${{ matrix.minor }}
test_windows:
- if: ${{ ! contains(github.event.head_commit.message, '[ci skip]') }}
name: Windows Build
+ needs: start_gate
runs-on: windows-latest
+ timeout-minutes: 5
steps:
- uses: actions/checkout@v3
@@ -163,7 +204,18 @@ jobs:
bash tools/deploy.sh ./deploy
- name: Deploy artifact
- uses: actions/upload-artifact@v3
+ uses: actions/upload-artifact@v4
with:
name: deploy
path: deploy
+
+ completion_gate: # Serves as a non-moving target for branch rulesets
+ if: always() && !cancelled()
+ name: Completion Gate
+ needs: [test_windows, compile_all_maps, run_linters, run_all_tests]
+ runs-on: ubuntu-latest
+ steps:
+ - name: Decide whether the needed jobs succeeded or failed
+ uses: re-actors/alls-green@release/v1
+ with:
+ jobs: ${{ toJSON(needs) }}
diff --git a/.github/workflows/codeowner_reviews.yml b/.github/workflows/codeowner_reviews.yml
index 753f575f90d7..6799c5d14b37 100644
--- a/.github/workflows/codeowner_reviews.yml
+++ b/.github/workflows/codeowner_reviews.yml
@@ -6,6 +6,7 @@ on: pull_request_target
jobs:
assign-users:
runs-on: ubuntu-latest
+ timeout-minutes: 5
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so the job can access it
diff --git a/.github/workflows/rerun_flaky_tests.yml b/.github/workflows/rerun_flaky_tests.yml
index e3cbda05749b..b705735a0dfb 100644
--- a/.github/workflows/rerun_flaky_tests.yml
+++ b/.github/workflows/rerun_flaky_tests.yml
@@ -3,7 +3,7 @@ on:
workflow_run:
workflows: [Checks]
types:
- - completed
+ - completed
permissions:
actions: write
@@ -15,23 +15,23 @@ jobs:
runs-on: ubuntu-latest
if: ${{ github.event.workflow_run.conclusion == 'failure' && github.event.workflow_run.run_attempt == 1 }}
steps:
- - name: Checkout
- uses: actions/checkout@v3
- - name: Rerun flaky tests
- uses: actions/github-script@v6
- with:
- script: |
- const { rerunFlakyTests } = await import('${{ github.workspace }}/tools/pull_request_hooks/rerunFlakyTests.js')
- await rerunFlakyTests({ github, context })
+ - name: Checkout
+ uses: actions/checkout@v3
+ - name: Rerun flaky tests
+ uses: actions/github-script@v6
+ with:
+ script: |
+ const { rerunFlakyTests } = await import('${{ github.workspace }}/tools/pull_request_hooks/rerunFlakyTests.js')
+ await rerunFlakyTests({ github, context })
report_flaky_tests:
runs-on: ubuntu-latest
if: ${{ github.event.workflow_run.conclusion == 'success' && github.event.workflow_run.run_attempt == 2 }}
steps:
- - name: Checkout
- uses: actions/checkout@v3
- - name: Report flaky tests
- uses: actions/github-script@v6
- with:
- script: |
- const { reportFlakyTests } = await import('${{ github.workspace }}/tools/pull_request_hooks/rerunFlakyTests.js')
- await reportFlakyTests({ github, context })
+ - name: Checkout
+ uses: actions/checkout@v3
+ - name: Report flaky tests
+ uses: actions/github-script@v6
+ with:
+ script: |
+ const { reportFlakyTests } = await import('${{ github.workspace }}/tools/pull_request_hooks/rerunFlakyTests.js')
+ await reportFlakyTests({ github, context })
diff --git a/.github/workflows/run_integration_tests.yml b/.github/workflows/run_integration_tests.yml
index 9c83d6ab013d..699151fe6f99 100644
--- a/.github/workflows/run_integration_tests.yml
+++ b/.github/workflows/run_integration_tests.yml
@@ -14,9 +14,11 @@ on:
required: false
default: ALL_TESTS
type: string
+
jobs:
run_integration_tests:
runs-on: ubuntu-latest
+ timeout-minutes: 15
services:
mysql:
image: mysql:latest
diff --git a/.github/workflows/tgs_test.yml b/.github/workflows/tgs_test.yml
index a92b6cac76a3..4b7853aa77cf 100644
--- a/.github/workflows/tgs_test.yml
+++ b/.github/workflows/tgs_test.yml
@@ -3,7 +3,9 @@ on:
push:
branches:
- master
+ - 'project/**'
- 'gh-readonly-queue/master/**'
+ - 'gh-readonly-queue/project/**'
paths:
- '.tgs.yml'
- '.github/workflows/tgs_test.yml'
@@ -12,11 +14,13 @@ on:
- 'code/__DEFINES/tgs.dm'
- 'code/game/world.dm'
- 'code/modules/tgs/**'
+ - 'tools/bootstrap/**'
- 'tools/tgs_scripts/**'
- 'tools/tgs_test/**'
pull_request:
branches:
- master
+ - 'project/**'
paths:
- '.tgs.yml'
- '.github/workflows/tgs_test.yml'
@@ -25,6 +29,7 @@ on:
- 'code/__DEFINES/tgs.dm'
- 'code/game/world.dm'
- 'code/modules/tgs/**'
+ - 'tools/bootstrap/**'
- 'tools/tgs_scripts/**'
- 'tools/tgs_test/**'
merge_group:
@@ -54,12 +59,12 @@ jobs:
- 5000:5000 #Can't use env here for some reason
steps:
- name: Setup dotnet
- uses: actions/setup-dotnet@v2
+ uses: actions/setup-dotnet@v4
with:
dotnet-version: 8.0.x
- name: Checkout Repository
- uses: actions/checkout@v3
+ uses: actions/checkout@v4
- name: Test TGS Integration
run: dotnet run -c Release --project tools/tgs_test ${{ github.repository }} /tgs_instances/tgstation ${{ env.TGS_API_PORT }} ${{ github.event.pull_request.head.sha || github.sha }} ${{ secrets.GITHUB_TOKEN }} ${{ env.PR_NUMBER }}
diff --git a/.gitignore b/.gitignore
index 94713bc82e1c..196353141536 100644
--- a/.gitignore
+++ b/.gitignore
@@ -20,6 +20,7 @@
*.lk
*.int
*.backup
+/shiptest.json
### https://raw.github.com/github/gitignore/cc542de017c606138a87ee4880e5f06b3a306def/Global/Linux.gitignore
*~
diff --git a/__odlint.dm b/__odlint.dm
new file mode 100644
index 000000000000..b7c120514a1d
--- /dev/null
+++ b/__odlint.dm
@@ -0,0 +1,10 @@
+// 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
+
+#if !defined(SPACEMAN_DMM) && defined(OPENDREAM)
+// This is in a separate file as a hack to avoid SpacemanDMM
+// evaluating the #pragma lines, even if its outside a block it cares about
+// (Also so people can code-own it. Shoutout to AA)
+#include "tools/ci/od_lints.dm"
+#endif
diff --git a/check_regex.yaml b/check_regex.yaml
index a9ed6b699d7f..95d3738da5dc 100644
--- a/check_regex.yaml
+++ b/check_regex.yaml
@@ -57,7 +57,7 @@ standards:
- no_more:
[
- 34,
+ 32,
"indentions inside defines",
'^(\s*)#define (\w*)( {2,}| ?\t+)(?!(\/\/|\/\*))',
]
diff --git a/code/__DEFINES/misc.dm b/code/__DEFINES/misc.dm
index 68ef8b65b127..384b7fcc46c7 100644
--- a/code/__DEFINES/misc.dm
+++ b/code/__DEFINES/misc.dm
@@ -447,3 +447,7 @@ GLOBAL_LIST_INIT(ghost_others_options, list(GHOST_OTHERS_SIMPLE, GHOST_OTHERS_DE
#define ROUND_END_NOT_DELAYED 0
#define ROUND_END_DELAYED 1
#define ROUND_END_TGS 2
+
+/// A null statement to guard against EmptyBlock lint without necessitating the use of pass()
+/// Used to avoid proc-call overhead. But use sparingly. Probably pointless in most places.
+#define EMPTY_BLOCK_GUARD ;
diff --git a/code/__HELPERS/_logging.dm b/code/__HELPERS/_logging.dm
index 1ab889987695..16de5230a2bb 100644
--- a/code/__HELPERS/_logging.dm
+++ b/code/__HELPERS/_logging.dm
@@ -10,14 +10,22 @@
#define WRITE_LOG(log, text) rustg_log_write(log, text, "true")
#define WRITE_LOG_NO_FORMAT(log, text) rustg_log_write(log, text, "false")
-//print a warning message to world.log
+#ifdef UNIT_TESTS
+#define WARNING(MSG) log_world("::warning file=[__FILE__],line=[__LINE__]::[MSG] src: [UNLINT(src)] usr: [usr].")
+#else
#define WARNING(MSG) warning("[MSG] in [__FILE__] at line [__LINE__] src: [UNLINT(src)] usr: [usr].")
+#endif
+/// Print a warning message to world.log
/proc/warning(msg)
msg = "## WARNING: [msg]"
log_world(msg)
-//not an error or a warning, but worth to mention on the world log, just in case.
+#ifdef UNIT_TESTS
+#define NOTICE(MSG) log_world("::notice file=[__FILE__],line=[__LINE__]::[MSG] src: [UNLINT(src)] usr: [usr].")
+#else
#define NOTICE(MSG) notice(MSG)
+#endif
+///not an error or a warning, but worth to mention on the world log, just in case.
/proc/notice(msg)
msg = "## NOTICE: [msg]"
log_world(msg)
diff --git a/code/__HELPERS/type2type.dm b/code/__HELPERS/type2type.dm
index 452a522870a0..3770b4e847ad 100644
--- a/code/__HELPERS/type2type.dm
+++ b/code/__HELPERS/type2type.dm
@@ -94,8 +94,8 @@
return "northwest"
if(SOUTHWEST)
return "southwest"
- else
- return
+
+ return NONE
//Turns text into proper directions
/proc/text2dir(direction)
@@ -116,8 +116,8 @@
return SOUTHEAST
if("SOUTHWEST")
return SOUTHWEST
- else
- return
+
+ return NONE
//Converts an angle (degrees) into an ss13 direction
GLOBAL_LIST_INIT(modulo_angle_to_dir, list(NORTH,NORTHEAST,EAST,SOUTHEAST,SOUTH,SOUTHWEST,WEST,NORTHWEST))
diff --git a/code/_compile_options.dm b/code/_compile_options.dm
index ee7638ea853d..9ff2cbe896ae 100644
--- a/code/_compile_options.dm
+++ b/code/_compile_options.dm
@@ -63,7 +63,7 @@
#warn compiling in TESTING mode. testing() debug messages will be visible.
#endif
-#ifdef CIBUILDING
+#if defined(CIBUILDING) && !defined(OPENDREAM)
#define UNIT_TESTS
#endif
@@ -90,3 +90,16 @@
// A reasonable number of maximum overlays an object needs
// If you think you need more, rethink it
#define MAX_ATOM_OVERLAYS 100
+
+#if defined(OPENDREAM)
+ #if !defined(CIBUILDING)
+ #warn You are building with OpenDream. Remember to build TGUI manually.
+ #warn You can do this by running tgui-build.cmd from the bin directory.
+ #endif
+#else
+ #if !defined(CBT) && !defined(SPACEMAN_DMM)
+ #warn Building with Dream Maker is no longer supported and will result in errors.
+ #warn In order to build, run BUILD.cmd in the root directory.
+ #warn Consider switching to VSCode editor instead, where you can press Ctrl+Shift+B to build.
+ #endif
+#endif
diff --git a/code/controllers/subsystem/acid.dm b/code/controllers/subsystem/acid.dm
index 0ea8967e263c..efbc5e7d260e 100644
--- a/code/controllers/subsystem/acid.dm
+++ b/code/controllers/subsystem/acid.dm
@@ -33,8 +33,7 @@ SUBSYSTEM_DEF(acid)
return
continue
- if(O.acid_level && O.acid_processing())
- else
+ if(!O.acid_level || !O.acid_processing())
O.update_appearance()
processing -= O
diff --git a/code/datums/components/_component.dm b/code/datums/components/_component.dm
index 6c15d00869f2..695b6519f9c7 100644
--- a/code/datums/components/_component.dm
+++ b/code/datums/components/_component.dm
@@ -364,17 +364,17 @@
*/
/datum/proc/GetExactComponent(datum/component/c_type)
RETURN_TYPE(c_type)
- if(initial(c_type.dupe_mode) == COMPONENT_DUPE_ALLOWED || initial(c_type.dupe_mode) == COMPONENT_DUPE_SELECTIVE)
+ var/initial_type_mode = initial(c_type.dupe_mode)
+ if(initial_type_mode == COMPONENT_DUPE_ALLOWED || initial_type_mode == COMPONENT_DUPE_SELECTIVE)
stack_trace("GetComponent was called to get a component of which multiple copies could be on an object. This can easily break and should be changed. Type: \[[c_type]\]")
- var/list/dc = datum_components
- if(!dc)
+ var/list/all_components = datum_components
+ if(!all_components)
return null
- var/datum/component/C = dc[c_type]
- if(C)
- if(length(C))
- C = C[1]
- if(C.type == c_type)
- return C
+ var/datum/component/potential_component
+ if(length(all_components))
+ potential_component = all_components[c_type]
+ if(potential_component?.type == c_type)
+ return potential_component
return null
/**
diff --git a/code/datums/components/food/edible.dm b/code/datums/components/food/edible.dm
index 729c50f2349f..f5129fb761b1 100644
--- a/code/datums/components/food/edible.dm
+++ b/code/datums/components/food/edible.dm
@@ -153,9 +153,9 @@ Behavior that's still missing from this component that original food items had t
SIGNAL_HANDLER
if(!(food_flags & FOOD_IN_CONTAINER))
- switch (bitecount)
- if (0)
- return
+ switch(bitecount)
+ if(0)
+ EMPTY_BLOCK_GUARD
if(1)
examine_list += "[parent] was bitten by someone!"
if(2,3)
diff --git a/code/datums/components/radioactive.dm b/code/datums/components/radioactive.dm
index 9306f6aae899..26d98b99e80e 100644
--- a/code/datums/components/radioactive.dm
+++ b/code/datums/components/radioactive.dm
@@ -55,7 +55,6 @@
var/filter = master.get_filter("rad_glow")
if(filter)
animate(filter, alpha = 110, time = 15, loop = -1)
- animate(alpha = 40, time = 25)
/datum/component/radioactive/InheritComponent(datum/component/C, i_am_original, _strength, _source, _half_life, _can_contaminate)
if(!i_am_original)
diff --git a/code/game/machinery/computer/medical.dm b/code/game/machinery/computer/medical.dm
index 17c5dc2ef39c..9bd38b62c9fa 100644
--- a/code/game/machinery/computer/medical.dm
+++ b/code/game/machinery/computer/medical.dm
@@ -168,7 +168,6 @@
else
dat += "
[bdat]"
- else
else
dat += "{Log In}"
var/datum/browser/popup = new(user, "med_rec", "Medical Records Console", 600, 400)
@@ -375,7 +374,6 @@
if(istype(active1.fields["photo_side"], /obj/item/photo))
var/obj/item/photo/P = active1.fields["photo_side"]
P.show(usr)
- else
else if(href_list["p_stat"])
if(active1)
@@ -488,16 +486,12 @@
for(var/datum/data/record/R in GLOB.data_core.medical)
if((lowertext(R.fields["name"]) == t1 || t1 == lowertext(R.fields["id"]) || t1 == lowertext(R.fields["b_dna"])))
active2 = R
- else
- //Foreach continue //goto(3229)
if(!(active2))
temp = text("Could not locate record [].", sanitize(t1))
else
for(var/datum/data/record/E in GLOB.data_core.general)
if((E.fields["name"] == active2.fields["name"] || E.fields["id"] == active2.fields["id"]))
active1 = E
- else
- //Foreach continue //goto(3334)
screen = 4
else if(href_list["print_p"])
diff --git a/code/game/machinery/computer/security.dm b/code/game/machinery/computer/security.dm
index 37759d04b13e..cdfad1556187 100644
--- a/code/game/machinery/computer/security.dm
+++ b/code/game/machinery/computer/security.dm
@@ -228,7 +228,6 @@
dat += "New Security Record
"
dat += "Delete Record (ALL)
Print Record
Print Wanted Poster
Print Missing Persons Poster
Back
"
dat += "{Log Out}"
- else
else
dat += "{Log In}"
var/datum/browser/popup = new(user, "secure_rec", "Security Records Console", 600, 400)
diff --git a/code/game/objects/items/crayons.dm b/code/game/objects/items/crayons.dm
index d703ae86ca7d..cd6fafd4dbef 100644
--- a/code/game/objects/items/crayons.dm
+++ b/code/game/objects/items/crayons.dm
@@ -235,7 +235,7 @@
. = TRUE
if("select_stencil")
var/stencil = params["item"]
- if(stencil in all_drawables + randoms)
+ if(stencil in (all_drawables + randoms))
drawtype = stencil
. = TRUE
text_buffer = ""
@@ -320,7 +320,7 @@
temp = "symbol"
else if(drawing in drawings)
temp = "drawing"
- else if(drawing in graffiti|oriented)
+ else if(drawing in (graffiti|oriented))
temp = "graffiti"
var/graf_rot
diff --git a/code/game/objects/items/devices/PDA/PDA.dm b/code/game/objects/items/devices/PDA/PDA.dm
index e259e56ccd0e..70871e2ddc77 100644
--- a/code/game/objects/items/devices/PDA/PDA.dm
+++ b/code/game/objects/items/devices/PDA/PDA.dm
@@ -410,7 +410,7 @@ GLOBAL_LIST_EMPTY(PDAs)
//BASIC FUNCTIONS===================================
if("Refresh")//Refresh, goes to the end of the proc.
-
+ EMPTY_BLOCK_GUARD
if("Return")//Return
if(mode<=9)
mode = 0
diff --git a/code/game/objects/items/devices/mines.dm b/code/game/objects/items/devices/mines.dm
index 6319cc1a638d..4f2169350d79 100644
--- a/code/game/objects/items/devices/mines.dm
+++ b/code/game/objects/items/devices/mines.dm
@@ -469,7 +469,7 @@
shrapnel_magnitude = 4
/obj/item/mine/pressure/explosive/fire/mine_effect(mob/victim)
- if(victim && victim.is_holding(src))//in case it's been picked up
+ if(victim?.is_holding(src))//in case it's been picked up
for(var/turf/T in view(4,victim))
T.IgniteTurf(15)
new /obj/effect/hotspot(T)
diff --git a/code/game/objects/items/pet_carrier.dm b/code/game/objects/items/pet_carrier.dm
index a08b1398aad8..0882034b165a 100644
--- a/code/game/objects/items/pet_carrier.dm
+++ b/code/game/objects/items/pet_carrier.dm
@@ -31,13 +31,13 @@
/obj/item/pet_carrier/Exited(atom/movable/occupant)
. = ..()
- if(occupant in occupants && isliving(occupant))
+ if((occupant in occupants) && isliving(occupant))
var/mob/living/L = occupant
occupants -= occupant
occupant_weight -= L.mob_size
/obj/item/pet_carrier/handle_atom_del(atom/A)
- if(A in occupants && isliving(A))
+ if((A in occupants) && isliving(A))
var/mob/living/L = A
occupants -= L
occupant_weight -= L.mob_size
@@ -178,7 +178,7 @@
add_occupant(target)
/obj/item/pet_carrier/proc/add_occupant(mob/living/occupant)
- if(occupant in occupants || !istype(occupant))
+ if((occupant in occupants) || !istype(occupant))
return
occupant.forceMove(src)
occupants += occupant
diff --git a/code/game/objects/items/storage/guncases.dm b/code/game/objects/items/storage/guncases.dm
index c846dd36b050..760a84f4e3aa 100644
--- a/code/game/objects/items/storage/guncases.dm
+++ b/code/game/objects/items/storage/guncases.dm
@@ -3,6 +3,8 @@
desc = "A large box designed for holding firearms and magazines safely."
icon = 'icons/obj/guncase.dmi'
icon_state = "guncase"
+ lefthand_file = 'icons/mob/inhands/equipment/toolbox_lefthand.dmi'
+ righthand_file = 'icons/mob/inhands/equipment/toolbox_righthand.dmi'
item_state = "infiltrator_case"
force = 12
throwforce = 12
diff --git a/code/game/objects/obj_defense.dm b/code/game/objects/obj_defense.dm
index e0e115b81d01..363a83d965a3 100644
--- a/code/game/objects/obj_defense.dm
+++ b/code/game/objects/obj_defense.dm
@@ -24,11 +24,8 @@
/obj/proc/run_obj_armor(damage_amount, damage_type, damage_flag = 0, attack_dir, armour_penetration = 0)
if(damage_flag == "melee" && damage_amount < damage_deflection)
return 0
- switch(damage_type)
- if(BRUTE)
- if(BURN)
- else
- return 0
+ if(damage_type != BRUTE && damage_type != BURN)
+ return 0
var/armor_protection = 0
if(damage_flag)
armor_protection = armor.getRating(damage_flag)
diff --git a/code/game/objects/structures/crates_lockers/closets/utility_closets.dm b/code/game/objects/structures/crates_lockers/closets/utility_closets.dm
index 089b6f8f792c..fa4fe485015d 100644
--- a/code/game/objects/structures/crates_lockers/closets/utility_closets.dm
+++ b/code/game/objects/structures/crates_lockers/closets/utility_closets.dm
@@ -50,7 +50,7 @@
new /obj/item/clothing/mask/breath(src)
if ("nothing")
- // doot
+ EMPTY_BLOCK_GUARD
// teehee
if ("delete")
diff --git a/code/game/objects/structures/crateshelf.dm b/code/game/objects/structures/crateshelf.dm
index 3b1387f5490b..0bf1cfa64c4f 100644
--- a/code/game/objects/structures/crateshelf.dm
+++ b/code/game/objects/structures/crateshelf.dm
@@ -123,6 +123,7 @@
crate.SpinAnimation(rand(4,7), 1) // Spin the crates around a little as they fall. Randomness is applied so it doesn't look weird.
switch(pick(1, 1, 1, 1, 2, 2, 3)) // Randomly pick whether to do nothing, open the crate, or break it open.
if(1) // Believe it or not, this does nothing.
+ EMPTY_BLOCK_GUARD
if(2) // Open the crate!
if(crate.open()) // Break some open, cause a little chaos.
crate.visible_message(span_warning("[crate]'s lid falls open!"))
diff --git a/code/modules/admin/permissionedit.dm b/code/modules/admin/permissionedit.dm
index 5e354e0f6550..0046d353dc5c 100644
--- a/code/modules/admin/permissionedit.dm
+++ b/code/modules/admin/permissionedit.dm
@@ -214,7 +214,7 @@
. = ckey(admin_key)
if(!.)
return FALSE
- if(!admin_ckey && (. in GLOB.admin_datums+GLOB.deadmins))
+ if(!admin_ckey && (. in (GLOB.admin_datums+GLOB.deadmins)))
to_chat(usr, "[admin_key] is already an admin.", confidential = TRUE)
return FALSE
if(use_db)
diff --git a/code/modules/admin/view_variables/debug_variables.dm b/code/modules/admin/view_variables/debug_variables.dm
index 68d2b4c2ec64..60528592f4e0 100644
--- a/code/modules/admin/view_variables/debug_variables.dm
+++ b/code/modules/admin/view_variables/debug_variables.dm
@@ -1,23 +1,24 @@
#define VV_HTML_ENCODE(thing) (sanitize ? html_encode(thing) : thing)
/// Get displayed variable in VV variable list
-/proc/debug_variable(name, value, level, datum/D, sanitize = TRUE) //if D is a list, name will be index, and value will be assoc value.
+/proc/debug_variable(name, value, level, datum/owner, sanitize = TRUE) //if D is a list, name will be index, and value will be assoc value.
var/header
- if(D)
- if(islist(D))
+ if(owner)
+ if(islist(owner))
+ var/list/owner_list = owner
var/index = name
if (value)
- name = D[name] //name is really the index until this line
+ name = owner_list[name] //name is really the index until this line
else
- value = D[name]
- header = "