Merge pull request #8289 from Xhuis/alt_clicking

Allows alt-clicking for some stuff
This commit is contained in:
Jordie
2015-03-19 16:43:53 +11:00
4 changed files with 58 additions and 32 deletions
+23 -11
View File
@@ -11,19 +11,31 @@
src.flipped=0
..()
verb/flip()
verb/flipcap()
set category = "Object"
set name = "Flip cap"
set src in usr
if(usr.canmove && !usr.stat && !usr.restrained())
src.flipped = !src.flipped
if(src.flipped)
icon_state = "[item_color]soft_flipped"
usr << "You flip the hat backwards."
else
icon_state = "[item_color]soft"
usr << "You flip the hat back in normal position."
usr.update_inv_head(0) //so our mob-overlays update
flip(usr)
/obj/item/clothing/head/soft/AltClick(var/mob/user)
flip(user)
/obj/item/clothing/head/soft/proc/flip(var/mob/user)
if(user.canmove && !user.stat && !user.restrained())
src.flipped = !src.flipped
if(src.flipped)
icon_state = "[item_color]soft_flipped"
user << "You flip the hat backwards."
else
icon_state = "[item_color]soft"
user << "You flip the hat back in normal position."
usr.update_inv_head(0) //so our mob-overlays update
/obj/item/clothing/head/soft/examine(mob/user)
..()
user << "<span class='notice'>Alt-click the cap to flip it [flipped ? "forwards" : "backwards"].</span>"
/obj/item/clothing/head/soft/red
name = "red cap"
+8 -1
View File
@@ -15,10 +15,17 @@
/obj/item/clothing/mask/breath/attack_self(var/mob/user)
adjustmask(user)
/obj/item/clothing/mask/breath/AltClick(var/mob/user)
adjustmask(user)
/obj/item/clothing/mask/breath/examine(mob/user)
..()
user << "<span class='notice'>Alt-click [src] to adjust it.</span>"
/obj/item/clothing/mask/breath/medical
desc = "A close-fitting sterile mask that can be connected to an air supply."
name = "medical mask"
icon_state = "medical"
item_state = "m_mask"
permeability_coefficient = 0.01
put_on_delay = 10
put_on_delay = 10