smgs
This commit is contained in:
@@ -201,7 +201,7 @@
|
||||
|
||||
/obj/item/stock_parts/cell/lascarbine
|
||||
name = "laser carbine power supply"
|
||||
maxcharge = 1670 //20 laser shots.
|
||||
maxcharge = 1500 //20 laser shots.
|
||||
|
||||
/obj/item/stock_parts/cell/pulse //200 pulse shots
|
||||
name = "pulse rifle power cell"
|
||||
|
||||
@@ -3,11 +3,11 @@
|
||||
icon_state = "46x30mmt-20"
|
||||
ammo_type = /obj/item/ammo_casing/c46x30mm
|
||||
caliber = "4.6x30mm"
|
||||
max_ammo = 20
|
||||
max_ammo = 32
|
||||
|
||||
/obj/item/ammo_box/magazine/wt550m9/update_icon()
|
||||
..()
|
||||
icon_state = "46x30mmt-[round(ammo_count(),4)]"
|
||||
icon_state = "46x30mmt-[round(20*(ammo_count()/max_ammo),4)]"
|
||||
|
||||
/obj/item/ammo_box/magazine/wt550m9/wtap
|
||||
name = "wt550 magazine (Armour Piercing 4.6x30mm)"
|
||||
@@ -16,7 +16,7 @@
|
||||
|
||||
/obj/item/ammo_box/magazine/wt550m9/wtap/update_icon()
|
||||
..()
|
||||
icon_state = "46x30mmtA-[round(ammo_count(),4)]"
|
||||
icon_state = "46x30mmtA-[round(20*(ammo_count()/max_ammo),4)]"
|
||||
|
||||
/obj/item/ammo_box/magazine/wt550m9/wtic
|
||||
name = "wt550 magazine (Incendiary 4.6x30mm)"
|
||||
@@ -25,7 +25,7 @@
|
||||
|
||||
/obj/item/ammo_box/magazine/wt550m9/wtic/update_icon()
|
||||
..()
|
||||
icon_state = "46x30mmtI-[round(ammo_count(),4)]"
|
||||
icon_state = "46x30mmtI-[round(20*(ammo_count()/max_ammo),4)]"
|
||||
|
||||
/obj/item/ammo_box/magazine/uzim9mm
|
||||
name = "uzi magazine (9mm)"
|
||||
|
||||
@@ -34,6 +34,7 @@
|
||||
var/semicd = 0 //cooldown handler
|
||||
var/weapon_weight = WEAPON_LIGHT
|
||||
var/spread = 0 //Spread induced by the gun itself.
|
||||
var/burst_spread = 0 //Spread induced by the gun itself during burst fire per iteration. Only checked if spread is 0.
|
||||
var/randomspread = 1 //Set to 0 for shotguns. This is used for weapons that don't fire all their bullets at once.
|
||||
|
||||
lefthand_file = 'icons/mob/inhands/weapons/guns_lefthand.dmi'
|
||||
@@ -227,9 +228,9 @@
|
||||
to_chat(user, "<span class='notice'> [src] is lethally chambered! You don't want to risk harming anyone...</span>")
|
||||
return
|
||||
if(randomspread)
|
||||
sprd = round((rand() - 0.5) * DUALWIELD_PENALTY_EXTRA_MULTIPLIER * (randomized_gun_spread + randomized_bonus_spread))
|
||||
sprd = round((rand() - 0.5) * DUALWIELD_PENALTY_EXTRA_MULTIPLIER * (randomized_gun_spread + randomized_bonus_spread), 1)
|
||||
else //Smart spread
|
||||
sprd = round((((rand_spr/burst_size) * iteration) - (0.5 + (rand_spr * 0.25))) * (randomized_gun_spread + randomized_bonus_spread))
|
||||
sprd = round((((rand_spr/burst_size) * iteration) - (0.5 + (rand_spr * 0.25))) * (randomized_gun_spread + randomized_bonus_spread), 1)
|
||||
|
||||
if(!chambered.fire_casing(target, user, params, ,suppressed, zone_override, sprd))
|
||||
shoot_with_empty_chamber(user)
|
||||
@@ -260,7 +261,9 @@
|
||||
var/randomized_gun_spread = 0
|
||||
var/rand_spr = rand()
|
||||
if(spread)
|
||||
randomized_gun_spread = rand(0,spread)
|
||||
randomized_gun_spread = rand(0, spread)
|
||||
else if(burst_size > 1 && burst_spread)
|
||||
randomized_gun_spread = rand(0, burst_spread)
|
||||
if(HAS_TRAIT(user, TRAIT_POOR_AIM)) //nice shootin' tex
|
||||
bonus_spread += 25
|
||||
var/randomized_bonus_spread = rand(0, bonus_spread)
|
||||
|
||||
@@ -58,12 +58,10 @@
|
||||
var/mob/living/carbon/human/user = usr
|
||||
select = !select
|
||||
if(!select)
|
||||
burst_size = 1
|
||||
fire_delay = 0
|
||||
disable_burst()
|
||||
to_chat(user, "<span class='notice'>You switch to semi-automatic.</span>")
|
||||
else
|
||||
burst_size = initial(burst_size)
|
||||
fire_delay = initial(fire_delay)
|
||||
enable_burst()
|
||||
to_chat(user, "<span class='notice'>You switch to [burst_size]-rnd burst.</span>")
|
||||
|
||||
playsound(user, 'sound/weapons/empty.ogg', 100, 1)
|
||||
@@ -72,6 +70,14 @@
|
||||
var/datum/action/A = X
|
||||
A.UpdateButtonIcon()
|
||||
|
||||
/obj/item/gun/ballistic/automatic/proc/enable_burst()
|
||||
burst_size = initial(burst_size)
|
||||
fire_delay = initial(fire_delay)
|
||||
|
||||
/obj/item/gun/ballistic/automatic/proc/disable_burst()
|
||||
burst_size = 1
|
||||
fire_delay = 0
|
||||
|
||||
/obj/item/gun/ballistic/automatic/can_shoot()
|
||||
return get_ammo()
|
||||
|
||||
@@ -118,14 +124,21 @@
|
||||
icon_state = "wt550"
|
||||
item_state = "arg"
|
||||
mag_type = /obj/item/ammo_box/magazine/wt550m9
|
||||
fire_delay = 2
|
||||
fire_delay = 4
|
||||
can_suppress = FALSE
|
||||
burst_size = 0
|
||||
actions_types = list()
|
||||
burst_size = 2
|
||||
can_bayonet = TRUE
|
||||
knife_x_offset = 25
|
||||
knife_y_offset = 12
|
||||
|
||||
/obj/item/gun/ballistic/automatic/wt550/enable_burst()
|
||||
. = ..()
|
||||
spread = 5
|
||||
|
||||
/obj/item/gun/ballistic/automatic/wt550/disable_burst()
|
||||
. = ..()
|
||||
spread = 0
|
||||
|
||||
/obj/item/gun/ballistic/automatic/wt550/update_icon()
|
||||
..()
|
||||
icon_state = "wt550[magazine ? "-[CEILING(get_ammo(0)/4, 1)*4]" : ""]"
|
||||
|
||||
@@ -47,14 +47,14 @@
|
||||
|
||||
/obj/item/projectile/bullet/c46x30mm
|
||||
name = "4.6x30mm bullet"
|
||||
damage = 20
|
||||
damage = 15
|
||||
|
||||
/obj/item/projectile/bullet/c46x30mm_ap
|
||||
name = "4.6x30mm armor-piercing bullet"
|
||||
damage = 15
|
||||
damage = 12.5
|
||||
armour_penetration = 40
|
||||
|
||||
/obj/item/projectile/bullet/incendiary/c46x30mm
|
||||
name = "4.6x30mm incendiary bullet"
|
||||
damage = 10
|
||||
damage = 7.5
|
||||
fire_stacks = 1
|
||||
|
||||
Reference in New Issue
Block a user