3 Commits

5 changed files with 69 additions and 71 deletions

View File

@ -1,64 +1,64 @@
clone: clone:
git: git:
image: woodpeckerci/plugin-git:latest image: woodpeckerci/plugin-git:latest
settings: settings:
path: MagicStorageVoidBag path: MagicStorageVoidBag
when: when:
event: tag event: tag
pipeline: pipeline:
fetch-deps: fetch-deps:
image: jackbondpreston/msvb-build-env image: jackbondpreston/msvb-build-env
commands: commands:
- steamcmd "+login anonymous" "+workshop_download_item 1281930 2563309347" "+quit" - steamcmd "+login anonymous" "+workshop_download_item 1281930 2563309347" "+quit"
- wget https://github.com/tModLoader/tModLoader/releases/latest/download/tModLoader.zip - wget https://github.com/tModLoader/tModLoader/releases/latest/download/tModLoader.zip
- unzip -q tModLoader.zip -d tModLoader - unzip -q tModLoader.zip -d tModLoader
- rm tModLoader.zip - rm tModLoader.zip
- ln -sf $CI_WORKSPACE/tModLoader/Libraries/Native/Linux/libSDL2-2.0.so.0 $CI_WORKSPACE/tModLoader/Libraries/Native/Linux/libSDL2.so - 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\"> echo "<Project ToolsVersion=\"14.0\" xmlns=\"http://schemas.microsoft.com/developer/msbuild/2003\">
<Import Project=\"$CI_WORKSPACE/tModLoader/tMLMod.targets\" /> <Import Project=\"$CI_WORKSPACE/tModLoader/tMLMod.targets\" />
</Project>" > tModLoader.targets </Project>" > tModLoader.targets
- | - |
wget https://github.com/steviegt6/tml-patcher/releases/latest/download/TML.Patcher.zip wget https://github.com/steviegt6/tml-patcher/releases/latest/download/TML.Patcher.zip
unzip -q TML.Patcher.zip -d TMLPatcher unzip -q TML.Patcher.zip -d TMLPatcher
- | - |
rm -f /root/.steam/SteamApps/workshop/content/1281930/2563309347/workshop.json 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) 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) 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 ./ cp /root/.steam/SteamApps/workshop/content/1281930/2563309347/$YEAR.$VER/MagicStorage.tmod ./
- dotnet TMLPatcher/TML.Patcher.dll extract MagicStorage.tmod - dotnet TMLPatcher/TML.Patcher.dll extract MagicStorage.tmod
- cp MagicStorage/MagicStorage.dll $CI_WORKSPACE/ - cp MagicStorage/MagicStorage.dll $CI_WORKSPACE/
when: when:
event: tag event: tag
build: build:
image: jackbondpreston/msvb-build-env image: jackbondpreston/msvb-build-env
commands: commands:
- | - |
echo "Shell: $SHELL" echo "Shell: $SHELL"
echo "CI_WORKSPACE: $CI_WORKSPACE" echo "CI_WORKSPACE: $CI_WORKSPACE"
- cat tModLoader.targets - cat tModLoader.targets
- cd $CI_WORKSPACE - cd $CI_WORKSPACE
- cd MagicStorageVoidBag - cd MagicStorageVoidBag
- rm -rf .git - rm -rf .git
- dotnet build -c Release || true - dotnet build -c Release || true
- cp bin/Release/net6.0/MagicStorageVoidBag.dll . - cp bin/Release/net6.0/MagicStorageVoidBag.dll .
- cd $CI_WORKSPACE - cd $CI_WORKSPACE
- mkdir release - mkdir release
- cp ~/.local/share/Terraria/tModLoader/Mods/MagicStorageVoidBag.tmod release/ - cp ~/.local/share/Terraria/tModLoader/Mods/MagicStorageVoidBag.tmod release/
- cp MagicStorageVoidBag/MagicStorageVoidBag.dll release/ - cp MagicStorageVoidBag/MagicStorageVoidBag.dll release/
- ls release - ls release
when: when:
event: tag event: tag
gitea-release: gitea-release:
image: plugins/gitea-release image: plugins/gitea-release
settings: settings:
api_key: api_key:
from_secret: gitea-api-key from_secret: gitea-api-key
base_url: https://git.jackbondpreston.me base_url: https://git.jackbondpreston.me
files: release/* files: release/*
when: when:
event: tag event: tag

View File

@ -1,4 +1,5 @@
using MagicStorage; using MagicStorage;
using MagicStorage.Common.Systems;
using MagicStorage.Components; using MagicStorage.Components;
using MagicStorageVoidBag.Items; using MagicStorageVoidBag.Items;
using System.Linq; using System.Linq;
@ -33,7 +34,7 @@ namespace MagicStorageVoidBag.Hooks {
heart.TryDeposit(returnItem); heart.TryDeposit(returnItem);
heart.ResetCompactStage(); heart.ResetCompactStage();
StorageGUI.SetRefresh(); MagicUI.SetRefresh();
if (returnItem.stack != newItem.stack) { if (returnItem.stack != newItem.stack) {
if (newItem.IsACoin) { if (newItem.IsACoin) {

View File

@ -14,4 +14,4 @@ Mods: {
} }
} }
} }
} }

View File

@ -1,14 +1,11 @@
<?xml version="1.0" encoding="utf-8"?>
<Project Sdk="Microsoft.NET.Sdk"> <Project Sdk="Microsoft.NET.Sdk">
<!-- Import tModLoader mod properties -->
<Import Project="../tModLoader.targets" /> <Import Project="../tModLoader.targets" />
<PropertyGroup> <PropertyGroup>
<AssemblyName>MagicStorageVoidBag</AssemblyName> <AssemblyName>MagicStorageVoidBag</AssemblyName>
<TargetFramework>net6.0</TargetFramework>
<PlatformTarget>AnyCPU</PlatformTarget>
<LangVersion>latest</LangVersion> <LangVersion>latest</LangVersion>
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>
<PackageReference Include="tModLoader.CodeAssist" Version="0.1.*" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<Reference Include="MagicStorage"> <Reference Include="MagicStorage">

View File

@ -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). 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. 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 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! Thanks to the original MagicStorage mod for some code and of course the functionality of the original mod!