Skip to content

Commit

Permalink
npc ships ticker delay
Browse files Browse the repository at this point in the history
  • Loading branch information
X0-11 committed Jun 3, 2024
1 parent 638de2a commit d995e18
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
3 changes: 3 additions & 0 deletions code/modules/halo/overmap/base_npc_ships.dm
Original file line number Diff line number Diff line change
Expand Up @@ -205,6 +205,9 @@ GLOBAL_LIST_INIT(om_base_sectors, list())
return ..()

/obj/effect/overmap/ship/npc_ship/Process()
//Let's wait until gametime to do anything.
if(ticker.current_state != 3)
return
//despawn after a while
if(world.time >= unload_at && unload_at != 0)
lose_to_space()
Expand Down
4 changes: 2 additions & 2 deletions code/modules/halo/overmap/overmap_effects.dm
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@
/datum/overmap_effect/proc/effect_created()

/datum/overmap_effect/proc/process_effect()
if(world.time >= live_until)
if(world.time >= live_until || ticker.current_state != 3)
return 0
return 1

Expand Down Expand Up @@ -114,7 +114,7 @@
if(!.)
target.weapon_miss_chance = olddodge
return
if(prob(GAS_CLOUD_EMP_CHANCE))
if(prob(GAS_CLOUD_EMP_CHANCE) && target.map_z)
var/turf/emp_center = locate(rand(target.map_bounds[1],target.map_bounds[3]),rand(target.map_bounds[2],target.map_bounds[4]),pick(target.map_z))
empulse(emp_center, rand(2, 7), rand(7, 14))
return 1
Expand Down

0 comments on commit d995e18

Please sign in to comment.