diff --git a/.github/workflows/ci_suite.yml b/.github/workflows/ci_suite.yml
index f36055dab0..34c1ec1b0e 100644
--- a/.github/workflows/ci_suite.yml
+++ b/.github/workflows/ci_suite.yml
@@ -13,11 +13,20 @@ jobs:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
- - name: Setup cache
+ - name: Restore SpacemanDMM cache
uses: actions/cache@v2
with:
- path: $HOME/SpacemanDMM
- key: ${{ runner.os }}-spacemandmm
+ path: ~/SpacemanDMM
+ key: ${{ runner.os }}-spacemandmm-${{ secrets.CACHE_PURGE_KEY }}
+ - name: Restore Yarn cache
+ uses: actions/cache@v2
+ with:
+ path: tgui/.yarn/cache
+ key: ${{ runner.os }}-yarn-${{ secrets.CACHE_PURGE_KEY }}-${{ hashFiles('tgui/yarn.lock') }}
+ restore-keys: |
+ ${{ runner.os }}-build-${{ secrets.CACHE_PURGE_KEY }}-
+ ${{ runner.os }}-build-
+ ${{ runner.os }}-
- name: Install Tools
run: |
pip3 install setuptools
@@ -28,11 +37,10 @@ jobs:
run: |
bash tools/ci/check_filedirs.sh tgstation.dme
bash tools/ci/check_changelogs.sh
+ bash tools/ci/check_grep.sh
find . -name "*.php" -print0 | xargs -0 -n1 php -l
find . -name "*.json" -not -path "*/node_modules/*" -print0 | xargs -0 python3 ./tools/json_verifier.py
- tgui/bin/tgui --lint
- tgui/bin/tgui --test
- bash tools/ci/check_grep.sh
+ tools/build/build --ci lint
tools/bootstrap/python -m dmi.test
tools/bootstrap/python -m mapmerge2.dmm_test
~/dreamchecker > ${GITHUB_WORKSPACE}/output-annotations.txt 2>&1
@@ -48,19 +56,16 @@ jobs:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
- - name: Setup cache
+ - name: Restore BYOND cache
uses: actions/cache@v2
with:
- path: $HOME/BYOND
- key: ${{ runner.os }}-byond
+ path: ~/BYOND
+ key: ${{ runner.os }}-byond-${{ secrets.CACHE_PURGE_KEY }}
- name: Compile All Maps
run: |
bash tools/ci/install_byond.sh
source $HOME/BYOND/byond/bin/byondsetup
- python3 tools/ci/template_dm_generator.py
- tools/build/build
- env:
- CBT_BUILD_MODE : ALL_MAPS
+ tools/build/build --ci dm -DCIBUILDING -DCITESTING -DALL_MAPS
run_all_tests:
if: "!contains(github.event.head_commit.message, '[ci skip]')"
@@ -76,11 +81,20 @@ jobs:
options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=3
steps:
- uses: actions/checkout@v2
- - name: Setup cache
+ - name: Restore BYOND cache
uses: actions/cache@v2
with:
- path: $HOME/BYOND
- key: ${{ runner.os }}-byond
+ path: ~/BYOND
+ key: ${{ runner.os }}-byond-${{ secrets.CACHE_PURGE_KEY }}
+ - name: Restore Yarn cache
+ uses: actions/cache@v2
+ with:
+ path: tgui/.yarn/cache
+ key: ${{ runner.os }}-yarn-${{ secrets.CACHE_PURGE_KEY }}-${{ hashFiles('tgui/yarn.lock') }}
+ restore-keys: |
+ ${{ runner.os }}-build-${{ secrets.CACHE_PURGE_KEY }}-
+ ${{ runner.os }}-build-
+ ${{ runner.os }}-
- name: Setup database
run: |
sudo systemctl start mysql
@@ -88,7 +102,7 @@ jobs:
mysql -u root -proot tg_ci < SQL/tgstation_schema.sql
mysql -u root -proot -e 'CREATE DATABASE tg_ci_prefixed;'
mysql -u root -proot tg_ci_prefixed < SQL/tgstation_schema_prefixed.sql
- - name: Install rust dependencies
+ - name: Install rust-g
run: |
sudo dpkg --add-architecture i386
sudo apt update || true
@@ -96,15 +110,14 @@ jobs:
bash tools/ci/install_rust_g.sh
- name: Install auxmos
run: |
+ sudo apt update || true
bash tools/ci/install_auxmos.sh
- name: Compile and run tests
run: |
bash tools/ci/install_byond.sh
source $HOME/BYOND/byond/bin/byondsetup
- tools/build/build -DCIBUILDING
+ tools/build/build --ci -DCIBUILDING
bash tools/ci/run_server.sh
- env:
- CBT_BUILD_MODE: TEST_RUN
test_windows:
if: "!contains(github.event.head_commit.message, '[ci skip]')"
@@ -112,6 +125,15 @@ jobs:
runs-on: windows-latest
steps:
- uses: actions/checkout@v2
+ - name: Restore Yarn cache
+ uses: actions/cache@v2
+ with:
+ path: tgui/.yarn/cache
+ key: ${{ runner.os }}-yarn-${{ secrets.CACHE_PURGE_KEY }}-${{ hashFiles('tgui/yarn.lock') }}
+ restore-keys: |
+ ${{ runner.os }}-build-${{ secrets.CACHE_PURGE_KEY }}-
+ ${{ runner.os }}-build-
+ ${{ runner.os }}-
- name: Compile
run: pwsh tools/ci/build.ps1
env:
diff --git a/.github/workflows/generate_documentation.yml b/.github/workflows/generate_documentation.yml
index 0fa3f315be..265e179ff0 100644
--- a/.github/workflows/generate_documentation.yml
+++ b/.github/workflows/generate_documentation.yml
@@ -12,8 +12,8 @@ jobs:
- name: Setup cache
uses: actions/cache@v2
with:
- path: $HOME/SpacemanDMM
- key: ${{ runner.os }}-spacemandmm
+ path: ~/SpacemanDMM
+ key: ${{ runner.os }}-spacemandmm-${{ secrets.CACHE_PURGE_KEY }}
- name: Install SpacemanDMM
run: bash tools/ci/install_spaceman_dmm.sh dmdoc
- name: Generate documentation
diff --git a/.gitignore b/.gitignore
index 91a0ef08eb..56a447fdd1 100644
--- a/.gitignore
+++ b/.gitignore
@@ -7,14 +7,16 @@
#Ignore byond config folder.
/cfg/**/*
-#Ignore rust-g and auxmos libraries which are compiled with scripts
-*.so
-/tools/build/binaries/**/*
+# Ignore compiled linux libs in the root folder, e.g. librust_g.so
+/*.so
#Ignore compiled files and other files generated during compilation.
*.mdme
+*.mdme.*
*.dmb
*.rsc
+*.m.dme
+*.test.dme
*.lk
*.int
*.backup
@@ -53,27 +55,6 @@ __pycache__/
*.py[cod]
*$py.class
-# C extensions
-#*.so
-
-# Distribution / packaging
-.Python
-env/
-build/
-develop-eggs/
-dist/
-downloads/
-eggs/
-.eggs/
-lib/
-lib64/
-parts/
-sdist/
-var/
-*.egg-info/
-.installed.cfg
-*.egg
-
# PyInstaller
# Usually these files are written by a python script from a template
# before PyInstaller builds the exe, so as to inject date/other infos into it.
@@ -81,8 +62,7 @@ var/
*.spec
# Installer logs
-pip-log.txt
-pip-delete-this-directory.txt
+pip-*.txt
# Unit test / coverage reports
htmlcov/
@@ -92,7 +72,6 @@ htmlcov/
.cache
nosetests.xml
coverage.xml
-*,cover
.hypothesis/
# Translations
@@ -101,10 +80,6 @@ coverage.xml
# Django stuff:
*.log
-local_settings.py
-
-# Flask instance folder
-instance/
# Scrapy stuff:
.scrapy
@@ -112,9 +87,6 @@ instance/
# Sphinx documentation
docs/_build/
-# PyBuilder
-target/
-
# IPython Notebook
.ipynb_checkpoints
@@ -127,10 +99,6 @@ celerybeat-schedule
# dotenv
.env
-# virtualenv
-venv/
-ENV/
-
# IntelliJ IDEA / PyCharm (with plugin)
.idea
@@ -153,12 +121,6 @@ Desktop.ini
# Recycle Bin used on file shares
$RECYCLE.BIN/
-# Windows Installer files
-#*.cab
-#*.msi
-#*.msm
-#*.msp
-
# Windows shortcuts
*.lnk
@@ -199,11 +161,10 @@ Temporary Items
#Visual studio stuff
*.vscode/*
-!/.vscode/extensions.json
-tools/MapAtmosFixer/MapAtmosFixer/obj/*
-tools/MapAtmosFixer/MapAtmosFixer/bin/*
-tools/CreditsTool/bin/*
-tools/CreditsTool/obj/*
+/tools/MapAtmosFixer/MapAtmosFixer/obj/*
+/tools/MapAtmosFixer/MapAtmosFixer/bin/*
+/tools/CreditsTool/bin/*
+/tools/CreditsTool/obj/*
#GitHub Atom
.atom-build.json
@@ -228,13 +189,10 @@ tools/CreditsTool/obj/*
!/config/title_screens/images/exclude
#Linux docker
-tools/LinuxOneShot/SetupProgram/obj/*
-tools/LinuxOneShot/SetupProgram/bin/*
-tools/LinuxOneShot/SetupProgram/.vs
-tools/LinuxOneShot/Database
-tools/LinuxOneShot/TGS_Config
-tools/LinuxOneShot/TGS_Instances
-tools/LinuxOneShot/TGS_Logs
-
-# Common build tooling
-!/tools/build
+/tools/LinuxOneShot/SetupProgram/obj/*
+/tools/LinuxOneShot/SetupProgram/bin/*
+/tools/LinuxOneShot/SetupProgram/.vs
+/tools/LinuxOneShot/Database
+/tools/LinuxOneShot/TGS_Config
+/tools/LinuxOneShot/TGS_Instances
+/tools/LinuxOneShot/TGS_Logs
diff --git a/Build.bat b/Build.bat
index dd3a6fd9d9..68eaef0c2d 100644
--- a/Build.bat
+++ b/Build.bat
@@ -1,2 +1,3 @@
-@call tools\build\build
-@pause
+@echo off
+call "%~dp0\tools\build\build.bat" %*
+pause
diff --git a/CLEAN.bat b/CLEAN.bat
new file mode 100644
index 0000000000..47293bb769
--- /dev/null
+++ b/CLEAN.bat
@@ -0,0 +1,3 @@
+@echo off
+call "%~dp0\tools\build\build.bat" dist-clean
+pause
diff --git a/README.md b/README.md
index bbceb0f05b..cc485278cc 100644
--- a/README.md
+++ b/README.md
@@ -1,7 +1,7 @@
## Citadel Station 13
Based and maintained from /tg/station.
-[](https://travis-ci.org/Citadel-Station-13/Citadel-Station-13)
+[](https://github.com/Citadel-Station-13/Citadel-Station-13/actions?query=workflow%3A%22CI+Suite%22)
[](http://isitmaintained.com/project/Citadel-Station-13/Citadel-Station-13 "Percentage of issues still open")
[](http://isitmaintained.com/project/Citadel-Station-13/Citadel-Station-13 "Average time to resolve an issue")
@@ -100,6 +100,14 @@ install, overwriting when prompted except if we've specified otherwise, and
recompile the game. Once you start the server up again, you should be running
the new version.
+## :exclamation: How to compile :exclamation:
+
+On **2021-01-04** we have changed the way to compile the codebase.
+
+Find `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 setup the server normally by opening `tgstation.dmb` in DreamDaemon.
+
+**Building tgstation in DreamMaker directly is now deprecated and might produce errors**, such as `'tgui.bundle.js': cannot find file`.
+
## HOSTING
If you'd like a more robust server hosting option for tgstation and its
diff --git a/RUN_SERVER.bat b/RUN_SERVER.bat
new file mode 100644
index 0000000000..93438f0c2e
--- /dev/null
+++ b/RUN_SERVER.bat
@@ -0,0 +1,3 @@
+@echo off
+call "%~dp0\tools\build\build.bat" server %*
+pause
diff --git a/_maps/RandomRuins/LavaRuins/lavaland_surface_library.dmm b/_maps/RandomRuins/LavaRuins/lavaland_surface_library.dmm
index d1dcf9f11d..829761b042 100644
--- a/_maps/RandomRuins/LavaRuins/lavaland_surface_library.dmm
+++ b/_maps/RandomRuins/LavaRuins/lavaland_surface_library.dmm
@@ -64,10 +64,6 @@
/obj/item/paper/fluff/ruins/oldstation/protosing,
/turf/open/floor/plating/asteroid/basalt/lava_land_surface,
/area/ruin/unpowered/buried_library)
-"av" = (
-/obj/structure/bookcase/random,
-/turf/open/space/basic,
-/area/ruin/unpowered/buried_library)
"aw" = (
/turf/open/floor/plating,
/area/ruin/unpowered/buried_library)
@@ -220,7 +216,6 @@
/area/ruin/unpowered/buried_library)
"bq" = (
/obj/structure/mineral_door/wood,
-/obj/structure/barricade/wooden/crude/snow,
/turf/open/floor/wood,
/area/ruin/unpowered/buried_library)
"br" = (
@@ -369,7 +364,7 @@ bi
aC
ae
aQ
-aq
+ah
bi
aq
bg
@@ -394,7 +389,7 @@ ae
bi
aM
ae
-aq
+ah
bm
aq
aA
@@ -440,7 +435,7 @@ aa
ad
bi
bi
-av
+aq
aA
bi
aG
@@ -465,7 +460,7 @@ aa
ad
ac
as
-av
+aq
aF
aD
aD
@@ -550,7 +545,7 @@ aD
bi
ae
bm
-ah
+aq
ag
br
ac
@@ -573,9 +568,9 @@ ae
af
bp
bi
-ah
+aq
bi
-ah
+aq
bp
ac
ad
@@ -596,9 +591,9 @@ ah
ao
ah
az
-ah
+aq
bi
-ah
+aq
bi
bn
ao
@@ -621,7 +616,7 @@ ah
aA
ah
ao
-ah
+aq
bi
bi
bl
@@ -646,7 +641,7 @@ ah
ao
aV
bi
-ah
+aq
bp
bi
bm
diff --git a/_maps/RandomRuins/LavaRuins/lavaland_surface_mining_site.dmm b/_maps/RandomRuins/LavaRuins/lavaland_surface_mining_site.dmm
index b4f7fec16f..dfe6a1b335 100644
--- a/_maps/RandomRuins/LavaRuins/lavaland_surface_mining_site.dmm
+++ b/_maps/RandomRuins/LavaRuins/lavaland_surface_mining_site.dmm
@@ -53,8 +53,8 @@
/turf/open/floor/wood,
/area/ruin/unpowered)
"m" = (
-/obj/structure/barricade/wooden/crude/snow,
/obj/structure/mineral_door/wood,
+/obj/effect/decal/cleanable/trail_holder,
/turf/open/floor/wood,
/area/ruin/unpowered)
"n" = (
@@ -68,6 +68,7 @@
/obj/machinery/light/broken{
dir = 4
},
+/obj/effect/decal/cleanable/trail_holder,
/turf/open/floor/wood,
/area/ruin/unpowered)
"q" = (
@@ -95,6 +96,10 @@
/obj/effect/decal/cleanable/trail_holder,
/turf/open/floor/wood,
/area/ruin/unpowered)
+"N" = (
+/obj/effect/decal/cleanable/trail_holder,
+/turf/open/floor/plating/asteroid/basalt/lava_land_surface,
+/area/lavaland/surface/outdoors)
(1,1,1) = {"
i
@@ -569,7 +574,7 @@ b
l
f
f
-f
+s
s
b
b
@@ -595,7 +600,7 @@ b
b
b
f
-f
+s
p
b
b
@@ -622,7 +627,7 @@ i
b
b
b
-f
+s
b
b
b
@@ -649,7 +654,7 @@ i
i
i
b
-f
+s
b
i
i
@@ -676,7 +681,7 @@ i
i
i
b
-f
+s
b
i
i
@@ -703,7 +708,7 @@ i
i
i
b
-f
+s
b
i
i
@@ -757,7 +762,7 @@ i
i
n
h
-n
+N
h
n
i
diff --git a/_maps/map_files/PubbyStation/PubbyStation.dmm b/_maps/map_files/PubbyStation/PubbyStation.dmm
index 9b77a606ca..2287ac292d 100644
--- a/_maps/map_files/PubbyStation/PubbyStation.dmm
+++ b/_maps/map_files/PubbyStation/PubbyStation.dmm
@@ -54557,8 +54557,8 @@
id = "xenoigniter";
luminosity = 2
},
-/obj/machinery/atmospherics/components/unary/vent_pump/on{
- dir = 8
+/obj/machinery/atmospherics/pipe/manifold/supply/hidden{
+ dir = 4
},
/turf/open/floor/engine,
/area/science/xenobiology)
@@ -55493,7 +55493,7 @@
/obj/structure/cable{
icon_state = "1-2"
},
-/obj/machinery/atmospherics/pipe/manifold/supply/hidden,
+/obj/machinery/atmospherics/pipe/manifold4w/supply/hidden,
/turf/open/floor/plasteel/dark,
/area/science/xenobiology)
"hVx" = (
@@ -55915,6 +55915,7 @@
id = "xenoigniter";
luminosity = 2
},
+/obj/machinery/atmospherics/pipe/simple/supply/hidden,
/turf/open/floor/engine,
/area/science/xenobiology)
"iPz" = (
@@ -59469,6 +59470,7 @@
/obj/machinery/atmospherics/components/unary/vent_scrubber/on{
dir = 8
},
+/obj/machinery/atmospherics/pipe/simple/supply/hidden,
/turf/open/floor/engine,
/area/science/xenobiology)
"qAx" = (
@@ -60673,6 +60675,7 @@
/area/maintenance/department/science)
"tfP" = (
/obj/item/beacon,
+/obj/machinery/atmospherics/pipe/simple/supply/hidden,
/turf/open/floor/engine,
/area/science/xenobiology)
"tfZ" = (
@@ -114727,13 +114730,13 @@ abI
aby
aaa
xKc
-blX
+lCN
qAk
iPj
tfP
geN
qAk
-blX
+uzB
xKc
aaa
aby
diff --git a/auxmos.dll b/auxmos.dll
index 54fb0c6c98..1506ba75e7 100644
Binary files a/auxmos.dll and b/auxmos.dll differ
diff --git a/auxmos.pdb b/auxmos.pdb
index 031e66d103..a8ec5f5a67 100644
Binary files a/auxmos.pdb and b/auxmos.pdb differ
diff --git a/code/__DEFINES/_flags/obj_flags.dm b/code/__DEFINES/_flags/obj_flags.dm
index e48146a1d0..ac772c6e8e 100644
--- a/code/__DEFINES/_flags/obj_flags.dm
+++ b/code/__DEFINES/_flags/obj_flags.dm
@@ -15,6 +15,7 @@
#define BLOCK_Z_IN_UP (1<<12) // Should this object block z uprise from below?
#define SHOVABLE_ONTO (1<<13)//called on turf.shove_act() to consider whether an object should have a niche effect (defined in their own shove_act()) when someone is pushed onto it, or do a sanity CanPass() check.
#define EXAMINE_SKIP (1<<14) /// Makes the Examine proc not read out this item.
+#define IN_STORAGE (1<<15) //is this item in the storage item, such as backpack? used for tooltips
/// Integrity defines for clothing (not flags but close enough)
#define CLOTHING_PRISTINE 0 // We have no damage on the clothing
diff --git a/code/__DEFINES/atmospherics.dm b/code/__DEFINES/atmospherics.dm
index 67d16e6687..1c6b7c21d4 100644
--- a/code/__DEFINES/atmospherics.dm
+++ b/code/__DEFINES/atmospherics.dm
@@ -155,10 +155,10 @@
//LAVALAND
#define LAVALAND_EQUIPMENT_EFFECT_PRESSURE 50 //what pressure you have to be under to increase the effect of equipment meant for lavaland
-#define LAVALAND_DEFAULT_ATMOS "o2=14;n2=23;TEMP=300"
+#define LAVALAND_DEFAULT_ATMOS "LAVALAND_ATMOS"
//SNOSTATION
-#define ICEMOON_DEFAULT_ATMOS "o2=17;n2=63;TEMP=180"
+#define ICEMOON_DEFAULT_ATMOS "ICEMOON_ATMOS"
//ATMOSIA GAS MONITOR TAGS
#define ATMOS_GAS_MONITOR_INPUT_O2 "o2_in"
diff --git a/code/__DEFINES/dcs/signals.dm b/code/__DEFINES/dcs/signals.dm
index 3ab70126e3..66912fa787 100644
--- a/code/__DEFINES/dcs/signals.dm
+++ b/code/__DEFINES/dcs/signals.dm
@@ -437,8 +437,9 @@
#define COMPONENT_BLOCK_SHARPEN_BLOCKED 2
#define COMPONENT_BLOCK_SHARPEN_ALREADY 4
#define COMPONENT_BLOCK_SHARPEN_MAXED 8
-#define COMSIG_ITEM_MICROWAVE_ACT "microwave_act" //called on item when microwaved (): (obj/machinery/microwave/M)
+#define COMSIG_ITEM_MICROWAVE_ACT "microwave_act" //called on item when microwaved (): (obj/machinery/microwave/M)
#define COMSIG_ITEM_WORN_OVERLAYS "item_worn_overlays" //from base of obj/item/worn_overlays(): (isinhands, icon_file, used_state, style_flags, list/overlays)
+#define COMSIG_ARMOR_PLATED "armor_plated" //called when an armor plate is successfully applied to an object
// THE FOLLOWING TWO BLOCKS SHOULD RETURN BLOCK FLAGS AS DEFINED IN __DEFINES/combat.dm!
#define COMSIG_ITEM_CHECK_BLOCK "check_block" //from base of obj/item/check_block(): (mob/living/owner, atom/object, damage, attack_text, attack_type, armour_penetration, mob/attacker, def_zone, final_block_chance, list/block_return)
#define COMSIG_ITEM_RUN_BLOCK "run_block" //from base of obj/item/run_block(): (mob/living/owner, atom/object, damage, attack_text, attack_type, armour_penetration, mob/attacker, def_zone, final_block_chance, list/block_return)
diff --git a/code/__DEFINES/footsteps.dm b/code/__DEFINES/footsteps.dm
index 215e287adf..cc0c6547b0 100644
--- a/code/__DEFINES/footsteps.dm
+++ b/code/__DEFINES/footsteps.dm
@@ -8,6 +8,7 @@
#define FOOTSTEP_LAVA "lava"
#define FOOTSTEP_MEAT "meat"
#define FOOTSTEP_RUST "rust"
+#define FOOTSTEP_CATWALK "catwalk"
//barefoot sounds
#define FOOTSTEP_WOOD_BAREFOOT "woodbarefoot"
@@ -94,6 +95,12 @@ GLOBAL_LIST_INIT(footstep, list(
'sound/effects/footstep/lava3.ogg'), 100, 0),
FOOTSTEP_MEAT = list(list(
'sound/effects/meatslap.ogg'), 100, 0),
+ FOOTSTEP_CATWALK = list(list(
+ 'sound/effects/footstep/catwalk1.ogg',
+ 'sound/effects/footstep/catwalk2.ogg',
+ 'sound/effects/footstep/catwalk3.ogg',
+ 'sound/effects/footstep/catwalk4.ogg',
+ 'sound/effects/footstep/catwalk5.ogg'), 100, 1),
FOOTSTEP_RUST = list(list(
'sound/effects/footstep/rustystep1.ogg'), 100, 0)
))
diff --git a/code/__DEFINES/layers_planes.dm b/code/__DEFINES/layers_planes.dm
index ea7b1b2e0a..c7be89721e 100644
--- a/code/__DEFINES/layers_planes.dm
+++ b/code/__DEFINES/layers_planes.dm
@@ -64,8 +64,9 @@
#define GAS_PIPE_VISIBLE_LAYER 2.47
#define GAS_FILTER_LAYER 2.48
#define GAS_PUMP_LAYER 2.49
-
#define LOW_OBJ_LAYER 2.5
+///catwalk overlay of /turf/open/floor/plating/plating_catwalk
+#define CATWALK_LAYER 2.51
#define LOW_SIGIL_LAYER 2.52
#define SIGIL_LAYER 2.54
#define HIGH_SIGIL_LAYER 2.56
diff --git a/code/__DEFINES/mobs.dm b/code/__DEFINES/mobs.dm
index 850a2b0f39..6a63ced634 100644
--- a/code/__DEFINES/mobs.dm
+++ b/code/__DEFINES/mobs.dm
@@ -347,3 +347,7 @@
// / Breathing types. Lungs can access either by these or by a string, which will be considered a gas ID.
#define BREATH_OXY /datum/breathing_class/oxygen
#define BREATH_PLASMA /datum/breathing_class/plasma
+
+//Gremlins
+#define NPC_TAMPER_ACT_FORGET 1 //Don't try to tamper with this again
+#define NPC_TAMPER_ACT_NOMSG 2 //Don't produce a visible message
diff --git a/code/__DEFINES/qdel.dm b/code/__DEFINES/qdel.dm
index 63259774fa..32e0025ab2 100644
--- a/code/__DEFINES/qdel.dm
+++ b/code/__DEFINES/qdel.dm
@@ -1,30 +1,44 @@
-//defines that give qdel hints. these can be given as a return in destory() or by calling
+//! Defines that give qdel hints.
+//!
+//! These can be given as a return in [/atom/proc/Destroy] or by calling [/proc/qdel].
+
+/// `qdel` should queue the object for deletion.
+#define QDEL_HINT_QUEUE 0
+/// `qdel` should let the object live after calling [/atom/proc/Destroy].
+#define QDEL_HINT_LETMELIVE 1
+/// Functionally the same as the above. `qdel` should assume the object will gc on its own, and not check it.
+#define QDEL_HINT_IWILLGC 2
+/// Qdel should assume this object won't GC, and queue a hard delete using a hard reference.
+#define QDEL_HINT_HARDDEL 3
+// Qdel should assume this object won't gc, and hard delete it posthaste.
+#define QDEL_HINT_HARDDEL_NOW 4
-#define QDEL_HINT_QUEUE 0 //qdel should queue the object for deletion.
-#define QDEL_HINT_LETMELIVE 1 //qdel should let the object live after calling destory.
-#define QDEL_HINT_IWILLGC 2 //functionally the same as the above. qdel should assume the object will gc on its own, and not check it.
-#define QDEL_HINT_HARDDEL 3 //qdel should assume this object won't gc, and queue a hard delete using a hard reference.
-#define QDEL_HINT_HARDDEL_NOW 4 //qdel should assume this object won't gc, and hard del it post haste.
-
-#ifdef LEGACY_REFERENCE_TRACKING
-/** If LEGACY_REFERENCE_TRACKING is enabled, qdel will call this object's find_references() verb.
- *
- * Functionally identical to QDEL_HINT_QUEUE if GC_FAILURE_HARD_LOOKUP is not enabled in _compiler_options.dm.
+#ifdef REFERENCE_TRACKING
+/** If REFERENCE_TRACKING is enabled, qdel will call this object's find_references() verb.
+ *
+ * Functionally identical to [QDEL_HINT_QUEUE] if [GC_FAILURE_HARD_LOOKUP] is not enabled in _compiler_options.dm.
*/
-#define QDEL_HINT_FINDREFERENCE 5
-/// Behavior as QDEL_HINT_FINDREFERENCE, but only if the GC fails and a hard delete is forced.
+#define QDEL_HINT_FINDREFERENCE 5
+/// Behavior as [QDEL_HINT_FINDREFERENCE], but only if the GC fails and a hard delete is forced.
#define QDEL_HINT_IFFAIL_FINDREFERENCE 6
#endif
-
#define GC_QUEUE_CHECK 1
#define GC_QUEUE_HARDDELETE 2
#define GC_QUEUE_COUNT 2 //increase this when adding more steps.
+#define QDEL_ITEM_ADMINS_WARNED (1<<0) //! Set when admins are told about lag causing qdels in this type.
+#define QDEL_ITEM_SUSPENDED_FOR_LAG (1<<1) //! Set when a type can no longer be hard deleted on failure because of lag it causes while this happens.
+
+// Defines for the [gc_destroyed][/datum/var/gc_destroyed] var.
#define GC_QUEUED_FOR_QUEUING -1
#define GC_CURRENTLY_BEING_QDELETED -2
+// Defines for the time left for an item to get its reference cleaned
+#define GC_FILTER_QUEUE 5 MINUTES
+#define GC_DEL_QUEUE 10 SECONDS
+
#define QDELING(X) (X.gc_destroyed)
#define QDELETED(X) (!X || QDELING(X))
#define QDESTROYING(X) (!X || X.gc_destroyed == GC_CURRENTLY_BEING_QDELETED)
diff --git a/code/__DEFINES/rust_g.dm b/code/__DEFINES/rust_g.dm
index 988acd3dae..0da05e7c1d 100644
--- a/code/__DEFINES/rust_g.dm
+++ b/code/__DEFINES/rust_g.dm
@@ -38,6 +38,9 @@
#define RUST_G (__rust_g || __detect_rust_g())
#endif
+/// Gets the version of rust_g
+/proc/rustg_get_version() return call(RUST_G, "get_version")()
+
/**
* This proc generates a cellular automata noise grid which can be used in procedural generation methods.
*
@@ -77,8 +80,8 @@
#define RUSTG_HTTP_METHOD_PATCH "patch"
#define RUSTG_HTTP_METHOD_HEAD "head"
#define RUSTG_HTTP_METHOD_POST "post"
-#define rustg_http_request_blocking(method, url, body, headers) call(RUST_G, "http_request_blocking")(method, url, body, headers)
-#define rustg_http_request_async(method, url, body, headers) call(RUST_G, "http_request_async")(method, url, body, headers)
+#define rustg_http_request_blocking(method, url, body, headers, options) call(RUST_G, "http_request_blocking")(method, url, body, headers, options)
+#define rustg_http_request_async(method, url, body, headers, options) call(RUST_G, "http_request_async")(method, url, body, headers, options)
#define rustg_http_check_request(req_id) call(RUST_G, "http_check_request")(req_id)
#define RUSTG_JOB_NO_RESULTS_YET "NO RESULTS YET"
@@ -99,3 +102,11 @@
#define rustg_sql_disconnect_pool(handle) call(RUST_G, "sql_disconnect_pool")(handle)
#define rustg_sql_check_query(job_id) call(RUST_G, "sql_check_query")("[job_id]")
+#define rustg_url_encode(text) call(RUST_G, "url_encode")(text)
+#define rustg_url_decode(text) call(RUST_G, "url_decode")(text)
+
+#ifdef RUSTG_OVERRIDE_BUILTINS
+ #define url_encode(text) rustg_url_encode(text)
+ #define url_decode(text) rustg_url_decode(text)
+#endif
+
diff --git a/code/__DEFINES/rust_g_overrides.dm b/code/__DEFINES/rust_g_overrides.dm
new file mode 100644
index 0000000000..57de7d96ac
--- /dev/null
+++ b/code/__DEFINES/rust_g_overrides.dm
@@ -0,0 +1,3 @@
+// RUSTG_OVERRIDE_BUILTINS is not used since the file APIs don't work well over Linux.
+#define url_encode(text) rustg_url_encode("[text]")
+#define url_decode(text) rustg_url_decode("[text]")
diff --git a/code/__DEFINES/time.dm b/code/__DEFINES/time.dm
index 01990ddc17..252fe0910e 100644
--- a/code/__DEFINES/time.dm
+++ b/code/__DEFINES/time.dm
@@ -49,10 +49,16 @@ When using time2text(), please use "DDD" to find the weekday. Refrain from using
#define TICKS *world.tick_lag
+#define MILLISECONDS * 0.01
+
#define DS2TICKS(DS) ((DS)/world.tick_lag)
#define TICKS2DS(T) ((T) TICKS)
+#define MS2DS(T) ((T) MILLISECONDS)
+
+#define DS2MS(T) ((T) * 100)
+
#define GAMETIMESTAMP(format, wtime) time2text(wtime, format)
#define WORLDTIME2TEXT(format) GAMETIMESTAMP(format, world.time)
#define WORLDTIMEOFDAY2TEXT(format) GAMETIMESTAMP(format, world.timeofday)
diff --git a/code/__DEFINES/traits.dm b/code/__DEFINES/traits.dm
index eb9bdccc22..cd94e5790b 100644
--- a/code/__DEFINES/traits.dm
+++ b/code/__DEFINES/traits.dm
@@ -343,3 +343,7 @@
#define STICKY_NODROP "sticky-nodrop" //sticky nodrop sounds like a bad soundcloud rapper's name
#define TRAIT_SACRIFICED "sacrificed" //Makes sure that people cant be cult sacrificed twice.
#define TRAIT_SPACEWALK "spacewalk"
+
+
+/// obtained from mapping helper
+#define MAPPING_HELPER_TRAIT "mapping-helper"
diff --git a/code/__HELPERS/_logging.dm b/code/__HELPERS/_logging.dm
index 8464e373d5..d61adf4337 100644
--- a/code/__HELPERS/_logging.dm
+++ b/code/__HELPERS/_logging.dm
@@ -1,9 +1,12 @@
//wrapper macros for easier grepping
#define DIRECT_OUTPUT(A, B) A << B
+#define DIRECT_INPUT(A, B) A >> B
#define SEND_IMAGE(target, image) DIRECT_OUTPUT(target, image)
#define SEND_SOUND(target, sound) DIRECT_OUTPUT(target, sound)
#define SEND_TEXT(target, text) DIRECT_OUTPUT(target, text)
#define WRITE_FILE(file, text) DIRECT_OUTPUT(file, text)
+#define READ_FILE(file, text) DIRECT_INPUT(file, text)
+
#ifdef EXTOOLS_LOGGING
// proc hooked, so we can just put in standard TRUE and FALSE
#define WRITE_LOG(log, text) extools_log_write(log,text,TRUE)
@@ -13,6 +16,7 @@
#define WRITE_LOG(log, text) rustg_log_write(log, text, "true")
#define WRITE_LOG_NO_FORMAT(log, text) rustg_log_write(log, text, "false")
#endif
+
//print a warning message to world.log
#define WARNING(MSG) warning("[MSG] in [__FILE__] at line [__LINE__] src: [UNLINT(src)] usr: [usr].")
/proc/warning(msg)
@@ -38,6 +42,12 @@
SEND_TEXT(world.log, text)
#endif
+#ifdef REFERENCE_TRACKING_LOG
+#define log_reftracker(msg) log_world("## REF SEARCH [msg]")
+#else
+#define log_reftracker(msg)
+#endif
+
/* Items with ADMINPRIVATE prefixed are stripped from public logs. */
/proc/log_admin(text)
diff --git a/code/__HELPERS/global_lists.dm b/code/__HELPERS/global_lists.dm
index 0a17f0d1df..19aac1aee0 100644
--- a/code/__HELPERS/global_lists.dm
+++ b/code/__HELPERS/global_lists.dm
@@ -78,6 +78,12 @@
var/datum/emote/E = new path()
E.emote_list[E.key] = E
+ // Hair Gradients - Initialise all /datum/sprite_accessory/hair_gradient into an list indexed by gradient-style name
+ for(var/path in subtypesof(/datum/sprite_accessory/hair_gradient))
+ var/datum/sprite_accessory/hair_gradient/H = new path()
+ GLOB.hair_gradients_list[H.name] = H
+
+ // Keybindings
init_keybindings()
//Uplink Items
diff --git a/code/__HELPERS/markov.dm b/code/__HELPERS/markov.dm
new file mode 100644
index 0000000000..7e195f8b9c
--- /dev/null
+++ b/code/__HELPERS/markov.dm
@@ -0,0 +1,61 @@
+#define MAXIMUM_MARKOV_LENGTH 25000
+
+/proc/markov_chain(var/text, var/order = 4, var/length = 250)
+ if(!text || order < 0 || order > 20 || length < 1 || length > MAXIMUM_MARKOV_LENGTH)
+ return
+
+ var/table = markov_table(text, order)
+ var/markov = markov_text(length, table, order)
+ return markov
+
+/proc/markov_table(var/text, var/look_forward = 4)
+ if(!text)
+ return
+ var/list/table = list()
+
+ for(var/i = 1, i <= length(text), i++)
+ var/char = copytext(text, i, look_forward+i)
+ if(!table[char])
+ table[char] = list()
+
+ for(var/i = 1, i <= (length(text) - look_forward), i++)
+ var/char_index = copytext(text, i, look_forward+i)
+ var/char_count = copytext(text, i+look_forward, (look_forward*2)+i)
+
+ if(table[char_index][char_count])
+ table[char_index][char_count]++
+ else
+ table[char_index][char_count] = 1
+
+ return table
+
+/proc/markov_text(var/length = 250, var/table, var/look_forward = 4)
+ if(!table)
+ return
+ var/char = pick(table)
+ var/o = char
+
+ for(var/i = 0, i <= (length / look_forward), i++)
+ var/newchar = markov_weighted_char(table[char])
+
+ if(newchar)
+ char = newchar
+ o += "[newchar]"
+ else
+ char = pick(table)
+
+ return o
+
+/proc/markov_weighted_char(var/list/array)
+ if(!array || !array.len)
+ return
+
+ var/total = 0
+ for(var/i in array)
+ total += array[i]
+ var/r = rand(1, total)
+ for(var/i in array)
+ var/weight = array[i]
+ if(r <= weight)
+ return i
+ r -= weight
diff --git a/code/__HELPERS/roundend.dm b/code/__HELPERS/roundend.dm
index 2c13f30707..9a59b2b0a9 100644
--- a/code/__HELPERS/roundend.dm
+++ b/code/__HELPERS/roundend.dm
@@ -218,20 +218,14 @@
to_chat(world, "
The round has ended.")
log_game("The round has ended.")
- if(LAZYLEN(GLOB.round_end_notifiees))
- world.TgsTargetedChatBroadcast("[GLOB.round_end_notifiees.Join(", ")] the round has ended.", FALSE)
+
+ CONFIG_SET(flag/suicide_allowed,TRUE) // EORG suicides allowed
for(var/I in round_end_events)
var/datum/callback/cb = I
cb.InvokeAsync()
LAZYCLEARLIST(round_end_events)
- for(var/client/C in GLOB.clients)
- if(!C.credits)
- C.RollCredits()
- C.playtitlemusic(40)
- CONFIG_SET(flag/suicide_allowed,TRUE) // EORG suicides allowed
-
var/speed_round = FALSE
if(world.time - SSticker.round_start_time <= 300 SECONDS)
speed_round = TRUE
@@ -264,12 +258,15 @@
send2adminchat("Server", "A round of [mode.name] just ended[mode_result == "undefined" ? "." : " with a [mode_result]."] Survival rate: [survival_rate]")
+ if(LAZYLEN(GLOB.round_end_notifiees))
+ world.TgsTargetedChatBroadcast("[GLOB.round_end_notifiees.Join(", ")] the round has ended.", FALSE)
+
if(length(CONFIG_GET(keyed_list/cross_server)))
send_news_report()
//tell the nice people on discord what went on before the salt cannon happens.
world.TgsTargetedChatBroadcast("The current round has ended. Please standby for your shift interlude Nanotrasen News Network's report!", FALSE)
- world.TgsTargetedChatBroadcast(send_news_report(),FALSE)
+ world.TgsTargetedChatBroadcast(send_news_report(), FALSE)
CHECK_TICK
@@ -543,21 +540,24 @@
///Generate a report for how much money is on station, as well as the richest crewmember on the station.
/datum/controller/subsystem/ticker/proc/market_report()
var/list/parts = list()
- parts += "Station Economic Summary:"
+
///This is the richest account on station at roundend.
var/datum/bank_account/mr_moneybags
///This is the station's total wealth at the end of the round.
var/station_vault = 0
///How many players joined the round.
var/total_players = GLOB.joined_player_list.len
- var/list/typecache_bank = typecacheof(list(/datum/bank_account/department, /datum/bank_account/remote))
- for(var/datum/bank_account/current_acc in SSeconomy.generated_accounts)
+ var/static/list/typecache_bank = typecacheof(list(/datum/bank_account/department, /datum/bank_account/remote))
+ for(var/i in SSeconomy.generated_accounts)
+ var/datum/bank_account/current_acc = SSeconomy.generated_accounts[i]
if(typecache_bank[current_acc.type])
continue
station_vault += current_acc.account_balance
if(!mr_moneybags || mr_moneybags.account_balance < current_acc.account_balance)
mr_moneybags = current_acc
- parts += "
| [MINESWEEPERIMG(7)] | " if(19) web += "[MINESWEEPERIMG(8)] | " + CHECK_TICK web += "" web += "
"
dat += "General Settings" dat += "UI Style: [UI_style]" + dat += "Outline: [outline_enabled ? "Enabled" : "Disabled"] " + dat += "Outline Color: Change " dat += "tgui Monitors: [(tgui_lock) ? "Primary" : "All"] " dat += "tgui Style: [(tgui_fancy) ? "Fancy" : "No Frills"] " dat += "Show Runechat Chat Bubbles: [chat_on_map ? "Enabled" : "Disabled"] " @@ -1707,6 +1719,23 @@ GLOBAL_LIST_EMPTY(preferences_datums) if("previous_facehair_style") facial_hair_style = previous_list_item(facial_hair_style, GLOB.facial_hair_styles_list) + if("grad_color") + var/new_grad_color = input(user, "Choose your character's gradient colour:", "Character Preference","#"+grad_color) as color|null + if(new_grad_color) + grad_color = sanitize_hexcolor(new_grad_color, 6) + + if("grad_style") + var/new_grad_style + new_grad_style = input(user, "Choose your character's hair gradient style:", "Character Preference") as null|anything in GLOB.hair_gradients_list + if(new_grad_style) + grad_style = new_grad_style + + if("next_grad_style") + grad_style = next_list_item(grad_style, GLOB.hair_gradients_list) + + if("previous_grad_style") + grad_style = previous_list_item(grad_style, GLOB.hair_gradients_list) + if("cycle_bg") bgstate = next_list_item(bgstate, bgstate_options) @@ -2706,6 +2735,12 @@ GLOBAL_LIST_EMPTY(preferences_datums) buttons_locked = !buttons_locked if("tgui_fancy") tgui_fancy = !tgui_fancy + if("outline_enabled") + outline_enabled = !outline_enabled + if("outline_color") + var/pickedOutlineColor = input(user, "Choose your outline color.", "General Preference", outline_color) as color|null + if(pickedOutlineColor) + outline_color = pickedOutlineColor if("tgui_lock") tgui_lock = !tgui_lock if("winflash") @@ -3006,6 +3041,8 @@ GLOBAL_LIST_EMPTY(preferences_datums) character.dna.skin_tone_override = use_custom_skin_tone ? skin_tone : null character.hair_style = hair_style character.facial_hair_style = facial_hair_style + character.grad_style = grad_style + character.grad_color = grad_color character.underwear = underwear character.saved_underwear = underwear @@ -3070,6 +3107,7 @@ GLOBAL_LIST_EMPTY(preferences_datums) if(additional_language && additional_language != "None") var/language_entry = GLOB.roundstart_languages[additional_language] if(language_entry) + character.additional_language = language_entry character.grant_language(language_entry, TRUE, TRUE) //limb stuff, only done when initially spawning in diff --git a/code/modules/client/preferences_savefile.dm b/code/modules/client/preferences_savefile.dm index d4d13dc40f..96ffd09af8 100644 --- a/code/modules/client/preferences_savefile.dm +++ b/code/modules/client/preferences_savefile.dm @@ -45,6 +45,9 @@ SAVEFILE UPDATING/VERSIONING - 'Simplified', or rather, more coder-friendly ~Car if(current_version < 46) //If you remove this, remove force_reset_keybindings() too. force_reset_keybindings_direct(TRUE) addtimer(CALLBACK(src, .proc/force_reset_keybindings), 30) //No mob available when this is run, timer allows user choice. + if(current_version < 30) + outline_enabled = TRUE + outline_color = COLOR_BLUE_GRAY /datum/preferences/proc/update_character(current_version, savefile/S) if(current_version < 19) @@ -377,6 +380,8 @@ SAVEFILE UPDATING/VERSIONING - 'Simplified', or rather, more coder-friendly ~Car S["ooccolor"] >> ooccolor S["lastchangelog"] >> lastchangelog S["UI_style"] >> UI_style + S["outline_color"] >> outline_color + S["outline_enabled"] >> outline_enabled S["hotkeys"] >> hotkeys S["chat_on_map"] >> chat_on_map S["max_chat_length"] >> max_chat_length @@ -555,6 +560,8 @@ SAVEFILE UPDATING/VERSIONING - 'Simplified', or rather, more coder-friendly ~Car WRITE_FILE(S["ooccolor"], ooccolor) WRITE_FILE(S["lastchangelog"], lastchangelog) WRITE_FILE(S["UI_style"], UI_style) + WRITE_FILE(S["outline_enabled"], outline_enabled) + WRITE_FILE(S["outline_color"], outline_color) WRITE_FILE(S["hotkeys"], hotkeys) WRITE_FILE(S["chat_on_map"], chat_on_map) WRITE_FILE(S["max_chat_length"], max_chat_length) @@ -676,6 +683,8 @@ SAVEFILE UPDATING/VERSIONING - 'Simplified', or rather, more coder-friendly ~Car S["skin_tone"] >> skin_tone S["hair_style_name"] >> hair_style S["facial_style_name"] >> facial_hair_style + S["grad_style"] >> grad_style + S["grad_color"] >> grad_color S["underwear"] >> underwear S["undie_color"] >> undie_color S["undershirt"] >> undershirt @@ -868,6 +877,8 @@ SAVEFILE UPDATING/VERSIONING - 'Simplified', or rather, more coder-friendly ~Car age = sanitize_integer(age, AGE_MIN, AGE_MAX, initial(age)) hair_color = sanitize_hexcolor(hair_color, 6, FALSE) facial_hair_color = sanitize_hexcolor(facial_hair_color, 6, FALSE) + grad_style = sanitize_inlist(grad_style, GLOB.hair_gradients_list, "None") + grad_color = sanitize_hexcolor(grad_color, 6, FALSE) eye_type = sanitize_inlist(eye_type, GLOB.eye_types, DEFAULT_EYES_TYPE) left_eye_color = sanitize_hexcolor(left_eye_color, 6, FALSE) right_eye_color = sanitize_hexcolor(right_eye_color, 6, FALSE) @@ -1037,6 +1048,8 @@ SAVEFILE UPDATING/VERSIONING - 'Simplified', or rather, more coder-friendly ~Car WRITE_FILE(S["skin_tone"] , skin_tone) WRITE_FILE(S["hair_style_name"] , hair_style) WRITE_FILE(S["facial_style_name"] , facial_hair_style) + WRITE_FILE(S["grad_style"] , grad_style) + WRITE_FILE(S["grad_color"] , grad_color) WRITE_FILE(S["underwear"] , underwear) WRITE_FILE(S["undie_color"] , undie_color) WRITE_FILE(S["undershirt"] , undershirt) diff --git a/code/modules/clothing/masks/gasmask.dm b/code/modules/clothing/masks/gasmask.dm index 525db577e0..2e3c544d08 100644 --- a/code/modules/clothing/masks/gasmask.dm +++ b/code/modules/clothing/masks/gasmask.dm @@ -83,6 +83,7 @@ icon_state = "clown" item_state = "clown_hat" dye_color = "clown" + w_class = WEIGHT_CLASS_SMALL flags_cover = MASKCOVERSEYES resistance_flags = FLAMMABLE actions_types = list(/datum/action/item_action/adjust) @@ -131,6 +132,7 @@ clothing_flags = ALLOWINTERNALS icon_state = "mime" item_state = "mime" + w_class = WEIGHT_CLASS_SMALL flags_cover = MASKCOVERSEYES resistance_flags = FLAMMABLE actions_types = list(/datum/action/item_action/adjust) diff --git a/code/modules/clothing/outfits/ert.dm b/code/modules/clothing/outfits/ert.dm index 7cd2e9b394..86aa0748df 100644 --- a/code/modules/clothing/outfits/ert.dm +++ b/code/modules/clothing/outfits/ert.dm @@ -30,7 +30,7 @@ glasses = /obj/item/clothing/glasses/hud/security/sunglasses back = /obj/item/storage/backpack/captain belt = /obj/item/storage/belt/security/full - backpack_contents = list(/obj/item/storage/box/engineer=1,\ + backpack_contents = list(/obj/item/storage/box/survival/engineer=1,\ /obj/item/melee/baton/loaded=1,\ /obj/item/clothing/mask/gas/sechailer=1,\ /obj/item/gun/energy/e_gun=1) @@ -50,7 +50,7 @@ suit = /obj/item/clothing/suit/space/hardsuit/ert/alert glasses = /obj/item/clothing/glasses/thermal/eyepatch - backpack_contents = list(/obj/item/storage/box/engineer=1,\ + backpack_contents = list(/obj/item/storage/box/survival/engineer=1,\ /obj/item/melee/baton/loaded=1,\ /obj/item/clothing/mask/gas/sechailer/swat=1,\ /obj/item/gun/energy/e_gun=1) @@ -58,7 +58,7 @@ /datum/outfit/ert/commander/alert/red name = "ERT Commander - Red Alert" - backpack_contents = list(/obj/item/storage/box/engineer=1,\ + backpack_contents = list(/obj/item/storage/box/survival/engineer=1,\ /obj/item/melee/baton/loaded=1,\ /obj/item/clothing/mask/gas/sechailer/swat=1,\ /obj/item/gun/energy/pulse/pistol/loyalpin=1) @@ -71,7 +71,7 @@ glasses = /obj/item/clothing/glasses/hud/security/sunglasses belt = /obj/item/storage/belt/security/full back = /obj/item/storage/backpack/security - backpack_contents = list(/obj/item/storage/box/engineer=1,\ + backpack_contents = list(/obj/item/storage/box/survival/engineer=1,\ /obj/item/storage/box/handcuffs=1,\ /obj/item/clothing/mask/gas/sechailer=1,\ /obj/item/gun/energy/e_gun/stun=1,\ @@ -91,7 +91,7 @@ name = "ERT Security - Amber Alert" suit = /obj/item/clothing/suit/space/hardsuit/ert/alert/sec - backpack_contents = list(/obj/item/storage/box/engineer=1,\ + backpack_contents = list(/obj/item/storage/box/survival/engineer=1,\ /obj/item/storage/box/handcuffs=1,\ /obj/item/clothing/mask/gas/sechailer/swat=1,\ /obj/item/melee/baton/loaded=1,\ @@ -99,7 +99,7 @@ /datum/outfit/ert/security/alert/red name = "ERT Security - Red Alert" - backpack_contents = list(/obj/item/storage/box/engineer=1,\ + backpack_contents = list(/obj/item/storage/box/survival/engineer=1,\ /obj/item/storage/box/handcuffs=1,\ /obj/item/clothing/mask/gas/sechailer/swat=1,\ /obj/item/melee/baton/loaded=1,\ @@ -114,7 +114,7 @@ back = /obj/item/storage/backpack/satchel/med belt = /obj/item/storage/belt/medical r_hand = /obj/item/storage/firstaid/regular - backpack_contents = list(/obj/item/storage/box/engineer=1,\ + backpack_contents = list(/obj/item/storage/box/survival/engineer=1,\ /obj/item/melee/baton/loaded=1,\ /obj/item/clothing/mask/gas/sechailer=1,\ /obj/item/gun/energy/e_gun=1,\ @@ -135,7 +135,7 @@ name = "ERT Medic - Amber Alert" suit = /obj/item/clothing/suit/space/hardsuit/ert/alert/med - backpack_contents = list(/obj/item/storage/box/engineer=1,\ + backpack_contents = list(/obj/item/storage/box/survival/engineer=1,\ /obj/item/melee/baton/loaded=1,\ /obj/item/clothing/mask/gas/sechailer/swat=1,\ /obj/item/gun/energy/e_gun=1,\ @@ -144,7 +144,7 @@ /datum/outfit/ert/medic/alert/red name = "ERT Medic - Red Alert" - backpack_contents = list(/obj/item/storage/box/engineer=1,\ + backpack_contents = list(/obj/item/storage/box/survival/engineer=1,\ /obj/item/melee/baton/loaded=1,\ /obj/item/clothing/mask/gas/sechailer/swat=1,\ /obj/item/gun/energy/pulse/pistol/loyalpin=1,\ @@ -161,7 +161,7 @@ belt = /obj/item/storage/belt/utility/full l_pocket = /obj/item/rcd_ammo/large r_hand = /obj/item/storage/firstaid/regular - backpack_contents = list(/obj/item/storage/box/engineer=1,\ + backpack_contents = list(/obj/item/storage/box/survival/engineer=1,\ /obj/item/melee/baton/loaded=1,\ /obj/item/clothing/mask/gas/sechailer=1,\ /obj/item/gun/energy/e_gun=1,\ @@ -181,7 +181,7 @@ name = "ERT Engineer - Amber Alert" suit = /obj/item/clothing/suit/space/hardsuit/ert/alert/engi - backpack_contents = list(/obj/item/storage/box/engineer=1,\ + backpack_contents = list(/obj/item/storage/box/survival/engineer=1,\ /obj/item/melee/baton/loaded=1,\ /obj/item/clothing/mask/gas/sechailer/swat=1,\ /obj/item/gun/energy/e_gun=1,\ @@ -189,7 +189,7 @@ /datum/outfit/ert/engineer/alert/red name = "ERT Engineer - Red Alert" - backpack_contents = list(/obj/item/storage/box/engineer=1,\ + backpack_contents = list(/obj/item/storage/box/survival/engineer=1,\ /obj/item/melee/baton/loaded=1,\ /obj/item/clothing/mask/gas/sechailer/swat=1,\ /obj/item/gun/energy/pulse/pistol/loyalpin=1,\ @@ -260,7 +260,7 @@ name = "Inquisition Commander" r_hand = /obj/item/nullrod/scythe/talking/chainsword suit = /obj/item/clothing/suit/space/hardsuit/ert/paranormal - backpack_contents = list(/obj/item/storage/box/engineer=1, + backpack_contents = list(/obj/item/storage/box/survival/engineer=1, /obj/item/clothing/mask/gas/sechailer=1, /obj/item/gun/energy/e_gun=1) @@ -269,7 +269,7 @@ suit = /obj/item/clothing/suit/space/hardsuit/ert/paranormal/inquisitor - backpack_contents = list(/obj/item/storage/box/engineer=1, + backpack_contents = list(/obj/item/storage/box/survival/engineer=1, /obj/item/storage/box/handcuffs=1, /obj/item/clothing/mask/gas/sechailer=1, /obj/item/gun/energy/e_gun/stun=1, @@ -281,7 +281,7 @@ suit = /obj/item/clothing/suit/space/hardsuit/ert/paranormal/inquisitor - backpack_contents = list(/obj/item/storage/box/engineer=1, + backpack_contents = list(/obj/item/storage/box/survival/engineer=1, /obj/item/melee/baton/loaded=1, /obj/item/clothing/mask/gas/sechailer=1, /obj/item/gun/energy/e_gun=1, @@ -307,7 +307,7 @@ glasses = /obj/item/clothing/glasses/hud/health back = /obj/item/storage/backpack/cultpack belt = /obj/item/storage/belt/soulstone - backpack_contents = list(/obj/item/storage/box/engineer=1, + backpack_contents = list(/obj/item/storage/box/survival/engineer=1, /obj/item/nullrod=1, /obj/item/clothing/mask/gas/sechailer=1, /obj/item/gun/energy/e_gun=1, @@ -319,7 +319,7 @@ suit = /obj/item/clothing/suit/space/hardsuit/ert/paranormal/inquisitor belt = /obj/item/storage/belt/soulstone/full/chappy - backpack_contents = list(/obj/item/storage/box/engineer=1, + backpack_contents = list(/obj/item/storage/box/survival/engineer=1, /obj/item/grenade/chem_grenade/holy=1, /obj/item/nullrod=1, /obj/item/clothing/mask/gas/sechailer=1, diff --git a/code/modules/clothing/outfits/vr.dm b/code/modules/clothing/outfits/vr.dm index acf015c845..ac852a35a8 100644 --- a/code/modules/clothing/outfits/vr.dm +++ b/code/modules/clothing/outfits/vr.dm @@ -28,7 +28,7 @@ id = /obj/item/card/id/syndicate/locked_banking belt = /obj/item/gun/ballistic/automatic/pistol l_pocket = /obj/item/paper/fluff/vr/fluke_ops - backpack_contents = list(/obj/item/storage/box/syndie=1,\ + backpack_contents = list(/obj/item/storage/box/survival/syndie=1,\ /obj/item/kitchen/knife/combat/survival) starting_funds = 0 //Should be operating, not shopping. diff --git a/code/modules/clothing/spacesuits/hardsuit.dm b/code/modules/clothing/spacesuits/hardsuit.dm index 4af9e7387d..cd48a81350 100644 --- a/code/modules/clothing/spacesuits/hardsuit.dm +++ b/code/modules/clothing/spacesuits/hardsuit.dm @@ -237,12 +237,28 @@ /obj/item/clothing/head/helmet/space/hardsuit/mining/Initialize() . = ..() AddComponent(/datum/component/armor_plate) + RegisterSignal(src, COMSIG_ARMOR_PLATED, .proc/upgrade_icon) + +/obj/item/clothing/head/helmet/space/hardsuit/mining/proc/upgrade_icon(datum/source, amount, maxamount) + SIGNAL_HANDLER + + if(amount) + name = "reinforced [initial(name)]" + hardsuit_type = "mining_goliath" + if(amount == maxamount) + hardsuit_type = "mining_goliath_full" + icon_state = "hardsuit[on]-[hardsuit_type]" + if(ishuman(loc)) + var/mob/living/carbon/human/wearer = loc + if(wearer.head == src) + wearer.update_inv_head() /obj/item/clothing/suit/space/hardsuit/mining icon_state = "hardsuit-mining" name = "mining hardsuit" desc = "A special suit that protects against hazardous, low pressure environments. Has reinforced plating for wildlife encounters." item_state = "mining_hardsuit" + hardsuit_type = "mining" max_heat_protection_temperature = FIRE_SUIT_MAX_TEMP_PROTECT resistance_flags = FIRE_PROOF armor = list("melee" = 30, "bullet" = 5, "laser" = 10, "energy" = 5, "bomb" = 50, "bio" = 100, "rad" = 50, "fire" = 50, "acid" = 75, "wound" = 15) @@ -254,6 +270,21 @@ /obj/item/clothing/suit/space/hardsuit/mining/Initialize() . = ..() AddComponent(/datum/component/armor_plate) + RegisterSignal(src, COMSIG_ARMOR_PLATED, .proc/upgrade_icon) + +/obj/item/clothing/suit/space/hardsuit/mining/proc/upgrade_icon(datum/source, amount, maxamount) + SIGNAL_HANDLER + + if(amount) + name = "reinforced [initial(name)]" + hardsuit_type = "mining_goliath" + if(amount == maxamount) + hardsuit_type = "mining_goliath_full" + icon_state = "hardsuit-[hardsuit_type]" + if(ishuman(loc)) + var/mob/living/carbon/human/wearer = loc + if(wearer.wear_suit == src) + wearer.update_inv_wear_suit() //Syndicate hardsuit /obj/item/clothing/head/helmet/space/hardsuit/syndi diff --git a/code/modules/clothing/suits/armor.dm b/code/modules/clothing/suits/armor.dm index 254ed60c03..90fd0b2812 100644 --- a/code/modules/clothing/suits/armor.dm +++ b/code/modules/clothing/suits/armor.dm @@ -136,17 +136,24 @@ icon_state = "syndievest" mutantrace_variation = STYLE_DIGITIGRADE -/obj/item/clothing/suit/armor/vest/capcarapace/alt +/obj/item/clothing/suit/toggle/captains_parade name = "captain's parade jacket" desc = "For when an armoured vest isn't fashionable enough." icon_state = "capformal" item_state = "capspacesuit" + body_parts_covered = CHEST|GROIN|ARMS + armor = list("melee" = 50, "bullet" = 40, "laser" = 50, "energy" = 50, "bomb" = 25, "bio" = 0, "rad" = 0, "fire" = 100, "acid" = 90, "wound" = 10) + togglename = "buttons" + +/obj/item/clothing/suit/toggle/captains_parade/Initialize() + . = ..() + allowed = GLOB.security_wintercoat_allowed /obj/item/clothing/suit/armor/riot name = "riot suit" desc = "A suit of semi-flexible polycarbonate body armor with heavy padding to protect against melee attacks. Helps the wearer resist shoving in close quarters." - icon_state = "swat" - item_state = "swat_suit" + icon_state = "riot" + item_state = "riot" body_parts_covered = CHEST|GROIN|LEGS|FEET|ARMS|HANDS cold_protection = CHEST|GROIN|LEGS|FEET|ARMS|HANDS heat_protection = CHEST|GROIN|LEGS|FEET|ARMS|HANDS @@ -319,3 +326,29 @@ cold_protection = CHEST|GROIN|LEGS|FEET|ARMS|HANDS min_cold_protection_temperature = SPACE_SUIT_MIN_TEMP_PROTECT armor = list("melee" = 25, "bullet" = 20, "laser" = 20, "energy" = 10, "bomb" = 20, "bio" = 50, "rad" = 20, "fire" = -10, "acid" = 50, "wound" = 10) + +/obj/item/clothing/suit/toggle/armor/vest/centcom_formal + name = "\improper CentCom formal coat" + desc = "A stylish coat given to CentCom Commanders. Perfect for sending ERTs to suicide missions with style!" + icon_state = "centcom_formal" + item_state = "centcom" + body_parts_covered = CHEST|GROIN|ARMS + armor = list("melee" = 35, "bullet" = 40, "laser" = 40, "energy" = 50, "bomb" = 35, "bio" = 10, "rad" = 10, "fire" = 10, "acid" = 60) + togglename = "buttons" + +/obj/item/clothing/suit/toggle/armor/vest/centcom_formal/Initialize() + . = ..() + allowed = GLOB.security_wintercoat_allowed + +/obj/item/clothing/suit/toggle/armor/hos/hos_formal + name = "\improper Head of Security's parade jacket" + desc = "For when an armoured vest isn't fashionable enough." + icon_state = "hosformal" + item_state = "hostrench" + body_parts_covered = CHEST|GROIN|ARMS + armor = list("melee" = 30, "bullet" = 30, "laser" = 30, "energy" = 40, "bomb" = 25, "bio" = 0, "rad" = 0, "fire" = 70, "acid" = 90, "wound" = 10) + togglename = "buttons" + +/obj/item/clothing/suit/toggle/armor/hos/hos_formal/Initialize() + . = ..() + allowed = GLOB.security_wintercoat_allowed diff --git a/code/modules/clothing/suits/toggles.dm b/code/modules/clothing/suits/toggles.dm index 4e29483846..78708f54bb 100644 --- a/code/modules/clothing/suits/toggles.dm +++ b/code/modules/clothing/suits/toggles.dm @@ -6,6 +6,7 @@ var/hoodtype = /obj/item/clothing/head/hooded/winterhood //so the chaplain hoodie or other hoodies can override this ///Alternative mode for hiding the hood, instead of storing the hood in the suit it qdels it, useful for when you deal with hooded suit with storage. var/alternative_mode = FALSE + var/no_t //do not update sprites when pulling up hood so we can avoid oddities with certain mechanics /obj/item/clothing/suit/hooded/Initialize() . = ..() @@ -51,6 +52,8 @@ update_icon() /obj/item/clothing/suit/hooded/update_icon_state() + if(no_t) + return icon_state = "[initial(icon_state)]" if(ishuman(hood?.loc)) var/mob/living/carbon/human/H = hood.loc diff --git a/code/modules/events/supermatter_surge.dm b/code/modules/events/supermatter_surge.dm index 6b0a093440..78b5c9e70c 100644 --- a/code/modules/events/supermatter_surge.dm +++ b/code/modules/events/supermatter_surge.dm @@ -27,13 +27,27 @@ if(prob(low_threat_perc)) severity = "low; the supermatter should return to normal operation shortly." else - severity = "medium; the supermatter should return to normal operation, but check NT CIMS to ensure this." + severity = "medium; the supermatter should return to normal operation, but regardless, check if the emitters may need to be turned off temporarily." else - severity = "high; if the supermatter's cooling is not fortified, coolant may need to be added." + severity = "high; the emitters likely need to be turned off, and if the supermatter's cooling loop is not fortified, pre-cooled gas may need to be added." if(100000 to INFINITY) - severity = "extreme; emergency action is likely to be required even if coolant loop is fine." + severity = "extreme; emergency action is likely to be required even if coolant loop is fine. Turn off the emitters and make sure the loop is properly cooling gases." if(power > 20000 || prob(round(power/200))) priority_announce("Supermatter surge detected. Estimated severity is [severity]", "Anomaly Alert") /datum/round_event/supermatter_surge/start() - GLOB.main_supermatter_engine.matter_power += power + var/obj/machinery/power/supermatter_crystal/supermatter = GLOB.main_supermatter_engine + var/power_proportion = supermatter.powerloss_inhibitor/2 // what % of the power goes into matter power, at most 50% + // we reduce the proportion that goes into actual matter power based on powerloss inhibitor + // primarily so the supermatter doesn't tesla the instant these happen + supermatter.matter_power += power * power_proportion + var/datum/gas_mixture/methane_puff = new + var/selected_gas = pick(4;GAS_CO2, 10;GAS_METHANE, 4;GAS_H2O, 1;GAS_BZ, 1;GAS_METHYL_BROMIDE) + methane_puff.set_moles(selected_gas, 500) + methane_puff.set_temperature(500) + var/energy_ratio = (power * 500 * (1-power_proportion)) / methane_puff.thermal_energy() + if(energy_ratio < 1) // energy output we want is lower than current energy, reduce the amount of gas we puff out + methane_puff.set_moles(GAS_METHANE, energy_ratio * 500) + else // energy output we want is higher than current energy, increase its actual heat + methane_puff.set_temperature(energy_ratio * 500) + supermatter.assume_air(methane_puff) diff --git a/code/modules/holiday/holidays.dm b/code/modules/holiday/holidays.dm index e3f5264568..239246cd59 100644 --- a/code/modules/holiday/holidays.dm +++ b/code/modules/holiday/holidays.dm @@ -641,6 +641,18 @@ Since Ramadan is an entire month that lasts 29.5 days on average, the start and /datum/holiday/easter/getStationPrefix() return pick("Fluffy","Bunny","Easter","Egg") +/datum/holiday/ianbirthday + name = "Ian's Birthday" //github.com/tgstation/tgstation/commit/de7e4f0de0d568cd6e1f0d7bcc3fd34700598acb + begin_month = SEPTEMBER + begin_day = 9 + end_day = 10 + +/datum/holiday/ianbirthday/greet() + return "Happy birthday, Ian!" + +/datum/holiday/ianbirthday/getStationPrefix() + return pick("Ian", "Corgi", "Erro") + //Random citadel thing for halloween species /proc/force_enable_halloween_species() var/list/oldlist = SSevents.holidays diff --git a/code/modules/jobs/job_types/atmospheric_technician.dm b/code/modules/jobs/job_types/atmospheric_technician.dm index bff56d1d16..de66c32138 100644 --- a/code/modules/jobs/job_types/atmospheric_technician.dm +++ b/code/modules/jobs/job_types/atmospheric_technician.dm @@ -39,7 +39,7 @@ backpack = /obj/item/storage/backpack/industrial satchel = /obj/item/storage/backpack/satchel/eng duffelbag = /obj/item/storage/backpack/duffelbag/engineering - box = /obj/item/storage/box/engineer + box = /obj/item/storage/box/survival/engineer pda_slot = SLOT_L_STORE backpack_contents = list(/obj/item/modular_computer/tablet/preset/advanced=1) diff --git a/code/modules/jobs/job_types/chief_engineer.dm b/code/modules/jobs/job_types/chief_engineer.dm index 902be0bdc8..804952dbb2 100644 --- a/code/modules/jobs/job_types/chief_engineer.dm +++ b/code/modules/jobs/job_types/chief_engineer.dm @@ -54,7 +54,7 @@ backpack = /obj/item/storage/backpack/industrial satchel = /obj/item/storage/backpack/satchel/eng duffelbag = /obj/item/storage/backpack/duffelbag/engineering - box = /obj/item/storage/box/engineer + box = /obj/item/storage/box/survival/engineer pda_slot = SLOT_L_STORE chameleon_extras = /obj/item/stamp/ce diff --git a/code/modules/jobs/job_types/head_of_security.dm b/code/modules/jobs/job_types/head_of_security.dm index c772a8acae..d612b6a56d 100644 --- a/code/modules/jobs/job_types/head_of_security.dm +++ b/code/modules/jobs/job_types/head_of_security.dm @@ -58,7 +58,7 @@ backpack = /obj/item/storage/backpack/security satchel = /obj/item/storage/backpack/satchel/sec duffelbag = /obj/item/storage/backpack/duffelbag/sec - box = /obj/item/storage/box/security + box = /obj/item/storage/box/survival/security implants = list(/obj/item/implant/mindshield) diff --git a/code/modules/jobs/job_types/security_officer.dm b/code/modules/jobs/job_types/security_officer.dm index bdae7fe028..3462fb96c9 100644 --- a/code/modules/jobs/job_types/security_officer.dm +++ b/code/modules/jobs/job_types/security_officer.dm @@ -133,7 +133,7 @@ GLOBAL_LIST_INIT(available_depts, list(SEC_DEPT_ENGINEERING, SEC_DEPT_MEDICAL, S backpack = /obj/item/storage/backpack/security satchel = /obj/item/storage/backpack/satchel/sec duffelbag = /obj/item/storage/backpack/duffelbag/sec - box = /obj/item/storage/box/security + box = /obj/item/storage/box/survival/security implants = list(/obj/item/implant/mindshield) diff --git a/code/modules/jobs/job_types/shaft_miner.dm b/code/modules/jobs/job_types/shaft_miner.dm index 04d3fb53b8..0c04380afe 100644 --- a/code/modules/jobs/job_types/shaft_miner.dm +++ b/code/modules/jobs/job_types/shaft_miner.dm @@ -45,7 +45,7 @@ backpack = /obj/item/storage/backpack/explorer satchel = /obj/item/storage/backpack/satchel/explorer duffelbag = /obj/item/storage/backpack/duffelbag - box = /obj/item/storage/box/survival_mining + box = /obj/item/storage/box/survival/mining chameleon_extras = /obj/item/gun/energy/kinetic_accelerator diff --git a/code/modules/jobs/job_types/station_engineer.dm b/code/modules/jobs/job_types/station_engineer.dm index 2396728ad8..25bd2196a0 100644 --- a/code/modules/jobs/job_types/station_engineer.dm +++ b/code/modules/jobs/job_types/station_engineer.dm @@ -42,7 +42,7 @@ backpack = /obj/item/storage/backpack/industrial satchel = /obj/item/storage/backpack/satchel/eng duffelbag = /obj/item/storage/backpack/duffelbag/engineering - box = /obj/item/storage/box/engineer + box = /obj/item/storage/box/survival/engineer pda_slot = SLOT_L_STORE backpack_contents = list(/obj/item/modular_computer/tablet/preset/advanced=1) diff --git a/code/modules/jobs/job_types/warden.dm b/code/modules/jobs/job_types/warden.dm index dae3094ebe..074ccac09f 100644 --- a/code/modules/jobs/job_types/warden.dm +++ b/code/modules/jobs/job_types/warden.dm @@ -54,7 +54,7 @@ backpack = /obj/item/storage/backpack/security satchel = /obj/item/storage/backpack/satchel/sec duffelbag = /obj/item/storage/backpack/duffelbag/sec - box = /obj/item/storage/box/security + box = /obj/item/storage/box/survival/security implants = list(/obj/item/implant/mindshield) diff --git a/code/modules/mapping/mapping_helpers/_mapping_helpers.dm b/code/modules/mapping/mapping_helpers/_mapping_helpers.dm index 4de16ba350..a96b81528f 100644 --- a/code/modules/mapping/mapping_helpers/_mapping_helpers.dm +++ b/code/modules/mapping/mapping_helpers/_mapping_helpers.dm @@ -8,61 +8,73 @@ ..() return late ? INITIALIZE_HINT_LATELOAD : INITIALIZE_HINT_QDEL + //airlock helpers /obj/effect/mapping_helpers/airlock layer = DOOR_HELPER_LAYER +/obj/effect/mapping_helpers/airlock/Initialize(mapload) + . = ..() + if(!mapload) + log_mapping("[src] spawned outside of mapload!") + return + var/obj/machinery/door/airlock/airlock = locate(/obj/machinery/door/airlock) in loc + if(!airlock) + log_mapping("[src] failed to find an airlock at [AREACOORD(src)]") + else + payload(airlock) + +/obj/effect/mapping_helpers/airlock/proc/payload(obj/machinery/door/airlock/payload) + return + /obj/effect/mapping_helpers/airlock/cyclelink_helper name = "airlock cyclelink helper" icon_state = "airlock_cyclelink_helper" -/obj/effect/mapping_helpers/airlock/cyclelink_helper/Initialize(mapload) - . = ..() - if(!mapload) - log_mapping("[src] spawned outside of mapload!") - return - var/obj/machinery/door/airlock/airlock = locate(/obj/machinery/door/airlock) in loc - if(airlock) - if(airlock.cyclelinkeddir) - log_mapping("[src] at [AREACOORD(src)] tried to set [airlock] cyclelinkeddir, but it's already set!") - else - airlock.cyclelinkeddir = dir +/obj/effect/mapping_helpers/airlock/cyclelink_helper/payload(obj/machinery/door/airlock/airlock) + if(airlock.cyclelinkeddir) + log_mapping("[src] at [AREACOORD(src)] tried to set [airlock] cyclelinkeddir, but it's already set!") else - log_mapping("[src] failed to find an airlock at [AREACOORD(src)]") + airlock.cyclelinkeddir = dir +/obj/effect/mapping_helpers/airlock/cyclelink_helper_multi + name = "airlock multi-cyclelink helper" + icon_state = "airlock_multicyclelink_helper" + var/cycle_id + +/obj/effect/mapping_helpers/airlock/cyclelink_helper_multi/payload(obj/machinery/door/airlock/airlock) + if(airlock.closeOtherId) + log_mapping("[src] at [AREACOORD(src)] tried to set [airlock] closeOtherId, but it's already set!") + else + airlock.closeOtherId = cycle_id /obj/effect/mapping_helpers/airlock/locked name = "airlock lock helper" icon_state = "airlock_locked_helper" -/obj/effect/mapping_helpers/airlock/locked/Initialize(mapload) - . = ..() - if(!mapload) - log_mapping("[src] spawned outside of mapload!") - return - var/obj/machinery/door/airlock/airlock = locate(/obj/machinery/door/airlock) in loc - if(airlock) - if(airlock.locked) - log_mapping("[src] at [AREACOORD(src)] tried to bolt [airlock] but it's already locked!") - else - airlock.locked = TRUE +/obj/effect/mapping_helpers/airlock/locked/payload(obj/machinery/door/airlock/airlock) + if(airlock.locked) + log_mapping("[src] at [AREACOORD(src)] tried to bolt [airlock] but it's already locked!") else - log_mapping("[src] failed to find an airlock at [AREACOORD(src)]") + airlock.locked = TRUE + /obj/effect/mapping_helpers/airlock/unres name = "airlock unresctricted side helper" icon_state = "airlock_unres_helper" -/obj/effect/mapping_helpers/airlock/unres/Initialize(mapload) - . = ..() - if(!mapload) - log_mapping("[src] spawned outside of mapload!") - return - var/obj/machinery/door/airlock/airlock = locate(/obj/machinery/door/airlock) in loc - if(airlock) - airlock.unres_sides ^= dir +/obj/effect/mapping_helpers/airlock/unres/payload(obj/machinery/door/airlock/airlock) + airlock.unres_sides ^= dir + +/obj/effect/mapping_helpers/airlock/abandoned + name = "airlock abandoned helper" + icon_state = "airlock_abandoned" + +/obj/effect/mapping_helpers/airlock/abandoned/payload(obj/machinery/door/airlock/airlock) + if(airlock.abandoned) + log_mapping("[src] at [AREACOORD(src)] tried to make [airlock] abandoned but it's already abandoned!") else - log_mapping("[src] failed to find an airlock at [AREACOORD(src)]") + airlock.abandoned = TRUE //needs to do its thing before spawn_rivers() is called @@ -79,9 +91,11 @@ INITIALIZE_IMMEDIATE(/obj/effect/mapping_helpers/no_lava) //This helper applies components to things on the map directly. /obj/effect/mapping_helpers/component_injector name = "Component Injector" + icon_state = "component" late = TRUE - var/target_type - var/target_name + var/all = FALSE //Will inject into all fitting the criteria if true, otherwise first found + var/target_type //Will inject into atoms of this type + var/target_name //Will inject into atoms with this name var/component_type //Late init so everything is likely ready and loaded (no warranty) @@ -98,8 +112,11 @@ INITIALIZE_IMMEDIATE(/obj/effect/mapping_helpers/no_lava) continue var/cargs = build_args() A._AddComponent(cargs) + if(!all) + qdel(src) + return + if(all) qdel(src) - return /obj/effect/mapping_helpers/component_injector/proc/build_args() return list(component_type) @@ -115,3 +132,276 @@ INITIALIZE_IMMEDIATE(/obj/effect/mapping_helpers/no_lava) CRASH("Wrong disease type passed in.") var/datum/disease/D = new disease_type() return list(component_type,D) + +// /obj/effect/mapping_helpers/component_injector/areabound +// name = "Areabound Injector" +// icon_state = "component_areabound" +// component_type = /datum/component/areabound +// target_type = /atom/movable + +/obj/effect/mapping_helpers/dead_body_placer + name = "Dead Body placer" + late = TRUE + icon_state = "deadbodyplacer" + var/bodycount = 2 //number of bodies to spawn + +/obj/effect/mapping_helpers/dead_body_placer/LateInitialize() + var/area/a = get_area(src) + var/list/trays = list() + for (var/i in a.contents) + if (istype(i, /obj/structure/bodycontainer/morgue)) + trays += i + if(!trays.len) + log_mapping("[src] at [x],[y] could not find any morgues.") + return + for (var/i = 1 to bodycount) + var/obj/structure/bodycontainer/morgue/j = pick(trays) + var/mob/living/carbon/human/h = new /mob/living/carbon/human(j, 1) + h.death() + for (var/part in h.internal_organs) //randomly remove organs from each body, set those we keep to be in stasis + if (prob(40)) + qdel(part) + else + var/obj/item/organ/O = part + O.organ_flags |= ORGAN_FROZEN + j.update_appearance() + qdel(src) + + +//On Ian's birthday, the hop's office is decorated. +/obj/effect/mapping_helpers/ianbirthday + name = "Ian's Bday Helper" + late = TRUE + icon_state = "iansbdayhelper" + var/balloon_clusters = 2 + +/obj/effect/mapping_helpers/ianbirthday/LateInitialize() + if(locate(/datum/holiday/ianbirthday) in SSevents.holidays) + birthday() + qdel(src) + +/obj/effect/mapping_helpers/ianbirthday/proc/birthday() + var/area/a = get_area(src) + var/list/table = list()//should only be one aka the front desk, but just in case... + var/list/openturfs = list() + + //confetti and a corgi balloon! (and some list stuff for more decorations) + for(var/thing in a.contents) + if(istype(thing, /obj/structure/table/reinforced)) + table += thing + if(isopenturf(thing)) + // new /obj/effect/decal/cleanable/confetti(thing) + // if(locate(/obj/structure/bed/dogbed/ian) in thing) + // new /obj/item/toy/balloon/corgi(thing) + // else + openturfs += thing + + //cake + knife to cut it! + if(length(table)) + var/turf/food_turf = get_turf(pick(table)) + new /obj/item/kitchen/knife(food_turf) + var/obj/item/reagent_containers/food/snacks/store/cake/birthday/iancake = new(food_turf) + iancake.desc = "Happy birthday, Ian!" + // remind me to give ian proper baloons! + //some balloons! this picks an open turf and pops a few balloons in and around that turf, yay. + // for(var/i in 1 to balloon_clusters) + // var/turf/clusterspot = pick_n_take(openturfs) + // new /obj/item/toy/balloon(clusterspot) + // var/balloons_left_to_give = 3 //the amount of balloons around the cluster + // var/list/dirs_to_balloon = GLOB.cardinals.Copy() + // while(balloons_left_to_give > 0) + // balloons_left_to_give-- + // var/chosen_dir = pick_n_take(dirs_to_balloon) + // var/turf/balloonstep = get_step(clusterspot, chosen_dir) + // var/placed = FALSE + // if(isopenturf(balloonstep)) + // var/obj/item/toy/balloon/B = new(balloonstep)//this clumps the cluster together + // placed = TRUE + // if(chosen_dir == NORTH) + // B.pixel_y -= 10 + // if(chosen_dir == SOUTH) + // B.pixel_y += 10 + // if(chosen_dir == EAST) + // B.pixel_x -= 10 + // if(chosen_dir == WEST) + // B.pixel_x += 10 + // if(!placed) + // new /obj/item/toy/balloon(clusterspot) + //remind me to add wall decor! + +/obj/effect/mapping_helpers/ianbirthday/admin//so admins may birthday any room + name = "generic birthday setup" + icon_state = "bdayhelper" + +/obj/effect/mapping_helpers/ianbirthday/admin/LateInitialize() + birthday() + qdel(src) + +//Ian, like most dogs, loves a good new years eve party. +/obj/effect/mapping_helpers/iannewyear + name = "Ian's New Years Helper" + late = TRUE + icon_state = "iansnewyrshelper" + +/obj/effect/mapping_helpers/iannewyear/LateInitialize() + if(SSevents.holidays && SSevents.holidays[NEW_YEAR]) + fireworks() + qdel(src) + +/obj/effect/mapping_helpers/iannewyear/proc/fireworks() + var/area/a = get_area(src) + var/list/table = list()//should only be one aka the front desk, but just in case... + var/list/openturfs = list() + + for(var/thing in a.contents) + if(istype(thing, /obj/structure/table/reinforced)) + table += thing + else if(isopenturf(thing)) + if(locate(/obj/structure/bed/dogbed/ian) in thing) + new /obj/item/clothing/head/festive(thing) + var/obj/item/reagent_containers/food/drinks/bottle/champagne/iandrink = new(thing) + iandrink.name = "dog champagne" + iandrink.pixel_y += 8 + iandrink.pixel_x += 8 + else + openturfs += thing + + var/turf/fireworks_turf = get_turf(pick(table)) + var/obj/item/storage/box/matches/matchbox = new(fireworks_turf) + matchbox.pixel_y += 8 + matchbox.pixel_x -= 3 + // new /obj/item/storage/box/fireworks/dangerous(fireworks_turf) //dangerous version for extra holiday memes. + +//lets mappers place notes on airlocks with custom info or a pre-made note from a path +/obj/effect/mapping_helpers/airlock_note_placer + name = "Airlock Note Placer" + late = TRUE + icon_state = "airlocknoteplacer" + var/note_info //for writing out custom notes without creating an extra paper subtype + var/note_name //custom note name + var/note_path //if you already have something wrote up in a paper subtype, put the path here + +/obj/effect/mapping_helpers/airlock_note_placer/LateInitialize() + var/turf/turf = get_turf(src) + if(note_path && !istype(note_path, /obj/item/paper)) //don't put non-paper in the paper slot thank you + log_mapping("[src] at [x],[y] had an improper note_path path, could not place paper note.") + qdel(src) + if(locate(/obj/machinery/door/airlock) in turf) + var/obj/machinery/door/airlock/found_airlock = locate(/obj/machinery/door/airlock) in turf + if(note_path) + found_airlock.note = note_path + found_airlock.update_appearance() + qdel(src) + if(note_info) + var/obj/item/paper/paper = new /obj/item/paper(src) + if(note_name) + paper.name = note_name + paper.info = "[note_info]" + found_airlock.note = paper + paper.forceMove(found_airlock) + found_airlock.update_appearance() + qdel(src) + log_mapping("[src] at [x],[y] had no note_path or note_info, cannot place paper note.") + qdel(src) + log_mapping("[src] at [x],[y] could not find an airlock on current turf, cannot place paper note.") + qdel(src) + +//This helper applies traits to things on the map directly. +/obj/effect/mapping_helpers/trait_injector + name = "Trait Injector" + icon_state = "trait" + late = TRUE + ///Will inject into all fitting the criteria if false, otherwise first found. + var/first_match_only = TRUE + ///Will inject into atoms of this type. + var/target_type + ///Will inject into atoms with this name. + var/target_name + ///Name of the trait, in the lower-case text (NOT the upper-case define) form. + var/trait_name + +//Late init so everything is likely ready and loaded (no warranty) +/obj/effect/mapping_helpers/trait_injector/LateInitialize() + if(!GLOB.trait_name_map) + GLOB.trait_name_map = generate_trait_name_map() + if(!GLOB.trait_name_map.Find(trait_name)) + CRASH("Wrong trait in [type] - [trait_name] is not a trait") + var/turf/target_turf = get_turf(src) + var/matches_found = 0 + for(var/a in target_turf.GetAllContents()) + var/atom/atom_on_turf = a + if(atom_on_turf == src) + continue + if(target_name && atom_on_turf.name != target_name) + continue + if(target_type && !istype(atom_on_turf,target_type)) + continue + ADD_TRAIT(atom_on_turf, trait_name, MAPPING_HELPER_TRAIT) + matches_found++ + if(first_match_only) + qdel(src) + return + if(!matches_found) + stack_trace("Trait mapper found no targets at ([x], [y], [z]). First Match Only: [first_match_only ? "true" : "false"] target type: [target_type] | target name: [target_name] | trait name: [trait_name]") + qdel(src) + +/// Fetches an external dmi and applies to the target object +/obj/effect/mapping_helpers/custom_icon + name = "Custom Icon Helper" + icon_state = "trait" + late = TRUE + ///Will inject into all fitting the criteria if false, otherwise first found. + var/first_match_only = TRUE + ///Will inject into atoms of this type. + var/target_type + ///Will inject into atoms with this name. + var/target_name + /// This is the var tha will be set with the fetched icon. In case you want to set some secondary icon sheets like inhands and such. + var/target_variable = "icon" + /// This should return raw dmi in response to http get request. For example: "https://github.com/tgstation/SS13-sprites/raw/master/mob/medu.dmi?raw=true" + var/icon_url + +/obj/effect/mapping_helpers/custom_icon/LateInitialize() + ///TODO put this injector stuff under common root + var/I = fetch_icon(icon_url) + var/turf/target_turf = get_turf(src) + var/matches_found = 0 + for(var/a in target_turf.GetAllContents()) + var/atom/atom_on_turf = a + if(atom_on_turf == src) + continue + if(target_name && atom_on_turf.name != target_name) + continue + if(target_type && !istype(atom_on_turf,target_type)) + continue + atom_on_turf.vars[target_variable] = I + matches_found++ + if(first_match_only) + qdel(src) + return + if(!matches_found) + stack_trace("[src] found no targets at ([x], [y], [z]). First Match Only: [first_match_only ? "true" : "false"] target type: [target_type] | target name: [target_name]") + qdel(src) + +/obj/effect/mapping_helpers/custom_icon/proc/fetch_icon(url) + var/static/icon_cache = list() + var/static/query_in_progress = FALSE //We're using a single tmp file so keep it linear. + if(query_in_progress) + UNTIL(!query_in_progress) + if(icon_cache[url]) + return icon_cache[url] + log_asset("Custom Icon Helper fetching dmi from: [url]") + var/datum/http_request/request = new() + var/file_name = "tmp/custom_map_icon.dmi" + request.prepare(RUSTG_HTTP_METHOD_GET, url , "", "", file_name) + query_in_progress = TRUE + request.begin_async() + UNTIL(request.is_complete()) + var/datum/http_response/response = request.into_response() + if(response.errored || response.status_code != 200) + query_in_progress = FALSE + CRASH("Failed to fetch mapped custom icon from url [url], code: [response.status_code], error: [response.error]") + var/icon/I = new(file_name) + icon_cache[url] = I + query_in_progress = FALSE + return I diff --git a/code/modules/mapping/mapping_helpers/baseturf.dm b/code/modules/mapping/mapping_helpers/baseturf.dm index f4bd0d7c7f..4d79d3dba5 100644 --- a/code/modules/mapping/mapping_helpers/baseturf.dm +++ b/code/modules/mapping/mapping_helpers/baseturf.dm @@ -30,8 +30,8 @@ qdel(src) /obj/effect/baseturf_helper/proc/replace_baseturf(turf/thing) - var/list/baseturf_cache = thing.baseturfs - if(length(baseturf_cache)) + if(length(thing.baseturfs)) + var/list/baseturf_cache = thing.baseturfs.Copy() for(var/i in baseturf_cache) if(baseturf_to_replace[i]) baseturf_cache -= i @@ -44,6 +44,8 @@ else thing.PlaceOnBottom(null, baseturf) + + /obj/effect/baseturf_helper/space name = "space baseturf editor" baseturf = /turf/open/space @@ -79,4 +81,3 @@ /obj/effect/baseturf_helper/lava_land/surface name = "lavaland baseturf editor" baseturf = /turf/open/lava/smooth/lava_land_surface - diff --git a/code/modules/mining/equipment/explorer_gear.dm b/code/modules/mining/equipment/explorer_gear.dm index cda38033c2..dc52fb7f20 100644 --- a/code/modules/mining/equipment/explorer_gear.dm +++ b/code/modules/mining/equipment/explorer_gear.dm @@ -2,8 +2,9 @@ /obj/item/clothing/suit/hooded/explorer name = "explorer suit" desc = "An armoured suit for exploring harsh environments." - icon_state = "explorer" - item_state = "explorer" + icon_state = "explorer-normal" + item_state = "explorer-normal" + var/suit_type = "normal" body_parts_covered = CHEST|GROIN|LEGS|ARMS cold_protection = CHEST|GROIN|LEGS|ARMS min_cold_protection_temperature = FIRE_SUIT_MIN_TEMP_PROTECT @@ -13,11 +14,15 @@ allowed = list(/obj/item/flashlight, /obj/item/tank/internals, /obj/item/resonator, /obj/item/mining_scanner, /obj/item/t_scanner/adv_mining_scanner, /obj/item/gun/energy/kinetic_accelerator, /obj/item/pickaxe) resistance_flags = FIRE_PROOF mutantrace_variation = STYLE_DIGITIGRADE|STYLE_SNEK_TAURIC|STYLE_PAW_TAURIC + no_t = TRUE /obj/item/clothing/head/hooded/explorer name = "explorer hood" desc = "An armoured hood for exploring harsh environments." - icon_state = "explorer" + icon_state = "explorer-normal" + item_state = "explorer-normal" + var/suit_type = "normal" + var/basestate = "normal" body_parts_covered = HEAD flags_inv = HIDEHAIR|HIDEFACE|HIDEEARS min_cold_protection_temperature = FIRE_HELM_MIN_TEMP_PROTECT @@ -33,10 +38,40 @@ /obj/item/clothing/suit/hooded/explorer/standard/Initialize() . = ..() AddComponent(/datum/component/armor_plate) + RegisterSignal(src, COMSIG_ARMOR_PLATED, .proc/upgrade_icon) + +/obj/item/clothing/suit/hooded/explorer/standard/proc/upgrade_icon(datum/source, amount, maxamount) + SIGNAL_HANDLER + + if(amount) + name = "reinforced [initial(name)]" + suit_type = "normal_goliath" + if(amount == maxamount) + suit_type = "normal_goliath_full" + icon_state = "explorer-[suit_type]" + if(ishuman(loc)) + var/mob/living/carbon/human/wearer = loc + if(wearer.wear_suit == src) + wearer.update_inv_wear_suit() /obj/item/clothing/head/hooded/explorer/standard/Initialize() . = ..() AddComponent(/datum/component/armor_plate) + RegisterSignal(src, COMSIG_ARMOR_PLATED, .proc/upgrade_icon) + +/obj/item/clothing/head/hooded/explorer/standard/proc/upgrade_icon(datum/source, amount, maxamount) + SIGNAL_HANDLER + + if(amount) + name = "reinforced [initial(name)]" + suit_type = "normal_goliath" + if(amount == maxamount) + suit_type = "normal_goliath_full" + icon_state = "explorer-[suit_type]" + if(ishuman(loc)) + var/mob/living/carbon/human/wearer = loc + if(wearer.head == src) + wearer.update_inv_head() /obj/item/clothing/mask/gas/explorer name = "explorer gas mask" diff --git a/code/modules/mob/dead/new_player/sprite_accessories/hair_head.dm b/code/modules/mob/dead/new_player/sprite_accessories/hair_head.dm index 88dda923a0..e002fa369d 100644 --- a/code/modules/mob/dead/new_player/sprite_accessories/hair_head.dm +++ b/code/modules/mob/dead/new_player/sprite_accessories/hair_head.dm @@ -1058,3 +1058,58 @@ /datum/sprite_accessory/hair/zone name = "Zone" icon_state = "hair_zone" + +/datum/sprite_accessory/hair_gradient + icon = 'icons/mob/hair_gradients.dmi' + +/datum/sprite_accessory/hair_gradient/none + name = "None" + icon_state = "none" + +/datum/sprite_accessory/hair_gradient/fadeup + name = "Fade Up" + icon_state = "fadeup" + +/datum/sprite_accessory/hair_gradient/fadedown + name = "Fade Down" + icon_state = "fadedown" + +/datum/sprite_accessory/hair_gradient/vertical_split + name = "Vertical Split" + icon_state = "vsplit" + +/datum/sprite_accessory/hair_gradient/_split + name = "Horizontal Split" + icon_state = "bottomflat" + +/datum/sprite_accessory/hair_gradient/reflected + name = "Reflected" + icon_state = "reflected_high" + +/datum/sprite_accessory/hair_gradient/reflected_inverse + name = "Reflected Inverse" + icon_state = "reflected_inverse_high" + +/datum/sprite_accessory/hair_gradient/wavy + name = "Wavy" + icon_state = "wavy" + +/datum/sprite_accessory/hair_gradient/long_fade_up + name = "Long Fade Up" + icon_state = "long_fade_up" + +/datum/sprite_accessory/hair_gradient/long_fade_down + name = "Long Fade Down" + icon_state = "long_fade_down" + +/datum/sprite_accessory/hair_gradient/short_fade_up + name = "Short Fade Up" + icon_state = "short_fade_up" + +/datum/sprite_accessory/hair_gradient/short_fade_down + name = "Short Fade Down" + icon_state = "short_fade_down" + +/datum/sprite_accessory/hair_gradient/wavy_spike + name = "Spiked Wavy" + icon_state = "wavy_spiked" diff --git a/code/modules/mob/dead/new_player/sprite_accessories/synthliz.dm b/code/modules/mob/dead/new_player/sprite_accessories/synthliz.dm index c7cd699ec9..08897ade34 100644 --- a/code/modules/mob/dead/new_player/sprite_accessories/synthliz.dm +++ b/code/modules/mob/dead/new_player/sprite_accessories/synthliz.dm @@ -38,14 +38,14 @@ icon = 'modular_citadel/icons/mob/synthliz_body_markings.dmi' name = "Synthetic Lizard - Pecs Light" icon_state = "synthlizpecslight" - covered_limbs = list("Chest" = MATRIX_GREEN_BLUE) + covered_limbs = list("Chest" = MATRIX_GREEN_BLUE, "Left Arm" = MATRIX_BLUE, "Right Arm" = MATRIX_BLUE, "Left Leg" = MATRIX_GREEN, "Right Leg" = MATRIX_GREEN) /datum/sprite_accessory/mam_body_markings/synthliz recommended_species = list("synthliz") icon = 'modular_citadel/icons/mob/synthliz_body_markings.dmi' name = "Synthetic Lizard - Plates" icon_state = "synthlizscutes" - covered_limbs = list("Chest" = MATRIX_GREEN) + covered_limbs = list("Chest" = MATRIX_GREEN, "Left Leg" = MATRIX_GREEN, "Right Leg" = MATRIX_GREEN) //Synth tails /datum/sprite_accessory/tails/mam_tails/synthliz diff --git a/code/modules/mob/dead/new_player/sprite_accessories/tails.dm b/code/modules/mob/dead/new_player/sprite_accessories/tails.dm index b5ba7f0732..64a3c1a24c 100644 --- a/code/modules/mob/dead/new_player/sprite_accessories/tails.dm +++ b/code/modules/mob/dead/new_player/sprite_accessories/tails.dm @@ -542,6 +542,20 @@ icon = 'modular_citadel/icons/mob/mam_tails.dmi' matrixed_sections = MATRIX_RED_GREEN +/datum/sprite_accessory/tails/human/takahiro_kitsune + name = "Takahiro Kitsune Tails" //takahiro had five tails i just wanted to follow the 'T' naming convention vs. tamamo and triple + icon_state = "7sune" + color_src = MATRIXED + icon = 'modular_citadel/icons/mob/mam_tails.dmi' + matrixed_sections = MATRIX_RED_GREEN + +/datum/sprite_accessory/tails_animated/human/takahiro_kitsune + name = "Takahiro Kitsune Tails" + icon_state = "7sune" + color_src = MATRIXED + icon = 'modular_citadel/icons/mob/mam_tails.dmi' + matrixed_sections = MATRIX_RED_GREEN + /datum/sprite_accessory/tails/human/tentacle name = "Tentacle" icon_state = "tentacle" diff --git a/code/modules/mob/dead/observer/observer.dm b/code/modules/mob/dead/observer/observer.dm index 429f00161b..1aa2863eda 100644 --- a/code/modules/mob/dead/observer/observer.dm +++ b/code/modules/mob/dead/observer/observer.dm @@ -176,7 +176,7 @@ GLOBAL_VAR_INIT(observer_default_invisibility, INVISIBILITY_OBSERVER) * Hair will always update its dir, so if your sprite has no dirs the haircut will go all over the place. * |- Ricotez */ -/mob/dead/observer/update_icon(new_form) +/mob/dead/observer/update_icon(updates=ALL, new_form=null) . = ..() if(client) //We update our preferences in case they changed right before update_icon was called. ghost_accs = client.prefs.ghost_accs diff --git a/code/modules/mob/living/carbon/human/human_defines.dm b/code/modules/mob/living/carbon/human/human_defines.dm index de934318b3..6723d2d4a6 100644 --- a/code/modules/mob/living/carbon/human/human_defines.dm +++ b/code/modules/mob/living/carbon/human/human_defines.dm @@ -20,6 +20,11 @@ var/hair_color = "000" var/hair_style = "Bald" + ///Colour used for the hair gradient. + var/grad_color = "000" + ///Style used for the hair gradient. + var/grad_style + //Facial hair colour and style var/facial_hair_color = "000" var/facial_hair_style = "Shaved" @@ -81,6 +86,8 @@ tooltips = TRUE + var/additional_language //the additional language this human can speak from their preference selection + /// Unarmed parry data for human /datum/block_parry_data/unarmed/human parry_respect_clickdelay = TRUE diff --git a/code/modules/mob/living/carbon/human/species.dm b/code/modules/mob/living/carbon/human/species.dm index 6f94be2d41..80edd142b7 100644 --- a/code/modules/mob/living/carbon/human/species.dm +++ b/code/modules/mob/living/carbon/human/species.dm @@ -52,6 +52,10 @@ GLOBAL_LIST_EMPTY(roundstart_race_names) var/hair_color ///The alpha used by the hair. 255 is completely solid, 0 is invisible. var/hair_alpha = 255 + ///The gradient style used for the mob's hair. + var/grad_style + ///The gradient color used to color the gradient. + var/grad_color ///Does the species use skintones or not? As of now only used by humans. var/use_skintones = FALSE @@ -678,6 +682,7 @@ GLOBAL_LIST_EMPTY(roundstart_race_names) if(!hair_hidden || dynamic_hair_suffix) var/mutable_appearance/hair_overlay = mutable_appearance(layer = -HAIR_LAYER) + var/mutable_appearance/gradient_overlay = mutable_appearance(layer = -HAIR_LAYER) if(!hair_hidden && !H.getorgan(/obj/item/organ/brain)) //Applies the debrained overlay if there is no brain if(!(NOBLOOD in species_traits)) hair_overlay.icon = 'icons/mob/human_parts.dmi' @@ -713,8 +718,21 @@ GLOBAL_LIST_EMPTY(roundstart_race_names) hair_overlay.color = "#" + hair_color else hair_overlay.color = "#" + H.hair_color + + //Gradients + grad_style = H.grad_style + grad_color = H.grad_color + if(grad_style) + var/datum/sprite_accessory/gradient = GLOB.hair_gradients_list[grad_style] + var/icon/temp = icon(gradient.icon, gradient.icon_state) + var/icon/temp_hair = icon(hair_file, hair_state) + temp.Blend(temp_hair, ICON_ADD) + gradient_overlay.icon = temp + gradient_overlay.color = "#" + grad_color + else hair_overlay.color = forced_colour + hair_overlay.alpha = hair_alpha if(OFFSET_HAIR in H.dna.species.offset_features) @@ -723,6 +741,7 @@ GLOBAL_LIST_EMPTY(roundstart_race_names) if(hair_overlay.icon) standing += hair_overlay + standing += gradient_overlay if(standing.len) H.overlays_standing[HAIR_LAYER] = standing diff --git a/code/modules/mob/living/living_active_parry.dm b/code/modules/mob/living/living_active_parry.dm index e34c5ce053..13240b2734 100644 --- a/code/modules/mob/living/living_active_parry.dm +++ b/code/modules/mob/living/living_active_parry.dm @@ -103,13 +103,16 @@ var/_method = override[thing] if(_method == ITEM_PARRY) using_item = thing + tool = using_item method = ITEM_PARRY data = using_item.block_parry_data else if(_method == UNARMED_PARRY) method = UNARMED_PARRY + tool = src data = thing if(!using_item && !method && length(other_items)) using_item = other_items[1] + tool = using_item method = ITEM_PARRY data = using_item.block_parry_data if(!method) diff --git a/code/modules/mob/living/silicon/robot/inventory.dm b/code/modules/mob/living/silicon/robot/inventory.dm index b11737659c..559ffbbc08 100644 --- a/code/modules/mob/living/silicon/robot/inventory.dm +++ b/code/modules/mob/living/silicon/robot/inventory.dm @@ -3,12 +3,15 @@ /** * Returns the thing in our active hand (whatever is in our active module-slot, in this case) + * + * Arguments + * * get_gripper - If the active module is a gripper, should we return the gripper or the contained item? (if the gripper contains nothing, returns the gripper anyways) */ -/mob/living/silicon/robot/get_active_held_item() +/mob/living/silicon/robot/get_active_held_item(get_gripper = FALSE) var/item = module_active // snowflake handler for the gripper - if(istype(item, /obj/item/weapon/gripper)) - var/obj/item/weapon/gripper/G = item + if(istype(item, /obj/item/gripper) && !get_gripper) + var/obj/item/gripper/G = item if(G.wrapped) if(G.wrapped.loc != G) G.wrapped = null @@ -284,9 +287,14 @@ /** * Unequips the active held item, if there is one. + * + * Will always consider dropping gripper contents first. */ /mob/living/silicon/robot/proc/uneq_active() if(module_active) + var/obj/item/gripper/gripper = get_active_held_item(TRUE) + if(istype(gripper) && gripper.drop_held()) + return unequip_module_from_slot(module_active, get_selected_module()) /** @@ -302,11 +310,12 @@ * Checks if the item is currently in a slot. * * If the item is found in a slot, this returns TRUE. Otherwise, it returns FALSE + * Modified to accept items inside of grippers, used for `code\modules\tgui\states\hands.dm:27` * Arguments * * item_module - the item being checked */ /mob/living/silicon/robot/proc/activated(obj/item/item_module) - if(item_module in held_items) + if(get_active_held_item() == item_module || (item_module in held_items)) return TRUE return FALSE diff --git a/code/modules/mob/living/silicon/robot/robot_modules.dm b/code/modules/mob/living/silicon/robot/robot_modules.dm index d0c53508fa..7ecc714b56 100644 --- a/code/modules/mob/living/silicon/robot/robot_modules.dm +++ b/code/modules/mob/living/silicon/robot/robot_modules.dm @@ -328,7 +328,7 @@ /obj/item/crowbar/cyborg, /obj/item/healthanalyzer, /obj/item/reagent_containers/borghypo, - /obj/item/weapon/gripper/medical, + /obj/item/gripper/medical, /obj/item/reagent_containers/dropper, /obj/item/reagent_containers/syringe, /obj/item/surgical_drapes, @@ -448,7 +448,7 @@ /obj/item/analyzer, /obj/item/storage/part_replacer/cyborg, /obj/item/holosign_creator/combifan, - /obj/item/weapon/gripper, + /obj/item/gripper, /obj/item/lightreplacer/cyborg, /obj/item/geiger_counter/cyborg, /obj/item/assembly/signaler/cyborg, @@ -923,7 +923,7 @@ /obj/item/gun/energy/kinetic_accelerator/cyborg, /obj/item/gun/energy/plasmacutter/cyborg, /obj/item/gps/cyborg, - /obj/item/weapon/gripper/mining, + /obj/item/gripper/mining, /obj/item/cyborg_clamp, /obj/item/stack/marker_beacon, /obj/item/destTagger, @@ -1075,7 +1075,7 @@ /obj/item/multitool/cyborg, /obj/item/storage/part_replacer/cyborg, /obj/item/holosign_creator/atmos, - /obj/item/weapon/gripper, + /obj/item/gripper, /obj/item/lightreplacer/cyborg, /obj/item/stack/sheet/metal/cyborg, /obj/item/stack/sheet/glass/cyborg, diff --git a/code/modules/mob/living/simple_animal/friendly/mouse.dm b/code/modules/mob/living/simple_animal/friendly/mouse.dm index 8348af43fa..340d2e5598 100644 --- a/code/modules/mob/living/simple_animal/friendly/mouse.dm +++ b/code/modules/mob/living/simple_animal/friendly/mouse.dm @@ -98,6 +98,16 @@ qdel(bigcheese) evolve() return + for(var/obj/item/trash/garbage in range(1, src)) + if(prob(2)) + qdel(garbage) + evolve_plague() + return + for(var/obj/effect/decal/cleanable/blood/gibs/leftovers in range(1, src)) + if(prob(2)) + qdel(leftovers) + evolve_plague() + return /** *Checks the mouse cap, if it's above the cap, doesn't spawn a mouse. If below, spawns a mouse and adds it to cheeserats. @@ -123,6 +133,13 @@ mind.transfer_to(regalrat) qdel(src) +/mob/living/simple_animal/mouse/proc/evolve_plague() + var/mob/living/simple_animal/hostile/plaguerat = new /mob/living/simple_animal/hostile/plaguerat(loc) + visible_message("[src] devours the food! He rots into something worse!") + if(mind) + mind.transfer_to(plaguerat) + qdel(src) + /* * Mouse types */ @@ -169,3 +186,16 @@ GLOBAL_VAR(tom_existed) /obj/item/reagent_containers/food/snacks/deadmouse/on_grind() reagents.clear_reagents() +/mob/living/simple_animal/mouse/proc/miasma(datum/gas_mixture/environment, check_temp = FALSE) + if(isturf(src.loc) && isopenturf(src.loc)) + var/turf/open/ST = src.loc + var/miasma_moles = ST.air.get_moles(GAS_MIASMA) + if(prob(5) && miasma_moles >= 5) + evolve_plague() + else if(miasma_moles >= 20) + evolve_plague() + return + +/mob/living/simple_animal/mouse/handle_environment(datum/gas_mixture/environment) + . = ..() + miasma() diff --git a/code/modules/mob/living/simple_animal/gremlin/gremlin.dm b/code/modules/mob/living/simple_animal/gremlin/gremlin.dm new file mode 100644 index 0000000000..61436cea1c --- /dev/null +++ b/code/modules/mob/living/simple_animal/gremlin/gremlin.dm @@ -0,0 +1,254 @@ +#define GREMLIN_VENT_CHANCE 1.75 + +//Gremlins +//Small monsters that don't attack humans or other animals. Instead they mess with electronics, computers and machinery + +//List of objects that gremlins can't tamper with (because nobody coded an interaction for it) +//List starts out empty. Whenever a gremlin finds a machine that it couldn't tamper with, the machine's type is added here, and all machines of such type are ignored from then on (NOT SUBTYPES) +GLOBAL_LIST(bad_gremlin_items) + +/mob/living/simple_animal/hostile/gremlin + name = "gremlin" + desc = "This tiny creature finds great joy in discovering and using technology. Nothing excites it more than pushing random buttons on a computer to see what it might do." + icon = 'icons/mob/mob.dmi' + icon_state = "gremlin" + icon_living = "gremlin" + icon_dead = "gremlin_dead" + + var/in_vent = FALSE + + health = 20 + maxHealth = 20 + search_objects = 3 //Completely ignore mobs + + //Tampering is handled by the 'npc_tamper()' obj proc + wanted_objects = list( + /obj/machinery, + /obj/item/reagent_containers/food, + /obj/structure/sink + ) + + var/obj/machinery/atmospherics/components/unary/vent_pump/entry_vent + var/obj/machinery/atmospherics/components/unary/vent_pump/exit_vent + + dextrous = TRUE + possible_a_intents = list(INTENT_HELP, INTENT_GRAB, INTENT_DISARM, INTENT_HARM) + faction = list("meme", "gremlin") + speed = 0.5 + gold_core_spawnable = 2 + unique_name = TRUE + + //Ensure gremlins don't attack other mobs + melee_damage_upper = 0 + melee_damage_lower = 0 + attack_sound = null + obj_damage = 0 + environment_smash = ENVIRONMENT_SMASH_NONE + + //List of objects that we don't even want to try to tamper with + //Subtypes of these are calculated too + var/list/unwanted_objects = list(/obj/machinery/atmospherics/pipe, /turf, /obj/structure) //ensure gremlins dont try to fuck with walls / normal pipes / glass / etc + + var/min_next_vent = 0 + + //Amount of ticks spent pathing to the target. If it gets above a certain amount, assume that the target is unreachable and stop + var/time_chasing_target = 0 + + //If you're going to make gremlins slower, increase this value - otherwise gremlins will abandon their targets too early + var/max_time_chasing_target = 2 + + var/next_eat = 0 + + //Last 20 heard messages are remembered by gremlins, and will be used to generate messages for comms console tampering, etc... + var/list/hear_memory = list() + var/const/max_hear_memory = 20 + +/mob/living/simple_animal/hostile/gremlin/Initialize() + . = ..() + AddElement(/datum/element/ventcrawling, given_tier = VENTCRAWLER_ALWAYS) + access_card = new /obj/item/card/id(src) + var/datum/job/captain/C = new /datum/job/captain + access_card.access = C.get_access() + +/mob/living/simple_animal/hostile/gremlin/AttackingTarget() + var/is_hungry = world.time >= next_eat || prob(25) + if(istype(target, /obj/item/reagent_containers/food) && is_hungry) //eat food if we're hungry or bored + visible_message("[src] hungrily devours [target]!") + playsound(src, 'sound/items/eatfood.ogg', 50, 1) + qdel(target) + LoseTarget() + next_eat = world.time + rand(700, 3000) //anywhere from 70 seconds to 5 minutes until the gremlin is hungry again + return + if(istype(target, /obj)) + var/obj/M = target + tamper(M) + if(prob(50)) //50% chance to move to the next machine + LoseTarget() + +/mob/living/simple_animal/hostile/gremlin/Hear(message, atom/movable/speaker, message_langs, raw_message, radio_freq, list/spans, message_mode) + . = ..() + if(message) + hear_memory.Insert(1, raw_message) + if(hear_memory.len > max_hear_memory) + hear_memory.Cut(hear_memory.len) + +/mob/living/simple_animal/hostile/gremlin/proc/generate_markov_input() + var/result = "" + + for(var/memory in hear_memory) + result += memory + " " + + return result + +/mob/living/simple_animal/hostile/gremlin/proc/generate_markov_chain() + return markov_chain(generate_markov_input(), rand(2,5), rand(100,700)) //The numbers are chosen arbitarily + +/mob/living/simple_animal/hostile/gremlin/proc/tamper(obj/M) + switch(M.npc_tamper_act(src)) + if(NPC_TAMPER_ACT_FORGET) + visible_message(pick( + "\The [src] plays around with \the [M], but finds it rather boring.", + "\The [src] tries to think of some more ways to screw \the [M] up, but fails miserably.", + "\The [src] decides to ignore \the [M], and starts looking for something more fun.")) + + LAZYADD(GLOB.bad_gremlin_items,M.type) + return FALSE + if(NPC_TAMPER_ACT_NOMSG) + //Don't create a visible message + return TRUE + + else + visible_message(pick( + "\The [src]'s eyes light up as \he tampers with \the [M].", + "\The [src] twists some knobs around on \the [M] and bursts into laughter!", + "\The [src] presses a few buttons on \the [M] and giggles mischievously.", + "\The [src] rubs its hands devilishly and starts messing with \the [M].", + "\The [src] turns a small valve on \the [M].")) + + //Add a clue for detectives to find. The clue is only added if no such clue already existed on that machine + return TRUE + +/mob/living/simple_animal/hostile/gremlin/CanAttack(atom/new_target) + if(LAZYFIND(GLOB.bad_gremlin_items,new_target.type)) + return FALSE + if(is_type_in_list(new_target, unwanted_objects)) + return FALSE + if(istype(new_target, /obj/machinery)) + var/obj/machinery/M = new_target + if(M.stat) //Unpowered or broken + return FALSE + else if(istype(new_target, /obj/machinery/door/firedoor)) + var/obj/machinery/door/firedoor/F = new_target + //Only tamper with firelocks that are closed, opening them! + if(!F.density) + return FALSE + + return ..() + +/mob/living/simple_animal/hostile/gremlin/death(gibbed) + walk(src,0) + QDEL_NULL(access_card) + return ..() + +/mob/living/simple_animal/hostile/gremlin/Life() + . = ..() + if(!health || stat == DEAD) + return + //Don't try to path to one target for too long. If it takes longer than a certain amount of time, assume it can't be reached and find a new one + if(!client) //don't do this shit if there's a client, they're capable of ventcrawling manually + if(in_vent) + target = null + if(entry_vent && get_dist(src, entry_vent) <= 1) + var/list/vents = list() + var/datum/pipeline/entry_vent_parent = entry_vent.parents[1] + for(var/obj/machinery/atmospherics/components/unary/vent_pump/temp_vent in entry_vent_parent.other_atmosmch) + vents += temp_vent + if(!vents.len) + entry_vent = null + in_vent = FALSE + return + exit_vent = pick(vents) + visible_message("[src] crawls into the ventilation ducts!") + + loc = exit_vent + var/travel_time = round(get_dist(loc, exit_vent.loc) / 2) + addtimer(CALLBACK(src, .proc/exit_vents), travel_time) //come out at exit vent in 2 to 20 seconds + + + if(world.time > min_next_vent && !entry_vent && !in_vent && prob(GREMLIN_VENT_CHANCE)) //small chance to go into a vent + for(var/obj/machinery/atmospherics/components/unary/vent_pump/v in view(7,src)) + if(!v.welded) + entry_vent = v + in_vent = TRUE + walk_to(src, entry_vent) + break + if(!target) + time_chasing_target = 0 + else + if(++time_chasing_target > max_time_chasing_target) + LoseTarget() + time_chasing_target = 0 + . = ..() + +/mob/living/simple_animal/hostile/gremlin/EscapeConfinement() + if(istype(loc, /obj) && CanAttack(loc)) //If we're inside a machine, screw with it + var/obj/M = loc + tamper(M) + + return ..() + +/mob/living/simple_animal/hostile/gremlin/proc/exit_vents() + if(!exit_vent || exit_vent.welded) + loc = entry_vent + entry_vent = null + return + loc = exit_vent.loc + entry_vent = null + exit_vent = null + in_vent = FALSE + var/area/new_area = get_area(loc) + message_admins("[src] came out at [new_area][ADMIN_JMP(loc)]!") + if(new_area) + new_area.Entered(src) + visible_message("[src] climbs out of the ventilation ducts!") + min_next_vent = world.time + 900 //90 seconds between ventcrawls + +//This allows player-controlled gremlins to tamper with machinery +/mob/living/simple_animal/hostile/gremlin/UnarmedAttack(var/atom/A) + if(istype(A, /obj/machinery) || istype(A, /obj/structure)) + tamper(A) + if(istype(target, /obj/item/reagent_containers/food)) //eat food + visible_message("[src] hungrily devours [target]!", "You hungrily devour [target]!") + playsound(src, 'sound/items/eatfood.ogg', 50, 1) + qdel(target) + LoseTarget() + next_eat = world.time + rand(700, 3000) //anywhere from 70 seconds to 5 minutes until the gremlin is hungry again + + return ..() + +/mob/living/simple_animal/hostile/gremlin/IsAdvancedToolUser() + return 1 + +/mob/living/simple_animal/hostile/gremlin/proc/divide() + //Health is halved and then reduced by 2. A new gremlin is spawned with the same health as the parent + //Need to have at least 6 health for this, otherwise resulting health would be less than 1 + if(health < 7.5) + return + + visible_message("\The [src] splits into two!") + var/mob/living/simple_animal/hostile/gremlin/G = new /mob/living/simple_animal/hostile/gremlin(get_turf(src)) + + if(mind) + mind.transfer_to(G) + + health = round(health * 0.5) - 2 + maxHealth = health + resize *= 0.9 + + G.health = health + G.maxHealth = maxHealth + +/mob/living/simple_animal/hostile/gremlin/traitor + health = 85 + maxHealth = 85 + gold_core_spawnable = 0 diff --git a/code/modules/mob/living/simple_animal/gremlin/gremlin_act.dm b/code/modules/mob/living/simple_animal/gremlin/gremlin_act.dm new file mode 100644 index 0000000000..ff0eb13dc7 --- /dev/null +++ b/code/modules/mob/living/simple_animal/gremlin/gremlin_act.dm @@ -0,0 +1,214 @@ +/obj/proc/npc_tamper_act(mob/living/L) + return NPC_TAMPER_ACT_FORGET + +/obj/machinery/atmospherics/components/binary/passive_gate/npc_tamper_act(mob/living/L) + if(prob(50)) //Turn on/off + on = !on + investigate_log("was turned [on ? "on" : "off"] by [key_name(L)]", INVESTIGATE_ATMOS) + else //Change pressure + target_pressure = rand(0, MAX_OUTPUT_PRESSURE) + investigate_log("was set to [target_pressure] kPa by [key_name(L)]", INVESTIGATE_ATMOS) + update_icon() + +/obj/machinery/atmospherics/components/binary/pump/npc_tamper_act(mob/living/L) + if(prob(50)) //Turn on/off + on = !on + investigate_log("was turned [on ? "on" : "off"] by [key_name(L)]", INVESTIGATE_ATMOS) + else //Change pressure + target_pressure = rand(0, MAX_OUTPUT_PRESSURE) + investigate_log("was set to [target_pressure] kPa by [key_name(L)]", INVESTIGATE_ATMOS) + update_icon() + +/obj/machinery/atmospherics/components/binary/volume_pump/npc_tamper_act(mob/living/L) + if(prob(50)) //Turn on/off + on = !on + investigate_log("was turned [on ? "on" : "off"] by [key_name(L)]", INVESTIGATE_ATMOS) + else //Change pressure + transfer_rate = rand(0, MAX_TRANSFER_RATE) + investigate_log("was set to [transfer_rate] L/s by [key_name(L)]", INVESTIGATE_ATMOS) + update_icon() + +/obj/machinery/atmospherics/components/binary/valve/npc_tamper_act(mob/living/L) + attack_hand(L) + +/obj/machinery/space_heater/npc_tamper_act(mob/living/L) + var/list/choose_modes = list("standby", "heat", "cool") + if(prob(50)) + choose_modes -= mode + mode = pick(choose_modes) + else + on = !on + update_icon() + +/obj/machinery/shield_gen/npc_tamper_act(mob/living/L) + attack_hand(L) + +/obj/machinery/firealarm/npc_tamper_act(mob/living/L) + alarm() + +/obj/machinery/airalarm/npc_tamper_act(mob/living/L) + if(panel_open) + wires.npc_tamper(L) + else + panel_open = !panel_open + +/obj/machinery/ignition_switch/npc_tamper_act(mob/living/L) + attack_hand(L) + +/obj/machinery/flasher_button/npc_tamper_act(mob/living/L) + attack_hand(L) + +/obj/machinery/crema_switch/npc_tamper_act(mob/living/L) + attack_hand(L) + +/obj/machinery/camera/npc_tamper_act(mob/living/L) + if(!panel_open) + panel_open = !panel_open + if(wires) + wires.npc_tamper(L) + +/obj/machinery/atmospherics/components/unary/cryo_cell/npc_tamper_act(mob/living/L) + if(prob(50)) + if(beaker) + beaker.forceMove(loc) + beaker = null + else + if(occupant) + if(state_open) + if (close_machine() == usr) + on = TRUE + else + open_machine() + +/obj/machinery/door_control/npc_tamper_act(mob/living/L) + attack_hand(L) + +/obj/machinery/door/airlock/npc_tamper_act(mob/living/L) + //Open the firelocks as well, otherwise they block the way for our gremlin which isn't fun + for(var/obj/machinery/door/firedoor/F in get_turf(src)) + if(F.density) + F.npc_tamper_act(L) + + if(prob(40)) //40% - mess with wires + if(!panel_open) + panel_open = !panel_open + if(wires) + wires.npc_tamper(L) + else //60% - just open it + open() + +/obj/machinery/gibber/npc_tamper_act(mob/living/L) + attack_hand(L) + +/obj/machinery/light_switch/npc_tamper_act(mob/living/L) + attack_hand(L) + +/obj/machinery/turretid/npc_tamper_act(mob/living/L) + enabled = rand(0, 1) + lethal = rand(0, 1) + updateTurrets() + +/obj/machinery/vending/npc_tamper_act(mob/living/L) + if(!panel_open) + panel_open = !panel_open + if(wires) + wires.npc_tamper(L) + +/obj/machinery/shower/npc_tamper_act(mob/living/L) + attack_hand(L) + + +/obj/machinery/deepfryer/npc_tamper_act(mob/living/L) + //Deepfry a random nearby item + var/list/pickable_items = list() + + for(var/obj/item/I in range(1, L)) + pickable_items.Add(I) + + if(!pickable_items.len) + return + + var/obj/item/I = pick(pickable_items) + + attackby(I, L) //shove the item in, even if it can't be deepfried normally + +/obj/machinery/power/apc/npc_tamper_act(mob/living/L) + if(!panel_open) + panel_open = !panel_open + if(wires) + wires.npc_tamper(L) + +/obj/machinery/power/rad_collector/npc_tamper_act(mob/living/L) + attack_hand(L) + +/obj/machinery/power/emitter/npc_tamper_act(mob/living/L) + attack_hand(L) + +/obj/machinery/particle_accelerator/control_box/npc_tamper_act(mob/living/L) + if(!panel_open) + panel_open = !panel_open + if(wires) + wires.npc_tamper(L) + +/obj/machinery/computer/communications/npc_tamper_act(mob/living/user) + if(!authenticated) + if(prob(20)) //20% chance to log in + authenticated = TRUE + + else //Already logged in + if(prob(50)) //50% chance to log off + authenticated = FALSE + else if(istype(user, /mob/living/simple_animal/hostile/gremlin)) //make a hilarious public message + var/mob/living/simple_animal/hostile/gremlin/G = user + var/result = G.generate_markov_chain() + + if(result) + if(prob(85)) + SScommunications.make_announcement(G, FALSE, result) + var/turf/T = get_turf(G) + log_say("[key_name(usr)] ([ADMIN_JMP(T)]) has made a captain announcement: [result]") + message_admins("[key_name_admin(G)] has made a captain announcement.", 1) + else + if(SSshuttle.emergency.mode == SHUTTLE_IDLE) + SSshuttle.requestEvac(G, result) + else if(SSshuttle.emergency.mode == SHUTTLE_ESCAPE) + SSshuttle.cancelEvac(G) + +/obj/machinery/button/door/npc_tamper_act(mob/living/L) + attack_hand(L) + +/obj/machinery/sleeper/npc_tamper_act(mob/living/L) + if(prob(75)) + inject_chem(pick(available_chems)) + else + if(state_open) + close_machine() + else + open_machine() + +/obj/machinery/power/smes/npc_tamper_act(mob/living/L) + if(prob(50)) //mess with input + input_level = rand(0, input_level_max) + else //mess with output + output_level = rand(0, output_level_max) + +/obj/machinery/syndicatebomb/npc_tamper_act(mob/living/L) //suicide bomber gremlins + if(!open_panel) + open_panel = !open_panel + if(wires) + wires.npc_tamper(L) + +/obj/machinery/computer/bank_machine/npc_tamper_act(mob/living/L) + siphoning = !siphoning + +/obj/machinery/computer/slot_machine/npc_tamper_act(mob/living/L) + spin(L) + +/obj/structure/sink/npc_tamper_act(mob/living/L) + if(istype(L, /mob/living/simple_animal/hostile/gremlin)) + visible_message("\The [L] climbs into \the [src] and turns the faucet on!") + + var/mob/living/simple_animal/hostile/gremlin/G = L + G.divide() + + return NPC_TAMPER_ACT_NOMSG diff --git a/code/modules/mob/living/simple_animal/gremlin/gremlin_event.dm b/code/modules/mob/living/simple_animal/gremlin/gremlin_event.dm new file mode 100644 index 0000000000..6f5f0e3dba --- /dev/null +++ b/code/modules/mob/living/simple_animal/gremlin/gremlin_event.dm @@ -0,0 +1,44 @@ +/datum/round_event_control/gremlin + name = "Spawn Gremlins" + typepath = /datum/round_event/gremlin + weight = 15 + max_occurrences = 2 + earliest_start = 20 MINUTES + min_players = 5 + + + +/datum/round_event/gremlin + var/static/list/acceptable_spawns = list("xeno_spawn", "generic event spawn", "blobstart", "Assistant") + +/datum/round_event/gremlin/announce() + priority_announce("Bioscans indicate that some gremlins entered through the vents. Deal with them!", "Gremlin Alert", 'sound/announcer/classic/attention.ogg') + +/datum/round_event/gremlin/start() + + var/list/spawn_locs = list() + + for(var/obj/effect/landmark/L in GLOB.landmarks_list) + if(isturf(L.loc) && !isspaceturf(L.loc)) + if(L.name in acceptable_spawns) + spawn_locs += L.loc + if(!spawn_locs.len) //If we can't find any gremlin spawns, try the xeno spawns + for(var/obj/effect/landmark/L in GLOB.landmarks_list) + if(isturf(L.loc)) + switch(L.name) + if("Assistant") + spawn_locs += L.loc + if(!spawn_locs.len) //If we can't find THAT, then just give up and cry + return MAP_ERROR + + var/gremlins_to_spawn = rand(2,5) + var/list/gremlin_areas = list() + for(var/i = 0, i <= gremlins_to_spawn, i++) + var/spawnat = pick(spawn_locs) + spawn_locs -= spawnat + gremlin_areas += get_area(spawnat) + new /mob/living/simple_animal/hostile/gremlin(spawnat) + var/grems = gremlin_areas.Join(", ") + message_admins("Gremlins have been spawned at the areas: [grems]") + log_game("Gremlins have been spawned at the areas: [grems]") + return SUCCESSFUL_SPAWN diff --git a/code/modules/mob/living/simple_animal/hostile/megafauna/colossus.dm b/code/modules/mob/living/simple_animal/hostile/megafauna/colossus.dm index 5751512b19..7ca2f6c561 100644 --- a/code/modules/mob/living/simple_animal/hostile/megafauna/colossus.dm +++ b/code/modules/mob/living/simple_animal/hostile/megafauna/colossus.dm @@ -528,21 +528,7 @@ Difficulty: Very Hard /obj/machinery/anomalous_crystal/emitter/ActivationReaction(mob/user, method) if(..()) var/obj/item/projectile/P = new generated_projectile(get_turf(src)) - P.setDir(dir) - switch(dir) - if(NORTH) - P.yo = 20 - P.xo = 0 - if(EAST) - P.yo = 0 - P.xo = 20 - if(WEST) - P.yo = 0 - P.xo = -20 - else - P.yo = -20 - P.xo = 0 - P.fire() + P.fire(angle2dir(dir)) /obj/machinery/anomalous_crystal/dark_reprise //Revives anyone nearby, but turns them into shadowpeople and renders them uncloneable, so the crystal is your only hope of getting up again if you go down. observer_desc = "When activated, this crystal revives anyone nearby, but turns them into Shadowpeople and makes them unclonable, making the crystal their only hope of getting up again." diff --git a/code/modules/mob/living/simple_animal/hostile/plaguerat.dm b/code/modules/mob/living/simple_animal/hostile/plaguerat.dm new file mode 100644 index 0000000000..331dc1eb75 --- /dev/null +++ b/code/modules/mob/living/simple_animal/hostile/plaguerat.dm @@ -0,0 +1,131 @@ +/mob/living/simple_animal/hostile/plaguerat + name = "plague rat" + desc = "A large decaying rat. It spreads its filth and emits a putrid odor to create more of its kind." + icon_state = "plaguerat" + icon_living = "plaguerat" + icon_dead = "plaguerat_dead" + speak = list("Skree!","SKREEE!","Squeak?") + speak_emote = list("squeaks") + emote_hear = list("Hisses.") + emote_see = list("runs in a circle.", "stands on its hind legs.") + gender = NEUTER + speak_chance = 1 + turns_per_move = 5 + maxHealth = 15 + health = 15 + see_in_dark = 6 + obj_damage = 10 + butcher_results = list(/obj/item/reagent_containers/food/snacks/meat/slab = 1) + response_help_continuous = "glares at" + response_help_simple = "glare at" + response_disarm_continuous = "skoffs at" + response_disarm_simple = "skoff at" + response_harm_continuous = "slashes" + response_harm_simple = "slash" + melee_damage_lower = 5 + melee_damage_upper = 7 + attack_verb_continuous = "slashes" + attack_verb_simple = "slash" + attack_sound = 'sound/weapons/punch1.ogg' + faction = list("rat") + density = FALSE + pass_flags = PASSTABLE | PASSGRILLE | PASSMOB + mob_size = MOB_SIZE_TINY + mob_biotypes = MOB_ORGANIC|MOB_BEAST + var/datum/action/cooldown/scavenge + var/last_spawn_time = 0 + ///Number assigned to rats and mice, checked when determining infighting. + +/mob/living/simple_animal/hostile/plaguerat/Initialize() + . = ..() + SSmobs.cheeserats += src + AddComponent(/datum/component/swarming) + AddElement(/datum/element/ventcrawling, given_tier = VENTCRAWLER_ALWAYS) + scavenge = new /datum/action/cooldown/scavenge + scavenge.Grant(src) + +/mob/living/simple_animal/hostile/plaguerat/Destroy() + SSmobs.cheeserats -= src + return ..() + +/mob/living/simple_animal/hostile/plaguerat/BiologicalLife(seconds, times_fired) + if(!(. = ..())) + return + if(isopenturf(loc)) + var/turf/open/T = src.loc + if(T.air) + T.atmos_spawn_air("miasma=5;TEMP=293.15") + if(prob(40)) + scavenge.Trigger() + if(prob(50)) + var/turf/open/floor/F = get_turf(src) + if(istype(F) && !F.intact) + var/obj/structure/cable/C = locate() in F + if(C && C.avail()) + visible_message("[src] chews through the [C]. It looks unharmed!") + playsound(src, 'sound/effects/sparks2.ogg', 100, TRUE) + C.deconstruct() + for(var/obj/O in range(1,src)) + if(istype(O, /obj/item/trash) || istype(O, /obj/effect/decal/cleanable/blood/gibs)) + qdel(O) + be_fruitful() + +/mob/living/simple_animal/hostile/plaguerat/CanAttack(atom/the_target) + if(istype(the_target,/mob/living/simple_animal)) + var/mob/living/A = the_target + if(istype(the_target, /mob/living/simple_animal/hostile/plaguerat) && A.stat == CONSCIOUS) + var/mob/living/simple_animal/hostile/plaguerat/R = the_target + if(R.faction_check_mob(src, TRUE)) + return FALSE + else + return TRUE + return ..() + +/** + *Checks the mouse cap, if it's above the cap, doesn't spawn a mouse. If below, spawns a mouse and adds it to cheeserats. + */ + +/mob/living/simple_animal/hostile/plaguerat/proc/be_fruitful() + var/cap = CONFIG_GET(number/ratcap) + if(LAZYLEN(SSmobs.cheeserats) >= cap) + visible_message("[src] gnaws into its food, [cap] rats are now on the station!") + return + var/mob/living/newmouse = new /mob/living/simple_animal/hostile/plaguerat(loc) + SSmobs.cheeserats += newmouse + visible_message("[src] gnaws into its food, attracting another rat!") + +/** + *Creates a chance to spawn more trash or gibs to repopulate. Otherwise, spawns a corpse or dirt. + */ + +/datum/action/cooldown/scavenge + name = "Scavenge" + desc = "Spread the plague, scavenge for trash and fresh meat to reproduce." + icon_icon = 'icons/mob/actions/actions_animal.dmi' + background_icon_state = "bg_clock" + button_icon_state = "coffer" + cooldown_time = 50 + +/datum/action/cooldown/scavenge/Trigger() + . = ..() + if(!.) + return + var/turf/T = get_turf(owner) + var/loot = rand(1,100) + switch(loot) + if(1 to 3) + var/pickedtrash = pick(GLOB.ratking_trash) + to_chat(owner, "Excellent, you find more trash to spread your filth!") + new /obj/effect/decal/cleanable/dirt(T) + new pickedtrash(T) + if(4 to 6) + to_chat(owner, "You find blood and gibs to feed your young!") + new /obj/effect/decal/cleanable/blood/gibs(T) + new /obj/effect/decal/cleanable/blood/(T) + if(7 to 18) + to_chat(owner, "A corpse rises from the ground. Best to leave it alone.") + new /obj/effect/mob_spawn/human/corpse/assistant(T) + if(19 to 100) + to_chat(owner, "Drat. Nothing.") + new /obj/effect/decal/cleanable/dirt(T) + StartCooldown() diff --git a/code/modules/mob/living/simple_animal/hostile/space_dragon.dm b/code/modules/mob/living/simple_animal/hostile/space_dragon.dm index 5722cfda07..39e9e84ed2 100644 --- a/code/modules/mob/living/simple_animal/hostile/space_dragon.dm +++ b/code/modules/mob/living/simple_animal/hostile/space_dragon.dm @@ -109,7 +109,7 @@ continue playsound(src, 'sound/effects/splat.ogg', 50, TRUE) visible_message("[src] vomits up [consumed_mob]!") - consumed_mob.forceMove(loc) + consumed_mob.forceMove(get_turf(src)) consumed_mob.Paralyze(50) if((rifts_charged == 3 || (SSshuttle.emergency.mode == SHUTTLE_DOCKED && rifts_charged > 0)) && !objective_complete) victory() @@ -123,6 +123,7 @@ to_chat(src, "You've failed to summon the rift in a timely manner! You're being pulled back from whence you came!") destroy_rifts() playsound(src, 'sound/magic/demon_dies.ogg', 100, TRUE) + empty_contents() QDEL_NULL(src) /mob/living/simple_animal/hostile/space_dragon/AttackingTarget() @@ -351,7 +352,7 @@ */ /mob/living/simple_animal/hostile/space_dragon/proc/empty_contents() for(var/atom/movable/AM in src) - AM.forceMove(loc) + AM.forceMove(get_turf(src)) if(prob(90)) step(AM, pick(GLOB.alldirs)) @@ -529,7 +530,7 @@ /obj/structure/carp_rift name = "carp rift" desc = "A rift akin to the ones space carp use to travel long distances." - armor = list(MELEE = 0, BULLET = 0, LASER = 0, ENERGY = 100, BOMB = 50, BIO = 100, RAD = 100, FIRE = 100, ACID = 100) + armor = list("melee" = 0, "bullet" = 0, "laser" = 0, "energy" = 100, "bomb" = 50, "bio" = 100, "rad" = 100, "fire" = 100, "acid" = 100) max_integrity = 300 icon = 'icons/obj/carp_rift.dmi' icon_state = "carp_rift_carpspawn" @@ -636,7 +637,7 @@ icon_state = "carp_rift_charged" light_color = LIGHT_COLOR_YELLOW update_light() - armor = list(MELEE = 100, BULLET = 100, LASER = 100, ENERGY = 100, BOMB = 100, BIO = 100, RAD = 100, FIRE = 100, ACID = 100) + armor = list("melee" = 100, "bullet" = 100, "laser" = 100, "energy" = 100, "bomb" = 100, "bio" = 100, "rad" = 100, "fire" = 100, "acid" = 100) resistance_flags = INDESTRUCTIBLE dragon.rifts_charged += 1 if(dragon.rifts_charged != 3 && !dragon.objective_complete) diff --git a/code/modules/mob/mob.dm b/code/modules/mob/mob.dm index efb4512bca..5ba4769f99 100644 --- a/code/modules/mob/mob.dm +++ b/code/modules/mob/mob.dm @@ -238,6 +238,7 @@ if(istype(W)) if(equip_to_slot_if_possible(W, slot, FALSE, FALSE, FALSE, FALSE, TRUE)) + W.apply_outline() return TRUE if(!W) diff --git a/code/modules/movespeed/_movespeed_modifier.dm b/code/modules/movespeed/_movespeed_modifier.dm index 5c4bf2ed64..74eedc16c9 100644 --- a/code/modules/movespeed/_movespeed_modifier.dm +++ b/code/modules/movespeed/_movespeed_modifier.dm @@ -32,7 +32,7 @@ Key procs /// Unique ID. You can never have different modifications with the same ID. By default, this SHOULD NOT be set. Only set it for cases where you're dynamically making modifiers/need to have two types overwrite each other. If unset, uses path (converted to text) as ID. var/id - /// Higher ones override lower priorities. This is NOT used for ID, ID must be unique, if it isn't unique the newer one overwrites automatically if overriding. + /// Determines order. Lower priorities are applied first. var/priority = 0 var/flags = NONE @@ -66,8 +66,10 @@ Key procs if(!complex_calculation || (multiplicative_slowdown > 0)) // we aren't limiting how much things can slowdown.. yet. return existing + multiplicative_slowdown var/current_tiles = 10 / max(existing, world.tick_lag) - var/minimum_speed = 10 / min(current_tiles + max_tiles_per_second_boost, max(current_tiles, absolute_max_tiles_per_second)) - return max(minimum_speed, existing + multiplicative_slowdown) + // multiplicative_slowdown is negative due to our first check + var/max_buff_to = max(existing + multiplicative_slowdown, 10 / absolute_max_tiles_per_second, 10 / (current_tiles + max_tiles_per_second_boost)) + // never slow the user + return min(existing, max_buff_to) GLOBAL_LIST_EMPTY(movespeed_modification_cache) diff --git a/code/modules/movespeed/modifiers/reagents.dm b/code/modules/movespeed/modifiers/reagents.dm index ca0a74d749..96b7be3a69 100644 --- a/code/modules/movespeed/modifiers/reagents.dm +++ b/code/modules/movespeed/modifiers/reagents.dm @@ -7,7 +7,7 @@ /datum/movespeed_modifier/reagent/ephedrine // strong painkiller effect that caps out at slightly above runspeed multiplicative_slowdown = -1.5 - priority = -100 + priority = 500 complex_calculation = TRUE absolute_max_tiles_per_second = 7 @@ -21,14 +21,14 @@ // extremely strong painkiller effect: allows user to run at old sprint speeds but not over by cancelling out slowdowns. // however, will not make user go faster than that multiplicative_slowdown = -4 - priority = -100 + priority = 500 complex_calculation = TRUE absolute_max_tiles_per_second = 8 /datum/movespeed_modifier/reagent/methamphetamine // very strong painkiller effect that caps out at slightly above runspeed multiplicative_slowdown = -2.5 - priority = -100 + priority = 500 complex_calculation = TRUE absolute_max_tiles_per_second = 7.5 diff --git a/code/modules/movespeed/modifiers/status_effects.dm b/code/modules/movespeed/modifiers/status_effects.dm index 260ee17c21..ab1b12e5dc 100644 --- a/code/modules/movespeed/modifiers/status_effects.dm +++ b/code/modules/movespeed/modifiers/status_effects.dm @@ -19,14 +19,14 @@ /datum/movespeed_modifier/status_effect/tased multiplicative_slowdown = 1.5 - priority = 50 + priority = 1500 /datum/movespeed_modifier/status_effect/domain multiplicative_slowdown = 3 /datum/movespeed_modifier/status_effect/tased/no_combat_mode multiplicative_slowdown = 8 - priority = 100 + priority = 1500 /datum/movespeed_modifier/status_effect/electrostaff multiplicative_slowdown = 1 @@ -55,7 +55,7 @@ /datum/movespeed_modifier/status_effect/slime/light_pink // decently good painkiller + speedup effect blacklisted_movetypes = FLYING | FLOATING - priority = -150 // someday we really need to make these defines lmao + priority = 500 // someday we really need to make these defines lmao multiplicative_slowdown = -2 complex_calculation = TRUE absolute_max_tiles_per_second = 7 diff --git a/code/modules/plumbing/plumbers/autohydro.dm b/code/modules/plumbing/plumbers/autohydro.dm index 9c358d8d6e..4e1dd88406 100644 --- a/code/modules/plumbing/plumbers/autohydro.dm +++ b/code/modules/plumbing/plumbers/autohydro.dm @@ -5,12 +5,6 @@ obj_flags = CAN_BE_HIT | UNIQUE_RENAME circuit = /obj/item/circuitboard/machine/hydroponics/automagic - -/obj/machinery/hydroponics/constructable/automagic/attackby(obj/item/O, mob/user, params) - if(istype(O, /obj/item/reagent_containers)) - return FALSE //avoid fucky wuckies - ..() - /obj/machinery/hydroponics/constructable/automagic/default_unfasten_wrench(mob/user, obj/item/I, time = 20) . = ..() if(. == SUCCESSFUL_UNFASTEN) diff --git a/code/modules/power/supermatter/supermatter.dm b/code/modules/power/supermatter/supermatter.dm index b460cfea51..148535af76 100644 --- a/code/modules/power/supermatter/supermatter.dm +++ b/code/modules/power/supermatter/supermatter.dm @@ -39,7 +39,8 @@ #define DAMAGE_INCREASE_MULTIPLIER 0.25 -#define THERMAL_RELEASE_MODIFIER 5 //Higher == less heat released during reaction, not to be confused with the above values +#define THERMAL_RELEASE_MODIFIER 350 //Higher == more heat released during reaction, not to be confused with the above values +#define THERMAL_RELEASE_CAP_MODIFIER 250 //Higher == lower cap on how much heat can be released per tick--currently 1.3x old value #define PLASMA_RELEASE_MODIFIER 750 //Higher == less plasma released by reaction #define OXYGEN_RELEASE_MODIFIER 325 //Higher == less oxygen released at high temperature/power @@ -500,7 +501,8 @@ GLOBAL_DATUM(main_supermatter_engine, /obj/machinery/power/supermatter_crystal) powerloss_dynamic_scaling = clamp(powerloss_dynamic_scaling + clamp(powerloss_inhibition_gas - powerloss_dynamic_scaling, -0.02, 0.02), 0, 1) else powerloss_dynamic_scaling = clamp(powerloss_dynamic_scaling - 0.05, 0, 1) - //Ranges from 0 to 1(1-(value between 0 and 1 * ranges from 1 to 1.5(mol / 500))) + //Ranges from 0 to 1 (1-(value between 0 and 1 * ranges from 1 to 1.5(mol / 500))) + //0 means full inhibition, 1 means no inhibition //We take the mol count, and scale it to be our inhibitor powerloss_inhibitor = clamp(1-(powerloss_dynamic_scaling * clamp(combined_gas/POWERLOSS_INHIBITION_MOLE_BOOST_THRESHOLD, 1, 1.5)), 0, 1) @@ -536,15 +538,19 @@ GLOBAL_DATUM(main_supermatter_engine, /obj/machinery/power/supermatter_crystal) //Power * 0.55 * a value between 1 and 0.8 var/device_energy = power * REACTION_POWER_MODIFIER - removed.set_temperature(removed.return_temperature() + ((device_energy * dynamic_heat_modifier) / THERMAL_RELEASE_MODIFIER)) - //We don't want our output to be too hot - removed.set_temperature(max(0, min(removed.return_temperature(), 2500 * dynamic_heat_modifier))) + var/effective_temperature = min(removed.return_temperature(), 2500 * dynamic_heat_modifier) + var/max_temp_increase = effective_temperature + ((device_energy * dynamic_heat_modifier) / THERMAL_RELEASE_CAP_MODIFIER) //Calculate how much gas to release //Varies based on power and gas content removed.adjust_moles(GAS_PLASMA, max((device_energy * dynamic_heat_modifier) / PLASMA_RELEASE_MODIFIER, 0)) //Varies based on power, gas content, and heat - removed.adjust_moles(GAS_O2, max(((device_energy + removed.return_temperature() * dynamic_heat_modifier) - T0C) / OXYGEN_RELEASE_MODIFIER, 0)) + removed.adjust_moles(GAS_O2, max(((device_energy + effective_temperature * dynamic_heat_modifier) - T0C) / OXYGEN_RELEASE_MODIFIER, 0)) + + if(removed.return_temperature() < max_temp_increase) + removed.adjust_heat(device_energy * dynamic_heat_modifier * THERMAL_RELEASE_MODIFIER) + removed.set_temperature(min(removed.return_temperature(), max_temp_increase)) + if(produces_gas) env.merge(removed) diff --git a/code/modules/projectiles/guns/energy.dm b/code/modules/projectiles/guns/energy.dm index 0f5934e8fd..34e9247184 100644 --- a/code/modules/projectiles/guns/energy.dm +++ b/code/modules/projectiles/guns/energy.dm @@ -44,7 +44,7 @@ cell.use(round(cell.charge * severity/100)) chambered = null //we empty the chamber recharge_newshot() //and try to charge a new shot - update_icon() + update_appearance() /obj/item/gun/energy/get_cell() return cell @@ -61,7 +61,7 @@ recharge_newshot(TRUE) if(selfcharge) START_PROCESSING(SSobj, src) - update_icon() + update_appearance() /obj/item/gun/energy/ComponentInitialize() . = ..() @@ -74,7 +74,7 @@ /obj/item/gun/energy/handle_atom_del(atom/A) if(A == cell) cell = null - update_icon() + update_appearance() return ..() /obj/item/gun/energy/examine(mob/user) @@ -100,7 +100,7 @@ cell.give(100) if(!chambered) //if empty chamber we try to charge a new shot recharge_newshot(TRUE) - update_icon() + update_appearance() // ATTACK SELF IGNORING PARENT RETURN VALUE /obj/item/gun/energy/attack_self(mob/living/user) @@ -174,7 +174,7 @@ if(user_for_feedback) to_chat(user_for_feedback, "[src] is now set to [C.select_name || C].") post_set_firemode() - update_icon(TRUE) + update_appearance() /obj/item/gun/energy/proc/post_set_firemode(recharge_newshot = TRUE) if(recharge_newshot) diff --git a/code/modules/reagents/reagent_containers/hypospray.dm b/code/modules/reagents/reagent_containers/hypospray.dm index 143025aed1..9d2e4a8e31 100644 --- a/code/modules/reagents/reagent_containers/hypospray.dm +++ b/code/modules/reagents/reagent_containers/hypospray.dm @@ -58,6 +58,7 @@ name = "combat stimulant injector" desc = "A modified air-needle autoinjector, used by support operatives to quickly heal injuries in combat and get people back in the fight." amount_per_transfer_from_this = 10 + item_state = "combat_hypo" icon_state = "combat_hypo" volume = 100 ignore_flags = 1 // So they can heal their comrades. @@ -69,17 +70,27 @@ list_reagents = list(/datum/reagent/medicine/epinephrine = 30, /datum/reagent/medicine/omnizine = 30, /datum/reagent/medicine/leporazine = 15, /datum/reagent/medicine/atropine = 15) /obj/item/reagent_containers/hypospray/combat/nanites - desc = "A modified air-needle autoinjector for use in combat situations. Prefilled with experimental medical compounds for rapid healing." + name = "experimental combat stimulant injector" + desc = "A modified air-needle autoinjector for use in combat situations. Prefilled with experimental medical nanites and a stimulant for rapid healing and a combat boost." + item_state = "nanite_hypo" + icon_state = "nanite_hypo" volume = 100 list_reagents = list(/datum/reagent/medicine/adminordrazine/quantum_heal = 80, /datum/reagent/medicine/synaptizine = 20) -/obj/item/reagent_containers/hypospray/magillitis - name = "experimental autoinjector" - desc = "A modified air-needle autoinjector with a small single-use reservoir. It contains an experimental serum." - icon_state = "combat_hypo" - volume = 5 - reagent_flags = NONE - list_reagents = list(/datum/reagent/magillitis = 5) +/obj/item/reagent_containers/hypospray/combat/nanites/update_icon() + if(reagents.total_volume > 0) + icon_state = initial(icon_state) + else + icon_state = "[initial(icon_state)]0" + +/obj/item/reagent_containers/hypospray/combat/heresypurge + name = "holy water piercing injector" + desc = "A modified air-needle autoinjector for use in combat situations. Prefilled with 5 doses of a holy water and pacifier mixture. Not for use on your teammates." + item_state = "holy_hypo" + icon_state = "holy_hypo" + volume = 250 + list_reagents = list(/datum/reagent/water/holywater = 150, /datum/reagent/peaceborg_tire = 50, /datum/reagent/peaceborg_confuse = 50) + amount_per_transfer_from_this = 50 //MediPens @@ -136,6 +147,8 @@ /obj/item/reagent_containers/hypospray/medipen/ekit name = "emergency first-aid autoinjector" desc = "An epinephrine medipen with extra coagulant and antibiotics to help stabilize bad cuts and burns." + icon_state = "firstaid" + item_state = "firstaid" volume = 15 amount_per_transfer_from_this = 15 list_reagents = list(/datum/reagent/medicine/epinephrine = 12, /datum/reagent/medicine/coagulant = 2.5, /datum/reagent/medicine/spaceacillin = 0.5) @@ -143,15 +156,19 @@ /obj/item/reagent_containers/hypospray/medipen/blood_loss name = "hypovolemic-response autoinjector" desc = "A medipen designed to stabilize and rapidly reverse severe bloodloss." + icon_state = "hypovolemic" + item_state = "hypovolemic" volume = 15 amount_per_transfer_from_this = 15 list_reagents = list(/datum/reagent/medicine/epinephrine = 5, /datum/reagent/medicine/coagulant = 2.5, /datum/reagent/iron = 3.5, /datum/reagent/medicine/salglu_solution = 4) /obj/item/reagent_containers/hypospray/medipen/stimulants - name = "illegal stimpack medipen" - desc = "A highly illegal medipen due to its load and small injections, allow for five uses before being drained" + name = "stimpack medipen" + desc = "Contains stimulants." + icon_state = "syndipen" + item_state = "syndipen" volume = 50 - amount_per_transfer_from_this = 10 + amount_per_transfer_from_this = 50 list_reagents = list(/datum/reagent/medicine/stimulants = 50) /obj/item/reagent_containers/hypospray/medipen/stimulants/baseball @@ -166,6 +183,7 @@ name = "stimpack medipen" desc = "A rapid way to stimulate your body's adrenaline, allowing for freer movement in restrictive armor." icon_state = "stimpen" + item_state = "stimpen" volume = 20 amount_per_transfer_from_this = 20 list_reagents = list(/datum/reagent/medicine/ephedrine = 10, /datum/reagent/consumable/coffee = 10) @@ -177,20 +195,79 @@ /obj/item/reagent_containers/hypospray/medipen/morphine name = "morphine medipen" desc = "A rapid way to get you out of a tight situation and fast! You'll feel rather drowsy, though." + icon_state = "morphen" + item_state = "morphen" + volume = 10 + amount_per_transfer_from_this = 10 list_reagents = list(/datum/reagent/medicine/morphine = 10) +/obj/item/reagent_containers/hypospray/medipen/penacid + name = "pentetic acid medipen" + desc = "A autoinjector containing pentetic acid, used to reduce high levels of radiations and moderate toxins." + icon_state = "penacid" + item_state = "penacid" + volume = 10 + amount_per_transfer_from_this = 10 + list_reagents = list(/datum/reagent/medicine/pen_acid = 10) + +/obj/item/reagent_containers/hypospray/medipen/atropine + name = "atropine autoinjector" + desc = "A rapid way to save a person from a critical injury state!" + icon_state = "atropen" + item_state = "atropen" + volume = 10 + amount_per_transfer_from_this = 10 + list_reagents = list(/datum/reagent/medicine/atropine = 10) + +/obj/item/reagent_containers/hypospray/medipen/salacid + name = "salicyclic acid medipen" + desc = "A autoinjector containing salicyclic acid, used to treat severe brute damage." + icon_state = "salacid" + item_state = "salacid" + volume = 10 + amount_per_transfer_from_this = 10 + list_reagents = list(/datum/reagent/medicine/sal_acid = 10) + +/obj/item/reagent_containers/hypospray/medipen/oxandrolone + name = "oxandrolone medipen" + desc = "A autoinjector containing oxandrolone, used to treat severe burns." + icon_state = "oxapen" + item_state = "oxapen" + volume = 10 + amount_per_transfer_from_this = 10 + list_reagents = list(/datum/reagent/medicine/oxandrolone = 10) + +/obj/item/reagent_containers/hypospray/medipen/salbutamol + name = "salbutamol medipen" + desc = "A autoinjector containing salbutamol, used to heal oxygen damage quickly." + icon_state = "salpen" + item_state = "salpen" + volume = 10 + amount_per_transfer_from_this = 10 + list_reagents = list(/datum/reagent/medicine/salbutamol = 10) + /obj/item/reagent_containers/hypospray/medipen/tuberculosiscure name = "BVAK autoinjector" desc = "Bio Virus Antidote Kit autoinjector. Has a two use system for yourself, and someone else. Inject when infected." - icon_state = "stimpen" + icon_state = "tbpen" + item_state = "tbpen" volume = 60 amount_per_transfer_from_this = 30 list_reagents = list(/datum/reagent/medicine/atropine = 10, /datum/reagent/medicine/epinephrine = 10, /datum/reagent/medicine/salbutamol = 20, /datum/reagent/medicine/spaceacillin = 20) +/obj/item/reagent_containers/hypospray/medipen/tuberculosiscure/update_icon() + if(reagents.total_volume > 30) + icon_state = initial(icon_state) + else if (reagents.total_volume > 0) + icon_state = "[initial(icon_state)]1" + else + icon_state = "[initial(icon_state)]0" + /obj/item/reagent_containers/hypospray/medipen/survival name = "survival medipen" desc = "A medipen for surviving in the harshest of environments, heals and protects from environmental hazards. WARNING: Do not inject more than one pen in quick succession." - icon_state = "stimpen" + icon_state = "minepen" + item_state = "minepen" volume = 52 amount_per_transfer_from_this = 52 list_reagents = list(/datum/reagent/medicine/salbutamol = 10, /datum/reagent/medicine/leporazine = 15, /datum/reagent/medicine/neo_jelly = 15, /datum/reagent/medicine/epinephrine = 10, /datum/reagent/medicine/lavaland_extract = 2) @@ -198,16 +275,21 @@ /obj/item/reagent_containers/hypospray/medipen/firelocker name = "fire treatment medipen" desc = "A medipen that has been fulled with burn healing chemicals for personnel without advanced medical knowledge." + icon_state = "firepen" + item_state = "firepen" volume = 15 amount_per_transfer_from_this = 15 list_reagents = list(/datum/reagent/medicine/oxandrolone = 5, /datum/reagent/medicine/kelotane = 10) -/obj/item/reagent_containers/hypospray/combat/heresypurge - name = "holy water autoinjector" - desc = "A modified air-needle autoinjector for use in combat situations. Prefilled with 5 doses of a holy water mixture." - volume = 250 - list_reagents = list(/datum/reagent/water/holywater = 150, /datum/reagent/peaceborg_tire = 50, /datum/reagent/peaceborg_confuse = 50) - amount_per_transfer_from_this = 50 +/obj/item/reagent_containers/hypospray/medipen/magillitis + name = "experimental autoinjector" + desc = "A custom-frame needle injector with a small single-use reservoir, containing an experimental serum. Unlike the more common medipen frame, it cannot pierce through protective armor or hardsuits, nor can the chemical inside be extracted." + icon_state = "gorillapen" + item_state = "gorillapen" + volume = 5 + ignore_flags = 0 + reagent_flags = NONE + list_reagents = list(/datum/reagent/magillitis = 5) #define HYPO_SPRAY 0 #define HYPO_INJECT 1 diff --git a/code/modules/research/xenobiology/crossbreeding/_status_effects.dm b/code/modules/research/xenobiology/crossbreeding/_status_effects.dm index 0c34a251ae..c408ad096e 100644 --- a/code/modules/research/xenobiology/crossbreeding/_status_effects.dm +++ b/code/modules/research/xenobiology/crossbreeding/_status_effects.dm @@ -573,6 +573,10 @@ if(batteries.len) var/obj/item/stock_parts/cell/ToCharge = pick(batteries) ToCharge.charge += min(ToCharge.maxcharge - ToCharge.charge, ToCharge.maxcharge/10) //10% of the cell, or to maximum. + ToCharge.update_appearance() //make sure the cell gets their appearance updated. + var/atom/l = ToCharge.loc + if(isgun(l)) //updates the gun appearance as well if the cell is inside one. + l.update_appearance() to_chat(owner, "[linked_extract] discharges some energy into a device you have.") return ..() diff --git a/code/modules/station_goals/dna_vault.dm b/code/modules/station_goals/dna_vault.dm index b68a289e85..69f2d5454e 100644 --- a/code/modules/station_goals/dna_vault.dm +++ b/code/modules/station_goals/dna_vault.dm @@ -63,10 +63,10 @@ name = "DNA Sampler" desc = "Can be used to take chemical and genetic samples of pretty much anything." icon = 'icons/obj/syringe.dmi' - item_state = "hypo" + item_state = "sampler" lefthand_file = 'icons/mob/inhands/equipment/medical_lefthand.dmi' righthand_file = 'icons/mob/inhands/equipment/medical_righthand.dmi' - icon_state = "hypo" + icon_state = "sampler" item_flags = NOBLUDGEON var/list/animals = list() var/list/plants = list() diff --git a/code/modules/surgery/organs/lungs.dm b/code/modules/surgery/organs/lungs.dm index 93f88192e5..e10b05822b 100644 --- a/code/modules/surgery/organs/lungs.dm +++ b/code/modules/surgery/organs/lungs.dm @@ -54,7 +54,8 @@ var/SA_para_min = 1 //nitrous values var/SA_sleep_min = 5 - var/BZ_trip_balls_min = 1 //BZ gas + var/BZ_trip_balls_min = 0.1 //BZ gas + var/BZ_brain_damage_min = 1 var/gas_stimulation_min = 0.002 //Nitryl and Stimulum var/cold_message = "your face freezing and an icicle forming" @@ -269,13 +270,13 @@ // BZ var/bz_pp = PP(breath, GAS_BZ) - if(bz_pp > BZ_trip_balls_min) + if(bz_pp > BZ_brain_damage_min) H.hallucination += 10 H.reagents.add_reagent(/datum/reagent/bz_metabolites,5) if(prob(33)) H.adjustOrganLoss(ORGAN_SLOT_BRAIN, 3, 150) - else if(bz_pp > 0.01) + else if(bz_pp > BZ_trip_balls_min) H.hallucination += 5 H.reagents.add_reagent(/datum/reagent/bz_metabolites,1) @@ -476,7 +477,7 @@ ) SA_para_min = 30 SA_sleep_min = 50 - BZ_trip_balls_min = 30 + BZ_brain_damage_min = 30 emp_vulnerability = 3 cold_level_1_threshold = 200 @@ -509,8 +510,29 @@ heat_level_2_threshold = 600 // up 200 from level 1, 1000 is silly but w/e for level 3 /obj/item/organ/lungs/ashwalker/populate_gas_info() + // humans usually breathe 21 but require 16/17, so 80% - 1, which is more lenient but it's fine + #define SAFE_THRESHOLD_RATIO 0.8 + var/datum/gas_mixture/breath = SSair.planetary[LAVALAND_DEFAULT_ATMOS] // y'all know + var/pressure = breath.return_pressure() + var/total_moles = breath.total_moles() + for(var/id in breath.get_gases()) + var/this_pressure = PP(breath, id) + var/req_pressure = (this_pressure * SAFE_THRESHOLD_RATIO) - 1 + if(req_pressure > 0) + gas_min[id] = req_pressure + if(id in gas_max) + gas_max[id] += this_pressure + var/bz = breath.get_moles(GAS_BZ) + if(bz) + BZ_trip_balls_min += bz + BZ_brain_damage_min += bz + + gas_max[GAS_N2] = PP(breath, GAS_N2) + 5 + var/o2_pp = PP(breath, GAS_O2) + safe_breath_min = 0.3 * o2_pp + safe_breath_max = 1.3 * o2_pp ..() - gas_max[GAS_N2] = 28 + #undef SAFE_THRESHOLD_RATIO /obj/item/organ/lungs/slime name = "vacuole" diff --git a/code/modules/tooltip/tooltip.dm b/code/modules/tooltip/tooltip.dm index ca1b163968..65e44cfbc6 100644 --- a/code/modules/tooltip/tooltip.dm +++ b/code/modules/tooltip/tooltip.dm @@ -137,7 +137,7 @@ Notes: /atom/movable/MouseEntered(location, control, params) . = ..() if(tooltips) - if(!QDELETED(src)) + if(!QDELETED(src) && usr.client.prefs.enable_tips) var/list/tooltip_data = get_tooltip_data() if(length(tooltip_data)) var/examine_data = tooltip_data.Join(" ") diff --git a/code/modules/unit_tests/_unit_tests.dm b/code/modules/unit_tests/_unit_tests.dm index 7cc72ed1c1..706a7a3910 100644 --- a/code/modules/unit_tests/_unit_tests.dm +++ b/code/modules/unit_tests/_unit_tests.dm @@ -32,47 +32,79 @@ /// Intended to be used in the manner of `TEST_FOCUS(/datum/unit_test/math)` #define TEST_FOCUS(test_path) ##test_path { focus = TRUE; } +/// Constants indicating unit test completion status +#define UNIT_TEST_PASSED 0 +#define UNIT_TEST_FAILED 1 +#define UNIT_TEST_SKIPPED 2 + +#define TEST_DEFAULT 1 +#define TEST_DEL_WORLD INFINITY + +/// A trait source when adding traits through unit tests +#define TRAIT_SOURCE_UNIT_TESTS "unit_tests" + #include "anchored_mobs.dm" #include "bespoke_id.dm" #include "binary_insert.dm" +// #include "bloody_footprints.dm" +// #include "breath.dm" // #include "card_mismatch.dm" #include "chain_pull_through_space.dm" // #include "combat.dm" #include "component_tests.dm" +// #include "connect_loc.dm" // #include "confusion.dm" +// #include "crayons.dm" +// #include "create_and_destroy.dm" +// #include "designs.dm" +// #include "dynamic_ruleset_sanity.dm" +// #include "egg_glands.dm" // #include "emoting.dm" +// #include "food_edibility_check.dm" +// #include "greyscale_config.dm" // #include "heretic_knowledge.dm" // #include "holidays.dm" -#include "initialize_sanity.dm" +// #include "hydroponics_harvest.dm" // #include "keybinding_init.dm" #include "machine_disassembly.dm" #include "medical_wounds.dm" #include "merge_type.dm" // #include "metabolizing.dm" +// #include "ntnetwork_tests.dm" // #include "outfit_sanity.dm" // #include "pills.dm" // #include "plantgrowth_tests.dm" // #include "projectiles.dm" +// #include "rcd.dm" #include "reagent_id_typos.dm" // #include "reagent_mod_expose.dm" // #include "reagent_mod_procs.dm" #include "reagent_recipe_collisions.dm" #include "resist.dm" // #include "say.dm" +// #include "security_officer_distribution.dm" // #include "serving_tray.dm" // #include "siunit.dm" #include "spawn_humans.dm" +#include "spawn_mobs.dm" // #include "species_whitelists.dm" // #include "stomach.dm" +// #include "strippable.dm" #include "subsystem_init.dm" #include "surgeries.dm" #include "teleporters.dm" +#include "tgui_create_message.dm" #include "timer_sanity.dm" #include "unit_test.dm" +// #include "wizard.dm" /// CIT TESTS #include "character_saving.dm" +#ifdef REFERENCE_TRACKING //Don't try and parse this file if ref tracking isn't turned on. IE: don't parse ref tracking please mr linter +#include "find_reference_sanity.dm" +#endif + #undef TEST_ASSERT #undef TEST_ASSERT_EQUAL #undef TEST_ASSERT_NOTEQUAL diff --git a/code/modules/unit_tests/chain_pull_through_space.dm b/code/modules/unit_tests/chain_pull_through_space.dm index ffdd1bf7c9..10363d5aad 100644 --- a/code/modules/unit_tests/chain_pull_through_space.dm +++ b/code/modules/unit_tests/chain_pull_through_space.dm @@ -1,6 +1,6 @@ /datum/unit_test/chain_pull_through_space var/turf/open/space/space_tile - var/turf/claimed_tile + var/claimed_tile var/mob/living/carbon/human/alice var/mob/living/carbon/human/bob var/mob/living/carbon/human/charlie @@ -9,25 +9,25 @@ ..() // Create a space tile that goes to another z-level - claimed_tile = run_loc_bottom_left + claimed_tile = run_loc_floor_bottom_left.type - space_tile = new(locate(run_loc_bottom_left.x, run_loc_bottom_left.y, run_loc_bottom_left.z)) + space_tile = new(locate(run_loc_floor_bottom_left.x, run_loc_floor_bottom_left.y, run_loc_floor_bottom_left.z)) space_tile.destination_x = 100 space_tile.destination_y = 100 space_tile.destination_z = 5 // Create our list of humans, all adjacent to one another - alice = new(locate(run_loc_bottom_left.x + 2, run_loc_bottom_left.y, run_loc_bottom_left.z)) + alice = new(locate(run_loc_floor_bottom_left.x + 2, run_loc_floor_bottom_left.y, run_loc_floor_bottom_left.z)) alice.name = "Alice" - bob = new(locate(run_loc_bottom_left.x + 3, run_loc_bottom_left.y, run_loc_bottom_left.z)) + bob = new(locate(run_loc_floor_bottom_left.x + 3, run_loc_floor_bottom_left.y, run_loc_floor_bottom_left.z)) bob.name = "Bob" - charlie = new(locate(run_loc_bottom_left.x + 4, run_loc_bottom_left.y, run_loc_bottom_left.z)) + charlie = new(locate(run_loc_floor_bottom_left.x + 4, run_loc_floor_bottom_left.y, run_loc_floor_bottom_left.z)) charlie.name = "Charlie" /datum/unit_test/chain_pull_through_space/Destroy() - space_tile.copyTurf(claimed_tile) + space_tile.ChangeTurf(claimed_tile) qdel(alice) qdel(bob) qdel(charlie) @@ -40,14 +40,14 @@ bob.start_pulling(charlie) // Walk normally to the left, make sure we're still a chain - alice.Move(locate(run_loc_bottom_left.x + 1, run_loc_bottom_left.y, run_loc_bottom_left.z)) - if (bob.x != run_loc_bottom_left.x + 2) + alice.Move(locate(run_loc_floor_bottom_left.x + 1, run_loc_floor_bottom_left.y, run_loc_floor_bottom_left.z)) + if (bob.x != run_loc_floor_bottom_left.x + 2) return Fail("During normal move, Bob was not at the correct x ([bob.x])") - if (charlie.x != run_loc_bottom_left.x + 3) + if (charlie.x != run_loc_floor_bottom_left.x + 3) return Fail("During normal move, Charlie was not at the correct x ([charlie.x])") // We're going through the space turf now that should teleport us - alice.Move(run_loc_bottom_left) + alice.Move(run_loc_floor_bottom_left) if (alice.z != space_tile.destination_z) return Fail("Alice did not teleport to the destination z-level. Current location: ([alice.x], [alice.y], [alice.z])") diff --git a/code/modules/unit_tests/find_reference_sanity.dm b/code/modules/unit_tests/find_reference_sanity.dm new file mode 100644 index 0000000000..f41714f065 --- /dev/null +++ b/code/modules/unit_tests/find_reference_sanity.dm @@ -0,0 +1,111 @@ +///Used to test the completeness of the reference finder proc. +/datum/unit_test/find_reference_sanity + +/atom/movable/ref_holder + var/atom/movable/ref_test/test + var/list/test_list = list() + var/list/test_assoc_list = list() + +/atom/movable/ref_holder/Destroy() + test = null + test_list.Cut() + test_assoc_list.Cut() + return ..() + +/atom/movable/ref_test + var/atom/movable/ref_test/self_ref + +/atom/movable/ref_test/Destroy(force) + self_ref = null + return ..() + +/datum/unit_test/find_reference_sanity/Run() + var/atom/movable/ref_test/victim = allocate(/atom/movable/ref_test) + var/atom/movable/ref_holder/testbed = allocate(/atom/movable/ref_holder) + SSgarbage.should_save_refs = TRUE + + //Sanity check + victim.DoSearchVar(testbed, "Sanity Check", search_time = 1) //We increment search time to get around an optimization + TEST_ASSERT(!victim.found_refs.len, "The ref-tracking tool found a ref where none existed") + SSgarbage.should_save_refs = FALSE + +/datum/unit_test/find_reference_baseline/Run() + var/atom/movable/ref_test/victim = allocate(/atom/movable/ref_test) + var/atom/movable/ref_holder/testbed = allocate(/atom/movable/ref_holder) + SSgarbage.should_save_refs = TRUE + + //Set up for the first round of tests + testbed.test = victim + testbed.test_list += victim + testbed.test_assoc_list["baseline"] = victim + + victim.DoSearchVar(testbed, "First Run", search_time = 2) + + TEST_ASSERT(victim.found_refs["test"], "The ref-tracking tool failed to find a regular value") + TEST_ASSERT(victim.found_refs[testbed.test_list], "The ref-tracking tool failed to find a list entry") + TEST_ASSERT(victim.found_refs[testbed.test_assoc_list], "The ref-tracking tool failed to find an assoc list value") + SSgarbage.should_save_refs = FALSE + +/datum/unit_test/find_reference_exotic/Run() + var/atom/movable/ref_test/victim = allocate(/atom/movable/ref_test) + var/atom/movable/ref_holder/testbed = allocate(/atom/movable/ref_holder) + SSgarbage.should_save_refs = TRUE + + //Second round, bit harder this time + testbed.overlays += victim + testbed.vis_contents += victim + testbed.test_assoc_list[victim] = TRUE + + victim.DoSearchVar(testbed, "Second Run", search_time = 3) + + //This is another sanity check + TEST_ASSERT(!victim.found_refs[testbed.overlays], "The ref-tracking tool found an overlays entry? That shouldn't be possible") + TEST_ASSERT(victim.found_refs[testbed.vis_contents], "The ref-tracking tool failed to find a vis_contents entry") + TEST_ASSERT(victim.found_refs[testbed.test_assoc_list], "The ref-tracking tool failed to find an assoc list key") + SSgarbage.should_save_refs = FALSE + +/datum/unit_test/find_reference_esoteric/Run() + var/atom/movable/ref_test/victim = allocate(/atom/movable/ref_test) + var/atom/movable/ref_holder/testbed = allocate(/atom/movable/ref_holder) + SSgarbage.should_save_refs = TRUE + + //Let's get a bit esoteric + victim.self_ref = victim + var/list/to_find = list(victim) + testbed.test_list += list(to_find) + var/list/to_find_assoc = list(victim) + testbed.test_assoc_list["Nesting"] = to_find_assoc + + victim.DoSearchVar(victim, "Third Run Self", search_time = 4) + victim.DoSearchVar(testbed, "Third Run Testbed", search_time = 4) + TEST_ASSERT(victim.found_refs["self_ref"], "The ref-tracking tool failed to find a self reference") + TEST_ASSERT(victim.found_refs[to_find], "The ref-tracking tool failed to find a nested list entry") + TEST_ASSERT(victim.found_refs[to_find_assoc], "The ref-tracking tool failed to find a nested assoc list entry") + SSgarbage.should_save_refs = FALSE + +/datum/unit_test/find_reference_null_key_entry/Run() + var/atom/movable/ref_test/victim = allocate(/atom/movable/ref_test) + var/atom/movable/ref_holder/testbed = allocate(/atom/movable/ref_holder) + SSgarbage.should_save_refs = TRUE + + //Calm before the storm + testbed.test_assoc_list = list(null = victim) + + victim.DoSearchVar(testbed, "Fourth Run", search_time = 5) + TEST_ASSERT(testbed.test_assoc_list, "The ref-tracking tool failed to find a null key'd assoc list entry") + +/datum/unit_test/find_reference_assoc_investigation/Run() + var/atom/movable/ref_test/victim = allocate(/atom/movable/ref_test) + var/atom/movable/ref_holder/testbed = allocate(/atom/movable/ref_holder) + SSgarbage.should_save_refs = TRUE + + //Let's do some more complex assoc list investigation + var/list/to_find_in_key = list(victim) + testbed.test_assoc_list[to_find_in_key] = list("memes") + var/list/to_find_null_assoc_nested = list(victim) + testbed.test_assoc_list[null] = to_find_null_assoc_nested + + victim.DoSearchVar(testbed, "Fifth Run", search_time = 6) + TEST_ASSERT(victim.found_refs[to_find_in_key], "The ref-tracking tool failed to find a nested assoc list key") + TEST_ASSERT(victim.found_refs[to_find_null_assoc_nested], "The ref-tracking tool failed to find a null key'd nested assoc list entry") + SSgarbage.should_save_refs = FALSE diff --git a/code/modules/unit_tests/initialize_sanity.dm b/code/modules/unit_tests/initialize_sanity.dm deleted file mode 100644 index d183f530c8..0000000000 --- a/code/modules/unit_tests/initialize_sanity.dm +++ /dev/null @@ -1,11 +0,0 @@ -/datum/unit_test/initialize_sanity/Run() - if(length(SSatoms.BadInitializeCalls)) - Fail("Bad Initialize() calls detected. Please read logs.") - var/list/init_failures_to_text = list( - "[BAD_INIT_QDEL_BEFORE]" = "Qdeleted Before Initialized", - "[BAD_INIT_DIDNT_INIT]" = "Did Not Initialize", - "[BAD_INIT_SLEPT]" = "Initialize() Slept", - "[BAD_INIT_NO_HINT]" = "No Initialize() Hint Returned", - ) - for(var/failure in SSatoms.BadInitializeCalls) - log_world("[failure]: [init_failures_to_text["[SSatoms.BadInitializeCalls[failure]]"]]") // You like stacked brackets? diff --git a/code/modules/unit_tests/say.dm b/code/modules/unit_tests/say.dm deleted file mode 100644 index a7df5ad624..0000000000 --- a/code/modules/unit_tests/say.dm +++ /dev/null @@ -1,23 +0,0 @@ -/// Test to verify message mods are parsed correctly -/datum/unit_test/get_message_mods - var/mob/host_mob - -/datum/unit_test/get_message_mods/Run() - host_mob = allocate(/mob/living/carbon/human) - - test("Hello", "Hello", list()) - test(";HELP", "HELP", list(MODE_HEADSET = TRUE)) - test(";%Never gonna give you up", "Never gonna give you up", list(MODE_HEADSET = TRUE, MODE_SING = TRUE)) - test(".s Gun plz", "Gun plz", list(RADIO_KEY = RADIO_KEY_SECURITY, RADIO_EXTENSION = RADIO_CHANNEL_SECURITY)) - test("...What", "...What", list()) - -/datum/unit_test/get_message_mods/proc/test(message, expected_message, list/expected_mods) - var/list/mods = list() - TEST_ASSERT_EQUAL(host_mob.get_message_mods(message, mods), expected_message, "Chopped message was not what we expected. Message: [message]") - - for (var/mod_key in mods) - TEST_ASSERT_EQUAL(mods[mod_key], expected_mods[mod_key], "The value for [mod_key] was not what we expected. Message: [message]") - expected_mods -= mod_key - - if (expected_mods.len) - Fail("Some message mods were expected, but were not returned by get_message_mods: [json_encode(expected_mods)]. Message: [message]") diff --git a/code/modules/unit_tests/spawn_humans.dm b/code/modules/unit_tests/spawn_humans.dm index 0500deae0a..1bc7ca3d8a 100644 --- a/code/modules/unit_tests/spawn_humans.dm +++ b/code/modules/unit_tests/spawn_humans.dm @@ -1,5 +1,5 @@ /datum/unit_test/spawn_humans/Run() - var/locs = block(run_loc_bottom_left, run_loc_top_right) + var/locs = block(run_loc_floor_bottom_left, run_loc_floor_top_right) for(var/I in 1 to 5) new /mob/living/carbon/human(pick(locs)) diff --git a/code/modules/unit_tests/spawn_mobs.dm b/code/modules/unit_tests/spawn_mobs.dm new file mode 100644 index 0000000000..f14d14eb43 --- /dev/null +++ b/code/modules/unit_tests/spawn_mobs.dm @@ -0,0 +1,8 @@ +///Unit test that spawns all mobs that can be spawned by golden slimes +/datum/unit_test/spawn_mobs + +/datum/unit_test/spawn_mobs/Run() + for(var/_animal in typesof(/mob/living/simple_animal)) + var/mob/living/simple_animal/animal = _animal + if (initial(animal.gold_core_spawnable) == HOSTILE_SPAWN || initial(animal.gold_core_spawnable) == FRIENDLY_SPAWN) + allocate(_animal) diff --git a/code/modules/unit_tests/teleporters.dm b/code/modules/unit_tests/teleporters.dm index 0fc9bdb082..e1b4b71e9e 100644 --- a/code/modules/unit_tests/teleporters.dm +++ b/code/modules/unit_tests/teleporters.dm @@ -1,8 +1,8 @@ /datum/unit_test/auto_teleporter_linking/Run() // Put down the teleporter machinery var/obj/machinery/teleport/hub/hub = allocate(/obj/machinery/teleport/hub) - var/obj/machinery/computer/teleporter/computer = allocate(/obj/machinery/computer/teleporter, locate(run_loc_bottom_left.x + 2, run_loc_bottom_left.y, run_loc_bottom_left.z)) - var/obj/machinery/teleport/station/station = allocate(/obj/machinery/teleport/station, locate(run_loc_bottom_left.x + 1, run_loc_bottom_left.y, run_loc_bottom_left.z)) + var/obj/machinery/computer/teleporter/computer = allocate(/obj/machinery/computer/teleporter, locate(run_loc_floor_bottom_left.x + 2, run_loc_floor_bottom_left.y, run_loc_floor_bottom_left.z)) + var/obj/machinery/teleport/station/station = allocate(/obj/machinery/teleport/station, locate(run_loc_floor_bottom_left.x + 1, run_loc_floor_bottom_left.y, run_loc_floor_bottom_left.z)) TEST_ASSERT_EQUAL(hub.power_station, station, "Hub didn't link to the station") TEST_ASSERT_EQUAL(station.teleporter_console, computer, "Station didn't link to the teleporter console") diff --git a/code/modules/unit_tests/tgui_create_message.dm b/code/modules/unit_tests/tgui_create_message.dm new file mode 100644 index 0000000000..4d5a4bc0a0 --- /dev/null +++ b/code/modules/unit_tests/tgui_create_message.dm @@ -0,0 +1,28 @@ +/// Test that `TGUI_CREATE_MESSAGE` is correctly implemented +/datum/unit_test/tgui_create_message + +/datum/unit_test/tgui_create_message/Run() + var/type = "something/here" + var/list/payload = list( + "name" = "Terry McTider", + "heads_caved" = 100, + "accomplishments" = list( + "nothing", + "literally nothing", + list( + "something" = "just kidding", + ), + ), + ) + + var/message = TGUI_CREATE_MESSAGE(type, payload) + + // Ensure consistent output to compare by performing a round-trip. + var/output = json_encode(json_decode(url_decode(message))) + + var/expected = json_encode(list( + "type" = type, + "payload" = payload, + )) + + TEST_ASSERT_EQUAL(expected, output, "TGUI_CREATE_MESSAGE didn't round trip properly") diff --git a/code/modules/unit_tests/unit_test.dm b/code/modules/unit_tests/unit_test.dm index 15fe6b466c..aee62b7a52 100644 --- a/code/modules/unit_tests/unit_test.dm +++ b/code/modules/unit_tests/unit_test.dm @@ -7,7 +7,7 @@ Call Fail() to fail the test (You should specify a reason) You may use /New() and /Destroy() for setup/teardown respectively -You can use the run_loc_bottom_left and run_loc_top_right to get turfs for testing +You can use the run_loc_floor_bottom_left and run_loc_floor_top_right to get turfs for testing */ @@ -19,39 +19,46 @@ GLOBAL_VAR(test_log) //Bit of metadata for the future maybe var/list/procs_tested - /// The bottom left turf of the testing zone - var/turf/run_loc_bottom_left - - /// The top right turf of the testing zone - var/turf/run_loc_top_right - - /// The type of turf to allocate for the testing zone - var/test_turf_type = /turf/open/floor/plasteel + /// The bottom left floor turf of the testing zone + var/turf/run_loc_floor_bottom_left + /// The top right floor turf of the testing zone + var/turf/run_loc_floor_top_right + ///The priority of the test, the larger it is the later it fires + var/priority = TEST_DEFAULT //internal shit var/focus = FALSE var/succeeded = TRUE var/list/allocated var/list/fail_reasons - var/static/datum/turf_reservation/turf_reservation + var/static/datum/turf_reservation/reservation + +/proc/cmp_unit_test_priority(datum/unit_test/a, datum/unit_test/b) + return initial(a.priority) - initial(b.priority) /datum/unit_test/New() - if (isnull(turf_reservation)) - turf_reservation = SSmapping.RequestBlockReservation(5, 5) + if (isnull(reservation)) + reservation = SSmapping.RequestBlockReservation(5, 5) - for (var/turf/reserved_turf in turf_reservation.reserved_turfs) - reserved_turf.ChangeTurf(test_turf_type) + for (var/turf/reserved_turf in reservation.reserved_turfs) + reserved_turf.ChangeTurf(/turf/open/floor/plasteel) allocated = new - run_loc_bottom_left = locate(turf_reservation.bottom_left_coords[1], turf_reservation.bottom_left_coords[2], turf_reservation.bottom_left_coords[3]) - run_loc_top_right = locate(turf_reservation.top_right_coords[1], turf_reservation.top_right_coords[2], turf_reservation.top_right_coords[3]) + run_loc_floor_bottom_left = locate(reservation.bottom_left_coords[1], reservation.bottom_left_coords[2], reservation.bottom_left_coords[3]) + run_loc_floor_top_right = locate(reservation.top_right_coords[1], reservation.top_right_coords[2], reservation.top_right_coords[3]) + + TEST_ASSERT(isfloorturf(run_loc_floor_bottom_left), "run_loc_floor_bottom_left was not a floor ([run_loc_floor_bottom_left])") + TEST_ASSERT(isfloorturf(run_loc_floor_top_right), "run_loc_floor_top_right was not a floor ([run_loc_floor_top_right])") /datum/unit_test/Destroy() - //clear the test area - for(var/atom/movable/AM in block(run_loc_bottom_left, run_loc_top_right)) - qdel(AM) QDEL_LIST(allocated) + // clear the test area + for (var/turf/turf in block(locate(1, 1, run_loc_floor_bottom_left.z), locate(world.maxx, world.maxy, run_loc_floor_bottom_left.z))) + for (var/content in turf.contents) + if (istype(content, /obj/effect/landmark)) + continue + qdel(content) return ..() /datum/unit_test/proc/Run() @@ -70,44 +77,64 @@ GLOBAL_VAR(test_log) /datum/unit_test/proc/allocate(type, ...) var/list/arguments = args.Copy(2) if (!arguments.len) - arguments = list(run_loc_bottom_left) + arguments = list(run_loc_floor_bottom_left) else if (arguments[1] == null) - arguments[1] = run_loc_bottom_left + arguments[1] = run_loc_floor_bottom_left var/instance = new type(arglist(arguments)) allocated += instance return instance +/proc/RunUnitTest(test_path, list/test_results) + var/datum/unit_test/test = new test_path + + GLOB.current_test = test + var/duration = REALTIMEOFDAY + + test.Run() + + duration = REALTIMEOFDAY - duration + GLOB.current_test = null + GLOB.failed_any_test |= !test.succeeded + + var/list/log_entry = list("[test.succeeded ? "PASS" : "FAIL"]: [test_path] [duration / 10]s") + var/list/fail_reasons = test.fail_reasons + + for(var/J in 1 to LAZYLEN(fail_reasons)) + log_entry += "\tREASON #[J]: [fail_reasons[J]]" + var/message = log_entry.Join("\n") + log_test(message) + + test_results[test_path] = list("status" = test.succeeded ? UNIT_TEST_PASSED : UNIT_TEST_FAILED, "message" = message, "name" = test_path) + + qdel(test) + /proc/RunUnitTests() CHECK_TICK - var/tests_to_run = subtypesof(/datum/unit_test) + var/list/tests_to_run = subtypesof(/datum/unit_test) for (var/_test_to_run in tests_to_run) var/datum/unit_test/test_to_run = _test_to_run if (initial(test_to_run.focus)) tests_to_run = list(test_to_run) break - for(var/I in tests_to_run) - var/datum/unit_test/test = new I + tests_to_run = sortTim(tests_to_run, /proc/cmp_unit_test_priority) - GLOB.current_test = test - var/duration = REALTIMEOFDAY + var/list/test_results = list() - test.Run() + for(var/unit_path in tests_to_run) + CHECK_TICK //We check tick first because the unit test we run last may be so expensive that checking tick will lock up this loop forever + RunUnitTest(unit_path, test_results) - duration = REALTIMEOFDAY - duration - GLOB.current_test = null - GLOB.failed_any_test |= !test.succeeded - - var/list/log_entry = list("[test.succeeded ? "PASS" : "FAIL"]: [I] [duration / 10]s") - var/list/fail_reasons = test.fail_reasons - - qdel(test) - - for(var/J in 1 to LAZYLEN(fail_reasons)) - log_entry += "\tREASON #[J]: [fail_reasons[J]]" - log_test(log_entry.Join("\n")) - - CHECK_TICK + var/file_name = "data/unit_tests.json" + fdel(file_name) + file(file_name) << json_encode(test_results) SSticker.force_ending = TRUE + //We have to call this manually because del_text can preceed us, and SSticker doesn't fire in the post game + SSticker.ready_for_reboot = TRUE + SSticker.standard_reboot() + +// /datum/map_template/unit_tests +// name = "Unit Tests Zone" +// mappath = "_maps/templates/unit_tests.dmm" diff --git a/code/modules/uplink/uplink_items/uplink_devices.dm b/code/modules/uplink/uplink_items/uplink_devices.dm index ad1cc31ba7..21889219cf 100644 --- a/code/modules/uplink/uplink_items/uplink_devices.dm +++ b/code/modules/uplink/uplink_items/uplink_devices.dm @@ -213,7 +213,7 @@ name = "Stimpack" desc = "Stimpacks, the tool of many great heroes. Makes you nearly immune to non-lethal weaponry for about \ 5 minutes after injection." - item = /obj/item/reagent_containers/syringe/stimulants + item = /obj/item/reagent_containers/hypospray/medipen/stimulants cost = 5 surplus = 90 diff --git a/code/modules/uplink/uplink_items/uplink_roles.dm b/code/modules/uplink/uplink_items/uplink_roles.dm index 774c2d9794..72e0111c41 100644 --- a/code/modules/uplink/uplink_items/uplink_roles.dm +++ b/code/modules/uplink/uplink_items/uplink_roles.dm @@ -195,7 +195,7 @@ name = "Magillitis Serum Autoinjector" desc = "A single-use autoinjector which contains an experimental serum that causes rapid muscular growth in Hominidae. \ Side-affects may include hypertrichosis, violent outbursts, and an unending affinity for bananas." - item = /obj/item/reagent_containers/hypospray/magillitis + item = /obj/item/reagent_containers/hypospray/medipen/magillitis cost = 8 restricted_roles = list("Geneticist", "Chief Medical Officer") diff --git a/code/modules/vending/games.dm b/code/modules/vending/games.dm index cea9c5ae70..a1d9bc1691 100644 --- a/code/modules/vending/games.dm +++ b/code/modules/vending/games.dm @@ -9,6 +9,7 @@ /obj/item/toy/cards/deck/cas/black = 3, /obj/item/toy/cards/deck/unum = 3, /obj/item/cardpack/series_one = 10, + /obj/item/dyespray=3, /obj/item/tcgcard_binder = 5) contraband = list(/obj/item/dice/fudge = 9) premium = list(/obj/item/melee/skateboard/pro = 3, diff --git a/config/entries/admin.txt b/config/entries/admin.txt index 883bda9422..e583790b82 100644 --- a/config/entries/admin.txt +++ b/config/entries/admin.txt @@ -52,8 +52,12 @@ ANNOUNCE_ADMIN_LOGOUT ## Uncomment to have an admin message sent anytime an admin connects to a round in play, you can edit the messages in admin.dm #ANNOUNCE_ADMIN_LOGIN +## Uncomment to enable global ban DB using the provided URL. The API should expect to receive a ckey at the end of the URL. ## More API details can be found here: https://centcom.melonmesa.com -CENTCOM_BAN_DB https://centcom.melonmesa.com/ban/search +#CENTCOM_BAN_DB https://centcom.melonmesa.com/ban/search +## Uncomment to enable source whitelisting, a comma-separated list (no spaces) of CentCom sources (sourceName). +## If enabled, only bans from these servers will be shown to admins using CentCom. The default sources list is an example. +#CENTCOM_SOURCE_WHITELIST Beestation MRP,TGMC,FTL13 ## AUTOADMIN ## The default admin rank diff --git a/config/entries/general.txt b/config/entries/general.txt index 3584af63c7..b3130565e4 100644 --- a/config/entries/general.txt +++ b/config/entries/general.txt @@ -491,3 +491,9 @@ ALLOW_CUSTOM_SKINTONES ## Allows pAI custom holoforms PAI_CUSTOM_HOLOFORMS + +## How long in seconds after which a hard delete is treated as causing lag. This can be a float and supports a precision as low as nanoseconds. +#HARD_DELETES_OVERRUN_THRESHOLD 0.5 + +## Once a typepath causes overrun from hard deletes this many times, stop hard deleting it on garbage collection failures. (set to 0 to disable) +#HARD_DELETES_OVERRUN_LIMIT 0 diff --git a/dependencies.sh b/dependencies.sh index cdbdcd98df..aca82a3a05 100644 --- a/dependencies.sh +++ b/dependencies.sh @@ -8,20 +8,20 @@ export BYOND_MAJOR=514 export BYOND_MINOR=1556 #rust_g git tag -export RUST_G_VERSION=0.4.8 - -#auxmos git tag -export AUXMOS_VERSION=v0.2.3 +export RUST_G_VERSION=0.4.10 #node version export NODE_VERSION=12 -export NODE_VERSION_PRECISE=12.20.0 +export NODE_VERSION_PRECISE=12.22.4 # SpacemanDMM git tag -export SPACEMAN_DMM_VERSION=suite-1.6 - -# Extools git tag -export EXTOOLS_VERSION=v0.0.7 +export SPACEMAN_DMM_VERSION=suite-1.7 # Python version for mapmerge and other tools export PYTHON_VERSION=3.6.8 + +# Auxmos git tag +export AUXMOS_VERSION=v0.2.3 + +# Extools git tag +export EXTOOLS_VERSION=v0.0.7 diff --git a/html/changelog.html b/html/changelog.html index 00188ead51..71799f0524 100644 --- a/html/changelog.html +++ b/html/changelog.html @@ -50,6 +50,142 @@ -->
+
GoonStation 13 Development Team
diff --git a/html/changelogs/.all_changelog.yml b/html/changelogs/.all_changelog.yml
index 9790591c1c..5dfa933371 100644
--- a/html/changelogs/.all_changelog.yml
+++ b/html/changelogs/.all_changelog.yml
@@ -29848,3 +29848,102 @@ DO NOT EDIT THIS FILE BY HAND! AUTOMATICALLY GENERATED BY ss13_genchangelog.py.
BlueWildrose:
- balance: MK ultra explosions (failures at making MKultra) are gone, and replaced
with a gas that just causes a bunch of status effects to you.
+2021-08-26:
+ keronshb:
+ - rscadd: Adds catwalk floors
+2021-08-28:
+ DeltaFire15:
+ - bugfix: 'Demons now drop bodies on their own tile instead of scattering them across
+ the station. tweak: Space dragon content ejection is now slightly safer.'
+ - bugfix: Space dragons no longer delete their contents if they die due to timeout,
+ ejecting them instead.
+ - bugfix: Carp rifts created by space dragons now have their armor work correctly.
+ Putnam3145:
+ - config: Planetary monstermos can now be disabled with varedit
+ - rscadd: Lavaland/ice planet atmos is no longer a preset gas mixture and varies
+ per round
+ keronshb:
+ - rscadd: Ports Inventory Outlines
+ - imageadd: Re-adds the old glue sprite
+ - rscadd: Adds Plague Rats
+ - rscadd: Gives Plague Rat spawn conditions for regular mice
+ - imageadd: Plague Rat sprite
+ - rscadd: Gremlin
+ - imageadd: Gremlin sprites
+ zeroisthebiggay:
+ - rscdel: grilles as maintenance loot
+ - rscadd: sevensune tail from hyperstation
+2021-09-01:
+ BlueWildrose:
+ - bugfix: The waddle component now takes size into account when running rotating
+ animations, thus not reverting character sizes to default size.
+ ma44:
+ - bugfix: Weapon rechargers now have their recharger indicators again.
+ - bugfix: Energy guns now update when switching modes again.
+ - bugfix: Stabilized yellow slime extracts will now update cells and guns it recharges.
+ - rscadd: Weapon rechargers will now be more noticeable when it has finished recharging
+ something.
+ zeroisthebiggay:
+ - bugfix: the fucking chainsaw sprite
+2021-09-03:
+ timothyteakettle:
+ - bugfix: fixes losing your additional language upon changing species
+2021-09-04:
+ Putnam3145:
+ - bugfix: Might've fixed some ghost sprite oddities nobody even knew about
+ WanderingFox95:
+ - bugfix: Lavaland architects don't screw up so badly anymore and do in fact not
+ somehow leave holes through the planet surface all the way into space under
+ their bookshelves.
+ - bugfix: Snow was removed from Lavaland Ruins.
+ keronshb:
+ - bugfix: Fixes entering an occupied VR sleeper bug
+ timothyteakettle:
+ - bugfix: makes the arm/leg markings for synthetic lizards appear as an option again
+2021-09-05:
+ DeltaFire15:
+ - bugfix: Unreadied player gamemode votes now actually get ignored (if the config
+ for this is enabled).
+2021-09-07:
+ bunny232:
+ - bugfix: fixed some jank in pubby's xenobiological secure pen
+ keronshb:
+ - bugfix: Gremlins no longer have AA when dead
+ zeroisthebiggay:
+ - spellcheck: you can just about
+2021-09-08:
+ keronshb:
+ - imageadd: Adds the parade outfit for the HoS and Centcomm
+ - imageadd: Recolors the parade outfit for the Captain
+ - imageadd: Adds a toggle option for the parade outfits
+ - bugfix: Observers can no longer highlight your items
+2021-09-10:
+ BlueWildrose:
+ - rscadd: CTRL + (combat mode) Right Click - positional dropping and item rotation.
+ keronshb:
+ - rscadd: Readds Reebe
+ - rscadd: Added the ability to dye your hair with gradients by using a hair dye
+ spray.
+ - rscadd: The new Colorist quirk, allowing you to spawn with a hair dye spray.
+ - rscadd: Adds Hair gradients to preferences
+ - imageadd: Three new hair gradients, a pair of shorter fades and a spiky wave.
+ - bugfix: Adds viewers for mask of madness so it doesn't wallhack
+ zeroisthebiggay:
+ - bugfix: Replaced the DNA probe's old sprite (Hypospray) with a unique sprite
+ - imageadd: added some icons and images for hyposprays and medipens so they stand
+ out
+ - imageadd: added inhands for the cautery, retractor, drapes and hemostat.
+ - imageadd: New icon and sprites for the DNA probe
+ - imageadd: Emergency survival boxes now have an unique blue sprite and description
+ to tell them apart from regular boxes.
+ - imageadd: Added craftable normal/extended emergency oxygen tank boxes to put your
+ emergency oxygen tank collection inside.
+ - imageadd: Emergency first aid kits now look visually consistent with full first
+ aid kits.
+ - imageadd: Ports new Hypospray, Combat Autoinjector, Pestle, Mortar and Dropper
+ sprites from Shiptest!
+ - imageadd: Adds a new sprite for pill bottles!
+ - imageadd: new surgical tool sprites
+ - imageadd: The cyborg toolset is now all new and improved, with a new coat of paint!
+ - imageadd: Updates pride hammer sprites!
+ - imageadd: Replaced old Mjolnir sprites with new Mjolnir sprites.
diff --git a/html/changelogs/AutoChangeLog-pr-15063.yml b/html/changelogs/AutoChangeLog-pr-15063.yml
new file mode 100644
index 0000000000..3f4a8e41f7
--- /dev/null
+++ b/html/changelogs/AutoChangeLog-pr-15063.yml
@@ -0,0 +1,6 @@
+author: "zeroisthebiggay"
+delete-after: True
+changes:
+ - imageadd: "reinforcing the mining hardsuit with goliath hide now makes the sprite cooler"
+ - imageadd: "The SWAT helmet is now consistent between its front, side and back sprites for coloration."
+ - imageadd: "new riot armor sprites"
diff --git a/html/changelogs/AutoChangeLog-pr-15097.yml b/html/changelogs/AutoChangeLog-pr-15097.yml
new file mode 100644
index 0000000000..3bef77537a
--- /dev/null
+++ b/html/changelogs/AutoChangeLog-pr-15097.yml
@@ -0,0 +1,7 @@
+author: "LetterN"
+delete-after: True
+changes:
+ - code_imp: "Tickers, GC, MC, FS updates"
+ - code_imp: "rust_g update. It is default that we use their urlencode/unencode now."
+ - code_imp: "updates CBT to juke"
+ - bugfix: "CI Cache works properly now"
diff --git a/html/changelogs/AutoChangeLog-pr-15103.yml b/html/changelogs/AutoChangeLog-pr-15103.yml
new file mode 100644
index 0000000000..b187336c91
--- /dev/null
+++ b/html/changelogs/AutoChangeLog-pr-15103.yml
@@ -0,0 +1,8 @@
+author: "SandPoot"
+delete-after: True
+changes:
+ - rscadd: "Cyborg grippers now have a preview of the item you are holding.
+tweak: Cyborg grippers no longer drop using alt-click, instead, you try to drop the gripper to drop the item, and then you can drop the gripper.
+tweak: You can now use the \"Pick up\" verb on the right click menu to take items with a cyborg gripper."
+ - bugfix: "You should be able to access the interface of airlock electronics once again as a borg."
+ - refactor: "Reworks a lot of stuff that was being used on the grippers."
diff --git a/html/changelogs/AutoChangeLog-pr-15110.yml b/html/changelogs/AutoChangeLog-pr-15110.yml
new file mode 100644
index 0000000000..c519dc4248
--- /dev/null
+++ b/html/changelogs/AutoChangeLog-pr-15110.yml
@@ -0,0 +1,4 @@
+author: "timothyteakettle"
+delete-after: True
+changes:
+ - bugfix: "arachnid legs now show up properly"
diff --git a/html/changelogs/AutoChangeLog-pr-15111.yml b/html/changelogs/AutoChangeLog-pr-15111.yml
new file mode 100644
index 0000000000..117e152e5c
--- /dev/null
+++ b/html/changelogs/AutoChangeLog-pr-15111.yml
@@ -0,0 +1,4 @@
+author: "Putnam3145"
+delete-after: True
+changes:
+ - bugfix: "Removed some crashes"
diff --git a/icons/mob/animal.dmi b/icons/mob/animal.dmi
index 68e6170969..34bd587146 100644
Binary files a/icons/mob/animal.dmi and b/icons/mob/animal.dmi differ
diff --git a/icons/mob/arachnid_parts.dmi b/icons/mob/arachnid_parts.dmi
index 1b70935450..196e2037b5 100644
Binary files a/icons/mob/arachnid_parts.dmi and b/icons/mob/arachnid_parts.dmi differ
diff --git a/icons/mob/clothing/head.dmi b/icons/mob/clothing/head.dmi
index a688f3d9dd..1596672ac3 100644
Binary files a/icons/mob/clothing/head.dmi and b/icons/mob/clothing/head.dmi differ
diff --git a/icons/mob/clothing/head_muzzled.dmi b/icons/mob/clothing/head_muzzled.dmi
index e99f1ff6d4..2fce92ee81 100644
Binary files a/icons/mob/clothing/head_muzzled.dmi and b/icons/mob/clothing/head_muzzled.dmi differ
diff --git a/icons/mob/clothing/suit.dmi b/icons/mob/clothing/suit.dmi
index 39ad5337a7..6d7637f030 100644
Binary files a/icons/mob/clothing/suit.dmi and b/icons/mob/clothing/suit.dmi differ
diff --git a/icons/mob/clothing/suit_digi.dmi b/icons/mob/clothing/suit_digi.dmi
index f80cb4a426..80259e2832 100644
Binary files a/icons/mob/clothing/suit_digi.dmi and b/icons/mob/clothing/suit_digi.dmi differ
diff --git a/icons/mob/clothing/taur_canine.dmi b/icons/mob/clothing/taur_canine.dmi
index 6155a274f2..db88043fb2 100644
Binary files a/icons/mob/clothing/taur_canine.dmi and b/icons/mob/clothing/taur_canine.dmi differ
diff --git a/icons/mob/clothing/taur_hooved.dmi b/icons/mob/clothing/taur_hooved.dmi
index 03fd8c8a30..a0af305d4c 100644
Binary files a/icons/mob/clothing/taur_hooved.dmi and b/icons/mob/clothing/taur_hooved.dmi differ
diff --git a/icons/mob/clothing/taur_naga.dmi b/icons/mob/clothing/taur_naga.dmi
index 3525333fb3..3df8625bec 100644
Binary files a/icons/mob/clothing/taur_naga.dmi and b/icons/mob/clothing/taur_naga.dmi differ
diff --git a/icons/mob/hair_gradients.dmi b/icons/mob/hair_gradients.dmi
new file mode 100644
index 0000000000..ceb3b52eab
Binary files /dev/null and b/icons/mob/hair_gradients.dmi differ
diff --git a/icons/mob/inhands/equipment/medical_lefthand.dmi b/icons/mob/inhands/equipment/medical_lefthand.dmi
index 232f3f9e65..7cbb240b93 100644
Binary files a/icons/mob/inhands/equipment/medical_lefthand.dmi and b/icons/mob/inhands/equipment/medical_lefthand.dmi differ
diff --git a/icons/mob/inhands/equipment/medical_righthand.dmi b/icons/mob/inhands/equipment/medical_righthand.dmi
index 8133cca9bd..3b2b906404 100644
Binary files a/icons/mob/inhands/equipment/medical_righthand.dmi and b/icons/mob/inhands/equipment/medical_righthand.dmi differ
diff --git a/icons/mob/inhands/weapons/chainsaw_lefthand.dmi b/icons/mob/inhands/weapons/chainsaw_lefthand.dmi
index 3e0aea0e6b..3053fea723 100644
Binary files a/icons/mob/inhands/weapons/chainsaw_lefthand.dmi and b/icons/mob/inhands/weapons/chainsaw_lefthand.dmi differ
diff --git a/icons/mob/inhands/weapons/chainsaw_righthand.dmi b/icons/mob/inhands/weapons/chainsaw_righthand.dmi
index 0800a52731..4e76c19b7a 100644
Binary files a/icons/mob/inhands/weapons/chainsaw_righthand.dmi and b/icons/mob/inhands/weapons/chainsaw_righthand.dmi differ
diff --git a/icons/mob/inhands/weapons/hammers_lefthand.dmi b/icons/mob/inhands/weapons/hammers_lefthand.dmi
index 612066728a..023dfeed89 100644
Binary files a/icons/mob/inhands/weapons/hammers_lefthand.dmi and b/icons/mob/inhands/weapons/hammers_lefthand.dmi differ
diff --git a/icons/mob/inhands/weapons/hammers_righthand.dmi b/icons/mob/inhands/weapons/hammers_righthand.dmi
index 9341cc8e4c..f87d8c9b46 100644
Binary files a/icons/mob/inhands/weapons/hammers_righthand.dmi and b/icons/mob/inhands/weapons/hammers_righthand.dmi differ
diff --git a/icons/mob/mob.dmi b/icons/mob/mob.dmi
index 3137e8ac26..65efde8697 100644
Binary files a/icons/mob/mob.dmi and b/icons/mob/mob.dmi differ
diff --git a/icons/obj/chemical.dmi b/icons/obj/chemical.dmi
index 3916fcb694..36db68b7bb 100644
Binary files a/icons/obj/chemical.dmi and b/icons/obj/chemical.dmi differ
diff --git a/icons/obj/clothing/hats.dmi b/icons/obj/clothing/hats.dmi
index 27f9f5e0ac..7d4ae79957 100644
Binary files a/icons/obj/clothing/hats.dmi and b/icons/obj/clothing/hats.dmi differ
diff --git a/icons/obj/clothing/suits.dmi b/icons/obj/clothing/suits.dmi
index f689ee5068..e38eec35eb 100644
Binary files a/icons/obj/clothing/suits.dmi and b/icons/obj/clothing/suits.dmi differ
diff --git a/icons/obj/dyespray.dmi b/icons/obj/dyespray.dmi
new file mode 100644
index 0000000000..eb05603679
Binary files /dev/null and b/icons/obj/dyespray.dmi differ
diff --git a/icons/obj/items_and_weapons.dmi b/icons/obj/items_and_weapons.dmi
index b468d0d4c9..39f1845f43 100644
Binary files a/icons/obj/items_and_weapons.dmi and b/icons/obj/items_and_weapons.dmi differ
diff --git a/icons/obj/items_cyborg.dmi b/icons/obj/items_cyborg.dmi
index 769d5492c6..5d87bee320 100644
Binary files a/icons/obj/items_cyborg.dmi and b/icons/obj/items_cyborg.dmi differ
diff --git a/icons/obj/stationobjs.dmi b/icons/obj/stationobjs.dmi
index a4fbe53dba..7e04fa0d2a 100644
Binary files a/icons/obj/stationobjs.dmi and b/icons/obj/stationobjs.dmi differ
diff --git a/icons/obj/storage.dmi b/icons/obj/storage.dmi
index b4f223e57d..8a17a8f448 100644
Binary files a/icons/obj/storage.dmi and b/icons/obj/storage.dmi differ
diff --git a/icons/obj/surgery.dmi b/icons/obj/surgery.dmi
index 52172bbe29..58ba5fadd8 100755
Binary files a/icons/obj/surgery.dmi and b/icons/obj/surgery.dmi differ
diff --git a/icons/obj/syringe.dmi b/icons/obj/syringe.dmi
index b474dc68ba..6d0c779e92 100644
Binary files a/icons/obj/syringe.dmi and b/icons/obj/syringe.dmi differ
diff --git a/icons/obj/tiles.dmi b/icons/obj/tiles.dmi
index 088b6c2c7b..757208cd9b 100644
Binary files a/icons/obj/tiles.dmi and b/icons/obj/tiles.dmi differ
diff --git a/icons/obj/tools.dmi b/icons/obj/tools.dmi
index a720aff62c..95a887a733 100644
Binary files a/icons/obj/tools.dmi and b/icons/obj/tools.dmi differ
diff --git a/icons/turf/floors/catwalk_plating.dmi b/icons/turf/floors/catwalk_plating.dmi
new file mode 100644
index 0000000000..24954e4a17
Binary files /dev/null and b/icons/turf/floors/catwalk_plating.dmi differ
diff --git a/modular_citadel/icons/mob/mam_tails.dmi b/modular_citadel/icons/mob/mam_tails.dmi
index c1ffced3d5..f30f7480f6 100644
Binary files a/modular_citadel/icons/mob/mam_tails.dmi and b/modular_citadel/icons/mob/mam_tails.dmi differ
diff --git a/rust_g.dll b/rust_g.dll
index 8ef1c59a10..26f6942861 100644
Binary files a/rust_g.dll and b/rust_g.dll differ
diff --git a/strings/tips.txt b/strings/tips.txt
index d4373b3606..5c6228769e 100644
--- a/strings/tips.txt
+++ b/strings/tips.txt
@@ -136,7 +136,7 @@ As a Security Officer, your security HUDglasses can not only see crewmates' job
As a Security Officer, mindshield implants can only prevent someone from being turned into a cultist: unlike revolutionaries, it will not de-cult them if they have already been converted.
As a Security Officer, examining someone while wearing your security HUDglasses can allow you to swiftly edit their records and criminal status. Be sure to set someone to WANTED if you can't catch up to them, as it'll alert other officers of who's the bad guy, and cause the little security droids to chase after them for you.
As a Security Officer, you can take out the power cell on your baton to replace it with a better or fully charged one. Just use a screwdriver on your baton to remove the old cell.
-As a Security Officer, you can just about any firearm on your vest, this even works with other non-standard armor-substitutes like security winter coats!
+As a Security Officer, you can place just about any firearm on your vest slot, and this even works with other non-standard armor-substitutes like security winter coats!
As the Detective, people leave fingerprints everywhere and on everything. With the exception of white latex, gloves will hide them. All is not lost, however, as gloves leave fibers specific to their kind such as black or nitrile, pointing to a general department.
As the Detective, you can use your forensics scanner from a distance. Use this to scan boxes or other storage containers.
As the Detective, your revolver can be loaded with .357 ammunition. Use a screwdriver to permanently modify your revolver into using this type of ammunition, be warned however, firing it has a decent chance to cause the revolver to misfire and shoot you in the foot.
diff --git a/tgstation.dme b/tgstation.dme
index 7b0806a921..c4de2a1799 100644
--- a/tgstation.dme
+++ b/tgstation.dme
@@ -103,6 +103,7 @@
#include "code\__DEFINES\rockpaperscissors.dm"
#include "code\__DEFINES\role_preferences.dm"
#include "code\__DEFINES\rust_g.dm"
+#include "code\__DEFINES\rust_g_overrides.dm"
#include "code\__DEFINES\say.dm"
#include "code\__DEFINES\security_levels.dm"
#include "code\__DEFINES\shuttles.dm"
@@ -179,6 +180,7 @@
#include "code\__HELPERS\icons.dm"
#include "code\__HELPERS\level_traits.dm"
#include "code\__HELPERS\lighting.dm"
+#include "code\__HELPERS\markov.dm"
#include "code\__HELPERS\matrices.dm"
#include "code\__HELPERS\mobs.dm"
#include "code\__HELPERS\mouse_control.dm"
@@ -462,6 +464,8 @@
#include "code\datums\achievements\skill_achievements.dm"
#include "code\datums\actions\beam_rifle.dm"
#include "code\datums\actions\ninja.dm"
+#include "code\datums\atmosphere\_atmosphere.dm"
+#include "code\datums\atmosphere\planetary.dm"
#include "code\datums\brain_damage\brain_trauma.dm"
#include "code\datums\brain_damage\hypnosis.dm"
#include "code\datums\brain_damage\imaginary_friend.dm"
@@ -662,6 +666,7 @@
#include "code\datums\helper_datums\events.dm"
#include "code\datums\helper_datums\getrev.dm"
#include "code\datums\helper_datums\icon_snapshot.dm"
+#include "code\datums\helper_datums\stack_end_detector.dm"
#include "code\datums\helper_datums\teleport.dm"
#include "code\datums\looping_sounds\_looping_sound.dm"
#include "code\datums\looping_sounds\item_sounds.dm"
@@ -1099,6 +1104,7 @@
#include "code\game\objects\items\dna_injector.dm"
#include "code\game\objects\items\documents.dm"
#include "code\game\objects\items\dualsaber.dm"
+#include "code\game\objects\items\dyekit.dm"
#include "code\game\objects\items\eightball.dm"
#include "code\game\objects\items\electrostaff.dm"
#include "code\game\objects\items\extinguisher.dm"
@@ -1391,6 +1397,7 @@
#include "code\game\turfs\closed.dm"
#include "code\game\turfs\open.dm"
#include "code\game\turfs\turf.dm"
+#include "code\game\turfs\open\floor\catwalk_plating.dm"
#include "code\game\turfs\simulated\chasm.dm"
#include "code\game\turfs\simulated\dirtystation.dm"
#include "code\game\turfs\simulated\floor.dm"
@@ -2791,6 +2798,9 @@
#include "code\modules\mob\living\simple_animal\friendly\drone\say.dm"
#include "code\modules\mob\living\simple_animal\friendly\drone\verbs.dm"
#include "code\modules\mob\living\simple_animal\friendly\drone\visuals_icons.dm"
+#include "code\modules\mob\living\simple_animal\gremlin\gremlin.dm"
+#include "code\modules\mob\living\simple_animal\gremlin\gremlin_act.dm"
+#include "code\modules\mob\living\simple_animal\gremlin\gremlin_event.dm"
#include "code\modules\mob\living\simple_animal\guardian\guardian.dm"
#include "code\modules\mob\living\simple_animal\guardian\types\assassin.dm"
#include "code\modules\mob\living\simple_animal\guardian\types\charger.dm"
@@ -2827,6 +2837,7 @@
#include "code\modules\mob\living\simple_animal\hostile\nanotrasen.dm"
#include "code\modules\mob\living\simple_animal\hostile\netherworld.dm"
#include "code\modules\mob\living\simple_animal\hostile\pirate.dm"
+#include "code\modules\mob\living\simple_animal\hostile\plaguerat.dm"
#include "code\modules\mob\living\simple_animal\hostile\regalrat.dm"
#include "code\modules\mob\living\simple_animal\hostile\russian.dm"
#include "code\modules\mob\living\simple_animal\hostile\sharks.dm"
diff --git a/tools/build/README.md b/tools/build/README.md
index f367857158..51121dbde6 100644
--- a/tools/build/README.md
+++ b/tools/build/README.md
@@ -13,6 +13,14 @@ This build script is the recommended way to compile the game, including not only
The script will skip build steps whose inputs have not changed since the last run.
+## Getting list of available targets
+
+You can get a list of all targets that you can build by running the following command:
+
+```
+tools/build/build --help
+```
+
## Dependencies
- On Windows, `BUILD.bat` will automatically install a private (vendored) copy of Node.
@@ -22,3 +30,5 @@ The script will skip build steps whose inputs have not changed since the last ru
## Why?
We used to include compiled versions of the tgui JavaScript code in the Git repository so that the project could be compiled using BYOND only. These pre-compiled files tended to have merge conflicts for no good reason. Using a build script lets us avoid this problem, while keeping builds convenient for people who are not modifying tgui.
+
+This build script is based on [Juke Build](https://github.com/stylemistake/juke-build) - please follow the link and read the documentation for the project to understand how it works and how to contribute to this build script.
diff --git a/tools/build/binaries/README.md b/tools/build/binaries/README.md
deleted file mode 100644
index 625f337d98..0000000000
--- a/tools/build/binaries/README.md
+++ /dev/null
@@ -1 +0,0 @@
-This directory is used to store temporary files to create binaries on linux
\ No newline at end of file
diff --git a/tools/build/build b/tools/build/build
index cd4d804e8f..0e202e1bba 100755
--- a/tools/build/build
+++ b/tools/build/build
@@ -1,6 +1,4 @@
#!/bin/sh
-
-#Build TGUI
set -e
cd "$(dirname "$0")"
exec ../bootstrap/node build.js "$@"
diff --git a/tools/build/build.bat b/tools/build/build.bat
index f5d9bd48f3..56e3bf1171 100644
--- a/tools/build/build.bat
+++ b/tools/build/build.bat
@@ -1 +1,2 @@
-@"%~dp0\..\bootstrap\node" "%~dp0\build.js"
+@echo off
+"%~dp0\..\bootstrap\node.bat" --experimental-modules "%~dp0\build.js" %*
diff --git a/tools/build/build.js b/tools/build/build.js
index 0f04441334..f8d3a9a7dd 100755
--- a/tools/build/build.js
+++ b/tools/build/build.js
@@ -1,225 +1,293 @@
#!/usr/bin/env node
/**
+ * Build script for /tg/station 13 codebase.
+ *
+ * This script uses Juke Build, read the docs here:
+ * https://github.com/stylemistake/juke-build
+ *
* @file
- * @copyright 2020 Aleksej Komarov
+ * @copyright 2021 Aleksej Komarov
* @license MIT
*/
-// Change working directory to project root
-process.chdir(require('path').resolve(__dirname, '../../'));
+import fs from 'fs';
+import { DreamDaemon, DreamMaker } from './lib/byond.js';
+import { yarn } from './lib/yarn.js';
+import Juke from './juke/index.js';
-// Validate NodeJS version
-const NODE_VERSION = parseInt(process.versions.node.match(/(\d+)/)[1]);
-const NODE_VERSION_TARGET = parseInt(require('fs')
- .readFileSync('dependencies.sh', 'utf-8')
- .match(/NODE_VERSION=(\d+)/)[1]);
-if (NODE_VERSION < NODE_VERSION_TARGET) {
- console.error('Your current Node.js version is out of date.');
- console.error('You have two options:');
- console.error(' a) Go to https://nodejs.org/ and install the latest LTS release of Node.js');
- console.error(' b) Uninstall Node.js (our build system automatically downloads one)');
- process.exit(1);
-}
+Juke.chdir('../..', import.meta.url);
+Juke.setup({ file: import.meta.url }).then((code) => process.exit(code));
-const STANDARD_BUILD = "Standard Build"
-const TGS_BUILD = "TGS Build"
-const ALL_MAPS_BUILD = "CI All Maps Build"
-const TEST_RUN_BUILD = "CI Integration Tests Build"
-const NO_DM_BUILD = "Except DM Build"
+const DME_NAME = 'tgstation';
-let BUILD_MODE = STANDARD_BUILD;
-if (process.env.CBT_BUILD_MODE) {
- switch (process.env.CBT_BUILD_MODE) {
- case "ALL_MAPS":
- BUILD_MODE = ALL_MAPS_BUILD
- break;
- case "TEST_RUN":
- BUILD_MODE = TEST_RUN_BUILD
- break;
- case "TGS":
- BUILD_MODE = TGS_BUILD
- break;
- case "NO_DM":
- BUILD_MODE = NO_DM_BUILD
- break;
- default:
- BUILD_MODE = process.env.CBT_BUILD_MODE
- break;
- }
-}
-console.log(`Starting CBT in ${BUILD_MODE} mode.`)
+export const DefineParameter = new Juke.Parameter({
+ type: 'string[]',
+ alias: 'D',
+});
-const DME_NAME = 'tgstation'
+export const PortParameter = new Juke.Parameter({
+ type: 'string',
+ alias: 'p',
+});
-// Main
-// --------------------------------------------------------
+export const CiParameter = new Juke.Parameter({
+ type: 'boolean',
+});
-const { resolveGlob, stat } = require('./cbt/fs');
-const { exec } = require('./cbt/process');
-const { Task, runTasks } = require('./cbt/task');
-const { regQuery } = require('./cbt/winreg');
-const fs = require('fs');
+export const DmMapsIncludeTarget = new Juke.Target({
+ executes: async () => {
+ const folders = [
+ ...Juke.glob('_maps/RandomRuins/**/*.dmm'),
+ ...Juke.glob('_maps/RandomZLevels/**/*.dmm'),
+ ...Juke.glob('_maps/shuttles/**/*.dmm'),
+ ...Juke.glob('_maps/templates/**/*.dmm'),
+ ];
+ const content = folders
+ .map((file) => file.replace('_maps/', ''))
+ .map((file) => `#include "${file}"`)
+ .join('\n') + '\n';
+ fs.writeFileSync('_maps/templates.dm', content);
+ },
+});
-const yarn = args => {
- const yarnPath = resolveGlob('./tgui/.yarn/releases/yarn-*.cjs')[0]
- .replace('/tgui/', '/');
- return exec('node', [yarnPath, ...args], {
- cwd: './tgui',
- });
-};
+export const DmTarget = new Juke.Target({
+ dependsOn: ({ get }) => [
+ get(DefineParameter).includes('ALL_MAPS') && DmMapsIncludeTarget,
+ ],
+ inputs: [
+ '_maps/map_files/generic/**',
+ 'code/**',
+ 'goon/**',
+ 'html/**',
+ 'icons/**',
+ 'interface/**',
+ `${DME_NAME}.dme`,
+ ],
+ outputs: [
+ `${DME_NAME}.dmb`,
+ `${DME_NAME}.rsc`,
+ ],
+ parameters: [DefineParameter],
+ executes: async ({ get }) => {
+ const defines = get(DefineParameter);
+ if (defines.length > 0) {
+ Juke.logger.info('Using defines:', defines.join(', '));
+ }
+ await DreamMaker(`${DME_NAME}.dme`, {
+ defines: ['CBT', ...defines],
+ });
+ },
+});
-/** Installs all tgui dependencies */
-const taskYarn = new Task('yarn')
- // The following dependencies skip what could be considered an important
- // step in Yarn: it verifies the integrity of cache. With this setup, if
- // cache ever becomes corrupted, your only option is to clean build.
- .depends('tgui/.yarn/+(cache|releases|plugins|sdks)/**/*')
- .depends('tgui/**/package.json')
- .depends('tgui/yarn.lock')
- // Phony target (automatically created at the end of the task)
- .provides('tgui/.yarn/install-target')
- .build(() => yarn(['install']));
+export const DmTestTarget = new Juke.Target({
+ dependsOn: ({ get }) => [
+ get(DefineParameter).includes('ALL_MAPS') && DmMapsIncludeTarget,
+ ],
+ executes: async ({ get }) => {
+ const defines = get(DefineParameter);
+ if (defines.length > 0) {
+ Juke.logger.info('Using defines:', defines.join(', '));
+ }
+ fs.copyFileSync(`${DME_NAME}.dme`, `${DME_NAME}.test.dme`);
+ await DreamMaker(`${DME_NAME}.test.dme`, {
+ defines: ['CBT', 'CIBUILDING', ...defines],
+ });
+ Juke.rm('data/logs/ci', { recursive: true });
+ await DreamDaemon(
+ `${DME_NAME}.test.dmb`,
+ '-close', '-trusted', '-verbose',
+ '-params', 'log-directory=ci'
+ );
+ Juke.rm('*.test.*');
+ try {
+ const cleanRun = fs.readFileSync('data/logs/ci/clean_run.lk', 'utf-8');
+ console.log(cleanRun);
+ }
+ catch (err) {
+ Juke.logger.error('Test run was not clean, exiting');
+ throw new Juke.ExitCode(1);
+ }
+ },
+});
-/** Builds svg fonts */
-const taskTgfont = new Task('tgfont')
- .depends('tgui/.yarn/install-target')
- .depends('tgui/packages/tgfont/**/*.+(js|cjs|svg)')
- .depends('tgui/packages/tgfont/package.json')
- .provides('tgui/packages/tgfont/dist/tgfont.css')
- .provides('tgui/packages/tgfont/dist/tgfont.eot')
- .provides('tgui/packages/tgfont/dist/tgfont.woff2')
- .build(() => yarn(['workspace', 'tgfont', 'build']));
+export const YarnTarget = new Juke.Target({
+ inputs: [
+ 'tgui/.yarn/+(cache|releases|plugins|sdks)/**/*',
+ 'tgui/**/package.json',
+ 'tgui/yarn.lock',
+ ],
+ outputs: [
+ 'tgui/.yarn/install-target',
+ ],
+ executes: async () => {
+ await yarn('install');
+ },
+});
-/** Builds tgui */
-const taskTgui = new Task('tgui')
- .depends('tgui/.yarn/install-target')
- .depends('tgui/webpack.config.js')
- .depends('tgui/**/package.json')
- .depends('tgui/packages/**/*.+(js|cjs|ts|tsx|scss)')
- .provides('tgui/public/tgui.bundle.css')
- .provides('tgui/public/tgui.bundle.js')
- .provides('tgui/public/tgui-common.bundle.js')
- .provides('tgui/public/tgui-panel.bundle.css')
- .provides('tgui/public/tgui-panel.bundle.js')
- .build(async () => {
- await yarn(['run', 'webpack-cli', '--mode=production']);
- });
+export const TgFontTarget = new Juke.Target({
+ dependsOn: [YarnTarget],
+ inputs: [
+ 'tgui/.yarn/install-target',
+ 'tgui/packages/tgfont/**/*.+(js|cjs|svg)',
+ 'tgui/packages/tgfont/package.json',
+ ],
+ outputs: [
+ 'tgui/packages/tgfont/dist/tgfont.css',
+ 'tgui/packages/tgfont/dist/tgfont.eot',
+ 'tgui/packages/tgfont/dist/tgfont.woff2',
+ ],
+ executes: async () => {
+ await yarn('workspace', 'tgfont', 'build');
+ },
+});
+
+export const TguiTarget = new Juke.Target({
+ dependsOn: [YarnTarget],
+ inputs: [
+ 'tgui/.yarn/install-target',
+ 'tgui/webpack.config.js',
+ 'tgui/**/package.json',
+ 'tgui/packages/**/*.+(js|cjs|ts|tsx|scss)',
+ ],
+ outputs: [
+ 'tgui/public/tgui.bundle.css',
+ 'tgui/public/tgui.bundle.js',
+ 'tgui/public/tgui-panel.bundle.css',
+ 'tgui/public/tgui-panel.bundle.js',
+ ],
+ executes: async () => {
+ await yarn('webpack-cli', '--mode=production');
+ },
+});
+
+export const TguiEslintTarget = new Juke.Target({
+ dependsOn: [YarnTarget],
+ executes: async ({ args }) => {
+ await yarn(
+ 'eslint', 'packages',
+ '--fix', '--ext', '.js,.cjs,.ts,.tsx',
+ ...args
+ );
+ },
+});
+
+export const TguiTscTarget = new Juke.Target({
+ dependsOn: [YarnTarget],
+ executes: async () => {
+ await yarn('tsc');
+ },
+});
+
+export const TguiTestTarget = new Juke.Target({
+ dependsOn: [YarnTarget],
+ executes: async ({ args }) => {
+ await yarn('jest', ...args);
+ },
+});
+
+export const TguiLintTarget = new Juke.Target({
+ dependsOn: [YarnTarget, TguiEslintTarget, TguiTscTarget, TguiTestTarget],
+});
+
+export const TguiDevTarget = new Juke.Target({
+ dependsOn: [YarnTarget],
+ executes: async ({ args }) => {
+ await yarn('node', 'packages/tgui-dev-server/index.js', ...args);
+ },
+});
+
+export const TguiAnalyzeTarget = new Juke.Target({
+ dependsOn: [YarnTarget],
+ executes: async () => {
+ await yarn('webpack-cli', '--mode=production', '--analyze');
+ },
+});
+
+export const TestTarget = new Juke.Target({
+ dependsOn: [DmTestTarget, TguiTestTarget],
+});
+
+export const LintTarget = new Juke.Target({
+ dependsOn: [TguiLintTarget],
+});
+
+export const BuildTarget = new Juke.Target({
+ dependsOn: [TguiTarget, TgFontTarget, DmTarget],
+});
+
+export const ServerTarget = new Juke.Target({
+ dependsOn: [BuildTarget],
+ executes: async ({ get }) => {
+ const port = get(PortParameter) || '1337';
+ await DreamDaemon(`${DME_NAME}.dmb`, port, '-trusted');
+ },
+});
+
+export const AllTarget = new Juke.Target({
+ dependsOn: [TestTarget, LintTarget, BuildTarget],
+});
+
+/**
+ * Removes the immediate build junk to produce clean builds.
+ */
+export const CleanTarget = new Juke.Target({
+ executes: async () => {
+ Juke.rm('*.dmb');
+ Juke.rm('*.rsc');
+ Juke.rm('*.mdme');
+ Juke.rm('*.mdme*');
+ Juke.rm('*.m.*');
+ Juke.rm('_maps/templates.dm');
+ Juke.rm('tgui/public/.tmp', { recursive: true });
+ Juke.rm('tgui/public/*.map');
+ Juke.rm('tgui/public/*.chunk.*');
+ Juke.rm('tgui/public/*.bundle.*');
+ Juke.rm('tgui/public/*.hot-update.*');
+ Juke.rm('tgui/packages/tgfont/dist', { recursive: true });
+ Juke.rm('tgui/.yarn/cache', { recursive: true });
+ Juke.rm('tgui/.yarn/unplugged', { recursive: true });
+ Juke.rm('tgui/.yarn/webpack', { recursive: true });
+ Juke.rm('tgui/.yarn/build-state.yml');
+ Juke.rm('tgui/.yarn/install-state.gz');
+ Juke.rm('tgui/.yarn/install-target');
+ Juke.rm('tgui/.pnp.*');
+ },
+});
+
+/**
+ * Removes more junk at expense of much slower initial builds.
+ */
+export const DistCleanTarget = new Juke.Target({
+ dependsOn: [CleanTarget],
+ executes: async () => {
+ Juke.logger.info('Cleaning up data/logs');
+ Juke.rm('data/logs', { recursive: true });
+ Juke.logger.info('Cleaning up bootstrap cache');
+ Juke.rm('tools/bootstrap/.cache', { recursive: true });
+ Juke.logger.info('Cleaning up global yarn cache');
+ await yarn('cache', 'clean', '--all');
+ },
+});
/**
* Prepends the defines to the .dme.
* Does not clean them up, as this is intended for TGS which
* clones new copies anyway.
*/
-const taskPrependDefines = (...defines) => new Task('prepend-defines')
- .build(async () => {
- const dmeContents = fs.readFileSync(`${DME_NAME}.dme`);
- const textToWrite = defines.map(define => `#define ${define}\n`);
- fs.writeFileSync(`${DME_NAME}.dme`, `${textToWrite}\n${dmeContents}`);
- });
+const prependDefines = (...defines) => {
+ const dmeContents = fs.readFileSync(`${DME_NAME}.dme`);
+ const textToWrite = defines.map(define => `#define ${define}\n`);
+ fs.writeFileSync(`${DME_NAME}.dme`, `${textToWrite}\n${dmeContents}`);
+};
-const taskDm = (...injectedDefines) => new Task('dm')
- .depends('_maps/map_files/generic/**')
- .depends('code/**')
- .depends('goon/**')
- .depends('html/**')
- .depends('icons/**')
- .depends('interface/**')
- .depends(process.platform === 'win32' ? 'auxmos.*' : 'libauxmos.*')
- .depends('tgui/public/tgui.html')
- .depends('tgui/public/*.bundle.*')
- .depends(`${DME_NAME}.dme`)
- .provides(`${DME_NAME}.dmb`)
- .provides(`${DME_NAME}.rsc`)
- .build(async () => {
- const dmPath = await (async () => {
- // Search in array of paths
- const paths = [
- ...((process.env.DM_EXE && process.env.DM_EXE.split(',')) || []),
- 'C:\\Program Files\\BYOND\\bin\\dm.exe',
- 'C:\\Program Files (x86)\\BYOND\\bin\\dm.exe',
- ['reg', 'HKLM\\Software\\Dantom\\BYOND', 'installpath'],
- ['reg', 'HKLM\\SOFTWARE\\WOW6432Node\\Dantom\\BYOND', 'installpath'],
- ];
- const isFile = path => {
- try {
- const fstat = stat(path);
- return fstat && fstat.isFile();
- }
- catch (err) {}
- return false;
- };
- for (let path of paths) {
- // Resolve a registry key
- if (Array.isArray(path)) {
- const [type, ...args] = path;
- path = await regQuery(...args);
- }
- if (!path) {
- continue;
- }
- // Check if path exists
- if (isFile(path)) {
- return path;
- }
- if (isFile(path + '/dm.exe')) {
- return path + '/dm.exe';
- }
- if (isFile(path + '/bin/dm.exe')) {
- return path + '/bin/dm.exe';
- }
- }
- // Default paths
- return (
- process.platform === 'win32' && 'dm.exe'
- || 'DreamMaker'
- );
- })();
- if (injectedDefines.length) {
- const injectedContent = injectedDefines
- .map(x => `#define ${x}\n`)
- .join('')
- // Create mdme file
- fs.writeFileSync(`${DME_NAME}.mdme`, injectedContent)
- // Add the actual dme content
- const dme_content = fs.readFileSync(`${DME_NAME}.dme`)
- fs.appendFileSync(`${DME_NAME}.mdme`, dme_content)
- await exec(dmPath, [`${DME_NAME}.mdme`]);
- // Rename dmb
- fs.renameSync(`${DME_NAME}.mdme.dmb`, `${DME_NAME}.dmb`)
- // Rename rsc
- fs.renameSync(`${DME_NAME}.mdme.rsc`, `${DME_NAME}.rsc`)
- // Remove mdme
- fs.unlinkSync(`${DME_NAME}.mdme`)
- }
- else {
- await exec(dmPath, [`${DME_NAME}.dme`]);
- }
- });
+export const TgsTarget = new Juke.Target({
+ dependsOn: [TguiTarget, TgFontTarget],
+ executes: async () => {
+ Juke.logger.info('Prepending TGS define');
+ prependDefines('TGS');
+ },
+});
-// Frontend
-let tasksToRun = [
- taskYarn,
- taskTgfont,
- taskTgui,
-];
-switch (BUILD_MODE) {
- case STANDARD_BUILD:
- tasksToRun.push(taskDm('CBT'));
- break;
- case TGS_BUILD:
- tasksToRun.push(taskPrependDefines('TGS'));
- break;
- case ALL_MAPS_BUILD:
- tasksToRun.push(taskDm('CBT','CIBUILDING','CITESTING','ALL_MAPS'));
- break;
- case TEST_RUN_BUILD:
- tasksToRun.push(taskDm('CBT','CIBUILDING'));
- break;
- case NO_DM_BUILD:
- break;
- default:
- console.error(`Unknown build mode : ${BUILD_MODE}`)
- break;
-}
+const TGS_MODE = process.env.CBT_BUILD_MODE === 'TGS';
-runTasks(tasksToRun);
+export default TGS_MODE ? TgsTarget : BuildTarget;
diff --git a/tools/build/build.sh b/tools/build/build.sh
deleted file mode 100755
index 62372eff2d..0000000000
--- a/tools/build/build.sh
+++ /dev/null
@@ -1,75 +0,0 @@
-#!/bin/sh
-
-#Detect OS and use corresponding package manager for dependencies. Currently only works for arch, debian/ubuntu, and RHEL/fedora/CentOS
-if [[ -f '/etc/arch-release' ]]; then
- echo -ne '\n y' | sudo pacman --needed -Sy base-devel git curl nodejs unzip
-fi
-if [[ -f '/etc/debian version' ]]; then
- sudo dpkg --add-architecture i386
- sudo apt-get update
- sudo apt-get install -y build-essential git curl lib32z1 pkg-config libssl-dev:i386 libssl-dev nodejs unzip g++-multilib libc6-i386 libstdc++6:i386
-fi
-if [[ -f '/etc/centos-release' ]] || [[ -f '/etc/fedora-release' ]]; then #DNF should work for both of these
- sudo dnf --refresh install make automake gcc gcc-c++ kernel-devel git curl unzip glibc-devel.i686 openssl-devel.i686 libgcc.i686 libstdc++-devel.i686
-fi
-
-cd binaries
-
-#Install rust if not present
-if ! [ -x "$has_cargo" ]; then
- echo "Installing rust..."
- curl https://sh.rustup.rs -sSf | sh -s -- -y
- . ~/.profile
-fi
-
-#Download/update rust-g repo
-if [ ! -d "rust-g" ]; then
- echo "Cloning rust-g..."
- git clone https://github.com/tgstation/rust-g
- cd rust-g
- ~/.cargo/bin/rustup target add i686-unknown-linux-gnu
-else
- echo "Fetching rust-g..."
- cd rust-g
- git fetch
- ~/.cargo/bin/rustup target add i686-unknown-linux-gnu
-fi
-
-#Compile and move rust-g binary to repo root
-echo "Deploying rust-g..."
-git checkout "$RUST_G_VERSION"
-env PKG_CONFIG_ALLOW_CROSS=1 ~/.cargo/bin/cargo build --release --target=i686-unknown-linux-gnu
-mv target/i686-unknown-linux-gnu/release/librust_g.so ../../../../librust_g.so
-cd ..
-
-#Download/update auxmos repo
-if [ ! -d "auxmos" ]; then
- echo "Cloning auxmos..."
- git clone https://github.com/Putnam3145/auxmos
- cd auxmos
- ~/.cargo/bin/rustup target add i686-unknown-linux-gnu
-else
- echo "Fetching auxmos..."
- cd auxmos
- git fetch
- ~/.cargo/bin/rustup target add i686-unknown-linux-gnu
-fi
-
-#Compile and move auxmos binary to repo root
-echo "Deploying auxmos..."
-git checkout "$AUXMOS_VERSION"
-env PKG_CONFIG_ALLOW_CROSS=1 ~/.cargo/bin/cargo rustc --release --target=i686-unknown-linux-gnu --features all_reaction_hooks,explosive_decompression -- -C target-cpu=native
-mv target/i686-unknown-linux-gnu/release/libauxmos.so ../../../../libauxmos.so
-cd ../..
-
-#Install BYOND
-cd ../..
-./tools/ci/install_byond.sh
-source $HOME/BYOND/byond/bin/byondsetup
-
-cd tools/build
-
-#Build TGUI
-set -e
-cd "$(dirname "$0")"
-exec ../bootstrap/node build.js "$@"
diff --git a/tools/build/cbt/fs.js b/tools/build/cbt/fs.js
deleted file mode 100644
index 68a5a8bfbf..0000000000
--- a/tools/build/cbt/fs.js
+++ /dev/null
@@ -1,135 +0,0 @@
-/**
- * @file
- * @copyright 2020 Aleksej Komarov
- * @license MIT
- */
-
-const fs = require('fs');
-const glob = require('./glob');
-
-class File {
- constructor(path) {
- this.path = path;
- }
-
- get stat() {
- if (this._stat === undefined) {
- this._stat = stat(this.path);
- }
- return this._stat;
- }
-
- exists() {
- return this.stat !== null;
- }
-
- get mtime() {
- return this.stat && this.stat.mtime;
- }
-
- touch() {
- const time = new Date();
- try {
- fs.utimesSync(this.path, time, time);
- }
- catch (err) {
- fs.closeSync(fs.openSync(this.path, 'w'));
- }
- }
-}
-
-class Glob {
- constructor(path) {
- this.path = path;
- }
-
- toFiles() {
- const paths = glob.sync(this.path, {
- strict: false,
- silent: true,
- });
- return paths
- .map(path => new File(path))
- .filter(file => file.exists());
- }
-}
-
-/**
- * If true, source is newer than target.
- * @param {File[]} sources
- * @param {File[]} targets
- */
-const compareFiles = (sources, targets) => {
- let bestSource = null;
- let bestTarget = null;
- for (const file of sources) {
- if (!bestSource || file.mtime > bestSource.mtime) {
- bestSource = file;
- }
- }
- for (const file of targets) {
- if (!file.exists()) {
- return `target '${file.path}' is missing`;
- }
- if (!bestTarget || file.mtime < bestTarget.mtime) {
- bestTarget = file;
- }
- }
- // Doesn't need rebuild if there is no source, but target exists.
- if (!bestSource) {
- if (bestTarget) {
- return false;
- }
- return 'no known sources or targets';
- }
- // Always needs a rebuild if no targets were specified (e.g. due to GLOB).
- if (!bestTarget) {
- return 'no targets were specified';
- }
- // Needs rebuild if source is newer than target
- if (bestSource.mtime > bestTarget.mtime) {
- return `source '${bestSource.path}' is newer than target '${bestTarget.path}'`;
- }
- return false;
-};
-
-/**
- * Returns file stats for the provided path, or null if file is
- * not accessible.
- */
-const stat = path => {
- try {
- return fs.statSync(path);
- }
- catch {
- return null;
- }
-};
-
-/**
- * Resolves a glob pattern and returns files that are safe
- * to call `stat` on.
- */
-const resolveGlob = globPath => {
- const unsafePaths = glob.sync(globPath, {
- strict: false,
- silent: true,
- });
- const safePaths = [];
- for (let path of unsafePaths) {
- try {
- fs.statSync(path);
- safePaths.push(path);
- }
- catch {}
- }
- return safePaths;
-};
-
-module.exports = {
- File,
- Glob,
- compareFiles,
- stat,
- resolveGlob,
-};
diff --git a/tools/build/cbt/glob.js b/tools/build/cbt/glob.js
deleted file mode 100644
index df6e153b38..0000000000
--- a/tools/build/cbt/glob.js
+++ /dev/null
@@ -1,3281 +0,0 @@
-'use strict';
-
-var fs = require('fs');
-var path$1 = require('path');
-var util = require('util');
-var events = require('events');
-var assert = require('assert');
-
-function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
-
-var fs__default = /*#__PURE__*/_interopDefaultLegacy(fs);
-var path__default = /*#__PURE__*/_interopDefaultLegacy(path$1);
-var util__default = /*#__PURE__*/_interopDefaultLegacy(util);
-var events__default = /*#__PURE__*/_interopDefaultLegacy(events);
-var assert__default = /*#__PURE__*/_interopDefaultLegacy(assert);
-
-// Copyright Joyent, Inc. and other Node contributors.
-//
-// Permission is hereby granted, free of charge, to any person obtaining a
-// copy of this software and associated documentation files (the
-// "Software"), to deal in the Software without restriction, including
-// without limitation the rights to use, copy, modify, merge, publish,
-// distribute, sublicense, and/or sell copies of the Software, and to permit
-// persons to whom the Software is furnished to do so, subject to the
-// following conditions:
-//
-// The above copyright notice and this permission notice shall be included
-// in all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
-// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
-// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
-// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
-// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
-// USE OR OTHER DEALINGS IN THE SOFTWARE.
-
-
-var isWindows = process.platform === 'win32';
-
-
-// JavaScript implementation of realpath, ported from node pre-v6
-
-var DEBUG = process.env.NODE_DEBUG && /fs/.test(process.env.NODE_DEBUG);
-
-function rethrow() {
- // Only enable in debug mode. A backtrace uses ~1000 bytes of heap space and
- // is fairly slow to generate.
- var callback;
- if (DEBUG) {
- var backtrace = new Error;
- callback = debugCallback;
- } else
- callback = missingCallback;
-
- return callback;
-
- function debugCallback(err) {
- if (err) {
- backtrace.message = err.message;
- err = backtrace;
- missingCallback(err);
- }
- }
-
- function missingCallback(err) {
- if (err) {
- if (process.throwDeprecation)
- throw err; // Forgot a callback but don't know where? Use NODE_DEBUG=fs
- else if (!process.noDeprecation) {
- var msg = 'fs: missing callback ' + (err.stack || err.message);
- if (process.traceDeprecation)
- console.trace(msg);
- else
- console.error(msg);
- }
- }
- }
-}
-
-function maybeCallback(cb) {
- return typeof cb === 'function' ? cb : rethrow();
-}
-
-var normalize = path__default['default'].normalize;
-
-// Regexp that finds the next partion of a (partial) path
-// result is [base_with_slash, base], e.g. ['somedir/', 'somedir']
-if (isWindows) {
- var nextPartRe = /(.*?)(?:[\/\\]+|$)/g;
-} else {
- var nextPartRe = /(.*?)(?:[\/]+|$)/g;
-}
-
-// Regex to find the device root, including trailing slash. E.g. 'c:\\'.
-if (isWindows) {
- var splitRootRe = /^(?:[a-zA-Z]:|[\\\/]{2}[^\\\/]+[\\\/][^\\\/]+)?[\\\/]*/;
-} else {
- var splitRootRe = /^[\/]*/;
-}
-
-var realpathSync = function realpathSync(p, cache) {
- // make p is absolute
- p = path__default['default'].resolve(p);
-
- if (cache && Object.prototype.hasOwnProperty.call(cache, p)) {
- return cache[p];
- }
-
- var original = p,
- seenLinks = {},
- knownHard = {};
-
- // current character position in p
- var pos;
- // the partial path so far, including a trailing slash if any
- var current;
- // the partial path without a trailing slash (except when pointing at a root)
- var base;
- // the partial path scanned in the previous round, with slash
- var previous;
-
- start();
-
- function start() {
- // Skip over roots
- var m = splitRootRe.exec(p);
- pos = m[0].length;
- current = m[0];
- base = m[0];
- previous = '';
-
- // On windows, check that the root exists. On unix there is no need.
- if (isWindows && !knownHard[base]) {
- fs__default['default'].lstatSync(base);
- knownHard[base] = true;
- }
- }
-
- // walk down the path, swapping out linked pathparts for their real
- // values
- // NB: p.length changes.
- while (pos < p.length) {
- // find the next part
- nextPartRe.lastIndex = pos;
- var result = nextPartRe.exec(p);
- previous = current;
- current += result[0];
- base = previous + result[1];
- pos = nextPartRe.lastIndex;
-
- // continue if not a symlink
- if (knownHard[base] || (cache && cache[base] === base)) {
- continue;
- }
-
- var resolvedLink;
- if (cache && Object.prototype.hasOwnProperty.call(cache, base)) {
- // some known symbolic link. no need to stat again.
- resolvedLink = cache[base];
- } else {
- var stat = fs__default['default'].lstatSync(base);
- if (!stat.isSymbolicLink()) {
- knownHard[base] = true;
- if (cache) cache[base] = base;
- continue;
- }
-
- // read the link if it wasn't read before
- // dev/ino always return 0 on windows, so skip the check.
- var linkTarget = null;
- if (!isWindows) {
- var id = stat.dev.toString(32) + ':' + stat.ino.toString(32);
- if (seenLinks.hasOwnProperty(id)) {
- linkTarget = seenLinks[id];
- }
- }
- if (linkTarget === null) {
- fs__default['default'].statSync(base);
- linkTarget = fs__default['default'].readlinkSync(base);
- }
- resolvedLink = path__default['default'].resolve(previous, linkTarget);
- // track this, if given a cache.
- if (cache) cache[base] = resolvedLink;
- if (!isWindows) seenLinks[id] = linkTarget;
- }
-
- // resolve the link, then start over
- p = path__default['default'].resolve(resolvedLink, p.slice(pos));
- start();
- }
-
- if (cache) cache[original] = p;
-
- return p;
-};
-
-
-var realpath = function realpath(p, cache, cb) {
- if (typeof cb !== 'function') {
- cb = maybeCallback(cache);
- cache = null;
- }
-
- // make p is absolute
- p = path__default['default'].resolve(p);
-
- if (cache && Object.prototype.hasOwnProperty.call(cache, p)) {
- return process.nextTick(cb.bind(null, null, cache[p]));
- }
-
- var original = p,
- seenLinks = {},
- knownHard = {};
-
- // current character position in p
- var pos;
- // the partial path so far, including a trailing slash if any
- var current;
- // the partial path without a trailing slash (except when pointing at a root)
- var base;
- // the partial path scanned in the previous round, with slash
- var previous;
-
- start();
-
- function start() {
- // Skip over roots
- var m = splitRootRe.exec(p);
- pos = m[0].length;
- current = m[0];
- base = m[0];
- previous = '';
-
- // On windows, check that the root exists. On unix there is no need.
- if (isWindows && !knownHard[base]) {
- fs__default['default'].lstat(base, function(err) {
- if (err) return cb(err);
- knownHard[base] = true;
- LOOP();
- });
- } else {
- process.nextTick(LOOP);
- }
- }
-
- // walk down the path, swapping out linked pathparts for their real
- // values
- function LOOP() {
- // stop if scanned past end of path
- if (pos >= p.length) {
- if (cache) cache[original] = p;
- return cb(null, p);
- }
-
- // find the next part
- nextPartRe.lastIndex = pos;
- var result = nextPartRe.exec(p);
- previous = current;
- current += result[0];
- base = previous + result[1];
- pos = nextPartRe.lastIndex;
-
- // continue if not a symlink
- if (knownHard[base] || (cache && cache[base] === base)) {
- return process.nextTick(LOOP);
- }
-
- if (cache && Object.prototype.hasOwnProperty.call(cache, base)) {
- // known symbolic link. no need to stat again.
- return gotResolvedLink(cache[base]);
- }
-
- return fs__default['default'].lstat(base, gotStat);
- }
-
- function gotStat(err, stat) {
- if (err) return cb(err);
-
- // if not a symlink, skip to the next path part
- if (!stat.isSymbolicLink()) {
- knownHard[base] = true;
- if (cache) cache[base] = base;
- return process.nextTick(LOOP);
- }
-
- // stat & read the link if not read before
- // call gotTarget as soon as the link target is known
- // dev/ino always return 0 on windows, so skip the check.
- if (!isWindows) {
- var id = stat.dev.toString(32) + ':' + stat.ino.toString(32);
- if (seenLinks.hasOwnProperty(id)) {
- return gotTarget(null, seenLinks[id], base);
- }
- }
- fs__default['default'].stat(base, function(err) {
- if (err) return cb(err);
-
- fs__default['default'].readlink(base, function(err, target) {
- if (!isWindows) seenLinks[id] = target;
- gotTarget(err, target);
- });
- });
- }
-
- function gotTarget(err, target, base) {
- if (err) return cb(err);
-
- var resolvedLink = path__default['default'].resolve(previous, target);
- if (cache) cache[base] = resolvedLink;
- gotResolvedLink(resolvedLink);
- }
-
- function gotResolvedLink(resolvedLink) {
- // resolve the link, then start over
- p = path__default['default'].resolve(resolvedLink, p.slice(pos));
- start();
- }
-};
-
-var old = {
- realpathSync: realpathSync,
- realpath: realpath
-};
-
-var fs_realpath = realpath$1;
-realpath$1.realpath = realpath$1;
-realpath$1.sync = realpathSync$1;
-realpath$1.realpathSync = realpathSync$1;
-realpath$1.monkeypatch = monkeypatch;
-realpath$1.unmonkeypatch = unmonkeypatch;
-
-
-var origRealpath = fs__default['default'].realpath;
-var origRealpathSync = fs__default['default'].realpathSync;
-
-var version = process.version;
-var ok = /^v[0-5]\./.test(version);
-
-
-function newError (er) {
- return er && er.syscall === 'realpath' && (
- er.code === 'ELOOP' ||
- er.code === 'ENOMEM' ||
- er.code === 'ENAMETOOLONG'
- )
-}
-
-function realpath$1 (p, cache, cb) {
- if (ok) {
- return origRealpath(p, cache, cb)
- }
-
- if (typeof cache === 'function') {
- cb = cache;
- cache = null;
- }
- origRealpath(p, cache, function (er, result) {
- if (newError(er)) {
- old.realpath(p, cache, cb);
- } else {
- cb(er, result);
- }
- });
-}
-
-function realpathSync$1 (p, cache) {
- if (ok) {
- return origRealpathSync(p, cache)
- }
-
- try {
- return origRealpathSync(p, cache)
- } catch (er) {
- if (newError(er)) {
- return old.realpathSync(p, cache)
- } else {
- throw er
- }
- }
-}
-
-function monkeypatch () {
- fs__default['default'].realpath = realpath$1;
- fs__default['default'].realpathSync = realpathSync$1;
-}
-
-function unmonkeypatch () {
- fs__default['default'].realpath = origRealpath;
- fs__default['default'].realpathSync = origRealpathSync;
-}
-
-var concatMap = function (xs, fn) {
- var res = [];
- for (var i = 0; i < xs.length; i++) {
- var x = fn(xs[i], i);
- if (isArray(x)) res.push.apply(res, x);
- else res.push(x);
- }
- return res;
-};
-
-var isArray = Array.isArray || function (xs) {
- return Object.prototype.toString.call(xs) === '[object Array]';
-};
-
-var balancedMatch = balanced;
-function balanced(a, b, str) {
- if (a instanceof RegExp) a = maybeMatch(a, str);
- if (b instanceof RegExp) b = maybeMatch(b, str);
-
- var r = range(a, b, str);
-
- return r && {
- start: r[0],
- end: r[1],
- pre: str.slice(0, r[0]),
- body: str.slice(r[0] + a.length, r[1]),
- post: str.slice(r[1] + b.length)
- };
-}
-
-function maybeMatch(reg, str) {
- var m = str.match(reg);
- return m ? m[0] : null;
-}
-
-balanced.range = range;
-function range(a, b, str) {
- var begs, beg, left, right, result;
- var ai = str.indexOf(a);
- var bi = str.indexOf(b, ai + 1);
- var i = ai;
-
- if (ai >= 0 && bi > 0) {
- begs = [];
- left = str.length;
-
- while (i >= 0 && !result) {
- if (i == ai) {
- begs.push(i);
- ai = str.indexOf(a, i + 1);
- } else if (begs.length == 1) {
- result = [ begs.pop(), bi ];
- } else {
- beg = begs.pop();
- if (beg < left) {
- left = beg;
- right = bi;
- }
-
- bi = str.indexOf(b, i + 1);
- }
-
- i = ai < bi && ai >= 0 ? ai : bi;
- }
-
- if (begs.length) {
- result = [ left, right ];
- }
- }
-
- return result;
-}
-
-var braceExpansion = expandTop;
-
-var escSlash = '\0SLASH'+Math.random()+'\0';
-var escOpen = '\0OPEN'+Math.random()+'\0';
-var escClose = '\0CLOSE'+Math.random()+'\0';
-var escComma = '\0COMMA'+Math.random()+'\0';
-var escPeriod = '\0PERIOD'+Math.random()+'\0';
-
-function numeric(str) {
- return parseInt(str, 10) == str
- ? parseInt(str, 10)
- : str.charCodeAt(0);
-}
-
-function escapeBraces(str) {
- return str.split('\\\\').join(escSlash)
- .split('\\{').join(escOpen)
- .split('\\}').join(escClose)
- .split('\\,').join(escComma)
- .split('\\.').join(escPeriod);
-}
-
-function unescapeBraces(str) {
- return str.split(escSlash).join('\\')
- .split(escOpen).join('{')
- .split(escClose).join('}')
- .split(escComma).join(',')
- .split(escPeriod).join('.');
-}
-
-
-// Basically just str.split(","), but handling cases
-// where we have nested braced sections, which should be
-// treated as individual members, like {a,{b,c},d}
-function parseCommaParts(str) {
- if (!str)
- return [''];
-
- var parts = [];
- var m = balancedMatch('{', '}', str);
-
- if (!m)
- return str.split(',');
-
- var pre = m.pre;
- var body = m.body;
- var post = m.post;
- var p = pre.split(',');
-
- p[p.length-1] += '{' + body + '}';
- var postParts = parseCommaParts(post);
- if (post.length) {
- p[p.length-1] += postParts.shift();
- p.push.apply(p, postParts);
- }
-
- parts.push.apply(parts, p);
-
- return parts;
-}
-
-function expandTop(str) {
- if (!str)
- return [];
-
- // I don't know why Bash 4.3 does this, but it does.
- // Anything starting with {} will have the first two bytes preserved
- // but *only* at the top level, so {},a}b will not expand to anything,
- // but a{},b}c will be expanded to [a}c,abc].
- // One could argue that this is a bug in Bash, but since the goal of
- // this module is to match Bash's rules, we escape a leading {}
- if (str.substr(0, 2) === '{}') {
- str = '\\{\\}' + str.substr(2);
- }
-
- return expand(escapeBraces(str), true).map(unescapeBraces);
-}
-
-function embrace(str) {
- return '{' + str + '}';
-}
-function isPadded(el) {
- return /^-?0\d/.test(el);
-}
-
-function lte(i, y) {
- return i <= y;
-}
-function gte(i, y) {
- return i >= y;
-}
-
-function expand(str, isTop) {
- var expansions = [];
-
- var m = balancedMatch('{', '}', str);
- if (!m || /\$$/.test(m.pre)) return [str];
-
- var isNumericSequence = /^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(m.body);
- var isAlphaSequence = /^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(m.body);
- var isSequence = isNumericSequence || isAlphaSequence;
- var isOptions = m.body.indexOf(',') >= 0;
- if (!isSequence && !isOptions) {
- // {a},b}
- if (m.post.match(/,.*\}/)) {
- str = m.pre + '{' + m.body + escClose + m.post;
- return expand(str);
- }
- return [str];
- }
-
- var n;
- if (isSequence) {
- n = m.body.split(/\.\./);
- } else {
- n = parseCommaParts(m.body);
- if (n.length === 1) {
- // x{{a,b}}y ==> x{a}y x{b}y
- n = expand(n[0], false).map(embrace);
- if (n.length === 1) {
- var post = m.post.length
- ? expand(m.post, false)
- : [''];
- return post.map(function(p) {
- return m.pre + n[0] + p;
- });
- }
- }
- }
-
- // at this point, n is the parts, and we know it's not a comma set
- // with a single entry.
-
- // no need to expand pre, since it is guaranteed to be free of brace-sets
- var pre = m.pre;
- var post = m.post.length
- ? expand(m.post, false)
- : [''];
-
- var N;
-
- if (isSequence) {
- var x = numeric(n[0]);
- var y = numeric(n[1]);
- var width = Math.max(n[0].length, n[1].length);
- var incr = n.length == 3
- ? Math.abs(numeric(n[2]))
- : 1;
- var test = lte;
- var reverse = y < x;
- if (reverse) {
- incr *= -1;
- test = gte;
- }
- var pad = n.some(isPadded);
-
- N = [];
-
- for (var i = x; test(i, y); i += incr) {
- var c;
- if (isAlphaSequence) {
- c = String.fromCharCode(i);
- if (c === '\\')
- c = '';
- } else {
- c = String(i);
- if (pad) {
- var need = width - c.length;
- if (need > 0) {
- var z = new Array(need + 1).join('0');
- if (i < 0)
- c = '-' + z + c.slice(1);
- else
- c = z + c;
- }
- }
- }
- N.push(c);
- }
- } else {
- N = concatMap(n, function(el) { return expand(el, false) });
- }
-
- for (var j = 0; j < N.length; j++) {
- for (var k = 0; k < post.length; k++) {
- var expansion = pre + N[j] + post[k];
- if (!isTop || isSequence || expansion)
- expansions.push(expansion);
- }
- }
-
- return expansions;
-}
-
-var minimatch_1 = minimatch;
-minimatch.Minimatch = Minimatch;
-
-var path = { sep: '/' };
-try {
- path = path__default['default'];
-} catch (er) {}
-
-var GLOBSTAR = minimatch.GLOBSTAR = Minimatch.GLOBSTAR = {};
-
-
-var plTypes = {
- '!': { open: '(?:(?!(?:', close: '))[^/]*?)'},
- '?': { open: '(?:', close: ')?' },
- '+': { open: '(?:', close: ')+' },
- '*': { open: '(?:', close: ')*' },
- '@': { open: '(?:', close: ')' }
-};
-
-// any single thing other than /
-// don't need to escape / when using new RegExp()
-var qmark = '[^/]';
-
-// * => any number of characters
-var star = qmark + '*?';
-
-// ** when dots are allowed. Anything goes, except .. and .
-// not (^ or / followed by one or two dots followed by $ or /),
-// followed by anything, any number of times.
-var twoStarDot = '(?:(?!(?:\\\/|^)(?:\\.{1,2})($|\\\/)).)*?';
-
-// not a ^ or / followed by a dot,
-// followed by anything, any number of times.
-var twoStarNoDot = '(?:(?!(?:\\\/|^)\\.).)*?';
-
-// characters that need to be escaped in RegExp.
-var reSpecials = charSet('().*{}+?[]^$\\!');
-
-// "abc" -> { a:true, b:true, c:true }
-function charSet (s) {
- return s.split('').reduce(function (set, c) {
- set[c] = true;
- return set
- }, {})
-}
-
-// normalizes slashes.
-var slashSplit = /\/+/;
-
-minimatch.filter = filter;
-function filter (pattern, options) {
- options = options || {};
- return function (p, i, list) {
- return minimatch(p, pattern, options)
- }
-}
-
-function ext (a, b) {
- a = a || {};
- b = b || {};
- var t = {};
- Object.keys(b).forEach(function (k) {
- t[k] = b[k];
- });
- Object.keys(a).forEach(function (k) {
- t[k] = a[k];
- });
- return t
-}
-
-minimatch.defaults = function (def) {
- if (!def || !Object.keys(def).length) return minimatch
-
- var orig = minimatch;
-
- var m = function minimatch (p, pattern, options) {
- return orig.minimatch(p, pattern, ext(def, options))
- };
-
- m.Minimatch = function Minimatch (pattern, options) {
- return new orig.Minimatch(pattern, ext(def, options))
- };
-
- return m
-};
-
-Minimatch.defaults = function (def) {
- if (!def || !Object.keys(def).length) return Minimatch
- return minimatch.defaults(def).Minimatch
-};
-
-function minimatch (p, pattern, options) {
- if (typeof pattern !== 'string') {
- throw new TypeError('glob pattern string required')
- }
-
- if (!options) options = {};
-
- // shortcut: comments match nothing.
- if (!options.nocomment && pattern.charAt(0) === '#') {
- return false
- }
-
- // "" only matches ""
- if (pattern.trim() === '') return p === ''
-
- return new Minimatch(pattern, options).match(p)
-}
-
-function Minimatch (pattern, options) {
- if (!(this instanceof Minimatch)) {
- return new Minimatch(pattern, options)
- }
-
- if (typeof pattern !== 'string') {
- throw new TypeError('glob pattern string required')
- }
-
- if (!options) options = {};
- pattern = pattern.trim();
-
- // windows support: need to use /, not \
- if (path.sep !== '/') {
- pattern = pattern.split(path.sep).join('/');
- }
-
- this.options = options;
- this.set = [];
- this.pattern = pattern;
- this.regexp = null;
- this.negate = false;
- this.comment = false;
- this.empty = false;
-
- // make the set of regexps etc.
- this.make();
-}
-
-Minimatch.prototype.debug = function () {};
-
-Minimatch.prototype.make = make;
-function make () {
- // don't do it more than once.
- if (this._made) return
-
- var pattern = this.pattern;
- var options = this.options;
-
- // empty patterns and comments match nothing.
- if (!options.nocomment && pattern.charAt(0) === '#') {
- this.comment = true;
- return
- }
- if (!pattern) {
- this.empty = true;
- return
- }
-
- // step 1: figure out negation, etc.
- this.parseNegate();
-
- // step 2: expand braces
- var set = this.globSet = this.braceExpand();
-
- if (options.debug) this.debug = console.error;
-
- this.debug(this.pattern, set);
-
- // step 3: now we have a set, so turn each one into a series of path-portion
- // matching patterns.
- // These will be regexps, except in the case of "**", which is
- // set to the GLOBSTAR object for globstar behavior,
- // and will not contain any / characters
- set = this.globParts = set.map(function (s) {
- return s.split(slashSplit)
- });
-
- this.debug(this.pattern, set);
-
- // glob --> regexps
- set = set.map(function (s, si, set) {
- return s.map(this.parse, this)
- }, this);
-
- this.debug(this.pattern, set);
-
- // filter out everything that didn't compile properly.
- set = set.filter(function (s) {
- return s.indexOf(false) === -1
- });
-
- this.debug(this.pattern, set);
-
- this.set = set;
-}
-
-Minimatch.prototype.parseNegate = parseNegate;
-function parseNegate () {
- var pattern = this.pattern;
- var negate = false;
- var options = this.options;
- var negateOffset = 0;
-
- if (options.nonegate) return
-
- for (var i = 0, l = pattern.length
- ; i < l && pattern.charAt(i) === '!'
- ; i++) {
- negate = !negate;
- negateOffset++;
- }
-
- if (negateOffset) this.pattern = pattern.substr(negateOffset);
- this.negate = negate;
-}
-
-// Brace expansion:
-// a{b,c}d -> abd acd
-// a{b,}c -> abc ac
-// a{0..3}d -> a0d a1d a2d a3d
-// a{b,c{d,e}f}g -> abg acdfg acefg
-// a{b,c}d{e,f}g -> abdeg acdeg abdeg abdfg
-//
-// Invalid sets are not expanded.
-// a{2..}b -> a{2..}b
-// a{b}c -> a{b}c
-minimatch.braceExpand = function (pattern, options) {
- return braceExpand(pattern, options)
-};
-
-Minimatch.prototype.braceExpand = braceExpand;
-
-function braceExpand (pattern, options) {
- if (!options) {
- if (this instanceof Minimatch) {
- options = this.options;
- } else {
- options = {};
- }
- }
-
- pattern = typeof pattern === 'undefined'
- ? this.pattern : pattern;
-
- if (typeof pattern === 'undefined') {
- throw new TypeError('undefined pattern')
- }
-
- if (options.nobrace ||
- !pattern.match(/\{.*\}/)) {
- // shortcut. no need to expand.
- return [pattern]
- }
-
- return braceExpansion(pattern)
-}
-
-// parse a component of the expanded set.
-// At this point, no pattern may contain "/" in it
-// so we're going to return a 2d array, where each entry is the full
-// pattern, split on '/', and then turned into a regular expression.
-// A regexp is made at the end which joins each array with an
-// escaped /, and another full one which joins each regexp with |.
-//
-// Following the lead of Bash 4.1, note that "**" only has special meaning
-// when it is the *only* thing in a path portion. Otherwise, any series
-// of * is equivalent to a single *. Globstar behavior is enabled by
-// default, and can be disabled by setting options.noglobstar.
-Minimatch.prototype.parse = parse;
-var SUBPARSE = {};
-function parse (pattern, isSub) {
- if (pattern.length > 1024 * 64) {
- throw new TypeError('pattern is too long')
- }
-
- var options = this.options;
-
- // shortcuts
- if (!options.noglobstar && pattern === '**') return GLOBSTAR
- if (pattern === '') return ''
-
- var re = '';
- var hasMagic = !!options.nocase;
- var escaping = false;
- // ? => one single character
- var patternListStack = [];
- var negativeLists = [];
- var stateChar;
- var inClass = false;
- var reClassStart = -1;
- var classStart = -1;
- // . and .. never match anything that doesn't start with .,
- // even when options.dot is set.
- var patternStart = pattern.charAt(0) === '.' ? '' // anything
- // not (start or / followed by . or .. followed by / or end)
- : options.dot ? '(?!(?:^|\\\/)\\.{1,2}(?:$|\\\/))'
- : '(?!\\.)';
- var self = this;
-
- function clearStateChar () {
- if (stateChar) {
- // we had some state-tracking character
- // that wasn't consumed by this pass.
- switch (stateChar) {
- case '*':
- re += star;
- hasMagic = true;
- break
- case '?':
- re += qmark;
- hasMagic = true;
- break
- default:
- re += '\\' + stateChar;
- break
- }
- self.debug('clearStateChar %j %j', stateChar, re);
- stateChar = false;
- }
- }
-
- for (var i = 0, len = pattern.length, c
- ; (i < len) && (c = pattern.charAt(i))
- ; i++) {
- this.debug('%s\t%s %s %j', pattern, i, re, c);
-
- // skip over any that are escaped.
- if (escaping && reSpecials[c]) {
- re += '\\' + c;
- escaping = false;
- continue
- }
-
- switch (c) {
- case '/':
- // completely not allowed, even escaped.
- // Should already be path-split by now.
- return false
-
- case '\\':
- clearStateChar();
- escaping = true;
- continue
-
- // the various stateChar values
- // for the "extglob" stuff.
- case '?':
- case '*':
- case '+':
- case '@':
- case '!':
- this.debug('%s\t%s %s %j <-- stateChar', pattern, i, re, c);
-
- // all of those are literals inside a class, except that
- // the glob [!a] means [^a] in regexp
- if (inClass) {
- this.debug(' in class');
- if (c === '!' && i === classStart + 1) c = '^';
- re += c;
- continue
- }
-
- // if we already have a stateChar, then it means
- // that there was something like ** or +? in there.
- // Handle the stateChar, then proceed with this one.
- self.debug('call clearStateChar %j', stateChar);
- clearStateChar();
- stateChar = c;
- // if extglob is disabled, then +(asdf|foo) isn't a thing.
- // just clear the statechar *now*, rather than even diving into
- // the patternList stuff.
- if (options.noext) clearStateChar();
- continue
-
- case '(':
- if (inClass) {
- re += '(';
- continue
- }
-
- if (!stateChar) {
- re += '\\(';
- continue
- }
-
- patternListStack.push({
- type: stateChar,
- start: i - 1,
- reStart: re.length,
- open: plTypes[stateChar].open,
- close: plTypes[stateChar].close
- });
- // negation is (?:(?!js)[^/]*)
- re += stateChar === '!' ? '(?:(?!(?:' : '(?:';
- this.debug('plType %j %j', stateChar, re);
- stateChar = false;
- continue
-
- case ')':
- if (inClass || !patternListStack.length) {
- re += '\\)';
- continue
- }
-
- clearStateChar();
- hasMagic = true;
- var pl = patternListStack.pop();
- // negation is (?:(?!js)[^/]*)
- // The others are (?:10 September 2021+BlueWildrose updated:+
keronshb updated:+
zeroisthebiggay updated:+
08 September 2021+keronshb updated:+
07 September 2021+bunny232 updated:+
keronshb updated:+
zeroisthebiggay updated:+
05 September 2021+DeltaFire15 updated:+
04 September 2021+Putnam3145 updated:+
WanderingFox95 updated:+
keronshb updated:+
timothyteakettle updated:+
03 September 2021+timothyteakettle updated:+
01 September 2021+BlueWildrose updated:+
ma44 updated:+
zeroisthebiggay updated:+
28 August 2021+DeltaFire15 updated:+
Putnam3145 updated:+
keronshb updated:+
zeroisthebiggay updated:+
26 August 2021+keronshb updated:+
24 August 2021BlueWildrose updated:
09 July 2021-MrJWhit updated:-
07 July 2021-DeltaFire15 updated:-
05 July 2021-Putnam3145 updated:-
WanderingFox95 updated:-
zeroisthebiggay updated:-
04 July 2021-cadyn updated:-
03 July 2021-DeltaFire15 updated:-
Putnam3145 updated:-
WanderingFox95 updated:-
02 July 2021-silicons updated:-
30 June 2021-WanderingFox95 updated:-
bunny232 updated:-
qweq12yt updated:-
shellspeed1 updated:-
28 June 2021-Putnam3145 updated:-
WanderingFox95 updated:-
25 June 2021-MrJWhit updated:-
brokenOculus updated:-
24 June 2021-WanderingFox95 updated:-
|