Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: port to nuxt3 #2

Open
wants to merge 101 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
101 commits
Select commit Hold shift + click to select a range
2e7c651
feat: initial progess
xhayper Nov 3, 2022
6ab80a4
feat: more progress
xhayper Nov 3, 2022
9a89632
feat: more progress
xhayper Nov 3, 2022
d8d4979
feat: more progress
xhayper Nov 3, 2022
3aff880
feat: turn route into a list
xhayper Nov 3, 2022
08e7d8f
feat: make the save button work
xhayper Nov 3, 2022
a93b8cc
chore: code cleanup
xhayper Nov 3, 2022
6e0acf6
feat: progress
xhayper Nov 5, 2022
e635ab6
feat: more progress
xhayper Nov 5, 2022
020b41b
fix: a bug where you can't uncheck trait
xhayper Nov 5, 2022
f613a52
feat: forgot to save
xhayper Nov 5, 2022
9b07a86
chore: code cleanup
xhayper Nov 5, 2022
c3fef06
feat: watch for saveData change too
xhayper Nov 5, 2022
d42c96b
feat: move data to remote
xhayper Nov 5, 2022
3e50bca
feat: add vscode config
xhayper Nov 5, 2022
964d341
chore: dependencies update
xhayper Nov 5, 2022
bb814b4
feat: update stuff
xhayper Nov 5, 2022
a76b8b2
feat: useHead
xhayper Nov 5, 2022
702ea86
fix: build
xhayper Nov 5, 2022
16d3eec
feat: useState
xhayper Nov 5, 2022
cf6b69c
feat: sourcemap support
xhayper Nov 5, 2022
8865bee
feat: added cooking recipes
xhayper Nov 7, 2022
c53aeb4
feat: initial support for inventory editting
xhayper Nov 7, 2022
451cbad
feat: initial support for follower
xhayper Nov 7, 2022
5420c71
feat: working preview
xhayper Nov 7, 2022
c66a07b
feat: owo
xhayper Nov 7, 2022
8e97236
feat: remove follower trait for now
xhayper Nov 7, 2022
3ce6a68
feat: we only use the first frame, aka static image
xhayper Nov 7, 2022
bc38d04
feat: owo
xhayper Nov 7, 2022
574f00b
fix: table
xhayper Nov 7, 2022
267292d
feat: add a bit of detail
xhayper Nov 8, 2022
9d4fc6a
feat: improve the follower prewview
xhayper Nov 8, 2022
c149066
feat: full skin support
xhayper Nov 8, 2022
ab5b599
feat: add dead + recruting follower
xhayper Nov 8, 2022
3648a2f
feat: initial support for tarot cards
xhayper Nov 8, 2022
6e87577
fix: a bug with skin preview
xhayper Nov 8, 2022
1228810
fix: skin variant bug
xhayper Nov 8, 2022
b6075de
fix: skin variant bug
xhayper Nov 8, 2022
e7d30f2
chore: code cleanup
xhayper Nov 8, 2022
3d008e9
feat: added raw data editting support
xhayper Nov 8, 2022
4f43047
removed: unused asset
xhayper Nov 8, 2022
fa9b664
feat: no longer preload image
xhayper Nov 8, 2022
9d84d6a
feat: add a lovely message
xhayper Nov 8, 2022
37aa369
fix: inventory editor
xhayper Nov 8, 2022
e0bb67f
feat: set the allowed column amount ot 5
xhayper Nov 8, 2022
071d5fc
feat: add an message
xhayper Nov 8, 2022
7f2d161
feat: page transition
xhayper Nov 8, 2022
6d064ee
feat: my eyes.... it's so much better now...
xhayper Nov 8, 2022
aa4294b
feat: cut down on css usage
xhayper Nov 8, 2022
2e806fe
feat: fix image size
xhayper Nov 8, 2022
ed38f08
feat: tweak CSS
xhayper Nov 8, 2022
6530bd9
feat: rena,e css name
xhayper Nov 8, 2022
a1fce8c
feat: added tarot card
xhayper Nov 9, 2022
2643327
feat: added all item
xhayper Nov 9, 2022
84d27c5
feat: added all follower trait
xhayper Nov 9, 2022
9a3af66
feat: useHead
xhayper Nov 9, 2022
9aecd73
feat: shorten
xhayper Nov 9, 2022
28f0b82
chore: dependencies update
xhayper Nov 9, 2022
0361b75
feat: use better font
xhayper Nov 9, 2022
e9dda54
fix: follower skin
xhayper Nov 9, 2022
6d5a461
feat: difference straving from non straving follower
xhayper Nov 9, 2022
7292e2c
feat: more accurate preview
xhayper Nov 9, 2022
fd75b7b
fix: follower skin
xhayper Nov 10, 2022
6c985c2
feat: added space to name
xhayper Nov 10, 2022
80005ed
fix: save file being case-insensitive
xhayper Nov 10, 2022
dc07928
fix: sick value
xhayper Nov 10, 2022
49a3154
feat: make dead follower appear as dead follower
xhayper Nov 10, 2022
5fd337b
feat: don't add additional field
xhayper Nov 10, 2022
de456f9
feat: remove debug log
xhayper Nov 10, 2022
7b8a6a0
feat: added revive button
xhayper Nov 10, 2022
05ff5f1
feat: center image
xhayper Nov 11, 2022
1da9c34
feat: preconnect
xhayper Nov 12, 2022
eb76199
Merge branch 'patch-1' of https://github.com/xhayper/Cult-of-the-Lamb…
xhayper Nov 12, 2022
57f4786
feat: more prefetch
xhayper Nov 12, 2022
9db9ee0
feat: prefetch
xhayper Nov 12, 2022
8aecaec
Update followerTrait.json
xhayper Nov 14, 2022
0db83aa
chore: dependencies update
xhayper Nov 16, 2022
7380dd0
chore: dependencies update
xhayper Nov 16, 2022
304aa79
chore: yarn update
xhayper Nov 16, 2022
318ee3b
feat: NUXT3!!!
xhayper Nov 17, 2022
5b2f2be
feat: add a description
xhayper Nov 17, 2022
972a9b5
feat: meta
xhayper Nov 17, 2022
ca60439
chore: dependencies update
xhayper Nov 23, 2022
7bcdc02
chore: dependencies update
xhayper Dec 1, 2022
c64d9b0
chore: dependencies update
xhayper Dec 6, 2022
68d3e0f
chore: dependencies update
xhayper Dec 17, 2022
38ab139
feat: lockfile update
xhayper Dec 17, 2022
c31f5b0
feat: lockfile update
xhayper Dec 17, 2022
2b51285
chore: dependencies update
xhayper Dec 19, 2022
6b7f750
fix: vue-tsc
xhayper Dec 19, 2022
f741533
feat: migrate to pnpm
xhayper Dec 20, 2022
df76ab3
chore: dependencies update
xhayper Dec 20, 2022
c0b6123
fix: build process
xhayper Dec 20, 2022
5972e50
fix: build process
xhayper Dec 20, 2022
efaaa02
fix: build
xhayper Dec 20, 2022
569dbbc
chore: dependencies update
xhayper Dec 25, 2022
dd9e156
feat: dependencies update
xhayper Jan 27, 2023
abf68b8
chore: dependencies update
xhayper Feb 9, 2023
602f5a5
feat: update pnpm
xhayper Feb 9, 2023
e94f6b3
chore: dependencies update
xhayper Mar 6, 2023
95c823a
chore: dependencies update
xhayper Mar 22, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
node_modules
*.log*
.nuxt
.nitro
.cache
.output
.env
dist

