Skip to content

Commit

Permalink
Few changes
Browse files Browse the repository at this point in the history
-Description in menu (max rof)
-Reduced sound distance for crew dying
  • Loading branch information
KemGus committed Oct 2, 2023
1 parent 1ee9720 commit d8871dd
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 22 deletions.
4 changes: 2 additions & 2 deletions lua/entities/ace_crewseat_driver/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ function ENT:Initialize()
else
-- Generate a random name
local randomPrefixes = {"John", "Bob", "Sam", "Joe", "Ben", "Alex", "Chris", "David", "Eric", "Frank", "Antonio", "Ivan"}
local randomSuffixes = {"Smith", "Johnson", "Dover", "Wang", "Kim", "Lee", "Brown", "Davis", "Evans", "Garcia", "", "Russel"}
local randomSuffixes = {"Smith", "Johnson", "Dover", "Wang", "Kim", "Lee", "Brown", "Davis", "Evans", "Garcia", "", "Russel", "King"}

local randomPrefix = randomPrefixes[math.random(1, #randomPrefixes)]
local randomSuffix = randomSuffixes[math.random(1, #randomSuffixes)]
Expand All @@ -61,7 +61,7 @@ function ENT:Think()

if self.ACF.Health <= self.ACF.MaxHealth * 0.97 then
ACF_HEKill( self, VectorRand() , 0)
self:EmitSound("npc/combine_soldier/die" .. tostring(math.random(1, 3)) .. ".wav")
self:EmitSound("npc/combine_soldier/die" .. tostring(math.random(1, 3)) .. ".wav", 50)
end

self:UpdateOverlayText()
Expand Down
4 changes: 2 additions & 2 deletions lua/entities/ace_crewseat_gunner/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ function ENT:Initialize()
else
-- Generate a random name
local randomPrefixes = {"John", "Bob", "Sam", "Joe", "Ben", "Alex", "Chris", "David", "Eric", "Frank", "Antonio", "Ivan"}
local randomSuffixes = {"Smith", "Johnson", "Dover", "Wang", "Kim", "Lee", "Brown", "Davis", "Evans", "Garcia", "", "Russel"}
local randomSuffixes = {"Smith", "Johnson", "Dover", "Wang", "Kim", "Lee", "Brown", "Davis", "Evans", "Garcia", "", "Russel", "King"}

local randomPrefix = randomPrefixes[math.random(1, #randomPrefixes)]
local randomSuffix = randomSuffixes[math.random(1, #randomSuffixes)]
Expand All @@ -62,7 +62,7 @@ function ENT:Think()

if self.ACF.Health <= self.ACF.MaxHealth * 0.97 then
ACF_HEKill( self, VectorRand() , 0)
self:EmitSound("npc/combine_soldier/die" .. tostring(math.random(1, 3)) .. ".wav")
self:EmitSound("npc/combine_soldier/die" .. tostring(math.random(1, 3)) .. ".wav", 50)
end

self:UpdateOverlayText()
Expand Down
4 changes: 2 additions & 2 deletions lua/entities/ace_crewseat_loader/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ function ENT:Initialize()
else
-- Generate a random name
local randomPrefixes = {"John", "Bob", "Sam", "Joe", "Ben", "Alex", "Chris", "David", "Eric", "Frank", "Antonio", "Ivan"}
local randomSuffixes = {"Smith", "Johnson", "Dover", "Wang", "Kim", "Lee", "Brown", "Davis", "Evans", "Garcia", "", "Russel"}
local randomSuffixes = {"Smith", "Johnson", "Dover", "Wang", "Kim", "Lee", "Brown", "Davis", "Evans", "Garcia", "", "Russel" , "King"}

local randomPrefix = randomPrefixes[math.random(1, #randomPrefixes)]
local randomSuffix = randomSuffixes[math.random(1, #randomSuffixes)]
Expand Down Expand Up @@ -101,7 +101,7 @@ end
function ENT:Think()
if self.ACF.Health <= self.ACF.MaxHealth * 0.97 then
ACF_HEKill(self, VectorRand(), 0)
self:EmitSound("npc/combine_soldier/die" .. tostring(math.random(1, 3)) .. ".wav")
self:EmitSound("npc/combine_soldier/die" .. tostring(math.random(1, 3)) .. ".wav", 60)
end

self:IncreaseStamina()
Expand Down
35 changes: 19 additions & 16 deletions lua/entities/acf_gun/cl_init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -89,15 +89,15 @@ function ACFGunGUICreate( Table )
local GunClass = ACF.Classes.GunClass[Table.gunclass]
acfmenupanel:CPanelText("ClassDesc", GunClass.desc)
acfmenupanel:CPanelText("GunDesc", Table.desc)
acfmenupanel:CPanelText("Caliber", "Caliber : " .. (Table.caliber * 10) .. "mm")
acfmenupanel:CPanelText("Weight", "Weight : " .. Table.weight .. "kg")
acfmenupanel:CPanelText("Year", "Year : " .. Table.year)
acfmenupanel:CPanelText("Caliber", "Caliber: " .. (Table.caliber * 10) .. "mm")
acfmenupanel:CPanelText("Weight", "Weight: " .. Table.weight .. "kg")
acfmenupanel:CPanelText("Year", "Year: " .. Table.year)

if Table.rack then
if Table.seekcone then acfmenupanel:CPanelText("SeekCone", "Seek Cone : " .. Table.seekcone .. " degrees") end
if Table.viewcone then acfmenupanel:CPanelText("ViewCone", "View Cone : " .. Table.viewcone .. " degrees") end
if Table.rack then -- if it is missile
if Table.seekcone then acfmenupanel:CPanelText("SeekCone", "Seek Cone: " .. Table.seekcone .. " degrees") end
if Table.viewcone then acfmenupanel:CPanelText("ViewCone", "View Cone: " .. Table.viewcone .. " degrees") end

if Table.guidelay then acfmenupanel:CPanelText("GuiDelay", "Minimum delay to start maneuvers : " .. Table.guidelay .. " seconds")
if Table.guidelay then acfmenupanel:CPanelText("GuiDelay", "Minimum delay to start maneuvers: " .. Table.guidelay .. " seconds")
else acfmenupanel:CPanelText("GuiDelay", "With a guidance, this ordnance will start to do maneuvers with no delays") end


Expand All @@ -111,7 +111,7 @@ function ACFGunGUICreate( Table )
end

if guitxt ~= "" then
acfmenupanel:CPanelText("Guidances", "\nAvailable guidances : \n" .. guitxt )
acfmenupanel:CPanelText("Guidances", "\nAvailable guidances: \n" .. guitxt )
end
end

Expand All @@ -122,18 +122,21 @@ function ACFGunGUICreate( Table )
guitxt = guitxt .. "- " .. fuses .. "\n"
end

acfmenupanel:CPanelText("Fuses", "Available fuses : \n" .. guitxt )
acfmenupanel:CPanelText("Fuses", "Available fuses: \n" .. guitxt )
end

else
local RoundVolume = 3.1416 * (Table.caliber / 2) ^ 2 * Table.round.maxlength
else -- if gun
local RoundVolume = math.pi * (Table.caliber / 2) ^ 2 * Table.round.maxlength
local RoF = 60 / (((RoundVolume / 500 ) ^ 0.60 ) * GunClass.rofmod * (Table.rofmod or 1)) --class and per-gun use same var name
acfmenupanel:CPanelText("Firerate", "RoF : " .. math.Round(RoF,1) .. " rounds/min")
if Table.magsize then acfmenupanel:CPanelText("Magazine", "Magazine : " .. Table.magsize .. " rounds\nReload : " .. Table.magreload .. " s") end
acfmenupanel:CPanelText("Spread", "Spread : " .. (GunClass.spread * 1.5) .. " degrees")
acfmenupanel:CPanelText("Spread_Gunner", "Spread with gunner : " .. GunClass.spread .. " degrees")
acfmenupanel:CPanelText("Firerate", "RoF: " .. math.Round(RoF, 1) .. " rounds/min")

if Table.maxrof then
acfmenupanel:CPanelText("Max_Rof", "Maximum RoF: " .. Table.maxrof .. " rounds/min")
end
if Table.magsize then acfmenupanel:CPanelText("Magazine", "Magazine: " .. Table.magsize .. " rounds\nReload: " .. Table.magreload .. " s") end
acfmenupanel:CPanelText("Spread", "Spread: " .. (GunClass.spread * 1.5) .. " degrees")
acfmenupanel:CPanelText("Spread_Gunner", "Spread with gunner: " .. GunClass.spread .. " degrees")

--acfmenupanel:CPanelText("GunParentable", "\nThis weapon can be parented.\n", "DermaDefaultBold")
end

acfmenupanel.CustomDisplay:PerformLayout()
Expand Down

0 comments on commit d8871dd

Please sign in to comment.