Gun update: the end of the space cold war (#6742)

-replaces the sprites of the guns that were pretty much justreferences to guns in real life, like the uzi and the dragunov, with new future sprites made by kyres
-adds the hand cannon
-makes some guns cheaper at the merchant
-fixes a broken message with the prank guns
-added a small animation when someone is hit by a blaster projectile
This commit is contained in:
Alberyk
2019-07-24 21:31:09 +03:00
committed by Erki
parent 6bd571c8cf
commit b0e6ece48b
30 changed files with 140 additions and 47 deletions
+2 -4
View File
@@ -301,7 +301,7 @@
initial_ammo = 0
/obj/item/ammo_magazine/tommymag
name = "tommygun magazine (.45)"
name = "magazine (.45)"
icon_state = "tommy-mag"
mag_type = MAGAZINE
ammo_type = /obj/item/ammo_casing/c45
@@ -313,7 +313,7 @@
initial_ammo = 0
/obj/item/ammo_magazine/tommydrum
name = "tommygun drum magazine (.45)"
name = "drum magazine (.45)"
icon_state = "tommy-drum"
w_class = 3 // Bulky ammo doesn't fit in your pockets!
mag_type = MAGAZINE
@@ -336,7 +336,6 @@
/obj/item/ammo_magazine/d762
name = "magazine (7.62mm)"
icon = 'icons/obj/dragunov.dmi'
icon_state = "SVD"
mag_type = MAGAZINE
caliber = "a762"
@@ -379,7 +378,6 @@
/obj/item/ammo_magazine/assault_shotgun
name = "magazine (slug)"
icon = 'icons/obj/dragunov.dmi'
icon_state = "csmb"
caliber = "shotgun"
mag_type = MAGAZINE
+21 -1
View File
@@ -287,4 +287,24 @@
desc = "A plasma bolt."
icon_state = "plasmabolt"
caliber = "plasma bolt"
projectile_type = /obj/item/projectile/plasma/light
projectile_type = /obj/item/projectile/plasma/light
/obj/item/ammo_casing/cannon
name = "cannonball"
desc = "A solid metal projectile."
icon_state = "cannonball"
caliber = "cannon"
projectile_type = /obj/item/projectile/bullet/cannonball
matter = list(DEFAULT_WALL_MATERIAL = 800)
w_class = 3
/obj/item/ammo_casing/cannon/explosive
name = "explosive cannonball"
desc = "A solid metal projectile loaded with an explosive charge."
icon_state = "cannonball_explosive"
projectile_type = /obj/item/projectile/bullet/cannonball/explosive
/obj/item/ammo_casing/cannon/canister
name = "canister shot"
desc = "A solid projectile filled with deadly shrapnel."
projectile_type = /obj/item/projectile/bullet/pellet/shotgun/canister
+1 -1
View File
@@ -326,7 +326,7 @@
P.launch_projectile(target)
handle_post_fire() // should be safe to not include arguments here, as there are failsafes in effect (?)
if(silenced)
playsound(src, fire_sound, 10, 1)
else
+1 -1
View File
@@ -19,7 +19,7 @@
/obj/item/weapon/gun/bang/handle_click_empty(mob/user)
if (user)
user.visible_message("<span class='danger'>The flag is already out!</span>")
to_chat(user, "<span class='danger'>The flag is already out!</span>")
/obj/item/weapon/gun/bang/Fire(atom/target, mob/living/user, clickparams, pointblank=0, reflex=0)
if(!user || !target) return
@@ -48,15 +48,6 @@ obj/item/weapon/gun/bang/deagle
pixel_offset_x = -4
pixel_offset_y = 16
/obj/item/weapon/gun/bang/deagle/gold
desc = "A gold plated gun folded over a million times by superior martian gunsmiths. Uses .50 AE ammo."
icon_state = "deagleg"
item_state = "deagleg"
/obj/item/weapon/gun/bang/deagle/camo
desc = "A Deagle brand Deagle for operators operating operationally. Uses .50 AE ammo."
icon_state = "deaglecamo"
/obj/item/weapon/gun/bang/pistol
name = "9mm pistol"
desc = "500 years since its creation and the Stechkin automatic pistol is still a common sight throughout the Frontier."
@@ -24,8 +24,9 @@
/obj/item/weapon/gun/projectile/automatic/mini_uzi
name = ".45 machine pistol"
desc = "The UZI is a lightweight, fast firing gun. For when you want someone dead. Uses .45 rounds."
desc = "A lightweight, fast firing gun. For when you want someone dead. Uses .45 rounds."
icon_state = "mini-uzi"
item_state = "mini-uzi"
w_class = 3
load_method = MAGAZINE
magazine_type = /obj/item/ammo_magazine/c45uzi
@@ -313,8 +314,9 @@
/obj/item/weapon/gun/projectile/automatic/tommygun
name = "vintage submachine gun"
desc = "A classic Thompson submachine gun, ya see? Uses .45 rounds."
desc = "A classic submachine gun. Uses .45 rounds."
icon_state = "tommygun"
item_state = "tommygun"
w_class = 3
max_shells = 50
caliber = ".45"
@@ -401,10 +403,8 @@
/obj/item/weapon/gun/projectile/automatic/rifle/shotgun
name = "assault shotgun"
desc = "A experimental, semi-automatic combat shotgun, designed for boarding operations and law enforcement agencies."
icon = 'icons/obj/dragunov.dmi' //lazy but works fine
icon_state = "cshotgun"
item_state = "cshotgun"
contained_sprite = 1
icon_state = "assaultshotgun"
item_state = "assaultshotgun"
w_class = 4
load_method = MAGAZINE
max_shells = 8
@@ -432,4 +432,4 @@
/obj/item/weapon/gun/projectile/automatic/rifle/shotgun/update_icon()
..()
icon_state = (ammo_magazine)? "cshotgun" : "cshotgun-empty"
icon_state = (ammo_magazine)? "assaultshotgun" : "assaultshotgun-empty"
@@ -0,0 +1,33 @@
/obj/item/weapon/gun/projectile/cannon
name = "hand cannon"
desc = "An amalgamation of ancient and modern tajaran technology. This old naval cannon was turned into a portable firearm."
icon_state = "cannon"
item_state = "cannon"
caliber = "cannon"
origin_tech = list(TECH_COMBAT = 3, TECH_MATERIAL = 3)
load_method = SINGLE_CASING
handle_casings = DELETE_CASINGS
slot_flags = SLOT_BACK
max_shells = 1
ammo_type = /obj/item/ammo_casing/cannon
fire_delay = 25
fire_sound = 'sound/effects/Explosion1.ogg'
recoil = 4
action_button_name = "Wield hand cannon"
is_wieldable = TRUE
/obj/item/weapon/gun/projectile/cannon/update_icon()
if(wielded)
item_state = "cannon-wielded"
else
item_state = "cannon"
update_held_icon()
/obj/item/weapon/gun/projectile/cannon/special_check(mob/user)
if(!wielded)
to_chat(user, "<span class='warning'>You can't fire without stabilizing \the [src]!</span>")
return 0
return ..()
@@ -153,15 +153,6 @@
else
icon_state = "[initial(icon_state)]-e"
/obj/item/weapon/gun/projectile/deagle/gold
desc = "A gold plated gun folded over a million times by superior martian gunsmiths. Uses .50 AE ammo."
icon_state = "deagleg"
item_state = "deagleg"
/obj/item/weapon/gun/projectile/deagle/camo
desc = "A Deagle brand Deagle for operators operating operationally. Uses .50 AE ammo."
icon_state = "deaglecamo"
/obj/item/weapon/gun/projectile/gyropistol
name = "gyrojet pistol"
desc = "A bulky pistol designed to fire self propelled rounds"
@@ -136,9 +136,9 @@
/obj/item/weapon/gun/projectile/revolver/lemat
name = "grapeshot revolver"
desc = "The LeMat revolver is a 6 shot revolver with a secondary firing barrel loading shotgun shells. Uses .38-Special and 12g rounds depending on the barrel."
desc = "A six shot revolver with a secondary firing barrel loading shotgun shells. Uses .38-Special and 12g rounds depending on the barrel."
icon_state = "lemat"
item_state = "revolver"
item_state = "lemat"
origin_tech = list(TECH_COMBAT = 2, TECH_MATERIAL = 2)
handle_casings = CYCLE_CASINGS
max_shells = 6
@@ -11,7 +11,7 @@
pump_fail_msg = "<span class='warning'>You cannot work the rifle's bolt without gripping it with both hands!</span>"
pump_snd = 'sound/weapons/riflebolt.ogg'
has_wield_state = FALSE
has_wield_state = TRUE
can_bayonet = TRUE
knife_x_offset = 23
@@ -28,6 +28,7 @@
slot_flags &= ~SLOT_BACK
slot_flags |= (SLOT_BELT|SLOT_HOLSTER)
can_bayonet = FALSE
has_wield_state = FALSE
if(bayonet)
qdel(bayonet)
bayonet = null
@@ -46,12 +47,13 @@
accuracy = -2
slot_flags = SLOT_BELT|SLOT_HOLSTER
can_bayonet = FALSE
has_wield_state = FALSE
/obj/item/weapon/gun/projectile/contender
name = "pocket rifle"
desc = "A perfect, pristine replica of an ancient one-shot hand-cannon. This one has been modified to work almost like a bolt-action. Uses 5.56mm rounds."
icon_state = "pockrifle"
item_state = "obrez"
item_state = "pockrifle"
caliber = "a556"
handle_casings = HOLD_CASINGS
max_shells = 1
@@ -79,7 +81,10 @@
to_chat(user, "<span class='notice'>You cycle back the bolt on \the [src], ejecting the casing and allowing you to reload.</span>")
playsound(user, 'sound/weapons/riflebolt.ogg', 60, 1)
icon_state = icon_retracted
item_state = icon_retracted
retracted_bolt = 1
user.update_inv_l_hand()
user.update_inv_r_hand()
return 1
else if(retracted_bolt && loaded.len)
@@ -89,6 +94,11 @@
to_chat(user, "<span class='notice'>You cycle the bolt back into position, leaving the gun empty.</span>")
icon_state = initial(icon_state)
item_state = initial(item_state)
user.update_inv_l_hand()
user.update_inv_r_hand()
retracted_bolt = 0
/obj/item/weapon/gun/projectile/contender/load_ammo(var/obj/item/A, mob/user)
@@ -239,5 +249,4 @@
item_state = "gauss_thumper"
update_held_icon()
return
return
@@ -119,10 +119,8 @@
/obj/item/weapon/gun/projectile/dragunov
name = "antique sniper rifle"
desc = "An old Dragunov semi-automatic marksman rifle. Smells of vodka and Communism. Uses 7.62mm rounds."
icon = 'icons/obj/dragunov.dmi'
icon_state = "dragunov"
item_state = "dragunov"
contained_sprite = 1
w_class = 4
force = 10
slot_flags = SLOT_BACK
@@ -149,6 +147,13 @@
else
icon_state = "dragunov-empty"
if(wielded)
item_state = "dragunov-wielded"
else
item_state = "dragunov"
update_held_icon()
/obj/item/weapon/gun/projectile/dragunov/special_check(mob/user)
if(!wielded)
to_chat(user, "<span class='warning'>You can't fire without stabilizing the rifle!</span>")
@@ -208,4 +213,4 @@
item_state = "heavysniper-wielded"
else
item_state = "heavysniper"
update_held_icon()
update_held_icon()
+4
View File
@@ -93,6 +93,7 @@
var/tracer_type
var/muzzle_type
var/impact_type
var/hit_effect
/obj/item/projectile/CanPass()
return TRUE
@@ -114,6 +115,9 @@
var/splatter_dir = starting ? get_dir(starting, target.loc) : dir
new /obj/effect/temp_visual/dir_setting/bloodsplatter(target.loc, splatter_dir, splatter_color)
if(hit_effect)
new hit_effect(target.loc)
L.apply_effects(stun, weaken, paralyze, 0, stutter, eyeblur, drowsy, agony, incinerate, blocked)
L.apply_effect(irradiate, IRRADIATE, L.getarmor(null, "rad")) //radiation protection is handled separately from other armour types.
return 1
@@ -176,6 +176,11 @@
range_step = 1
spread_step = 10
/obj/item/projectile/bullet/pellet/shotgun/canister
pellets = 15
range_step = 3
spread_step = 15
/* "Rifle" rounds */
/obj/item/projectile/bullet/rifle
@@ -326,3 +331,20 @@
damage = 30
muzzle_type = /obj/effect/projectile/muzzle/gauss
embed = 0
/obj/item/projectile/bullet/cannonball
name = "cannonball"
icon_state = "cannonball"
damage = 60
embed = 0
penetrating = 1
armor_penetration = 25
/obj/item/projectile/bullet/cannonball/explosive
damage = 30
penetrating = 0
armor_penetration = 5
/obj/item/projectile/bullet/cannonball/explosive/on_impact(var/atom/A)
explosion(A, -1, 1, 2)
..()
@@ -216,6 +216,7 @@
damage_type = BURN
pass_flags = PASSTABLE | PASSGLASS | PASSGRILLE
muzzle_type = /obj/effect/projectile/muzzle/bolt
hit_effect = /obj/effect/temp_visual/blaster_effect
/obj/item/projectile/energy/blaster/heavy
damage = 35