From c9d1150d1583d7f0caac822f82ba7df6314c1095 Mon Sep 17 00:00:00 2001 From: Nelsonh <81228864+OH296@users.noreply.github.com> Date: Mon, 16 Dec 2024 21:16:30 +0000 Subject: [PATCH] fix: Return trade ships home or delete them (#218) trade ships will now hopefully return home but if no valid location will just destroy and stop cluttering the map. https://discord.com/channels/714022226810372107/1299419464907100280 --- scripts/scr_fleet_functions/scr_fleet_functions.gml | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/scripts/scr_fleet_functions/scr_fleet_functions.gml b/scripts/scr_fleet_functions/scr_fleet_functions.gml index abbf77be6..389c092da 100644 --- a/scripts/scr_fleet_functions/scr_fleet_functions.gml +++ b/scripts/scr_fleet_functions/scr_fleet_functions.gml @@ -334,7 +334,7 @@ function scr_efleet_arrive_at_trade_loc(){ trade_goods="return"; if (target!=noone) then target=noone; - if (owner=eFACTION.Eldar){ + if (owner==eFACTION.Eldar){ cur_star = nearest_star_with_ownership(xx,yy, eFACTION.Eldar); if (cur_star!="none"){ cur_star=targ.x; @@ -349,6 +349,9 @@ function scr_efleet_arrive_at_trade_loc(){ action=""; set_fleet_movement(); + if (action_eta==0){ + instance_destroy(); + } } } function scr_orbiting_fleet(faction){ @@ -443,7 +446,7 @@ function fleet_arrival_logic(){ - if (trade_goods="return") and (action="move"){ + if (trade_goods="return"){ // with(instance_nearest(x,y,obj_star)){present_fleets-=1;} instance_destroy(); }