fix(ModularBot): ram loop prevention, dead-target guards, cleaner logging

- 30-tick cooldown after ghost-stuck/timeout ram exit prevents re-entry loop
- enemy_tracker.update() skips dead bots to prevent same-tick scan resurrection
- TFIL graphics cleared when ramming is active movement
- [config] logs: white base with green-highlighted changes only
- [ram:enter] logs trigger reason and key values on false→true transition
- [death] and [target-invalid] logs retained for diagnostics
This commit is contained in:
2026-09-20 20:44:45 +02:00
parent 1f8574db1d
commit 2cc2a3bd87
30 changed files with 927 additions and 161 deletions
+7 -6
View File
@@ -15,17 +15,18 @@ const
WallLockout* = 20 ## ticks to suppress further wall-reversals after one fires
type RandomOscillatorModule* = object
sign: float ## +1 or -1
elapsed: int ## ticks since last reversal
nextPeriod: int ## random period chosen at last reversal
wallLockout: int ## remaining suppression ticks
rng: Rand
sign: float ## +1 or -1
elapsed: int ## ticks since last reversal
nextPeriod: int ## random period chosen at last reversal
wallLockout: int ## remaining suppression ticks
rng: Rand
debugGraphics*: bool
proc initRandomOscillator*(): RandomOscillatorModule =
var rng = initRand(getTime().toUnix())
let period = rng.rand(MinPeriod..MaxPeriod)
RandomOscillatorModule(sign: 1.0, elapsed: 0, nextPeriod: period,
wallLockout: 0, rng: rng)
wallLockout: 0, rng: rng, debugGraphics: false)
proc computeMove*(m: var RandomOscillatorModule, ws: WorldState): MoveCommand =
inc m.elapsed