mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-11 18:53:06 +00:00
Merge pull request #10340 from comma/russian_roulette
Russian roulette and russian roulette accessories
This commit is contained in:
@@ -18,7 +18,7 @@
|
||||
/obj/item/toy/blink = 2,
|
||||
/obj/item/clothing/under/syndicate/tacticool = 2,
|
||||
/obj/item/toy/sword = 2,
|
||||
/obj/item/toy/gun = 2,
|
||||
/obj/item/weapon/gun/projectile/revolver/capgun = 2,
|
||||
/obj/item/toy/crossbow = 2,
|
||||
/obj/item/clothing/suit/syndicatefake = 2,
|
||||
/obj/item/weapon/storage/fancy/crayons = 2,
|
||||
@@ -168,8 +168,8 @@
|
||||
var/prizeselect = pickweight(prizes)
|
||||
new prizeselect(src.loc)
|
||||
|
||||
if(istype(prizeselect, /obj/item/toy/gun)) //Ammo comes with the gun
|
||||
new /obj/item/toy/ammo/gun(src.loc)
|
||||
if(istype(prizeselect, /obj/item/weapon/gun/projectile/revolver/capgun)) //Ammo comes with the gun
|
||||
new /obj/item/projectile/bullet/pistol/cap(src.loc)
|
||||
|
||||
else if(istype(prizeselect, /obj/item/clothing/suit/syndicatefake)) //Helmet is part of the suit
|
||||
new /obj/item/clothing/head/syndicatefake(src.loc)
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
/obj/item/toy/blink = 2,
|
||||
/obj/item/clothing/under/syndicate/tacticool = 2,
|
||||
/obj/item/toy/sword = 2,
|
||||
/obj/item/toy/gun = 2,
|
||||
/obj/item/weapon/gun/projectile/revolver/capgun = 2,
|
||||
/obj/item/toy/crossbow = 2,
|
||||
/obj/item/clothing/suit/syndicatefake = 2,
|
||||
/obj/item/weapon/storage/fancy/crayons = 2,
|
||||
@@ -28,8 +28,8 @@
|
||||
if(computer && !computer.stat)
|
||||
var/prizeselect = pickweight(prizes)
|
||||
new prizeselect(computer.loc)
|
||||
if(istype(prizeselect, /obj/item/toy/gun)) //Ammo comes with the gun
|
||||
new /obj/item/toy/ammo/gun(computer.loc)
|
||||
if(istype(prizeselect, /obj/item/weapon/gun/projectile/revolver/capgun)) //Ammo comes with the gun
|
||||
new /obj/item/projectile/bullet/pistol/cap(src.loc)
|
||||
else if(istype(prizeselect, /obj/item/clothing/suit/syndicatefake)) //Helmet is part of the suit
|
||||
new /obj/item/clothing/head/syndicatefake(computer.loc)
|
||||
feedback_inc("arcade_win_normal")
|
||||
|
||||
@@ -133,87 +133,6 @@
|
||||
icon = 'icons/obj/singularity.dmi'
|
||||
icon_state = "singularity_s1"
|
||||
|
||||
/*
|
||||
* Toy gun: Why isnt this an /obj/item/weapon/gun?
|
||||
*/
|
||||
/obj/item/toy/gun
|
||||
name = "cap gun"
|
||||
desc = "There are 0 caps left. Looks almost like the real thing! Ages 8 and up. Please recycle in an autolathe when you're out of caps!"
|
||||
icon = 'icons/obj/gun.dmi'
|
||||
icon_state = "revolver"
|
||||
item_state = "revolver"
|
||||
item_icons = list(
|
||||
icon_l_hand = 'icons/mob/items/lefthand_guns.dmi',
|
||||
icon_r_hand = 'icons/mob/items/righthand_guns.dmi',
|
||||
)
|
||||
flags = CONDUCT
|
||||
slot_flags = SLOT_BELT|SLOT_HOLSTER
|
||||
w_class = 3.0
|
||||
|
||||
matter = list("glass" = 10,DEFAULT_WALL_MATERIAL = 10)
|
||||
|
||||
attack_verb = list("struck", "pistol whipped", "hit", "bashed")
|
||||
var/bullets = 7.0
|
||||
|
||||
examine(mob/user)
|
||||
if(..(user, 0))
|
||||
src.desc = text("There are [] caps\s left. Looks almost like the real thing! Ages 8 and up.", src.bullets)
|
||||
return
|
||||
|
||||
attackby(obj/item/toy/ammo/gun/A as obj, mob/user as mob)
|
||||
|
||||
if (istype(A, /obj/item/toy/ammo/gun))
|
||||
if (src.bullets >= 7)
|
||||
user << "<span class='notice'>It's already fully loaded!</span>"
|
||||
return 1
|
||||
if (A.amount_left <= 0)
|
||||
user << "<span class='warning'>There is no more caps!</span>"
|
||||
return 1
|
||||
if (A.amount_left < (7 - src.bullets))
|
||||
src.bullets += A.amount_left
|
||||
user << text("<span class='warning'>You reload [] caps\s!</span>", A.amount_left)
|
||||
A.amount_left = 0
|
||||
else
|
||||
user << text("<span class='warning'>You reload [] caps\s!</span>", 7 - src.bullets)
|
||||
A.amount_left -= 7 - src.bullets
|
||||
src.bullets = 7
|
||||
A.update_icon()
|
||||
return 1
|
||||
return
|
||||
|
||||
afterattack(atom/target as mob|obj|turf|area, mob/user as mob, flag)
|
||||
if (flag)
|
||||
return
|
||||
if (!(istype(usr, /mob/living/carbon/human) || ticker) && ticker.mode.name != "monkey")
|
||||
usr << "<span class='warning'>You don't have the dexterity to do this!</span>"
|
||||
return
|
||||
src.add_fingerprint(user)
|
||||
if (src.bullets < 1)
|
||||
user.show_message("<span class='warning'>*click* *click*</span>", 2)
|
||||
playsound(user, 'sound/weapons/empty.ogg', 100, 1)
|
||||
return
|
||||
playsound(user, 'sound/weapons/Gunshot.ogg', 100, 1)
|
||||
src.bullets--
|
||||
for(var/mob/O in viewers(user, null))
|
||||
O.show_message(text("<span class='danger'>\The [] fires a cap gun at []!</span>", user, target), 1, "<span class='warning'>You hear a gunshot!</span>", 2)
|
||||
|
||||
/obj/item/toy/ammo/gun
|
||||
name = "ammo-caps"
|
||||
desc = "There are 7 caps left! Make sure to recyle the box in an autolathe when it gets empty."
|
||||
icon = 'icons/obj/ammo.dmi'
|
||||
icon_state = "357-7"
|
||||
flags = CONDUCT
|
||||
w_class = 1.0
|
||||
|
||||
matter = list(DEFAULT_WALL_MATERIAL = 10,"glass" = 10)
|
||||
|
||||
var/amount_left = 7.0
|
||||
|
||||
update_icon()
|
||||
src.icon_state = text("357-[]", src.amount_left)
|
||||
src.desc = text("There are [] caps\s left! Make sure to recycle the box in an autolathe when it gets empty.", src.amount_left)
|
||||
return
|
||||
|
||||
/*
|
||||
* Toy crossbow
|
||||
*/
|
||||
|
||||
@@ -84,7 +84,7 @@
|
||||
/obj/item/toy/balloon,
|
||||
/obj/item/toy/blink,
|
||||
/obj/item/toy/crossbow,
|
||||
/obj/item/toy/gun,
|
||||
/obj/item/weapon/gun/projectile/revolver/capgun,
|
||||
/obj/item/toy/katana,
|
||||
/obj/item/toy/prize/deathripley,
|
||||
/obj/item/toy/prize/durand,
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -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)
|
||||
6
html/changelogs/Chinsky-roulette.yml
Normal file
6
html/changelogs/Chinsky-roulette.yml
Normal file
@@ -0,0 +1,6 @@
|
||||
author: Chinsky
|
||||
|
||||
delete-after: True
|
||||
|
||||
changes:
|
||||
- rscadd: "Russian roulette! Fun for whole sec team! Unload some shells from revolver, spin the cylinder(verb) and you're good to go!"
|
||||
7
html/changelogs/chinsky-capguns.yml
Normal file
7
html/changelogs/chinsky-capguns.yml
Normal file
@@ -0,0 +1,7 @@
|
||||
|
||||
author: Chinsky
|
||||
|
||||
delete-after: True
|
||||
|
||||
changes:
|
||||
- rscadd: "Made capguns into proper guns code-wise. It means you can now take people hostage with them, stick in your mouth, and all other things you can do with real guns but probably shouldn't."
|
||||
BIN
sound/weapons/revolver_spin.ogg
Normal file
BIN
sound/weapons/revolver_spin.ogg
Normal file
Binary file not shown.
Reference in New Issue
Block a user