Added holsters and bunny slippers.

Holsters work a bit different from before.
They utilize system for clipping things on uniform.
So now holster can be worn on any clothing.
Also it can now hold any handgun(or what I assumed to be handgun).
This commit is contained in:
Chinsky
2012-10-25 02:00:48 +04:00
parent 8a27cfdb91
commit 9d34691b82
6 changed files with 98 additions and 2 deletions
@@ -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()
@@ -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
+41
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 holster!"
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 tthe ground.", \
"\blue You draw \the [H.holstered], pointing it at tthe ground.")
usr.put_in_hands(H.holstered)
H.holstered = null
@@ -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"
+19
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"
+19
View File
@@ -129,3 +129,22 @@
update_icon()
return
/obj/item/weapon/gun/proc/isHandgun()
if(istype(src,/obj/item/weapon/gun/projectile/shotgun))
return 0
if(istype(src,/obj/item/weapon/gun/projectile/automatic))
return 0
if(istype(src,/obj/item/weapon/gun/energy/lasercannon))
return 0
if(istype(src,/obj/item/weapon/gun/energy/pulse_rifle))
return 0
if(istype(src,/obj/item/weapon/gun/energy/ionrifle))
return 0
if(istype(src,/obj/item/weapon/gun/energy/ionrifle))
return 0
if(istype(src,/obj/item/weapon/gun/energy/decloner))
return 0
if(istype(src,/obj/item/weapon/gun/energy/staff))
return 0
return 1