mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-07-11 08:06:33 +01:00
4c0b617752
## About The Pull Request PDA apps use `<NtosWindow>` instead of `<Window>` because the former adds a header with an X button and system info, moves all the content of the RaptorDex component to a new RaptorDexContent component, converts `<RaptorDex>` to be just the `<Window>` tag and adds a NtosRaptorDex component for PDAs that uses `<NtosWindow>` instead ## Why It's Good For The Game Fixes #93761 ## Changelog 🆑 fix: fixed RaptorDex PDA app having no close button /🆑
62 lines
2.6 KiB
Plaintext
62 lines
2.6 KiB
Plaintext
/datum/computer_file/program/raptordex
|
|
filename = "raptordex"
|
|
filedesc = "RaptorDex"
|
|
downloader_category = PROGRAM_CATEGORY_DEVICE
|
|
program_open_overlay = "bountyboard"
|
|
extended_desc = "Scan and analyze raptor genes."
|
|
size = 2
|
|
tgui_id = "NtosRaptorDex"
|
|
program_icon = "crow"
|
|
can_run_on_flags = PROGRAM_PDA
|
|
/// Raptor scan data we have stored
|
|
var/list/scan_data = list("raptor_scan" = FALSE)
|
|
|
|
/datum/computer_file/program/raptordex/tap(atom/tapped_atom, mob/living/user, list/modifiers)
|
|
if(!istype(tapped_atom, /mob/living/basic/raptor))
|
|
return FALSE
|
|
|
|
var/mob/living/basic/raptor/my_raptor = tapped_atom
|
|
var/datum/movespeed_modifier/intent_mod = my_raptor.get_move_intent_slowdown()
|
|
|
|
scan_data = list()
|
|
scan_data["raptor_scan"] = TRUE
|
|
scan_data["raptor_image"] = icon2base64(icon(icon = my_raptor.icon, icon_state = my_raptor.icon_state, dir = SOUTH, frame = 1))
|
|
scan_data["raptor_attack"] = my_raptor.melee_damage_lower
|
|
scan_data["raptor_health"] = my_raptor.health
|
|
scan_data["raptor_max_health"] = my_raptor.maxHealth
|
|
scan_data["raptor_speed"] = my_raptor.speed + intent_mod?.multiplicative_slowdown
|
|
scan_data["raptor_color"] = my_raptor.name
|
|
scan_data["raptor_gender"] = my_raptor.gender
|
|
scan_data["raptor_description"] = my_raptor.raptor_color.description
|
|
|
|
var/happiness_percentage = my_raptor.ai_controller?.blackboard[BB_BASIC_HAPPINESS]
|
|
var/obj/effect/overlay/happiness_overlay/display = new()
|
|
display.set_hearts(happiness_percentage)
|
|
display.pixel_y = ICON_SIZE_Y * 0.5
|
|
scan_data["raptor_happiness"] = icon2base64(getFlatIcon(display, no_anim = TRUE))
|
|
qdel(display)
|
|
|
|
var/datum/raptor_inheritance/inherit = my_raptor.inherited_stats
|
|
if(!isnull(inherit))
|
|
scan_data["inherited_attack"] = inherit.attack_modifier
|
|
scan_data["inherited_attack_max"] = RAPTOR_INHERIT_MAX_ATTACK
|
|
scan_data["inherited_health"] = inherit.health_modifier
|
|
scan_data["inherited_health_max"] = RAPTOR_INHERIT_MAX_HEALTH
|
|
scan_data["inherited_speed"] = inherit.speed_modifier
|
|
scan_data["inherited_speed_max"] = RAPTOR_INHERIT_MAX_SPEED
|
|
scan_data["inherited_ability"] = inherit.ability_modifier
|
|
scan_data["inherited_ability_max"] = RAPTOR_INHERIT_MAX_MODIFIER
|
|
scan_data["inherited_growth"] = inherit.growth_modifier
|
|
scan_data["inherited_growth_max"] = RAPTOR_INHERIT_MAX_MODIFIER
|
|
|
|
scan_data["inherited_traits"] = list()
|
|
for(var/index in inherit.personality_traits)
|
|
scan_data["inherited_traits"] += GLOB.raptor_inherit_traits[index]
|
|
|
|
playsound(computer, 'sound/mobs/non-humanoids/orbie/orbie_send_out.ogg', 20)
|
|
my_raptor.balloon_alert(user, "scanned")
|
|
return TRUE
|
|
|
|
/datum/computer_file/program/raptordex/ui_data(mob/user)
|
|
return scan_data
|