From 468c0a296e80a2d40c40a30b4c605c1227a24579 Mon Sep 17 00:00:00 2001 From: Raeschen Date: Wed, 18 Aug 2021 08:52:00 +0200 Subject: [PATCH] separate to _ch file --- code/modules/vore/resizing/holder_micro_ch.dm | 34 ++++++++++++++++++ code/modules/vore/resizing/holder_micro_vr.dm | 35 ------------------- vorestation.dme | 1 + 3 files changed, 35 insertions(+), 35 deletions(-) create mode 100644 code/modules/vore/resizing/holder_micro_ch.dm diff --git a/code/modules/vore/resizing/holder_micro_ch.dm b/code/modules/vore/resizing/holder_micro_ch.dm new file mode 100644 index 0000000000..ea97ac3e2c --- /dev/null +++ b/code/modules/vore/resizing/holder_micro_ch.dm @@ -0,0 +1,34 @@ +// Adds support to show teshari in-hand sprites when grabbing tesh +// Uses 'white plush' inhand/onback sprites +// Overrides the make_worn_icon to inject skin color setting on the sprite +// without changing the color of the icon in the hand slot +/obj/item/weapon/holder/micro/Initialize(mapload, mob/held) + . = ..() + var/mob/living/carbon/human/H = held_mob + if(H.species.name == SPECIES_TESHARI) + item_icons = list( + slot_l_hand_str = 'icons/mob/items/lefthand_toys_yw.dmi', + slot_r_hand_str = 'icons/mob/items/righthand_toys_yw.dmi', + slot_back_str = 'icons/mob/toy_worn_yw.dmi', + slot_head_str = 'icons/mob/toy_worn_yw.dmi') + + // Leaving the following two set makes the sprite not visible + icon_override = null + sprite_sheets = null + icon_state = "teshariplushie_white" + item_state = "teshariplushie_white" + // Add back slot + slot_flags = SLOT_FEET | SLOT_HEAD | SLOT_ID | SLOT_BACK + +/obj/item/weapon/holder/micro/make_worn_icon(var/body_type,var/slot_name,var/inhands,var/default_icon,var/default_layer,var/icon/clip_mask = null) + var/mob/living/carbon/human/H = held_mob + // Only proceed if dealing with a tesh + if ( H.species.name == SPECIES_TESHARI ) + var/colortemp = color //save original color var to a temp var + //convert numerical RGB to Hex #000000 format - is this necessary? + //then 'inject' changed color (from skin color) into original proc call + color = addtext("#", num2hex(H.r_skin, 2), num2hex(H.g_skin, 2), num2hex(H.b_skin, 2)) + . = ..() + color = colortemp //reset color var to it's old value after original proc call before proceeding - otherwise we change hand-slot icon color too! + else + . = ..() diff --git a/code/modules/vore/resizing/holder_micro_vr.dm b/code/modules/vore/resizing/holder_micro_vr.dm index 5f0c2d9639..9b4f6d8d34 100644 --- a/code/modules/vore/resizing/holder_micro_vr.dm +++ b/code/modules/vore/resizing/holder_micro_vr.dm @@ -53,38 +53,3 @@ return E.hatch(held) return - -// CHOMPEdit START -// Adds support to show teshari in-hand sprites when grabbing tesh -// Uses 'white plush' inhand/onback sprites -// Overrides the make_worn_icon to inject skin color setting on the sprite -// without changing the color of the icon in the hand slot -/obj/item/weapon/holder/micro/Initialize(mapload, mob/held) - . = ..() - var/mob/living/carbon/human/H = held_mob - if(H.species.name == SPECIES_TESHARI) - item_icons = list( - slot_l_hand_str = 'icons/mob/items/lefthand_toys_yw.dmi', - slot_r_hand_str = 'icons/mob/items/righthand_toys_yw.dmi', - slot_back_str = 'icons/mob/toy_worn_yw.dmi', - slot_head_str = 'icons/mob/toy_worn_yw.dmi') - - // Leaving the following two set makes the sprite not visible - icon_override = null - sprite_sheets = null - icon_state = "teshariplushie_white" - item_state = "teshariplushie_white" - // Add back slot - slot_flags = SLOT_FEET | SLOT_HEAD | SLOT_ID | SLOT_BACK - -/obj/item/weapon/holder/micro/make_worn_icon(var/body_type,var/slot_name,var/inhands,var/default_icon,var/default_layer,var/icon/clip_mask = null) - var/mob/living/carbon/human/H = held_mob - // Only proceed if dealing with a tesh, and the color var is unset - if ( (!color || color == "") && (H.species.name == SPECIES_TESHARI) ) - var/colortemp = color - color = addtext("#", num2hex(H.r_skin, 2), num2hex(H.g_skin, 2), num2hex(H.b_skin, 2)) //convert numerical RGB to Hex #000000 format - is this necessary? - . = ..() - color = colortemp //reset color var to it's old value before proceeding - else - . = ..() -// CHOMPEdit END \ No newline at end of file diff --git a/vorestation.dme b/vorestation.dme index 7c1437c601..e670673005 100644 --- a/vorestation.dme +++ b/vorestation.dme @@ -4214,6 +4214,7 @@ #include "code\modules\vore\fluffstuff\MadokaSpear.dm" #include "code\modules\vore\persist\persist_vr.dm" #include "code\modules\vore\resizing\grav_pull_vr.dm" +#include "code\modules\vore\resizing\holder_micro_ch.dm" #include "code\modules\vore\resizing\holder_micro_vr.dm" #include "code\modules\vore\resizing\resize_vr.dm" #include "code\modules\vore\resizing\sizegun_vr.dm"