Merge branch 'main' into fix/disabled-mouse-events
All checks were successful
Run Tests / test (pull_request) Successful in 2m2s
All checks were successful
Run Tests / test (pull_request) Successful in 2m2s
This commit is contained in:
commit
040f30d816
11 changed files with 50 additions and 9 deletions
|
@ -19,3 +19,4 @@ jobs:
|
|||
- run: npm ci
|
||||
- run: npm run build --if-present
|
||||
- run: npm test
|
||||
- run: npm run lint
|
||||
|
|
1
.github/workflows/test.yml
vendored
1
.github/workflows/test.yml
vendored
|
@ -19,3 +19,4 @@ jobs:
|
|||
- run: npm ci
|
||||
- run: npm run build --if-present
|
||||
- run: npm test
|
||||
- run: npm run lint
|
||||
|
|
2
.vscode/settings.json
vendored
2
.vscode/settings.json
vendored
|
@ -1,7 +1,7 @@
|
|||
{
|
||||
"vitest.commandLine": "npx vitest",
|
||||
"editor.codeActionsOnSave": {
|
||||
"source.fixAll.eslint": true
|
||||
"source.fixAll.eslint": "explicit"
|
||||
},
|
||||
"editor.defaultFormatter": "esbenp.prettier-vscode",
|
||||
"git.ignoreLimitWarning": true,
|
||||
|
|
31
CONTRIBUTING.md
Normal file
31
CONTRIBUTING.md
Normal file
|
@ -0,0 +1,31 @@
|
|||
# Contributing to Profectus
|
||||
|
||||
Thank you for considering contributing to Profectus! We appreciate your interest in improving our project. Please take a moment to review the following guidelines to streamline the contribution process.
|
||||
|
||||
## Getting Started
|
||||
|
||||
For detailed instructions on setting up local development environment, please refer to the [Setup Guide](https://moddingtree.com/guide/getting-started/setup).
|
||||
|
||||
## Issue Reporting
|
||||
|
||||
If you encounter a bug or have a suggestion for improvement, please open an issue on Incremental Social. Provide as much detail as possible, including an example repo or steps to reproduce the issue if applicable.
|
||||
|
||||
## Contributing
|
||||
|
||||
Make sure to open your PR on [Incremental Social](https://code.incremental.social/profectus/Profectus) - the GitHub repo is just a mirror!
|
||||
|
||||
### Code Review
|
||||
|
||||
All PRs must be reviewed and approved by at least one of the project maintainers before merging. Please be patient during the review process and be open to feedback.
|
||||
|
||||
### Testing
|
||||
|
||||
Ensure that your changes pass all existing tests and, if applicable, add new tests to cover the changes you've made. Run `npm run test` to run all the tests.
|
||||
|
||||
### Code Style
|
||||
|
||||
We use ESLint and Prettier to enforce consistent code style throughout the project. Before submitting a PR, run `npm run lint:fix` to automatically fix any linting issues.
|
||||
|
||||
## License
|
||||
|
||||
By contributing to Profectus, you agree that your contributions will be licensed under the project's [LICENSE](./LICENSE).
|
|
@ -9,7 +9,9 @@
|
|||
"preview": "vite preview",
|
||||
"test": "vitest run",
|
||||
"testw": "vitest",
|
||||
"serve": "vite preview --host"
|
||||
"serve": "vite preview --host",
|
||||
"lint": "eslint src --max-warnings 0",
|
||||
"lint:fix": "eslint --fix --max-warnings 0 src"
|
||||
},
|
||||
"dependencies": {
|
||||
"@fontsource/material-icons": "^4.5.4",
|
||||
|
|
|
@ -19,7 +19,7 @@ import Error from "components/Error.vue";
|
|||
import { jsx } from "features/feature";
|
||||
import state from "game/state";
|
||||
import { coerceComponent, render } from "util/vue";
|
||||
import { CSSProperties, watch } from "vue";
|
||||
import { CSSProperties } from "vue";
|
||||
import { computed, toRef, unref } from "vue";
|
||||
import Game from "./components/Game.vue";
|
||||
import GameOverScreen from "./components/GameOverScreen.vue";
|
||||
|
|
|
@ -31,7 +31,7 @@ import { coerceComponent, isCoercableComponent, render } from "util/vue";
|
|||
import { computed, Ref, ref, unref } from "vue";
|
||||
import { BarOptions, createBar, GenericBar } from "./bars/bar";
|
||||
import { ClickableOptions } from "./clickables/clickable";
|
||||
import { Decorator, GenericDecorator } from "./decorators/common";
|
||||
import { GenericDecorator } from "./decorators/common";
|
||||
|
||||
/** A symbol used to identify {@link Action} features. */
|
||||
export const ActionType = Symbol("Action");
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import type { CoercableComponent, GenericComponent, Replace, StyleValue } from "features/feature";
|
||||
import { Component, GatherProps, setDefault } from "features/feature";
|
||||
import { deletePersistent, Persistent, persistent } from "game/persistence";
|
||||
import { persistent } from "game/persistence";
|
||||
import { Direction } from "util/common";
|
||||
import type {
|
||||
Computable,
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import { Decorator, GenericDecorator } from "features/decorators/common";
|
||||
import { GenericDecorator } from "features/decorators/common";
|
||||
import type {
|
||||
CoercableComponent,
|
||||
GenericComponent,
|
||||
|
@ -346,11 +346,11 @@ export const branchedResetPropagation = function (
|
|||
const next: GenericTreeNode[] = [];
|
||||
for (const node of current) {
|
||||
for (const link of links.filter(link => link.startNode === node)) {
|
||||
if ([...reset, ...current].includes(link.endNode)) continue
|
||||
if ([...reset, ...current].includes(link.endNode)) continue;
|
||||
next.push(link.endNode);
|
||||
link.endNode.reset?.reset();
|
||||
}
|
||||
};
|
||||
}
|
||||
reset.push(...current);
|
||||
current = next;
|
||||
}
|
||||
|
|
|
@ -552,7 +552,9 @@ export function tetrate(
|
|||
export function invertTetrate(
|
||||
value: DecimalSource,
|
||||
base: FormulaSource,
|
||||
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
||||
height: FormulaSource,
|
||||
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
||||
payload: FormulaSource
|
||||
) {
|
||||
if (hasVariable(base)) {
|
||||
|
@ -576,6 +578,7 @@ export function invertIteratedExp(
|
|||
value: DecimalSource,
|
||||
lhs: FormulaSource,
|
||||
height: FormulaSource,
|
||||
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
||||
payload: FormulaSource
|
||||
) {
|
||||
if (hasVariable(lhs)) {
|
||||
|
@ -626,6 +629,7 @@ export function invertLayeradd(
|
|||
value: DecimalSource,
|
||||
lhs: FormulaSource,
|
||||
diff: FormulaSource,
|
||||
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
||||
base: FormulaSource
|
||||
) {
|
||||
if (hasVariable(lhs)) {
|
||||
|
|
|
@ -222,7 +222,9 @@ export function createCostRequirement<T extends CostRequirementOptions>(
|
|||
Decimal.gte(
|
||||
req.resource.value,
|
||||
unref(req.cost as ProcessedComputable<DecimalSource>)
|
||||
) ? 1 : 0
|
||||
)
|
||||
? 1
|
||||
: 0
|
||||
);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue