[MIRROR] Protean updates [could use code review] (#11793)

Co-authored-by: Asher 49 <asherdehanna@gmail.com>
Co-authored-by: C.L. <killer65311@gmail.com>
This commit is contained in:
CHOMPStation2StaffMirrorBot
2025-10-08 14:29:06 -07:00
committed by GitHub
parent 4617345436
commit bc4d75fcb7
5 changed files with 101 additions and 46 deletions

View File

@@ -48,17 +48,17 @@
player_msg = "In this form, your health will regenerate as long as you have metal in you."
can_buckle = 1
buckle_lying = 1
can_buckle = TRUE
buckle_lying = TRUE
mount_offset_x = 0
mount_offset_y = 0
has_hands = 1
shock_resist = 1
nameset = 1
has_hands = TRUE
shock_resist = TRUE
nameset = TRUE
holder_type = /obj/item/holder/protoblob
var/hiding = 0
vore_icons = 1
vore_active = 1
var/hiding = FALSE
vore_icons = TRUE
vore_active = TRUE
plane = ABOVE_MOB_PLANE //Necessary for overlay based icons
@@ -791,6 +791,15 @@
I.layer = MOB_LAYER
add_overlay(I)
qdel(I)
I = image(icon, "[S.dullahan_overlays[7]][resting? "-rest" : (vore_fullness? "-[vore_fullness]" : null)]", pixel_x = -16)
I.color = S.dullahan_overlays[S.dullahan_overlays[7]]
I.appearance_flags |= (RESET_COLOR|PIXEL_SCALE)
I.plane = MOB_PLANE
I.layer = MOB_LAYER
add_overlay(I)
qdel(I)
//You know technically I could just put all the icons into the 128x64.dmi file and off-set them to fit..
if(S.blob_appearance in wide_icons)
icon = 'icons/mob/species/protean/protean64x32.dmi'

View File

@@ -410,7 +410,7 @@
"panther" = image(icon = 'icons/mob/species/protean/protean64x64.dmi', icon_state = "panther", pixel_x = -16),
"robodrgn" = image(icon = 'icons/mob/species/protean/protean128x64.dmi', icon_state = "robodrgn", pixel_x = -48),
"Dragon" = image(icon = 'icons/mob/bigdragon_small.dmi', icon_state = "dragon_small"),
"dullahan" = image(icon = 'icons/mob/robot/dullahan/v1/dullahanicon.dmi', icon_state = "proticon")
"Dullahan" = image(icon = 'icons/mob/robot/dullahan/v1/dullahanicon.dmi', icon_state = "proticon")
//CHOMPEnable End
)
var/blobstyle = show_radial_menu(protie, protie, icon_choices, require_near = TRUE, tooltips = FALSE)
@@ -532,8 +532,8 @@
S.dragon_overlays[6] = choice
S.dragon_overlays[S.dragon_overlays[6]] = new_color
S.blob_appearance = "dragon"
if("dullahan") //START OF DULLAHAN PORT.
var/list/options = list("Metalshell","Eyes","Decals","Import","Export")
if("Dullahan") //START OF DULLAHAN PORT.
var/list/options = list("Metalshell","Head","Eyes","Lights","Clothes","Import","Export")
for(var/option in options)
LAZYSET(options, option, image('icons/mob/robot/dullahan/v1/dullahansigns.dmi', option))
var/choice = show_radial_menu(protie, protie, options, radius = 60)
@@ -549,19 +549,29 @@
var/list/dullahaneyes_styles = list(
"dullahaneyes"
)
var/list/dullahandecals_styles = list(
"dullahandecals",
"dullahandecals1",
"dullahandecals2",
"dullahandecals3",
"dullahandecals4",
"dullahandecals5",
"emptydecals"
var/list/dullahanlights_styles = list(
"dullahanlightsempty",
"dullahanlights",
"dullahanwings",
"dullahanlights2",
"dullahanwings2",
"dullahanwings3"
)
var/list/dullahanhead_styles = list(
"dullahanhead",
"dullahanhead2"
)
var/list/dullahanclothes_styles = list(
"dullahanclothesempty",
"dullahanclothes",
"dullahanclothes2",
"dullahanengibreastplate"
)
var/dmetal
var/ddecals
var/dlights
var/deyes
var/ddecalscolor
var/dlightscolor
var/dclothescolor
var/deyescolor
var/dmetalcolor
switch(choice)
@@ -594,30 +604,57 @@
choice = show_radial_menu(protie, protie, options, radius = 90)
if(!choice || QDELETED(protie) || protie.incapacitated())
return 0
var/new_color = tgui_color_picker(protie, "Pick eye color:","Eye Color", S.dullahan_overlays[4])
var/new_color = tgui_color_picker(protie, "Pick eye color:","Eye Color", S.dullahan_overlays[2])
if(!new_color)
return 0
S.dullahan_overlays[4] = choice
S.dullahan_overlays[S.dullahan_overlays[4]] = new_color
if("Decals")
options = dullahandecals_styles
S.dullahan_overlays[2] = choice
S.dullahan_overlays[S.dullahan_overlays[2]] = new_color
if("Lights")
options = dullahanlights_styles
for(var/option in options)
var/image/I = image('icons/mob/robot/dullahan/v1/Dullahanprotean64x64.dmi', option, dir = 2, pixel_x = -16, pixel_y = -16)
LAZYSET(options, option, I)
choice = show_radial_menu(protie, protie, options, radius = 90)
if(!choice || QDELETED(protie) || protie.incapacitated())
return 0
var/new_color = tgui_color_picker(protie, "Pick decal color:","Decal Color", S.dullahan_overlays[5])
var/new_color = tgui_color_picker(protie, "Pick light color:","Lights Color", S.dullahan_overlays[5])
if(!new_color)
return 0
S.dullahan_overlays[5] = choice
S.dullahan_overlays[S.dullahan_overlays[5]] = new_color
if("Clothes")
options = dullahanclothes_styles
for(var/option in options)
var/image/I = image('icons/mob/robot/dullahan/v1/Dullahanprotean64x64.dmi', option, dir = 2, pixel_x = -16, pixel_y = -16)
LAZYSET(options, option, I)
choice = show_radial_menu(protie, protie, options, radius = 90)
if(!choice || QDELETED(protie) || protie.incapacitated())
return 0
var/new_color ="#FFFFFF"
if (choice == "dullahanclothesempty" || choice == "dullahanengibreastplate" || choice == "dullahanclothes2" || choice =="dullahanclothes")
// clothes empty and breastplate have only white as a color
new_color = "#FFFFFF"
else
new_color = tgui_color_picker(protie, "Pick clothes color:","Clothes Color", S.dullahan_overlays[7])
if(!new_color)
return 0
S.dullahan_overlays[7] = choice //clothes overlay is 7
S.dullahan_overlays[S.dullahan_overlays[7]] = new_color
if("Head")
options = dullahanhead_styles
for(var/option in options)
var/image/I = image('icons/mob/robot/dullahan/v1/Dullahanprotean64x64.dmi', option, dir = 2, pixel_x = -16, pixel_y = -16)
LAZYSET(options, option, I)
choice = show_radial_menu(protie, protie, options, radius = 90)
if(!choice || QDELETED(protie) || protie.incapacitated())
return 0
S.dullahan_overlays[4] = choice //head overlay is 2
if("Import")
var/dinput_style
dinput_style = sanitizeSafe(tgui_input_text(protie,"Paste the style string you exported with Export Style.", "Style loading","", 120, encode = FALSE), 128)
if(dinput_style)
var/list/dinput_style_list = splittext(dinput_style, ";")
if((LAZYLEN(dinput_style_list) == 6) && (dinput_style_list[1] in dullahanmetal_styles) && (dinput_style_list[3] in dullahandecals_styles) && (dinput_style_list[5] in dullahaneyes_styles))
if((LAZYLEN(dinput_style_list) == 7) && (dinput_style_list[1] in dullahanmetal_styles) && (dinput_style_list[3] in dullahanlights_styles) && (dinput_style_list[5] in dullahaneyes_styles) && (dinput_style_list[7] in dullahanmetal_styles))
try
if(dinput_style_list[1] in dullahanmetal_styles)
S.dullahan_overlays[3] = dinput_style_list[1]
@@ -630,27 +667,35 @@
catch
dmetal = dinput_style_list[1]
try
if(dinput_style_list[3] in dullahandecals_styles)
if(dinput_style_list[3] in dullahanlights_styles)
S.dullahan_overlays[5] = dinput_style_list[3]
if(rgb2num(dinput_style_list[4]))
S.dullahan_overlays[S.dullahan_overlays[5]] = dinput_style_list[4] // decals color
S.dullahan_overlays[S.dullahan_overlays[5]] = dinput_style_list[4] // lights color
catch
ddecals = dinput_style_list[3]
dlights = dinput_style_list[3]
try
if(dinput_style_list[5] in dullahaneyes_styles)
S.dullahan_overlays[4] = dinput_style_list[5]
S.dullahan_overlays[2] = dinput_style_list[5]
if(rgb2num(dinput_style_list[6]))
S.dullahan_overlays[S.dullahan_overlays[4]] = dinput_style_list[6] //eyes color
S.dullahan_overlays[S.dullahan_overlays[2]] = dinput_style_list[6] //eyes color
catch
ddecals = dinput_style_list[5]
dlights = dinput_style_list[5]
try
if(dinput_style_list[7] in dullahanclothes_styles)
S.dullahan_overlays[7] = dinput_style_list[7]
if(rgb2num(dinput_style_list[7]))
S.dullahan_overlays[S.dullahan_overlays[7]] = dinput_style_list[7] //clothes color
catch
dlights = dinput_style_list[5]
if("Export")
dmetal = S.dullahan_overlays[3]
ddecals = S.dullahan_overlays[5]
deyes = S.dullahan_overlays[4]
dlights = S.dullahan_overlays[5]
deyes = S.dullahan_overlays[2]
dmetalcolor = S.dullahan_overlays[S.dullahan_overlays[3]]
ddecalscolor = S.dullahan_overlays[S.dullahan_overlays[5]]
deyescolor = S.dullahan_overlays[S.dullahan_overlays[4]]
var/output_style = jointext(list(dmetal,dmetalcolor,ddecals,ddecalscolor,deyes,deyescolor), ";")
dlightscolor = S.dullahan_overlays[S.dullahan_overlays[5]]
dclothescolor = S.dullahan_overlays[S.dullahan_overlays[7]]
deyescolor = S.dullahan_overlays[S.dullahan_overlays[2]]
var/output_style = jointext(list(dmetal,dmetalcolor,dlights,dlightscolor,deyes,deyescolor,dclothescolor), ";")
to_chat(protie, span_notice("Exported style string is \" [output_style] \". Use this to get the same style in the future with import style"))
S.blob_appearance = "dullahan" //END OF DULLAHAN PORT.
if("Primary")

View File

@@ -128,13 +128,14 @@
"dragon_eyesNormal" = "#FFFFFF"
)
var/list/dullahan_overlays = list(
"dullahanbody" = "#FFFFFF",
"dullahanhead" = "#FFFFFF",
"dullahanmetal" = "#FFFFFF",
"dullahaneyes" = "#FFFFFF",
"dullahandecals" = "#FFFFFF",
"dullahanextended" = "#FFFFFF"
// loads the icons from the DMI file in that order on spawn. they are overlay 1-6.
"dullahanbody" = "#FFFFFF", // body 1
"dullahanhead" = "#FFFFFF", // head 4
"dullahanmetal" = "#FFFFFF", // metal 3
"dullahaneyes" = "#FFFFFF", // eyes 2
"dullahanlightsempty" = "#FFFFFF", // lights 5
"dullahanextended" = "#FFFFFF", // breastplate part only on 6, do not use for anything else
"dullahanclothesempty" = "#FFFFFF" // clothes 7
// loads the icons from the DMI file in that order on spawn. they are overlay 1-6. specifically it uses those names in the DMI file.
)
var/pseudodead = 0

Binary file not shown.

Before

Width:  |  Height:  |  Size: 12 KiB

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 428 B

After

Width:  |  Height:  |  Size: 576 B