mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-07-09 15:15:34 +01:00
21b4095dfd
Upstream 04/17/2026 fixes https://github.com/Bubberstation/Bubberstation/issues/5549 --------- Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: tgstation-ci[bot] <179393467+tgstation-ci[bot]@users.noreply.github.com> Co-authored-by: ArcaneMusic <41715314+ArcaneMusic@users.noreply.github.com> Co-authored-by: MrMelbert <51863163+MrMelbert@users.noreply.github.com> Co-authored-by: Rhials <28870487+Rhials@users.noreply.github.com> Co-authored-by: rageguy505 <54517726+rageguy505@users.noreply.github.com> Co-authored-by: LemonInTheDark <58055496+LemonInTheDark@users.noreply.github.com> Co-authored-by: John Willard <53777086+JohnFulpWillard@users.noreply.github.com> Co-authored-by: Aliceee2ch <160794176+Aliceee2ch@users.noreply.github.com> Co-authored-by: Time-Green <7501474+Time-Green@users.noreply.github.com> Co-authored-by: Tsar-Salat <62388554+Tsar-Salat@users.noreply.github.com> Co-authored-by: SmArtKar <44720187+SmArtKar@users.noreply.github.com> Co-authored-by: Maxipat <108554989+Maxipat112@users.noreply.github.com> Co-authored-by: SyncIt21 <110812394+SyncIt21@users.noreply.github.com> Co-authored-by: deltanedas <39013340+deltanedas@users.noreply.github.com> Co-authored-by: SimplyLogan <47579821+loganuk@users.noreply.github.com> Co-authored-by: loganuk <fakeemail123@aol.com> Co-authored-by: Leland Kemble <70413276+lelandkemble@users.noreply.github.com> Co-authored-by: FalloutFalcon <86381784+FalloutFalcon@users.noreply.github.com> Co-authored-by: Roxy <75404941+TealSeer@users.noreply.github.com> Co-authored-by: Lucy <lucy@absolucy.moe> Co-authored-by: siliconOpossum <138069572+siliconOpossum@users.noreply.github.com> Co-authored-by: Isratosh <Isratosh@hotmail.com> Co-authored-by: TheRyeGuyWhoWillNowDie <70169560+TheRyeGuyWhoWillNowDie@users.noreply.github.com> Co-authored-by: Neocloudy <88008002+Neocloudy@users.noreply.github.com> Co-authored-by: Alexander V. <volas@ya.ru> Co-authored-by: ElGitificador <168473461+ElGitificador@users.noreply.github.com> Co-authored-by: Twaticus <46540570+Twaticus@users.noreply.github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Bloop <13398309+vinylspiders@users.noreply.github.com> Co-authored-by: Cameron Lennox <killer65311@gmail.com> Co-authored-by: Tim <timothymtorres@gmail.com> Co-authored-by: Iamgoofball <iamgoofball@gmail.com> Co-authored-by: Layzu666 <121319428+Layzu666@users.noreply.github.com> Co-authored-by: Arturlang <24881678+Arturlang@users.noreply.github.com> Co-authored-by: _0Steven <42909981+00-Steven@users.noreply.github.com> Co-authored-by: mrmanlikesbt <99309552+mrmanlikesbt@users.noreply.github.com> Co-authored-by: Ben10Omintrix <138636438+Ben10Omintrix@users.noreply.github.com> Co-authored-by: John F. Kennedy <54908920+MacaroniCritter@users.noreply.github.com> Co-authored-by: Cursor <102828457+theselfish@users.noreply.github.com> Co-authored-by: Josh <josh.adam.powell@gmail.com> Co-authored-by: Josh Powell <josh.powell@softwire.com> Co-authored-by: Yobrocharlie <Charliemiller5617@gmail.com> Co-authored-by: Hardly3D <66234359+Hardly3D@users.noreply.github.com> Co-authored-by: shayoki <96078776+shayoki@users.noreply.github.com> Co-authored-by: LT3 <83487515+lessthnthree@users.noreply.github.com>
83 lines
3.5 KiB
Plaintext
83 lines
3.5 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_growth"] = my_raptor.growth_progress
|
|
scan_data["can_grow"] = my_raptor.growth_stage != RAPTOR_ADULT
|
|
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
|
|
|
|
/datum/computer_file/program/raptordex/on_made_active_program(mob/user)
|
|
RegisterSignal(computer, COMSIG_ITEM_REQUESTING_CONTEXT_FOR_TARGET, PROC_REF(add_item_context))
|
|
computer.item_flags |= ITEM_HAS_CONTEXTUAL_SCREENTIPS
|
|
|
|
/datum/computer_file/program/raptordex/background_program(mob/user)
|
|
. = ..()
|
|
UnregisterSignal(computer, COMSIG_ITEM_REQUESTING_CONTEXT_FOR_TARGET)
|
|
|
|
/datum/computer_file/program/raptordex/kill_program(mob/user)
|
|
. = ..()
|
|
UnregisterSignal(computer, COMSIG_ITEM_REQUESTING_CONTEXT_FOR_TARGET)
|
|
|
|
/datum/computer_file/program/raptordex/proc/add_item_context(obj/item/source, list/context, atom/target, mob/living/user)
|
|
SIGNAL_HANDLER
|
|
if(!istype(target, /mob/living/basic/raptor))
|
|
return NONE
|
|
context[SCREENTIP_CONTEXT_RMB] = "Scan Raptor"
|
|
return CONTEXTUAL_SCREENTIP_SET
|