forked from SierraBay/SierraBay12
-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
1c1850d
commit a315689
Showing
9 changed files
with
132 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
/obj/item/holder/human | ||
icon = 'mods/resomi_fd/icons/holder_complex.dmi' | ||
var/list/generate_for_slots = list(slot_l_hand_str, slot_r_hand_str, slot_back_str) | ||
w_class = ITEM_SIZE_LARGE | ||
slot_flags = SLOT_BACK | ||
|
||
/obj/item/holder/human/sync(mob/living/M) | ||
// Generate appropriate on-mob icons. | ||
var/mob/living/carbon/human/owner = M | ||
if(istype(owner) && owner.species) | ||
|
||
var/skin_colour = owner.skin_color | ||
var/hair_colour = owner.head_hair_color | ||
var/eye_colour = owner.eye_color | ||
var/species_name = lowertext(owner.species.get_bodytype(owner)) | ||
|
||
for(var/cache_entry in generate_for_slots) | ||
var/cache_key = "[owner.species]-[cache_entry]-[skin_colour]-[hair_colour]" | ||
if(!holder_mob_icon_cache[cache_key]) | ||
|
||
// Generate individual icons. | ||
var/icon/mob_icon = icon(icon, "[species_name]_holder_[cache_entry]_base") | ||
mob_icon.Blend(skin_colour, ICON_ADD) | ||
var/icon/hair_icon = icon(icon, "[species_name]_holder_[cache_entry]_hair") | ||
hair_icon.Blend(hair_colour, ICON_ADD) | ||
var/icon/eyes_icon = icon(icon, "[species_name]_holder_[cache_entry]_eyes") | ||
eyes_icon.Blend(eye_colour, ICON_ADD) | ||
|
||
// Blend them together. | ||
mob_icon.Blend(eyes_icon, ICON_OVERLAY) | ||
mob_icon.Blend(hair_icon, ICON_OVERLAY) | ||
|
||
// Add to the cache. | ||
holder_mob_icon_cache[cache_key] = mob_icon | ||
item_icons[cache_entry] = holder_mob_icon_cache[cache_key] | ||
|
||
// Handle the rest of sync(). | ||
..(M) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
Binary file not shown.
Binary file not shown.