mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-10 10:12:45 +00:00
TG: The new 'sleek' user interface is going live.
OLD screenshots (Actual hud uses black/orange scheme): 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 Revision: r3630 Author: baloh.matevz
This commit is contained in:
@@ -399,6 +399,10 @@
|
||||
var/obj/screen/g_dither = null
|
||||
var/obj/screen/blurry = null
|
||||
var/list/darkMask = null
|
||||
var/obj/screen/r_hand_hud_object = null
|
||||
var/obj/screen/l_hand_hud_object = null
|
||||
var/list/obj/screen/intent_small_hud_objects = null
|
||||
var/show_intent_icons = 0
|
||||
|
||||
var/h_type = /obj/screen //this is like...the most pointless thing ever. Use a god damn define!
|
||||
|
||||
|
||||
@@ -713,43 +713,44 @@ 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
|
||||
}
|
||||
|
||||
// ------- ALT-CLICK -------
|
||||
|
||||
if(parameters["alt"]){
|
||||
if(!isAI(usr))
|
||||
AltClick(usr)
|
||||
else
|
||||
AIAltClick(usr)
|
||||
return
|
||||
}
|
||||
|
||||
// ------- CTRL-CLICK -------
|
||||
|
||||
if(parameters["ctrl"]){
|
||||
if(!isAI(usr))
|
||||
CtrlClick(usr)
|
||||
else
|
||||
AICtrlClick(usr)
|
||||
return
|
||||
}
|
||||
|
||||
// ------- MIDDLE-CLICK -------
|
||||
|
||||
if(parameters["middle"]){
|
||||
if(!isAI(usr))
|
||||
MiddleClick(usr)
|
||||
if(parameters["shift"]){
|
||||
if(!isAI(usr))
|
||||
ShiftClick(usr)
|
||||
else
|
||||
AIShiftClick(usr)
|
||||
return
|
||||
}
|
||||
}
|
||||
|
||||
// ------- ALT-CLICK -------
|
||||
|
||||
if(parameters["alt"]){
|
||||
if(!isAI(usr))
|
||||
AltClick(usr)
|
||||
else
|
||||
AIAltClick(usr)
|
||||
return
|
||||
}
|
||||
|
||||
// ------- CTRL-CLICK -------
|
||||
|
||||
if(parameters["ctrl"]){
|
||||
if(!isAI(usr))
|
||||
CtrlClick(usr)
|
||||
else
|
||||
AICtrlClick(usr)
|
||||
return
|
||||
}
|
||||
|
||||
// ------- MIDDLE-CLICK -------
|
||||
|
||||
if(parameters["middle"]){
|
||||
if(!isAI(usr))
|
||||
MiddleClick(usr)
|
||||
return
|
||||
}
|
||||
|
||||
// ------- THROW -------
|
||||
if(usr.in_throw_mode)
|
||||
|
||||
143
code/game/hud.dm
143
code/game/hud.dm
@@ -1,54 +1,105 @@
|
||||
#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"
|
||||
|
||||
//Gun buttons
|
||||
#define ui_gun1 "11:22,2:7"
|
||||
#define ui_gun2 "10:20,2:7"
|
||||
#define ui_gun3 "9:18,2:7"
|
||||
#define ui_gun_select "11:22,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_lear "3:10,4:11"
|
||||
#define ui_rear "4:12,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,6"
|
||||
#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+1,5"
|
||||
#define ui_lear "SOUTH,7"
|
||||
#define ui_rear "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"
|
||||
|
||||
|
||||
#define ui_gun1 "SOUTH,8"
|
||||
#define ui_gun2 "SOUTH,9"
|
||||
#define ui_gun3 "SOUTH,10"
|
||||
#define ui_gun_select "SOUTH-1,9"
|
||||
|
||||
|
||||
|
||||
@@ -68,6 +119,10 @@ obj/hud/New(var/type = 0)
|
||||
if(mymob:r_ear) mymob:r_ear:screen_loc = ui_rear
|
||||
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(mymob:shoes) mymob:shoes:screen_loc = null
|
||||
@@ -76,6 +131,10 @@ obj/hud/New(var/type = 0)
|
||||
if(mymob:r_ear) mymob:r_ear: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
|
||||
|
||||
@@ -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)
|
||||
@@ -160,7 +167,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)
|
||||
@@ -168,6 +175,7 @@
|
||||
if (src.locked == 1)
|
||||
return
|
||||
|
||||
orient2hud(usr)
|
||||
if ((over_object == usr && ((get_dist(src, usr) <= 1 ||src.locked == 0) || usr.contents.Find(src)))) //|| usr.telekinesis == 1
|
||||
if (usr.s_active)
|
||||
usr.s_active.close(usr)
|
||||
@@ -258,6 +266,6 @@
|
||||
src.closer.icon_state = "x"
|
||||
src.closer.layer = 20
|
||||
spawn( 5 )
|
||||
src.orient_objs(7, 8, 10, 7)
|
||||
standard_orient_objs()
|
||||
return
|
||||
return
|
||||
|
||||
@@ -1,221 +1,11 @@
|
||||
|
||||
/obj/item/clothing/suit/storage
|
||||
var/obj/screen/storage/boxes
|
||||
var/obj/screen/close/closer
|
||||
var/obj/slot1
|
||||
var/obj/slot2
|
||||
|
||||
/obj/item/clothing/suit/storage/New()
|
||||
src.boxes = new /obj/screen/storage( )
|
||||
src.boxes.name = "storage"
|
||||
src.boxes.master = src
|
||||
src.boxes.icon_state = "block"
|
||||
src.boxes.screen_loc = "7,7 to 9,7"
|
||||
src.boxes.layer = 19
|
||||
src.closer = new /obj/screen/close( )
|
||||
src.closer.master = src
|
||||
src.closer.icon_state = "x"
|
||||
src.closer.layer = 20
|
||||
src.closer.screen_loc = "9,7"
|
||||
|
||||
/obj/item/clothing/suit/storage/proc/view_inv(mob/user as mob)
|
||||
if(!user.client)
|
||||
return
|
||||
user.client.screen += src.boxes
|
||||
user.client.screen += src.closer
|
||||
user.client.screen += src.contents
|
||||
|
||||
/obj/item/clothing/suit/storage/proc/close(mob/user as mob)
|
||||
if(!user.client)
|
||||
return
|
||||
user.client.screen -= src.boxes
|
||||
user.client.screen -= src.closer
|
||||
user.client.screen -= src.contents
|
||||
|
||||
/obj/item/clothing/suit/storage/MouseDrop(atom/over_object)
|
||||
if(ishuman(usr))
|
||||
var/mob/living/carbon/human/M = usr
|
||||
if (!( istype(over_object, /obj/screen) ))
|
||||
return ..()
|
||||
playsound(src.loc, "rustle", 50, 1, -5)
|
||||
if ((!( M.restrained() ) && !( M.stat ) && M.wear_suit == src))
|
||||
if (over_object.name == "r_hand")
|
||||
if (!( M.r_hand ))
|
||||
M.u_equip(src)
|
||||
M.r_hand = src
|
||||
else
|
||||
if (over_object.name == "l_hand")
|
||||
if (!( M.l_hand ))
|
||||
M.u_equip(src)
|
||||
M.l_hand = src
|
||||
M.update_clothing()
|
||||
src.add_fingerprint(usr)
|
||||
return
|
||||
if(over_object == usr && in_range(src, usr) || usr.contents.Find(src))
|
||||
src.view_inv(M)
|
||||
src.orient_objs(7,7,9,7)
|
||||
return
|
||||
return
|
||||
|
||||
/obj/item/clothing/suit/storage/attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||
if(W.w_class > 2 || src.loc == W )
|
||||
return
|
||||
if(istype(W,/obj/item/weapon/evidencebag) && src.loc != user)
|
||||
return
|
||||
if(src.contents.len >= 2)
|
||||
user << "\red There's nowhere to place that!"
|
||||
return
|
||||
user.u_equip(W)
|
||||
W.loc = src
|
||||
if ((user.client && user.s_active != src))
|
||||
user.client.screen -= W
|
||||
else if(user.s_active == src)
|
||||
close(user)
|
||||
view_inv(user)
|
||||
orient2hud(user)
|
||||
W.dropped(user)
|
||||
|
||||
/obj/item/clothing/suit/storage/attack_paw(mob/user as mob)
|
||||
playsound(src.loc, "rustle", 50, 1, -5)
|
||||
return attack_hand(user)
|
||||
|
||||
/obj/item/clothing/suit/storage/attack_hand(mob/user as mob)
|
||||
playsound(src.loc, "rustle", 50, 1, -5)
|
||||
if (src.loc == user)
|
||||
if (user.s_active)
|
||||
user.s_active.close(user)
|
||||
src.show_to(user)
|
||||
else
|
||||
..()
|
||||
for(var/mob/M in range(1))
|
||||
if (M.s_active == src)
|
||||
src.close(M)
|
||||
src.orient2hud(user)
|
||||
src.add_fingerprint(user)
|
||||
return
|
||||
|
||||
/obj/item/clothing/suit/storage/proc/orient2hud(mob/user as mob)
|
||||
if (src == user.l_hand)
|
||||
src.orient_objs(3, 4, 3, 3)
|
||||
else if (src == user.r_hand)
|
||||
src.orient_objs(1, 4, 1, 3)
|
||||
else if (istype(user,/mob/living/carbon/human) && src == user:wear_suit)
|
||||
src.orient_objs(1, 3, 2, 3)
|
||||
else
|
||||
src.orient_objs(4, 3, 4, 2)
|
||||
return
|
||||
|
||||
/obj/item/clothing/suit/storage/proc/orient_objs(tx, ty, mx, my)
|
||||
var/cx = tx
|
||||
var/cy = ty
|
||||
src.boxes.screen_loc = "[tx],[ty] to [mx],[my]"
|
||||
for(var/obj/O in src.contents)
|
||||
O.screen_loc = "[cx],[cy]"
|
||||
O.layer = 20
|
||||
cx++
|
||||
if (cx > mx)
|
||||
cx = tx
|
||||
cy--
|
||||
src.closer.screen_loc = "[mx+1],[my]"
|
||||
return
|
||||
|
||||
/obj/item/clothing/suit/storage/proc/show_to(mob/user as mob)
|
||||
for(var/obj/item/weapon/mousetrap/MT in src)
|
||||
if(MT.armed)
|
||||
for(var/mob/O in viewers(user, null))
|
||||
if(O == user)
|
||||
user.show_message(text("\red <B>You reach into the [src.name], but there was a live mousetrap in there!</B>"), 1)
|
||||
else
|
||||
user.show_message(text("\red <B>[user] reaches into the [src.name] and sets off a hidden mousetrap!</B>"), 1)
|
||||
MT.loc = user.loc
|
||||
MT.triggered(user, user.hand ? "l_hand" : "r_hand")
|
||||
MT.layer = OBJ_LAYER
|
||||
return
|
||||
user.client.screen -= src.boxes
|
||||
user.client.screen -= src.closer
|
||||
user.client.screen -= src.contents
|
||||
user.client.screen += src.boxes
|
||||
user.client.screen += src.closer
|
||||
user.client.screen += src.contents
|
||||
user.s_active = src
|
||||
return
|
||||
|
||||
/*/obj/item/clothing/suit/storage/New()
|
||||
|
||||
src.boxes = new /obj/screen/storage( )
|
||||
src.boxes.name = "storage"
|
||||
src.boxes.master = src
|
||||
src.boxes.icon_state = "block"
|
||||
src.boxes.screen_loc = "7,7 to 10,8"
|
||||
src.boxes.layer = 19
|
||||
src.closer = new /obj/screen/close( )
|
||||
src.closer.master = src
|
||||
src.closer.icon_state = "x"
|
||||
src.closer.layer = 20
|
||||
spawn( 5 )
|
||||
src.orient_objs(7, 8, 10, 7)
|
||||
return
|
||||
return
|
||||
|
||||
/obj/item/clothing/suit/storage/attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||
|
||||
if(can_hold.len)
|
||||
var/ok = 0
|
||||
for(var/A in can_hold)
|
||||
if(istype(W, text2path(A) )) ok = 1
|
||||
if(!ok)
|
||||
user << "\red This container cannot hold [W]."
|
||||
return
|
||||
|
||||
if (src.contents.len >= 7)
|
||||
return
|
||||
if ((W.w_class >= 3 || istype(W, /obj/item/weapon/storage) || src.loc == W))
|
||||
return
|
||||
user.u_equip(W)
|
||||
W.loc = src
|
||||
if ((user.client && user.s_active != src))
|
||||
user.client.screen -= W
|
||||
src.orient2hud(user)
|
||||
W.dropped(user)
|
||||
add_fingerprint(user)
|
||||
if (istype(W, /obj/item/weapon/gun/energy/crossbow)) return //STEALTHY
|
||||
for(var/mob/O in viewers(user, null))
|
||||
O.show_message(text("\blue [] has added [] to []!", user, W, src), 1)
|
||||
//Foreach goto(139)
|
||||
return
|
||||
|
||||
/obj/item/clothing/suit/storage/dropped(mob/user as mob)
|
||||
src.orient_objs(7, 8, 10, 7)
|
||||
return
|
||||
|
||||
/obj/item/clothing/suit/storage/MouseDrop(over_object, src_location, over_location)
|
||||
..()
|
||||
if ((over_object == usr && (in_range(src, usr) || usr.contents.Find(src))))
|
||||
if (usr.s_active)
|
||||
usr.s_active.close(usr)
|
||||
src.show_to(usr)
|
||||
return
|
||||
|
||||
/obj/item/clothing/suit/storage/attack_paw(mob/user as mob)
|
||||
playsound(src.loc, "rustle", 50, 1, -5)
|
||||
return src.attack_hand(user)
|
||||
return
|
||||
|
||||
/obj/item/clothing/suit/storage/attack_hand(mob/user as mob)
|
||||
playsound(src.loc, "rustle", 50, 1, -5)
|
||||
if (src.loc == user)
|
||||
if (user.s_active)
|
||||
user.s_active.close(user)
|
||||
src.show_to(user)
|
||||
else
|
||||
..()
|
||||
for(var/mob/M in range(1))
|
||||
if (M.s_active == src)
|
||||
src.close(M)
|
||||
//Foreach goto(76)
|
||||
src.orient2hud(user)
|
||||
src.add_fingerprint(user)
|
||||
return
|
||||
var/list/can_hold = new/list() //List of objects which this item can store (if set, it can't store anything else)
|
||||
var/list/cant_hold = new/list() //List of objects which this item can't store (in effect only if can_hold isn't set)
|
||||
var/max_w_class = 2 //Max size of objects that this object can store (in effect only if can_hold isn't set)
|
||||
var/max_combined_w_class = 4 //The sum of the w_classes of all the items in this storage item.
|
||||
var/storage_slots = 2 //The number of storage slots in this container.
|
||||
var/obj/screen/storage/boxes = null
|
||||
var/obj/screen/close/closer = null
|
||||
|
||||
/obj/item/clothing/suit/storage/proc/return_inv()
|
||||
|
||||
@@ -267,19 +57,169 @@
|
||||
user.s_active = null
|
||||
return
|
||||
|
||||
/obj/item/weapon/storage/proc/orient_objs(tx, ty, mx, my)
|
||||
|
||||
//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 The bottom-left slot being 1,1.
|
||||
/obj/item/clothing/suit/storage/proc/orient_objs(tx, ty, mx, my)
|
||||
var/cx = tx
|
||||
var/cy = ty
|
||||
src.boxes.screen_loc = text("[],[] to [],[]", tx, ty, 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.screen_loc = text("[cx],[cy]")
|
||||
O.layer = 20
|
||||
cx++
|
||||
if (cx > mx)
|
||||
cx = tx
|
||||
cy--
|
||||
//Foreach goto(56)
|
||||
src.closer.screen_loc = text("[],[]", mx, my)
|
||||
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/clothing/suit/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/clothing/suit/storage/proc/orient2hud(mob/user as mob)
|
||||
//var/mob/living/carbon/human/H = user
|
||||
var/row_num = 0
|
||||
var/col_count = min(7,storage_slots) -1
|
||||
if (contents.len > 7)
|
||||
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.
|
||||
/obj/item/clothing/suit/storage/attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||
if(istype(W,/obj/item/weapon/evidencebag) && src.loc != user)
|
||||
return
|
||||
|
||||
..()
|
||||
if(isrobot(user))
|
||||
user << "\blue You're a robot. No."
|
||||
return //Robots can't interact with storage items.
|
||||
|
||||
if(src.loc == W)
|
||||
return //Means the item is already in the storage item
|
||||
|
||||
if(contents.len >= storage_slots)
|
||||
user << "\red The [src] is full, make some space."
|
||||
return //Storage item is full
|
||||
|
||||
if(can_hold.len)
|
||||
var/ok = 0
|
||||
for(var/A in can_hold)
|
||||
if(istype(W, text2path(A) ))
|
||||
ok = 1
|
||||
break
|
||||
if(!ok)
|
||||
user << "\red This [src] cannot hold [W]."
|
||||
return
|
||||
|
||||
for(var/A in cant_hold) //Check for specific items which this container can't hold.
|
||||
if(istype(W, text2path(A) ))
|
||||
user << "\red This [src] cannot hold [W]."
|
||||
return
|
||||
|
||||
if (W.w_class > max_w_class)
|
||||
user << "\red This [W] is too big for this [src]"
|
||||
return
|
||||
|
||||
var/sum_w_class = W.w_class
|
||||
for(var/obj/item/I in contents)
|
||||
sum_w_class += I.w_class //Adds up the combined w_classes which will be in the storage item if the item is added to it.
|
||||
|
||||
if(sum_w_class > max_combined_w_class)
|
||||
user << "\red The [src] is full, make some space."
|
||||
return
|
||||
|
||||
if(W.w_class >= src.w_class && (istype(W, /obj/item/weapon/storage)))
|
||||
if(!istype(src, /obj/item/weapon/storage/backpack/holding)) //bohs should be able to hold backpacks again. The override for putting a boh in a boh is in backpack.dm.
|
||||
user << "\red The [src] cannot hold [W] as it's a storage item of the same size."
|
||||
return //To prevent the stacking of the same sized items.
|
||||
|
||||
user.u_equip(W)
|
||||
W.loc = src
|
||||
if ((user.client && user.s_active != src))
|
||||
user.client.screen -= W
|
||||
src.orient2hud(user)
|
||||
W.dropped(user)
|
||||
add_fingerprint(user)
|
||||
|
||||
|
||||
|
||||
/obj/item/weapon/storage/dropped(mob/user as mob)
|
||||
return
|
||||
|
||||
/obj/item/clothing/suit/storage/MouseDrop(atom/over_object)
|
||||
if(ishuman(usr))
|
||||
var/mob/living/carbon/human/M = usr
|
||||
if (!( istype(over_object, /obj/screen) ))
|
||||
return ..()
|
||||
playsound(src.loc, "rustle", 50, 1, -5)
|
||||
if ((!( M.restrained() ) && !( M.stat ) && M.wear_suit == src))
|
||||
if (over_object.name == "r_hand")
|
||||
if (!( M.r_hand ))
|
||||
M.u_equip(src)
|
||||
M.r_hand = src
|
||||
else
|
||||
if (over_object.name == "l_hand")
|
||||
if (!( M.l_hand ))
|
||||
M.u_equip(src)
|
||||
M.l_hand = src
|
||||
M.update_clothing()
|
||||
src.add_fingerprint(usr)
|
||||
return
|
||||
if(over_object == usr && in_range(src, usr) || usr.contents.Find(src))
|
||||
usr.s_active.close(usr)
|
||||
src.show_to(usr)
|
||||
return
|
||||
|
||||
/obj/item/clothing/suit/storage/attack_paw(mob/user as mob)
|
||||
//playsound(src.loc, "rustle", 50, 1, -5) // what
|
||||
return src.attack_hand(user)
|
||||
|
||||
/obj/item/clothing/suit/storage/attack_hand(mob/user as mob)
|
||||
playsound(src.loc, "rustle", 50, 1, -5)
|
||||
src.orient2hud(user)
|
||||
if (src.loc == user)
|
||||
if (user.s_active)
|
||||
user.s_active.close(user)
|
||||
src.show_to(user)
|
||||
else
|
||||
..()
|
||||
for(var/mob/M in range(1))
|
||||
if (M.s_active == src)
|
||||
src.close(M)
|
||||
src.add_fingerprint(user)
|
||||
return
|
||||
|
||||
/obj/item/clothing/suit/storage/New()
|
||||
|
||||
src.boxes = new /obj/screen/storage( )
|
||||
src.boxes.name = "storage"
|
||||
src.boxes.master = src
|
||||
src.boxes.icon_state = "block"
|
||||
src.boxes.screen_loc = "7,7 to 10,8"
|
||||
src.boxes.layer = 19
|
||||
src.closer = new /obj/screen/close( )
|
||||
src.closer.master = src
|
||||
src.closer.icon_state = "x"
|
||||
src.closer.layer = 20
|
||||
orient2hud()
|
||||
return
|
||||
|
||||
/obj/item/weapon/storage/emp_act(severity)
|
||||
if(!istype(src.loc, /mob/living))
|
||||
for(var/obj/O in contents)
|
||||
O.emp_act(severity)
|
||||
..()
|
||||
@@ -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.
|
||||
@@ -186,15 +192,11 @@
|
||||
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)
|
||||
..()
|
||||
orient2hud(usr)
|
||||
if ((over_object == usr && (in_range(src, usr) || usr.contents.Find(src))))
|
||||
if (usr.s_active)
|
||||
usr.s_active.close(usr)
|
||||
@@ -244,14 +246,7 @@
|
||||
src.closer.master = src
|
||||
src.closer.icon_state = "x"
|
||||
src.closer.layer = 20
|
||||
spawn( 5 )
|
||||
var/col_num = 0
|
||||
var/row_count = min(7,storage_slots) -1
|
||||
if (contents.len > 7)
|
||||
if(contents.len % 7)
|
||||
col_num = round(contents.len / 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
|
||||
orient2hud()
|
||||
return
|
||||
|
||||
/obj/item/weapon/storage/emp_act(severity)
|
||||
@@ -442,4 +437,4 @@
|
||||
..()
|
||||
return
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
@@ -8,6 +8,7 @@
|
||||
src.mov_int = list( )
|
||||
src.vimpaired = list( )
|
||||
src.darkMask = list( )
|
||||
src.intent_small_hud_objects = list( )
|
||||
|
||||
src.g_dither = new src.h_type( src )
|
||||
src.g_dither.screen_loc = "WEST,SOUTH to EAST,NORTH"
|
||||
@@ -49,6 +50,41 @@
|
||||
src.adding += using
|
||||
action_intent = using
|
||||
|
||||
//intent small hud objects
|
||||
using = new src.h_type( src )
|
||||
using.name = "help"
|
||||
using.icon = 'screen1_alien.dmi'
|
||||
using.icon_state = "help_small"
|
||||
using.screen_loc = ui_help_small
|
||||
using.layer = 21
|
||||
src.intent_small_hud_objects += using
|
||||
|
||||
using = new src.h_type( src )
|
||||
using.name = "disarm"
|
||||
using.icon = 'screen1_alien.dmi'
|
||||
using.icon_state = "disarm_small"
|
||||
using.screen_loc = ui_disarm_small
|
||||
using.layer = 21
|
||||
src.intent_small_hud_objects += using
|
||||
|
||||
using = new src.h_type( src )
|
||||
using.name = "grab"
|
||||
using.icon = 'screen1_alien.dmi'
|
||||
using.icon_state = "grab_small"
|
||||
using.screen_loc = ui_grab_small
|
||||
using.layer = 21
|
||||
src.intent_small_hud_objects += using
|
||||
|
||||
using = new src.h_type( src )
|
||||
using.name = "harm"
|
||||
using.icon = 'screen1_alien.dmi'
|
||||
using.icon_state = "harm_small"
|
||||
using.screen_loc = ui_harm_small
|
||||
using.layer = 21
|
||||
src.intent_small_hud_objects += using
|
||||
|
||||
//end intent small hud objects
|
||||
|
||||
using = new src.h_type( src )
|
||||
using.name = "mov_intent"
|
||||
using.dir = SOUTHWEST
|
||||
@@ -59,6 +95,7 @@
|
||||
src.adding += using
|
||||
move_intent = using
|
||||
|
||||
/*
|
||||
using = new src.h_type(src) //Right hud bar
|
||||
using.dir = SOUTH
|
||||
using.icon = 'screen1_alien.dmi'
|
||||
@@ -79,7 +116,9 @@
|
||||
using.screen_loc = "EAST+1,SOUTH-1"
|
||||
using.layer = 19
|
||||
src.adding += using
|
||||
*/
|
||||
|
||||
/*
|
||||
using = new src.h_type( src )
|
||||
using.name = "arrowleft"
|
||||
using.icon = 'screen1_alien.dmi'
|
||||
@@ -97,6 +136,7 @@
|
||||
using.screen_loc = ui_iarrowright
|
||||
using.layer = 19
|
||||
src.adding += using
|
||||
*/
|
||||
|
||||
using = new src.h_type( src )
|
||||
using.name = "drop"
|
||||
@@ -115,7 +155,7 @@
|
||||
using.dir = SOUTH
|
||||
using.icon = 'screen1_alien.dmi'
|
||||
using.icon_state = "equip"
|
||||
using.screen_loc = ui_iclothing
|
||||
using.screen_loc = ui_alien_oclothing
|
||||
using.layer = 19
|
||||
src.adding += using
|
||||
|
||||
@@ -125,7 +165,7 @@
|
||||
using.dir = WEST
|
||||
using.icon = 'screen1_alien.dmi'
|
||||
using.icon_state = "equip"
|
||||
using.screen_loc = ui_id
|
||||
using.screen_loc = ui_rhand
|
||||
using.layer = 19
|
||||
src.adding += using
|
||||
|
||||
@@ -135,7 +175,7 @@
|
||||
using.dir = EAST
|
||||
using.icon = 'screen1_alien.dmi'
|
||||
using.icon_state = "equip"
|
||||
using.screen_loc = ui_belt
|
||||
using.screen_loc = ui_lhand
|
||||
using.layer = 19
|
||||
src.adding += using
|
||||
|
||||
@@ -162,11 +202,12 @@
|
||||
using.name = "head"
|
||||
using.icon = 'screen1_alien.dmi'
|
||||
using.icon_state = "hair"
|
||||
using.screen_loc = ui_oclothing
|
||||
using.screen_loc = ui_alien_head
|
||||
using.layer = 19
|
||||
src.adding += using
|
||||
//end of equippable shit
|
||||
|
||||
/*
|
||||
using = new src.h_type( src )
|
||||
using.name = "resist"
|
||||
using.icon = 'screen1_alien.dmi'
|
||||
@@ -174,8 +215,7 @@
|
||||
using.screen_loc = ui_resist
|
||||
using.layer = 19
|
||||
src.adding += using
|
||||
|
||||
|
||||
*/
|
||||
|
||||
using = new src.h_type( src )
|
||||
using.name = null
|
||||
@@ -241,7 +281,7 @@
|
||||
mymob.healths.icon = 'screen1_alien.dmi'
|
||||
mymob.healths.icon_state = "health0"
|
||||
mymob.healths.name = "health"
|
||||
mymob.healths.screen_loc = ui_health
|
||||
mymob.healths.screen_loc = ui_alien_health
|
||||
|
||||
mymob.pullin = new /obj/screen( null )
|
||||
mymob.pullin.icon = 'screen1_alien.dmi'
|
||||
@@ -265,6 +305,7 @@
|
||||
mymob.flash.screen_loc = "1,1 to 15,15"
|
||||
mymob.flash.layer = 17
|
||||
|
||||
/*
|
||||
mymob.hands = new /obj/screen( null )
|
||||
mymob.hands.icon = 'screen1_alien.dmi'
|
||||
mymob.hands.icon_state = "hand"
|
||||
@@ -285,6 +326,7 @@
|
||||
mymob.rest.screen_loc = ui_rest
|
||||
|
||||
mymob.gun_setting_icon = new /obj/screen/gun/mode(null)
|
||||
*/
|
||||
|
||||
|
||||
mymob.zone_sel = new /obj/screen/zone_sel( null )
|
||||
@@ -293,6 +335,6 @@
|
||||
|
||||
mymob.client.screen = null
|
||||
|
||||
mymob.client.screen += list( mymob.throw_icon, mymob.zone_sel, mymob.oxygen, mymob.toxin, mymob.fire, mymob.hands, mymob.healths, mymob.pullin, mymob.blind, mymob.flash, mymob.rest, mymob.sleep, mymob.gun_setting_icon) //, mymob.mach )
|
||||
mymob.client.screen += list( mymob.throw_icon, mymob.zone_sel, mymob.oxygen, mymob.toxin, mymob.fire, mymob.healths, mymob.pullin, mymob.blind, mymob.flash) //, mymob.hands, mymob.rest, mymob.sleep, mymob.mach )
|
||||
mymob.client.screen += src.adding + src.other
|
||||
|
||||
|
||||
@@ -398,7 +398,7 @@
|
||||
overlays += image("icon" = 'blood.dmi', "icon_state" = "armorblood[!lying ? "" : "2"]", "layer" = MOB_LAYER)
|
||||
else
|
||||
overlays += image("icon" = 'blood.dmi', "icon_state" = "suitblood[!lying ? "" : "2"]", "layer" = MOB_LAYER)
|
||||
wear_suit.screen_loc = ui_iclothing
|
||||
wear_suit.screen_loc = ui_alien_oclothing
|
||||
if (istype(wear_suit, /obj/item/clothing/suit/straight_jacket))
|
||||
if (handcuffed)
|
||||
handcuffed.loc = loc
|
||||
@@ -420,7 +420,7 @@
|
||||
overlays += image("icon" = 'mob.dmi', "icon_state" = text("[][]", t1, (!( lying ) ? null : "2")), "layer" = MOB_LAYER)
|
||||
if (head.blood_DNA)
|
||||
overlays += image("icon" = 'blood.dmi', "icon_state" = "helmetblood[!lying ? "" : "2"]", "layer" = MOB_LAYER)
|
||||
head.screen_loc = ui_oclothing
|
||||
head.screen_loc = ui_alien_head
|
||||
|
||||
if (l_store)
|
||||
l_store.screen_loc = ui_storage1
|
||||
@@ -435,12 +435,12 @@
|
||||
if (r_hand)
|
||||
overlays += image("icon" = 'items_righthand.dmi', "icon_state" = r_hand.item_state ? r_hand.item_state : r_hand.icon_state, "layer" = MOB_LAYER+1)
|
||||
|
||||
r_hand.screen_loc = ui_id
|
||||
r_hand.screen_loc = ui_rhand
|
||||
|
||||
if (l_hand)
|
||||
overlays += image("icon" = 'items_lefthand.dmi', "icon_state" = l_hand.item_state ? l_hand.item_state : l_hand.icon_state, "layer" = MOB_LAYER+1)
|
||||
|
||||
l_hand.screen_loc = ui_belt
|
||||
l_hand.screen_loc = ui_lhand
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -61,6 +61,7 @@
|
||||
src.adding += using
|
||||
move_intent = using
|
||||
|
||||
/*
|
||||
using = new src.h_type(src) //Right hud bar
|
||||
using.dir = SOUTH
|
||||
using.icon = 'screen1_alien.dmi'
|
||||
@@ -81,7 +82,9 @@
|
||||
using.screen_loc = "EAST+1,SOUTH-1"
|
||||
using.layer = 19
|
||||
src.adding += using
|
||||
*/
|
||||
|
||||
/*
|
||||
using = new src.h_type( src )
|
||||
using.name = "arrowleft"
|
||||
using.icon = 'screen1_alien.dmi'
|
||||
@@ -100,7 +103,6 @@
|
||||
using.layer = 19
|
||||
src.adding += using
|
||||
|
||||
|
||||
using = new src.h_type( src )
|
||||
using.name = "resist"
|
||||
using.icon = 'screen1_alien.dmi'
|
||||
@@ -108,7 +110,7 @@
|
||||
using.screen_loc = ui_resist
|
||||
using.layer = 19
|
||||
src.adding += using
|
||||
|
||||
*/
|
||||
|
||||
|
||||
using = new src.h_type( src )
|
||||
@@ -171,7 +173,7 @@
|
||||
mymob.healths.icon = 'screen1_alien.dmi'
|
||||
mymob.healths.icon_state = "health0"
|
||||
mymob.healths.name = "health"
|
||||
mymob.healths.screen_loc = ui_health
|
||||
mymob.healths.screen_loc = ui_alien_health
|
||||
|
||||
mymob.pullin = new /obj/screen( null )
|
||||
mymob.pullin.icon = 'screen1_alien.dmi'
|
||||
@@ -194,7 +196,7 @@
|
||||
mymob.flash.screen_loc = "1,1 to 15,15"
|
||||
mymob.flash.layer = 17
|
||||
|
||||
|
||||
/*
|
||||
mymob.sleep = new /obj/screen( null )
|
||||
mymob.sleep.icon = 'screen1_alien.dmi'
|
||||
mymob.sleep.icon_state = "sleep0"
|
||||
@@ -206,7 +208,7 @@
|
||||
mymob.rest.icon_state = "rest0"
|
||||
mymob.rest.name = "rest"
|
||||
mymob.rest.screen_loc = ui_rest
|
||||
|
||||
*/
|
||||
|
||||
mymob.zone_sel = new /obj/screen/zone_sel( null )
|
||||
mymob.zone_sel.overlays = null
|
||||
@@ -214,7 +216,7 @@
|
||||
|
||||
mymob.client.screen = null
|
||||
|
||||
mymob.client.screen += list( mymob.zone_sel, mymob.oxygen, mymob.toxin, mymob.fire, mymob.healths, mymob.pullin, mymob.blind, mymob.flash, mymob.rest, mymob.sleep) //, mymob.mach )
|
||||
mymob.client.screen += list( mymob.zone_sel, mymob.oxygen, mymob.toxin, mymob.fire, mymob.healths, mymob.pullin, mymob.blind, mymob.flash) //, mymob.rest, mymob.sleep, mymob.mach )
|
||||
mymob.client.screen += src.adding + src.other
|
||||
|
||||
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
/obj/hud/proc/brain_hud(var/ui_style='screen1_old.dmi')
|
||||
|
||||
ui_style='screen1_old.dmi' //Overriding the parameter. Only this UI style is acceptable with the 'sleek' layout.
|
||||
|
||||
blurry = new h_type( src )
|
||||
blurry.screen_loc = "WEST,SOUTH to EAST,NORTH"
|
||||
blurry.name = "Blurry"
|
||||
|
||||
@@ -173,12 +173,32 @@
|
||||
usr << "<span class='warning'>Your other hand is too busy holding the [item_in_hand.name]</span>"
|
||||
return
|
||||
src.hand = !( src.hand )
|
||||
if (!( src.hand ))
|
||||
if(hud_used.l_hand_hud_object && hud_used.r_hand_hud_object)
|
||||
if(hand) //This being 1 means the left hand is in use
|
||||
hud_used.l_hand_hud_object.icon_state = "hand_active"
|
||||
hud_used.r_hand_hud_object.icon_state = "hand_inactive"
|
||||
else
|
||||
hud_used.l_hand_hud_object.icon_state = "hand_inactive"
|
||||
hud_used.r_hand_hud_object.icon_state = "hand_active"
|
||||
/*if (!( src.hand ))
|
||||
src.hands.dir = NORTH
|
||||
else
|
||||
src.hands.dir = SOUTH
|
||||
src.hands.dir = SOUTH*/
|
||||
return
|
||||
|
||||
/mob/living/carbon/proc/activate_hand(var/selhand) //0 or "r" or "right" for right hand; 1 or "l" or "left" for left hand.
|
||||
|
||||
if(istext(selhand))
|
||||
selhand = lowertext(selhand)
|
||||
|
||||
if(selhand == "right" || selhand == "r")
|
||||
selhand = 0
|
||||
if(selhand == "left" || selhand == "l")
|
||||
selhand = 1
|
||||
|
||||
if(selhand != src.hand)
|
||||
swap_hand()
|
||||
|
||||
/mob/living/carbon/proc/help_shake_act(mob/living/carbon/M)
|
||||
if (src.health > 0)
|
||||
if(src == M && istype(src, /mob/living/carbon/human))
|
||||
@@ -262,11 +282,12 @@
|
||||
if(src.sleeping_willingly)
|
||||
src.sleeping = 0
|
||||
src.sleeping_willingly = 0
|
||||
// Update the hands-indicator on re-join.
|
||||
/* // Update the hands-indicator on re-join.
|
||||
if (!( src.hand ))
|
||||
src.hands.dir = NORTH
|
||||
else
|
||||
src.hands.dir = SOUTH
|
||||
*/
|
||||
|
||||
/mob/living/carbon/human/proc/GetOrgans()
|
||||
var/list/L = list( )
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
/obj/hud/proc/human_hud(var/ui_style='screen1_old.dmi')
|
||||
|
||||
ui_style='screen1_old.dmi' //Overriding the parameter. Only this UI style is acceptable with the 'sleek' layout.
|
||||
|
||||
src.adding = list( )
|
||||
src.other = list( )
|
||||
src.intents = list( )
|
||||
@@ -8,6 +10,7 @@
|
||||
src.mov_int = list( )
|
||||
src.vimpaired = list( )
|
||||
src.darkMask = list( )
|
||||
src.intent_small_hud_objects = list( )
|
||||
|
||||
src.g_dither = new src.h_type( src )
|
||||
src.g_dither.screen_loc = "WEST,SOUTH to EAST,NORTH"
|
||||
@@ -53,6 +56,41 @@
|
||||
src.adding += using
|
||||
action_intent = using
|
||||
|
||||
//intent small hud objects
|
||||
using = new src.h_type( src )
|
||||
using.name = "help"
|
||||
using.icon = ui_style
|
||||
using.icon_state = "help_small"
|
||||
using.screen_loc = ui_help_small
|
||||
using.layer = 21
|
||||
src.intent_small_hud_objects += using
|
||||
|
||||
using = new src.h_type( src )
|
||||
using.name = "disarm"
|
||||
using.icon = ui_style
|
||||
using.icon_state = "disarm_small"
|
||||
using.screen_loc = ui_disarm_small
|
||||
using.layer = 21
|
||||
src.intent_small_hud_objects += using
|
||||
|
||||
using = new src.h_type( src )
|
||||
using.name = "grab"
|
||||
using.icon = ui_style
|
||||
using.icon_state = "grab_small"
|
||||
using.screen_loc = ui_grab_small
|
||||
using.layer = 21
|
||||
src.intent_small_hud_objects += using
|
||||
|
||||
using = new src.h_type( src )
|
||||
using.name = "harm"
|
||||
using.icon = ui_style
|
||||
using.icon_state = "harm_small"
|
||||
using.screen_loc = ui_harm_small
|
||||
using.layer = 21
|
||||
src.intent_small_hud_objects += using
|
||||
|
||||
//end intent small hud objects
|
||||
|
||||
using = new src.h_type( src )
|
||||
using.name = "mov_intent"
|
||||
using.dir = SOUTHWEST
|
||||
@@ -63,6 +101,7 @@
|
||||
src.adding += using
|
||||
move_intent = using
|
||||
|
||||
/*
|
||||
using = new src.h_type(src) //Right hud bar
|
||||
using.dir = SOUTH
|
||||
using.icon = ui_style
|
||||
@@ -101,6 +140,7 @@
|
||||
using.screen_loc = ui_iarrowright
|
||||
using.layer = 19
|
||||
src.adding += using
|
||||
*/
|
||||
|
||||
using = new src.h_type( src )
|
||||
using.name = "drop"
|
||||
@@ -117,7 +157,7 @@
|
||||
using.icon_state = "center"
|
||||
using.screen_loc = ui_iclothing
|
||||
using.layer = 19
|
||||
src.adding += using
|
||||
src.other += using
|
||||
|
||||
using = new src.h_type( src )
|
||||
using.name = "o_clothing"
|
||||
@@ -126,7 +166,7 @@
|
||||
using.icon_state = "equip"
|
||||
using.screen_loc = ui_oclothing
|
||||
using.layer = 19
|
||||
src.adding += using
|
||||
src.other += using
|
||||
|
||||
/* using = new src.h_type( src )
|
||||
using.name = "headset"
|
||||
@@ -141,25 +181,49 @@
|
||||
using.name = "r_hand"
|
||||
using.dir = WEST
|
||||
using.icon = ui_style
|
||||
using.icon_state = "equip"
|
||||
using.icon_state = "hand_inactive"
|
||||
if(mymob && !mymob.hand) //This being 0 or null means the right hand is in use
|
||||
using.icon_state = "hand_active"
|
||||
using.screen_loc = ui_rhand
|
||||
using.layer = 19
|
||||
src.r_hand_hud_object = using
|
||||
src.adding += using
|
||||
|
||||
using = new src.h_type( src )
|
||||
using.name = "l_hand"
|
||||
using.dir = EAST
|
||||
using.icon = ui_style
|
||||
using.icon_state = "equip"
|
||||
using.icon_state = "hand_inactive"
|
||||
if(mymob && mymob.hand) //This being 1 means the left hand is in use
|
||||
using.icon_state = "hand_active"
|
||||
using.screen_loc = ui_lhand
|
||||
using.layer = 19
|
||||
src.l_hand_hud_object = using
|
||||
src.adding += using
|
||||
|
||||
using = new src.h_type( src )
|
||||
using.name = "hand"
|
||||
using.dir = SOUTH
|
||||
using.icon = ui_style
|
||||
using.icon_state = "hand1"
|
||||
using.screen_loc = ui_swaphand1
|
||||
using.layer = 19
|
||||
src.adding += using
|
||||
|
||||
using = new src.h_type( src )
|
||||
using.name = "hand"
|
||||
using.dir = SOUTH
|
||||
using.icon = ui_style
|
||||
using.icon_state = "hand2"
|
||||
using.screen_loc = ui_swaphand2
|
||||
using.layer = 19
|
||||
src.adding += using
|
||||
|
||||
using = new src.h_type( src )
|
||||
using.name = "id"
|
||||
using.dir = SOUTHWEST
|
||||
using.dir = NORTH
|
||||
using.icon = ui_style
|
||||
using.icon_state = "equip"
|
||||
using.icon_state = "id"
|
||||
using.screen_loc = ui_id
|
||||
using.layer = 19
|
||||
src.adding += using
|
||||
@@ -171,13 +235,13 @@
|
||||
using.icon_state = "equip"
|
||||
using.screen_loc = ui_mask
|
||||
using.layer = 19
|
||||
src.adding += using
|
||||
src.other += using
|
||||
|
||||
using = new src.h_type( src )
|
||||
using.name = "back"
|
||||
using.dir = NORTHEAST
|
||||
using.dir = NORTH
|
||||
using.icon = ui_style
|
||||
using.icon_state = "equip"
|
||||
using.icon_state = "back"
|
||||
using.screen_loc = ui_back
|
||||
using.layer = 19
|
||||
src.adding += using
|
||||
@@ -201,11 +265,13 @@
|
||||
using = new src.h_type( src )
|
||||
using.name = "suit storage"
|
||||
using.icon = ui_style
|
||||
using.dir = 8 //The sprite at dir=8 has the background whereas the others don't.
|
||||
using.icon_state = "belt"
|
||||
using.screen_loc = ui_sstore1
|
||||
using.layer = 19
|
||||
src.other += using
|
||||
|
||||
/*
|
||||
using = new src.h_type( src )
|
||||
using.name = "resist"
|
||||
using.icon = ui_style
|
||||
@@ -213,12 +279,13 @@
|
||||
using.screen_loc = ui_resist
|
||||
using.layer = 19
|
||||
src.adding += using
|
||||
*/
|
||||
|
||||
using = new src.h_type( src )
|
||||
using.name = "other"
|
||||
using.icon = ui_style
|
||||
using.icon_state = "other"
|
||||
using.screen_loc = ui_shoes
|
||||
using.screen_loc = ui_inventory
|
||||
using.layer = 20
|
||||
src.adding += using
|
||||
|
||||
@@ -256,7 +323,6 @@
|
||||
|
||||
using = new src.h_type( src )
|
||||
using.name = "l_ear"
|
||||
using.dir = EAST
|
||||
using.icon = ui_style
|
||||
using.icon_state = "ears"
|
||||
using.screen_loc = ui_lear
|
||||
@@ -265,7 +331,6 @@
|
||||
|
||||
using = new src.h_type( src )
|
||||
using.name = "r_ear"
|
||||
using.dir = WEST
|
||||
using.icon = ui_style
|
||||
using.icon_state = "ears"
|
||||
using.screen_loc = ui_rear
|
||||
@@ -278,7 +343,7 @@
|
||||
using.icon_state = "hair"
|
||||
using.screen_loc = ui_head
|
||||
using.layer = 19
|
||||
src.adding += using
|
||||
src.other += using
|
||||
|
||||
using = new src.h_type( src )
|
||||
using.name = "shoes"
|
||||
@@ -467,6 +532,8 @@
|
||||
mymob.pressure.icon_state = "pressure0"
|
||||
mymob.pressure.name = "pressure"
|
||||
mymob.pressure.screen_loc = ui_pressure
|
||||
|
||||
|
||||
/*
|
||||
mymob.i_select = new /obj/screen( null )
|
||||
mymob.i_select.icon_state = "selector"
|
||||
@@ -542,6 +609,7 @@
|
||||
mymob.pain.screen_loc = "1,1 to 15,15"
|
||||
mymob.pain.layer = 17
|
||||
|
||||
/*
|
||||
mymob.hands = new /obj/screen( null )
|
||||
mymob.hands.icon = ui_style
|
||||
mymob.hands.icon_state = "hand"
|
||||
@@ -560,6 +628,7 @@
|
||||
mymob.rest.icon_state = "rest0"
|
||||
mymob.rest.name = "rest"
|
||||
mymob.rest.screen_loc = ui_rest
|
||||
*/
|
||||
|
||||
/*/Monkey blockers
|
||||
|
||||
@@ -658,7 +727,7 @@
|
||||
mymob.client.screen = null
|
||||
|
||||
//, mymob.i_select, mymob.m_select
|
||||
mymob.client.screen += list( mymob.pain, mymob.throw_icon, mymob.zone_sel, mymob.oxygen, mymob.toxin, mymob.bodytemp, mymob.internals, mymob.fire, mymob.hands, mymob.healths, mymob.nutrition_icon, mymob.pullin, mymob.blind, mymob.flash, mymob.rest, mymob.pressure, mymob.sleep, mymob.gun_setting_icon) //, mymob.mach )
|
||||
mymob.client.screen += list( mymob.pain, mymob.throw_icon, mymob.zone_sel, mymob.oxygen, mymob.pressure, mymob.toxin, mymob.bodytemp, mymob.internals, mymob.fire, mymob.healths, mymob.nutrition_icon, mymob.pullin, mymob.blind, mymob.flash, mymob.gun_setting_icon) //, mymob.hands, mymob.rest, mymob.sleep, mymob.gun_setting_icon) //, mymob.mach )
|
||||
mymob.client.screen += src.adding + src.other
|
||||
|
||||
//if(istype(mymob,/mob/living/carbon/monkey)) mymob.client.screen += src.mon_blo
|
||||
|
||||
@@ -1060,8 +1060,6 @@
|
||||
overlays += image("icon" = 'belt_mirror.dmi', "icon_state" = text("[][]", t1, (!( lying ) ? null : "2")), "layer" = MOB_LAYER)
|
||||
s_store.screen_loc = ui_sstore1
|
||||
|
||||
if(client) hud_used.other_update() //Update the screenloc of the items on the 'other' inventory bar
|
||||
//to hide / show them.
|
||||
if (client)
|
||||
if (i_select)
|
||||
if (intent)
|
||||
@@ -1178,6 +1176,8 @@
|
||||
overlays += image("icon" = 'back.dmi', "icon_state" = text("[][]", t1, (!( lying ) ? null : "2")), "layer" = MOB_LAYER)
|
||||
back.screen_loc = ui_back
|
||||
|
||||
if(client) hud_used.other_update() //Update the screenloc of the items on the 'other' inventory bar
|
||||
//to hide / show them.
|
||||
if (handcuffed)
|
||||
pulling = null
|
||||
var/h1 = handcuffed.icon_state
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
/obj/hud/proc/monkey_hud(var/ui_style='screen1_old.dmi')
|
||||
|
||||
ui_style='screen1_old.dmi' //Overriding the parameter. Only this UI style is acceptable with the 'sleek' layout.
|
||||
|
||||
src.adding = list( )
|
||||
src.other = list( )
|
||||
src.intents = list( )
|
||||
@@ -8,8 +10,9 @@
|
||||
src.mov_int = list( )
|
||||
src.vimpaired = list( )
|
||||
src.darkMask = list( )
|
||||
src.intent_small_hud_objects = list( )
|
||||
|
||||
var/icon/blocked = icon(ui_style,"blocked")
|
||||
//var/icon/blocked = icon(ui_style,"blocked")
|
||||
|
||||
src.g_dither = new src.h_type( src )
|
||||
src.g_dither.screen_loc = "WEST,SOUTH to EAST,NORTH"
|
||||
@@ -55,6 +58,41 @@
|
||||
src.adding += using
|
||||
action_intent = using
|
||||
|
||||
//intent small hud objects
|
||||
using = new src.h_type( src )
|
||||
using.name = "help"
|
||||
using.icon = ui_style
|
||||
using.icon_state = "help_small"
|
||||
using.screen_loc = ui_help_small
|
||||
using.layer = 21
|
||||
src.intent_small_hud_objects += using
|
||||
|
||||
using = new src.h_type( src )
|
||||
using.name = "disarm"
|
||||
using.icon = ui_style
|
||||
using.icon_state = "disarm_small"
|
||||
using.screen_loc = ui_disarm_small
|
||||
using.layer = 21
|
||||
src.intent_small_hud_objects += using
|
||||
|
||||
using = new src.h_type( src )
|
||||
using.name = "grab"
|
||||
using.icon = ui_style
|
||||
using.icon_state = "grab_small"
|
||||
using.screen_loc = ui_grab_small
|
||||
using.layer = 21
|
||||
src.intent_small_hud_objects += using
|
||||
|
||||
using = new src.h_type( src )
|
||||
using.name = "harm"
|
||||
using.icon = ui_style
|
||||
using.icon_state = "harm_small"
|
||||
using.screen_loc = ui_harm_small
|
||||
using.layer = 21
|
||||
src.intent_small_hud_objects += using
|
||||
|
||||
//end intent small hud objects
|
||||
|
||||
using = new src.h_type( src )
|
||||
using.name = "mov_intent"
|
||||
using.dir = SOUTHWEST
|
||||
@@ -65,6 +103,7 @@
|
||||
src.adding += using
|
||||
move_intent = using
|
||||
|
||||
/*
|
||||
using = new src.h_type(src) //Right hud bar
|
||||
using.dir = SOUTH
|
||||
using.icon = ui_style
|
||||
@@ -102,7 +141,7 @@
|
||||
using.dir = EAST
|
||||
using.screen_loc = ui_iarrowright
|
||||
using.layer = 19
|
||||
src.adding += using
|
||||
src.adding += using*/
|
||||
|
||||
using = new src.h_type( src )
|
||||
using.name = "drop"
|
||||
@@ -111,7 +150,7 @@
|
||||
using.screen_loc = ui_dropbutton
|
||||
using.layer = 19
|
||||
src.adding += using
|
||||
|
||||
/*
|
||||
using = new src.h_type( src )
|
||||
using.name = "i_clothing"
|
||||
using.dir = SOUTH
|
||||
@@ -131,7 +170,7 @@
|
||||
using.layer = 19
|
||||
using.overlays += blocked
|
||||
src.adding += using
|
||||
|
||||
*/
|
||||
/* using = new src.h_type( src )
|
||||
using.name = "headset"
|
||||
using.dir = SOUTHEAST
|
||||
@@ -145,20 +184,44 @@
|
||||
using.name = "r_hand"
|
||||
using.dir = WEST
|
||||
using.icon = ui_style
|
||||
using.icon_state = "equip"
|
||||
using.icon_state = "hand_inactive"
|
||||
if(mymob && !mymob.hand) //This being 0 or null means the right hand is in use
|
||||
using.icon_state = "hand_active"
|
||||
using.screen_loc = ui_rhand
|
||||
using.layer = 19
|
||||
src.r_hand_hud_object = using
|
||||
src.adding += using
|
||||
|
||||
using = new src.h_type( src )
|
||||
using.name = "l_hand"
|
||||
using.dir = EAST
|
||||
using.icon = ui_style
|
||||
using.icon_state = "equip"
|
||||
using.icon_state = "hand_inactive"
|
||||
if(mymob && mymob.hand) //This being 1 means the left hand is in use
|
||||
using.icon_state = "hand_active"
|
||||
using.screen_loc = ui_lhand
|
||||
using.layer = 19
|
||||
src.l_hand_hud_object = using
|
||||
src.adding += using
|
||||
|
||||
using = new src.h_type( src )
|
||||
using.name = "hand"
|
||||
using.dir = SOUTH
|
||||
using.icon = ui_style
|
||||
using.icon_state = "hand1"
|
||||
using.screen_loc = ui_swaphand1
|
||||
using.layer = 19
|
||||
src.adding += using
|
||||
|
||||
using = new src.h_type( src )
|
||||
using.name = "hand"
|
||||
using.dir = SOUTH
|
||||
using.icon = ui_style
|
||||
using.icon_state = "hand2"
|
||||
using.screen_loc = ui_swaphand2
|
||||
using.layer = 19
|
||||
src.adding += using
|
||||
/*
|
||||
using = new src.h_type( src )
|
||||
using.name = "id"
|
||||
using.dir = SOUTHWEST
|
||||
@@ -168,13 +231,14 @@
|
||||
using.layer = 19
|
||||
using.overlays += blocked
|
||||
src.adding += using
|
||||
*/
|
||||
|
||||
using = new src.h_type( src )
|
||||
using.name = "mask"
|
||||
using.dir = NORTH
|
||||
using.icon = ui_style
|
||||
using.icon_state = "equip"
|
||||
using.screen_loc = ui_mask
|
||||
using.screen_loc = ui_monkey_mask
|
||||
using.layer = 19
|
||||
src.adding += using
|
||||
|
||||
@@ -186,7 +250,7 @@
|
||||
using.screen_loc = ui_back
|
||||
using.layer = 19
|
||||
src.adding += using
|
||||
|
||||
/*
|
||||
using = new src.h_type( src )
|
||||
using.name = "storage1"
|
||||
using.icon = ui_style
|
||||
@@ -204,7 +268,6 @@
|
||||
using.layer = 19
|
||||
using.overlays += blocked
|
||||
src.adding += using
|
||||
|
||||
using = new src.h_type( src )
|
||||
using.name = "resist"
|
||||
using.icon = ui_style
|
||||
@@ -283,6 +346,7 @@
|
||||
using.layer = 19
|
||||
using.overlays += blocked
|
||||
src.adding += using
|
||||
*/
|
||||
|
||||
/*
|
||||
using = new src.h_type( src )
|
||||
@@ -399,6 +463,7 @@
|
||||
mymob.m_select.name = "moving"
|
||||
mymob.m_select.screen_loc = "16:-11,14"
|
||||
*/
|
||||
|
||||
mymob.toxin = new /obj/screen( null )
|
||||
mymob.toxin.icon = ui_style
|
||||
mymob.toxin.icon_state = "tox0"
|
||||
@@ -450,6 +515,7 @@
|
||||
mymob.flash.screen_loc = "1,1 to 15,15"
|
||||
mymob.flash.layer = 17
|
||||
|
||||
/*
|
||||
mymob.hands = new /obj/screen( null )
|
||||
mymob.hands.icon = ui_style
|
||||
mymob.hands.icon_state = "hand"
|
||||
@@ -467,7 +533,7 @@
|
||||
mymob.rest.icon = ui_style
|
||||
mymob.rest.icon_state = "rest0"
|
||||
mymob.rest.name = "rest"
|
||||
mymob.rest.screen_loc = ui_rest
|
||||
mymob.rest.screen_loc = ui_rest*/
|
||||
|
||||
/*/Monkey blockers
|
||||
|
||||
@@ -566,7 +632,7 @@
|
||||
mymob.client.screen = null
|
||||
|
||||
//, mymob.i_select, mymob.m_select
|
||||
mymob.client.screen += list( mymob.throw_icon, mymob.zone_sel, mymob.oxygen, mymob.toxin, mymob.bodytemp, mymob.internals, mymob.fire, mymob.hands, mymob.healths, mymob.pullin, mymob.blind, mymob.flash, mymob.rest, mymob.sleep, mymob.pressure, mymob.gun_setting_icon) //, mymob.mach )
|
||||
mymob.client.screen += list( mymob.throw_icon, mymob.zone_sel, mymob.oxygen, mymob.pressure, mymob.toxin, mymob.bodytemp, mymob.internals, mymob.fire, mymob.healths, mymob.pullin, mymob.blind, mymob.flash, mymob.gun_setting_icon) //, mymob.hands, mymob.rest, mymob.sleep, mymob.mach, mymob.hands, )
|
||||
mymob.client.screen += src.adding + src.other
|
||||
|
||||
//if(istype(mymob,/mob/living/carbon/monkey)) mymob.client.screen += src.mon_blo
|
||||
|
||||
@@ -511,7 +511,7 @@
|
||||
if (istype(wear_mask, /obj/item/clothing/mask))
|
||||
var/t1 = wear_mask.icon_state
|
||||
overlays += image("icon" = 'monkey.dmi', "icon_state" = text("[][]", t1, (!( lying ) ? null : "2")), "layer" = layer)
|
||||
wear_mask.screen_loc = ui_mask
|
||||
wear_mask.screen_loc = ui_monkey_mask
|
||||
|
||||
if (r_hand)
|
||||
if(update_icon)
|
||||
@@ -526,7 +526,7 @@
|
||||
if (back)
|
||||
var/t1 = back.icon_state //apparently tables make me upset and cause my dreams to shatter
|
||||
overlays += image("icon" = 'back.dmi', "icon_state" = text("[][]", t1, (!( lying ) ? null : "2")), "layer" = layer)
|
||||
back.screen_loc = ui_back
|
||||
back.screen_loc = ui_monkey_back
|
||||
|
||||
if (handcuffed && update_icon)
|
||||
pulling = null
|
||||
|
||||
@@ -53,6 +53,7 @@
|
||||
|
||||
//Generic overlays
|
||||
|
||||
/*
|
||||
using = new src.h_type(src) //Right hud bar
|
||||
using.dir = SOUTH
|
||||
using.icon = 'screen1_robot.dmi'
|
||||
@@ -72,7 +73,7 @@
|
||||
using.icon = 'screen1_robot.dmi'
|
||||
using.screen_loc = "EAST+1,SOUTH-1"
|
||||
using.layer = 19
|
||||
src.adding += using
|
||||
src.adding += using*/
|
||||
|
||||
|
||||
//Module select
|
||||
@@ -119,7 +120,7 @@
|
||||
using.layer = 20
|
||||
src.adding += using
|
||||
action_intent = using
|
||||
|
||||
/*
|
||||
using = new src.h_type( src )
|
||||
using.name = "arrowleft"
|
||||
using.icon = 'screen1_robot.dmi'
|
||||
@@ -136,7 +137,7 @@
|
||||
using.dir = EAST
|
||||
using.screen_loc = ui_iarrowright
|
||||
using.layer = 19
|
||||
src.adding += using
|
||||
src.adding += using*/
|
||||
//End of Intent
|
||||
|
||||
//Cell
|
||||
@@ -151,7 +152,7 @@
|
||||
mymob.healths.icon = 'screen1_robot.dmi'
|
||||
mymob.healths.icon_state = "health0"
|
||||
mymob.healths.name = "health"
|
||||
mymob.healths.screen_loc = ui_health
|
||||
mymob.healths.screen_loc = ui_borg_health
|
||||
|
||||
//Installed Module
|
||||
mymob.hands = new /obj/screen( null )
|
||||
@@ -174,7 +175,7 @@
|
||||
mymob.throw_icon.icon = 'screen1_robot.dmi'
|
||||
mymob.throw_icon.icon_state = "store"
|
||||
mymob.throw_icon.name = "store"
|
||||
mymob.throw_icon.screen_loc = ui_hand
|
||||
mymob.throw_icon.screen_loc = ui_borg_store
|
||||
|
||||
//Temp
|
||||
mymob.bodytemp = new /obj/screen( null )
|
||||
@@ -218,6 +219,7 @@
|
||||
mymob.flash.screen_loc = "1,1 to 15,15"
|
||||
mymob.flash.layer = 17
|
||||
|
||||
/*
|
||||
mymob.sleep = new /obj/screen( null )
|
||||
mymob.sleep.icon = 'screen1_robot.dmi'
|
||||
mymob.sleep.icon_state = "sleep0"
|
||||
@@ -229,6 +231,7 @@
|
||||
mymob.rest.icon_state = "rest0"
|
||||
mymob.rest.name = "rest"
|
||||
mymob.rest.screen_loc = ui_rest
|
||||
*/
|
||||
|
||||
|
||||
mymob.zone_sel = new /obj/screen/zone_sel( null )
|
||||
@@ -239,7 +242,7 @@
|
||||
|
||||
mymob.client.screen = null
|
||||
|
||||
mymob.client.screen += list( mymob.throw_icon, mymob.zone_sel, mymob.oxygen, mymob.fire, mymob.hands, mymob.healths, mymob:cells, mymob.pullin, mymob.blind, mymob.flash, mymob.rest, mymob.sleep, mymob.gun_setting_icon) //, mymob.mach )
|
||||
mymob.client.screen += list( mymob.throw_icon, mymob.zone_sel, mymob.oxygen, mymob.fire, mymob.hands, mymob.healths, mymob:cells, mymob.pullin, mymob.blind, mymob.flash, mymob.gun_setting_icon) //, mymob.rest, mymob.sleep, mymob.mach )
|
||||
mymob.client.screen += src.adding + src.other
|
||||
|
||||
return
|
||||
|
||||
@@ -102,7 +102,7 @@ datum/preferences
|
||||
b_eyes = 0
|
||||
|
||||
//UI style
|
||||
UI = UI_NEW
|
||||
UI = UI_OLD
|
||||
|
||||
//Mob preview
|
||||
icon/preview_icon = null
|
||||
@@ -262,7 +262,7 @@ datum/preferences
|
||||
dat += "<b>Age:</b> <a href='byond://?src=\ref[user];preferences=1;age=input'>[age]</a>"
|
||||
|
||||
dat += "<br>"
|
||||
dat += "<b>UI Style:</b> <a href=\"byond://?src=\ref[user];preferences=1;UI=input\"><b>[UI == UI_NEW ? "New" : "Old"]</b></a><br>"
|
||||
//dat += "<b>UI Style:</b> <a href=\"byond://?src=\ref[user];preferences=1;UI=input\"><b>[UI == UI_NEW ? "New" : "Old"]</b></a><br>" -- UI Style no longer a thing
|
||||
dat += "<b>Play admin midis:</b> <a href=\"byond://?src=\ref[user];preferences=1;midis=input\"><b>[midis == 1 ? "Yes" : "No"]</b></a><br>"
|
||||
dat += "<b>Ghost ears:</b> <a href=\"byond://?src=\ref[user];preferences=1;ghost_ears=input\"><b>[ghost_ears == 0 ? "Nearest Creatures" : "All Speech"]</b></a><br>"
|
||||
dat += "<b>Ghost sight:</b> <a href=\"byond://?src=\ref[user];preferences=1;ghost_sight=input\"><b>[ghost_sight == 0 ? "Nearest Creatures" : "All Emotes"]</b></a><br>"
|
||||
|
||||
@@ -33,7 +33,7 @@
|
||||
icon = 'zone_sel.dmi'
|
||||
icon_state = "blank"
|
||||
var/selecting = "chest"
|
||||
screen_loc = "EAST+1,NORTH"
|
||||
screen_loc = ui_zonesel
|
||||
|
||||
/obj/screen/gun
|
||||
name = "gun"
|
||||
@@ -227,21 +227,71 @@
|
||||
/obj/screen/grab/attackby()
|
||||
return
|
||||
|
||||
/obj/screen/MouseEntered(object,location,control,params)
|
||||
if(!ishuman(usr) && !istype(usr,/mob/living/carbon/alien/humanoid) && !islarva(usr) && !ismonkey(usr))
|
||||
return
|
||||
switch(name)
|
||||
/*
|
||||
if("other")
|
||||
if (usr.hud_used.show_otherinventory)
|
||||
usr.hud_used.show_otherinventory = 0
|
||||
usr.client.screen -= usr.hud_used.other
|
||||
else
|
||||
usr.hud_used.show_otherinventory = 1
|
||||
usr.client.screen += usr.hud_used.other
|
||||
|
||||
usr.hud_used.other_update()*/
|
||||
if("act_intent")
|
||||
if(!usr.hud_used.show_intent_icons)
|
||||
usr.hud_used.show_intent_icons = 1
|
||||
usr.client.screen += usr.hud_used.intent_small_hud_objects
|
||||
if("harm")
|
||||
if(!usr.hud_used.show_intent_icons)
|
||||
usr.hud_used.show_intent_icons = 1
|
||||
usr.client.screen += usr.hud_used.intent_small_hud_objects
|
||||
if("help")
|
||||
if(!usr.hud_used.show_intent_icons)
|
||||
usr.hud_used.show_intent_icons = 1
|
||||
usr.client.screen += usr.hud_used.intent_small_hud_objects
|
||||
if("disarm")
|
||||
if(!usr.hud_used.show_intent_icons)
|
||||
usr.hud_used.show_intent_icons = 1
|
||||
usr.client.screen += usr.hud_used.intent_small_hud_objects
|
||||
if("grab")
|
||||
if(!usr.hud_used.show_intent_icons)
|
||||
usr.hud_used.show_intent_icons = 1
|
||||
usr.client.screen += usr.hud_used.intent_small_hud_objects
|
||||
|
||||
|
||||
/obj/screen/MouseExited(object,location,control,params)
|
||||
if(!ishuman(usr) && !istype(usr,/mob/living/carbon/alien/humanoid) && !islarva(usr) && !ismonkey(usr))
|
||||
return
|
||||
switch(name)
|
||||
if("act_intent")
|
||||
if (usr.hud_used.show_intent_icons)
|
||||
usr.hud_used.show_intent_icons = 0
|
||||
usr.client.screen -= usr.hud_used.intent_small_hud_objects
|
||||
if("harm")
|
||||
if (usr.hud_used.show_intent_icons)
|
||||
usr.hud_used.show_intent_icons = 0
|
||||
usr.client.screen -= usr.hud_used.intent_small_hud_objects
|
||||
if("help")
|
||||
if (usr.hud_used.show_intent_icons)
|
||||
usr.hud_used.show_intent_icons = 0
|
||||
usr.client.screen -= usr.hud_used.intent_small_hud_objects
|
||||
if("disarm")
|
||||
if (usr.hud_used.show_intent_icons)
|
||||
usr.hud_used.show_intent_icons = 0
|
||||
usr.client.screen -= usr.hud_used.intent_small_hud_objects
|
||||
if("grab")
|
||||
if (usr.hud_used.show_intent_icons)
|
||||
usr.hud_used.show_intent_icons = 0
|
||||
usr.client.screen -= usr.hud_used.intent_small_hud_objects
|
||||
|
||||
/obj/screen/Click(location, control, params)
|
||||
|
||||
var/list/pa = params2list(params)
|
||||
|
||||
switch(name)
|
||||
if("map")
|
||||
|
||||
usr.clearmap()
|
||||
if("maprefresh")
|
||||
var/obj/machinery/computer/security/seccomp = usr.machine
|
||||
|
||||
if(seccomp!=null)
|
||||
seccomp.drawmap(usr)
|
||||
else
|
||||
usr.clearmap()
|
||||
|
||||
if("other")
|
||||
if (usr.hud_used.show_otherinventory)
|
||||
@@ -253,36 +303,13 @@
|
||||
|
||||
usr.hud_used.other_update()
|
||||
|
||||
if("maprefresh")
|
||||
var/obj/machinery/computer/security/seccomp = usr.machine
|
||||
|
||||
if("act_intent")
|
||||
if(pa.Find("left"))
|
||||
switch(usr.a_intent)
|
||||
if("help")
|
||||
usr.a_intent = "disarm"
|
||||
usr.hud_used.action_intent.icon_state = "disarm"
|
||||
if("disarm")
|
||||
usr.a_intent = "hurt"
|
||||
usr.hud_used.action_intent.icon_state = "harm"
|
||||
if("hurt")
|
||||
usr.a_intent = "grab"
|
||||
usr.hud_used.action_intent.icon_state = "grab"
|
||||
if("grab")
|
||||
usr.a_intent = "help"
|
||||
usr.hud_used.action_intent.icon_state = "help"
|
||||
if(seccomp!=null)
|
||||
seccomp.drawmap(usr)
|
||||
else
|
||||
switch(usr.a_intent)
|
||||
if("help")
|
||||
usr.a_intent = "grab"
|
||||
usr.hud_used.action_intent.icon_state = "grab"
|
||||
if("disarm")
|
||||
usr.a_intent = "help"
|
||||
usr.hud_used.action_intent.icon_state = "help"
|
||||
if("hurt")
|
||||
usr.a_intent = "disarm"
|
||||
usr.hud_used.action_intent.icon_state = "disarm"
|
||||
if("grab")
|
||||
usr.a_intent = "hurt"
|
||||
usr.hud_used.action_intent.icon_state = "harm"
|
||||
usr.clearmap()
|
||||
|
||||
if("arrowleft")
|
||||
switch(usr.a_intent)
|
||||
@@ -344,20 +371,6 @@
|
||||
if("walk")
|
||||
usr.m_intent = "run"
|
||||
usr.hud_used.move_intent.icon_state = "running"
|
||||
|
||||
if("intent")
|
||||
if (!( usr.intent ))
|
||||
switch(usr.a_intent)
|
||||
if("help")
|
||||
usr.intent = "13,15"
|
||||
if("disarm")
|
||||
usr.intent = "14,15"
|
||||
if("hurt")
|
||||
usr.intent = "15,15"
|
||||
if("grab")
|
||||
usr.intent = "12,15"
|
||||
else
|
||||
usr.intent = null
|
||||
if("m_intent")
|
||||
if (!( usr.m_int ))
|
||||
switch(usr.m_intent)
|
||||
@@ -378,20 +391,6 @@
|
||||
if("run")
|
||||
usr.m_intent = "run"
|
||||
usr.m_int = "13,14"
|
||||
if("hurt")
|
||||
usr.a_intent = "hurt"
|
||||
usr.intent = "15,15"
|
||||
if("grab")
|
||||
usr.a_intent = "grab"
|
||||
usr.intent = "12,15"
|
||||
if("disarm")
|
||||
if (istype(usr, /mob/living/carbon/human))
|
||||
var/mob/M = usr
|
||||
M.a_intent = "disarm"
|
||||
M.intent = "14,15"
|
||||
if("help")
|
||||
usr.a_intent = "help"
|
||||
usr.intent = "13,15"
|
||||
if("Reset Machine")
|
||||
usr.machine = null
|
||||
if("internal")
|
||||
@@ -435,18 +434,43 @@
|
||||
usr.internals.icon_state = "internal1"
|
||||
else
|
||||
usr << "\blue You don't have an oxygen tank."
|
||||
if("act_intent")
|
||||
if(ishuman(usr) || istype(usr,/mob/living/carbon/alien/humanoid) || islarva(usr))
|
||||
if (usr.hud_used.show_intent_icons)
|
||||
usr.hud_used.show_intent_icons = 0
|
||||
usr.client.screen -= usr.hud_used.intent_small_hud_objects
|
||||
else
|
||||
usr.hud_used.show_intent_icons = 1
|
||||
usr.client.screen += usr.hud_used.intent_small_hud_objects
|
||||
if(issilicon(usr))
|
||||
if(usr.a_intent == "help")
|
||||
usr.a_intent = "hurt"
|
||||
usr.hud_used.action_intent.icon_state = "harm"
|
||||
else
|
||||
usr.a_intent = "help"
|
||||
usr.hud_used.action_intent.icon_state = "help"
|
||||
if("help")
|
||||
usr.a_intent = "help"
|
||||
usr.hud_used.action_intent.icon_state = "help"
|
||||
usr.hud_used.show_intent_icons = 0
|
||||
usr.client.screen -= usr.hud_used.intent_small_hud_objects
|
||||
if("harm")
|
||||
usr.a_intent = "hurt"
|
||||
usr.hud_used.action_intent.icon_state = "harm"
|
||||
usr.hud_used.show_intent_icons = 0
|
||||
usr.client.screen -= usr.hud_used.intent_small_hud_objects
|
||||
if("grab")
|
||||
usr.a_intent = "grab"
|
||||
usr.hud_used.action_intent.icon_state = "grab"
|
||||
usr.hud_used.show_intent_icons = 0
|
||||
usr.client.screen -= usr.hud_used.intent_small_hud_objects
|
||||
if("disarm")
|
||||
usr.a_intent = "disarm"
|
||||
usr.hud_used.action_intent.icon_state = "disarm"
|
||||
usr.hud_used.show_intent_icons = 0
|
||||
usr.client.screen -= usr.hud_used.intent_small_hud_objects
|
||||
if("pull")
|
||||
usr.pulling = null
|
||||
if("sleep")
|
||||
if(usr.sleeping && usr.sleeping_willingly)
|
||||
usr.sleeping = 0
|
||||
usr.sleeping_willingly = 0
|
||||
else if(!usr.sleeping)
|
||||
usr.sleeping = 20 //Short nap
|
||||
usr.sleeping_willingly = 1
|
||||
if("rest")
|
||||
usr.resting = !( usr.resting )
|
||||
//kavala2
|
||||
if("throw")
|
||||
if (!usr.stat && isturf(usr.loc) && !usr.restrained())
|
||||
usr:toggle_throw_mode()
|
||||
@@ -456,135 +480,14 @@
|
||||
usr:swap_hand()
|
||||
if("hand")
|
||||
usr:swap_hand()
|
||||
if("resist")
|
||||
if(usr.next_move > world.time)
|
||||
return
|
||||
usr.next_move = world.time + 20
|
||||
if ((!( usr.stat ) && usr.canmove && !( usr.restrained() )))
|
||||
var/resisting = 0
|
||||
for(var/obj/O in usr.requests)
|
||||
del(O)
|
||||
resisting++
|
||||
for(var/obj/item/weapon/grab/G in usr.grabbed_by)
|
||||
resisting++
|
||||
if (G.state == 1)
|
||||
del(G)
|
||||
else
|
||||
if (G.state == 2)
|
||||
if (prob(25))
|
||||
for(var/mob/O in viewers(usr, null))
|
||||
O.show_message(text("\red [] has broken free of []'s grip!", usr, G.assailant), 1)
|
||||
del(G)
|
||||
else
|
||||
if (G.state == 3)
|
||||
if (prob(5))
|
||||
for(var/mob/O in viewers(usr, null))
|
||||
O.show_message(text("\red [] has broken free of []'s headlock!", usr, G.assailant), 1)
|
||||
del(G)
|
||||
if(resisting)
|
||||
for(var/mob/O in viewers(usr, null))
|
||||
O.show_message(text("\red <B>[] resists!</B>", usr), 1)
|
||||
if(usr:handcuffed && usr:canmove && (usr.last_special <= world.time))
|
||||
var/breakouttime = 1200
|
||||
var/displaytime = 2
|
||||
if(!usr:canmove)
|
||||
breakouttime = 2400
|
||||
displaytime = 4
|
||||
usr.next_move = world.time + 100
|
||||
usr.last_special = world.time + 100
|
||||
if(isalienadult(usr) || usr.mutations & HULK)//Don't want to do a lot of logic gating here.
|
||||
usr << "\green You attempt to break \the [usr:handcuffed]. (This will take around 5 seconds and you need to stand still)"
|
||||
for(var/mob/O in viewers(usr))
|
||||
O.show_message(text("\red <B>[] is trying to break \the [usr:handcuffed]!</B>", usr), 1)
|
||||
spawn(0)
|
||||
if(do_after(usr, 50))
|
||||
if(!usr:handcuffed || usr:buckled)
|
||||
return
|
||||
for(var/mob/O in viewers(usr))
|
||||
O.show_message(text("\red <B>[] manages to break \the [usr:handcuffed]!</B>", usr), 1)
|
||||
usr << "\green You successfully break \the [usr:handcuffed]."
|
||||
del(usr:handcuffed)
|
||||
usr:handcuffed = null
|
||||
else
|
||||
if(istype(usr:handcuffed, /obj/item/weapon/handcuffs/cable))
|
||||
breakouttime = 300
|
||||
displaytime = 0.5
|
||||
usr << "\red You attempt to remove \the [usr:handcuffed]. (This will take around [displaytime] minutes and you need to stand still)"
|
||||
for(var/mob/O in viewers(usr))
|
||||
O.show_message(text("\red <B>[] attempts to remove \the [usr:handcuffed]!</B>", usr), 1)
|
||||
spawn(0)
|
||||
var/increment = 150
|
||||
for(var/i = 0, i < breakouttime, i += increment)
|
||||
if(!do_after(usr, increment))
|
||||
return
|
||||
|
||||
else
|
||||
usr << pick("You hear something click, but it doesn't open yet.", // - Uristqwerty
|
||||
"The latch resists!", // - IRC: BowlSoldier
|
||||
"The chain is starting to give!", // - IRC: BowlSoldier
|
||||
"The chain bends a little.", // - IRC: STALKER
|
||||
"Your wrist hurts.", // - IRC: STALKER
|
||||
"Unnng", // - IRC: Doug_H_Nuts
|
||||
"The chain jangles a bit.", // - SkyMarshal
|
||||
"\red Hurry up, dammit!", // - SkyMarshal
|
||||
"This is exhausting!") // - SkyMarshal
|
||||
for(var/mob/O in viewers(usr))
|
||||
if(prob(50)) //Reduces spam slightly
|
||||
O.show_message(text("\red [] continues to struggle in \the [usr:handcuffed]!", usr), 1)
|
||||
if(!usr:handcuffed) return
|
||||
for(var/mob/O in viewers(usr))
|
||||
O.show_message(text("\red <B>[] manages to remove \the [usr:handcuffed]!</B>", usr), 1)
|
||||
usr << "\blue You successfully remove \the [usr:handcuffed]."
|
||||
usr:handcuffed:loc = usr:loc
|
||||
usr:handcuffed = null
|
||||
usr.update_clothing()
|
||||
|
||||
if(istype(usr, /mob/living/carbon/human) && istype(usr:wear_suit, /obj/item/clothing/suit/straight_jacket) && usr:canmove && (usr.last_special <= world.time))
|
||||
usr.next_move = world.time + 200
|
||||
usr.last_special = world.time + 200
|
||||
if(isalienadult(usr) || usr.mutations & HULK)//Don't want to do a lot of logic gating here.
|
||||
usr << "\green You attempt to break out of your straight jacket. (This will take around 5 seconds and you need to stand still)"
|
||||
for(var/mob/O in viewers(usr))
|
||||
O.show_message(text("\red <B>[] is trying to break out of \his straight jacket!</B>", usr), 1)
|
||||
spawn(0)
|
||||
if(do_after(usr, 50))
|
||||
if(!istype(usr:wear_suit, /obj/item/clothing/suit/straight_jacket)) return
|
||||
for(var/mob/O in viewers(usr))
|
||||
O.show_message(text("\red <B>[] manages to break out of the straight jacket!</B>", usr), 1)
|
||||
usr << "\green You successfully break out of your straight jacket."
|
||||
var/obj/sj = usr:wear_suit
|
||||
usr.remove_from_mob(sj)
|
||||
sj.loc = usr.loc
|
||||
else
|
||||
usr << "\red You attempt to get out of your straight jacket. (This will take around 4 minutes and you need to stand still)"
|
||||
for(var/mob/O in viewers(usr))
|
||||
O.show_message(text("\red <B>[] attempts to get out \his straight jacket!</B>", usr), 1)
|
||||
spawn(0)
|
||||
if(do_after(usr, 1200))
|
||||
if(!istype(usr:wear_suit, /obj/item/clothing/suit/straight_jacket)) return
|
||||
for(var/mob/O in viewers(usr))
|
||||
O.show_message(text("\red <B>[] manages to wriggle out of the straight jacket!</B>", usr), 1)
|
||||
usr << "\blue You successfully get out of your straight jacket."
|
||||
var/obj/sj = usr:wear_suit
|
||||
usr.remove_from_mob(sj)
|
||||
sj.loc = usr.loc
|
||||
|
||||
if(usr:handcuffed && (usr.last_special <= world.time) && usr:buckled)
|
||||
usr.next_move = world.time + 100
|
||||
usr.last_special = world.time + 100
|
||||
usr << "\red You attempt to unbuckle yourself. (This will take around 2 minutes and you need to stand still)"
|
||||
for(var/mob/O in viewers(usr))
|
||||
O.show_message(text("\red <B>[] attempts to unbuckle themself!</B>", usr), 1)
|
||||
spawn(0)
|
||||
if(do_after(usr, 1200))
|
||||
if(!usr:buckled)
|
||||
return
|
||||
for(var/mob/O in viewers(usr))
|
||||
O.show_message(text("\red <B>[] manages to unbuckle themself!</B>", usr), 1)
|
||||
usr << "\blue You successfully unbuckle yourself."
|
||||
usr:buckled.manual_unbuckle(usr)
|
||||
|
||||
|
||||
if("r_hand")
|
||||
if(iscarbon(usr))
|
||||
var/mob/living/carbon/C = usr
|
||||
C.activate_hand("r")
|
||||
if("l_hand")
|
||||
if(iscarbon(usr))
|
||||
var/mob/living/carbon/C = usr
|
||||
C.activate_hand("l")
|
||||
if("module")
|
||||
if(issilicon(usr))
|
||||
if(usr:module)
|
||||
@@ -704,3 +607,152 @@
|
||||
/obj/screen/attack_paw(mob/user as mob, using)
|
||||
user.db_click(name, using)
|
||||
return
|
||||
|
||||
|
||||
/mob/living/verb/mob_sleep()
|
||||
set name = "Sleep"
|
||||
set category = "IC"
|
||||
|
||||
if(usr.sleeping && usr.sleeping_willingly)
|
||||
usr.sleeping = 0
|
||||
usr.sleeping_willingly = 0
|
||||
else if(!usr.sleeping)
|
||||
usr.sleeping = 20 //Short nap
|
||||
usr.sleeping_willingly = 1
|
||||
|
||||
/mob/living/verb/lay_down()
|
||||
set name = "Lay down / Get up"
|
||||
set category = "IC"
|
||||
|
||||
usr.resting = !( usr.resting )
|
||||
usr << "\blue You are now [(usr.resting) ? "resting" : "getting up"]"
|
||||
|
||||
/mob/living/verb/resist()
|
||||
set name = "Resist"
|
||||
set category = "IC"
|
||||
|
||||
if(usr.next_move > world.time)
|
||||
return
|
||||
usr.next_move = world.time + 20
|
||||
if ((!( usr.stat ) && usr.canmove && !( usr.restrained() )))
|
||||
var/resisting = 0
|
||||
for(var/obj/O in usr.requests)
|
||||
del(O)
|
||||
resisting++
|
||||
for(var/obj/item/weapon/grab/G in usr.grabbed_by)
|
||||
resisting++
|
||||
if (G.state == 1)
|
||||
del(G)
|
||||
else
|
||||
if (G.state == 2)
|
||||
if (prob(25))
|
||||
for(var/mob/O in viewers(usr, null))
|
||||
O.show_message(text("\red [] has broken free of []'s grip!", usr, G.assailant), 1)
|
||||
del(G)
|
||||
else
|
||||
if (G.state == 3)
|
||||
if (prob(5))
|
||||
for(var/mob/O in viewers(usr, null))
|
||||
O.show_message(text("\red [] has broken free of []'s headlock!", usr, G.assailant), 1)
|
||||
del(G)
|
||||
if(resisting)
|
||||
for(var/mob/O in viewers(usr, null))
|
||||
O.show_message(text("\red <B>[] resists!</B>", usr), 1)
|
||||
if(usr:handcuffed && usr:canmove && (usr.last_special <= world.time))
|
||||
var/breakouttime = 1200
|
||||
var/displaytime = 2
|
||||
if(!usr:canmove)
|
||||
breakouttime = 2400
|
||||
displaytime = 4
|
||||
usr.next_move = world.time + 100
|
||||
usr.last_special = world.time + 100
|
||||
if(isalienadult(usr) || usr.mutations & HULK)//Don't want to do a lot of logic gating here.
|
||||
usr << "\green You attempt to break \the [usr:handcuffed]. (This will take around 5 seconds and you need to stand still)"
|
||||
for(var/mob/O in viewers(usr))
|
||||
O.show_message(text("\red <B>[] is trying to break \the [usr:handcuffed]!</B>", usr), 1)
|
||||
spawn(0)
|
||||
if(do_after(usr, 50))
|
||||
if(!usr:handcuffed || usr:buckled)
|
||||
return
|
||||
for(var/mob/O in viewers(usr))
|
||||
O.show_message(text("\red <B>[] manages to break \the [usr:handcuffed]!</B>", usr), 1)
|
||||
usr << "\green You successfully break \the [usr:handcuffed]."
|
||||
del(usr:handcuffed)
|
||||
usr:handcuffed = null
|
||||
else
|
||||
if(istype(usr:handcuffed, /obj/item/weapon/handcuffs/cable))
|
||||
breakouttime = 300
|
||||
displaytime = 0.5
|
||||
usr << "\red You attempt to remove \the [usr:handcuffed]. (This will take around [displaytime] minutes and you need to stand still)"
|
||||
for(var/mob/O in viewers(usr))
|
||||
O.show_message(text("\red <B>[] attempts to remove \the [usr:handcuffed]!</B>", usr), 1)
|
||||
spawn(0)
|
||||
var/increment = 150
|
||||
for(var/i = 0, i < breakouttime, i += increment)
|
||||
if(!do_after(usr, increment))
|
||||
return
|
||||
|
||||
else
|
||||
usr << pick("You hear something click, but it doesn't open yet.", // - Uristqwerty
|
||||
"The latch resists!", // - IRC: BowlSoldier
|
||||
"The chain is starting to give!", // - IRC: BowlSoldier
|
||||
"The chain bends a little.", // - IRC: STALKER
|
||||
"Your wrist hurts.", // - IRC: STALKER
|
||||
"Unnng", // - IRC: Doug_H_Nuts
|
||||
"The chain jangles a bit.", // - SkyMarshal
|
||||
"\red Hurry up, dammit!", // - SkyMarshal
|
||||
"This is exhausting!") // - SkyMarshal
|
||||
for(var/mob/O in viewers(usr))
|
||||
if(prob(50)) //Reduces spam slightly
|
||||
O.show_message(text("\red [] continues to struggle in \the [usr:handcuffed]!", usr), 1)
|
||||
if(!usr:handcuffed) return
|
||||
for(var/mob/O in viewers(usr))
|
||||
O.show_message(text("\red <B>[] manages to remove \the [usr:handcuffed]!</B>", usr), 1)
|
||||
usr << "\blue You successfully remove \the [usr:handcuffed]."
|
||||
usr:handcuffed:loc = usr:loc
|
||||
usr:handcuffed = null
|
||||
usr.update_clothing()
|
||||
|
||||
if(istype(usr, /mob/living/carbon/human) && istype(usr:wear_suit, /obj/item/clothing/suit/straight_jacket) && usr:canmove && (usr.last_special <= world.time))
|
||||
usr.next_move = world.time + 200
|
||||
usr.last_special = world.time + 200
|
||||
if(isalienadult(usr) || usr.mutations & HULK)//Don't want to do a lot of logic gating here.
|
||||
usr << "\green You attempt to break out of your straight jacket. (This will take around 5 seconds and you need to stand still)"
|
||||
for(var/mob/O in viewers(usr))
|
||||
O.show_message(text("\red <B>[] is trying to break out of \his straight jacket!</B>", usr), 1)
|
||||
spawn(0)
|
||||
if(do_after(usr, 50))
|
||||
if(!istype(usr:wear_suit, /obj/item/clothing/suit/straight_jacket)) return
|
||||
for(var/mob/O in viewers(usr))
|
||||
O.show_message(text("\red <B>[] manages to break out of the straight jacket!</B>", usr), 1)
|
||||
usr << "\green You successfully break out of your straight jacket."
|
||||
var/obj/sj = usr:wear_suit
|
||||
usr.remove_from_mob(sj)
|
||||
sj.loc = usr.loc
|
||||
else
|
||||
usr << "\red You attempt to get out of your straight jacket. (This will take around 4 minutes and you need to stand still)"
|
||||
for(var/mob/O in viewers(usr))
|
||||
O.show_message(text("\red <B>[] attempts to get out \his straight jacket!</B>", usr), 1)
|
||||
spawn(0)
|
||||
if(do_after(usr, 1200))
|
||||
if(!istype(usr:wear_suit, /obj/item/clothing/suit/straight_jacket)) return
|
||||
for(var/mob/O in viewers(usr))
|
||||
O.show_message(text("\red <B>[] manages to wriggle out of the straight jacket!</B>", usr), 1)
|
||||
usr << "\blue You successfully get out of your straight jacket."
|
||||
var/obj/sj = usr:wear_suit
|
||||
usr.remove_from_mob(sj)
|
||||
sj.loc = usr.loc
|
||||
if(usr:handcuffed && (usr.last_special <= world.time) && usr:buckled)
|
||||
usr.next_move = world.time + 100
|
||||
usr.last_special = world.time + 100
|
||||
usr << "\red You attempt to unbuckle yourself. (This will take around 2 minutes and you need to stand still)"
|
||||
for(var/mob/O in viewers(usr))
|
||||
O.show_message(text("\red <B>[] attempts to unbuckle themself!</B>", usr), 1)
|
||||
spawn(0)
|
||||
if(do_after(usr, 1200))
|
||||
if(!usr:buckled)
|
||||
return
|
||||
for(var/mob/O in viewers(usr))
|
||||
O.show_message(text("\red <B>[] manages to unbuckle themself!</B>", usr), 1)
|
||||
usr << "\blue You successfully unbuckle yourself."
|
||||
usr:buckled.manual_unbuckle(usr)
|
||||
@@ -514,7 +514,7 @@ client/verb
|
||||
usr.gun_move_icon.name = "Disallow Walking"
|
||||
else
|
||||
// winset(usr,"default.target_can_move","is-flat=false;border=none")
|
||||
usr << "Target may no longer move."
|
||||
usr << "Target may no longegr move."
|
||||
target_can_run = 0
|
||||
del(usr.gun_run_icon)
|
||||
if(usr.gun_move_icon)
|
||||
@@ -529,7 +529,8 @@ client/verb
|
||||
if(!target_can_run)
|
||||
M << "\red Your move intent is now set to walk, as your targeter permits it."
|
||||
M.m_intent = "walk"
|
||||
M.hud_used.move_intent.icon_state = "walking"
|
||||
if(M.hud_used.move_intent)
|
||||
M.hud_used.move_intent.icon_state = "walking"
|
||||
else
|
||||
M << "\red <b>Your character will now be shot if they move.</b>"
|
||||
AllowTargetRun()
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 154 KiB After Width: | Height: | Size: 154 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 132 KiB After Width: | Height: | Size: 132 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 116 KiB After Width: | Height: | Size: 147 KiB |
Reference in New Issue
Block a user