Skip to content

Commit

Permalink
exposing force_char_stop_in_event and force_idle_action_in_event
Browse files Browse the repository at this point in the history
  • Loading branch information
jjppof committed Nov 20, 2023
1 parent f095d5e commit 485b3d1
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 6 deletions.
8 changes: 5 additions & 3 deletions base/ControllableChar.ts
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,9 @@ export abstract class ControllableChar {
initial_action?: string | base_actions,
initial_animation?: string,
storage_keys?: ControllableChar["storage_keys"],
active?: boolean
active?: boolean,
force_char_stop_in_event?: boolean,
force_idle_action_in_event?: boolean
) {
this.game = game;
this.data = data;
Expand Down Expand Up @@ -282,8 +284,8 @@ export abstract class ControllableChar {
this.crop_texture = false;
this.shadow_following = true;
this._shapes_collision_active = false;
this.force_char_stop_in_event = true;
this.force_idle_action_in_event = true;
this.force_char_stop_in_event = force_char_stop_in_event ?? true;
this.force_idle_action_in_event = force_idle_action_in_event ?? true;
this._sweat_drops = null;
this.on_stair = false;
this._emoticon_sprite = null;
Expand Down
4 changes: 3 additions & 1 deletion base/Map.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1091,7 +1091,9 @@ export class Map {
step_max_variation,
move_freely_in_event,
property_info.allow_interaction_when_inactive,
property_info.after_psynergy_cast_events
property_info.after_psynergy_cast_events,
property_info.force_char_stop_in_event,
property_info.force_idle_action_in_event
);
this.npcs.push(npc);
if (npc.label) {
Expand Down
8 changes: 6 additions & 2 deletions base/NPC.ts
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,9 @@ export class NPC extends ControllableChar {
step_max_variation,
move_freely_in_event,
allow_interaction_when_inactive,
after_psynergy_cast_events
after_psynergy_cast_events,
force_char_stop_in_event,
force_idle_action_in_event
) {
super(
game,
Expand All @@ -156,7 +158,9 @@ export class NPC extends ControllableChar {
initial_action,
initial_animation,
storage_keys,
active
active,
force_char_stop_in_event,
force_idle_action_in_event
);
this._npc_type = npc_type ?? npc_types.NORMAL;
if (this.storage_keys.movement_type !== undefined) {
Expand Down

0 comments on commit 485b3d1

Please sign in to comment.