⚠️ SearchlightAssault ⚠️


Adds a game map and searchlights which sweep for foes at great range, alerting you while directing adjacent turrets to snipe spotted foes. Designed to dovetail with the early-mid game, searchlights provide: - Circuit network interfaces for search & detection I/O - Incentive to automate lamp & combinator production in the early game - New tactics to assault biter bases without leap-frogging turrets!

Content
11 days ago
1.1 - 2.1
17.5K
Combat

b Crash unexcluding turrets mid game

3 days ago
The mod ⚠️ SearchlightAssault ⚠️ (2.3.26) caused a non-recoverable error.
Please report this error to the mod author.

Error while running event SearchlightAssault::on_tick (ID 0)
Index out of inventory bounds.
stack traceback:
    [C]: in function '__index'
    __SearchlightAssault__/sl-util.lua:382: in function 'CopyItems'
    __SearchlightAssault__/sl-util.lua:411: in function 'CopyTurret'
    __SearchlightAssault__/control-tunion.lua:216: in function 'AmplifyRange'
    __SearchlightAssault__/control-tunion.lua:299: in function 'CheckAmmoElectricNeeds'
    __SearchlightAssault__/control.lua:257: in function <__SearchlightAssault__/control.lua:251>

STR:

Add turrets to the exclusion list
Start a game
Place searchlight and excluded turrets
Open settings - clear exclusion list

Since the option is in the map settings, I assume it should be save to edit mid-game.

3 days ago

Thanks for reporting this, I'll try to get a fix out after work tomorrow

2 days ago

I wasn't able to reproduce this with the vanilla entities, would you happen to be able to send me your save file?

Otherwise, I can try to add some defensive coding and just hope it solves the issue.

Either way, I found another bug I can fix where turrets which were boosted, then added to an exclusion list stay disabled by script after being unboosted by the exclusion. If I don't hear from you by the end of the weekend I'll go with the defensive coding and push the other fix with it.

a day ago
(updated a day ago)

I've have some issues with the internet, so my answers may be slow.

Retested again
Found a missing step:
Searchlight should target an enemy (so be in boosting state)

If searchlight is just idle - no crash
If boosting - constant crash (3/3 so far)

May provide a save file, but I have like 200+ other mods enabled, so it may complicate things...

My current repro:
1. Install universal sandbox mod & editor extensions
2. Set exclusion list for searchlight:
Full:
- gun-turret;flamethrower-turret;melta-turret;minigun-turret-hd;crossbow-120mm-mortar;artillery-turret;tesla-turret
Enough to do a crash:
- gun-turret
3. Start game as Editor extensions testing scenario (auto enables cheat mod and a few other preapplied QoL)
4. Give you a searchlight and a gun turret (I'm just picking it from craft menu, but maybe it is craft to cursor mods work)
5. place, so turret in range
6. Press editor extensions toolbar button
7. Navigate to entites (assembler icon above) -> enemies (biter nest icon below)
8. Place biter nest (far enough to not agro, but within searchlight range)
9. Wait till searchlight will spot enemy (or edit its angle&ranges to force it faster)
10. Once spoted - go to mod setting and clear exclusion string
11. Observe crash on pressing resume button

New response