File tree Expand file tree Collapse file tree 2 files changed +3
-12
lines changed Expand file tree Collapse file tree 2 files changed +3
-12
lines changed Original file line number Diff line number Diff line change @@ -33,16 +33,10 @@ function RangedWeapon:attack()
33
33
end
34
34
35
35
function RangedWeapon :serialize ()
36
- local t = {
37
- [' id' ] = self .template .id ,
38
- [' itemType' ] = self .template .itemType ,
39
- [' modeIndex' ] = self :getAttackModeIndex ()
40
- }
41
-
36
+ local t = RangedWeapon .super .serialize ( self )
42
37
if self .magazine then
43
38
t [' magazine' ] = self .magazine :serialize ()
44
39
end
45
-
46
40
return t
47
41
end
48
42
Original file line number Diff line number Diff line change @@ -42,11 +42,8 @@ function Weapon:selectPrevFiringMode()
42
42
end
43
43
44
44
function Weapon :serialize ()
45
- local t = {
46
- [' id' ] = self .id ,
47
- [' itemType' ] = self .itemType ,
48
- [' modeIndex' ] = self .modeIndex
49
- }
45
+ local t = Weapon .super .serialize ( self )
46
+ t [' modeIndex' ] = self .modeIndex
50
47
return t
51
48
end
52
49
You can’t perform that action at this time.
0 commit comments