- Renamed the obj/hud other_update() proc to hidden_inventory_update()

- Renamed the obj/hud show_otherinventory var to inventory_shown
- Added the F12 hotkey which hides most of the UI except for the intent switcher, hands, health indicator, damage indicators and the other pop-in indicators on the right. The proc is called /mob/verb/button_pressed_F12(), the verb abbreviation is "F12" and it's hidden, so it won't show in the info panel. This currently only works for human mobs.

Screenshot:
http://www.kamletos.si/minimal%20UI.png

git-svn-id: http://tgstation13.googlecode.com/svn/trunk@3926 316c924e-a436-60f5-8080-3fe189b3f50e
This commit is contained in:
baloh.matevz
2012-06-27 08:13:23 +00:00
parent da5bfd3b0f
commit 9f3005255c
8 changed files with 99 additions and 30 deletions
+1 -1
View File
@@ -681,7 +681,7 @@
//, mymob.i_select, mymob.m_select
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.nutrition_icon, mymob.pullin, mymob.blind, mymob.flash) //, mymob.hands, mymob.rest, mymob.sleep) //, mymob.mach )
mymob.client.screen += src.adding + src.hotkeybuttons
show_otherinventory = 0;
inventory_shown = 0;
//if(istype(mymob,/mob/living/carbon/monkey)) mymob.client.screen += src.mon_blo
@@ -588,7 +588,7 @@ Please contact me on #coderbus IRC. ~Carn x
/mob/living/carbon/human/update_hud() //TODO: do away with this if possible
if(client)
client.screen |= contents
hud_used.other_update() //Updates the screenloc of the items on the 'other' inventory bar
hud_used.hidden_inventory_update() //Updates the screenloc of the items on the 'other' inventory bar
/mob/living/carbon/human/update_inv_handcuffed(var/update_icons=1)
-3
View File
@@ -5,9 +5,6 @@
flags = NOREACT
var/datum/mind/mind
//MOB overhaul
//Not in use yet
+47
View File
@@ -268,3 +268,50 @@ It's fairly easy to fix if dealing with single letters but not so much with comp
return 1
return 0
//Triggered when F12 is pressed (Unless someone changed something in the DMF)
/mob/verb/button_pressed_F12()
set name = "F12"
set hidden = 1
if(hud_used)
if(ishuman(src))
if(!src.client) return
if(hud_used.hud_shown)
hud_used.hud_shown = 0
if(src.hud_used.adding)
src.client.screen -= src.hud_used.adding
if(src.hud_used.other)
src.client.screen -= src.hud_used.other
if(src.hud_used.hotkeybuttons)
src.client.screen -= src.hud_used.hotkeybuttons
//Due to some poor coding some things need special treatment:
//These ones are a part of 'adding', 'other' or 'hotkeybuttons' but we want them to stay
src.client.screen += src.hud_used.l_hand_hud_object //we want the hands to be visible
src.client.screen += src.hud_used.r_hand_hud_object //we want the hands to be visible
src.client.screen += src.hud_used.action_intent //we want the intent swticher visible
src.hud_used.action_intent.screen_loc = ui_acti_alt //move this to the alternative position, where zone_select usually is.
//These ones are not a part of 'adding', 'other' or 'hotkeybuttons' but we want them gone.
src.client.screen -= src.zone_sel //zone_sel is a mob variable for some reason.
else
hud_used.hud_shown = 1
if(src.hud_used.adding)
src.client.screen += src.hud_used.adding
if(src.hud_used.other && src.hud_used.inventory_shown)
src.client.screen += src.hud_used.other
if(src.hud_used.hotkeybuttons && !src.hud_used.hotkey_ui_hidden)
src.client.screen += src.hud_used.hotkeybuttons
src.hud_used.action_intent.screen_loc = ui_acti //Restore intent selection to the original position
src.client.screen += src.zone_sel //This one is a special snowflake
hud_used.hidden_inventory_update()
hud_used.persistant_inventory_update()
else
usr << "\red Inventory hiding is currently only supported for human mobs, sorry."
else
usr << "\red This mob type does not use a HUD."
+8 -8
View File
@@ -205,14 +205,14 @@
switch(name)
/*
if("other")
if (usr.hud_used.show_otherinventory)
usr.hud_used.show_otherinventory = 0
if (usr.hud_used.inventory_shown)
usr.hud_used.inventory_shown = 0
usr.client.screen -= usr.hud_used.other
else
usr.hud_used.show_otherinventory = 1
usr.hud_used.inventory_shown = 1
usr.client.screen += usr.hud_used.other
usr.hud_used.other_update()*/
usr.hud_used.hidden_inventory_update()*/
if("act_intent")
if(ishuman(usr) || istype(usr,/mob/living/carbon/alien/humanoid) || islarva(usr))
usr.hud_used.action_intent.icon_state = "intent_[usr.a_intent]"
@@ -234,14 +234,14 @@
usr.clearmap()
if("other")
if (usr.hud_used.show_otherinventory)
usr.hud_used.show_otherinventory = 0
if (usr.hud_used.inventory_shown)
usr.hud_used.inventory_shown = 0
usr.client.screen -= usr.hud_used.other
else
usr.hud_used.show_otherinventory = 1
usr.hud_used.inventory_shown = 1
usr.client.screen += usr.hud_used.other
usr.hud_used.other_update()
usr.hud_used.hidden_inventory_update()
if("equip")
var/obj/item/I = usr.get_active_hand()