mirror of
https://github.com/openfrontio/OpenFrontIO.git
synced 2026-07-17 13:19:43 +00:00
Nations build SAM launchers (#1931)
## Description: Fixes #201 by adding the ability for nations to build SAM launchers. <img width="888" height="625" alt="image" src="https://github.com/user-attachments/assets/b07f1b4e-d022-4674-b842-bc8b4247825d" /> ## Please complete the following: - [x] I have added screenshots for all UI updates - [x] I process any text displayed to the user through translateText() and I've added it to the en.json file - [x] I have added relevant tests to the test directory - [x] I confirm I have thoroughly tested these changes and take full responsibility for any bugs introduced
This commit is contained in:
committed by
evanpelle
parent
c7f7fb0ee4
commit
47edfe3e40
@@ -50,7 +50,8 @@ class SAMTargetingSystem {
|
||||
|
||||
private isInRange(tile: TileRef) {
|
||||
const samTile = this.sam.tile();
|
||||
const rangeSquared = this.mg.config().defaultSamRange() ** 2;
|
||||
const range = this.mg.config().defaultSamRange();
|
||||
const rangeSquared = range * range;
|
||||
return this.mg.euclideanDistSquared(samTile, tile) <= rangeSquared;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user