Ticket #4015: change4015.3.patch
File change4015.3.patch, 3.0 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": "Offensive ePeen", "name": "Jared Ryan Bills"}, 144 {"nick": "odoaker", "name": "Agoston Sipos"}, 145 {"nick": "Offensive ePeen", "name": "Jared Ryan Bills"}, 145 146 {"nick": "Ols", "name": "Oliver Whiteman"}, 146 147 {"nick": "olsner", "name": "Simon Brenner"}, 147 148 {"nick": "otero"}, -
binaries/data/mods/public/simulation/components/UnitAI.js
3767 3767 var cheeringOrder = this.orderQueue.shift(); 3768 3768 this.orderQueue.unshift(cheeringOrder, order); 3769 3769 } 3770 else if (this.order && this.IsPacking() )3770 else if (this.order && this.IsPacking() && type != "CancelPack" && type != "CancelUnpack") 3771 3771 { 3772 3772 var packingOrder = this.orderQueue.shift(); 3773 3773 this.orderQueue.unshift(packingOrder, order); … … 3831 3831 else 3832 3832 this.UpdateWorkOrders(type); 3833 3833 } 3834 var order = { "type": type, "data": data }; 3834 3835 3835 3836 // Special cases of orders that shouldn't be replaced: 3836 3837 // 1. Cheering - we're invulnerable, add order after we finish … … 3838 3839 // TODO: maybe a better way of doing this would be to use priority levels 3839 3840 if (this.order && this.order.type == "Cheering") 3840 3841 { 3841 var order = { "type": type, "data": data };3842 3842 var cheeringOrder = this.orderQueue.shift(); 3843 3843 this.orderQueue = [cheeringOrder, order]; 3844 3844 } 3845 3845 else if (this.IsPacking() && type != "CancelPack" && type != "CancelUnpack") 3846 3846 { 3847 var order = { "type": type, "data": data }; 3848 var packingOrder = this.orderQueue.shift(); 3849 this.orderQueue = [packingOrder, order]; 3847 if (this.ShouldUnpack(type, data)) 3848 { 3849 if (this.GetCurrentState().split(".").pop() == "PACKING") 3850 { 3851 this.orderQueue = [order]; 3852 this.PushOrderFront("CancelPack", { "force": true }); 3853 } 3854 else 3855 this.orderQueue = [this.orderQueue.shift(), order]; 3856 } 3857 else 3858 { 3859 if (this.GetCurrentState().split(".").pop() == "UNPACKING") 3860 { 3861 this.orderQueue = [order]; 3862 this.PushOrderFront("CancelUnpack", { "force": true }); 3863 } 3864 else 3865 this.orderQueue = [this.orderQueue.shift(), order]; 3866 } 3850 3867 } 3851 3868 else 3852 3869 { … … 5960 5977 return (cmpPack && cmpPack.IsPacking()); 5961 5978 }; 5962 5979 5980 UnitAI.prototype.ShouldUnpack = function(type, data) 5981 { 5982 return type == "Attack" && this.CheckTargetAttackRange(data.target, this.GetBestAttackAgainst(data.target, false)); 5983 }; 5984 5963 5985 //// Formation specific functions //// 5964 5986 5965 5987 UnitAI.prototype.IsAttackingAsFormation = function()