Files
Polaris/code/modules/projectiles/guns/projectile/revolver.dm
Spades e0748c8261 Response to feedback.
Tried to make descriptions better.
SAW magazine no longer fits in pockets.
2016-06-03 01:57:13 -04:00

113 lines
4.3 KiB
Plaintext

/obj/item/weapon/gun/projectile/revolver
name = "revolver"
desc = "The Lumoco Arms HE Colt is a choice revolver for when you absolutely, positively need to put a hole in the other guy. Uses .357 rounds."
icon_state = "revolver"
item_state = "revolver"
caliber = "357"
origin_tech = list(TECH_COMBAT = 2, TECH_MATERIAL = 2)
handle_casings = CYCLE_CASINGS
max_shells = 6
ammo_type = /obj/item/ammo_casing/a357
var/chamber_offset = 0 //how many empty chambers in the cylinder until you hit a round
/obj/item/weapon/gun/projectile/revolver/verb/spin_cylinder()
set name = "Spin cylinder"
set desc = "Fun when you're bored out of your skull."
set category = "Object"
chamber_offset = 0
visible_message("<span class='warning'>\The [usr] spins the cylinder of \the [src]!</span>", \
"<span class='notice'>You hear something metallic spin and click.</span>")
playsound(src.loc, 'sound/weapons/revolver_spin.ogg', 100, 1)
loaded = shuffle(loaded)
if(rand(1,max_shells) > loaded.len)
chamber_offset = rand(0,max_shells - loaded.len)
/obj/item/weapon/gun/projectile/revolver/consume_next_projectile()
if(chamber_offset)
chamber_offset--
return
return ..()
/obj/item/weapon/gun/projectile/revolver/load_ammo(var/obj/item/A, mob/user)
chamber_offset = 0
return ..()
/obj/item/weapon/gun/projectile/revolver/mateba
name = "mateba"
desc = "This unique looking handgun is named after an Italian company famous for the manufacture of these revolvers, and pasta kneading machines. Uses .357 rounds." // Yes I'm serious. -Spades
icon_state = "mateba"
origin_tech = list(TECH_COMBAT = 2, TECH_MATERIAL = 2)
/obj/item/weapon/gun/projectile/revolver/detective
name = "revolver"
desc = "A cheap Martian knock-off of a Smith & Wesson Model 10. Uses .38-Special rounds."
icon_state = "detective"
caliber = "38"
origin_tech = list(TECH_COMBAT = 2, TECH_MATERIAL = 2)
fire_sound = 'sound/weapons/Gunshot_light.ogg'
ammo_type = /obj/item/ammo_casing/c38
/obj/item/weapon/gun/projectile/revolver/detective/verb/rename_gun()
set name = "Name Gun"
set category = "Object"
set desc = "Click to rename your gun. If you're the detective."
var/mob/M = usr
if(!M.mind) return 0
if(!M.mind.assigned_role == "Detective")
M << "<span class='notice'>You don't feel cool enough to name this gun, chump.</span>"
return 0
var/input = sanitizeSafe(input("What do you want to name the gun?", ,""), MAX_NAME_LEN)
if(src && input && !M.stat && in_range(M,src))
name = input
M << "You name the gun [input]. Say hello to your new friend."
return 1
// Blade Runner pistol.
/obj/item/weapon/gun/projectile/revolver/deckard
name = "Deckard .38"
desc = "A custom-built revolver, based off the semi-popular Detective Special model."
icon_state = "deckard-empty"
caliber = "38"
origin_tech = list(TECH_COMBAT = 2, TECH_MATERIAL = 2)
fire_sound = 'sound/weapons/Gunshot_light.ogg'
ammo_type = /obj/item/ammo_casing/c38
/obj/item/weapon/gun/projectile/revolver/deckard/update_icon()
..()
if(loaded.len)
icon_state = "deckard-loaded"
else
icon_state = "deckard-empty"
/obj/item/weapon/gun/projectile/revolver/deckard/load_ammo(var/obj/item/A, mob/user)
if(istype(A, /obj/item/ammo_magazine))
flick("deckard-reload",src)
..()
/obj/item/weapon/gun/projectile/revolver/capgun
name = "cap gun"
desc = "Looks almost like the real thing! Ages 8 and up."
icon_state = "revolver"
item_state = "revolver"
caliber = "caps"
origin_tech = list(TECH_COMBAT = 1, TECH_MATERIAL = 1)
handle_casings = CYCLE_CASINGS
max_shells = 7
ammo_type = /obj/item/ammo_casing/cap
/obj/item/weapon/gun/projectile/revolver/judge
name = "\"The Judge\""
desc = "A revolving hand-shotgun by Cybersun Industries that packs the power of a 12 guage in the palm of your hand (if you don't break your wrist). Uses 12 shotgun rounds."
icon_state = "judge"
caliber = "shotgun"
origin_tech = list(TECH_COMBAT = 2, TECH_MATERIAL = 2, TECH_ILLEGAL = 4)
max_shells = 5
fire_sound = 'sound/weapons/shotgun.ogg'
recoil = 2 // ow my fucking hand
accuracy = -1 // smooth bore + short barrel = shit accuracy
ammo_type = /obj/item/ammo_casing/shotgun
// ToDo: Remove accuracy debuf in exchange for slightly injuring your hand every time you fire it.