Allow World Weapons in Extra slots (#130)

This commit is contained in:
Justin Edmund 2023-08-31 18:42:20 -07:00 committed by GitHub
parent 39b353d9bd
commit 5cd357be3f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -60,7 +60,7 @@ class GridWeapon < ApplicationRecord
# Validates whether the weapon can be added to the desired position # Validates whether the weapon can be added to the desired position
def compatible_with_position def compatible_with_position
return unless [9, 10, 11].include?(position.to_i) && ![11, 16, 17, 28, 29].include?(weapon.series) return unless [9, 10, 11].include?(position.to_i) && ![11, 16, 17, 28, 29, 32].include?(weapon.series)
errors.add(:series, 'must be compatible with position') errors.add(:series, 'must be compatible with position')
end end