Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pAI Tweaks, Holochassis, & Radials #2643

Merged
Merged
Show file tree
Hide file tree
Changes from 6 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion code/game/objects/items/stacks/tape.dm
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
/obj/item/stack/sticky_tape/super
name = "super sticky tape"
singular_name = "super sticky tape"
desc = "Quite possibly the most mischevious substance in the galaxy. Use with extreme lack of caution."
desc = "Quite possibly the most mischievous substance in the galaxy. Use with extreme lack of caution."
icon_state = "tape_y"
prefix = "super sticky"
conferred_embed = EMBED_HARMLESS_SUPERIOR
Expand Down
2 changes: 1 addition & 1 deletion code/modules/mob/living/silicon/pai/pai.dm
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@
var/can_receive = TRUE
var/obj/item/card/id/access_card = null
var/chassis = "repairbot"
var/list/possible_chassis = list("cat" = TRUE, "mouse" = TRUE, "monkey" = TRUE, "corgi" = FALSE, "fox" = FALSE, "repairbot" = TRUE, "rabbit" = TRUE, "bat" = FALSE, "butterfly" = FALSE, "hawk" = FALSE, "lizard" = FALSE, "duffel" = TRUE, "snake" = FALSE) //assoc value is whether it can be picked up.
var/list/possible_chassis = list("bat" = TRUE, "bee" = TRUE, "butterfly" = TRUE, "carp" = TRUE, "cat" = TRUE, "corgi" = TRUE, "corgi_puppy" = TRUE, "crow" = TRUE, "duffel" = TRUE, "fox" = TRUE, "frog" = TRUE, "hawk" = TRUE, "lizard" = TRUE, "monkey" = TRUE, "mothroach" = TRUE, "mouse" = TRUE, "mushroom" = TRUE, "phantom" = TRUE, "rabbit" = TRUE, "repairbot" = TRUE, "snake" = TRUE, "spider" = TRUE) //assoc value is whether it can be picked up.

var/emitterhealth = 20
var/emittermaxhealth = 20
Expand Down
27 changes: 23 additions & 4 deletions code/modules/mob/living/silicon/pai/pai_shell.dm
Original file line number Diff line number Diff line change
Expand Up @@ -72,11 +72,18 @@
holoform = FALSE
set_resting(resting)


//Sets a new holochassis skin based on a pAI's choice

/mob/living/silicon/pai/proc/choose_chassis()
if(!isturf(loc) && loc != card)
to_chat(src, "<span class='boldwarning'>You can not change your holochassis composite while not on the ground or in your card!</span>")
return FALSE
var/choice = input(src, "What would you like to use for your holochassis composite?") as null|anything in sortList(possible_chassis)
var/list/skins = list()
for(var/holochassis_option in possible_chassis)
var/image/item_image = image(icon = src.icon, icon_state = holochassis_option)
skins += list("[holochassis_option]" = item_image)
sortList(skins)

var/atom/anchor = get_atom_on_turf(src)
var/choice = show_radial_menu(src, anchor, skins, custom_check = CALLBACK(src, .proc/check_menu, anchor), radius = 40, require_near = TRUE)
Skies-Of-Blue marked this conversation as resolved.
Show resolved Hide resolved
if(!choice)
return FALSE
chassis = choice
Expand All @@ -85,6 +92,18 @@
update_resting()
to_chat(src, "<span class='boldnotice'>You switch your holochassis projection composite to [chassis].</span>")

//Checks if we are allowed to interact with a radial menu

/mob/living/silicon/pai/proc/check_menu(atom/anchor)
if(incapacitated())
return FALSE
if(get_turf(src) != get_turf(anchor))
return FALSE
if(!isturf(loc) && loc != card)
to_chat(src, "<span class='boldwarning'>You can not change your holochassis composite while not on the ground or in your card!</span>")
return FALSE
return TRUE

