Skip to content

Commit 1daecd5

Browse files
authored
Revert "Revert "[TGUI] Asset Cache Update (discordia-space#7093)"" (discordia-space#7422)
* Revert "Revert "[TGUI] Asset Cache Update (discordia-space#7093)" (discordia-space#7421)" This reverts commit 7c1af92. * fix menu * testfix * fix the ahelp incedent * remove testing code
1 parent 9cf5c05 commit 1daecd5

File tree

139 files changed

+8402
-8679
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

139 files changed

+8402
-8679
lines changed

.gitconfig

-8
This file was deleted.

.github/workflows/ci_suite.yml

+40-17
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,20 @@ jobs:
1313
runs-on: ubuntu-20.04
1414
steps:
1515
- uses: actions/checkout@v2
16-
- name: Setup cache
17-
uses: actions/cache@v2
16+
- name: Restore SpacemanDMM cache
17+
uses: actions/cache@v3
1818
with:
19-
path: $HOME/SpacemanDMM
20-
key: ${{ runner.os }}-spacemandmm
19+
path: ~/SpacemanDMM
20+
key: ${{ runner.os }}-spacemandmm-${{ secrets.CACHE_PURGE_KEY }}
21+
# - name: Restore Yarn cache
22+
# uses: actions/cache@v3
23+
# with:
24+
# path: tgui/.yarn/cache
25+
# key: ${{ runner.os }}-yarn-${{ secrets.CACHE_PURGE_KEY }}-${{ hashFiles('tgui/yarn.lock') }}
26+
# restore-keys: |
27+
# ${{ runner.os }}-build-${{ secrets.CACHE_PURGE_KEY }}-
28+
# ${{ runner.os }}-build-
29+
# ${{ runner.os }}-
2130
- name: Install Tools
2231
run: |
2332
pip3 install setuptools
@@ -28,6 +37,7 @@ jobs:
2837
run: |
2938
bash tools/ci/check_filedirs.sh cev_eris.dme
3039
bash tools/ci/check_grep.sh
40+
bash tools/ci/check_misc.sh
3141
tools/bootstrap/python -m dmi.test
3242
tools/bootstrap/python -m mapmerge2.dmm_test
3343
~/dreamchecker > ${GITHUB_WORKSPACE}/output-annotations.txt 2>&1
@@ -43,17 +53,17 @@ jobs:
4353
runs-on: ubuntu-20.04
4454
steps:
4555
- uses: actions/checkout@v2
46-
- name: Setup cache
47-
uses: actions/cache@v2
56+
- name: Restore BYOND cache
57+
uses: actions/cache@v3
4858
with:
49-
path: $HOME/BYOND
50-
key: ${{ runner.os }}-byond
59+
path: ~/BYOND
60+
key: ${{ runner.os }}-byond-${{ secrets.CACHE_PURGE_KEY }}
5161
- name: Compile All Maps
5262
run: |
5363
bash tools/ci/install_byond.sh
5464
source $HOME/BYOND/byond/bin/byondsetup
55-
python3 tools/ci/template_dm_generator.py
56-
tools/build/build dm -DCIBUILDING -DCITESTING -DALL_MAPS
65+
tools/build/build --ci dm -DCIBUILDING -DCITESTING -DALL_MAPS
66+
5767
run_all_tests:
5868
if: "!contains(github.event.head_commit.message, '[ci skip]')"
5969
name: Integration Tests
@@ -68,11 +78,11 @@ jobs:
6878
options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=3
6979
steps:
7080
- uses: actions/checkout@v2
71-
- name: Setup cache
72-
uses: actions/cache@v2
81+
- name: Restore BYOND cache
82+
uses: actions/cache@v3
7383
with:
74-
path: $HOME/BYOND
75-
key: ${{ runner.os }}-byond
84+
path: ~/BYOND
85+
key: ${{ runner.os }}-byond-${{ secrets.CACHE_PURGE_KEY }}
7686
- name: Setup database
7787
run: |
7888
sudo systemctl start mysql
@@ -84,18 +94,31 @@ jobs:
8494
sudo apt update || true
8595
sudo apt install -o APT::Immediate-Configure=false libssl1.1:i386
8696
bash tools/ci/install_rust_g.sh
87-
- name: Compile and run tests
97+
- name: Compile Tests
8898
run: |
8999
bash tools/ci/install_byond.sh
90100
source $HOME/BYOND/byond/bin/byondsetup
91-
tools/build/build -DCIBUILDING
92-
bash tools/ci/run_server.sh
101+
tools/build/build --ci dm -DCIBUILDING -DANSICOLORS
102+
- name: Run Tests
103+
run: |
104+
source $HOME/BYOND/byond/bin/byondsetup
105+
bash tools/ci/run_server.sh ${{ matrix.map }}
106+
93107
test_windows:
94108
if: "!contains(github.event.head_commit.message, '[ci skip]')"
95109
name: Windows Build
96110
runs-on: windows-latest
97111
steps:
98112
- uses: actions/checkout@v2
113+
- name: Restore Yarn cache
114+
uses: actions/cache@v3
115+
with:
116+
path: tgui/.yarn/cache
117+
key: ${{ runner.os }}-yarn-${{ secrets.CACHE_PURGE_KEY }}-${{ hashFiles('tgui/yarn.lock') }}
118+
restore-keys: |
119+
${{ runner.os }}-build-${{ secrets.CACHE_PURGE_KEY }}-
120+
${{ runner.os }}-build-
121+
${{ runner.os }}-
99122
- name: Compile
100123
run: pwsh tools/ci/build.ps1
101124
env:

.github/workflows/conflicts.yml

+1
Original file line numberDiff line numberDiff line change
@@ -11,3 +11,4 @@ jobs:
1111
with:
1212
CONFLICT_LABEL_NAME: 'Merge Conflict'
1313
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
14+
WAIT_MS: 10000

.github/workflows/generate_documentation.yml

+9-3
Original file line numberDiff line numberDiff line change
@@ -3,24 +3,30 @@ on:
33
push:
44
branches:
55
- master
6+
permissions:
7+
contents: read
8+
69
jobs:
710
generate_documentation:
11+
permissions:
12+
contents: write # for JamesIves/github-pages-deploy-action to push changes in repo
813
if: "!contains(github.event.head_commit.message, '[ci skip]')"
914
runs-on: ubuntu-20.04
15+
concurrency: gen-docs
1016
steps:
1117
- uses: actions/checkout@v2
1218
- name: Setup cache
1319
uses: actions/cache@v2
1420
with:
15-
path: $HOME/SpacemanDMM
16-
key: ${{ runner.os }}-spacemandmm
21+
path: ~/SpacemanDMM
22+
key: ${{ runner.os }}-spacemandmm-${{ secrets.CACHE_PURGE_KEY }}
1723
- name: Install SpacemanDMM
1824
run: bash tools/ci/install_spaceman_dmm.sh dmdoc
1925
- name: Generate documentation
2026
run: |
2127
~/dmdoc
2228
touch dmdoc/.nojekyll
23-
echo codedocs.tgstation13.org > dmdoc/CNAME
29+
echo codedocs.cev-eris.net > dmdoc/CNAME
2430
- name: Deploy
2531
uses: JamesIves/[email protected]
2632
with:

.gitignore

+3
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,11 @@
1616

1717
#Ignore compiled files and other files generated during compilation.
1818
*.mdme
19+
*.mdme.*
1920
*.dmb
2021
*.rsc
22+
*.m.dme
23+
*.test.dme
2124
*.lk
2225
*.int
2326
*.backup

BUILD.bat

-2
This file was deleted.

Build.bat

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
@echo off
2+
call "%~dp0\tools\build\build.bat" %*
3+
pause

Build.sh

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
#!/bin/bash
2+
cd "$(dirname "$(readlink -f "$0")")"
3+
cd ./tools/build
4+
sudo bash ./build

SpacemanDMM.toml

+14-5
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,14 @@
1-
[langserver]
2-
dreamchecker = true
3-
4-
[debugger]
5-
engine = "auxtools"
1+
environment = "cev_eris.dme"
2+
3+
[langserver]
4+
dreamchecker = true
5+
6+
[code_standards]
7+
# disallow_relative_type_definitions = true
8+
# disallow_relative_proc_definitions = true
9+
10+
[dmdoc]
11+
use_typepath_names = true
12+
13+
[debugger]
14+
engine = "auxtools"

bin/build.cmd

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
@echo off
2+
call "%~dp0\..\tools\build\build.bat" --wait-on-error build %*

bin/clean.cmd

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
@echo off
2+
call "%~dp0\..\tools\build\build.bat" --wait-on-error clean-all %*

bin/server.cmd

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
@echo off
2+
call "%~dp0\..\tools\build\build.bat" --wait-on-error server %*

bin/test.cmd

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
@echo off
2+
call "%~dp0\..\tools\build\build.bat" --wait-on-error dm-test %*

bin/tgui-bench.cmd

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
@echo off
2+
call "%~dp0\..\tools\build\build.bat" --wait-on-error tgui-bench %*
3+
pause

bin/tgui-build.cmd

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
@echo off
2+
call "%~dp0\..\tools\build\build.bat" --wait-on-error tgui tgui-lint tgui-test %*

bin/tgui-dev.cmd

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
@echo off
2+
call "%~dp0\..\tools\build\build.bat" --wait-on-error tgui-dev %*

bin/tgui-sonar.cmd

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
@echo off
2+
call "%~dp0\..\tools\build\build.bat" --wait-on-error tgui-sonar %*

cev_eris.dme

+22-4
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,7 @@
6262
#include "code\__DEFINES\reagents.dm"
6363
#include "code\__DEFINES\research.dm"
6464
#include "code\__DEFINES\rust_g.dm"
65+
#include "code\__DEFINES\rust_g_overrides.dm"
6566
#include "code\__DEFINES\sanity.dm"
6667
#include "code\__DEFINES\shields.dm"
6768
#include "code\__DEFINES\spaceman_dmm.dm"
@@ -71,6 +72,7 @@
7172
#include "code\__DEFINES\subsystems-priority.dm"
7273
#include "code\__DEFINES\subsystems.dm"
7374
#include "code\__DEFINES\targeting.dm"
75+
#include "code\__DEFINES\tgui.dm"
7476
#include "code\__DEFINES\tick.dm"
7577
#include "code\__DEFINES\time.dm"
7678
#include "code\__DEFINES\tools_and_qualities.dm"
@@ -85,6 +87,7 @@
8587
#include "code\__DEFINES\spawner\frozen_star.dm"
8688
#include "code\__HELPERS\_global_objects.dm"
8789
#include "code\__HELPERS\_lists.dm"
90+
#include "code\__HELPERS\_logging.dm"
8891
#include "code\__HELPERS\antag.dm"
8992
#include "code\__HELPERS\areas.dm"
9093
#include "code\__HELPERS\artwork_names.dm"
@@ -98,7 +101,6 @@
98101
#include "code\__HELPERS\game.dm"
99102
#include "code\__HELPERS\global_lists.dm"
100103
#include "code\__HELPERS\icons.dm"
101-
#include "code\__HELPERS\logging.dm"
102104
#include "code\__HELPERS\manifest.dm"
103105
#include "code\__HELPERS\matrices.dm"
104106
#include "code\__HELPERS\mobs.dm"
@@ -212,6 +214,7 @@
212214
#include "code\controllers\evacuation\~evac.dm"
213215
#include "code\controllers\subsystems\air.dm"
214216
#include "code\controllers\subsystems\alarm.dm"
217+
#include "code\controllers\subsystems\assets.dm"
215218
#include "code\controllers\subsystems\atoms.dm"
216219
#include "code\controllers\subsystems\chat.dm"
217220
#include "code\controllers\subsystems\chemistry.dm"
@@ -1408,6 +1411,11 @@
14081411
#include "code\modules\assembly\signaler.dm"
14091412
#include "code\modules\assembly\timer.dm"
14101413
#include "code\modules\assembly\voice.dm"
1414+
#include "code\modules\asset_cache\asset_cache_client.dm"
1415+
#include "code\modules\asset_cache\asset_cache_item.dm"
1416+
#include "code\modules\asset_cache\asset_list.dm"
1417+
#include "code\modules\asset_cache\asset_list_items.dm"
1418+
#include "code\modules\asset_cache\transports\asset_transport.dm"
14111419
#include "code\modules\biomatter_manipulation\biogenerator.dm"
14121420
#include "code\modules\biomatter_manipulation\solidifier.dm"
14131421
#include "code\modules\biomatter_manipulation\toxic_biomass.dm"
@@ -1425,9 +1433,20 @@
14251433
#include "code\modules\cargo\order.dm"
14261434
#include "code\modules\cargo\packs.dm"
14271435
#include "code\modules\cargo\supplyshuttle.dm"
1428-
#include "code\modules\client\asset_cache.dm"
1429-
#include "code\modules\client\client procs.dm"
1436+
#include "code\modules\cargo\exports\gear.dm"
1437+
#include "code\modules\cargo\exports\large_objects.dm"
1438+
#include "code\modules\cargo\exports\manifest.dm"
1439+
#include "code\modules\cargo\exports\medical_shit.dm"
1440+
#include "code\modules\cargo\exports\misc.dm"
1441+
#include "code\modules\cargo\exports\money.dm"
1442+
#include "code\modules\cargo\exports\parts.dm"
1443+
#include "code\modules\cargo\exports\research.dm"
1444+
#include "code\modules\cargo\exports\rnd_shit.dm"
1445+
#include "code\modules\cargo\exports\sheets.dm"
1446+
#include "code\modules\cargo\exports\tools.dm"
1447+
#include "code\modules\cargo\exports\weapons.dm"
14301448
#include "code\modules\client\client_defines.dm"
1449+
#include "code\modules\client\client_procs.dm"
14311450
#include "code\modules\client\darkmode.dm"
14321451
#include "code\modules\client\preferences.dm"
14331452
#include "code\modules\client\preferences_options.dm"
@@ -1659,7 +1678,6 @@
16591678
#include "code\modules\genetics\stationary_scanner.dm"
16601679
#include "code\modules\genetics\stationary_scanner_console.dm"
16611680
#include "code\modules\ghosttrap\trap.dm"
1662-
#include "code\modules\goonchat\assets.dm"
16631681
#include "code\modules\goonchat\browserOutput.dm"
16641682
#include "code\modules\goonchat\helpers.dm"
16651683
#include "code\modules\hivemind\core.dm"

code/__DEFINES/admin.dm

+21
Original file line numberDiff line numberDiff line change
@@ -46,3 +46,24 @@
4646
#define ADMIN_VV(atom) "(<a href='?_src_=vars;Vars=[REF(atom)]'>VV</a>)"
4747
#define ADMIN_SM(user) "(<a href='?_src_=holder;subtlemessage=[REF(user)]'>SM</a>)"
4848
#define ADMIN_TP(user) "(<a href='?_src_=holder;traitor=[REF(user)]'>TP</a>)"
49+
50+
#define ADMIN_JMP(src) "(<a href='?_src_=holder;adminplayerobservecoodjump=1;X=[src.x];Y=[src.y];Z=[src.z]'>JMP</a>)"
51+
#define COORD(src) "[src ? src.Admin_Coordinates_Readable() : "nonexistent location"]"
52+
53+
/atom/proc/Admin_Coordinates_Readable(area_name, admin_jump_ref)
54+
var/turf/T = Safe_COORD_Location()
55+
return T ? "[area_name ? "[get_area_name_litteral(T, TRUE)] " : " "]([T.x],[T.y],[T.z])[admin_jump_ref ? " [ADMIN_JMP(T)]" : ""]" : "nonexistent location"
56+
57+
/atom/proc/Safe_COORD_Location()
58+
var/atom/A = drop_location()
59+
if(!A)
60+
return //not a valid atom.
61+
var/turf/T = get_step(A, 0) //resolve where the thing is.
62+
if(!T) //incase it's inside a valid drop container, inside another container. ie if a mech picked up a closet and has it inside it's internal storage.
63+
var/atom/last_try = A.loc?.drop_location() //one last try, otherwise fuck it.
64+
if(last_try)
65+
T = get_step(last_try, 0)
66+
return T
67+
68+
/turf/Safe_COORD_Location()
69+
return src

code/__DEFINES/flags.dm

+5
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,8 @@
22
#define NONE 0
33

44
#define FLAGS_EQUALS(flag, flags) ((flag & (flags)) == (flags))
5+
6+
// for /datum/var/datum_flags
7+
#define DF_USE_TAG (1<<0)
8+
#define DF_VAR_EDITED (1<<1)
9+
#define DF_ISPROCESSING (1<<2)

code/__DEFINES/is_helpers.dm

+11
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,17 @@
1+
// simple is_type and similar inline helpers
2+
3+
#define in_range(source, user) (get_dist(source, user) <= 1 && (get_step(source, 0)?:z) == (get_step(user, 0)?:z))
4+
5+
/// Within given range, but not counting z-levels
6+
#define IN_GIVEN_RANGE(source, other, given_range) (get_dist(source, other) <= given_range && (get_step(source, 0)?:z) == (get_step(other, 0)?:z))
7+
8+
#define isatom(A) (isloc(A))
9+
10+
#define isdatum(thing) (istype(thing, /datum))
111

212
#define isweakref(D) (istype(D, /datum/weakref))
313

14+
415
#define islist(A) istype(A, /list)
516

617
#define ismob(A) istype(A, /mob)

code/__DEFINES/misc.dm

+2
Original file line numberDiff line numberDiff line change
@@ -348,6 +348,8 @@
348348

349349
//Prevent the master controller from starting automatically
350350
#define NO_INIT_PARAMETER "no-init"
351+
//Force the log directory to be something specific in the data/logs folder
352+
#define OVERRIDE_LOG_DIRECTORY_PARAMETER "log-directory"
351353

352354
/// Required minimum values to see reagents in a beaker
353355
#define HUMAN_REQ_COG_FOR_REG 35

code/__DEFINES/rust_g_overrides.dm

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
// RUSTG_OVERRIDE_BUILTINS is not used since the file APIs don't work well over Linux.
2+
#define url_encode(text) rustg_url_encode("[text]")
3+
#define url_decode(text) rustg_url_decode("[text]")

0 commit comments

Comments
 (0)