baloh.matevz@gmail.com
2012-05-21 00:04:08 +00:00
parent ce63ae2247
commit 3394098496
21 changed files with 630 additions and 302 deletions
+25 -24
View File
@@ -704,35 +704,36 @@ var/using_new_click_proc = 0 //TODO ERRORAGE (This is temporary, while the DblCl
// ------- SHIFT-CLICK -------
var/parameters = params2list(params)
if(params)
var/parameters = params2list(params)
if(parameters["shift"]){
if(!isAI(usr))
ShiftClick(usr)
else
AIShiftClick(usr)
return
}
if(parameters["shift"]){
if(!isAI(usr))
ShiftClick(usr)
else
AIShiftClick(usr)
return
}
// ------- ALT-CLICK -------
// ------- ALT-CLICK -------
if(parameters["alt"]){
if(!isAI(usr))
AltClick(usr)
else
AIAltClick(usr)
return
}
if(parameters["alt"]){
if(!isAI(usr))
AltClick(usr)
else
AIAltClick(usr)
return
}
// ------- CTRL-CLICK -------
// ------- CTRL-CLICK -------
if(parameters["ctrl"]){
if(!isAI(usr))
CtrlClick(usr)
else
AICtrlClick(usr)
return
}
if(parameters["ctrl"]){
if(!isAI(usr))
CtrlClick(usr)
else
AICtrlClick(usr)
return
}
// ------- MIDDLE-CLICK -------
+97 -36
View File
@@ -1,47 +1,100 @@
#define ui_dropbutton "SOUTH-1,7"
#define ui_swapbutton "SOUTH-1,7"
#define ui_iclothing "SOUTH-1,2"
#define ui_oclothing "SOUTH,2"
//Lower left, persistant menu
#define ui_inventory "1:6,1:5"
//Inventory close areas. When you pass your mouse over these areas they close the inventory.
#define ui_invclosearea1 "1,1 to 1:6,5"
#define ui_invclosearea2 "1,1 to 4,1:16"
#define ui_invclosearea3 "4:16,1 to 5:16,5"
#define ui_invclosearea4 "1,5:16 to 4,5:16"
//Lower center, persistant menu
#define ui_id "4:12,1:5"
#define ui_belt "5:14,1:5"
#define ui_back "6:14,1:5"
#define ui_rhand "7:16,1:5"
#define ui_lhand "8:16,1:5"
#define ui_swaphand1 "7:16,2:5"
#define ui_swaphand2 "8:16,2:5"
#define ui_storage1 "9:18,1:5"
#define ui_storage2 "10:20,1:5"
#define ui_alien_head "4:12,1:5" //aliens
#define ui_alien_oclothing "5:14,1:5" //aliens
#define ui_inv1 "6:16,1:5" //borgs
#define ui_inv2 "7:16,1:5" //borgs
#define ui_inv3 "8:16,1:5" //borgs
#define ui_borg_store "9:14,1:5" //borgs
#define ui_monkey_mask "5:14,1:5" //monkey
#define ui_monkey_back "6:14,1:5" //monkey
//Lower right, persistant menu
#define ui_dropbutton "12:24,2:7"
#define ui_throw "13:26,2:7"
#define ui_pull "14:28,2:7"
#define ui_acti "12:24,1:5"
#define ui_movi "13:26,1:5"
#define ui_zonesel "14:28,1:5"
//Middle right (damage indicators)
#define ui_pressure "14:28,6:13"
#define ui_oxygen "14:28,7:15"
#define ui_fire "14:28,8:17"
#define ui_toxin "14:28,9:19"
#define ui_borg_health "14:28,6:13" //borgs have the health display where humans have the pressure damage indicator.
#define ui_alien_health "14:28,6:13" //aliens have the health display where humans have the pressure damage indicator.
//Upper right (status indicators)
#define ui_nutrition "11:22,15:-5"
#define ui_internal "12:24,15:-5"
#define ui_health "13:26,15:-5"
#define ui_temp "14:28,15:-5"
//Pop-up inventory
#define ui_shoes "1:6,2:7"
#define ui_iclothing "2:8,2:7"
#define ui_gloves "3:10,2:7"
#define ui_sstore1 "1:6,3:9"
#define ui_oclothing "2:8,3:9"
#define ui_glasses "3:10,3:9"
#define ui_mask "1:6,4:11"
#define ui_head "2:8,4:11"
#define ui_ears "3:10,4:11"
//Intent small buttons
#define ui_help_small "12:8,1:1"
#define ui_disarm_small "12:15,1:18"
#define ui_grab_small "12:32,1:18"
#define ui_harm_small "12:39,1:1"
//#define ui_swapbutton "6:-16,1:5" //Unused
//#define ui_headset "SOUTH,8"
#define ui_rhand "SOUTH,1"
#define ui_lhand "SOUTH,3"
#define ui_id "SOUTH-1,1"
#define ui_mask "SOUTH+1,1"
#define ui_back "SOUTH+1,3"
#define ui_storage1 "SOUTH-1,4"
#define ui_storage2 "SOUTH-1,5"
#define ui_sstore1 "SOUTH+1,4"
#define ui_hstore1 "SOUTH+1,5"
#define ui_hand "6:14,1:5"
#define ui_hstore1 "5,5"
#define ui_resist "EAST+1,SOUTH-1"
#define ui_gloves "SOUTH,5"
#define ui_glasses "SOUTH,7"
#define ui_ears "SOUTH,6"
#define ui_head "SOUTH+1,2"
#define ui_shoes "SOUTH,4"
#define ui_belt "SOUTH-1,3"
#define ui_throw "SOUTH-1,8"
#define ui_oxygen "EAST+1, NORTH-4"
#define ui_pressure "EAST+1, NORTH-5"
#define ui_toxin "EAST+1, NORTH-6"
#define ui_internal "EAST+1, NORTH-2"
#define ui_fire "EAST+1, NORTH-8"
#define ui_temp "EAST+1, NORTH-10"
#define ui_health "EAST+1, NORTH-11"
#define ui_nutrition "EAST+1, NORTH-12"
#define ui_pull "SOUTH-1,10"
#define ui_hand "SOUTH-1,6"
#define ui_sleep "EAST+1, NORTH-13"
#define ui_rest "EAST+1, NORTH-14"
#define ui_acti "SOUTH-1,12"
#define ui_movi "SOUTH-1,14"
#define ui_iarrowleft "SOUTH-1,11"
#define ui_iarrowright "SOUTH-1,13"
#define ui_inv1 "SOUTH-1,1"
#define ui_inv2 "SOUTH-1,2"
#define ui_inv3 "SOUTH-1,3"
@@ -60,13 +113,21 @@ obj/hud/New(var/type = 0)
if(mymob:ears) mymob:ears:screen_loc = ui_ears
if(mymob:s_store) mymob:s_store:screen_loc = ui_sstore1
if(mymob:glasses) mymob:glasses:screen_loc = ui_glasses
if(mymob:w_uniform) mymob:w_uniform:screen_loc = ui_iclothing
if(mymob:wear_suit) mymob:wear_suit:screen_loc = ui_oclothing
if(mymob:wear_mask) mymob:wear_mask:screen_loc = ui_mask
if(mymob:head) mymob:head:screen_loc = ui_head
else
if(istype(mymob, /mob/living/carbon/human))
if(ishuman(mymob))
if(mymob:shoes) mymob:shoes:screen_loc = null
if(mymob:gloves) mymob:gloves:screen_loc = null
if(mymob:ears) mymob:ears:screen_loc = null
if(mymob:s_store) mymob:s_store:screen_loc = null
if(mymob:glasses) mymob:glasses:screen_loc = null
if(mymob:w_uniform) mymob:w_uniform:screen_loc = null
if(mymob:wear_suit) mymob:wear_suit:screen_loc = null
if(mymob:wear_mask) mymob:wear_mask:screen_loc = null
if(mymob:head) mymob:head:screen_loc = null
/obj/hud/var/show_otherinventory = 1
+20 -13
View File
@@ -79,18 +79,25 @@
src.closer.screen_loc = text("[],[]", mx, my)
return
/obj/item/weapon/secstorage/proc/orient2hud(mob/user as mob)
//This proc draws out the inventory and places the items on it. It uses the standard position.
/obj/item/weapon/secstorage/proc/standard_orient_objs()
var/rows = 0
var/cols = 6
var/cx = 4
var/cy = 2+rows
src.boxes.screen_loc = text("4:16,2:16 to [4+cols]:16,[2+rows]:16")
for(var/obj/O in src.contents)
O.screen_loc = text("[cx]:16,[cy]:16")
O.layer = 20
cx++
if (cx > (4+cols))
cx = 4
cy--
src.closer.screen_loc = text("11:16,2:16")
return
if (src == user.l_hand)
src.orient_objs(3, 11, 3, 4)
else
if (src == user.r_hand)
src.orient_objs(1, 11, 1, 4)
else
if (src == user.back)
src.orient_objs(4, 10, 4, 3)
else
src.orient_objs(7, 8, 10, 7)
/obj/item/weapon/secstorage/proc/orient2hud(mob/user as mob)
standard_orient_objs()
return
/obj/item/weapon/secstorage/attackby(obj/item/weapon/W as obj, mob/user as mob)
@@ -154,7 +161,7 @@
/obj/item/weapon/secstorage/dropped(mob/user as mob)
src.orient_objs(7, 8, 10, 7)
standard_orient_objs()
return
/obj/item/weapon/secstorage/MouseDrop(over_object, src_location, over_location)
@@ -252,6 +259,6 @@
src.closer.icon_state = "x"
src.closer.layer = 20
spawn( 5 )
src.orient_objs(7, 8, 10, 7)
standard_orient_objs()
return
return
+23 -26
View File
@@ -62,11 +62,11 @@
return
//This proc draws out the inventory and places the items on it. tx and ty are the upper left tile and mx, my are the bottm right.
//The numbers are calculated from the bottom-left (Right hand slot on the map) being 1,1.
//The numbers are calculated from the bottom-left The bottom-left slot being 1,1.
/obj/item/weapon/storage/proc/orient_objs(tx, ty, mx, my)
var/cx = tx
var/cy = ty
src.boxes.screen_loc = text("[tx],[ty] to [mx],[my]")
src.boxes.screen_loc = text("[tx]:,[ty] to [mx],[my]")
for(var/obj/O in src.contents)
O.screen_loc = text("[cx],[cy]")
O.layer = 20
@@ -77,23 +77,29 @@
src.closer.screen_loc = text("[mx+1],[my]")
return
//This proc draws out the inventory and places the items on it. It uses the standard position.
/obj/item/weapon/storage/proc/standard_orient_objs(var/rows,var/cols)
var/cx = 4
var/cy = 2+rows
src.boxes.screen_loc = text("4:16,2:16 to [4+cols]:16,[2+rows]:16")
for(var/obj/O in src.contents)
O.screen_loc = text("[cx]:16,[cy]:16")
O.layer = 20
cx++
if (cx > (4+cols))
cx = 4
cy--
src.closer.screen_loc = text("[4+cols+1]:16,2:16")
return
//This proc determins the size of the inventory to be displayed. Please touch it only if you know what you're doing.
/obj/item/weapon/storage/proc/orient2hud(mob/user as mob)
var/mob/living/carbon/human/H = user
var/col_num = 0
var/row_count = min(7,storage_slots) -1 //For belts, the meanings of the two variables are inverted, so we don't have to declare new ones
//var/mob/living/carbon/human/H = user
var/row_num = 0
var/col_count = min(7,storage_slots) -1
if (contents.len > 7)
col_num = round((contents.len-1) / 7) // 7 is the maximum allowed column height for r_hand, l_hand and back storage items.
if (src == user.l_hand)
src.orient_objs(3-col_num, 3+row_count, 3, 3)
else if(src == user.r_hand)
src.orient_objs(1, 3+row_count, 1+col_num, 3)
else if(src == user.back)
src.orient_objs(4-col_num, 3+row_count, 4, 3)
else if(istype(user, /mob/living/carbon/human) && src == H.belt)//only humans have belts
src.orient_objs(1, 3+col_num, 1+row_count, 3)
else
src.orient_objs(5, 10+col_num, 5 + row_count, 10)
row_num = round((contents.len-1) / 7) // 7 is the maximum allowed width.
src.standard_orient_objs(row_num,col_count)
return
//This proc is called when you want to place an item into the storage item.
@@ -183,11 +189,6 @@
return
/obj/item/weapon/storage/dropped(mob/user as mob)
var/col_num = 0
var/row_count = min(7,storage_slots) -1
if (contents.len > 7)
col_num = round((contents.len-1) / 7) // 7 is the maximum allowed column height for r_hand, l_hand and back storage items.
src.orient_objs(5, 10+col_num, 5 + row_count, 10)
return
/obj/item/weapon/storage/MouseDrop(over_object, src_location, over_location)
@@ -241,11 +242,7 @@
src.closer.master = src
src.closer.icon_state = "x"
src.closer.layer = 20
spawn( 5 )
var/row_count = min(7,storage_slots) -1
var/col_num = round((storage_slots - 1) / 7) // 7 is the maximum allowed column height for r_hand, l_hand and back storage items. -Yvarov
src.orient_objs(5, 10+col_num, 5 + row_count, 10)
return
orient2hud()
return
/obj/item/weapon/storage/emp_act(severity)