Skip to content

Commit 62db3fd

Browse files
authored
Merge pull request #40 from Graicc/master
Update CI, fix visual bugs
2 parents 906332c + 4d97034 commit 62db3fd

File tree

9 files changed

+146
-5
lines changed

9 files changed

+146
-5
lines changed

.github/actions/build/action.yml

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
# Composite action for building mod
2+
3+
name: Build
4+
description: Builds mod
5+
6+
runs:
7+
using: "composite"
8+
steps:
9+
- name: Get working directory
10+
id: wd
11+
uses: Gorilla-Tag-Modding-Group/gorilla-tag-build-tools/actions/working-dir@main
12+
13+
- uses: Gorilla-Tag-Modding-Group/gorilla-tag-build-tools/actions/setup@main
14+
with:
15+
working-dir: ${{ steps.wd.outputs.dir }}
16+
17+
- uses: Gorilla-Tag-Modding-Group/gorilla-tag-build-tools/actions/deps/legoandmars/Utilla@main
18+
with:
19+
output-dir: ${{ steps.wd.outputs.dir }}\Libs
20+
- uses: Gorilla-Tag-Modding-Group/gorilla-tag-build-tools/actions/deps/legoandmars/Newtonsoft.Json@main
21+
with:
22+
output-dir: ${{ steps.wd.outputs.dir }}\Libs
23+
24+
- uses: Gorilla-Tag-Modding-Group/gorilla-tag-build-tools/actions/build@main
25+
with:
26+
working-dir: ${{ steps.wd.outputs.dir }}

.github/templates/release.md

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
<!-- DISC-ONLY # {HUMAN_NAME} {VERSION} -->
2+
{DESCRIPTION}
3+
4+
Changes:
5+
-
6+
7+
Now featuring some cosmetics from our amazing Cosmetics Crew!
8+
Materials:
9+
- Colored Ice by GreenMan36
10+
- Outline by GreenMan36
11+
- Animated Galaxy by ojsauce
12+
13+
Hats:
14+
- White Top Hat by antoca
15+
- Rainbow Hat by ExaltedPotato
16+
- Button Eyes by Graze
17+
- Quacamole by NachoEngine
18+
- Detective by ojsauce
19+
- Mining Helmet by Waulta
20+
21+
**Install using [Monke Mod Manager](https://github.com/DeadlyKitten/MonkeModManager/releases/latest)**
22+
<!-- DISC-ONLY *Or download here: <{REPO}/releases/latest>* -->

.github/workflows/build.yml

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
# Creates a build every commit
2+
3+
name: Auto Build
4+
on:
5+
push:
6+
branches: [master,main]
7+
paths-ignore:
8+
- '**.yml'
9+
- '!.github/workflows/build.yml'
10+
- '**.md'
11+
- '.gitignore'
12+
pull_request:
13+
branches: [master,main]
14+
15+
jobs:
16+
auto-build:
17+
name: Auto Build
18+
runs-on: windows-latest
19+
steps:
20+
- uses: actions/checkout@v3
21+
22+
- name: Build mod
23+
uses: ./.github/actions/build
24+
25+
- name: Upload mod
26+
uses: Gorilla-Tag-Modding-Group/gorilla-tag-build-tools/actions/upload@main
27+
with:
28+
webhook-url: ${{ secrets.WEBHOOK_URL }}

.github/workflows/publish.yml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# Creates a release post when a release is made
2+
3+
name: Publish Release
4+
on:
5+
release:
6+
types: [published]
7+
8+
jobs:
9+
publish-release:
10+
name: Publish Release
11+
runs-on: ubuntu-latest
12+
steps:
13+
- run: sleep 2h
14+
- name: Publish mod
15+
uses: Gorilla-Tag-Modding-Group/gorilla-tag-build-tools/actions/publish@main
16+
with:
17+
webhook-url: ${{ secrets.PUBLISH_WEBHOOK_URL }}

.github/workflows/release.yml

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
# Creates a release from a template
2+
3+
name: Make Release
4+
on:
5+
workflow_dispatch:
6+
inputs:
7+
tag:
8+
required: true
9+
10+
jobs:
11+
release:
12+
name: Make Release
13+
runs-on: windows-latest
14+
steps:
15+
- uses: actions/checkout@v3
16+
17+
- name: Build mod
18+
uses: ./.github/actions/build
19+
20+
- name: Make Release
21+
uses: Gorilla-Tag-Modding-Group/gorilla-tag-build-tools/actions/release@main
22+
with:
23+
tag: ${{ inputs.tag }}
24+
token: ${{ secrets.GITHUB_TOKEN }}
25+
human-name: Gorilla Cosmetics
26+

GorillaCosmetics/MakeRelease.ps1

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
# Needs to be at least that version, or mmm can't read the archive
2+
#Requires -Modules @{ ModuleName="Microsoft.PowerShell.Archive"; ModuleVersion="1.2.3" }
3+
$MyInvocation.MyCommand.Path | Split-Path | Push-Location # Run from this script's directory
14
curl -L https://github.com/legoandmars/GorillaCosmetics/releases/download/v3.0.0/GorillaCosmetics-3.0.0.zip -o GC.zip
25
Expand-Archive GC.zip
36
rm GC.zip

GorillaCosmetics/Plugin.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010

1111
namespace GorillaCosmetics
1212
{
13-
[BepInPlugin("org.legoandmars.gorillatag.gorillacosmetics", "Gorilla Cosmetics", "3.0.1")]
13+
[BepInPlugin("org.legoandmars.gorillatag.gorillacosmetics", "Gorilla Cosmetics", "3.0.2")]
1414
[BepInDependency("org.legoandmars.gorillatag.utilla", "1.5.0")]
1515
public class Plugin : BaseUnityPlugin
1616
{
@@ -102,4 +102,4 @@ void PressButton(int x)
102102
}
103103
#endif
104104
}
105-
}
105+
}

