generated from maximegris/angular-electron
-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
2 pages of npc. fixes to various components
- Loading branch information
Showing
49 changed files
with
1,143 additions
and
112 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains 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
This file contains 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,21 @@ | ||
import { | ||
heroArrowDownOnSquare, | ||
heroArrowsRightLeft, | ||
heroDocumentDuplicate, | ||
heroDocumentText, | ||
heroMinus, | ||
heroPencil, | ||
heroPlus, | ||
heroTrash, | ||
} from '@ng-icons/heroicons/outline'; | ||
|
||
export const appIcons = { | ||
heroArrowDownOnSquare, | ||
heroDocumentDuplicate, | ||
heroDocumentText, | ||
heroPencil, | ||
heroPlus, | ||
heroMinus, | ||
heroTrash, | ||
heroArrowsRightLeft, | ||
}; |
This file contains 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
This file contains 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 |
---|---|---|
@@ -1,4 +1,6 @@ | ||
export * from './constants'; | ||
export * from './droptable'; | ||
export * from './id'; | ||
export * from './item'; | ||
export * from './npc'; | ||
export * from './recipe'; |
This file contains 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,105 @@ | ||
import { | ||
AlignmentType, | ||
BaseClassType, | ||
INPCDefinition, | ||
MonsterClassType, | ||
} from '../../interfaces'; | ||
import { id } from './id'; | ||
|
||
export const defaultNPC: () => INPCDefinition = () => ({ | ||
_id: id(), | ||
sprite: [0], | ||
npcId: '', | ||
name: '', | ||
hostility: 'OnHit', | ||
allegiance: 'Enemy', | ||
monsterClass: undefined as unknown as MonsterClassType, | ||
baseClass: undefined as unknown as BaseClassType, | ||
affiliation: '', | ||
alignment: 'Neutral' as AlignmentType, | ||
cr: 0, | ||
hpMult: 1, | ||
stats: { | ||
str: 0, | ||
dex: 0, | ||
agi: 0, | ||
int: 0, | ||
wis: 0, | ||
wil: 0, | ||
con: 0, | ||
cha: 0, | ||
luk: 0, | ||
}, | ||
level: 1, | ||
skillLevels: 1, | ||
skillOnKill: 1, | ||
otherStats: {}, | ||
gear: {}, | ||
hp: { min: 0, max: 0 }, | ||
mp: { min: 0, max: 0 }, | ||
giveXp: { min: 0, max: 0 }, | ||
gold: { min: 0, max: 0 }, | ||
monsterGroup: '', | ||
avoidWater: false, | ||
aquaticOnly: false, | ||
noCorpseDrop: false, | ||
noItemDrop: false, | ||
traitLevels: {}, | ||
usableSkills: [], | ||
baseEffects: [], | ||
drops: [], | ||
copyDrops: [], | ||
dropPool: { | ||
choose: { | ||
min: 0, | ||
max: 0, | ||
}, | ||
items: [], | ||
}, | ||
tansFor: '', | ||
tanSkillRequired: 0, | ||
triggers: { | ||
leash: { | ||
messages: [''], | ||
sfx: { | ||
name: '', | ||
maxChance: 0, | ||
}, | ||
}, | ||
spawn: { | ||
messages: [''], | ||
sfx: { | ||
name: '', | ||
maxChance: 0, | ||
}, | ||
}, | ||
combat: { | ||
messages: [], | ||
}, | ||
}, | ||
items: { | ||
sack: [], | ||
belt: [], | ||
equipment: { | ||
rightHand: [], | ||
leftHand: [], | ||
head: [], | ||
neck: [], | ||
ear: [], | ||
waist: [], | ||
wrists: [], | ||
ring1: [], | ||
ring2: [], | ||
hands: [], | ||
feet: [], | ||
armor: [], | ||
robe1: [], | ||
robe2: [], | ||
trinket: [], | ||
potion: [], | ||
ammo: [], | ||
}, | ||
}, | ||
repMod: [], | ||
skills: {}, | ||
}); |
This file contains 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
This file contains 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
25 changes: 4 additions & 21 deletions
25
src/app/shared/components/cell-buttons/cell-buttons.component.html
This file contains 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
13 changes: 2 additions & 11 deletions
13
src/app/shared/components/header-buttons/header-buttons.component.html
This file contains 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 |
---|---|---|
@@ -1,22 +1,13 @@ | ||
<div class="flex justify-end items-center h-full w-full"> | ||
@if(params.showImportButton) { | ||
<button class="ml-2 btn btn-sm btn-secondary" (click)="params.importCallback()" floatUi="Import"> | ||
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" | ||
class="size-6"> | ||
<path stroke-linecap="round" stroke-linejoin="round" | ||
d="M9 8.25H7.5a2.25 2.25 0 0 0-2.25 2.25v9a2.25 2.25 0 0 0 2.25 2.25h9a2.25 2.25 0 0 0 2.25-2.25v-9a2.25 2.25 0 0 0-2.25-2.25H15M9 12l3 3m0 0 3-3m-3 3V2.25" /> | ||
</svg> | ||
<ng-icon name="heroArrowDownOnSquare"></ng-icon> | ||
</button> | ||
} | ||
|
||
@if(params.showNewButton) { | ||
<button class="ml-2 btn btn-sm btn-secondary" (click)="params.newCallback()" floatUi="New"> | ||
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" | ||
class="size-6"> | ||
<path stroke-linecap="round" stroke-linejoin="round" d="M12 4.5v15m7.5-7.5h-15" /> | ||
</svg> | ||
|
||
|
||
<ng-icon name="heroPlus"></ng-icon> | ||
</button> | ||
} | ||
</div> |
6 changes: 6 additions & 0 deletions
6
src/app/shared/components/input-alignment/input-alignment.component.html
This file contains 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,6 @@ | ||
<div class="relative"> | ||
<ng-select class="form-control" [items]="values" [(ngModel)]="alignment" placeholder="Select alignment..." | ||
(change)="change.emit($event)"></ng-select> | ||
|
||
<app-input-floating-label>Alignment</app-input-floating-label> | ||
</div> |
Empty file.
14 changes: 14 additions & 0 deletions
14
src/app/shared/components/input-alignment/input-alignment.component.ts
This file contains 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,14 @@ | ||
import { Component, model, output } from '@angular/core'; | ||
import { Alignment, AlignmentType } from '../../../../interfaces'; | ||
|
||
@Component({ | ||
selector: 'app-input-alignment', | ||
templateUrl: './input-alignment.component.html', | ||
styleUrl: './input-alignment.component.scss', | ||
}) | ||
export class InputAlignmentComponent { | ||
public alignment = model.required<AlignmentType | undefined>(); | ||
public change = output<Alignment>(); | ||
|
||
public values = [...Object.keys(Alignment)]; | ||
} |
6 changes: 6 additions & 0 deletions
6
src/app/shared/components/input-allegiance/input-allegiance.component.html
This file contains 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,6 @@ | ||
<div class="relative"> | ||
<ng-select class="form-control" [items]="values" [(ngModel)]="allegiance" placeholder="Select faction..." | ||
(change)="change.emit($event)"></ng-select> | ||
|
||
<app-input-floating-label>Faction</app-input-floating-label> | ||
</div> |
Empty file.
Oops, something went wrong.