Compare commits
6 Commits
Author | SHA1 | Date | |
---|---|---|---|
d8c4649f92
|
|||
dd5f7256fc
|
|||
5b1a55973b
|
|||
d3e63ccfcf
|
|||
0e4aa1caa5
|
|||
87378aeb00
|
@ -8,9 +8,9 @@ clone:
|
||||
|
||||
pipeline:
|
||||
fetch-deps:
|
||||
image: alpine/git:latest
|
||||
image: jackbondpreston/msvb-build-env
|
||||
commands:
|
||||
- git clone https://github.com/blushiemagic/MagicStorage.git
|
||||
- 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
|
||||
@ -19,18 +19,26 @@ pipeline:
|
||||
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/fna-alpine
|
||||
image: jackbondpreston/msvb-build-env
|
||||
commands:
|
||||
- |
|
||||
echo "Shell: $SHELL"
|
||||
echo "CI_WORKSPACE: $CI_WORKSPACE"
|
||||
- cat tModLoader.targets
|
||||
- cd MagicStorage && dotnet build -c Release || true
|
||||
- cp bin/Release/net6.0/MagicStorage.dll .
|
||||
- cd $CI_WORKSPACE
|
||||
- cd MagicStorageVoidBag
|
||||
- rm -rf .git
|
||||
@ -54,16 +62,3 @@ pipeline:
|
||||
when:
|
||||
event: tag
|
||||
|
||||
github-release:
|
||||
image: plugins/github-release
|
||||
settings:
|
||||
api_key:
|
||||
from_secret: github-api-key
|
||||
base_url: https://github.com/api/v3/
|
||||
upload_url: https://github.com/api/uploads
|
||||
files: release/*
|
||||
environment:
|
||||
- DRONE_REPO_OWNER=jackbondpreston
|
||||
- CI_REPO_OWNER=jackbondpreston
|
||||
when:
|
||||
event: tag
|
||||
|
@ -21,12 +21,12 @@ namespace MagicStorageVoidBag.Hooks {
|
||||
|
||||
var bag = (MSVoidBag)i.ModItem;
|
||||
|
||||
if (bag.location.X < 0 || bag.location.Y < 0) goto original;
|
||||
if (bag.Location.X < 0 || bag.Location.Y < 0) goto original;
|
||||
|
||||
Tile tile = Main.tile[bag.location.X, bag.location.Y];
|
||||
Tile tile = Main.tile[bag.Location.X, bag.Location.Y];
|
||||
|
||||
if (!tile.HasTile || tile.TileType != ModContent.TileType<StorageHeart>() || tile.TileFrameX != 0 || tile.TileFrameY != 0) goto original;
|
||||
if (!TileEntity.ByPosition.TryGetValue(bag.location, out TileEntity te)) goto original;
|
||||
if (!TileEntity.ByPosition.TryGetValue(bag.Location, out TileEntity te)) goto original;
|
||||
if (te.type != ModContent.TileEntityType<TEStorageHeart>()) goto original;
|
||||
|
||||
TEStorageHeart heart = (TEStorageHeart)te;
|
||||
|
@ -24,12 +24,12 @@ namespace MagicStorageVoidBag.Hooks {
|
||||
|
||||
var bag = (MSVoidBag)i.ModItem;
|
||||
|
||||
if (bag.location.X < 0 || bag.location.Y < 0) goto original;
|
||||
if (bag.Location.X < 0 || bag.Location.Y < 0) goto original;
|
||||
|
||||
Tile tile = Main.tile[bag.location.X, bag.location.Y];
|
||||
Tile tile = Main.tile[bag.Location.X, bag.Location.Y];
|
||||
|
||||
if (!tile.HasTile || tile.TileType != ModContent.TileType<StorageHeart>() || tile.TileFrameX != 0 || tile.TileFrameY != 0) goto original;
|
||||
if (!TileEntity.ByPosition.TryGetValue(bag.location, out TileEntity te)) goto original;
|
||||
if (!TileEntity.ByPosition.TryGetValue(bag.Location, out TileEntity te)) goto original;
|
||||
if (te.type != ModContent.TileEntityType<TEStorageHeart>()) goto original;
|
||||
|
||||
if (Utility.HeartHasSpaceFor(newItem, (TEStorageHeart)te)) return true;
|
||||
|
@ -27,10 +27,10 @@ namespace MagicStorageVoidBag.Items {
|
||||
}
|
||||
|
||||
public override void ModifyTooltips(List<TooltipLine> lines) {
|
||||
bool isSet = location.X >= 0 && location.Y >= 0;
|
||||
bool isSet = Location.X >= 0 && Location.Y >= 0;
|
||||
for (int k = 0; k < lines.Count; k++)
|
||||
if (isSet && lines[k].Mod == "Terraria" && lines[k].Name == "Tooltip1") {
|
||||
lines[k].Text = Language.GetTextValue("Mods.MagicStorage.SetTo", location.X, location.Y);
|
||||
lines[k].Text = Language.GetTextValue("Mods.MagicStorage.SetTo", Location.X, Location.Y);
|
||||
} else if (!isSet && lines[k].Mod == "Terraria" && lines[k].Name == "Tooltip2") {
|
||||
lines.RemoveAt(k);
|
||||
k--;
|
||||
|
Reference in New Issue
Block a user