mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-23 20:16:55 +01:00
The new 'sleek' user interface is going live.
Screenshots: Humans: http://www.kamletos.si/ss13%20hud%2018%20human%20standard.png http://www.kamletos.si/ss13%20hud%2018%20human%20full.png Borgs: http://www.kamletos.si/ss13%20hud%2018%20borg.png Aliens: http://www.kamletos.si/ss13%20hud%2018%20larva.png http://www.kamletos.si/ss13%20hud%2018%20alien.png Monkeys: http://www.kamletos.si/ss13%20hud%2018%20monkey.png git-svn-id: http://tgstation13.googlecode.com/svn/trunk@3630 316c924e-a436-60f5-8080-3fe189b3f50e
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user