Skip to content

Commit 128626f

Browse files
authored
Merge pull request #108 from Erol444/develop
Release 27/04/2022
2 parents 2773a11 + 9ad95e1 commit 128626f

File tree

139 files changed

+12381
-4322
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

139 files changed

+12381
-4322
lines changed

.github/workflows/build.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ on:
88

99
jobs:
1010
build:
11-
runs-on: windows-latest
11+
runs-on: windows-2019
1212
steps:
1313
- name: setup-msbuild
1414
uses: microsoft/setup-msbuild@v1
@@ -46,7 +46,7 @@ jobs:
4646
- name: Upload a Build Artifact
4747
uses: actions/upload-artifact@v2
4848
with:
49-
name: TBS-Build
49+
name: TBS-Build-${{ github.sha }}
5050
path: TravBotSharp\bin\Release
5151
if-no-files-found: error
5252

.github/workflows/pre-release.yml

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@ name: PreReleaseFlow
22

33
on:
44
pull_request:
5-
branches: develop
6-
types: closed
5+
branches: [develop]
6+
types: [closed]
77
workflow_dispatch:
88

99
jobs:
@@ -38,14 +38,14 @@ jobs:
3838
- name: 'Create changelog'
3939
id: Changelog
4040
run: |
41-
changelog=$(git log --no-merges --pretty=format:'- %s' ${{ steps.previoustag.outputs.tag }}..HEAD --reverse)
41+
changelog="${{github.event.pull_request.body}}"
4242
changelog="${changelog//'%'/'%25'}"
4343
changelog="${changelog//$'\n'/'%0A'}"
4444
changelog="${changelog//$'\r'/'%0D'}"
4545
echo "::set-output name=changelog::$changelog"
4646
4747
build:
48-
runs-on: windows-latest
48+
runs-on: windows-2019
4949
needs: version
5050
steps:
5151
- name: setup-msbuild
@@ -90,18 +90,16 @@ jobs:
9090
prerelease:
9191
runs-on: ubuntu-latest
9292
needs: [build, version]
93-
steps:
94-
93+
steps:
9594
- name: Download artifact
9695
uses: actions/download-artifact@master
9796
with:
9897
name: TBS-prerelease
99-
path: TravBotSharp/bin/Release
100-
98+
path: TBS-${{needs.version.outputs.version}}
10199
- name: Archive pre release
102100
uses: montudor/action-zip@v1
103101
with:
104-
args: zip -qq -r TBS-${{needs.version.outputs.version}}.zip TravBotSharp/bin/Release
102+
args: zip -r TBS-${{needs.version.outputs.version}}.zip TBS-${{needs.version.outputs.version}}
105103

106104
- name: Create pre release
107105
uses: ncipollo/release-action@v1

.github/workflows/release.yml

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@ name: ReleaseFlow
22

33
on:
44
pull_request:
5-
branches: master
6-
types: closed
5+
branches: [master]
6+
types: [closed]
77
workflow_dispatch:
88

99
jobs:
@@ -18,7 +18,7 @@ jobs:
1818
with:
1919
one_of: release
2020
repo_token: ${{ secrets.GITHUB_TOKEN }}
21-
21+
2222
- name: 'Checkout repo'
2323
uses: actions/checkout@v2
2424

@@ -40,14 +40,13 @@ jobs:
4040
- name: 'Create changelog'
4141
id: Changelog
4242
run: |
43-
last=$(git log --merges --grep='develop' --first-parent master --pretty=format:"%h" | sed -n '2p')
44-
changelog=$(git log --no-merges --pretty=format:'- %s' $last..HEAD --reverse)
43+
changelog="${{github.event.pull_request.body}}"
4544
changelog="${changelog//'%'/'%25'}"
4645
changelog="${changelog//$'\n'/'%0A'}"
4746
changelog="${changelog//$'\r'/'%0D'}"
4847
echo "::set-output name=changelog::$changelog"
4948
build:
50-
runs-on: windows-latest
49+
runs-on: windows-2019
5150
needs: version
5251
steps:
5352
- name: setup-msbuild
@@ -99,12 +98,12 @@ jobs:
9998
uses: actions/download-artifact@master
10099
with:
101100
name: TBS-release
102-
path: TravBotSharp/bin/Release
101+
path: TBS-${{needs.version.outputs.version}}
103102

104103
- name: Archive Release
105104
uses: montudor/action-zip@v1
106105
with:
107-
args: zip -qq -r TBS-${{needs.version.outputs.version}}.zip TravBotSharp/bin/Release
106+
args: zip -qq -r TBS-${{needs.version.outputs.version}}.zip TBS-${{needs.version.outputs.version}}
108107

109108

110109
- name: Create release
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.

TbsCore/Core/PostLoadHelper.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -228,7 +228,7 @@ public static List<Action> GetPostLoadTasks(Account acc)
228228
// Update adventures
229229
if(homeVill == null)
230230
{
231-
acc.Tasks.Add( new HeroUpdateInfo() { ExecuteAt = DateTime.Now });
231+
acc.Tasks.Add( new HeroUpdateInfo() { ExecuteAt = DateTime.Now }, true);
232232
}
233233
else if (heroReady &&
234234
(homeVill.Build.Buildings.Any(x => x.Type == Classificator.BuildingEnum.RallyPoint && 0 < x.Level)) &&
@@ -289,12 +289,12 @@ private static void AutoExpandStorage(Account acc, Village vill)
289289
warehouse_delta <= vill.Res.Stored.Resources.Clay ||
290290
warehouse_delta <= vill.Res.Stored.Resources.Iron)
291291
{
292-
BuildingHelper.UpgradeBuildingForOneLvl(acc, vill, Classificator.BuildingEnum.Warehouse, false);
292+
UpgradeBuildingHelper.UpgradeBuildingForOneLvl(acc, vill, Classificator.BuildingEnum.Warehouse, false);
293293
return;
294294
}
295295

296296
if (granary_delta <= vill.Res.Stored.Resources.Crop)
297-
BuildingHelper.UpgradeBuildingForOneLvl(acc, vill, Classificator.BuildingEnum.Granary, false);
297+
UpgradeBuildingHelper.UpgradeBuildingForOneLvl(acc, vill, Classificator.BuildingEnum.Granary, false);
298298
}
299299

300300
private static void DonateToAlly(Account acc, Village vill)

0 commit comments

Comments
 (0)