-
Notifications
You must be signed in to change notification settings - Fork 275
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
adds support for arbitrary amounts of color zones on mutant overlays
- Loading branch information
Showing
14 changed files
with
197 additions
and
120 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
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 modified
BIN
+146 Bytes
(100%)
monkestation/code/modules/the_bird_inside_of_me/icons/armwings.dmi
Binary file not shown.
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
43 changes: 43 additions & 0 deletions
43
monkestation/code/modules/the_fabled_dna_changes/multi_colored_bodyoverlay.dm
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,43 @@ | ||
/datum/bodypart_overlay/mutant/get_overlay(layer, obj/item/bodypart/limb) | ||
inherit_color(limb) | ||
layer = bitflag_to_layer(layer) | ||
if(sprite_datum.layers) | ||
var/mutable_appearance/MA = mutable_appearance(layer = layer) | ||
for(var/state in sprite_datum.layers) | ||
var/mutable_appearance/returned = get_image(layer, limb, state) | ||
color_image(returned, layer, limb, sprite_datum.layers[state]) | ||
MA.overlays += returned | ||
return MA | ||
else | ||
. = get_image(layer, limb) | ||
color_image(., layer, limb) | ||
|
||
///Get the image we need to draw on the person. Called from get_overlay() which is called from _bodyparts.dm. Limb can be null | ||
/datum/bodypart_overlay/mutant/get_image(image_layer, obj/item/bodypart/limb, layer_name) | ||
if(!sprite_datum) | ||
CRASH("Trying to call get_image() on [type] while it didn't have a sprite_datum. This shouldn't happen, report it as soon as possible.") | ||
|
||
var/gender = (limb?.limb_gender == FEMALE) ? "f" : "m" | ||
var/list/icon_state_builder = list() | ||
icon_state_builder += sprite_datum.gender_specific ? gender : "m" //Male is default because sprite accessories are so ancient they predate the concept of not hardcoding gender | ||
if(layer_name) | ||
icon_state_builder += layer_name | ||
icon_state_builder += feature_key | ||
icon_state_builder += get_base_icon_state() | ||
icon_state_builder += mutant_bodyparts_layertext(image_layer) | ||
|
||
var/finished_icon_state = icon_state_builder.Join("_") | ||
|
||
var/mutable_appearance/appearance = mutable_appearance(sprite_datum.icon, finished_icon_state, layer = image_layer) | ||
|
||
if(sprite_datum.center) | ||
center_image(appearance, sprite_datum.dimension_x, sprite_datum.dimension_y) | ||
|
||
return appearance | ||
|
||
/datum/bodypart_overlay/mutant/color_image(image/overlay, layer, obj/item/bodypart/limb, key_name) | ||
if(!key_name) | ||
overlay.color = sprite_datum.color_src ? draw_color : null | ||
else | ||
var/datum/color_palette/located = limb?.owner?.dna?.color_palettes[palette] | ||
overlay.color = located.return_color(key_name, fallback_key) |
12 changes: 0 additions & 12 deletions
12
monkestation/code/modules/the_fabled_dna_changes/species_color_pallettes/generic_palette.dm
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 |
---|---|---|
@@ -1,23 +1,11 @@ | ||
/datum/color_palette/generic_colors | ||
var/hair_color | ||
var/facial_hair_color | ||
|
||
var/hair_gradient_color | ||
var/facial_hair_gradient_color | ||
|
||
//this is temporary until we move everything over to per species coloring | ||
var/mutant_color | ||
var/mutant_color_secondary | ||
var/fur_color | ||
|
||
/datum/color_palette/generic_colors/apply_prefs(datum/preferences/incoming) | ||
hair_color = incoming.read_preference(/datum/preference/color/hair_color) | ||
facial_hair_color = incoming.read_preference(/datum/preference/color/facial_hair_color) | ||
|
||
facial_hair_gradient_color = incoming.read_preference(/datum/preference/color/facial_hair_gradient) | ||
hair_gradient_color = incoming.read_preference(/datum/preference/color/hair_gradient) | ||
|
||
mutant_color = incoming.read_preference(/datum/preference/color/mutant_color) | ||
mutant_color_secondary = incoming.read_preference(/datum/preference/color/mutant_color_secondary) | ||
|
||
fur_color = incoming.read_preference(/datum/preference/color/fur_color) |
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
Oops, something went wrong.