File tree Expand file tree Collapse file tree 7 files changed +215
-131
lines changed
game/experiment/scripts/lua
weapons/weapon_experiment_base_scripted Expand file tree Collapse file tree 7 files changed +215
-131
lines changed Original file line number Diff line number Diff line change 11---
22template : lua-class-function.html
3- title : Think
3+ title : ExecuteThink
44icon : lua-shared
55tags :
66 - lua
99 - needs-example
1010lua :
1111 library : Entity
12- function : Think
12+ function : ExecuteThink
1313 realm : shared
1414 description : " Think."
15-
15+
1616 arguments :
1717 - position : 1
1818 name : " entity"
1919 type : Entity
2020 returns :
21-
21+
2222---
2323
2424<div class =" lua__search__keywords " >
25- Entity: Think – ; Think.
25+ Entity: ExecuteThink – ; Think.
2626</div >
Original file line number Diff line number Diff line change @@ -18,6 +18,9 @@ function MODULE.Get(className)
1818
1919 foundEntity = table .Copy (foundEntity )
2020
21+ --- @cast foundEntity table
22+ foundEntity .Base = foundEntity .Base or _BASE_ENTITY_CLASS
23+
2124 if (foundEntity .Base ~= className ) then
2225 local baseEntityTable = MODULE .GetStored (foundEntity .Base )
2326
Original file line number Diff line number Diff line change @@ -17,7 +17,9 @@ function MODULE.Get(weaponClassName)
1717 weaponTable = table .Copy (weaponTable )
1818
1919 --- @cast weaponTable table
20- if (weaponTable .Base and weaponTable .Base ~= weaponClassName ) then
20+ weaponTable .Base = weaponTable .Base or _BASE_WEAPON
21+
22+ if (weaponTable .Base ~= weaponClassName ) then
2123 local baseWeaponTable = MODULE .GetStored (weaponTable .Base )
2224
2325 if (not baseWeaponTable ) then
Original file line number Diff line number Diff line change @@ -5,12 +5,15 @@ SWEP.AnimationPrefix = "python"
55SWEP .InventorySlot = 1
66SWEP .InventorySlotPosition = 1
77
8- SWEP .MaxClip = 6
9- SWEP .MaxClip2 = - 1
10- SWEP .DefaultClip = 6
11- SWEP .DefaultClip2 = - 1
12- SWEP .PrimaryAmmo = " Pistol"
13- SWEP .SecondaryAmmo = " None"
8+ SWEP .Primary .Ammo = " Pistol"
9+ SWEP .Primary .ClipSize = 6
10+ SWEP .Primary .DefaultClip = 6
11+ SWEP .Primary .Automatic = false
12+
13+ SWEP .Secondary .Ammo = " None"
14+ SWEP .Secondary .ClipSize = - 1
15+ SWEP .Secondary .DefaultClip = - 1
16+ SWEP .Secondary .Automatic = false
1417
1518SWEP .Weight = 7
1619SWEP .WeaponFlags = 0
You can’t perform that action at this time.
0 commit comments