From 72700951436b56a9adc1a92641289db9384c3e6e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=9C=D0=B0=D1=81=D1=82=D0=B5=D1=80=20=D0=A7=D0=B8=D1=84?= <43174917+MCPO-Spartan-117@users.noreply.github.com> Date: Sat, 22 Nov 2025 19:31:32 -0500 Subject: [PATCH] Syntax, logic and var fixes --- .../scr_ork_fleet_functions.gml | 89 +++++++++---------- 1 file changed, 41 insertions(+), 48 deletions(-) diff --git a/scripts/scr_ork_fleet_functions/scr_ork_fleet_functions.gml b/scripts/scr_ork_fleet_functions/scr_ork_fleet_functions.gml index 43de33c696..566029cad3 100644 --- a/scripts/scr_ork_fleet_functions/scr_ork_fleet_functions.gml +++ b/scripts/scr_ork_fleet_functions/scr_ork_fleet_functions.gml @@ -168,37 +168,30 @@ function merge_ork_fleets(){ } } -function init_ork_waagh(override=false) { -var waaagh = irandom(300); -var waaagh_1 = irandom(3); -var _ork_stars = scr_get_stars(false, [eFACTION.Ork]); -var _ork_stars_count = array_length(_ork_stars); -// -if ((_ork_stars_count > 45) && (waaagh_1 == 3 || overide ) && obj_controller.known[eFACTION.Ork]==0) -{ -scr_popup("WAAAAGH!","The greenskins have gone unchallenged for far too long. A towering Warboss has rallied the ork hordes and halted their infighting. Now unified, the greenskins pose a dire threat to the entire sector!","waaagh",""); - scr_event_log("red","Ork WAAAAGH! begins"); - obj_controller.known[eFACTION.Ork]=0.5; -} -else if ((_ork_stars_count = 5) && (waaagh_1 == 3 || overide) && obj_controller.known[eFACTION.Ork]==0) -{ -scr_popup("WAAAAGH!","The orks are nearly defeated, but in a final desperate push, a new Warboss has mustered a fresh WAAAGH! and begun reclaiming their lost worlds.","waaagh",""); - scr_event_log("red","Ork WAAAAGH! begins."); - obj_controller.known[eFACTION.Ork]=0.5; -} -else if ((_ork_stars_count >= 5 && _ork_stars_count <= 45) && (waaagh==33 || overide) && obj_controller.known[eFACTION.Ork]==0) -{ +function init_ork_waagh(override = false) { + var waaagh = irandom(300); + var waaagh_1 = irandom(3); + var _ork_stars = scr_get_stars(false, [eFACTION.Ork]); + var _ork_stars_count = array_length(_ork_stars); + + if ((_ork_stars_count > 45) && (waaagh_1 == 3 || override ) && obj_controller.known[eFACTION.Ork] == 0) { + scr_popup("WAAAAGH!", "The greenskins have gone unchallenged for far too long. A towering Warboss has rallied the ork hordes and halted their infighting. Now unified, the greenskins pose a dire threat to the entire sector!", "waaagh", ""); + scr_event_log("red", "Ork WAAAAGH! begins"); + obj_controller.known[eFACTION.Ork] = 0.5; + } else if ((_ork_stars_count > 0 && _ork_stars_count <= 5) && (waaagh_1 == 3 || override) && obj_controller.known[eFACTION.Ork] == 0) { + scr_popup("WAAAAGH!", "The orks are nearly defeated, but in a final desperate push, a new Warboss has mustered a fresh WAAAGH! and begun reclaiming their lost worlds.", "waaagh", ""); + scr_event_log("red", "Ork WAAAAGH! begins."); + obj_controller.known[eFACTION.Ork] = 0.5; + } else if ((_ork_stars_count >= 5 && _ork_stars_count <= 45) && (waaagh == 33 || override) && obj_controller.known[eFACTION.Ork] == 0) { + scr_popup("WAAAAGH!", "The greenskins have swelled in activity, their numbers increasing seemingly without relent. A massive Warboss has risen to take control, leading most of the sector's Orks on a massive WAAAGH!", "waaagh", ""); + scr_event_log("red", "Ork WAAAAGH! begins."); + obj_controller.known[eFACTION.Ork] = 0.5; + } else { + //if no waaagh is triggered + return; + } - scr_popup("WAAAAGH!","The greenskins have swelled in activity, their numbers increasing seemingly without relent. A massive Warboss has risen to take control, leading most of the sector's Orks on a massive WAAAGH!","waaagh",""); - scr_event_log("red","Ork WAAAAGH! begins."); - obj_controller.known[eFACTION.Ork]=0.5; -} -else -{ - //if no waaagh is triggered - return; -} -var ork_waagh_activity = []; + var ork_waagh_activity = []; var _any_ork_star = []; for (var p=0;p