mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-10 10:12:45 +00:00
Snips some ascended spaghetti code
Makes turrets more optimized and less prone to catastrophic runtime cascades. Go smooth that galaxy brain and take your rube goldberg ass spaghetti back to where it came from. Miight toss upstream at some point but I'm too sleepy to beef with the author responsible rn.
This commit is contained in:
@@ -675,6 +675,7 @@
|
|||||||
var/list/targets = list() //list of primary targets
|
var/list/targets = list() //list of primary targets
|
||||||
var/list/secondarytargets = list() //targets that are least important
|
var/list/secondarytargets = list() //targets that are least important
|
||||||
|
|
||||||
|
/* CHOMPEdit Start
|
||||||
var/list/seenturfs = list()
|
var/list/seenturfs = list()
|
||||||
for(var/turf/T in oview(world.view, src))
|
for(var/turf/T in oview(world.view, src))
|
||||||
seenturfs += T
|
seenturfs += T
|
||||||
@@ -684,11 +685,11 @@
|
|||||||
continue
|
continue
|
||||||
if(get_turf(M) in seenturfs)
|
if(get_turf(M) in seenturfs)
|
||||||
assess_and_assign(M, targets, secondarytargets)
|
assess_and_assign(M, targets, secondarytargets)
|
||||||
|
This was dumb.*/
|
||||||
|
|
||||||
/* This was dumb. Why do this and then check line of sight later?
|
|
||||||
for(var/mob/M in mobs_in_xray_view(world.view, src))
|
for(var/mob/M in mobs_in_xray_view(world.view, src))
|
||||||
assess_and_assign(M, targets, secondarytargets)
|
assess_and_assign(M, targets, secondarytargets)
|
||||||
*/
|
//CHOMPEdit End
|
||||||
|
|
||||||
if(!tryToShootAt(targets))
|
if(!tryToShootAt(targets))
|
||||||
if(!tryToShootAt(secondarytargets)) // if no valid targets, go for secondary targets
|
if(!tryToShootAt(secondarytargets)) // if no valid targets, go for secondary targets
|
||||||
|
|||||||
Reference in New Issue
Block a user