You can now click on an inventory slot instead of a specific item

This commit is contained in:
Markolie
2015-08-14 01:39:28 +02:00
parent 1cce7c87be
commit 85c4b99973
3 changed files with 201 additions and 176 deletions
@@ -165,6 +165,7 @@
if(display_contents_with_number)
for(var/datum/numbered_display/ND in display_contents)
ND.sample_object.mouse_opacity = 2
ND.sample_object.screen_loc = "[cx]:16,[cy]:16"
ND.sample_object.maptext = "<font color='white'>[(ND.number > 1)? "[ND.number]" : ""]</font>"
ND.sample_object.layer = 20
@@ -174,6 +175,7 @@
cy--
else
for(var/obj/O in contents)
O.mouse_opacity = 2 //This is here so storage items that spawn with contents correctly have the "click around item to equip"
O.screen_loc = "[cx]:16,[cy]:16"
O.maptext = ""
O.layer = 20
@@ -310,6 +312,7 @@
src.orient2hud(usr)
if(usr.s_active)
usr.s_active.show_to(usr)
W.mouse_opacity = 2 //So you can click on the area around the item to equip it, instead of having to pixel hunt
update_icon()
return 1
@@ -345,6 +348,7 @@
W.maptext = ""
W.on_exit_storage(src)
update_icon()
W.mouse_opacity = initial(W.mouse_opacity)
return 1
//This proc is called when you want to place an item into the storage item.
@@ -442,6 +446,9 @@
return
/obj/item/weapon/storage/Destroy()
for(var/obj/O in contents)
O.mouse_opacity = initial(O.mouse_opacity)
qdel(boxes)
qdel(closer)
return ..()