Ticket #4015: change4015.4.patch
File change4015.4.patch, 3.1 KB (added by , 7 years ago) |
---|
-
binaries/data/mods/public/gui/credits/texts/programming.json
141 141 {"nick": "njm"}, 142 142 {"nick": "NoMonkey", "name": "John Mena"}, 143 143 {"nick": "notpete", "name": "Rich Cross"}, 144 {"nick": "odoaker", "name": "Agoston Sipos"}, 144 145 {"nick": "Offensive ePeen", "name": "Jared Ryan Bills"}, 145 146 {"nick": "Ols", "name": "Oliver Whiteman"}, 146 147 {"nick": "olsner", "name": "Simon Brenner"}, -
binaries/data/mods/public/simulation/components/UnitAI.js
1842 1842 { 1843 1843 // If the unit needs to unpack, do so 1844 1844 if (this.CanUnpack()) 1845 { 1846 this.PushOrderFront("Unpack", {}); 1845 1847 this.SetNextState("UNPACKING"); 1848 } 1846 1849 else 1847 1850 this.SetNextState("ATTACKING"); 1848 1851 } … … 3767 3770 var cheeringOrder = this.orderQueue.shift(); 3768 3771 this.orderQueue.unshift(cheeringOrder, order); 3769 3772 } 3770 else if (this.order && this.IsPacking() )3773 else if (this.order && this.IsPacking() && type != "CancelPack" && type != "CancelUnpack") 3771 3774 { 3772 3775 var packingOrder = this.orderQueue.shift(); 3773 3776 this.orderQueue.unshift(packingOrder, order); … … 3831 3834 else 3832 3835 this.UpdateWorkOrders(type); 3833 3836 } 3837 let order = { "type": type, "data": data }; 3834 3838 3835 3839 // Special cases of orders that shouldn't be replaced: 3836 3840 // 1. Cheering - we're invulnerable, add order after we finish … … 3838 3842 // TODO: maybe a better way of doing this would be to use priority levels 3839 3843 if (this.order && this.order.type == "Cheering") 3840 3844 { 3841 var order = { "type": type, "data": data };3842 3845 var cheeringOrder = this.orderQueue.shift(); 3843 3846 this.orderQueue = [cheeringOrder, order]; 3844 3847 } 3845 3848 else if (this.IsPacking() && type != "CancelPack" && type != "CancelUnpack") 3846 3849 { 3847 var order = { "type": type, "data": data }; 3848 var packingOrder = this.orderQueue.shift(); 3849 this.orderQueue = [packingOrder, order]; 3850 if (this.ShouldUnpack(type, data)) 3851 { 3852 if (this.GetCurrentState().split(".").pop() == "PACKING") 3853 { 3854 this.orderQueue = [order]; 3855 this.PushOrderFront("CancelPack", { "force": true }); 3856 } 3857 else 3858 this.orderQueue = [this.orderQueue.shift(), order]; 3859 } 3860 else 3861 { 3862 if (this.GetCurrentState().split(".").pop() == "UNPACKING") 3863 { 3864 this.orderQueue = [order]; 3865 this.PushOrderFront("CancelUnpack", { "force": true }); 3866 } 3867 else 3868 this.orderQueue = [this.orderQueue.shift(), order]; 3869 } 3850 3870 } 3851 3871 else 3852 3872 { … … 5960 5980 return (cmpPack && cmpPack.IsPacking()); 5961 5981 }; 5962 5982 5983 UnitAI.prototype.ShouldUnpack = function(type, data) 5984 { 5985 return type == "Attack" && this.CheckTargetAttackRange(data.target, this.GetBestAttackAgainst(data.target, false)); 5986 }; 5987 5963 5988 //// Formation specific functions //// 5964 5989 5965 5990 UnitAI.prototype.IsAttackingAsFormation = function()