GorillaCosmetics/UI/BaseCosmeticButton.cs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,10 @@ public void OnDestroy()
3232
wardrobeItemButton.enabled = true;
3333
foreach (Transform child in wardrobeItemButton.controlledModel.transform)
3434
{
35-
child.gameObject.SetActive(true);
35+
if (!child.name.ToLower().Contains("coming soon"))
36+
{
37+
child.gameObject.SetActive(true);
38+
}
3639
}
3740
}
3841

GorillaCosmetics/UI/SelectionManager.cs

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ public class SelectionManager : ISelectionManager
4141
List<PageButton> pageButtons = new();
4242
List<ViewButton> viewButtons = new();
4343
WardrobeFunctionButton badgeButton;
44+
WardrobeFunctionButton holdableButton;
4445

4546
GameObject previewHat;
4647
GameObject previewOrb;
@@ -102,15 +103,22 @@ void CreateEnableButton()
102103
cube.SetActive(false);
103104
MeshFilter meshFilter = cube.GetComponent<MeshFilter>();
104105

105-
GameObject button = GameObject.Instantiate(template);
106+
GameObject button = GameObject.Instantiate(template, template.transform.parent);
106107
button.name = "ToggleEnableButton";
107108
button.GetComponent<MeshFilter>().mesh = meshFilter.mesh;
108109
button.GetComponent<Renderer>().material = Resources.Load<Material>("objects/treeroom/materials/plastic");
109-
button.transform.parent = template.transform.parent;
110110
button.transform.localPosition = template.transform.localPosition + Constants.EnableButtonLocalPositionOffset;
111111
button.transform.localRotation = template.transform.localRotation;
112112
button.transform.localScale = template.transform.localScale;
113113

114+
WardrobeFunctionButton hatFunctionButton = button.GetComponent<WardrobeFunctionButton>();
115+
var templateText = hatFunctionButton.myText;
116+
var newText = GameObject.Instantiate(templateText, templateText.transform.parent);
117+
newText.transform.localPosition = templateText.transform.localPosition + Constants.EnableButtonLocalPositionOffset;
118+
newText.transform.localRotation = templateText.transform.localRotation;
119+
newText.transform.localScale = templateText.transform.localScale;
120+
hatFunctionButton.myText = newText;
121+
114122
button.AddComponent<ToggleEnableButton>();
115123

116124
GameObject.Destroy(cube);
@@ -138,8 +146,11 @@ public void Disable()
138146
GameObject.Destroy(viewButton);
139147
}
140148
viewButtons = new();
149+
141150
badgeButton.enabled = true;
142151
badgeButton.myText.enabled = true;
152+
holdableButton.enabled = true;
153+
holdableButton.myText.enabled = true;
143154

144155
mirror?.SetActive(false);
145156

@@ -182,6 +193,11 @@ public void Enable()
182193
badgeButton = transform.GetComponent<WardrobeFunctionButton>();
183194
badgeButton.enabled = false;
184195
badgeButton.myText.enabled = false;
196+
} else if (lowerName.Contains("holdable"))
197+
{
198+
holdableButton = transform.GetComponent<WardrobeFunctionButton>();
199+
holdableButton.enabled = false;
200+
holdableButton.myText.enabled = false;
185201
}
186202
}
187203
} catch (Exception e)

0 commit comments

Comments
 (0)