Skip to content

Commit

Permalink
Show the correct indices here
Browse files Browse the repository at this point in the history
  • Loading branch information
SnowyMouse committed Oct 17, 2020
1 parent 97c9bef commit d091442
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,8 @@ This is used for recording Invader's changes. This changelog is based on
not an issue
- invader-build: Fixed checking for local nodes when a part did not, in fact,
have them
- invader-build: Fixed warnings regarding weapon triggers showing the wrong
trigger indices
- invader-dependency: Fixed .model references being converted to .gbxmodel when
checking for dependencies

Expand Down
8 changes: 4 additions & 4 deletions src/tag/parser/compile/object.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -271,20 +271,20 @@ namespace Invader::Parser {

// Warn if we're trying to fire a negative number of projectiles per shot
if(this->projectiles_per_shot < 0) {
REPORT_ERROR_PRINTF(workload, ERROR_TYPE_WARNING_PEDANTIC, tag_index, "Trigger #%zu has a negative number of projectiles per shot, thus no projectiles will spawn. Set it to 0 to silence this warning.", offset / sizeof(WeaponTrigger));
REPORT_ERROR_PRINTF(workload, ERROR_TYPE_WARNING_PEDANTIC, tag_index, "Trigger #%zu has a negative number of projectiles per shot, thus no projectiles will spawn. Set it to 0 to silence this warning.", offset / sizeof(struct_little));
}

// Warn if we have rounds per shot set but no magazine
if(this->rounds_per_shot != 0 && this->magazine == NULL_INDEX) {
REPORT_ERROR_PRINTF(workload, ERROR_TYPE_WARNING_PEDANTIC, tag_index, "Trigger #%zu has rounds per shot set with no magazine, thus it will not actually use any rounds per shot. Set it to 0 or set a magazine to silence this warning.", offset / sizeof(WeaponTrigger));
REPORT_ERROR_PRINTF(workload, ERROR_TYPE_WARNING_PEDANTIC, tag_index, "Trigger #%zu has rounds per shot set with no magazine, thus it will not actually use any rounds per shot. Set it to 0 or set a magazine to silence this warning.", offset / sizeof(struct_little));
}

// Warn if the weapon doesn't fire automatically but we have projectiles per contrail set or we have a meme value.
if(this->projectiles_between_contrails < 0) {
REPORT_ERROR_PRINTF(workload, ERROR_TYPE_WARNING_PEDANTIC, tag_index, "Trigger #%zu has a negative number of projectiles between contrails, thus all projectiles will have contrails. Set it to 0 to silence this warning.", offset / sizeof(WeaponTrigger));
REPORT_ERROR_PRINTF(workload, ERROR_TYPE_WARNING_PEDANTIC, tag_index, "Trigger #%zu has a negative number of projectiles between contrails, thus all projectiles will have contrails. Set it to 0 to silence this warning.", offset / sizeof(struct_little));
}
else if(this->projectiles_between_contrails > 0 && (this->flags & HEK::WeaponTriggerFlagsFlag::WEAPON_TRIGGER_FLAGS_FLAG_DOES_NOT_REPEAT_AUTOMATICALLY)) {
REPORT_ERROR_PRINTF(workload, ERROR_TYPE_WARNING_PEDANTIC, tag_index, "Trigger #%zu has a nonzero number of projectiles between contrails, but this is ignored because the trigger is set to not fire automatically. Set it to 0 to silence this warning.", offset / sizeof(WeaponTrigger));
REPORT_ERROR_PRINTF(workload, ERROR_TYPE_WARNING_PEDANTIC, tag_index, "Trigger #%zu has a nonzero number of projectiles between contrails, but this is ignored because the trigger is set to not fire automatically. Set it to 0 to silence this warning.", offset / sizeof(struct_little));
}
}

Expand Down

0 comments on commit d091442

Please sign in to comment.