Compare commits
4 Commits
Author | SHA1 | Date | |
---|---|---|---|
782d5e2b93
|
|||
ce4a78454d
|
|||
395bda3972
|
|||
a3473a002d
|
52
.gitea/workflows/release.yaml
Normal file
52
.gitea/workflows/release.yaml
Normal file
@ -0,0 +1,52 @@
|
||||
name: "build-release"
|
||||
run-name: "Build and Release MSVB"
|
||||
on:
|
||||
push:
|
||||
tags:
|
||||
- 'v*'
|
||||
|
||||
jobs:
|
||||
release:
|
||||
runs-on: arch-x86
|
||||
container:
|
||||
image: git.jackbondpreston.me/jack/msvb-build:latest
|
||||
steps:
|
||||
- name: Check out
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
path: MagicStorageVoidBag
|
||||
- run: ls
|
||||
- run: steamcmd "+login anonymous" "+workshop_download_item 1281930 2563309347" "+quit"
|
||||
- run: wget https://github.com/tModLoader/tModLoader/releases/latest/download/tModLoader.zip
|
||||
- run: unzip -q tModLoader.zip -d tModLoader
|
||||
- run: rm tModLoader.zip
|
||||
- run: ln -sf ${{ gitea.workspace }}/tModLoader/Libraries/Native/Linux/libSDL2-2.0.so.0 ${{ gitea.workspace }}/tModLoader/Libraries/Native/Linux/libSDL2.so
|
||||
- run: >
|
||||
echo "<Project ToolsVersion=\"14.0\" xmlns=\"http://schemas.microsoft.com/developer/msbuild/2003\">
|
||||
<Import Project=\"${{ gitea.workspace }}/tModLoader/tMLMod.targets\" />
|
||||
</Project>" > tModLoader.targets
|
||||
- run: |
|
||||
wget https://github.com/steviegt6/fnb/archive/refs/tags/0.1.0.zip
|
||||
unzip -q 0.1.0.zip -d TMLPatcher
|
||||
dotnet build --configuration=Release TMLPatcher/fnb-0.1.0/src/
|
||||
- run: |
|
||||
rm -f ~/.steam/SteamApps/workshop/content/1281930/2563309347/workshop.json
|
||||
YEAR=$(ls ~/.steam/SteamApps/workshop/content/1281930/2563309347/ | cut -c -4 | sort -nr | head -n 1)
|
||||
VER=$(find ~/.steam/SteamApps/workshop/content/1281930/2563309347/ -type d -name "$YEAR.*" -printf "%f\n" | cut -c 6- | sort -nr | head -n 1)
|
||||
cp ~/.steam/SteamApps/workshop/content/1281930/2563309347/$YEAR.$VER/MagicStorage.tmod ./
|
||||
- run: dotnet TMLPatcher/fnb-0.1.0/src/Tomat.FNB/bin/Release/net8.0/fnb.dll tmod extract MagicStorage.tmod
|
||||
- run: cp MagicStorage/MagicStorage.dll ${{ gitea.workspace }}
|
||||
- run: rm -rf MagicStorageVoidBag/.git
|
||||
- run: dotnet build -c Release MagicStorageVoidBag/MagicStorageVoidBag.sln || true
|
||||
- run: cp MagicStorageVoidBag/bin/Release/net8.0/MagicStorageVoidBag.dll .
|
||||
- run: mkdir release
|
||||
- run: cp ~/.local/share/Terraria/tModLoader/Mods/MagicStorageVoidBag.tmod release/
|
||||
- run: cp MagicStorageVoidBag.dll release/
|
||||
- run: ls release
|
||||
- name: Add Gitea Release
|
||||
id: gitea-release
|
||||
uses: https://gitea.com/actions/release-action@main
|
||||
with:
|
||||
files: |-
|
||||
release/**
|
||||
api_key: '${{secrets.RELEASE_TOKEN}}'
|
@ -1,64 +0,0 @@
|
||||
clone:
|
||||
git:
|
||||
image: woodpeckerci/plugin-git:latest
|
||||
settings:
|
||||
path: MagicStorageVoidBag
|
||||
when:
|
||||
event: tag
|
||||
|
||||
pipeline:
|
||||
fetch-deps:
|
||||
image: jackbondpreston/msvb-build-env
|
||||
commands:
|
||||
- steamcmd "+login anonymous" "+workshop_download_item 1281930 2563309347" "+quit"
|
||||
- wget https://github.com/tModLoader/tModLoader/releases/latest/download/tModLoader.zip
|
||||
- unzip -q tModLoader.zip -d tModLoader
|
||||
- rm tModLoader.zip
|
||||
- ln -sf $CI_WORKSPACE/tModLoader/Libraries/Native/Linux/libSDL2-2.0.so.0 $CI_WORKSPACE/tModLoader/Libraries/Native/Linux/libSDL2.so
|
||||
- >
|
||||
echo "<Project ToolsVersion=\"14.0\" xmlns=\"http://schemas.microsoft.com/developer/msbuild/2003\">
|
||||
<Import Project=\"$CI_WORKSPACE/tModLoader/tMLMod.targets\" />
|
||||
</Project>" > tModLoader.targets
|
||||
- |
|
||||
wget https://github.com/steviegt6/tml-patcher/releases/latest/download/TML.Patcher.zip
|
||||
unzip -q TML.Patcher.zip -d TMLPatcher
|
||||
- |
|
||||
rm -f /root/.steam/steamapps/workshop/content/1281930/2563309347/workshop.json
|
||||
YEAR=$(ls /root/.steam/steamapps/workshop/content/1281930/2563309347 | cut -c -4 | sort -nr | head -n 1)
|
||||
VER=$(find /root/.steam/steamapps/workshop/content/1281930/2563309347/ -type d -name "$YEAR.*" -printf "%f\n" | cut -c 6- | sort -nr | head -n 1)
|
||||
cp /root/.steam/steamapps/workshop/content/1281930/2563309347/$YEAR.$VER/MagicStorage.tmod ./
|
||||
- dotnet TMLPatcher/TML.Patcher.dll extract MagicStorage.tmod
|
||||
- cp MagicStorage/MagicStorage.dll $CI_WORKSPACE/
|
||||
when:
|
||||
event: tag
|
||||
|
||||
build:
|
||||
image: jackbondpreston/msvb-build-env
|
||||
commands:
|
||||
- |
|
||||
echo "Shell: $SHELL"
|
||||
echo "CI_WORKSPACE: $CI_WORKSPACE"
|
||||
- cat tModLoader.targets
|
||||
- cd $CI_WORKSPACE
|
||||
- cd MagicStorageVoidBag
|
||||
- rm -rf .git
|
||||
- dotnet build -c Release || true
|
||||
- cp bin/Release/net6.0/MagicStorageVoidBag.dll .
|
||||
- cd $CI_WORKSPACE
|
||||
- mkdir release
|
||||
- cp ~/.local/share/Terraria/tModLoader/Mods/MagicStorageVoidBag.tmod release/
|
||||
- cp MagicStorageVoidBag/MagicStorageVoidBag.dll release/
|
||||
- ls release
|
||||
when:
|
||||
event: tag
|
||||
|
||||
gitea-release:
|
||||
image: plugins/gitea-release
|
||||
settings:
|
||||
api_key:
|
||||
from_secret: gitea-api-key
|
||||
base_url: https://git.jackbondpreston.me
|
||||
files: release/*
|
||||
when:
|
||||
event: tag
|
||||
|
@ -1,4 +1,5 @@
|
||||
using MagicStorage;
|
||||
using MagicStorage.Common.Systems;
|
||||
using MagicStorage.Components;
|
||||
using MagicStorageVoidBag.Items;
|
||||
using System.Linq;
|
||||
@ -33,7 +34,7 @@ namespace MagicStorageVoidBag.Hooks {
|
||||
|
||||
heart.TryDeposit(returnItem);
|
||||
heart.ResetCompactStage();
|
||||
StorageGUI.SetRefresh();
|
||||
MagicUI.SetRefresh();
|
||||
|
||||
if (returnItem.stack != newItem.stack) {
|
||||
if (newItem.IsACoin) {
|
||||
|
@ -14,4 +14,4 @@ Mods: {
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1,14 +1,11 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
<!-- Import tModLoader mod properties -->
|
||||
<Import Project="../tModLoader.targets" />
|
||||
<PropertyGroup>
|
||||
<AssemblyName>MagicStorageVoidBag</AssemblyName>
|
||||
<TargetFramework>net6.0</TargetFramework>
|
||||
<PlatformTarget>AnyCPU</PlatformTarget>
|
||||
<LangVersion>latest</LangVersion>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<PackageReference Include="tModLoader.CodeAssist" Version="0.1.*" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="MagicStorage">
|
||||
|
@ -1,6 +1,6 @@
|
||||
displayName = MagicStorage Void Bag
|
||||
author = jack
|
||||
version = 1.7
|
||||
version = 1.8
|
||||
modReferences = MagicStorage
|
||||
sortAfter = MagicStorage
|
||||
includeSource = true
|
||||
|
@ -1,7 +1,7 @@
|
||||
Adds an upgraded void bag that combines functionality of the Void Bag and Portable Remote Storage Access, by putting items into a magic storage system when your inventory is full (and allowing remote access as usual).
|
||||
This item is crafted by combining a Void Bag with a Portable Remote Storage Access. To link it with your storage system, right click the Storage Heart with the bag equipped.
|
||||
|
||||
GitHub: https://github.com/jackbondpreston/MagicStorageVoidBag
|
||||
Git: https://git.jackbondpreston.me/jack/MagicStorageVoidBag
|
||||
Discord server if you need support/don't want to report bugs on GitHub: https://discord.gg/Z6V77mbtZQ
|
||||
|
||||
Thanks to the original MagicStorage mod for some code and of course the functionality of the original mod!
|
Reference in New Issue
Block a user