Merge branch 'master' into Projectile_Rework
This commit is contained in:
@@ -117,7 +117,7 @@
|
||||
for(var/atom/movable/screen/inventory/inv in (static_inventory + toggleable_inventory))
|
||||
if(inv.slot_id)
|
||||
inv.hud = src
|
||||
inv_slots[inv.slot_id] = inv
|
||||
inv_slots[TOBITSHIFT(inv.slot_id) + 1] = inv
|
||||
inv.update_icon()
|
||||
|
||||
/datum/hud/alien/persistent_inventory_update()
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
inv_box.icon_state = "suit_storage"
|
||||
// inv_box.icon_full = "template"
|
||||
inv_box.screen_loc = ui_drone_storage
|
||||
inv_box.slot_id = SLOT_GENERC_DEXTROUS_STORAGE
|
||||
inv_box.slot_id = ITEM_SLOT_DEX_STORAGE
|
||||
static_inventory += inv_box
|
||||
|
||||
inv_box = new /atom/movable/screen/inventory()
|
||||
@@ -17,13 +17,13 @@
|
||||
inv_box.icon_state = "mask"
|
||||
// inv_box.icon_full = "template"
|
||||
inv_box.screen_loc = ui_drone_head
|
||||
inv_box.slot_id = SLOT_HEAD
|
||||
inv_box.slot_id = ITEM_SLOT_HEAD
|
||||
static_inventory += inv_box
|
||||
|
||||
for(var/atom/movable/screen/inventory/inv in (static_inventory + toggleable_inventory))
|
||||
if(inv.slot_id)
|
||||
inv.hud = src
|
||||
inv_slots[inv.slot_id] = inv
|
||||
inv_slots[TOBITSHIFT(inv.slot_id) + 1] = inv
|
||||
inv.update_icon()
|
||||
|
||||
|
||||
|
||||
@@ -60,7 +60,7 @@
|
||||
for(var/atom/movable/screen/inventory/inv in (static_inventory + toggleable_inventory))
|
||||
if(inv.slot_id)
|
||||
inv.hud = src
|
||||
inv_slots[inv.slot_id] = inv
|
||||
inv_slots[TOBITSHIFT(inv.slot_id) + 1] = inv
|
||||
inv.update_icon()
|
||||
|
||||
/datum/hud/dextrous/persistent_inventory_update()
|
||||
|
||||
@@ -43,7 +43,7 @@
|
||||
inv_box.icon = ui_style
|
||||
inv_box.icon_state = "suit_storage"
|
||||
inv_box.screen_loc = ui_id
|
||||
inv_box.slot_id = SLOT_GENERC_DEXTROUS_STORAGE
|
||||
inv_box.slot_id = ITEM_SLOT_DEX_STORAGE
|
||||
static_inventory += inv_box
|
||||
|
||||
using = new /atom/movable/screen/guardian/Communicate()
|
||||
|
||||
@@ -53,6 +53,22 @@ GLOBAL_LIST_INIT(available_ui_styles, list(
|
||||
var/list/hand_slots // /atom/movable/screen/inventory/hand objects, assoc list of "[held_index]" = object
|
||||
var/list/atom/movable/screen/plane_master/plane_masters = list() // see "appearance_flags" in the ref, assoc list of "[plane]" = object
|
||||
|
||||
|
||||
///UI for screentips that appear when you mouse over things
|
||||
var/atom/movable/screen/screentip/screentip_text
|
||||
|
||||
/// Whether or not screentips are enabled.
|
||||
/// This is updated by the preference for cheaper reads than would be
|
||||
/// had with a proc call, especially on one of the hottest procs in the
|
||||
/// game (MouseEntered).
|
||||
var/screentips_enabled = TRUE
|
||||
|
||||
/// The color to use for the screentips.
|
||||
/// This is updated by the preference for cheaper reads than would be
|
||||
/// had with a proc call, especially on one of the hottest procs in the
|
||||
/// game (MouseEntered).
|
||||
var/screentip_color
|
||||
|
||||
var/atom/movable/screen/movable/action_button/hide_toggle/hide_actions_toggle
|
||||
var/action_buttons_hidden = FALSE
|
||||
|
||||
@@ -83,6 +99,8 @@ GLOBAL_LIST_INIT(available_ui_styles, list(
|
||||
plane_masters["[instance.plane]"] = instance
|
||||
instance.backdrop(mymob)
|
||||
|
||||
screentip_text = new(null, src)
|
||||
static_inventory += screentip_text
|
||||
|
||||
/datum/hud/Destroy()
|
||||
if(mymob.hud_used == src)
|
||||
@@ -117,6 +135,8 @@ GLOBAL_LIST_INIT(available_ui_styles, list(
|
||||
QDEL_LIST(screenoverlays)
|
||||
mymob = null
|
||||
|
||||
QDEL_NULL(screentip_text)
|
||||
|
||||
return ..()
|
||||
|
||||
|
||||
|
||||
+16
-16
@@ -233,7 +233,7 @@
|
||||
inv_box = new /atom/movable/screen/inventory()
|
||||
inv_box.name = "i_clothing"
|
||||
inv_box.icon = ui_style
|
||||
inv_box.slot_id = SLOT_W_UNIFORM
|
||||
inv_box.slot_id = ITEM_SLOT_ICLOTHING
|
||||
inv_box.icon_state = "uniform"
|
||||
inv_box.screen_loc = ui_iclothing
|
||||
toggleable_inventory += inv_box
|
||||
@@ -241,7 +241,7 @@
|
||||
inv_box = new /atom/movable/screen/inventory()
|
||||
inv_box.name = "o_clothing"
|
||||
inv_box.icon = ui_style
|
||||
inv_box.slot_id = SLOT_WEAR_SUIT
|
||||
inv_box.slot_id = ITEM_SLOT_OCLOTHING
|
||||
inv_box.icon_state = "suit"
|
||||
inv_box.screen_loc = ui_oclothing
|
||||
toggleable_inventory += inv_box
|
||||
@@ -267,7 +267,7 @@
|
||||
inv_box.icon = ui_style
|
||||
inv_box.icon_state = "id"
|
||||
inv_box.screen_loc = ui_id
|
||||
inv_box.slot_id = SLOT_WEAR_ID
|
||||
inv_box.slot_id = ITEM_SLOT_ID
|
||||
static_inventory += inv_box
|
||||
|
||||
inv_box = new /atom/movable/screen/inventory()
|
||||
@@ -275,7 +275,7 @@
|
||||
inv_box.icon = ui_style
|
||||
inv_box.icon_state = "mask"
|
||||
inv_box.screen_loc = ui_mask
|
||||
inv_box.slot_id = SLOT_WEAR_MASK
|
||||
inv_box.slot_id = ITEM_SLOT_MASK
|
||||
toggleable_inventory += inv_box
|
||||
|
||||
inv_box = new /atom/movable/screen/inventory()
|
||||
@@ -283,7 +283,7 @@
|
||||
inv_box.icon = ui_style
|
||||
inv_box.icon_state = "neck"
|
||||
inv_box.screen_loc = ui_neck
|
||||
inv_box.slot_id = SLOT_NECK
|
||||
inv_box.slot_id = ITEM_SLOT_NECK
|
||||
toggleable_inventory += inv_box
|
||||
|
||||
inv_box = new /atom/movable/screen/inventory()
|
||||
@@ -291,7 +291,7 @@
|
||||
inv_box.icon = ui_style
|
||||
inv_box.icon_state = "back"
|
||||
inv_box.screen_loc = ui_back
|
||||
inv_box.slot_id = SLOT_BACK
|
||||
inv_box.slot_id = ITEM_SLOT_BACK
|
||||
static_inventory += inv_box
|
||||
|
||||
inv_box = new /atom/movable/screen/inventory()
|
||||
@@ -299,7 +299,7 @@
|
||||
inv_box.icon = ui_style
|
||||
inv_box.icon_state = "pocket"
|
||||
inv_box.screen_loc = ui_storage1
|
||||
inv_box.slot_id = SLOT_L_STORE
|
||||
inv_box.slot_id = ITEM_SLOT_LPOCKET
|
||||
static_inventory += inv_box
|
||||
|
||||
inv_box = new /atom/movable/screen/inventory()
|
||||
@@ -307,7 +307,7 @@
|
||||
inv_box.icon = ui_style
|
||||
inv_box.icon_state = "pocket"
|
||||
inv_box.screen_loc = ui_storage2
|
||||
inv_box.slot_id = SLOT_R_STORE
|
||||
inv_box.slot_id = ITEM_SLOT_RPOCKET
|
||||
static_inventory += inv_box
|
||||
|
||||
inv_box = new /atom/movable/screen/inventory()
|
||||
@@ -315,7 +315,7 @@
|
||||
inv_box.icon = ui_style
|
||||
inv_box.icon_state = "suit_storage"
|
||||
inv_box.screen_loc = ui_sstore1
|
||||
inv_box.slot_id = SLOT_S_STORE
|
||||
inv_box.slot_id = ITEM_SLOT_SUITSTORE
|
||||
static_inventory += inv_box
|
||||
|
||||
using = new /atom/movable/screen/resist()
|
||||
@@ -348,7 +348,7 @@
|
||||
inv_box.icon = ui_style
|
||||
inv_box.icon_state = "gloves"
|
||||
inv_box.screen_loc = ui_gloves
|
||||
inv_box.slot_id = SLOT_GLOVES
|
||||
inv_box.slot_id = ITEM_SLOT_GLOVES
|
||||
toggleable_inventory += inv_box
|
||||
|
||||
inv_box = new /atom/movable/screen/inventory()
|
||||
@@ -356,7 +356,7 @@
|
||||
inv_box.icon = ui_style
|
||||
inv_box.icon_state = "glasses"
|
||||
inv_box.screen_loc = ui_glasses
|
||||
inv_box.slot_id = SLOT_GLASSES
|
||||
inv_box.slot_id = ITEM_SLOT_EYES
|
||||
toggleable_inventory += inv_box
|
||||
|
||||
inv_box = new /atom/movable/screen/inventory()
|
||||
@@ -364,7 +364,7 @@
|
||||
inv_box.icon = ui_style
|
||||
inv_box.icon_state = "ears"
|
||||
inv_box.screen_loc = ui_ears
|
||||
inv_box.slot_id = SLOT_EARS
|
||||
inv_box.slot_id = ITEM_SLOT_EARS
|
||||
toggleable_inventory += inv_box
|
||||
|
||||
inv_box = new /atom/movable/screen/inventory()
|
||||
@@ -372,7 +372,7 @@
|
||||
inv_box.icon = ui_style
|
||||
inv_box.icon_state = "head"
|
||||
inv_box.screen_loc = ui_head
|
||||
inv_box.slot_id = SLOT_HEAD
|
||||
inv_box.slot_id = ITEM_SLOT_HEAD
|
||||
toggleable_inventory += inv_box
|
||||
|
||||
inv_box = new /atom/movable/screen/inventory()
|
||||
@@ -380,7 +380,7 @@
|
||||
inv_box.icon = ui_style
|
||||
inv_box.icon_state = "shoes"
|
||||
inv_box.screen_loc = ui_shoes
|
||||
inv_box.slot_id = SLOT_SHOES
|
||||
inv_box.slot_id = ITEM_SLOT_FEET
|
||||
toggleable_inventory += inv_box
|
||||
|
||||
inv_box = new /atom/movable/screen/inventory()
|
||||
@@ -389,7 +389,7 @@
|
||||
inv_box.icon_state = "belt"
|
||||
// inv_box.icon_full = "template_small"
|
||||
inv_box.screen_loc = ui_belt
|
||||
inv_box.slot_id = SLOT_BELT
|
||||
inv_box.slot_id = ITEM_SLOT_BELT
|
||||
static_inventory += inv_box
|
||||
|
||||
throw_icon = new /atom/movable/screen/throw_catch()
|
||||
@@ -464,7 +464,7 @@
|
||||
for(var/atom/movable/screen/inventory/inv in (static_inventory + toggleable_inventory))
|
||||
if(inv.slot_id)
|
||||
inv.hud = src
|
||||
inv_slots[inv.slot_id] = inv
|
||||
inv_slots[TOBITSHIFT(inv.slot_id) + 1] = inv
|
||||
inv.update_icon()
|
||||
|
||||
update_locked_slots()
|
||||
|
||||
@@ -50,7 +50,7 @@
|
||||
inv_box.icon_state = "mask"
|
||||
// inv_box.icon_full = "template"
|
||||
inv_box.screen_loc = ui_monkey_mask
|
||||
inv_box.slot_id = SLOT_WEAR_MASK
|
||||
inv_box.slot_id = ITEM_SLOT_MASK
|
||||
static_inventory += inv_box
|
||||
|
||||
inv_box = new /atom/movable/screen/inventory()
|
||||
@@ -59,7 +59,7 @@
|
||||
inv_box.icon_state = "neck"
|
||||
// inv_box.icon_full = "template"
|
||||
inv_box.screen_loc = ui_monkey_neck
|
||||
inv_box.slot_id = SLOT_NECK
|
||||
inv_box.slot_id = ITEM_SLOT_NECK
|
||||
static_inventory += inv_box
|
||||
|
||||
inv_box = new /atom/movable/screen/inventory()
|
||||
@@ -68,7 +68,7 @@
|
||||
inv_box.icon_state = "head"
|
||||
// inv_box.icon_full = "template"
|
||||
inv_box.screen_loc = ui_monkey_head
|
||||
inv_box.slot_id = SLOT_HEAD
|
||||
inv_box.slot_id = ITEM_SLOT_HEAD
|
||||
static_inventory += inv_box
|
||||
|
||||
inv_box = new /atom/movable/screen/inventory()
|
||||
@@ -76,7 +76,7 @@
|
||||
inv_box.icon = ui_style
|
||||
inv_box.icon_state = "back"
|
||||
inv_box.screen_loc = ui_monkey_back
|
||||
inv_box.slot_id = SLOT_BACK
|
||||
inv_box.slot_id = ITEM_SLOT_BACK
|
||||
static_inventory += inv_box
|
||||
|
||||
throw_icon = new /atom/movable/screen/throw_catch()
|
||||
@@ -126,7 +126,7 @@
|
||||
for(var/atom/movable/screen/inventory/inv in (static_inventory + toggleable_inventory))
|
||||
if(inv.slot_id)
|
||||
inv.hud = src
|
||||
inv_slots[inv.slot_id] = inv
|
||||
inv_slots[TOBITSHIFT(inv.slot_id) + 1] = inv
|
||||
inv.update_icon()
|
||||
|
||||
/datum/hud/monkey/persistent_inventory_update()
|
||||
|
||||
@@ -0,0 +1,19 @@
|
||||
/atom/movable/screen/screentip
|
||||
icon = null
|
||||
icon_state = null
|
||||
mouse_opacity = MOUSE_OPACITY_TRANSPARENT
|
||||
screen_loc = "TOP,LEFT"
|
||||
maptext_height = 480
|
||||
maptext_width = 480
|
||||
maptext = ""
|
||||
|
||||
/atom/movable/screen/screentip/Initialize(mapload, _hud)
|
||||
. = ..()
|
||||
hud = _hud
|
||||
update_view()
|
||||
|
||||
/atom/movable/screen/screentip/proc/update_view(datum/source)
|
||||
SIGNAL_HANDLER
|
||||
if(!hud || !hud.mymob.client.view_size) //Might not have been initialized by now
|
||||
return
|
||||
maptext_width = getviewsize(hud.mymob.client.view_size.getView())[1] * world.icon_size
|
||||
@@ -101,7 +101,7 @@
|
||||
|
||||
//stops TK grabs being equipped anywhere but into hands
|
||||
/obj/item/tk_grab/equipped(mob/user, slot)
|
||||
if(slot == SLOT_HANDS)
|
||||
if(slot == ITEM_SLOT_HANDS)
|
||||
return ..()
|
||||
qdel(src)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user