Files
Bubberstation/code/_onclick/hud/drones.dm
TemporalOroboros e4079c87b8 update_appearance (#55468)
Creates update_name and update_desc
Creates the wrapper proc update_appearance to batch update_name, update_desc, and update_icon together
Less non-icon handling code in update_icon and friends
Signal hooks for things that want to change names and descriptions
99%+ of the changes in this are just from switching everything over to update_appearance from update_icon
2021-02-19 12:06:18 -03:00

51 lines
1.3 KiB
Plaintext

/datum/hud/dextrous/drone/New(mob/owner)
..()
var/atom/movable/screen/inventory/inv_box
inv_box = new /atom/movable/screen/inventory()
inv_box.name = "internal storage"
inv_box.icon = ui_style
inv_box.icon_state = "suit_storage"
// inv_box.icon_full = "template"
inv_box.screen_loc = ui_drone_storage
inv_box.slot_id = ITEM_SLOT_DEX_STORAGE
inv_box.hud = src
static_inventory += inv_box
inv_box = new /atom/movable/screen/inventory()
inv_box.name = "head/mask"
inv_box.icon = ui_style
inv_box.icon_state = "mask"
// inv_box.icon_full = "template"
inv_box.screen_loc = ui_drone_head
inv_box.slot_id = ITEM_SLOT_HEAD
inv_box.hud = src
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[TOBITSHIFT(inv.slot_id) + 1] = inv
inv.update_appearance()
/datum/hud/dextrous/drone/persistent_inventory_update()
if(!mymob)
return
var/mob/living/simple_animal/drone/D = mymob
if(hud_shown)
if(D.internal_storage)
D.internal_storage.screen_loc = ui_drone_storage
D.client.screen += D.internal_storage
if(D.head)
D.head.screen_loc = ui_drone_head
D.client.screen += D.head
else
if(D.internal_storage)
D.internal_storage.screen_loc = null
if(D.head)
D.head.screen_loc = null
..()