Skip to content

Commit

Permalink
About to checkout 14-day-old commit for sonar cloud analysis
Browse files Browse the repository at this point in the history
  • Loading branch information
Eunomiac committed Sep 22, 2023
1 parent 50df7ab commit 5e0f673
Show file tree
Hide file tree
Showing 25 changed files with 1,133 additions and 778 deletions.
20 changes: 20 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: Build
on:
push:
branches:
- master
pull_request:
types: [opened, synchronize, reopened]
jobs:
sonarcloud:
name: SonarCloud
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis
- name: SonarCloud Scan
uses: SonarSource/sonarcloud-github-action@master
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
13 changes: 13 additions & 0 deletions sonar-project.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
sonar.projectKey=Eunomiac_eunos-blades
sonar.organization=eunomiac

# This is the name and version displayed in the SonarCloud UI.
#sonar.projectName=eunos-blades
#sonar.projectVersion=1.0


# Path is relative to the sonar-project.properties file. Replace "\" by "/" on Windows.
#sonar.sources=.

# Encoding of the source code. Default is default system encoding
#sonar.sourceEncoding=UTF-8
4 changes: 2 additions & 2 deletions templates/roll/partials/roll-collab-action-gm.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
</section>

<section class="sheet-header flex-horizontal">
<span class="shadowed source-name source-name-type-{{rollSource.type}}" {{#unless rollOpposition}}style="text-align: left; padding-left: 50px;"{{/unless}}>{{rollSource.name}}</span>
<span class="shadowed source-name source-name-type-{{rollPrimary.type}}" {{#unless rollOpposition}}style="text-align: left; padding-left: 50px;"{{/unless}}>{{rollPrimary.name}}</span>
<span class="shadowed vs">{{#if rollOpposition}}vs.{{else}}&nbsp;{{/if}}</span>
<span class="shadowed opp-name {{~#if rollOpposition}} opp-name-type-{{rollOpposition.type}}{{/if}}">{{#if rollOpposition}}{{rollOpposition.name}}{{else}}&nbsp;{{/if}}</span>
</section>
Expand All @@ -44,7 +44,7 @@

<div class="split-root flex-horizontal">
<div class="roll-sheet-float-block roll-source-bg-img">
<img src="{{rollSource.img}}" />
<img src="{{rollPrimary.img}}" />
</div>
<div class="roll-sheet-float-block roll-source-bg-overlay"> </div>
<div class="split-root-left">
Expand Down
4 changes: 2 additions & 2 deletions templates/roll/partials/roll-collab-action.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
</section>

<section class="sheet-header flex-horizontal">
<span class="shadowed source-name source-name-type-{{rollSource.type}}" {{#unless rollOpposition}}style="text-align: left; padding-left: 50px;"{{/unless}}>{{rollSource.name}}</span>
<span class="shadowed source-name source-name-type-{{rollPrimary.type}}" {{#unless rollOpposition}}style="text-align: left; padding-left: 50px;"{{/unless}}>{{rollPrimary.name}}</span>
<span class="shadowed vs">{{#if rollOpposition}}vs.{{else}}&nbsp;{{/if}}</span>
<span class="shadowed opp-name {{~#if rollOpposition}} opp-name-type-{{rollOpposition.type}}{{/if}}">{{#if rollOpposition}}{{rollOpposition.name}}{{else}}&nbsp;{{/if}}</span>
</section>
Expand All @@ -44,7 +44,7 @@

<div class="split-root flex-horizontal">
<div class="roll-sheet-float-block roll-source-bg-img">
<img src="{{rollSource.img}}" />
<img src="{{rollPrimary.img}}" />
</div>
<div class="roll-sheet-float-block roll-source-bg-overlay"> </div>
<div class="split-root-left">
Expand Down
2 changes: 1 addition & 1 deletion templates/roll/partials/roll-collab-downtime-gm.hbs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<div class="split-root flex-horizontal">
<div class="split-root-left">
<section class="sheet-top roll-sheet-block">
<h1 class="shadowed roll-type">{{rollType}} Roll: <span class="source-name source-type-{{source.type}}">{{rollSource.name}}</span></h1>
<h1 class="shadowed roll-type">{{rollType}} Roll: <span class="source-name source-type-{{source.type}}">{{rollPrimary.name}}</span></h1>
</section>
<section class="sheet-main tab-content nav-group flex-vertical">
<div class="roll-sheet-block rolling-block flex-vertical">
Expand Down
2 changes: 1 addition & 1 deletion templates/roll/partials/roll-collab-downtime.hbs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<div class="split-root flex-horizontal">
<div class="split-root-left">
<section class="sheet-top roll-sheet-block">
<h1 class="shadowed roll-type">{{rollType}} Roll: <span class="source-name source-type-{{source.type}}">{{rollSource.name}}</span></h1>
<h1 class="shadowed roll-type">{{rollType}} Roll: <span class="source-name source-type-{{source.type}}">{{rollPrimary.name}}</span></h1>
</section>
<section class="sheet-main tab-content nav-group flex-vertical">
<div class="roll-sheet-block rolling-block flex-vertical">
Expand Down
2 changes: 1 addition & 1 deletion templates/roll/partials/roll-collab-fortune-gm.hbs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<div class="split-root flex-horizontal">
<div class="split-root-left">
<section class="sheet-top roll-sheet-block">
<h1 class="shadowed roll-type">{{rollType}} Roll: <span class="source-name source-type-{{source.type}}">{{rollSource.name}}</span></h1>
<h1 class="shadowed roll-type">{{rollType}} Roll: <span class="source-name source-type-{{source.type}}">{{rollPrimary.name}}</span></h1>
</section>
<section class="sheet-main tab-content nav-group flex-vertical">
<div class="roll-sheet-block rolling-block flex-vertical">
Expand Down
2 changes: 1 addition & 1 deletion templates/roll/partials/roll-collab-fortune.hbs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<div class="split-root flex-horizontal">
<div class="split-root-left">
<section class="sheet-top roll-sheet-block">
<h1 class="shadowed roll-type">{{rollType}} Roll: <span class="source-name source-type-{{source.type}}">{{rollSource.name}}</span></h1>
<h1 class="shadowed roll-type">{{rollType}} Roll: <span class="source-name source-type-{{source.type}}">{{rollPrimary.name}}</span></h1>
</section>
<section class="sheet-main tab-content nav-group flex-vertical">
<div class="roll-sheet-block rolling-block flex-vertical">
Expand Down
2 changes: 1 addition & 1 deletion templates/roll/partials/roll-collab-incarceration-gm.hbs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<div class="split-root flex-horizontal">
<div class="split-root-left">
<section class="sheet-top roll-sheet-block">
<h1 class="shadowed roll-type">{{rollType}} Roll: <span class="source-name source-type-{{source.type}}">{{rollSource.name}}</span></h1>
<h1 class="shadowed roll-type">{{rollType}} Roll: <span class="source-name source-type-{{source.type}}">{{rollPrimary.name}}</span></h1>
</section>
<section class="sheet-main tab-content nav-group flex-vertical">
<div class="roll-sheet-block rolling-block flex-vertical">
Expand Down
2 changes: 1 addition & 1 deletion templates/roll/partials/roll-collab-incarceration.hbs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<div class="split-root flex-horizontal">
<div class="split-root-left">
<section class="sheet-top roll-sheet-block">
<h1 class="shadowed roll-type">{{rollType}} Roll: <span class="source-name source-type-{{source.type}}">{{rollSource.name}}</span></h1>
<h1 class="shadowed roll-type">{{rollType}} Roll: <span class="source-name source-type-{{source.type}}">{{rollPrimary.name}}</span></h1>
</section>
<section class="sheet-main tab-content nav-group flex-vertical">
<div class="roll-sheet-block rolling-block flex-vertical">
Expand Down
2 changes: 1 addition & 1 deletion templates/roll/partials/roll-collab-resistance-gm.hbs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<div class="split-root flex-horizontal">
<div class="split-root-left">
<section class="sheet-top roll-sheet-block">
<h1 class="shadowed roll-type">{{rollType}} Roll: <span class="source-name source-type-{{source.type}}">{{rollSource.name}}</span></h1>
<h1 class="shadowed roll-type">{{rollType}} Roll: <span class="source-name source-type-{{source.type}}">{{rollPrimary.name}}</span></h1>
</section>
<section class="sheet-main tab-content nav-group flex-vertical">
<div class="roll-sheet-block rolling-block flex-vertical">
Expand Down
2 changes: 1 addition & 1 deletion templates/roll/partials/roll-collab-resistance.hbs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<div class="split-root flex-horizontal">
<div class="split-root-left">
<section class="sheet-top roll-sheet-block">
<h1 class="shadowed roll-type">{{rollType}} Roll: <span class="source-name source-type-{{source.type}}">{{rollSource.name}}</span></h1>
<h1 class="shadowed roll-type">{{rollType}} Roll: <span class="source-name source-type-{{source.type}}">{{rollPrimary.name}}</span></h1>
</section>
<section class="sheet-main tab-content nav-group flex-vertical">
<div class="roll-sheet-block rolling-block flex-vertical">
Expand Down
4 changes: 4 additions & 0 deletions ts/@types/blades-general-types.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@ import BladesItem from "../blades-item";
import BladesActor from "../blades-actor";

declare global {
// Type Aliases
type MaybeStringOrFalse = string | false | undefined;


// Generic Blades Document Type
type BladesDoc = BladesActor | BladesItem;

Expand Down
65 changes: 50 additions & 15 deletions ts/@types/blades-roll.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ declare global {
export interface Config {
rollType: RollType,
userID?: string,
rollSource?: SourceDocData,
rollPrimary?: PrimaryDocData,
rollOpposition?: OppositionDocData,
rollSubType?: RollSubType,
rollDowntimeAction?: DowntimeAction,
Expand Down Expand Up @@ -41,9 +41,9 @@ declare global {
rollType: RollType;
rollSubType?: RollSubType;
rollDowntimeAction?: DowntimeAction;
rollSourceType: string;
rollSourceID?: string;
rollSourceData?: SourceDocData;
rollPrimaryType: string;
rollPrimaryID?: string;
rollPrimaryData?: PrimaryDocData;
rollTrait: RollTrait;
rollModsData: Record<string,RollModStatus>;
rollPositionInitial: Position;
Expand Down Expand Up @@ -83,7 +83,7 @@ declare global {
system?: BladesActorSystem|BladesItemSystem,

rollMods: BladesRollMod[],
rollSource: SourceDocData,
rollPrimary: PrimaryDocData,
rollTraitData: NamedValueMax & {gmTooltip?: string, pcTooltip?: string},
rollTraitOptions: Array<{name: string, value: RollTrait}>,

Expand Down Expand Up @@ -156,32 +156,68 @@ declare global {
category: RollModCategory
}

export interface SourceDocData {
rollSourceID: string|undefined,
rollSourceDoc: BladesDoc|undefined,
rollSourceName: string,
rollSourceType: string,
rollSourceImg: string,
export type PrimaryDoc =
BladesActorOfType<BladesActorType.pc>
|BladesActorOfType<BladesActorType.crew>
|BladesItemOfType<BladesItemType.cohort_gang>
|BladesItemOfType<BladesItemType.cohort_expert>
|BladesItemOfType<BladesItemType.gm_tracker>;

export interface PrimaryDocData {
rollPrimaryID: string|undefined,
rollPrimaryDoc: PrimaryDoc|undefined,
rollPrimaryName: string,
rollPrimaryType: string,
rollPrimaryImg: string,

rollModsData: RollModData[],
rollFactors: Partial<Record<Factor,FactorData>>
}


// [BladesItemType.cohort_gang]: BladesItemSchema.Cohort_Gang,
// [BladesItemType.cohort_expert]: BladesItemSchema.Cohort_Expert,
// [BladesItemType.gm_tracker]: BladesItemSchema.Gm_Tracker,
// [BladesItemType.project]: BladesItemSchema.Project,
// [BladesItemType.ritual]: BladesItemSchema.Ritual,
// [BladesItemType.design]: BladesItemSchema.Design,
// [BladesItemType.location]: BladesItemSchema.Location,
// [BladesItemType.score]: BladesItemSchema.Score,


export type OppositionDoc =
BladesActorOfType<BladesActorType.npc>
|BladesActorOfType<BladesActorType.faction>
|BladesItemOfType<BladesItemType.cohort_gang>
|BladesItemOfType<BladesItemType.cohort_expert>
|BladesItemOfType<BladesItemType.gm_tracker>
|BladesItemOfType<BladesItemType.project>
|BladesItemOfType<BladesItemType.design>
|BladesItemOfType<BladesItemType.ritual>;

export interface OppositionDocData {
rollOppID: string|undefined,
rollOppDoc: BladesDoc|undefined,
rollOppDoc: OppositionDoc|undefined,
rollOppName: string,
rollOppSubName: string,
rollOppType: string,
rollOppImg: string,

rollModsData: RollModData[]|undefined,
rollOppModsData: RollModData[]|undefined,
rollFactors: Partial<Record<Factor,FactorData>>
}

export type ParticipantDoc =
BladesActorOfType<BladesActorType.pc>
|BladesActorOfType<BladesActorType.crew>
|BladesActorOfType<BladesActorType.npc>
|BladesItemOfType<BladesItemType.cohort_gang>
|BladesItemOfType<BladesItemType.cohort_expert>
|BladesItemOfType<BladesItemType.gm_tracker>;

export interface ParticipantDocData {
rollParticipantID: string|undefined,
rollParticipantDoc: BladesDoc|undefined,
rollParticipantDoc: ParticipantDoc|undefined,
rollParticipantName: string,
rollParticipantType: string,
rollParticipantIcon: string,
Expand All @@ -190,7 +226,6 @@ declare global {
rollFactors: Partial<Record<Factor,FactorData>>
}

// export type OppositionDoc = OppositionDocData & BladesDoc;


}
Expand Down
Loading

0 comments on commit 5e0f673

Please sign in to comment.