Skip to content

Commit

Permalink
Fix trigger catch check
Browse files Browse the repository at this point in the history
  • Loading branch information
makscee committed May 2, 2024
1 parent dc06d71 commit a07e665
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/plugins/server.rs
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ fn clear_pending(status: &Status) {
e.to_owned(),
None,
),
Status::Committed => info!("Server operation commited"),
Status::Committed => info!("Server operation committed"),
_ => {}
}
OperationsPlugin::add(move |world| {
Expand Down
4 changes: 3 additions & 1 deletion src/resources/trigger.rs
Original file line number Diff line number Diff line change
Expand Up @@ -328,8 +328,10 @@ impl Trigger {
targets,
effects,
} => {
let mut result = false;
for (trigger, _) in triggers {
if trigger.catch(event, context, world) {
result = true;
for (effect, _) in effects.iter() {
if targets.is_empty() {
ActionPlugin::action_push_back(
Expand All @@ -349,7 +351,7 @@ impl Trigger {
}
}
}
true
result
}
Trigger::Change { .. } => false,
}
Expand Down

0 comments on commit a07e665

Please sign in to comment.