mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-07-11 07:03:30 +01:00
Added code for C96 and P08, since Uhangi is lazy.
git-svn-id: http://tgstation13.googlecode.com/svn/trunk@1147 316c924e-a436-60f5-8080-3fe189b3f50e
This commit is contained in:
+47
-11
@@ -104,19 +104,31 @@
|
||||
throw_range = 20
|
||||
|
||||
/obj/item/weapon/ammo/a357
|
||||
desc = "There are 7 bullets left!"
|
||||
desc = "There are 7 rounds left!"
|
||||
name = "ammo-357"
|
||||
icon_state = "357-7"
|
||||
amount_left = 7.0
|
||||
|
||||
/obj/item/weapon/ammo/a45
|
||||
desc = "There are 10 bullets left!"
|
||||
desc = "There are 10 rounds left!"
|
||||
name = "ammo-45"
|
||||
icon_state = "45-10"
|
||||
amount_left = 10.0
|
||||
|
||||
/obj/item/weapon/ammo/a763m
|
||||
desc = "There are 9 rounds left!"
|
||||
name = "ammo-7.63x25"
|
||||
icon_state = "7.63x25m-9"
|
||||
amount_left = 9.0
|
||||
|
||||
/obj/item/weapon/ammo/a9x19p
|
||||
desc = "There are 8 rounds left!"
|
||||
name = "ammo-9x19"
|
||||
icon_state = "9x19p-8"
|
||||
amount_left = 8.0
|
||||
|
||||
/obj/item/weapon/ammo/assaultmag
|
||||
desc = "There are 30 bullets left!"
|
||||
desc = "There are 30 rounds left!"
|
||||
name = "5.56x45mm NATO"
|
||||
icon_state = "5.56"
|
||||
amount_left = 30.0
|
||||
@@ -685,8 +697,32 @@
|
||||
icon_state = "mateba"
|
||||
origin_tech = "combat=3;materials=2"
|
||||
|
||||
/obj/item/weapon/gun/c96
|
||||
desc = "There are 0 rounds left. Uses 7.63x25 Mauser"
|
||||
name = "c96"
|
||||
icon_state = "c96"
|
||||
var/obj/item/weapon/ammo/a763m/magazine
|
||||
w_class = 3.0
|
||||
throw_speed = 2
|
||||
throw_range = 10
|
||||
force = 12.0
|
||||
m_amt = 2000
|
||||
// origin_tech = "combat=2;materials=2"
|
||||
|
||||
/obj/item/weapon/gun/p08
|
||||
desc = "There are 0 rounds left. Uses 9x19 Parabellum"
|
||||
name = "p08"
|
||||
icon_state = "p08empty"
|
||||
var/obj/item/weapon/ammo/a9x19p/magazine
|
||||
w_class = 3.0
|
||||
throw_speed = 2
|
||||
throw_range = 10
|
||||
force = 16.0
|
||||
m_amt = 2000
|
||||
// origin_tech = "combat=2;materials=2"
|
||||
|
||||
/obj/item/weapon/gun/glock
|
||||
desc = "There are 0 bullets left. Uses .45 ACP"
|
||||
desc = "There are 0 rounds left. Uses .45 ACP"
|
||||
name = "glock"
|
||||
icon_state = "glock"
|
||||
var/obj/item/weapon/ammo/a45/magazine
|
||||
@@ -695,10 +731,10 @@
|
||||
throw_range = 10
|
||||
force = 6.0
|
||||
m_amt = 2000
|
||||
// origin_tech = "combat=3;materials=2"
|
||||
// origin_tech = "combat=2;materials=2"
|
||||
|
||||
/obj/item/weapon/gun/m1911
|
||||
desc = "There are 0 bullets left. Uses .45 ACP"
|
||||
desc = "There are 0 rounds left. Uses .45 ACP"
|
||||
name = "m1911"
|
||||
icon_state = "m1911"
|
||||
var/obj/item/weapon/ammo/a45/magazine
|
||||
@@ -707,10 +743,10 @@
|
||||
throw_range = 10
|
||||
force = 14.0
|
||||
m_amt = 2000
|
||||
// origin_tech = "combat=3;materials=2"
|
||||
// origin_tech = "combat=2;materials=2"
|
||||
|
||||
/obj/item/weapon/gun/carbine
|
||||
desc = "There are 0 bullets left. Uses 5.56x45mm NATO"
|
||||
desc = "There are 0 rounds left. Uses 5.56x45mm NATO"
|
||||
name = "carbine"
|
||||
icon_state = "carbinenomag"
|
||||
var/obj/item/weapon/ammo/assaultmag/magazine
|
||||
@@ -720,10 +756,10 @@
|
||||
throw_range = 10
|
||||
force = 6.0
|
||||
m_amt = 2000
|
||||
// origin_tech = "combat=3;materials=2"
|
||||
// origin_tech = "combat=2;materials=2"
|
||||
|
||||
/obj/item/weapon/gun/ak331
|
||||
desc = "There are 0 bullets left. Uses 5.56x45mm NATO"
|
||||
desc = "There are 0 rounds left. Uses 5.56x45mm NATO"
|
||||
name = "ak331"
|
||||
icon_state = "ak331nomag"
|
||||
var/obj/item/weapon/ammo/assaultmag/magazine
|
||||
@@ -733,7 +769,7 @@
|
||||
throw_range = 10
|
||||
force = 18.0
|
||||
m_amt = 2000
|
||||
// origin_tech = "combat=3;materials=2"
|
||||
// origin_tech = "combat=2;materials=2"
|
||||
|
||||
/obj/item/weapon/gun/detectiverevolver
|
||||
desc = "A cheap Martian knock-off of a Smith & Wesson Model 10. Uses .38-Special rounds."
|
||||
|
||||
@@ -1152,16 +1152,195 @@ obj/item/weapon/gun/revolver/attackby(obj/item/weapon/ammo/a357/A as obj, mob/us
|
||||
|
||||
|
||||
|
||||
//GLOCK
|
||||
//Mauser C96
|
||||
|
||||
/obj/item/weapon/gun/c96/examine()
|
||||
set src in usr
|
||||
if (src.magazine)
|
||||
if (istype(src.magazine, /obj/item/weapon/ammo/a763m))
|
||||
src.desc = text("There are [] round\s left! Uses 7.63x25 Mauser", src.magazine.amount_left)
|
||||
else
|
||||
src.desc = text("There are 0 rounds left! Uses 7.63x25 Mauser")
|
||||
..()
|
||||
return
|
||||
|
||||
/obj/item/weapon/gun/c96/verb/eject()
|
||||
set src in usr
|
||||
if (src.magazine)
|
||||
if (istype(src.magazine, /obj/item/weapon/ammo/a763m))
|
||||
if (istype(src.loc, /mob))
|
||||
var/obj/item/W = src.loc:equipped()
|
||||
var/emptyHand = (W == null)
|
||||
if(emptyHand)
|
||||
src.magazine.DblClick()
|
||||
if(!istype(src.magazine.loc, /obj/item/weapon/gun/c96))
|
||||
src.magazine = null
|
||||
else
|
||||
src.magazine.loc = src.loc
|
||||
src.magazine = null
|
||||
..()
|
||||
return
|
||||
|
||||
/obj/item/weapon/ammo/a763m/examine()
|
||||
set src in usr
|
||||
src.desc = text("There are [] round\s left!", src.amount_left)
|
||||
..()
|
||||
return
|
||||
|
||||
/obj/item/weapon/gun/c96/attackby(obj/item/weapon/ammo/a763m/A as obj, mob/user as mob)
|
||||
..()
|
||||
|
||||
if (istype(A, /obj/item/weapon/ammo/a763m))
|
||||
if (src.magazine)
|
||||
user << "\blue There is already a magazine in!"
|
||||
return 1
|
||||
user.drop_item()
|
||||
A.loc = src
|
||||
flick("c96load",src)
|
||||
src.magazine = A
|
||||
return 1
|
||||
return
|
||||
|
||||
/obj/item/weapon/gun/c96/afterattack(atom/target as mob|obj|turf|area, mob/user as mob, flag)
|
||||
|
||||
if (flag)
|
||||
return
|
||||
if ((istype(user, /mob/living/carbon/monkey)) && ticker.mode != "monkey")
|
||||
usr << "\red You don't have the dexterity to do this!"
|
||||
return
|
||||
src.add_fingerprint(user)
|
||||
if (src.magazine.amount_left < 1)
|
||||
user.show_message("\red *click* *click*", 2)
|
||||
return
|
||||
playsound(user, 'Gunshot.ogg', 100, 1)
|
||||
src.magazine.amount_left--
|
||||
for(var/mob/O in viewers(user, null))
|
||||
O.show_message(text("\red <B>[] fires the c96 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)
|
||||
user.bullet_act(PROJECTILE_BULLET)
|
||||
return
|
||||
var/obj/bullet/weakbullet/A = new /obj/bullet/weakbullet( user.loc )
|
||||
if (!istype(U, /turf))
|
||||
del(A)
|
||||
return
|
||||
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()
|
||||
return
|
||||
return
|
||||
|
||||
|
||||
//Luger P08
|
||||
|
||||
|
||||
/obj/item/weapon/gun/p08/examine()
|
||||
set src in usr
|
||||
if (src.magazine)
|
||||
if (istype(src.magazine, /obj/item/weapon/ammo/a9x19p))
|
||||
src.desc = text("There are [] round\s left! Uses 9x19 Parabellum", src.magazine.amount_left)
|
||||
else
|
||||
src.desc = text("There are 0 rounds left! Uses 9x19 Parabellum")
|
||||
..()
|
||||
return
|
||||
|
||||
/obj/item/weapon/gun/p08/verb/eject()
|
||||
set src in usr
|
||||
if (src.magazine)
|
||||
if (istype(src.magazine, /obj/item/weapon/ammo/a9x19p))
|
||||
if (istype(src.loc, /mob))
|
||||
var/obj/item/W = src.loc:equipped()
|
||||
var/emptyHand = (W == null)
|
||||
if(emptyHand)
|
||||
src.magazine.DblClick()
|
||||
if(!istype(src.magazine.loc, /obj/item/weapon/gun/p08))
|
||||
src.magazine = null
|
||||
else
|
||||
src.magazine.loc = src.loc
|
||||
src.magazine = null
|
||||
..()
|
||||
return
|
||||
|
||||
/obj/item/weapon/ammo/a9x19p/examine()
|
||||
set src in usr
|
||||
src.desc = text("There are [] round\s left!", src.amount_left)
|
||||
..()
|
||||
return
|
||||
|
||||
/obj/item/weapon/gun/p08/attackby(obj/item/weapon/ammo/a9x19p/A as obj, mob/user as mob)
|
||||
..()
|
||||
|
||||
if (istype(A, /obj/item/weapon/ammo/a9x19p))
|
||||
if (src.magazine)
|
||||
user << "\blue There is already a magazine in!"
|
||||
return 1
|
||||
user.drop_item()
|
||||
A.loc = src
|
||||
src.magazine = A
|
||||
icon_state = "p08"
|
||||
return 1
|
||||
return
|
||||
|
||||
/obj/item/weapon/gun/p08/afterattack(atom/target as mob|obj|turf|area, mob/user as mob, flag)
|
||||
|
||||
if (flag)
|
||||
return
|
||||
if ((istype(user, /mob/living/carbon/monkey)) && ticker.mode != "monkey")
|
||||
usr << "\red You don't have the dexterity to do this!"
|
||||
return
|
||||
src.add_fingerprint(user)
|
||||
if (src.magazine.amount_left < 1)
|
||||
user.show_message("\red *click* *click*", 2)
|
||||
return
|
||||
playsound(user, 'Gunshot.ogg', 100, 1)
|
||||
src.magazine.amount_left--
|
||||
for(var/mob/O in viewers(user, null))
|
||||
O.show_message(text("\red <B>[] fires the p08 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)
|
||||
user.bullet_act(PROJECTILE_BULLET)
|
||||
return
|
||||
var/obj/bullet/weakbullet/A = new /obj/bullet/weakbullet( user.loc )
|
||||
if (!istype(U, /turf))
|
||||
del(A)
|
||||
return
|
||||
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()
|
||||
return
|
||||
return
|
||||
|
||||
|
||||
//GLOCK G21
|
||||
|
||||
|
||||
/obj/item/weapon/gun/glock/examine()
|
||||
set src in usr
|
||||
if (src.magazine)
|
||||
if (istype(src.magazine, /obj/item/weapon/ammo/a45))
|
||||
src.desc = text("There are [] bullet\s left! Uses .45 ACP", src.magazine.amount_left)
|
||||
src.desc = text("There are [] round\s left! Uses .45 ACP", src.magazine.amount_left)
|
||||
else
|
||||
src.desc = "There are 0 bullets left! Uses .45 ACP"
|
||||
src.desc = "There are 0 rounds left! Uses .45 ACP"
|
||||
..()
|
||||
return
|
||||
|
||||
@@ -1184,13 +1363,13 @@ obj/item/weapon/gun/revolver/attackby(obj/item/weapon/ammo/a357/A as obj, mob/us
|
||||
|
||||
/obj/item/weapon/ammo/a45/examine()
|
||||
set src in usr
|
||||
src.desc = text("There are [] bullet\s left!", src.amount_left)
|
||||
src.desc = text("There are [] round\s left!", src.amount_left)
|
||||
..()
|
||||
return
|
||||
|
||||
/obj/item/weapon/ammo/assaultmag/examine()
|
||||
set src in usr
|
||||
src.desc = text("There are [] bullet\s left!", src.amount_left)
|
||||
src.desc = text("There are [] round\s left!", src.amount_left)
|
||||
..()
|
||||
return
|
||||
|
||||
@@ -1250,9 +1429,9 @@ obj/item/weapon/gun/revolver/attackby(obj/item/weapon/ammo/a357/A as obj, mob/us
|
||||
set src in usr
|
||||
if (src.magazine)
|
||||
if (istype(src.magazine, /obj/item/weapon/ammo/a45))
|
||||
src.desc = text("There are [] bullet\s left! Uses .45 ACP", src.magazine.amount_left)
|
||||
src.desc = text("There are [] round\s left! Uses .45 ACP", src.magazine.amount_left)
|
||||
else
|
||||
src.desc = "There are 0 bullets left! Uses .45 ACP"
|
||||
src.desc = "There are 0 rounds left! Uses .45 ACP"
|
||||
..()
|
||||
return
|
||||
|
||||
@@ -1329,9 +1508,9 @@ obj/item/weapon/gun/revolver/attackby(obj/item/weapon/ammo/a357/A as obj, mob/us
|
||||
set src in usr
|
||||
if (src.magazine)
|
||||
if (istype(src.magazine, /obj/item/weapon/ammo/assaultmag))
|
||||
src.desc = text("There are [] bullet\s left! Uses 5.56x45mm NATO", src.magazine.amount_left)
|
||||
src.desc = text("There are [] round\s left! Uses 5.56x45mm NATO", src.magazine.amount_left)
|
||||
else
|
||||
src.desc = "There are 0 bullets left! Uses 5.56x45mm NATO"
|
||||
src.desc = "There are 0 rounds left! Uses 5.56x45mm NATO"
|
||||
..()
|
||||
return
|
||||
|
||||
@@ -1411,9 +1590,9 @@ obj/item/weapon/gun/revolver/attackby(obj/item/weapon/ammo/a357/A as obj, mob/us
|
||||
set src in usr
|
||||
if (src.magazine)
|
||||
if (istype(src.magazine, /obj/item/weapon/ammo/assaultmag))
|
||||
src.desc = text("There are [] bullet\s left! Uses 5.56x45mm NATO", src.magazine.amount_left)
|
||||
src.desc = text("There are [] round\s left! Uses 5.56x45mm NATO", src.magazine.amount_left)
|
||||
else
|
||||
src.desc = "There are 0 bullets left! Uses 5.56x45mm NATO"
|
||||
src.desc = "There are 0 rounds left! Uses 5.56x45mm NATO"
|
||||
..()
|
||||
return
|
||||
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 1.7 KiB After Width: | Height: | Size: 1.8 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 22 KiB After Width: | Height: | Size: 22 KiB |
Reference in New Issue
Block a user