Skip to content

Commit

Permalink
Cluster OB now respects if a hive core is created while it is firing. (
Browse files Browse the repository at this point in the history
…#3600)

# About the pull request

It checks for OB protection on the turf now. It'll remove the turf from
consideration and try a different one. If no valid turfs remain the OB
stops.

# Explain why it's good for the game

Seems fair enough, very niche case though.


# Testing Photographs and Procedure



# Changelog

:cl:
balance: Cluster OBs will now no longer hit turfs that have gotten OB
protection after the initial OB was fired.
/:cl:
  • Loading branch information
TheGamerdk committed Jun 27, 2023
1 parent f173b79 commit be616f3
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions code/modules/cm_marines/orbital_cannon.dm
Original file line number Diff line number Diff line change
Expand Up @@ -484,14 +484,13 @@ var/list/ob_type_fuel_requirements
var/list/turf_list = list()

for(var/turf/T in range(range_num, target))
if(protected_by_pylon(TURF_PROTECTION_OB, T))
continue

turf_list += T

for(var/i = 1 to total_amount)
for(var/k = 1 to instant_amount)
var/turf/U = pick(turf_list)
if(protected_by_pylon(TURF_PROTECTION_OB, U)) //If the turf somehow gained OB protection while the cluster was firing
continue
fire_in_a_hole(U)
sleep(delay_between_clusters)

Expand Down

0 comments on commit be616f3

Please sign in to comment.