Skip to content

Commit

Permalink
Version 71
Browse files Browse the repository at this point in the history
Merge pull request #329 from FAForever/develop
  • Loading branch information
CookieNoob authored May 31, 2018
2 parents 75a1aa4 + 610b90c commit 6112f20
Show file tree
Hide file tree
Showing 5 changed files with 37 additions and 16 deletions.
2 changes: 1 addition & 1 deletion units/INA2003/INA2003_unit.bp
Original file line number Diff line number Diff line change
Expand Up @@ -394,7 +394,7 @@ UnitBlueprint {
MuzzleVelocity = 0,
NotExclusive = true,
PrefersPrimaryWeaponTarget = true,
ProjectileId = '/mods/nomad_fix/projectiles/NTorpedo2/NTorpedo2_proj.bp',
ProjectileId = '/projectiles/NTorpedo2/NTorpedo2_proj.bp',
ProjectileLifetime = 20,
ProjectilesPerOnFire = 3,
RackBones = {
Expand Down
6 changes: 3 additions & 3 deletions units/INB0302/INB0302_unit.bp
Original file line number Diff line number Diff line change
Expand Up @@ -128,10 +128,10 @@ UnitBlueprint {
UniformScale = 0.42,
},
Economy = {
BuildCostEnergy = 45000,
BuildCostMass = 9500,
BuildCostEnergy = 99400,
BuildCostMass = 4090,
BuildRate = 120,
BuildTime = 11250,
BuildTime = 10400,
DifferentialUpgradeCostCalculation = true,
BuildableCategory = {
'BUILTBYTIER3FACTORY NOMADS MOBILE CONSTRUCTION',
Expand Down
4 changes: 2 additions & 2 deletions units/INB0303/INB0303_unit.bp
Original file line number Diff line number Diff line change
Expand Up @@ -112,8 +112,8 @@ UnitBlueprint {
UniformScale = 0.32,
},
Economy = {
BuildCostEnergy = 35000,
BuildCostMass = 7500,
BuildCostEnergy = 45000,
BuildCostMass = 9500,
BuildRate = 150,
BuildTime = 11250,
DifferentialUpgradeCostCalculation = true,
Expand Down
39 changes: 30 additions & 9 deletions units/INU0001/INU0001_script.lua
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,11 @@ INU0001 = Class(ACUUnit) {

self.Sync.Abilities = self:GetBlueprint().Abilities
self:HasCapacitorAbility(false)

--TODO:set these to actual bp values like bp.Enhancements.ResourceAllocation.ProductionPerSecondEnergy
self.MassProduction = 30
self.EnergyProduction = 3000

end,

OnStopBeingBuilt = function(self, builder, layer)
Expand Down Expand Up @@ -514,17 +519,15 @@ INU0001 = Class(ACUUnit) {
-- RESOURCE ALLOCATION
-- ---------------------------------------------------------------------------------------

elseif enh =='ResourceAllocation' then

local bpEcon = self:GetBlueprint().Economy
self:SetProductionPerSecondEnergy(bp.ProductionPerSecondEnergy + bpEcon.ProductionPerSecondEnergy or 0)
self:SetProductionPerSecondMass(bp.ProductionPerSecondMass + bpEcon.ProductionPerSecondMass or 0)
elseif enh =='ResourceAllocation' then
self:AddToggleCap('RULEUTC_ProductionToggle')
self:SetProductionPerSecondEnergy(self.EnergyProduction)


elseif enh == 'ResourceAllocationRemove' then

local bpEcon = self:GetBlueprint().Economy
self:SetProductionPerSecondEnergy(bpEcon.ProductionPerSecondEnergy or 0)
self:SetProductionPerSecondMass(bpEcon.ProductionPerSecondMass or 0)
self:RemoveToggleCap('RULEUTC_ProductionToggle')
self:SetProductionPerSecondEnergy(20)
self:SetProductionPerSecondmass(1)

-- ---------------------------------------------------------------------------------------
-- RAPID REPAIR
Expand Down Expand Up @@ -766,6 +769,24 @@ INU0001 = Class(ACUUnit) {
OnAmmoCountIncreased = function(self, amount)
self:GetAIBrain():EnableSpecialAbility( 'NomadsAreaBombardment', true)
end,

OnScriptBitSet = function(self, bit)
if bit == 4 then -- Production toggle
self:SetProductionPerSecondMass(self.MassProduction)
self:SetProductionPerSecondEnergy(20)
else
ACUUnit.OnScriptBitSet(self, bit)
end
end,

OnScriptBitClear = function(self, bit)
if bit == 4 then -- Production toggle
self:SetProductionPerSecondMass(1)
self:SetProductionPerSecondEnergy(self.EnergyProduction)
else
ACUUnit.OnScriptBitClear(self, bit)
end
end,

}

Expand Down
2 changes: 1 addition & 1 deletion units/INU0001/INU0001_unit.bp
Original file line number Diff line number Diff line change
Expand Up @@ -672,7 +672,7 @@ UnitBlueprint {
BuildTime = 2800,
Icon = 'isb',
Name = '<LOC enhancements_0045>Resource Allocation System',
ProductionPerSecondEnergy = 1400,
ProductionPerSecondEnergy = 3000, --these stats don't change anything try edit script
ProductionPerSecondMass = 20,
ShowBones = {
'upgrade_back',
Expand Down

0 comments on commit 6112f20

Please sign in to comment.