Skip to content

Commit

Permalink
Add stop action implementation
Browse files Browse the repository at this point in the history
  • Loading branch information
nikolaj-a committed Jul 31, 2024
1 parent f65f8c8 commit df8c4a7
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 1 deletion.
14 changes: 14 additions & 0 deletions src/module/system/action-macros/piloting/stop.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
import { SimpleAction } from "@actor/actions/index.ts";

const PREFIX = "SF2E.Actions.Stop";

const stop = new SimpleAction({
cost: 1,
description: `${PREFIX}.Description`,
name: `${PREFIX}.Title`,
section: "skill",
slug: "stop",
traits: ["manipulate"],
});

export { stop };
3 changes: 2 additions & 1 deletion src/scripts/hooks/init.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ import { navigate } from "@system/action-macros/piloting/navigate.ts";
import { plotCourse } from "@system/action-macros/piloting/plot-course.ts";
import { program } from "@system/action-macros/computers/program.ts";
import { runOver } from "@system/action-macros/piloting/run-over.ts";
import { stop } from "@system/action-macros/piloting/stop.ts";

export const Init = {
listen: (): void => {
Expand Down Expand Up @@ -176,7 +177,7 @@ export const Init = {
game.pf2e.StatusEffects.initialize();

if (game.modules.get("starfinder-field-test-for-pf2e")?.active) {
[accessInfosphere, drive, hack, navigate, plotCourse, program, runOver].forEach((action) =>
[accessInfosphere, drive, hack, navigate, plotCourse, program, runOver, stop].forEach((action) =>
game.pf2e.actions.set(action.slug, action),
);
}
Expand Down
4 changes: 4 additions & 0 deletions static/lang/action-en.json
Original file line number Diff line number Diff line change
Expand Up @@ -1116,6 +1116,10 @@
"failure": "<strong>Failure</strong> The vehicle moves its Speed in a straight line along its most recent heading, drifting up to 45 degrees at the GM's discretion, and becomes uncontrolled."
},
"Title": "Run Over"
},
"Stop": {
"Description": "<p>You bring the vehicle to a stop.</p>",
"Title": "Stop"
}
}
}
Expand Down

0 comments on commit df8c4a7

Please sign in to comment.