diff --git a/.github/workflows/ci_suite.yml b/.github/workflows/ci_suite.yml index dc93324bff..454a3bc43b 100644 --- a/.github/workflows/ci_suite.yml +++ b/.github/workflows/ci_suite.yml @@ -8,18 +8,18 @@ on: - master jobs: run_linters: - if: "!contains(github.event.head_commit.message, '[ci skip]')" + if: ( !contains(github.event.head_commit.message, '[ci skip]') ) name: Run Linters - runs-on: ubuntu-20.04 + runs-on: ubuntu-22.04 steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 - name: Restore SpacemanDMM cache - uses: actions/cache@v2 + uses: actions/cache@v4 with: path: ~/SpacemanDMM key: ${{ runner.os }}-spacemandmm-${{ secrets.CACHE_PURGE_KEY }} - name: Restore Yarn cache - uses: actions/cache@v2 + uses: actions/cache@v4 with: path: tgui/.yarn/cache key: ${{ runner.os }}-yarn-${{ secrets.CACHE_PURGE_KEY }}-${{ hashFiles('tgui/yarn.lock') }} @@ -29,7 +29,7 @@ jobs: ${{ runner.os }}- - name: Install Tools run: | - pip3 install setuptools + pip3 install setuptools --upgrade bash tools/ci/install_node.sh bash tools/ci/install_spaceman_dmm.sh dreamchecker tools/bootstrap/python -c '' @@ -51,13 +51,13 @@ jobs: outputFile: output-annotations.txt compile_all_maps: - if: "!contains(github.event.head_commit.message, '[ci skip]')" + if: ( !contains(github.event.head_commit.message, '[ci skip]') ) name: Compile Maps - runs-on: ubuntu-20.04 + runs-on: ubuntu-22.04 steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 - name: Restore BYOND cache - uses: actions/cache@v2 + uses: actions/cache@v4 with: path: ~/BYOND key: ${{ runner.os }}-byond-${{ secrets.CACHE_PURGE_KEY }} @@ -66,11 +66,10 @@ jobs: bash tools/ci/install_byond.sh source $HOME/BYOND/byond/bin/byondsetup tools/build/build --ci dm -DCIBUILDING -DCITESTING -DALL_MAPS - run_all_tests: - if: "!contains(github.event.head_commit.message, '[ci skip]')" + if: ( !contains(github.event.head_commit.message, '[ci skip]') ) name: Integration Tests - runs-on: ubuntu-20.04 + runs-on: ubuntu-22.04 services: mysql: image: mysql:latest @@ -80,14 +79,14 @@ jobs: - 3306 options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=3 steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 - name: Restore BYOND cache - uses: actions/cache@v2 + uses: actions/cache@v4 with: path: ~/BYOND key: ${{ runner.os }}-byond-${{ secrets.CACHE_PURGE_KEY }} - name: Restore Yarn cache - uses: actions/cache@v2 + uses: actions/cache@v4 with: path: tgui/.yarn/cache key: ${{ runner.os }}-yarn-${{ secrets.CACHE_PURGE_KEY }}-${{ hashFiles('tgui/yarn.lock') }} @@ -104,9 +103,6 @@ jobs: mysql -u root -proot tg_ci_prefixed < SQL/tgstation_schema_prefixed.sql - name: Install rust-g run: | - sudo dpkg --add-architecture i386 - sudo apt update || true - sudo apt install -o APT::Immediate-Configure=false libssl1.1:i386 bash tools/ci/install_rust_g.sh - name: Install auxmos run: | @@ -118,15 +114,14 @@ jobs: source $HOME/BYOND/byond/bin/byondsetup tools/build/build --ci -DCIBUILDING bash tools/ci/run_server.sh - test_windows: - if: "!contains(github.event.head_commit.message, '[ci skip]')" + if: ( !contains(github.event.head_commit.message, '[ci skip]') ) name: Windows Build runs-on: windows-latest steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 - name: Restore Yarn cache - uses: actions/cache@v2 + uses: actions/cache@v4 with: path: tgui/.yarn/cache key: ${{ runner.os }}-yarn-${{ secrets.CACHE_PURGE_KEY }}-${{ hashFiles('tgui/yarn.lock') }} @@ -143,7 +138,7 @@ jobs: md deploy bash tools/deploy.sh ./deploy - name: Deploy artifact - uses: actions/upload-artifact@v2 + uses: actions/upload-artifact@v4 with: name: deploy path: deploy diff --git a/.github/workflows/generate_documentation.yml b/.github/workflows/generate_documentation.yml index 33314a6f82..13824bb3a8 100644 --- a/.github/workflows/generate_documentation.yml +++ b/.github/workflows/generate_documentation.yml @@ -8,9 +8,9 @@ jobs: if: "!contains(github.event.head_commit.message, '[ci skip]')" runs-on: ubuntu-20.04 steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 - name: Setup cache - uses: actions/cache@v2 + uses: actions/cache@v4 with: path: ~/SpacemanDMM key: ${{ runner.os }}-spacemandmm-${{ secrets.CACHE_PURGE_KEY }} diff --git a/.github/workflows/update_tgs_dmapi.yml b/.github/workflows/update_tgs_dmapi.yml index 51e569293e..609ffc9cc3 100644 --- a/.github/workflows/update_tgs_dmapi.yml +++ b/.github/workflows/update_tgs_dmapi.yml @@ -11,7 +11,7 @@ jobs: name: Update the TGS DMAPI steps: - name: Clone - uses: actions/checkout@v2 + uses: actions/checkout@v4 - name: Branch run: | diff --git a/code/controllers/configuration/entries/general.dm b/code/controllers/configuration/entries/general.dm index f7c864a89f..64be4216ff 100644 --- a/code/controllers/configuration/entries/general.dm +++ b/code/controllers/configuration/entries/general.dm @@ -347,3 +347,5 @@ /datum/config_entry/str_list/randomizing_station_name_message default = list() + +/datum/config_entry/flag/toast_notification_on_init diff --git a/code/controllers/master.dm b/code/controllers/master.dm index de94b27e77..b6fb14a695 100644 --- a/code/controllers/master.dm +++ b/code/controllers/master.dm @@ -223,6 +223,10 @@ GLOBAL_REAL(Master, /datum/controller/master) = new // Sort subsystems by display setting for easy access. sortTim(subsystems, GLOBAL_PROC_REF(cmp_subsystem_display)) + + if(world.system_type == MS_WINDOWS && CONFIG_GET(flag/toast_notification_on_init) && !length(GLOB.clients)) + world.shelleo("start /min powershell -ExecutionPolicy Bypass -File tools/initToast/initToast.ps1 -name \"[world.name]\" -icon %CD%\\icons\\ui_icons\\common\\tg_16.png -port [world.port]") + // Set world options. world.change_fps(CONFIG_GET(number/fps)) var/initialized_tod = REALTIMEOFDAY diff --git a/code/game/objects/items/RCD.dm b/code/game/objects/items/RCD.dm index 61641e1d49..868adf97f2 100644 --- a/code/game/objects/items/RCD.dm +++ b/code/game/objects/items/RCD.dm @@ -668,6 +668,7 @@ RLD icon_state = "arcd" item_state = "oldrcd" has_ammobar = FALSE + upgrade = TRUE // RAPID LIGHTING DEVICE diff --git a/code/modules/NTNet/network.dm b/code/modules/NTNet/network.dm index 2a2820d289..2eba9768ae 100644 --- a/code/modules/NTNet/network.dm +++ b/code/modules/NTNet/network.dm @@ -103,7 +103,7 @@ data.network_id = src log_data_transfer(data) var/list/datum/component/ntnet_interface/receiving = list() - if((length(data.recipient_ids == 1) && data.recipient_ids[1] == NETWORK_BROADCAST_ID) || data.recipient_ids == NETWORK_BROADCAST_ID) + if((length(data.recipient_ids) == 1 && data.recipient_ids[1] == NETWORK_BROADCAST_ID) || data.recipient_ids == NETWORK_BROADCAST_ID) data.broadcast = TRUE for(var/i in connected_interfaces_by_id) receiving |= connected_interfaces_by_id[i] diff --git a/config/entries/general.txt b/config/entries/general.txt index 92401b774c..42fb1627a4 100644 --- a/config/entries/general.txt +++ b/config/entries/general.txt @@ -515,3 +515,7 @@ RANDOMIZING_STATION_NAME_MESSAGE %NEW_STATION_NAME%? %NEW_STATION_NAME%! %NEW_ST RANDOMIZING_STATION_NAME_MESSAGE A popular social network application had already claimed the trademark of %CURRENT_STATION_NAME%, the station has been renamed to %NEW_STATION_NAME%. RANDOMIZING_STATION_NAME_MESSAGE We're pulling a prank on %RANDOM_CREWMEMBER%, so we've changed the station's name to %NEW_STATION_NAME%. RANDOMIZING_STATION_NAME_MESSAGE %RANDOM_NAME% made us change the station name, which is now %NEW_STATION_NAME%. + +## Comment to disable sending a toast notification on the host server when initializations complete. +## Even if this is enabled, a notification will only be sent if there are no clients connected. +TOAST_NOTIFICATION_ON_INIT diff --git a/dependencies.sh b/dependencies.sh index a9f562ade7..c172f033ff 100644 --- a/dependencies.sh +++ b/dependencies.sh @@ -8,17 +8,18 @@ export BYOND_MAJOR=515 export BYOND_MINOR=1634 #rust_g git tag -export RUST_G_VERSION=0.4.10 +export RUST_G_VERSION=3.3.0 #node version -export NODE_VERSION=16 -export NODE_VERSION_PRECISE=16.13.1 +export NODE_VERSION_LTS=20.13.0 +# compatiblility mode MUST work with windows 7 +export NODE_VERSION_COMPAT=20.2.0 # SpacemanDMM git tag -export SPACEMAN_DMM_VERSION=suite-1.8 +export SPACEMAN_DMM_VERSION=suite-1.9 # Python version for mapmerge and other tools -export PYTHON_VERSION=3.7.9 +export PYTHON_VERSION=3.9.0 # Auxmos git tag export AUXMOS_VERSION=v2.5.1 diff --git a/icons/ui_icons/common/tg_16.png b/icons/ui_icons/common/tg_16.png new file mode 100644 index 0000000000..2b08bdd29c Binary files /dev/null and b/icons/ui_icons/common/tg_16.png differ diff --git a/tools/bootstrap/node_.ps1 b/tools/bootstrap/node_.ps1 index ac8d3b343f..53dd65ae60 100644 --- a/tools/bootstrap/node_.ps1 +++ b/tools/bootstrap/node_.ps1 @@ -29,7 +29,16 @@ $Cache = "$BaseDir\.cache" if ($Env:TG_BOOTSTRAP_CACHE) { $Cache = $Env:TG_BOOTSTRAP_CACHE } -$NodeVersion = Extract-Variable -Path "$BaseDir\..\..\dependencies.sh" -Key "NODE_VERSION_PRECISE" +# Get OS version +$OSMajor = (Get-WmiObject -Class Win32_OperatingSystem).Version.Split(".")[0] +# Set Node version based on OS version +if ($OSMajor -lt 10) { + # Anything under Windows 10 + $NodeVersion = Extract-Variable -Path "$BaseDir\..\..\dependencies.sh" -Key "NODE_VERSION_COMPAT" +} +else { + $NodeVersion = Extract-Variable -Path "$BaseDir\..\..\dependencies.sh" -Key "NODE_VERSION_LTS" +} $NodeSource = "https://nodejs.org/download/release/v$NodeVersion/win-x64/node.exe" $NodeTargetDir = "$Cache\node-v$NodeVersion-x64" $NodeTarget = "$NodeTargetDir\node.exe" diff --git a/tools/ci/install_node.sh b/tools/ci/install_node.sh index c21b8f0110..906984ed3f 100755 --- a/tools/ci/install_node.sh +++ b/tools/ci/install_node.sh @@ -5,6 +5,6 @@ source dependencies.sh if [[ -e ~/.nvm/nvm.sh ]]; then source ~/.nvm/nvm.sh - nvm install $NODE_VERSION - nvm use $NODE_VERSION + nvm install $NODE_VERSION_COMPAT + nvm use $NODE_VERSION_COMPAT fi diff --git a/tools/initToast/initToast.ps1 b/tools/initToast/initToast.ps1 new file mode 100644 index 0000000000..9b7714f3a2 --- /dev/null +++ b/tools/initToast/initToast.ps1 @@ -0,0 +1,32 @@ +param([string]$name, [string]$icon, [Int32]$port=80) + +$hkcu = [Microsoft.Win32.RegistryKey]::OpenBaseKey('CurrentUser','default') + +$amuid_hkey = $hkcu.CreateSubKey('SOFTWARE\Classes\AppUserModelId\Tgstation.Tgstation', $true, [Microsoft.Win32.RegistryOptions]::Volatile) + +if ($name) { $amuid_hkey.SetValue('DisplayName', $name) } +if ($icon) { $amuid_hkey.SetValue('IconUri', $icon) } + +[Windows.UI.Notifications.ToastNotificationManager, Windows.UI.Notifications, ContentType = WindowsRuntime] > $null +$notifier = [Windows.UI.Notifications.ToastNotificationManager]::CreateToastNotifier('Tgstation.Tgstation') + +[Windows.Data.Xml.Dom.XmlDocument, Windows.Data.Xml.Dom, ContentType = WindowsRuntime] > $null +$xml = New-Object Windows.Data.Xml.Dom.XmlDocument + +$xml.LoadXml(@" + + + + Initialization Complete + + + + + + +"@) + +[Windows.UI.Notifications.ToastNotification, Windows.UI.Notifications, ContentType = WindowsRuntime] > $null +$toast = New-Object Windows.UI.Notifications.ToastNotification $xml + +$notifier.Show($toast) diff --git a/tools/requirements.txt b/tools/requirements.txt index a513681fd3..e64c8d7b46 100644 --- a/tools/requirements.txt +++ b/tools/requirements.txt @@ -1,7 +1,7 @@ -pygit2==1.0.1 -bidict==0.13.1 -Pillow==9.5.0 +pygit2==1.11.1 +bidict==0.22.1 +Pillow==10.3.0 # changelogs -PyYaml==5.4 +PyYaml==6.0.1 beautifulsoup4==4.9.3