Merge pull request #10340 from comma/russian_roulette

Russian roulette and russian roulette accessories
This commit is contained in:
PsiOmegaDelta
2015-09-03 19:40:01 +02:00
11 changed files with 84 additions and 90 deletions

View File

@@ -67,9 +67,9 @@
/obj/item/ammo_magazine/c9mm
name = "ammunition Box (9mm)"
icon_state = "9mm"
icon_state = "9mm"
origin_tech = list(TECH_COMBAT = 2)
matter = list(DEFAULT_WALL_MATERIAL = 1800)
matter = list(DEFAULT_WALL_MATERIAL = 1800)
caliber = "9mm"
ammo_type = /obj/item/ammo_casing/c9mm
max_ammo = 30
@@ -192,3 +192,12 @@
max_ammo = 20
multiple_sprites = 1
/obj/item/ammo_magazine/caps
name = "speed loader (caps)"
icon_state = "T38"
caliber = "caps"
color = "#FF0000"
ammo_type = /obj/item/ammo_casing/cap
matter = list(DEFAULT_WALL_MATERIAL = 600)
max_ammo = 7
multiple_sprites = 1

View File

@@ -158,3 +158,10 @@
icon_state = "rocketshell"
projectile_type = /obj/item/missile
caliber = "rocket"
/obj/item/ammo_casing/cap
name = "cap"
desc = "A cap for children toys."
caliber = "caps"
color = "#FF0000"
projectile_type = /obj/item/projectile/bullet/pistol/cap

View File

@@ -8,6 +8,30 @@
handle_casings = CYCLE_CASINGS
max_shells = 7
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"
@@ -61,4 +85,14 @@
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

View File

@@ -197,3 +197,15 @@
/obj/item/projectile/bullet/shotgun/practice
name = "practice"
damage = 5
/obj/item/projectile/bullet/pistol/cap
name = "cap"
damage_type = HALLOSS
damage = 0
nodamage = 1
embed = 0
sharp = 0
/obj/item/projectile/bullet/pistol/cap/process()
loc = null
qdel(src)