Merge branch 'capgun' into russian_roulette

This commit is contained in:
Chinsky
2015-08-14 06:03:33 +03:00
9 changed files with 52 additions and 90 deletions
+3 -3
View File
@@ -16,7 +16,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,
@@ -166,8 +166,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")
-81
View File
@@ -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,
+11 -2
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
@@ -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
@@ -84,4 +84,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
@@ -193,3 +193,13 @@
/obj/item/projectile/bullet/shotgun/practice
name = "practice"
damage = 5
/obj/item/projectile/bullet/pistol/cap
name = "cap"
damage = 0
nodamage = 1
embed = 0
sharp = 0
/obj/item/projectile/bullet/pistol/cap/process()
return 0
+7
View 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."