-
Notifications
You must be signed in to change notification settings - Fork 24
Zombies Schematics Tracker #35
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
Open
ItchyBeard
wants to merge
8
commits into
carlssonemil:main
Choose a base branch
from
ItchyBeard:zombies-schematics
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
d70ee40
Add Schematics Tracking
ItchyBeard ab5dfec
Merge branch 'main' into zombies-schematics
ItchyBeard 0edb1ac
Add banner (alert) for acquiring all schematics and show total counts…
ItchyBeard c8d77de
Code improvement from suggested
ItchyBeard de2f6f0
Code improvement from suggested
ItchyBeard 6c691c3
Code improvement from suggested
ItchyBeard 61438ef
Add S1 schematics, various code tweaks / updates.
ItchyBeard eea21ac
Merge remote-tracking branch 'origin/zombies-schematics' into zombies…
ItchyBeard File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,228 @@ | ||
| <template> | ||
| <div v-if="schematic.name && layout !== 'list'" | ||
| :class="['schematic', 'grid', schematic.rarity, { label, 'coming-soon': schematic.comingSoon, 'unlocked' : completed }]" | ||
| v-tippy="{ content: `${this.schematicRequirements[schematic.name]}. ${schematic.cooldown} cooldown.`, placement: 'bottom' }" | ||
| @click="toggleSchematicAcquired(schematic.name, schematic.acquired)"> | ||
| <div class="icon" | ||
| :style="{ backgroundImage: `url(https://emilcarlsson.se/interstellar/schematics/${convertToKebabCase(schematic.name)}.png)` }"></div> | ||
| <div class="label">{{ schematic.name }}</div> | ||
|
|
||
| <IconComponent v-if="schematic.acquired" class="lockStatus" name="unlock" /> | ||
| <IconComponent v-else class="lockStatus" name="lock" /> | ||
| </div> | ||
|
|
||
| <div v-else-if="schematic.name && layout === 'list'" | ||
| :class="['schematic', 'list', schematic.rarity, { label, 'coming-soon': schematic.comingSoon, 'unlocked' : completed }]" | ||
| @click="toggleSchematicAcquired(schematic.name, schematic.acquired)"> | ||
| <div class="image-container"> | ||
| <img :src="'https://emilcarlsson.se/interstellar/schematics/' + convertToKebabCase(schematic.name) + '.png'" :alt="schematic.name"/> | ||
|
|
||
| <IconComponent v-if="schematic.acquired === true" class="lockStatus" name="unlock" /> | ||
| <IconComponent v-else class="lockStatus" name="lock" /> | ||
| </div> | ||
| <div class="details"> | ||
| <h2>{{ schematic.name }}</h2> | ||
| <p>{{ schematic.description }} {{schematic.cooldown}} cooldown.</p> | ||
| </div> | ||
| </div> | ||
| </template> | ||
|
|
||
| <script> | ||
| import {useStore} from '@/stores/store' | ||
| import {convertToKebabCase} from '@/utils/utils' | ||
| import {mapActions, mapState} from 'pinia' | ||
|
|
||
| export default { | ||
| props: { | ||
| schematic: { | ||
| type: Object, | ||
| required: true, | ||
| } | ||
| }, | ||
|
|
||
| data() { | ||
| return { | ||
| store: useStore(), | ||
| } | ||
| }, | ||
|
|
||
| computed: { | ||
| ...mapState(useStore, ['schematicRequirements', 'preferences']), | ||
|
|
||
| layout() { | ||
| return this.preferences.layout | ||
| }, | ||
|
|
||
| completed() { | ||
| return this.schematic.acquired | ||
| }, | ||
|
|
||
| label() { | ||
| if (this.schematic.comingSoon) { | ||
| return this.$t('general.coming_soon') | ||
| } else { | ||
| return null | ||
| } | ||
| }, | ||
| }, | ||
|
|
||
| methods: { | ||
| convertToKebabCase, | ||
| ...mapActions(useStore, [ | ||
| 'toggleSchematicAcquired' | ||
| ]) | ||
| }, | ||
| } | ||
| </script> | ||
|
|
||
| <style lang="scss" scoped> | ||
|
|
||
| .schematic.grid { | ||
| height: 192px; | ||
| margin: 1ch; | ||
| border: 1px solid rgba(0, 0, 0, 0.5); | ||
| opacity: 0.8; | ||
| filter: grayscale(60%); | ||
| background: url("https://emilcarlsson.se/interstellar/schematics/bg/uncommon.png") no-repeat center / cover; | ||
| transition: all 0.1s; | ||
| position: relative; | ||
| cursor: pointer; | ||
|
|
||
| &.rare { | ||
| background-image: url("https://emilcarlsson.se/interstellar/schematics/bg/rare.png"); | ||
| } | ||
|
|
||
| &.epic { | ||
| background-image: url("https://emilcarlsson.se/interstellar/schematics/bg/epic.png"); | ||
| } | ||
|
|
||
| &.legendary { | ||
| background-image: url("https://emilcarlsson.se/interstellar/schematics/bg/legendary.png"); | ||
| } | ||
|
|
||
| &.ultra { | ||
| background-image: url("https://emilcarlsson.se/interstellar/schematics/bg/ultra.png"); | ||
| } | ||
|
|
||
| .lockStatus { | ||
| position: absolute; | ||
| top: 0; | ||
| right: 20px; | ||
| width: 16px; | ||
| height: 16px; | ||
| padding: 1ch; | ||
| color: rgba(255, 255, 255, .6); | ||
| filter: saturate(0); | ||
| } | ||
|
|
||
| .icon { | ||
| width: 100%; | ||
| height: 100%; | ||
| opacity: 0.5; | ||
| background: url("https://emilcarlsson.se/interstellar/schematics/ray-gun.png") no-repeat center / contain; | ||
| transform: scale(0.9); | ||
| } | ||
|
|
||
| .label { | ||
| position: absolute; | ||
| display: block; | ||
| text-align: center; | ||
| bottom: 0; | ||
| left: 0; | ||
| right: 0; | ||
| font-size: 1rem; | ||
| padding: .7ch; | ||
| color: rgba(255, 255, 255, 0.8); | ||
| text-transform: uppercase; | ||
| font-weight: 400; | ||
| } | ||
|
|
||
| &:hover, &.unlocked { | ||
| opacity: 1; | ||
| filter: grayscale(0); | ||
|
|
||
| .icon { | ||
| opacity: 1; | ||
| transform: scale(1); | ||
| } | ||
| } | ||
| } | ||
|
|
||
| .schematic.list { | ||
| display: grid; | ||
| grid-template-columns: 128px 1fr; | ||
| text-align: left; | ||
| height: 64px; | ||
| line-height: 1.3; | ||
| margin-bottom: 1ch; | ||
| border-radius: $border-radius; | ||
| background-image: linear-gradient(to right, transparent, #121212 256px, #121212 calc(100% - 16px), transparent), url("https://emilcarlsson.se/interstellar/schematics/bg/uncommon.png"); | ||
| opacity: 0.7; | ||
| filter: grayscale(65%); | ||
| border: 1px solid transparent; | ||
| transition: all 0.1s; | ||
|
|
||
| @media (max-width: $tablet) { | ||
| grid-template-columns: 1fr; | ||
| height: unset; | ||
| display: flex; | ||
| } | ||
|
|
||
| .details { | ||
| padding-top: 1.4ch; | ||
| font-size: 11px; | ||
| h2 { | ||
| font-weight: 600; | ||
| font-size: 16px; | ||
| } | ||
| } | ||
|
|
||
| &.rare { | ||
| background-image: linear-gradient(to right, transparent, #121212 256px, #121212 calc(100% - 16px), transparent), url("https://emilcarlsson.se/interstellar/schematics/bg/rare.png"); | ||
| } | ||
|
|
||
| &.epic { | ||
| background-image: linear-gradient(to right, transparent, #121212 256px, #121212 calc(100% - 16px), transparent), url("https://emilcarlsson.se/interstellar/schematics/bg/epic.png"); | ||
| } | ||
|
|
||
| &.legendary { | ||
| background-image: linear-gradient(to right, transparent, #121212 256px, #121212 calc(100% - 16px), transparent), url("https://emilcarlsson.se/interstellar/schematics/bg/legendary.png"); | ||
| } | ||
|
|
||
| &.ultra { | ||
| background-image: linear-gradient(to right, transparent, #121212 256px, #121212 calc(100% - 16px), transparent), url("https://emilcarlsson.se/interstellar/schematics/bg/ultra.png"); | ||
| } | ||
|
|
||
| &.unlocked { | ||
| opacity: 1; | ||
| filter: grayscale(0); | ||
| } | ||
|
|
||
| &:hover { | ||
| opacity: 1; | ||
| filter: grayscale(0) brightness(1.3); | ||
| } | ||
|
|
||
| img { | ||
| margin-left: 48px; | ||
| width: 64px; | ||
| height: 64px; | ||
| } | ||
|
|
||
| .image-container { | ||
| position: relative; | ||
| } | ||
|
|
||
| .lockStatus { | ||
| position: absolute; | ||
| top: 4px; | ||
| left: 4px; | ||
| width: 42px; | ||
| height: 42px; | ||
| padding: 1ch; | ||
| color: rgba(0, 0, 0, 1); | ||
| filter: saturate(0); | ||
| font-size: 24px; | ||
| } | ||
| } | ||
| </style> | ||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.