Advertisement
Guest User

Untitled

a guest
Jul 31st, 2011
104
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 2.31 KB | None | 0 0
  1. -- Smallarms - Infantry Rifles
  2.  
  3. -- Rifle Base Class
  4. local RifleClass = Weapon:New{
  5.   accuracy           = 100,
  6.   areaOfEffect       = 1,
  7.   avoidFeature       = true,
  8.   avoidFriendly      = false,
  9.   collideFeature     = true,
  10.   collideFriendly    = false,
  11.   collisionSize      = 2.5,
  12.   coreThickness      = 0.15,
  13.   duration           = 0.01,
  14.   explosionGenerator = [[custom:Bullet]],
  15.   fireStarter        = 0,
  16.   id                 = 2, -- used for cob based fear from rifle/smg
  17.   impactonly         = 1,
  18.   intensity          = 0.9,
  19.   interceptedByShieldType = 8,
  20.   laserFlareSize     = 0.0001,
  21.   movingAccuracy     = 888,
  22.   rgbColor           = [[1.0 0.75 0.0]],
  23.   soundTrigger       = false,
  24.   sprayAngle         = 100,
  25.   thickness          = 0.4,
  26.   tolerance          = 6000,
  27.   turret             = true,
  28.   weaponType         = [[LaserCannon]],
  29.   weaponVelocity     = 1500,
  30.   customparams = {
  31.     damagetype         = [[smallarm]],
  32.   },
  33.   damage = {
  34.     default            = 33,
  35.   },
  36. }
  37.  
  38. -- Implementations
  39.  
  40. -- SMLE No. 4 Mk. I (GBR)
  41. local Enfield = RifleClass:New{
  42.   accuracy           = 50, -- overwrites default
  43.   name               = [[Lee-Enfield No. 4 Mk. I]],
  44.   range              = 680,
  45.   reloadtime         = 2.5,
  46.   soundStart         = [[GBR_Enfield]],
  47. }
  48.  
  49. -- Karabiner 98K (GER)
  50. local K98k = RifleClass:New{
  51.   name               = [[Karabiner 98k]],
  52.   range              = 665,
  53.   reloadtime         = 2.8,
  54.   soundStart         = [[GER_K98K]],
  55. }
  56.  
  57. -- M1 Garand (USA)
  58. local M1Garand = RifleClass:New{
  59.   name               = [[M1 Garand]],
  60.   range              = 510,
  61.   reloadtime         = 1.8,
  62.   soundStart         = [[US_M1garand]],
  63. }
  64.  
  65. -- Mosin Nagant M1890/30 (RUS)
  66. local MosinNagant = RifleClass:New{
  67.   name               = [[Mosin-Nagant]],
  68.   range              = 660,
  69.   reloadtime         = 3,
  70.   rgbColor           = [[0.0 0.7 0.0]], -- overwrites default
  71.   soundStart         = [[RUS_MosinNagant]],
  72. }
  73.  
  74. -- Mosin Nagant for puny partisan
  75. -- derives from the above MosinNagant
  76. local PartisanMosinNagant = MosinNagant:New{
  77.   accuracy           = 225,
  78.   movingAccuracy     = 1800,
  79. }
  80.  
  81. -- Return only the full weapons
  82. return lowerkeys({
  83.   Enfield = Enfield,
  84.   K98k = K98k,
  85.   M1Garand = M1Garand,
  86.   MosinNagant = MosinNagant,
  87.   PartisanMosinNagant = PartisanMosinNagant,
  88. })
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement