Merge pull request #1832 from comma/master

Holsters and bunny slippers.
This commit is contained in:
Hawk-v3
2012-10-25 15:30:48 -07:00
16 changed files with 106 additions and 3 deletions

View File

@@ -90,6 +90,7 @@
new /obj/item/device/flash(src)
new /obj/item/weapon/melee/baton(src)
new /obj/item/weapon/gun/energy/gun(src)
new /obj/item/clothing/tie/holster/waist(src)
return
@@ -189,6 +190,7 @@
new /obj/item/weapon/clipboard(src)
new /obj/item/device/detective_scanner(src)
new /obj/item/weapon/storage/box/evidence(src)
new /obj/item/clothing/tie/holster/armpit(src)
return
/obj/structure/closet/secure_closet/detective/update_icon()

View File

@@ -191,8 +191,8 @@
new /obj/item/clothing/under/pj/blue(src)
new /obj/item/clothing/shoes/white(src)
new /obj/item/clothing/shoes/white(src)
new /obj/item/clothing/shoes/white(src)
new /obj/item/clothing/shoes/white(src)
new /obj/item/clothing/shoes/slippers(src)
new /obj/item/clothing/shoes/slippers(src)
return
@@ -211,6 +211,9 @@
new /obj/item/clothing/shoes/white(src)
new /obj/item/clothing/shoes/white(src)
new /obj/item/clothing/shoes/white(src)
new /obj/item/clothing/shoes/slippers
new /obj/item/clothing/shoes/slippers
new /obj/item/clothing/shoes/slippers
return

View File

@@ -152,6 +152,8 @@ BLIND // can't see anything
hastie = I
I.loc = src
user << "<span class='notice'>You attach [I] to [src].</span>"
if (istype(hastie,/obj/item/clothing/tie/holster))
verbs += /obj/item/clothing/under/proc/holster
if(istype(loc, /mob/living/carbon/human))
var/mob/living/carbon/human/H = loc
@@ -213,6 +215,8 @@ BLIND // can't see anything
if(hastie)
usr.put_in_hands(hastie)
hastie = null
if (istype(hastie,/obj/item/clothing/tie/holster))
verbs -= /obj/item/clothing/under/proc/holster
if(istype(loc, /mob/living/carbon/human))
var/mob/living/carbon/human/H = loc
@@ -221,3 +225,40 @@ BLIND // can't see anything
/obj/item/clothing/under/rank/New()
sensor_mode = pick(0,1,2,3)
..()
/obj/item/clothing/under/proc/holster()
set name = "Holster"
set category = "Object"
set src in usr
if(!istype(usr, /mob/living)) return
if(usr.stat) return
if (!hastie || !istype(hastie,/obj/item/clothing/tie/holster))
usr << "\red You need a holster for that!"
return
var/obj/item/clothing/tie/holster/H = hastie
if(!H.holstered)
if(!istype(usr.get_active_hand(), /obj/item/weapon/gun))
usr << "\blue You need your gun equiped to holster it."
return
var/obj/item/weapon/gun/W = usr.get_active_hand()
if (!W.isHandgun())
usr << "\red This gun won't fit in \the [H]!"
return
H.holstered = usr.get_active_hand()
usr.drop_item()
H.holstered.loc = src
usr.visible_message("\blue [usr] holsters \the [H.holstered].", "You holster \the [H.holstered].")
else
if(istype(usr.get_active_hand(),/obj) && istype(usr.get_inactive_hand(),/obj))
usr << "\red You need an empty hand to draw the gun!"
else
if(usr.a_intent == "hurt")
usr.visible_message("\red [usr] draws \the [H.holstered], ready to shoot!", \
"\red You draw \the [H.holstered], ready to shoot!")
else
usr.visible_message("\blue [usr] draws \the [H.holstered], pointing it at the ground.", \
"\blue You draw \the [H.holstered], pointing it at tthe ground.")
usr.put_in_hands(H.holstered)
H.holstered = null

View File

@@ -101,3 +101,15 @@
icon_state = "laceups"
item_state = "laceups"
color = "black"
/obj/item/clothing/shoes/slippers
name = "bunny slippers"
desc = "Fluffy!"
icon_state = "slippers"
item_state = "slippers"
/obj/item/clothing/shoes/slippers_worn
name = "worn bunny slippers"
desc = "Fluffy..."
icon_state = "slippers_worn"
item_state = "slippers_worn"

View File

@@ -65,6 +65,25 @@
return ..(M,user)
/obj/item/clothing/tie/holster
name = "shoulder holster"
desc = "A handgun holster."
icon_state = "holster"
color = "holster"
var/obj/item/weapon/gun/holstered = null
/obj/item/clothing/tie/holster/armpit
name = "shoulder holster"
desc = "A worn-out handgun holster. Perfect for concealed carry"
icon_state = "holster"
color = "holster"
/obj/item/clothing/tie/holster/waist
name = "shoulder holster"
desc = "A handgun holster. Made of expensive leather."
icon_state = "holster"
color = "holster_low"
//Medals
/obj/item/clothing/tie/medal
name = "bronze medal"

View File

@@ -129,3 +129,6 @@
update_icon()
return
/obj/item/weapon/gun/proc/isHandgun()
return 1

View File

@@ -71,6 +71,8 @@ obj/item/weapon/gun/energy/laser/retro
origin_tech = "combat=4;materials=3;powerstorage=3"
projectile_type = "/obj/item/projectile/beam/heavylaser"
isHandgun()
return 0
/obj/item/weapon/gun/energy/xray
name = "xray laser gun"

View File

@@ -32,6 +32,8 @@
projectile_type = "/obj/item/projectile/beam/pulse"
return
isHandgun()
return 0
/obj/item/weapon/gun/energy/pulse_rifle/destroyer
name = "pulse destroyer"
@@ -49,4 +51,7 @@
icon_state = "m1911-p"
cell_type = "/obj/item/weapon/cell/infinite"
isHandgun()
return 1

View File

@@ -10,6 +10,9 @@
charge_cost = 100
projectile_type = "/obj/item/projectile/ion"
isHandgun()
return 0
/obj/item/weapon/gun/energy/ionrifle/emp_act(severity)
if(severity <= 2)
power_supply.use(round(power_supply.maxcharge / severity))
@@ -17,6 +20,7 @@
else
return
/obj/item/weapon/gun/energy/decloner
name = "biological demolecularisor"
desc = "A gun that discharges high amounts of controlled radiation to slowly break a target into component elements."
@@ -26,6 +30,9 @@
charge_cost = 100
projectile_type = "/obj/item/projectile/energy/declone"
isHandgun()
return 0
obj/item/weapon/gun/energy/staff
name = "staff of change"
desc = "An artefact that spits bolts of coruscating energy which cause the target's very form to reshape itself"
@@ -62,6 +69,9 @@ obj/item/weapon/gun/energy/staff
update_icon()
return 1
isHandgun()
return 0
/obj/item/weapon/gun/energy/floragun
name = "floral somatoray"
desc = "A tool that discharges controlled radiation which induces mutation in plant cells."

View File

@@ -8,6 +8,8 @@
origin_tech = "combat=4;materials=2"
ammo_type = "/obj/item/ammo_casing/c9mm"
isHandgun()
return 0
/obj/item/weapon/gun/projectile/automatic/mini_uzi
@@ -20,6 +22,8 @@
origin_tech = "combat=5;materials=2;syndicate=8"
ammo_type = "/obj/item/ammo_casing/c45"
isHandgun()
return 1
/obj/item/weapon/gun/projectile/automatic/c20r

View File

@@ -4,7 +4,7 @@
icon_state = "detective"
caliber = "38"
origin_tech = "combat=2;materials=2"
ammo_type = "/obj/item/ammo_casing/c38"
ammo_type = "/obj/item/ammo_magazine/c38"
/*
special_check(var/mob/living/carbon/human/M)

View File

@@ -15,6 +15,8 @@
var/pumped = 0
var/obj/item/ammo_casing/current_shell = null
isHandgun()
return 0
load_into_chamber()
if(in_chamber)