Files
Bubberstation/code/_onclick/hud/alien.dm
SkyratBot 11fc632d38 [MIRROR] Refactor /mob/living/carbon/alien/humanoid to be /mob/living/carbon/alien/adult [MDB IGNORE] (#17044)
* Refactor `/mob/living/carbon/alien/humanoid` to be `/mob/living/carbon/alien/adult`

* update modular

Co-authored-by: Tim <timothymtorres@gmail.com>
Co-authored-by: Tom <8881105+tf-4@users.noreply.github.com>
2022-10-21 10:42:44 +01:00

138 lines
3.6 KiB
Plaintext

/atom/movable/screen/alien
icon = 'icons/hud/screen_alien.dmi'
/atom/movable/screen/alien/leap
name = "toggle leap"
icon_state = "leap_off"
/atom/movable/screen/alien/leap/Click()
if(isalienhunter(usr))
var/mob/living/carbon/alien/adult/hunter/AH = usr
AH.toggle_leap()
/atom/movable/screen/alien/plasma_display
name = "plasma stored"
icon_state = "power_display"
screen_loc = ui_alienplasmadisplay
/atom/movable/screen/alien/alien_queen_finder
name = "queen sense"
desc = "Allows you to sense the general direction of your Queen."
icon_state = "queen_finder"
screen_loc = ui_alien_queen_finder
/datum/hud/alien
ui_style = 'icons/hud/screen_alien.dmi'
/datum/hud/alien/New(mob/living/carbon/alien/adult/owner)
..()
var/atom/movable/screen/using
//equippable shit
//hands
build_hand_slots()
//begin buttons
using = new /atom/movable/screen/swap_hand()
using.icon = ui_style
using.icon_state = "swap_1"
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
if(isalienhunter(mymob))
var/mob/living/carbon/alien/adult/hunter/H = mymob
H.leap_icon = new /atom/movable/screen/alien/leap()
H.leap_icon.screen_loc = ui_alien_storage_r
static_inventory += H.leap_icon
using = new/atom/movable/screen/language_menu
using.screen_loc = ui_alien_language_menu
using.hud = src
static_inventory += using
using = new /atom/movable/screen/navigate
using.screen_loc = ui_alien_navigate_menu
using.hud = src
static_inventory += using
using = new /atom/movable/screen/drop()
using.icon = ui_style
using.screen_loc = ui_drop_throw
using.hud = src
static_inventory += using
using = new /atom/movable/screen/resist()
using.icon = ui_style
using.screen_loc = ui_above_movement
using.hud = src
hotkeybuttons += using
throw_icon = new /atom/movable/screen/throw_catch()
throw_icon.icon = ui_style
throw_icon.screen_loc = ui_drop_throw
throw_icon.hud = src
hotkeybuttons += throw_icon
pull_icon = new /atom/movable/screen/pull()
pull_icon.icon = ui_style
pull_icon.update_appearance()
pull_icon.screen_loc = ui_above_movement
pull_icon.hud = src
static_inventory += pull_icon
//begin indicators
healths = new /atom/movable/screen/healths/alien()
healths.hud = src
infodisplay += healths
alien_plasma_display = new /atom/movable/screen/alien/plasma_display()
alien_plasma_display.hud = src
infodisplay += alien_plasma_display
if(!isalienqueen(mymob))
alien_queen_finder = new /atom/movable/screen/alien/alien_queen_finder
alien_queen_finder.hud = src
infodisplay += alien_queen_finder
zone_select = new /atom/movable/screen/zone_sel/alien()
zone_select.hud = src
zone_select.update_appearance()
static_inventory += zone_select
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/alien/persistent_inventory_update()
if(!mymob)
return
var/mob/living/carbon/alien/adult/H = mymob
if(hud_version != HUD_STYLE_NOHUD)
for(var/obj/item/I in H.held_items)
I.screen_loc = ui_hand_position(H.get_held_index_of_item(I))
H.client.screen += I
else
for(var/obj/item/I in H.held_items)
I.screen_loc = null
H.client.screen -= I