Overhauled holsters and webbings

This commit is contained in:
ZomgPonies
2014-07-15 04:02:24 -04:00
parent c54b9e3626
commit 1eb02b5cf4
9 changed files with 56 additions and 99 deletions
+4
View File
@@ -504,6 +504,10 @@
hud_used.item_action_list = list()
for(var/obj/item/I in src)
if(istype(I,/obj/item/clothing/under))
var/obj/item/clothing/under/U = I
if(U.hastie)
I = U.hastie
if(I.icon_action_button)
var/obj/screen/item_action/A = new(hud_used)
//A.icon = 'icons/mob/screen1_action.dmi'
+3 -1
View File
@@ -55,9 +55,11 @@
if(usr.stat || usr.restrained() || usr.stunned || usr.lying)
return 1
if(!(owner in usr))
if(!(owner in usr) && !(owner.loc.loc == usr))
return 1
owner.ui_action_click()
return 1
+1 -1
View File
@@ -1070,7 +1070,7 @@ var/list/all_supply_groups = list("Operations","Security","Hospitality","Enginee
name = "Mafia Supply crate"
contains = list(/obj/item/clothing/suit/browntrenchcoat =1,/obj/item/clothing/suit/blacktrenchcoat =1,/obj/item/clothing/head/fedora/whitefedora =1,
/obj/item/clothing/head/fedora/brownfedora =1,/obj/item/clothing/head/fedora =1,/obj/item/clothing/under/flappers =1,/obj/item/clothing/under/mafia =1,/obj/item/clothing/under/mafia/vest =1,/obj/item/clothing/under/mafia/white =1,
/obj/item/clothing/under/mafia/sue =1,/obj/item/clothing/under/mafia/tan =1, /obj/item/toy/crossbow/tommygun =2,/obj/item/clothing/tie/accessory/gunholster =1,)
/obj/item/clothing/under/mafia/sue =1,/obj/item/clothing/under/mafia/tan =1, /obj/item/toy/crossbow/tommygun =2)
cost = 15
containertype = /obj/structure/closet/crate
containername = "mafia supply crate"
+4
View File
@@ -546,6 +546,10 @@
/obj/item/proc/ui_action_click()
if( src in usr )
attack_self(usr)
return
else if(istype(src, /obj/item/clothing/tie))
if(istype(src.loc,/obj/item/clothing/under))
attack_self(usr)
/obj/item/proc/IsShield()
@@ -123,7 +123,7 @@
new /obj/item/device/flash(src)
new /obj/item/weapon/melee/baton/loaded(src)
new /obj/item/weapon/gun/energy/gun(src)
new /obj/item/clothing/tie/holster/waist(src)
new /obj/item/clothing/tie/holster/armpit(src)
new /obj/item/weapon/melee/telebaton(src)
return
@@ -281,7 +281,6 @@
new /obj/item/clothing/gloves/black(src)
new /obj/item/clothing/head/det_hat(src)
new /obj/item/clothing/shoes/brown(src)
new /obj/item/clothing/tie/accessory/gunholster(src)
new /obj/item/weapon/storage/box/evidence(src)
new /obj/item/device/radio/headset/headset_sec(src)
new /obj/item/device/detective_scanner(src)
+2 -69
View File
@@ -267,12 +267,6 @@ BLIND // can't see anything
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(hastie,/obj/item/clothing/tie/storage))
verbs += /obj/item/clothing/under/proc/storage
if(istype(loc, /mob/living/carbon/human))
var/mob/living/carbon/human/H = loc
H.update_inv_w_uniform()
@@ -284,7 +278,7 @@ BLIND // can't see anything
/obj/item/clothing/under/attack_hand(mob/user as mob)
//only forward to the attached accessory if the clothing is equipped (not in a storage)
if(hastie && src.loc == user)
hastie.attack_hand(user)
removetie()
return
if ((ishuman(usr) || ismonkey(usr)) && src.loc == user) //make it harder to accidentally undress yourself
@@ -368,9 +362,7 @@ BLIND // can't see anything
else
usr << "<span class='notice'>You cannot roll down the uniform!</span>"
/obj/item/clothing/under/verb/removetie()
set name = "Remove Accessory"
set category = "Object"
/obj/item/clothing/under/proc/removetie()
set src in usr
if(!istype(usr, /mob/living)) return
if(usr.stat) return
@@ -379,11 +371,7 @@ BLIND // can't see anything
usr.put_in_hands(hastie)
hastie = null
if (istype(hastie,/obj/item/clothing/tie/holster))
verbs -= /obj/item/clothing/under/proc/holster
if (istype(hastie,/obj/item/clothing/tie/storage))
verbs -= /obj/item/clothing/under/proc/storage
var/obj/item/clothing/tie/storage/W = hastie
if (W.hold)
W.hold.loc = hastie
@@ -396,59 +384,4 @@ BLIND // can't see anything
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 \The [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 == "harm")
usr.visible_message("\red \The [usr] draws \the [H.holstered], ready to shoot!", \
"\red You draw \the [H.holstered], ready to shoot!")
else
usr.visible_message("\blue \The [usr] draws \the [H.holstered], pointing it at the ground.", \
"\blue You draw \the [H.holstered], pointing it at the ground.")
usr.put_in_hands(H.holstered)
H.holstered = null
/obj/item/clothing/under/proc/storage()
set name = "Look in storage"
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/storage))
usr << "\red You need something to store items in for that!"
return
var/obj/item/clothing/tie/storage/W = hastie
if (!istype(W.hold))
return
W.hold.loc = usr
W.hold.attack_hand(usr)
+1 -3
View File
@@ -34,9 +34,7 @@
toggle()
/obj/item/clothing/head/welding/verb/toggle()
set category = "Object"
set name = "Adjust welding mask"
/obj/item/clothing/head/welding/proc/toggle()
set src in usr
if(usr.canmove && !usr.stat && !usr.restrained())
+40 -23
View File
@@ -162,6 +162,39 @@
icon_state = "holster"
_color = "holster"
var/obj/item/weapon/gun/holstered = null
icon_action_button = "action_holster"
/obj/item/clothing/tie/holster/attack_self()
holster()
/obj/item/clothing/tie/holster/proc/holster()
if(!istype(usr, /mob/living)) return
if(usr.stat) return
if(!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 [src]!"
return
holstered = usr.get_active_hand()
usr.drop_item()
holstered.loc = src
usr.visible_message("\blue \The [usr] holsters \the [holstered].", "You holster \the [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 == "harm")
usr.visible_message("\red \The [usr] draws \the [holstered], ready to shoot!", \
"\red You draw \the [holstered], ready to shoot!")
else
usr.visible_message("\blue \The [usr] draws \the [holstered], pointing it at the ground.", \
"\blue You draw \the [holstered], pointing it at the ground.")
usr.put_in_hands(holstered)
holstered = null
/obj/item/clothing/tie/holster/armpit
name = "shoulder holster"
@@ -169,12 +202,6 @@
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"
/obj/item/clothing/tie/storage
name = "load bearing equipment"
desc = "Used to hold things when you don't have enough hands for that."
@@ -182,19 +209,20 @@
_color = "webbing"
var/slots = 3
var/obj/item/weapon/storage/pockets/hold
icon_action_button = "action_storage"
/obj/item/clothing/tie/storage/New()
hold = new /obj/item/weapon/storage/pockets(src)
hold.master_item = src
hold.storage_slots = slots
/obj/item/clothing/tie/storage/attack_self(mob/user as mob)
user << "<span class='notice'>You empty [src].</span>"
var/turf/T = get_turf(src)
hold.hide_from(usr)
for(var/obj/item/I in hold.contents)
hold.remove_from_storage(I, T)
src.add_fingerprint(user)
if (!istype(hold))
return
hold.loc = user
hold.attack_hand(user)
/obj/item/clothing/tie/storage/attackby(obj/item/weapon/W as obj, mob/user as mob)
hold.attackby(W,user)
@@ -335,14 +363,3 @@
..()
new /obj/item/weapon/hatchet/unathiknife(hold)
new /obj/item/weapon/hatchet/unathiknife(hold)
/////////////////
//Miscellaneous//
/////////////////
/obj/item/clothing/tie/accessory/gunholster
name = "gun holster"
desc = "When you just HAVE to show off your guns"
icon_state = "gunhulster"
_color = "gunhulster"