mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-22 19:47:22 +01:00
Barman's shotgun update.
git-svn-id: http://tgstation13.googlecode.com/svn/trunk@195 316c924e-a436-60f5-8080-3fe189b3f50e
This commit is contained in:
@@ -98,6 +98,16 @@
|
||||
icon_state = "357-7"
|
||||
amount_left = 7.0
|
||||
|
||||
/obj/item/weapon/ammo/bshell
|
||||
desc = "A weak beanbag shell."
|
||||
name = "beanbag shell"
|
||||
icon_state = "bshell"
|
||||
|
||||
/obj/item/weapon/ammo/gshell
|
||||
desc = "A 12gauge shell."
|
||||
name = "12 gauge shell"
|
||||
icon_state = "gshell"
|
||||
|
||||
/obj/item/weapon/ammo/a38
|
||||
desc = "A speedloader that contains 7 .38 Special rounds."
|
||||
name = "38-Special ammo"
|
||||
@@ -483,6 +493,15 @@
|
||||
throw_speed = 4
|
||||
throw_range = 10
|
||||
|
||||
/obj/item/weapon/gun/shotgun
|
||||
name = "shotgun"
|
||||
icon_state = "shotgun"
|
||||
w_class = 4.0
|
||||
force = 7.0
|
||||
var/pumped = 0.0
|
||||
var/s1 = 0.0
|
||||
var/s2 = 0.0
|
||||
|
||||
/obj/item/weapon/gun/energy
|
||||
name = "energy"
|
||||
var/charges = 10.0
|
||||
|
||||
@@ -417,6 +417,10 @@
|
||||
src.equip_if_possible(new /obj/item/clothing/under/bartender(src), slot_w_uniform)
|
||||
src.equip_if_possible(new /obj/item/clothing/shoes/black(src), slot_shoes)
|
||||
src.equip_if_possible(new /obj/item/clothing/suit/armor/vest(src), slot_wear_suit)
|
||||
src.equip_if_possible(new /obj/item/weapon/ammo/bshell(src), slot_in_backpack)
|
||||
src.equip_if_possible(new /obj/item/weapon/ammo/bshell(src), slot_in_backpack)
|
||||
src.equip_if_possible(new /obj/item/weapon/ammo/bshell(src), slot_in_backpack)
|
||||
src.equip_if_possible(new /obj/item/weapon/ammo/bshell(src), slot_in_backpack)
|
||||
|
||||
if ("Chef")
|
||||
src.equip_if_possible(new /obj/item/clothing/under/chef(src), slot_w_uniform)
|
||||
|
||||
@@ -182,7 +182,9 @@
|
||||
src.LL += new /obj/item/device/infra_sensor(src)
|
||||
src.LL += new /obj/item/weapon/handcuffs(src)
|
||||
src.LL += new /obj/item/weapon/ammo/a357(src)
|
||||
src.LL += new /obj/item/weapon/ammo/gshell(src)
|
||||
src.LL += new /obj/item/weapon/ammo/a38(src)
|
||||
src.LL += new /obj/item/weapon/ammo/bshell(src)
|
||||
// src.LL += new /obj/item/weapon/shield/riot(src)
|
||||
src.wires["Light Red"] = 0
|
||||
src.wires["Dark Red"] = 0
|
||||
|
||||
@@ -4,6 +4,8 @@ PROJECTILE DEFINES
|
||||
PULSE RIFLE
|
||||
357 AMMO
|
||||
38 AMMO
|
||||
SHOTGUN SHELLS
|
||||
SHOTGUN
|
||||
REVOLVER
|
||||
DETECTIVES REVOLVER
|
||||
LASER GUN
|
||||
@@ -134,8 +136,6 @@ TELEPORT GUN
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
// REVOLVER
|
||||
|
||||
/obj/item/weapon/gun/revolver/examine()
|
||||
@@ -213,16 +213,7 @@ obj/item/weapon/gun/revolver/attackby(obj/item/weapon/ammo/a357/A as obj, mob/us
|
||||
if ((istype(H, /mob/living/carbon/human) && istype(H, /obj/item/clothing/head) && H.flags & 8 && prob(80)))
|
||||
M << "\red The helmet protects you from being hit hard in the head!"
|
||||
return
|
||||
|
||||
if ((user.a_intent == "hurt" && src.bullets > 0))
|
||||
if (!istype(H:r_hand, /obj/item/weapon/shield/riot) && prob(20))
|
||||
for(var/mob/O in viewers(M, null))
|
||||
if (O.client) O.show_message(text("\red <B>[] has blocked []'s point-blank shot with the riot shield!</B>", M, user), 1, "\red You hear a cracking sound", 2)
|
||||
return
|
||||
if (!istype(H:l_hand, /obj/item/weapon/shield/riot) && prob(20))
|
||||
for(var/mob/O in viewers(M, null))
|
||||
if (O.client) O.show_message(text("\red <B>[] has blocked []'s point-blank shot with the riot shield!</B>", M, user), 1, "\red You hear a cracking sound", 2)
|
||||
return
|
||||
if (prob(20))
|
||||
if (M.paralysis < 10)
|
||||
M.paralysis = 10
|
||||
@@ -237,14 +228,6 @@ obj/item/weapon/gun/revolver/attackby(obj/item/weapon/ammo/a357/A as obj, mob/us
|
||||
for(var/mob/O in viewers(M, null))
|
||||
if(O.client) O.show_message(text("\red <B>[] has been shot point-blank by []!</B>", M, user), 1, "\red You hear someone fall", 2)
|
||||
else
|
||||
if (!istype(H:r_hand, /obj/item/weapon/shield/riot) && prob(40))
|
||||
for(var/mob/O in viewers(M, null))
|
||||
if (O.client) O.show_message(text("\red <B>[] has blocked []'s pistolwhip with the riot shield!</B>", M, user), 1, "\red You hear a cracking sound", 2)
|
||||
return
|
||||
if (!istype(H:l_hand, /obj/item/weapon/shield/riot) && prob(40))
|
||||
for(var/mob/O in viewers(M, null))
|
||||
if (O.client) O.show_message(text("\red <B>[] has blocked []'s pistolwhip with the riot shield!</B>", M, user), 1, "\red You hear a cracking sound", 2)
|
||||
return
|
||||
if (prob(50))
|
||||
if (M.paralysis < 60)
|
||||
M.paralysis = 60
|
||||
@@ -261,6 +244,126 @@ obj/item/weapon/gun/revolver/attackby(obj/item/weapon/ammo/a357/A as obj, mob/us
|
||||
|
||||
|
||||
|
||||
// SHOTGUN
|
||||
|
||||
/obj/item/weapon/gun/shotgun/examine()
|
||||
set src in usr
|
||||
|
||||
if (src.s1 >= 1 && src.s2 >= 1)
|
||||
src.desc = "There are 2 shells left!"
|
||||
if (src.s1 >= 1 && src.s2 == 0)
|
||||
src.desc = "There are 1 shells left!"
|
||||
if (src.s1 == 0 && src.s2 == 0)
|
||||
src.desc = "There are 0 shells left!"
|
||||
..()
|
||||
return
|
||||
|
||||
// if s1 is 0, not loaded. 1 is beanbag, 2 is 12gauge. same as s2.
|
||||
|
||||
/obj/item/weapon/gun/shotgun/attackby(obj/item/weapon/A as obj, mob/user as mob)
|
||||
|
||||
if (istype(A, /obj/item/weapon/ammo/bshell))
|
||||
//var/obj/item/weapon/ammo/bshell/A = B
|
||||
if ((src.s1 + src.s2) >= 2)
|
||||
user << "\blue It's already fully loaded!"
|
||||
return 1
|
||||
else
|
||||
user << "\blue You load the shell into the shotgun."
|
||||
if (src.s1 == 0)
|
||||
del(A)
|
||||
src.s1 = 1
|
||||
return 1
|
||||
else if (src.s2 == 0)
|
||||
del(A)
|
||||
src.s2 = 1
|
||||
return 1
|
||||
return 1
|
||||
return 1
|
||||
|
||||
else if (istype(A, /obj/item/weapon/ammo/gshell))
|
||||
//var/obj/item/weapon/ammo/gshell/A = B
|
||||
if ((src.s1 + src.s2) >= 2)
|
||||
user << "\blue It's already fully loaded!"
|
||||
return 1
|
||||
else
|
||||
user << "\blue You load the shell into the shotgun."
|
||||
if (src.s1 == 0)
|
||||
del(A)
|
||||
src.s1 = 2
|
||||
return 1
|
||||
else if (src.s2 == 0)
|
||||
del(A)
|
||||
src.s2 = 2
|
||||
return 1
|
||||
return 1
|
||||
return 1
|
||||
return 1
|
||||
|
||||
|
||||
/obj/item/weapon/gun/shotgun/afterattack(atom/target as mob|obj|turf|area, mob/user as mob, flag)
|
||||
if (flag)
|
||||
return
|
||||
if (!(istype(usr, /mob/living/carbon/human) || ticker) && ticker.mode.name != "monkey")
|
||||
usr << "\red You don't have the dexterity to do this!"
|
||||
return
|
||||
if (src.pumped == 0)
|
||||
for(var/mob/O in viewers(user, null))
|
||||
O.show_message(text("\red <B>[] pumps the shotgun!</B>", user), 1, "\red You hear pumping", 2)
|
||||
playsound(user, 'shotgunpump.ogg', 100, 1)
|
||||
src.pumped++
|
||||
return
|
||||
src.add_fingerprint(user)
|
||||
if ((src.s1 + src.s2) < 1)
|
||||
user.show_message("\red *click* *click*", 2)
|
||||
return
|
||||
playsound(user, 'Gunshot.ogg', 100, 1)
|
||||
for(var/mob/O in viewers(user, null))
|
||||
O.show_message(text("\red <B>[] fires a shotgun at []!</B>", user, target), 1, "\red You hear a gunshot", 2)
|
||||
var/turf/T = user.loc
|
||||
var/turf/U = (istype(target, /atom/movable) ? target.loc : target)
|
||||
if ((!( U ) || !( T )))
|
||||
return
|
||||
while(!( istype(U, /turf) ))
|
||||
U = U.loc
|
||||
if (!( istype(T, /turf) ))
|
||||
return
|
||||
if (U == T)
|
||||
if (src.s1 == 1)
|
||||
user.bullet_act(PROJECTILE_WEAKBULLET)
|
||||
else if (src.s1 == 2)
|
||||
user.bullet_act(PROJECTILE_BULLET)
|
||||
return
|
||||
if (src.s1 == 1)
|
||||
var/obj/bullet/A = new /obj/bullet/weakbullet( user.loc )
|
||||
src.pumped--
|
||||
src.s1 = src.s2
|
||||
src.s2 = 0
|
||||
A.current = U
|
||||
A.yo = U.y - T.y
|
||||
A.xo = U.x - T.x
|
||||
user.next_move = world.time + 4
|
||||
spawn( 0 )
|
||||
A.process()
|
||||
if (!istype(U, /turf))
|
||||
del(A)
|
||||
return
|
||||
else if (src.s1 == 2)
|
||||
var/obj/bullet/A = new /obj/bullet( user.loc )
|
||||
src.pumped--
|
||||
src.s1 = src.s2
|
||||
src.s2 = 0
|
||||
A.current = U
|
||||
A.yo = U.y - T.y
|
||||
A.xo = U.x - T.x
|
||||
user.next_move = world.time + 4
|
||||
spawn( 0 )
|
||||
A.process()
|
||||
if (!istype(U, /turf))
|
||||
del(A)
|
||||
return
|
||||
return
|
||||
|
||||
|
||||
|
||||
|
||||
// DETECTIVE REVOLVER
|
||||
|
||||
@@ -343,6 +343,59 @@
|
||||
src.updatehealth()
|
||||
src.stuttering += 5
|
||||
src.drowsyness += 5
|
||||
else if(flag == PROJECTILE_WEAKBULLET)
|
||||
var/d = 14
|
||||
if (istype(src.wear_suit, /obj/item/clothing/suit/armor))
|
||||
if (prob(70))
|
||||
show_message("\red Your armor absorbs the hit!", 4)
|
||||
return
|
||||
else
|
||||
if (prob(40))
|
||||
show_message("\red Your armor only softens the hit!", 4)
|
||||
if (prob(20))
|
||||
d = d / 2
|
||||
d = d / 4
|
||||
else
|
||||
if (istype(src.wear_suit, /obj/item/clothing/suit/swat_suit))
|
||||
if (prob(90))
|
||||
show_message("\red Your armor absorbs the blow!", 4)
|
||||
return
|
||||
else
|
||||
if (prob(90))
|
||||
show_message("\red Your armor only softens the blow!", 4)
|
||||
if (prob(60))
|
||||
d = d / 2
|
||||
d = d / 5
|
||||
if (istype(src.r_hand, /obj/item/weapon/shield/riot))
|
||||
if (prob(90))
|
||||
show_message("\red Your shield absorbs the blow!", 4)
|
||||
return
|
||||
else
|
||||
if (prob(40))
|
||||
show_message("\red Your shield only softens the blow!", 4)
|
||||
if (prob(60))
|
||||
d = d / 2
|
||||
d = d / 5
|
||||
else
|
||||
if (istype(src.l_hand, /obj/item/weapon/shield/riot))
|
||||
if (prob(90))
|
||||
show_message("\red Your shield absorbs the blow!", 4)
|
||||
return
|
||||
else
|
||||
if (prob(40))
|
||||
show_message("\red Your shield only softens the blow!", 4)
|
||||
if (prob(60))
|
||||
d = d / 2
|
||||
d = d / 5
|
||||
if (src.stat != 2)
|
||||
var/organ = src.organs[ran_zone("chest")]
|
||||
if (istype(organ, /datum/organ/external))
|
||||
var/datum/organ/external/temp = organ
|
||||
temp.take_damage(d, 0)
|
||||
src.UpdateDamageIcon()
|
||||
src.updatehealth()
|
||||
if(src.weakened <= 5) src.weakened = 5
|
||||
return
|
||||
return
|
||||
|
||||
/mob/living/carbon/human/ex_act(severity)
|
||||
|
||||
Reference in New Issue
Block a user