Skip to content

Commit

Permalink
updated - Terraria TShock mod
Browse files Browse the repository at this point in the history
  • Loading branch information
Robomikel committed May 3, 2023
1 parent cf1c63d commit 309e1fb
Show file tree
Hide file tree
Showing 4 changed files with 128 additions and 13 deletions.
10 changes: 8 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Steam Server Manager
![last commit](https://img.shields.io/github/last-commit/robomikel/steam-server-manager?color=blue&style=plastic) ![commit activity](https://img.shields.io/github/commit-activity/w/Robomikel/steam-server-manager?style=plastic) ![commits since](https://img.shields.io/github/commits-since/robomikel/steam-server-manager/1.9.2/master?style=plastic)
![last commit](https://img.shields.io/github/last-commit/robomikel/steam-server-manager?color=blue&style=plastic) ![commit activity](https://img.shields.io/github/commit-activity/y/Robomikel/steam-server-manager?style=plastic) ![commits since](https://img.shields.io/github/commits-since/robomikel/steam-server-manager/1.9.2/master?style=plastic)

![Details Command](https://github.com/Robomikel/Steam-Server-Manager/blob/master/Steamer%20-%20Details.gif)

Expand Down Expand Up @@ -236,7 +236,9 @@ Install miscreated server ```./ssm install misserver```
* Rust - Plugin Updater
* CSGO - Get5, Pug-setup, and Steamworks
* BlackMesa - Source Coop

* Asseto Corsa - AssetoServer
* Terraria - TShock

# Steam Workshop install
* advanced configuration in *_default.ps1 (see Space Engineers for example)

Expand Down Expand Up @@ -312,3 +314,7 @@ https://github.com/Badgerati/Pode
https://github.com/discordjs/discord.js/
# SourceCoop
https://github.com/ampreeT/SourceCoop
# AssetoServer
https://github.com/compujuckel/AssettoServer
# TShock
https://github.com/Pryaxis/TShock
9 changes: 9 additions & 0 deletions functions/command_modinstall.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,9 @@ Function Get-Modinstall {
ElseIf ($appid -eq 302550){
Show-ModMenu
}
ElseIf ($appid -eq 105600){
Show-ModMenu
}
Else {
Get-Infomessage "No Mods Available " 'info'
Write-log "info: No Mods Available"
Expand Down Expand Up @@ -69,6 +72,9 @@ Function Show-ModMenu {
ElseIf ($appid -eq 302550){
$command = Menu @('AssettoServer')
}
ElseIf ($appid -eq 105600){
$command = Menu @('TShock')
}
Set-Console
If ($command -eq 'SourceMod') {
# Get-SourceMetaMod
Expand Down Expand Up @@ -110,6 +116,9 @@ Function Show-ModMenu {
ElseIf ($command -eq 'AssettoServer') {
Get-AssettoServer
}
ElseIf ($command -eq 'TShock') {
Get-TShock
}
}

Function Get-UpdateMods {
Expand Down
117 changes: 106 additions & 11 deletions functions/install_sourcemod_metamod.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ Function Get-MetaMod {
}
ElseIf ($?) {
clear-hostline 1
Get-Infomessage "Downloaded" 'MetaMod'
Get-Infomessage "Downloaded" 'MetaMod' 'done'
}
clear-hostline 1
Get-Infomessage "downloadtime"
Expand All @@ -54,6 +54,10 @@ Function Get-MetaMod {
Get-WarnMessage 'ExtractFailed' 'MetaMod'
New-TryagainNew
}
ElseIf ($?) {
clear-hostline 1
Get-Infomessage "Extracted" 'MetaMod' 'done'
}
Write-log "info: Copying/installing Meta Mod"
If ($metamodmversionfolder -and $systemdir) {
$metamodfolder = @{
Expand All @@ -69,6 +73,10 @@ Function Get-MetaMod {
Write-log "Failed: Copying Meta Mod "
New-TryagainNew
}
ElseIf ($?) {
clear-hostline 1
Get-Infomessage "Copied" 'MetaMod' 'done'
}
Edit-Modlist 'MetaMod' $metamodmversionzip
}
}
Expand Down Expand Up @@ -105,7 +113,7 @@ Function Get-SourceMod {
}
ElseIf ($?) {
clear-hostline 1
Get-Infomessage "Downloaded" 'SourceMod'
Get-Infomessage "Downloaded" 'SourceMod' 'done'
}
clear-hostline 1
Get-Infomessage "downloadtime"
Expand All @@ -123,7 +131,7 @@ Function Get-SourceMod {
}
ElseIf ($?) {
clear-hostline 1
Get-Infomessage "Extracted" 'SourceMod'
Get-Infomessage "Extracted" 'SourceMod' 'done'
}
clear-hostline 1
Get-Infomessage "copying-installing" 'SourceMod'
Expand All @@ -149,6 +157,10 @@ Function Get-SourceMod {
Write-log "Failed: Copying SourceMod "
New-TryagainNew
}
ElseIf ($?) {
clear-hostline 1
Get-Infomessage "Copied" 'SourceMod' 'done'
}
Edit-Modlist 'Sourcemod' $sourcemodmversionzip
}
}
Expand Down Expand Up @@ -184,7 +196,7 @@ Function Get-CSGOGet5 {
}
ElseIf ($?) {
clear-hostline 1
Get-Infomessage "Downloaded" 'CSGO-Get5'
Get-Infomessage "Downloaded" 'CSGO-Get5' 'done'
}
clear-hostline 1
Get-Infomessage "downloadtime"
Expand All @@ -201,7 +213,7 @@ Function Get-CSGOGet5 {
}
ElseIf ($?) {
clear-hostline 1
Get-Infomessage "Extracted" 'CSGO-Get5'
Get-Infomessage "Extracted" 'CSGO-Get5' 'done'
}
clear-hostline 1
Get-Infomessage "copying-installing" 'CSGO-Get5'
Expand All @@ -225,6 +237,10 @@ Function Get-CSGOGet5 {
Write-log "Failed: Copying CSGO-Get5 "
New-TryagainNew
}
ElseIf ($?) {
clear-hostline 1
Get-Infomessage "Copied" 'CSGO-Get5' 'done'
}
Edit-Modlist 'CSGO-Get5' $get5latestzip
}
Function Get-CSGOcsgopugsetup {
Expand Down Expand Up @@ -254,7 +270,7 @@ Function Get-CSGOcsgopugsetup {
}
ElseIf ($?) {
clear-hostline 1
Get-Infomessage "Downloaded" 'CSGO-pugsetup'
Get-Infomessage "Downloaded" 'CSGO-pugsetup' 'done'
}
clear-hostline 1
Get-Infomessage "downloadtime"
Expand All @@ -271,7 +287,7 @@ Function Get-CSGOcsgopugsetup {
}
ElseIf ($?) {
clear-hostline 1
Get-Infomessage "Extracted" 'CSGO-pugsetup'
Get-Infomessage "Extracted" 'CSGO-pugsetup' 'done'
}
clear-hostline 1
Get-Infomessage "copying-installing" 'CSGO-pugsetup'
Expand All @@ -295,6 +311,10 @@ Function Get-CSGOcsgopugsetup {
Write-log "Failed: Copying CSGOcsgopugsetup "
New-TryagainNew
}
ElseIf ($?) {
clear-hostline 1
Get-Infomessage "Copied" 'CSGO-pugsetup' 'done'
}
Edit-Modlist 'CSGO-pugsetup' $githubrepozipname
}
}
Expand Down Expand Up @@ -327,7 +347,7 @@ Function Get-CSGOsteamworks {
}
ElseIf ($?) {
clear-hostline 1
Get-Infomessage "Downloaded" 'SteamWorks'
Get-Infomessage "Downloaded" 'SteamWorks' 'done'
}
clear-hostline 1
Get-Infomessage "downloadtime"
Expand All @@ -344,7 +364,7 @@ Function Get-CSGOsteamworks {
}
ElseIf ($?) {
clear-hostline 1
Get-Infomessage "Extracted" 'SteamWorks'
Get-Infomessage "Extracted" 'SteamWorks' 'done'
}
clear-hostline 1
Get-Infomessage "copying-installing" 'SteamWorks'
Expand All @@ -360,6 +380,10 @@ Function Get-CSGOsteamworks {
Write-log "Failed: Copying SteamWorks "
New-TryagainNew
}
ElseIf ($?) {
clear-hostline 1
Get-Infomessage "Copied" 'SteamWorks' 'done'
}
Edit-Modlist 'SteamWorks' $steamworkslatestzip
}
Function Get-AssettoServer {
Expand Down Expand Up @@ -389,7 +413,7 @@ Function Get-AssettoServer {
}
ElseIf ($?) {
clear-hostline 1
Get-Infomessage "Downloaded" 'AssettoServer'
Get-Infomessage "Downloaded" 'AssettoServer' 'done'
}
clear-hostline 1
Get-Infomessage "downloadtime"
Expand All @@ -406,7 +430,7 @@ Function Get-AssettoServer {
}
ElseIf ($?) {
clear-hostline 1
Get-Infomessage "Extracted" 'AssettoServer'
Get-Infomessage "Extracted" 'AssettoServer' 'done'
}
clear-hostline 1
Get-Infomessage "copying-installing" 'AssettoServer'
Expand All @@ -422,6 +446,77 @@ Function Get-AssettoServer {
Write-log "Failed: Copying AssettoServer "
New-TryagainNew
}
ElseIf ($?) {
clear-hostline 1
Get-Infomessage "Copied" 'AssettoServer' 'done'
}
Edit-Modlist 'AssettoServer' $githubrepozipname
}
}
Function Get-TShock {
Write-log "Function: $($MyInvocation.Mycommand)"
If ( $systemdir) {
# iwr $csgopugsetupurl -O $githubrepozipname
if ($TShockowner -and $TShocksetuprepo) {
Get-GithubRestAPI $TShockowner $TShocksetuprepo
}
}
If ($command -eq 'update-mods') {
Compare-Modlist 'TShock' $githubrepozipname
}
If ($nomodupdate -eq $true) {
clear-hostline 1
Get-Infomessage "No TShock updates" 'info'
return
}
Else {
$start_time = Get-Date
clear-hostline 1
Get-Infomessage "Downloading" 'TShock'
iwr $githubrepoziplink -O $currentdir\$githubrepozipname
If (!$?) {
Get-WarnMessage 'Downloadfailed' 'TShock'
New-TryagainNew
}
ElseIf ($?) {
clear-hostline 1
Get-Infomessage "Downloaded" 'TShock' 'done'
}
clear-hostline 1
Get-Infomessage "downloadtime"
$TShockfolder = $currentdir, $githubrepozipname.Replace('.zip', '') -join '\'
$TShockZip = @{
Path = "$currentdir\$githubrepozipname"
DestinationPath = "$TShockfolder"
Force = $true
}
Expand-Archive @TShockzip
If (!$?) {
Get-WarnMessage 'ExtractFailed' 'TShock'
New-TryagainNew
}
ElseIf ($?) {
clear-hostline 1
Get-Infomessage "Extracted" 'TShock' 'done'
}
clear-hostline 1
Get-Infomessage "copying-installing" 'TShock'
$TShockfolder = @{
Path = "$TShockfolder\*"
Destination = "$systemdir"
Force = $true
Recurse = $true
}
Write-Log "info: Copy $TShockfolder $systemdir"
Copy-Item @TShockfolder >$null 2>&1
If (!$?) {
Write-log "Failed: Copying TShock "
New-TryagainNew
}
ElseIf ($?) {
clear-hostline 1
Get-Infomessage "Copied" 'TShock' 'done'
}
Edit-Modlist 'TShock' $githubrepozipname
}
}
5 changes: 5 additions & 0 deletions ssm.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,11 @@ $AssettoServerowner = 'compujuckel'
$AssettoServersetuprepo = 'AssettoServer'
$AssettoServerdirectory = "$currentdir\AssettoServer"

# TShock
$TShockowner = 'Pryaxis'
$TShocksetuprepo = 'TShock'
$TShockdirectory = "$currentdir\TShock"

$RANDOMPASSWORD = -join ((65..90) + (97..122) + (48..57) | Get-Random -Count 14 | ForEach-Object { [char]$_ })

$SMILEY_WHITE = ([char]9786)
Expand Down

0 comments on commit 309e1fb

Please sign in to comment.