Resolves issue 594 - You can no longer use Mech-drills/clamps/etc to interact with your hud items.

Fixed an old feature that diverted clicks on a hud inventory-slot (say, the place you put your bag) to the object in that slot (i.e. making it easier to click small items and also making it possible to remove things that have borked and turned invisible

Fixed admins being able to change their own rank via chgadlvl.

Insignificant tweaks to DblClick() just removed some useless bits near the top.

Known issues:
Can't put straight jackets on aliums anymore for some reason
Aliums can remove straight jackets from themselves.
Can still mecha-drill a few things you shouldn't be able to >_>

git-svn-id: http://tgstation13.googlecode.com/svn/trunk@4032 316c924e-a436-60f5-8080-3fe189b3f50e
This commit is contained in:
elly1989@rocketmail.com
2012-07-11 07:48:14 +00:00
parent ff2ac76177
commit f92bec2a22
10 changed files with 134 additions and 230 deletions
+4
View File
@@ -1417,6 +1417,7 @@ var/global/BSACooldown = 0
//change admin level
var/rank = href_list["chgadlvl"]
var/client/C = locate(href_list["client4ad"])
if(!istype(C)) return
if(rank == "Remove")
C.clear_admin_verbs()
C.update_admins(null)
@@ -1424,6 +1425,9 @@ var/global/BSACooldown = 0
message_admins("[key_name_admin(usr)] has removed [C]'s adminship", 1)
admins.Remove(C.ckey)
else
if(C == owner) //no promoting/demoting yourself
message_admins("[C] tried to change their own admin-rank >:(")
return
C.clear_admin_verbs()
C.update_admins(rank)
log_admin("[key_name(usr)] has made [C] a [rank]")
+1 -1
View File
@@ -66,7 +66,7 @@
/mob/proc/drop_item_v() //this is dumb.
if(stat == CONSCIOUS)
if(stat == CONSCIOUS && isturf(loc))
return drop_item()
return 0
@@ -21,60 +21,34 @@
/mob/living/carbon/alien/humanoid/db_click(text, t1)
var/obj/item/W = get_active_hand()
var/emptyHand = (W == null)
if ((!emptyHand) && (!istype(W, /obj/item)))
if(W && !istype(W))
return
if (emptyHand)
usr.next_move = usr.prev_move
usr:lastDblClick -= 3 //permit the double-click redirection to proceed.
switch(text)
//if emptyhand then wear the suit, no bedsheet clothes for the alien
if("o_clothing")
if (wear_suit)
if (emptyHand)
wear_suit.DblClick()
// else
// update_inv_wear_suit()
return
/* if (!( istype(W, /obj/item/clothing/suit) ))
if(wear_suit)
if(!W) wear_suit.attack_alien(src)
return
u_equip(W)
wear_suit = W
W.get_active_hand(src, text)
*/
return
if("head")
if (head)
if (emptyHand)
head.DblClick()
else if (( istype(W, /obj/effect/alien/head) )) //TODO: figure out wtf this is about ~Carn
u_equip(W)
head = W
update_inv_head()
if(head)
if(!W) head.attack_alien(src)
return
return
/* if (!( istype(W, /obj/item/clothing/head) ))
return
u_equip(W)
head = W
W.get_active_hand(src, text)
*/
if("storage1")
if (l_store)
if (emptyHand)
l_store.DblClick()
if(l_store)
if(!W) l_store.attack_alien(src)
return
if ((!( istype(W, /obj/item) ) || W.w_class > 3))
if(W.w_class > 3)
return
u_equip(W)
l_store = W
update_inv_pockets()
if("storage2")
if (r_store)
if (emptyHand)
r_store.DblClick()
if(r_store)
if(!W) r_store.attack_alien(src)
return
if ((!( istype(W, /obj/item) ) || W.w_class > 3))
if(W.w_class > 3)
return
u_equip(W)
r_store = W
+58 -119
View File
@@ -1013,65 +1013,41 @@ It can still be worn/put on as normal.
/mob/living/carbon/human/db_click(text, t1)
var/obj/item/W = get_active_hand()
var/emptyHand = (W == null)
if(emptyHand)
usr.next_move = usr.prev_move
usr:lastDblClick -= 3 //permit the double-click redirection to proceed.
else
if( !istype(W, /obj/item) ) return
if(W && !istype(W)) return
switch(text)
if("mask")
if(wear_mask)
if(emptyHand)
wear_mask.DblClick()
if(!W) wear_mask.attack_hand(src)
return
if (!istype(W, /obj/item))
return
if (!( W.slot_flags & SLOT_MASK ))
if( !(W.slot_flags & SLOT_MASK) )
return
u_equip(W)
wear_mask = W
if(wear_mask && (wear_mask.flags & BLOCKHAIR))
if(wear_mask.flags & BLOCKHAIR)
update_hair(0) //rebuild hair
W.equipped(src, text)
update_inv_wear_mask()
if("back")
if (back)
if (emptyHand)
back.DblClick()
if(back)
if(!W) back.attack_hand(src)
return
if (!istype(W, /obj/item))
if( !(W.slot_flags & SLOT_BACK) )
return
if (!( W.slot_flags & SLOT_BACK ))
return
if(istype(W,/obj/item/weapon/twohanded) && W:wielded)
if(istype(W,/obj/item/weapon/twohanded) && W:wielded) //TODO
usr << "<span class='warning'>Unwield the [initial(W.name)] first!</span>"
return
u_equip(W)
back = W
W.equipped(src, text)
update_inv_back()
/* if("headset")
if (ears)
if (emptyHand)
ears.DblClick()
return
if (!( istype(W, /obj/item/device/radio/headset) ))
return
u_equip(W)
w_radio = W
W.equipped(src, text) */
if("o_clothing")
if (wear_suit)
if (emptyHand)
wear_suit.DblClick()
if(wear_suit)
if(!W) wear_suit.attack_hand(src)
return
if (!istype(W, /obj/item))
if( !(W.slot_flags & SLOT_OCLOTHING) )
return
if (!( W.slot_flags & SLOT_OCLOTHING ))
return
if ((FAT in src.mutations) && !(W.flags & ONESIZEFITSALL))
if( !(W.flags & ONESIZEFITSALL) && (FAT in mutations) )
src << "\red You're too fat to wear the [W.name]!"
return
u_equip(W)
@@ -1079,100 +1055,78 @@ It can still be worn/put on as normal.
W.equipped(src, text)
update_inv_wear_suit()
if("gloves")
if (gloves)
if (emptyHand)
gloves.DblClick()
if(gloves)
if(!W) gloves.attack_hand(src)
return
if (!istype(W, /obj/item))
return
if (!( W.slot_flags & SLOT_GLOVES ))
if( !(W.slot_flags & SLOT_GLOVES) )
return
u_equip(W)
gloves = W
W.equipped(src, text)
update_inv_gloves()
if("shoes")
if (shoes)
if (emptyHand)
shoes.DblClick()
if(shoes)
if(!W) shoes.attack_hand(src)
return
if (!istype(W, /obj/item))
return
if (!( W.slot_flags & SLOT_FEET ))
if( !( W.slot_flags & SLOT_FEET) )
return
u_equip(W)
shoes = W
W.equipped(src, text)
update_inv_shoes()
if("belt")
if (belt)
if (emptyHand)
belt.DblClick()
if(belt)
if(!W) belt.attack_hand(src)
return
if (!w_uniform)
if(!w_uniform)
return
if (!istype(W, /obj/item))
return
if (!( W.slot_flags & SLOT_BELT ))
if( !(W.slot_flags & SLOT_BELT) )
return
u_equip(W)
belt = W
W.equipped(src, text)
update_inv_belt()
if("eyes")
if (glasses)
if (emptyHand)
glasses.DblClick()
if(glasses)
if(!W) glasses.attack_hand(src)
return
if (!istype(W, /obj/item))
return
if (!( W.slot_flags & SLOT_EYES ))
if( !(W.slot_flags & SLOT_EYES) )
return
u_equip(W)
glasses = W
W.equipped(src, text)
update_inv_glasses()
if("head")
if (head)
if (emptyHand)
head.DblClick()
if(head)
if(!W) head.attack_hand(src)
return
if (!istype(W, /obj/item))
return
if (!( W.slot_flags & SLOT_HEAD ))
if( !(W.slot_flags & SLOT_HEAD) )
return
u_equip(W)
head = W
if(head.flags & BLOCKHAIR)
//rebuild hair
update_hair(0)
update_hair(0) //rebuild hair
if(istype(W,/obj/item/clothing/head/kitty))
W.update_icon(src)
W.equipped(src, text)
update_inv_head()
if("ears")
if (ears)
if (emptyHand)
ears.DblClick()
if(ears)
if(!W) ears.attack_hand(src)
return
if (!istype(W, /obj/item))
return
if (!( W.slot_flags & SLOT_EARS ))
if( !(W.slot_flags & SLOT_EARS) )
return
u_equip(W)
ears = W
W.equipped(src, text)
update_inv_ears()
if("i_clothing")
if (w_uniform)
if (emptyHand)
w_uniform.DblClick()
if(w_uniform)
if(!W) w_uniform.attack_hand(src)
return
if (!istype(W, /obj/item))
if( !(W.slot_flags & SLOT_ICLOTHING) )
return
if (!( W.slot_flags & SLOT_ICLOTHING ))
return
if ((FAT in src.mutations) && !(W.flags & ONESIZEFITSALL))
if( !(W.flags & ONESIZEFITSALL) && (FAT in src.mutations) )
src << "\red You're too fat to wear the [W.name]!"
return
u_equip(W)
@@ -1180,66 +1134,51 @@ It can still be worn/put on as normal.
W.equipped(src, text)
update_inv_w_uniform()
if("id")
if (wear_id)
if (emptyHand)
wear_id.DblClick()
if(wear_id)
if(!W) wear_id.attack_hand(src)
return
if (!w_uniform)
if(!w_uniform)
return
if (!istype(W, /obj/item))
return
if (!( W.slot_flags & SLOT_ID ))
if( !(W.slot_flags & SLOT_ID) )
return
u_equip(W)
wear_id = W
W.equipped(src, text)
update_inv_wear_id()
if("storage1")
if (l_store)
if (emptyHand)
l_store.DblClick()
if(l_store)
if(!W) l_store.attack_hand(src)
return
if (!w_uniform)
if(!w_uniform)
return
if (!istype(W, /obj/item))
if(W.slot_flags & SLOT_DENYPOCKET)
return
if ( ( W.slot_flags & SLOT_DENYPOCKET ) )
return
if ( W.w_class <= 2 || ( W.slot_flags & SLOT_POCKET ) )
if( W.w_class <= 2 || (W.slot_flags & SLOT_POCKET) )
u_equip(W)
l_store = W
update_inv_pockets()
if("storage2")
if (r_store)
if (emptyHand)
r_store.DblClick()
if(r_store)
if(!W) r_store.attack_hand(src)
return
if (!w_uniform)
if(!w_uniform)
return
if (!istype(W, /obj/item))
if(W.slot_flags & SLOT_DENYPOCKET)
return
if ( ( W.slot_flags & SLOT_DENYPOCKET ) )
return
if ( W.w_class <= 2 || ( W.slot_flags & SLOT_POCKET ) )
if( W.w_class <= 2 || (W.slot_flags & SLOT_POCKET) )
u_equip(W)
r_store = W
update_inv_pockets()
if("suit storage")
if (s_store)
if (emptyHand)
s_store.DblClick()
if(s_store)
if(!W) s_store.attack_hand(src)
return
var/confirm
if (wear_suit)
if(!wear_suit.allowed)
usr << "You somehow have a suit with no defined allowed items for suit storage, stop that."
return
if (istype(W, /obj/item/device/pda) || istype(W, /obj/item/weapon/pen))
confirm = 1
if (is_type_in_list(W, wear_suit.allowed))
confirm = 1
if (!confirm) return
else
if(!wear_suit)
return
if(!wear_suit.allowed)
usr << "You somehow have a suit with no defined allowed items for suit storage, stop that."
return
if( istype(W, /obj/item/device/pda) || istype(W, /obj/item/weapon/pen) || is_type_in_list(W, wear_suit.allowed) )
u_equip(W)
s_store = W
update_inv_s_store()
+7 -9
View File
@@ -108,32 +108,30 @@
//Used by monkeys, *chimpers* //TODO: eliminate this convoluted proc it's incredibly shitty. ~Carn
/mob/proc/db_click(text, t1)
var/obj/item/weapon/W = get_active_hand()
var/obj/item/W = get_active_hand()
if(W && !istype(W)) return
switch(text)
if("mask")
if (wear_mask)
if(wear_mask)
return
if (!( W.slot_flags & SLOT_MASK ))
if( !(W.slot_flags & SLOT_MASK) )
return
u_equip(W)
wear_mask = W
W.equipped(src, text)
update_inv_wear_mask()
if("back")
if (back)
if(back)
return
if (!istype(W, /obj/item))
if( !(W.slot_flags & SLOT_BACK) )
return
if (!( W.slot_flags & SLOT_BACK ))
return
if(istype(W,/obj/item/weapon/twohanded) && W:wielded)
if( istype(W,/obj/item/weapon/twohanded) && W:wielded ) //TODO: Carn
usr << "<span class='warning'>Unwield the [initial(W.name)] first!</span>"
return
u_equip(W)
back = W
W.equipped(src, text)
update_inv_back()
return
/mob/proc/reset_view(atom/A)