From 8f89f48eede8d87a4e173838e074ce678ac33751 Mon Sep 17 00:00:00 2001 From: Nelsonh Date: Sun, 5 Jan 2025 18:51:24 +0000 Subject: [PATCH] allow land speeders on raids --- scripts/scr_roster/scr_roster.gml | 62 +++++++++++++++++-------------- 1 file changed, 35 insertions(+), 27 deletions(-) diff --git a/scripts/scr_roster/scr_roster.gml b/scripts/scr_roster/scr_roster.gml index bb381ef06..080e3f464 100644 --- a/scripts/scr_roster/scr_roster.gml +++ b/scripts/scr_roster/scr_roster.gml @@ -283,35 +283,43 @@ function Roster() constructor{ } } } - if (obj_drop_select.attack){ - for (var i=0;i0){ - if (obj_ini.veh_wid[co][i] ==roster_planet){ - _allow=true; - } - } - } - if (obj_ini.veh_lid[co][i]>-1){ - if (obj_ini.veh_lid[co][i]>= array_length(obj_ini.ship_location)){ - obj_ini.veh_lid[co][i] = -1; - } - if (obj_ini.ship_location[obj_ini.veh_lid[co][i]] == roster_location){ - _allow=true; - } - } - if (_allow){ - _company_present = true; - array_push(full_roster_units, [co, i]); - if (!array_contains(_vehicles, obj_ini.veh_role[co][i])){ - array_push(_vehicles, obj_ini.veh_role[co][i]); - new_vehicle_button(obj_ini.veh_role[co][i],obj_ini.veh_role[co][i]); - } - } + + var _raid_allowable = ["Land Speeder"]; + for (var i=0;i0){ + if (obj_ini.veh_wid[co][i] ==roster_planet){ + _allow=true; + } + } + } + if (obj_ini.veh_lid[co][i]>-1){ + if (obj_ini.veh_lid[co][i]>= array_length(obj_ini.ship_location)){ + obj_ini.veh_lid[co][i] = -1; + } + if (obj_ini.ship_location[obj_ini.veh_lid[co][i]] == roster_location){ + _allow=true; + } + } + if (_allow){ + if (!obj_drop_select.attack){ + + _allow = array_contains(_raid_allowable, _v_role); + } } + if (_allow){ + _company_present = true; + array_push(full_roster_units, [co, i]); + if (!array_contains(_vehicles, obj_ini.veh_role[co][i])){ + array_push(_vehicles, obj_ini.veh_role[co][i]); + new_vehicle_button(obj_ini.veh_role[co][i],obj_ini.veh_role[co][i]); + } + } } + var _button = new ToggleButton(); var _col = _company_present ? CM_GREEN_COLOR : c_red; var _display = co ? scr_roman_numerals()[co-1] : "HQ";