-
Notifications
You must be signed in to change notification settings - Fork 0
/
gglock17.lua
85 lines (75 loc) · 3.01 KB
/
gglock17.lua
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
minetest.register_tool("rangedweapons:gglock17_rld", {
stack_max= 1,
wield_scale = {x=1.1,y=1.1,z=1.05},
description = "",
loaded_gun = "rangedweapons:gglock17",
range = 0,
groups = {not_in_creative_inventory = 1},
inventory_image = "rangedweapons_gglock17_rld.png",
})
minetest.register_tool("rangedweapons:gglock17_r", {
stack_max= 1,
wield_scale = {x=1.2,y=1.2,z=1.2},
description = "",
rw_next_reload = "rangedweapons:gglock17_rr",
load_sound = "rangedweapons_handgun_mag_in",
range = 0,
groups = {not_in_creative_inventory = 1},
inventory_image = "rangedweapons_gglock17.png",
})
minetest.register_tool("rangedweapons:gglock17_rr", {
stack_max= 1,
wield_scale = {x=1.2,y=1.2,z=1.2},
description = "",
rw_next_reload = "rangedweapons:gglock17_rrr",
load_sound = "rangedweapons_reload_a",
range = 0,
groups = {not_in_creative_inventory = 1},
inventory_image = "rangedweapons_gglock17.png",
})
minetest.register_tool("rangedweapons:gglock17_rrr", {
stack_max= 1,
wield_scale = {x=1.2,y=1.2,z=1.2},
description = "",
rw_next_reload = "rangedweapons:gglock17",
load_sound = "rangedweapons_reload_b",
range = 0,
groups = {not_in_creative_inventory = 1},
inventory_image = "rangedweapons_gglock17_rld.png",
})
minetest.register_tool("rangedweapons:gglock17", {
description = "" ..core.colorize("#35cdff","Hood Glock 17\n") ..core.colorize("#FFFFFF", "Gun damage: 5\n") ..core.colorize("#FFFFFF", "Accuracy: 96%\n") ..core.colorize("#FFFFFF", "Gun knockback: 4\n") ..core.colorize("#FFFFFF", "Gun Critical chance: 15%\n") ..core.colorize("#FFFFFF", "Gun Critical efficiency: 2.2x\n") ..core.colorize("#FFFFFF", "Reload delay: 0.9\n")..core.colorize("#FFFFFF", "Clip size: 17/17/17\n") ..core.colorize("#FFFFFF", "Ammunition: 9x19mm Parabellum/10mm Auto/.45acp\n") ..core.colorize("#FFFFFF", "Rate of fire: 0.35\n") ..core.colorize("#FFFFFF", "Gun type: Handgun\n") ..core.colorize("#FFFFFF", "Bullet velocity: 30"),
wield_scale = {x=1.2,y=1.2,z=1.2},
range = 0,
inventory_image = "rangedweapons_gglock17.png",
RW_gun_capabilities = {
automatic_gun = 1,
gun_damage = {fleshy=2,knockback=0},
gun_crit = 15,
gun_critEffc = 2.2,
suitable_ammo = {{"rangedweapons:9mm",17},{"rangedweapons:10mm",17},{"rangedweapons:45acp",17}},
gun_skill = {"mp_skill",45},
gun_magazine = "rangedweapons:handgun_mag_black",
gun_icon = "rangedweapons_glock17_icon.png",
gun_unloaded = "rangedweapons:gglock17_r",
gun_cooling = "rangedweapons:gglock17_rld",
gun_velocity = 30,
gun_accuracy = 96,
gun_cooldown = 0.1,
gun_reload = 0.9/4,
gun_projectiles = 1,
has_shell = 1,
gun_durability = 1400,
gun_smokeSize = 5,
gun_unload_sound = "rangedweapons_fool",
gun_sound = "rangedweapons_glock",
},
on_secondary_use = function(itemstack, user, pointed_thing)
rangedweapons_reload_gun(itemstack, user)
return itemstack
end,
on_use = function(itemstack, user, pointed_thing)
rangedweapons_shoot_gun(itemstack, user)
return itemstack
end,
})