mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2026-01-06 07:22:15 +00:00
Adds sounds for turning on flashlights, flares, flipping coins, shuffling deck of cards, using lighters and zippos, drills, sonic jackhammers, bikes and some weapon related sounds.
116 lines
4.0 KiB
Plaintext
116 lines
4.0 KiB
Plaintext
/obj/item/weapon/gun/projectile/revolver
|
|
name = "revolver"
|
|
desc = "The classic Necropolis Industries .357 revolver, for when you only want to shoot once."
|
|
icon_state = "revolver"
|
|
item_state = "revolver"
|
|
caliber = "357"
|
|
origin_tech = list(TECH_COMBAT = 2, TECH_MATERIAL = 2)
|
|
handle_casings = CYCLE_CASINGS
|
|
max_shells = 7
|
|
ammo_type = /obj/item/ammo_casing/a357
|
|
fire_sound = 'sound/weapons/revolver_shoot.ogg'
|
|
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
|
|
usr.visible_message("<span class='warning'>\The [usr] spins the cylinder of \the [src]!</span>", "<span class='warning'>You spin 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"
|
|
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"
|
|
max_shells = 6
|
|
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 = "\improper Deckard .44"
|
|
desc = "A custom-built revolver, based off the semi-popular Detective Special model."
|
|
max_shells = 6
|
|
icon_state = "deckard-empty"
|
|
caliber = "38"
|
|
ammo_type = /obj/item/ammo_casing/c38
|
|
fire_sound = 'sound/weapons/Gunshot_light.ogg'
|
|
|
|
/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/deckard/emp
|
|
ammo_type = /obj/item/ammo_casing/c38/emp
|
|
|
|
/obj/item/weapon/gun/projectile/revolver/derringer
|
|
name = "derringer"
|
|
desc = "A small pocket pistol, easily concealed. Uses .357 rounds."
|
|
icon_state = "derringer"
|
|
item_state = "concealed"
|
|
w_class = 2
|
|
origin_tech = list(TECH_COMBAT = 2, TECH_MATERIAL = 2, TECH_ILLEGAL = 3)
|
|
handle_casings = CYCLE_CASINGS
|
|
load_method = SINGLE_CASING
|
|
max_shells = 2
|
|
ammo_type = /obj/item/ammo_casing/a357
|
|
|
|
/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
|