Files
Bubberstation/code/_onclick/hud/generic_dextrous.dm
SkyratBot 18eca27569 [MIRROR] update_appearance (#3508)
* update_appearance

* a

* a

Co-authored-by: TemporalOroboros <TemporalOroboros@gmail.com>
Co-authored-by: Gandalf2k15 <jzo123@hotmail.com>
2021-02-19 16:08:09 +00:00

80 lines
2.0 KiB
Plaintext

//Used for normal mobs that have hands.
/datum/hud/dextrous/New(mob/living/owner)
..()
var/atom/movable/screen/using
using = new /atom/movable/screen/drop()
using.icon = ui_style
using.screen_loc = ui_drone_drop
using.hud = src
static_inventory += using
pull_icon = new /atom/movable/screen/pull()
pull_icon.icon = ui_style
pull_icon.update_appearance()
pull_icon.screen_loc = ui_drone_pull
pull_icon.hud = src
static_inventory += pull_icon
build_hand_slots()
using = new /atom/movable/screen/swap_hand()
using.icon = ui_style
using.icon_state = "swap_1_m"
using.screen_loc = ui_swaphand_position(owner,1)
using.hud = src
static_inventory += using
using = new /atom/movable/screen/swap_hand()
using.icon = ui_style
using.icon_state = "swap_2"
using.screen_loc = ui_swaphand_position(owner,2)
using.hud = src
static_inventory += using
action_intent = new /atom/movable/screen/combattoggle/flashy()
action_intent.hud = src
action_intent.icon = ui_style
action_intent.screen_loc = ui_combat_toggle
static_inventory += action_intent
zone_select = new /atom/movable/screen/zone_sel()
zone_select.icon = ui_style
zone_select.hud = src
zone_select.update_appearance()
static_inventory += zone_select
using = new /atom/movable/screen/area_creator
using.icon = ui_style
using.hud = src
static_inventory += using
mymob.client.screen = list()
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/persistent_inventory_update()
if(!mymob)
return
var/mob/living/D = mymob
if(hud_version != HUD_STYLE_NOHUD)
for(var/obj/item/I in D.held_items)
I.screen_loc = ui_hand_position(D.get_held_index_of_item(I))
D.client.screen += I
else
for(var/obj/item/I in D.held_items)
I.screen_loc = null
D.client.screen -= I
//Dextrous simple mobs can use hands!
/mob/living/simple_animal/create_mob_hud()
if(dextrous)
hud_type = dextrous_hud_type
return ..()