Skip to content

Commit 410cd4b

Browse files
committed
chore: general code maintenance
1 parent 6bfead8 commit 410cd4b

31 files changed

+2641
-1493
lines changed

CONTRIBUTING.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ You are free to use any style you want, except in these cases:
9696
| Enum Members | Preferably UPPER_SNAKE_CASE but PascalCase is also allowed | `eExampleEnum.SOME_MEMBER`/`eExampleEnum.SomeMember` |
9797
| Classes | PascalCase | `MyNewClass = Class("MyNewClass")` |
9898
| Class Methods | PascalCase | `function MyNewClass:ExampleMethod(...) end` |
99-
| Class Private Variables | snake_case prefixed with an `m` | `m_handle` |
99+
| Class Members | snake_case prefixed with an `m` | `m_handle` |
100100

101101
### Formatting
102102

SmallBase/includes/backend.lua

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ eBackendEvent = {
2020
}
2121

2222
---@enum eEntityType
23-
eEntityTypes = {
23+
eEntityType = {
2424
Ped = 1,
2525
Vehicle = 2,
2626
Object = 3
@@ -45,14 +45,14 @@ Backend = {
4545
CreatedBlips = {},
4646
AttachedEntities = {},
4747
SpawnedEntities = {
48-
[eEntityTypes.Ped] = {},
49-
[eEntityTypes.Vehicle] = {},
50-
[eEntityTypes.Object] = {},
48+
[eEntityType.Ped] = {},
49+
[eEntityType.Vehicle] = {},
50+
[eEntityType.Object] = {},
5151
},
5252
MaxAllowedEntities = {
53-
[eEntityTypes.Ped] = 50,
54-
[eEntityTypes.Vehicle] = 25,
55-
[eEntityTypes.Object] = 75,
53+
[eEntityType.Ped] = 50,
54+
[eEntityType.Vehicle] = 25,
55+
[eEntityType.Object] = 75,
5656
},
5757
}
5858
Backend.__index = Backend

SmallBase/includes/classes/CEntity.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ end
6464
---@return eModelType
6565
function CEntity:GetModelType()
6666
if not self:IsValid() then
67-
return 0
67+
return eModelType.Invalid
6868
end
6969

7070
return (self.m_model_type:get_word() & 0x1F)

SmallBase/includes/classes/CPed.lua

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,10 +71,10 @@ function CPed:HasSeatbelt()
7171
return (self.m_seatbelt & 0x3) ~= 0
7272
end
7373

74-
---@return number
74+
---@return float
7575
function CPed:GetSpeed()
7676
if not self:IsValid() then
77-
return 0
77+
return 0.0
7878
end
7979

8080
local speed_vec = self.m_velocity:get_vec3()

0 commit comments

Comments
 (0)