Skip to content

Commit

Permalink
chore: bump version to 0.3.0 and update interface extensions for cons…
Browse files Browse the repository at this point in the history
…istency
  • Loading branch information
BlackRam-oss committed Jan 24, 2025
1 parent 573ec9b commit 1e00ea8
Show file tree
Hide file tree
Showing 8 changed files with 75 additions and 81 deletions.
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@drincs/nqtr",
"version": "0.2.14",
"version": "0.3.0",
"description": "A complete system introducing the concepts of location, time and event, producing the framework of a not-quite-point-and-click adventure game.",
"main": "./dist/index.js",
"module": "./dist/index.mjs",
Expand All @@ -23,7 +23,7 @@
},
"homepage": "https://github.com/DRincs-Productions/nqtr-pixi-vn#readme",
"devDependencies": {
"@drincs/nqtr": "^0.2.13",
"@drincs/nqtr": "^0.2.14",
"jsdom": "^26.0.0",
"ts-node": "^10.9.2",
"tsup": "^8.3.5",
Expand Down
6 changes: 2 additions & 4 deletions src/interface/ActivityInterface.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
import { OnRunProps } from "@drincs/nqtr/dist/override";
import { ActivityInterface, OnRunProps } from "@drincs/nqtr/dist/override";

export default interface ActivityBaseInterface extends ActivityBaseInternalInterface {
// ActivityInterface
}
export default interface ActivityBaseInterface extends ActivityBaseInternalInterface, ActivityInterface {}

export interface ActivityBaseInternalInterface {
/**
Expand Down
40 changes: 20 additions & 20 deletions src/interface/CommitmentInterface.ts
Original file line number Diff line number Diff line change
@@ -1,28 +1,28 @@
import { CommitmentInterface } from "@drincs/nqtr/dist/override";
import { CharacterInterface } from "@drincs/pixi-vn";
import { RoomInterface } from ".";
import { ExecutionType } from "../types";
import { ActivityBaseInternalInterface } from "./ActivityInterface";

export default interface CommitmentBaseInterface extends CommitmentBaseInternalInterface // CommitmentInterface
{ }
export default interface CommitmentBaseInterface extends CommitmentBaseInternalInterface, CommitmentInterface {}

export interface CommitmentBaseInternalInterface extends ActivityBaseInternalInterface {
/**
* The character or characters that are in the commitment and so in the room.
*/
readonly characters: CharacterInterface[]
/**
* The room where the commitment is.
*/
readonly room: RoomInterface
/**
* Execution type. If is "automatic" the onRun() runned automatically when the palayer is in the room. If is "interaction" the player must interact with the character to run the onRun() function.
* If you set "automatic" remember to remove the commitment when it is no longer needed, because otherwise it repeats itself every time.
*/
executionType: ExecutionType
/**
* The priority. The higher the number, the higher the priority.
* To ensure that a character is not in 2 places at the same time, if there are 2 or more valid commits at the same time and with the same character, the one with the highest priority will be chosen.
*/
priority: number
/**
* The character or characters that are in the commitment and so in the room.
*/
readonly characters: CharacterInterface[];
/**
* The room where the commitment is.
*/
readonly room: RoomInterface;
/**
* Execution type. If is "automatic" the onRun() runned automatically when the palayer is in the room. If is "interaction" the player must interact with the character to run the onRun() function.
* If you set "automatic" remember to remove the commitment when it is no longer needed, because otherwise it repeats itself every time.
*/
executionType: ExecutionType;
/**
* The priority. The higher the number, the higher the priority.
* To ensure that a character is not in 2 places at the same time, if there are 2 or more valid commits at the same time and with the same character, the one with the highest priority will be chosen.
*/
priority: number;
}
30 changes: 15 additions & 15 deletions src/interface/navigation/LocationInterface.ts
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@
import { LocationInterface } from "@drincs/nqtr/dist/override";
import { MapInterface, RoomInterface } from "..";
import NavigationAbstractInterface from "./NavigationAbstractClass";

export default interface LocationBaseInterface extends LocationBaseInternalInterface // LocationInterface
{ }
export default interface LocationBaseInterface extends LocationBaseInternalInterface, LocationInterface {}

export interface LocationBaseInternalInterface extends NavigationAbstractInterface {
/**
* The id of the location.
*/
readonly id: string;
/**
* The map where the location is.
*/
readonly map: MapInterface
/**
* Get all rooms in the location.
* @returns The rooms in the location.
*/
readonly rooms: RoomInterface[]
/**
* The id of the location.
*/
readonly id: string;
/**
* The map where the location is.
*/
readonly map: MapInterface;
/**
* Get all rooms in the location.
* @returns The rooms in the location.
*/
readonly rooms: RoomInterface[];
}
22 changes: 11 additions & 11 deletions src/interface/navigation/MapInterface.ts
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
import { MapInterface } from "@drincs/nqtr/dist/override";
import { LocationInterface } from "..";
import NavigationAbstractInterface from "./NavigationAbstractClass";

export default interface MapBaseInterface extends MapBaseInternalInterface // MapInterface
{ }
export default interface MapBaseInterface extends MapBaseInternalInterface, MapInterface {}

export interface MapBaseInternalInterface extends NavigationAbstractInterface {
/**
* The id of the map.
*/
readonly id: string;
/**
* Get all locations in the map.
* @returns The locations in the map.
*/
readonly locations: LocationInterface[]
/**
* The id of the map.
*/
readonly id: string;
/**
* Get all locations in the map.
* @returns The locations in the map.
*/
readonly locations: LocationInterface[];
}
30 changes: 15 additions & 15 deletions src/interface/navigation/RoomInterface.ts
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
import { CommitmentInterface, LocationInterface } from "..";
import { LocationInterface } from "@drincs/nqtr/dist/override";
import { CommitmentInterface, LocationInterface as LocationInterfaceInt } from "..";
import NavigationAbstractInterface from "./NavigationAbstractClass";

export default interface RoomBaseInterface extends RoomBaseInternalInterface // LocationInterface
{ }
export default interface RoomBaseInterface extends RoomBaseInternalInterface, LocationInterface {}

export interface RoomBaseInternalInterface extends NavigationAbstractInterface {
/**
* The id of the room.
*/
readonly id: string;
/**
* The location where the room is.
*/
readonly location: LocationInterface
/**
* Get the character commitments of the room.
*/
readonly routine: CommitmentInterface[]
/**
* The id of the room.
*/
readonly id: string;
/**
* The location where the room is.
*/
readonly location: LocationInterfaceInt;
/**
* Get the character commitments of the room.
*/
readonly routine: CommitmentInterface[];
}
12 changes: 5 additions & 7 deletions src/interface/quest/QuestInterface.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
import { OnStartEndStageQuest } from "@drincs/nqtr/dist/override";
import { QuestInterface, StageInterface } from "..";
import { OnStartEndStageQuest, QuestInterface } from "@drincs/nqtr/dist/override";
import { QuestInterface as QuestInterfaceInt, StageInterface } from "..";

export default interface QuestBaseInterface extends QuestBaseInternalInterface {
// QuestInterface
}
export default interface QuestBaseInterface extends QuestBaseInternalInterface, QuestInterface {}

export interface QuestBaseInternalInterface {
/**
Expand Down Expand Up @@ -43,12 +41,12 @@ export interface QuestBaseInternalInterface {
/**
* The function that will be called when the quest starts.
*/
readonly onStart?: (stage: QuestInterface, props: OnStartEndStageQuest) => void;
readonly onStart?: (stage: QuestInterfaceInt, props: OnStartEndStageQuest) => void;

/**
* The function that will be called when the quest goes to the next stage.
*/
readonly onNextStage?: (stage: QuestInterface, props: OnStartEndStageQuest) => void;
readonly onNextStage?: (stage: QuestInterfaceInt, props: OnStartEndStageQuest) => void;

/**
* Start the quest.
Expand Down
12 changes: 5 additions & 7 deletions src/interface/quest/StageInterface.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
import { OnStartEndStageQuest } from "@drincs/nqtr/dist/override";
import { StageInterface } from "..";
import { OnStartEndStageQuest, StageInterface } from "@drincs/nqtr/dist/override";
import { StageInterface as StageInterfaceInt } from "..";
import { QuestsRequiredType } from "../../types";

export default interface StageBaseInterface extends StageBaseInternalInterface {
// StageInterface
}
export default interface StageBaseInterface extends StageBaseInternalInterface, StageInterface {}

export interface StageBaseInternalInterface {
/**
Expand All @@ -14,12 +12,12 @@ export interface StageBaseInternalInterface {
/**
* The function that will be called when the stage starts.
*/
readonly onStart?: (stage: StageInterface, props: OnStartEndStageQuest) => void;
readonly onStart?: (stage: StageInterfaceInt, props: OnStartEndStageQuest) => void;

/**
* The function that will be called when the stage ends.
*/
readonly onEnd?: (stage: StageInterface, props: OnStartEndStageQuest) => void;
readonly onEnd?: (stage: StageInterfaceInt, props: OnStartEndStageQuest) => void;

/**
* Check if the flag and goals are completed.
Expand Down

0 comments on commit 1e00ea8

Please sign in to comment.