mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-10 10:12:45 +00:00
separate to _ch file
This commit is contained in:
34
code/modules/vore/resizing/holder_micro_ch.dm
Normal file
34
code/modules/vore/resizing/holder_micro_ch.dm
Normal file
@@ -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
|
||||
. = ..()
|
||||
@@ -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
|
||||
@@ -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"
|
||||
|
||||
Reference in New Issue
Block a user