/mob/living/silicon/pai/update_resting()
. = ..()
if(resting)
Expand Down
53 changes: 51 additions & 2 deletions code/modules/mob/living/silicon/pai/software.dm
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ GLOBAL_LIST_INIT(pai_faces, list(
"laugh",
"lenny",
"loss",
"michevious",
"mischievous",
"missingno",
"mistake",
"moth",
Expand All @@ -53,6 +53,54 @@ GLOBAL_LIST_INIT(pai_faces, list(
"woozy",
))

GLOBAL_LIST_INIT(pai_faces_icons, list(
":>" = image(icon = 'icons/obj/aicards.dmi', icon_state = "pai-:>"),
"=_=" = image(icon = 'icons/obj/aicards.dmi', icon_state = "pai-=_="),
"angry" = image(icon = 'icons/obj/aicards.dmi', icon_state = "pai-angry"),
"ashamed" = image(icon = 'icons/obj/aicards.dmi', icon_state = "pai-ashamed"),
"bookworm" = image(icon = 'icons/obj/aicards.dmi', icon_state = "pai-bookworm"),
"boykisser" = image(icon = 'icons/obj/aicards.dmi', icon_state = "pai-boykisser"),
"cat" = image(icon = 'icons/obj/aicards.dmi', icon_state = "pai-cat"),
"clueless" = image(icon = 'icons/obj/aicards.dmi', icon_state = "pai-clueless"),
"concerned" = image(icon = 'icons/obj/aicards.dmi', icon_state = "pai-concerned"),
"dread" = image(icon = 'icons/obj/aicards.dmi', icon_state = "pai-dread"),
"estatic" = image(icon = 'icons/obj/aicards.dmi', icon_state = "pai-estatic"),
"exclaim" = image(icon = 'icons/obj/aicards.dmi', icon_state = "pai-exclaim"),
"eye" = image(icon = 'icons/obj/aicards.dmi', icon_state = "pai-eye"),
"eyewall" = image(icon = 'icons/obj/aicards.dmi', icon_state = "pai-eyewall"),
"face" = image(icon = 'icons/obj/aicards.dmi', icon_state = "pai-face"),
"fangs" = image(icon = 'icons/obj/aicards.dmi', icon_state = "pai-fangs"),
"flushed" = image(icon = 'icons/obj/aicards.dmi', icon_state = "pai-flushed"),
"foureyes" = image(icon = 'icons/obj/aicards.dmi', icon_state = "pai-foureyes"),
"greenjary" = image(icon = 'icons/obj/aicards.dmi', icon_state = "pai-greenjary"),
"happy" = image(icon = 'icons/obj/aicards.dmi', icon_state = "pai-happy"),
"heart" = image(icon = 'icons/obj/aicards.dmi', icon_state = "pai-heart"),
"laugh" = image(icon = 'icons/obj/aicards.dmi', icon_state = "pai-laugh"),
"lenny" = image(icon = 'icons/obj/aicards.dmi', icon_state = "pai-lenny"),
"loss" = image(icon = 'icons/obj/aicards.dmi', icon_state = "pai-loss"),
"mischievous" = image(icon = 'icons/obj/aicards.dmi', icon_state = "pai-mischievous"),
"missingno" = image(icon = 'icons/obj/aicards.dmi', icon_state = "pai-missingno"),
"mistake" = image(icon = 'icons/obj/aicards.dmi', icon_state = "pai-mistake"),
"moth" = image(icon = 'icons/obj/aicards.dmi', icon_state = "pai-moth"),
"moyai" = image(icon = 'icons/obj/aicards.dmi', icon_state = "pai-moyai"),
"neko" = image(icon = 'icons/obj/aicards.dmi', icon_state = "pai-neko"),
"null" = image(icon = 'icons/obj/aicards.dmi', icon_state = "pai-null"),
"o.o" = image(icon = 'icons/obj/aicards.dmi', icon_state = "pai-o.o"),
"off" = image(icon = 'icons/obj/aicards.dmi', icon_state = "pai-off"),
"pleading" = image(icon = 'icons/obj/aicards.dmi', icon_state = "pai-pleading"),
"question" = image(icon = 'icons/obj/aicards.dmi', icon_state = "pai-question"),
"sadcat" = image(icon = 'icons/obj/aicards.dmi', icon_state = "pai-sadcat"),
"smug" = image(icon = 'icons/obj/aicards.dmi', icon_state = "pai-smug"),
"snek" = image(icon = 'icons/obj/aicards.dmi', icon_state = "pai-snek"),
"spiral" = image(icon = 'icons/obj/aicards.dmi', icon_state = "pai-spiral"),
"sunglasses" = image(icon = 'icons/obj/aicards.dmi', icon_state = "pai-sunglasses"),
"syndisnake" = image(icon = 'icons/obj/aicards.dmi', icon_state = "pai-syndisnake"), //what if cybersun was right all along actually
"twoeyes" = image(icon = 'icons/obj/aicards.dmi', icon_state = "pai-twoeyes"),
"T_T" = image(icon = 'icons/obj/aicards.dmi', icon_state = "pai-T_T"),
"what" = image(icon = 'icons/obj/aicards.dmi', icon_state = "pai-what"),
"wink" = image(icon = 'icons/obj/aicards.dmi', icon_state = "pai-wink"),
"woozy" = image(icon = 'icons/obj/aicards.dmi', icon_state = "pai-woozy"),
))

/mob/living/silicon/pai/var/list/available_software = list( //WS -- idk what to do about removing code so i'm just putting this note here to say, removes messanger and manifest, thet get it for free now
//Nightvision
Expand Down Expand Up @@ -204,7 +252,8 @@ GLOBAL_LIST_INIT(pai_faces, list(
radio.attack_self(src)

if("image") // Set pAI card display face
var/new_emotion = input("Select your new display image.", "Display Image", "null") in sortList(GLOB.pai_faces)
var/atom/anchor = get_atom_on_turf(src)
var/new_emotion = show_radial_menu(usr, anchor, GLOB.pai_faces_icons, radius = 40, require_near = TRUE)
card.set_emotion(new_emotion)

if("news")
Expand Down
Binary file modified icons/mob/pai.dmi
Binary file not shown.
Binary file modified icons/mob/pai_item_head.dmi
Binary file not shown.
Binary file modified icons/mob/pai_item_lh.dmi
Binary file not shown.
Binary file modified icons/mob/pai_item_rh.dmi
Binary file not shown.
Binary file modified icons/obj/aicards.dmi
Binary file not shown.
Loading