mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2025-12-19 23:01:35 +00:00
Adds in all the stuff from the last one
This commit is contained in:
@@ -119,6 +119,9 @@
|
||||
ammo_type = /obj/item/ammo_casing/shotgun/rubbershot
|
||||
max_ammo = 6
|
||||
|
||||
/obj/item/ammo_box/magazine/internal/shot/riot/short
|
||||
max_ammo = 3
|
||||
|
||||
/obj/item/ammo_box/magazine/internal/grenadelauncher
|
||||
name = "grenade launcher internal magazine"
|
||||
ammo_type = /obj/item/ammo_casing/a40mm
|
||||
|
||||
@@ -80,16 +80,85 @@
|
||||
desc = "A sturdy shotgun with a longer magazine and a fixed tactical stock designed for non-lethal riot control."
|
||||
icon_state = "riotshotgun"
|
||||
mag_type = /obj/item/ammo_box/magazine/internal/shot/riot
|
||||
sawn_desc = "Come with me if you want to live."
|
||||
var/style = 1
|
||||
|
||||
/obj/item/gun/projectile/shotgun/riot/attackby(obj/item/A, mob/user, params)
|
||||
..()
|
||||
if(istype(A, /obj/item/circular_saw) || istype(A, /obj/item/gun/energy/plasmacutter))
|
||||
sawoff(user)
|
||||
sawoff(A, user, 0)
|
||||
if(istype(A, /obj/item/melee/energy))
|
||||
var/obj/item/melee/energy/W = A
|
||||
if(W.active)
|
||||
sawoff(user)
|
||||
sawoff(A, user, 0)
|
||||
if(istype(A, /obj/item/pipe))
|
||||
sawoff(A, user, 1)
|
||||
|
||||
/obj/item/gun/projectile/shotgun/riot/sawoff(obj/item/A, mob/user, style = 0)
|
||||
//Check to see if they match
|
||||
if(sawn_state == SAWN_OFF & style == 0)
|
||||
to_chat(user, "<span class='warning'>\The [src] is already shortened!</span>")
|
||||
return
|
||||
if(sawn_state != SAWN_OFF & style == 1)
|
||||
to_chat(user, "<span class='notice'>[src] already has a full barrel and magazine!</span>")
|
||||
return
|
||||
//Make sure it isn't in a bag
|
||||
if(istype(loc, /obj/item/storage))
|
||||
to_chat(user, "<span class='info'>How do you plan to modify [src] while it's in a bag.</span>")
|
||||
return
|
||||
//if there's any live ammo inside the gun, makes it go off
|
||||
if(chambered)
|
||||
afterattack(user, user)
|
||||
user.visible_message("<span class='danger'>\The [src] goes off!</span>", "<span class='danger'>\The [src] goes off in your face!</span>")
|
||||
return
|
||||
//Spill the mag onto the floor
|
||||
if(magazine.ammo_count())
|
||||
user.visible_message("<span class='danger'>[user.name] opens [src] up and the shells go goes flying around!</span>", "<span class='userdanger'>You open [src] up and the shells go goes flying everywhere!!</span>")
|
||||
while(get_ammo() > 0)
|
||||
var/obj/item/ammo_casing/CB
|
||||
CB = magazine.get_round(0)
|
||||
if(CB)
|
||||
CB.loc = get_turf(loc)
|
||||
CB.update_icon()
|
||||
if(style == 0)
|
||||
if(do_after(user, 10, target = src))
|
||||
to_chat(user, "<span class='notice'>You saw the barrel and magazine of the [src].</span>")
|
||||
w_class = WEIGHT_CLASS_NORMAL
|
||||
slot_flags = null
|
||||
magazine.max_ammo = 3
|
||||
name = "assault shotgun"
|
||||
current_skin = "riotshotgun-short"
|
||||
desc = "A shortened riot shotgun that has been shortened enough to fit inside a bag."
|
||||
sawn_state = SAWN_OFF
|
||||
update_icon()
|
||||
else
|
||||
if(do_after(user, 10, target = src))
|
||||
to_chat(user, "<span class='notice'>You install the longer barrel and magazine onto [src].</span>")
|
||||
w_class = WEIGHT_CLASS_BULKY
|
||||
slot_flags = SLOT_BACK
|
||||
magazine.max_ammo = 6
|
||||
name = "riot shotgun"
|
||||
current_skin = "riotshotgun"
|
||||
desc = "A sturdy shotgun with a longer magazine and a fixed tactical stock designed for non-lethal riot control."
|
||||
sawn_state = null
|
||||
update_icon()
|
||||
qdel(A)
|
||||
return
|
||||
|
||||
/obj/item/gun/projectile/shotgun/riot/update_icon() //Can't use the old proc as it makes it go to riotshotgun-short_sawn
|
||||
..()
|
||||
if(current_skin)
|
||||
icon_state = "[current_skin]"
|
||||
else
|
||||
icon_state = "[initial(icon_state)]"
|
||||
|
||||
/obj/item/gun/projectile/shotgun/riot/short
|
||||
name = "assault shotgun"
|
||||
desc = "A shortened riot shotgun that has been shortened enough to fit inside a bag."
|
||||
icon_state = "riotshotgun-short"
|
||||
mag_type = /obj/item/ammo_box/magazine/internal/shot/riot/short
|
||||
w_class = WEIGHT_CLASS_NORMAL
|
||||
slot_flags = null
|
||||
sawn_state = SAWN_OFF
|
||||
|
||||
///////////////////////
|
||||
// BOLT ACTION RIFLE //
|
||||
|
||||
Reference in New Issue
Block a user