.pnp.*
.yarn/*
!.yarn/patches
!.yarn/plugins
!.yarn/releases
!.yarn/sdks
!.yarn/versions

.DS_Store
1 change: 1 addition & 0 deletions .npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
shamefully-hoist=true
3 changes: 3 additions & 0 deletions .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"recommendations": ["vue.volar"]
}
14 changes: 14 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
// Place your settings in this file to overwrite default and user settings.
{
"[vue]": {
"editor.defaultFormatter": "Vue.volar"
},
"files.exclude": {
".yarn": false,
"yarn.lock": false
},
"search.exclude": {
".yarn": true,
"yarn.lock": true
}
}
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<img src="https://user-images.githubusercontent.com/43356571/196006052-12910a6d-cb81-4349-92a9-8d108b3db876.png" width="700px" height="350px" align="center">
</p>

An easy to use PWA to edit your Cult of the Lamb Save File. Upload your save file, either encrypted of decrypted and start editing it to your liking. Save it and place the new downloaded file in your saves folder.
An easy to use SPA to edit your Cult of the Lamb Save File. Upload your save file, either encrypted of decrypted and start editing it to your liking. Save it and place the new downloaded file in your saves folder.

## Features

Expand Down
2,267 changes: 0 additions & 2,267 deletions app.js

This file was deleted.

13 changes: 13 additions & 0 deletions app.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<style lang="scss" src="~/assets/scss/global.scss" />

<template>
<div>
<NuxtLayout>
<NuxtPage />
</NuxtLayout>
</div>
</template>

<script setup lang="ts">
import "source-map-support/register";
</script>
Binary file removed assets/Follower_Forms/Axolotl.webp
Binary file not shown.
Binary file removed assets/Follower_Forms/Bat.webp
Binary file not shown.
Binary file removed assets/Follower_Forms/Bear.webp
Binary file not shown.
Binary file removed assets/Follower_Forms/Bee.webp
Binary file not shown.
Binary file removed assets/Follower_Forms/Beetle.webp
Binary file not shown.
Binary file removed assets/Follower_Forms/Bison.webp
Binary file not shown.
Binary file removed assets/Follower_Forms/Boss Beholder 1.webp
Binary file not shown.
Binary file removed assets/Follower_Forms/Boss Beholder 2.webp
Binary file not shown.
Binary file removed assets/Follower_Forms/Boss Beholder 3.webp
Binary file not shown.
Binary file removed assets/Follower_Forms/Boss Beholder 4.webp
Binary file not shown.
Binary file removed assets/Follower_Forms/Boss Burrow Worm.webp
Binary file not shown.
Binary file removed assets/Follower_Forms/Boss Charger.webp
Binary file not shown.
Binary file removed assets/Follower_Forms/Boss Death Cat.webp
Binary file not shown.
Binary file removed assets/Follower_Forms/Boss Egg Hopper.webp
Binary file not shown.
Binary file removed assets/Follower_Forms/Boss Flying Burp Frog.webp
Binary file not shown.
Binary file removed assets/Follower_Forms/Boss Mama Maggot.webp
Binary file not shown.
Binary file removed assets/Follower_Forms/Boss Mama Worm.webp
Binary file not shown.
Binary file removed assets/Follower_Forms/Boss Millipede Poisoner.webp
Binary file not shown.
Binary file removed assets/Follower_Forms/Boss Mortar Hopper.webp
Binary file not shown.
Binary file removed assets/Follower_Forms/Boss Scorpion.webp
Binary file not shown.
Binary file removed assets/Follower_Forms/Boss Scuttle Turret.webp
Binary file not shown.
Binary file removed assets/Follower_Forms/Boss Spider Jump.webp
Binary file not shown.
Binary file removed assets/Follower_Forms/Boss Spiker.webp
Binary file not shown.
Binary file removed assets/Follower_Forms/Capybara.webp
Binary file not shown.
Binary file removed assets/Follower_Forms/Cat.webp
Binary file not shown.
Binary file removed assets/Follower_Forms/Cow.webp
Binary file not shown.
Binary file removed assets/Follower_Forms/Crab.webp
Binary file not shown.
Binary file removed assets/Follower_Forms/Crocodile.webp
Binary file not shown.
Binary file removed assets/Follower_Forms/Cthulhu.webp
Binary file not shown.
Binary file removed assets/Follower_Forms/Deer.webp
Binary file not shown.
Binary file removed assets/Follower_Forms/Deer_ritual.webp
Binary file not shown.
Binary file removed assets/Follower_Forms/Dog.webp
Binary file not shown.
Binary file removed assets/Follower_Forms/Elephant.webp
Binary file not shown.
Binary file removed assets/Follower_Forms/Fennec Fox.webp
Binary file not shown.
Binary file removed assets/Follower_Forms/Fish.webp
Binary file not shown.
Binary file removed assets/Follower_Forms/Fox.webp
Binary file not shown.
Binary file removed assets/Follower_Forms/Frog.webp
Binary file not shown.
Binary file removed assets/Follower_Forms/Giraffe.webp
Binary file not shown.
Binary file removed assets/Follower_Forms/Hedgehog.webp
Binary file not shown.
Binary file removed assets/Follower_Forms/Hippo.webp
Binary file not shown.
Binary file removed assets/Follower_Forms/Horse.webp
Binary file not shown.
Binary file removed assets/Follower_Forms/MassiveMonster.webp
Binary file not shown.
Binary file removed assets/Follower_Forms/Monkey.webp
Binary file not shown.
Binary file removed assets/Follower_Forms/Narwal.webp
Binary file not shown.
Binary file removed assets/Follower_Forms/Nightwolf.webp
Binary file not shown.
Binary file removed assets/Follower_Forms/Otter.webp
Binary file not shown.
Binary file removed assets/Follower_Forms/Pangolin.webp
Binary file not shown.
Binary file removed assets/Follower_Forms/Pig.webp
Binary file not shown.
Binary file removed assets/Follower_Forms/Poop.webp
Binary file not shown.
Binary file removed assets/Follower_Forms/Rabbit.webp
Binary file not shown.
Binary file removed assets/Follower_Forms/Red Panda.webp
Binary file not shown.
Binary file removed assets/Follower_Forms/Seahorse.webp
Binary file not shown.
Binary file removed assets/Follower_Forms/Shrew.webp
Binary file not shown.
Binary file removed assets/Follower_Forms/Snail.webp
Binary file not shown.
Binary file removed assets/Follower_Forms/Starfish.webp
Binary file not shown.
Binary file removed assets/Follower_Forms/Tapir.webp
Binary file not shown.
Binary file removed assets/Follower_Forms/Turtle.webp
Binary file not shown.
Binary file removed assets/Follower_Forms/TwitchCat.webp
Binary file not shown.
Binary file removed assets/Follower_Forms/TwitchDog.webp
Binary file not shown.
Binary file removed assets/Follower_Forms/TwitchDogAlt.webp
Binary file not shown.
Binary file removed assets/Follower_Forms/TwitchMouse.webp
Binary file not shown.
Binary file removed assets/Follower_Forms/TwitchPoggers.webp
Binary file not shown.
Binary file removed assets/Follower_Forms/Unicorn.webp
Binary file not shown.
Binary file removed assets/Follower_Forms/Unknown.png
Binary file not shown.
Binary file removed assets/Necklace_Preview/0.png
Binary file not shown.
Binary file removed assets/Necklace_Preview/45.png
Binary file not shown.
Binary file removed assets/Necklace_Preview/46.png
Binary file not shown.
Binary file removed assets/Necklace_Preview/47.png
Binary file not shown.
Binary file removed assets/Necklace_Preview/48.png
Binary file not shown.
Binary file removed assets/Necklace_Preview/49.png
Binary file not shown.
Binary file removed assets/Outfit_Preview/0.png
Binary file not shown.
Binary file removed assets/Outfit_Preview/1.png
Binary file not shown.
Binary file removed assets/Outfit_Preview/2.png
Binary file not shown.
Binary file removed assets/Outfit_Preview/3.png
Binary file not shown.
Binary file removed assets/Outfit_Preview/7.png
Binary file not shown.
Binary file removed assets/Outfit_Preview/8.png
Binary file not shown.
Binary file removed assets/Outfit_Preview/black-bg/0.png
Binary file not shown.
Binary file removed assets/Outfit_Preview/black-bg/1.png
Binary file not shown.
Binary file removed assets/Outfit_Preview/black-bg/2.png
Binary file not shown.
Binary file removed assets/Outfit_Preview/black-bg/3.png
Binary file not shown.
Binary file removed assets/Outfit_Preview/black-bg/7.png
Binary file not shown.
Binary file removed assets/Outfit_Preview/black-bg/8.png
Binary file not shown.
Binary file removed assets/green_check.png
Binary file not shown.
Binary file removed assets/lamb.gif
Binary file not shown.
69 changes: 69 additions & 0 deletions assets/scss/global.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
@import "bootstrap/scss/bootstrap";
@import "bootstrap-dark-5/dist/css/bootstrap-dark-plugin";
@import "vanilla-jsoneditor/themes/jse-theme-dark.css";

.page-enter-active,
.page-leave-active {
transition: all 0.1s;
}
.page-enter-from,
.page-leave-to {
opacity: 0;
filter: blur(0.5rem);
}

table,
th,
td {
border: 1px double;
}

h3 {
text-align: center;
}

table {
width: 100%;
display: table;
border-collapse: separate;
box-sizing: border-box;
text-indent: initial;
border-spacing: 2px;
text-align: center;
}

#form {
padding: 1rem;
margin-bottom: 5rem;
}

footer {
background-color: var(--bs-body-bg);
}

.center-container {
display: flex;
flex-direction: row;
flex-wrap: wrap;
justify-content: center;
align-items: center;
}

.image-inner {
object-fit: scale-down;
}

.large-size {
width: 256px;
height: 256px;
}

.small-size {
width: 64px;
height: 64px;
}

.tarot-card-size {
height: 80px;
width: 50px;
}
48 changes: 48 additions & 0 deletions components/DeathCatBeatenWarningModal.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
<template>
<div class="modal fade" id="DeathCatBeatenWarning" tabindex="-1" aria-labelledby="DeathCatBeatenWarningLabel"
aria-hidden="true" ref="warningModalElement">
<div class="modal-dialog modal-lg">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title" id="DeathCatBeatenWarningLabel">Warning</h5>
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
</div>
<div class="modal-body">
<p>If you indoctrinate The One Who Waits, it will
always have the ID "666". <span class="fw-bold text-danger">Having
multiple followers with
the
same ID can lead to softlocks or save file
corruption.</span> Make sure
you have a back up of your save file and don't have more than
one Follower sharing the same ID.
</p>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-primary" data-bs-dismiss="modal">Got it
boss</button>
</div>
</div>
</div>
</div>
</template>

<script setup lang="ts">
import { Modal } from "bootstrap";

const warningModalElement = ref<HTMLDivElement>();
const warningModal = ref<Modal>();

onMounted(() => {
if (!warningModalElement.value) return;

warningModal.value = new Modal(warningModalElement.value, {
keyboard: false,
backdrop: "static",
});
});

defineExpose({
modal: warningModal
})
</script>
120 changes: 120 additions & 0 deletions components/FileUploadModal.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,120 @@
<template>
<div class="modal fade" ref="fileUploadModal" tabindex="-1" aria-labelledby="fileUploadModalLabel">
<div class="modal-dialog modal-lg">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title">Upload your save file</h5>
<NuxtImg loading="eager" src="https://cotl.xl0.org/v1/player/Lamb?format=apng&fps=60&animation=dance" alt="lamb" quality="100" width="64" height="64" />
</div>
<div class="modal-body">
<h1 class="text-center">Cult of the Lamb - Save File Editor</h1>
<p class="mb-4 text-muted text-center">
Upload your save file below and start editing your save
file to your
liking.
<span class="text-danger">Make sure you always backup your original save file.</span>
After you are done, replace your old save file with the new one.
</p>

<form>
<input type='file' class="form-control mb-5" ref="fileInputForm" />
</form>

<hr />

<p class="mb-4 text-muted text-center">
If you don't know where your save file is located, copy the below path and paste in your
file explorer top bar or, if you are on Windows, hit Windows key + R and paste the path in
the Run dialog box.
</p>
<label>Save file location Windows:</label>
<div class="input-group mb-5">
<input type="text" class="form-control"
value="%USERPROFILE%\AppData\LocalLow\Massive Monster\Cult Of The Lamb\saves"
aria-label="Windows Save File Location" disabled>
<div class="input-group-append">
<button class="btn btn-outline-secondary"
@click="(event) => copyToClipboard(((event.target! as HTMLButtonElement).parentElement!.parentElement!.querySelector('input.form-control') as HTMLInputElement).value)"
type="button">Copy</button>
</div>
</div>


<label>Save file location macOS:</label>
<div class="input-group mb-5">
<input type="text" class="form-control"
value="~/Library/Application Support/Massive Monster/Cult Of The Lamb/saves"
aria-label="macOS Save File Location" disabled>
<div class="input-group-append">
<button class="btn btn-outline-secondary"
@click="(event) => copyToClipboard(((event.target! as HTMLButtonElement).parentElement!.parentElement!.querySelector('input.form-control') as HTMLInputElement).value)"
type="button">Copy</button>
</div>
</div>

<hr />

<div class="text-center">
<p class="mb-4 text-muted text-center">
If you don't have a save file, or want to try out the application first before editing
your
real save file,
click the button below to load a test save file.
</p>
<button class="btn btn-outline-secondary" @click="$emit('testData')" type="button">Load test
data</button>
</div>
</div>
</div>
</div>
</div>
</template>

<script setup lang="ts">
import { Modal } from "bootstrap";

export type Data = {
name: string;
data: Uint8Array
}

const fileUploadModal = ref<HTMLDivElement>();
const fileInputForm = ref<HTMLInputElement>();

const emit = defineEmits<{
(e: 'data', data: Data): void
(e: 'testData'): void
}>();

const copyToClipboard = (text: string) => {
navigator.clipboard.writeText(text);
};

let uploadModal = ref<Modal>();

onMounted(() => {
if (!fileUploadModal.value || !fileInputForm.value) return;

uploadModal.value = new Modal(fileUploadModal.value, {
keyboard: false,
backdrop: "static",
});

fileUploadModal.value.onchange = (ev: Event) => {
const file = (ev.target as any).files[0];
if (!file) return;

const reader = new FileReader();
reader.readAsArrayBuffer((ev.target as any).files[0]);

reader.onloadend = () => {
const data = new Uint8Array(reader.result as ArrayBuffer);
emit('data', { name: file.name, data });
};
};
});

defineExpose({
modal: uploadModal
})
</script>
Loading