Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions code/__DEFINES/external_organs.dm
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,11 @@
///Uses the parent's haircolor
#define ORGAN_COLOR_HAIR (1<<2)

// BEGIN NON-MODULE CHANGE
// in a chain, inherit the mob's mutant color, a forced mutant color, before the true draw color
#define ORGAN_COLOR_MUTANT_OVERRIDE (1<<3)
// END NON-MODULE CHANGE

///Tail wagging
#define WAG_ABLE (1<<0)
#define WAG_WAGGING (1<<1)
Expand Down
4 changes: 4 additions & 0 deletions code/datums/bodypart_overlays/mutant_bodypart_overlay.dm
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,10 @@
if(isnull(draw_color) && ishuman(bodypart_owner.owner))
var/mob/living/carbon/human/human_owner = bodypart_owner.owner
draw_color = human_owner.hair_color
// BEGIN NON-MODULE CHANGE
if(ORGAN_COLOR_MUTANT_OVERRIDE)
draw_color = mutant_override_color(bodypart_owner)
// END NON-MODULE CHANGE

return TRUE

Expand Down
17 changes: 5 additions & 12 deletions code/modules/surgery/organs/external/_visual_organs.dm
Original file line number Diff line number Diff line change
Expand Up @@ -152,26 +152,19 @@ Unlike normal organs, we're actually inside a persons limbs at all times
/datum/bodypart_overlay/mutant/frills
layers = EXTERNAL_ADJACENT
feature_key = "frills"
color_source = ORGAN_COLOR_OVERRIDE
color_source = ORGAN_COLOR_MUTANT_OVERRIDE // NON-MODULE CHANGE

/datum/bodypart_overlay/mutant/frills/can_draw_on_bodypart(obj/item/bodypart/bodypart_owner)
return !(bodypart_owner.owner?.obscured_slots & HIDEEARS)

/datum/bodypart_overlay/mutant/frills/get_global_feature_list()
return SSaccessories.frills_list

/datum/bodypart_overlay/mutant/frills/override_color(obj/item/bodypart/bodypart_owner)
// BEGIN NON-MODULE CHANGE
/datum/bodypart_overlay/mutant/frills/mutant_override_color(obj/item/bodypart/bodypart_owner) // NOTE: this was originally in the slot of "override_color" but was changed to this.
// prioritize a specific color they have set
if(bodypart_owner?.owner?.dna?.features["lizard_frill_color"])
return bodypart_owner.owner.dna.features["lizard_frill_color"]
// then use body color if we should be mutant colored
if(isnull(bodypart_owner.owner) || HAS_TRAIT(bodypart_owner.owner, TRAIT_MUTANT_COLORS) || HAS_TRAIT(bodypart_owner, TRAIT_MUTANT_COLORS))
return bodypart_owner.draw_color
// then use forced color - for non-mutant-colored species, like piscinids
if(bodypart_owner?.owner?.dna?.features["forced_fish_color"])
return bodypart_owner.owner.dna.features["forced_fish_color"]
// then default to body color - though this will probably be skin color, some forced color, or pure white
return bodypart_owner.draw_color
return bodypart_owner?.owner?.dna?.features["lizard_frill_color"] || ..()
// END NON-MODULE CHANGE

/datum/bodypart_overlay/mutant/frills/generate_icon_cache(obj/item/bodypart/limb)
. = ..()
Expand Down
1 change: 1 addition & 0 deletions code/modules/surgery/organs/external/spines.dm
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
layers = EXTERNAL_ADJACENT|EXTERNAL_BEHIND
feature_key = "spines"
dyable = TRUE
color_source = ORGAN_COLOR_MUTANT_OVERRIDE // NON-MODULE CHANGE

/datum/bodypart_overlay/mutant/spines/get_global_feature_list()
return SSaccessories.spines_list
Expand Down
2 changes: 2 additions & 0 deletions code/modules/surgery/organs/external/tails.dm
Original file line number Diff line number Diff line change
Expand Up @@ -211,6 +211,7 @@
/datum/bodypart_overlay/mutant/tail/lizard
feature_key = "tail_lizard"
mesh_in_suits = TRUE
color_source = ORGAN_COLOR_MUTANT_OVERRIDE // NON-MODULE CHANGE

/datum/bodypart_overlay/mutant/tail/lizard/get_global_feature_list()
return SSaccessories.tails_list_lizard
Expand All @@ -227,6 +228,7 @@
var/wagging = FALSE
/// Key for tail spine states, depends on the shape of the tail. Defined in the tail sprite datum.
var/tail_spine_key = NONE
color_source = ORGAN_COLOR_MUTANT_OVERRIDE // NON-MODULE CHANGE

/datum/bodypart_overlay/mutant/tail_spines/get_global_feature_list()
return SSaccessories.tail_spines_list
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -179,6 +179,7 @@
name = "dragon wings"
desc = "Hey, HEY- NOT lizard wings. Dragon wings. Mighty dragon wings."
sprite_accessory_override = /datum/sprite_accessory/wings/dragon
bodypart_overlay = /datum/bodypart_overlay/mutant/wings/functional/mutant_color // NON_MODULE CHANGE

///robotic wings, which relate to androids.
/obj/item/organ/wings/functional/robotic
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 2 additions & 0 deletions maplestation.dme
Original file line number Diff line number Diff line change
Expand Up @@ -6308,6 +6308,7 @@
#include "maplestation_modules\code\controllers\subsystem\pain_subsystem.dm"
#include "maplestation_modules\code\datums\dna.dm"
#include "maplestation_modules\code\datums\shuttles.dm"
#include "maplestation_modules\code\datums\bodypart_overlays\mutant_bodypart_overlay.dm"
#include "maplestation_modules\code\datums\brain_damage\split_personality.dm"
#include "maplestation_modules\code\datums\components\easy_ignite.dm"
#include "maplestation_modules\code\datums\components\knockoff_move.dm"
Expand Down Expand Up @@ -6715,6 +6716,7 @@
#include "maplestation_modules\code\modules\mob\living\carbon\human\species_types\animid\animid_dog.dm"
#include "maplestation_modules\code\modules\mob\living\carbon\human\species_types\animid\animid_fish.dm"
#include "maplestation_modules\code\modules\mob\living\carbon\human\species_types\animid\animid_fox.dm"
#include "maplestation_modules\code\modules\mob\living\carbon\human\species_types\animid\animid_lizard.dm"
#include "maplestation_modules\code\modules\mob\living\carbon\human\species_types\animid\animid_prefs.dm"
#include "maplestation_modules\code\modules\mob\living\carbon\human\species_types\animid\animid_rat.dm"
#include "maplestation_modules\code\modules\mob\living\carbon\human\species_types\synth\android.dm"
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
// used for additional stuff on mutant bodypart overlays

// used by "ORGAN_COLOR_MUTANT_OVERRIDE" but can also be used by other organs' color overrides
/datum/bodypart_overlay/mutant/proc/mutant_override_color(obj/item/bodypart/bodypart_owner)
// use body color if we should be mutant colored
if(isnull(bodypart_owner.owner) || HAS_TRAIT(bodypart_owner.owner, TRAIT_MUTANT_COLORS) || HAS_TRAIT(bodypart_owner, TRAIT_MUTANT_COLORS))
return bodypart_owner.draw_color
// first try to use forced color - for non-mutant-colored species, like piscinids
// then default to body color - though this will probably be skin color, some other forced color, or pure white
return bodypart_owner.owner.dna.features["forced_mut_color"] || bodypart_owner.draw_color

// todo: figure out how on god's green earth functional wings even get their color, also refactor that part of the code and push it to TG
/datum/bodypart_overlay/mutant/wings/functional/mutant_color
color_source = ORGAN_COLOR_MUTANT_OVERRIDE
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,10 @@
return 3

/datum/preference/numeric/hiss_length/is_accessible(datum/preferences/preferences)
return ..() && ispath(preferences.read_preference(/datum/preference/choiced/species), /datum/species/lizard)
var/datum/species/target_species = preferences.read_preference(/datum/preference/choiced/species)
// lizard animids, are, for many reasons, a bit funky so i'll add an exception for them
var/species_check = (ispath(target_species, /datum/species/human/animid)) && (preferences.read_preference(/datum/preference/choiced/animid_type) == /datum/animid_type/lizard::id)
return ..() && (ispath(target_species::mutanttongue, /obj/item/organ/tongue/lizard) || species_check)

/datum/preference/numeric/hiss_length/apply_to_human(mob/living/carbon/human/target, value)
var/obj/item/organ/tongue/lizard/tongue = target.get_organ_slot(ORGAN_SLOT_TONGUE)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@

/datum/animid_type/fish/pre_species_gain(datum/species/human/animid/species, mob/living/carbon/human/new_animid)
// ensures we get mutant color rather than a random forced color
new_animid.dna?.features["forced_fish_color"] = new_animid.dna?.features["mcolor"]
new_animid.dna?.features["forced_mut_color"] = new_animid.dna?.features["mcolor"]

/datum/animid_type/fish/extra_feature_keys()
return list(/datum/preference/color/mutant_color::savefile_key)
Expand Down Expand Up @@ -95,7 +95,7 @@
. = ..()
RegisterSignal(owner, COMSIG_MOVABLE_MOVED, PROC_REF(check_location))
check_location(owner, null)
owner.dna.features["forced_fish_color"] ||= pick("#B4B8DD", "#85C7D0", "#67BBEE", "#2F4450", "#55CCBB", "#999FD0", "#345066", "#585B69", "#7381A0", "#B6DDE5", "#4E4E50")
owner.dna.features["forced_mut_color"] ||= pick("#B4B8DD", "#85C7D0", "#67BBEE", "#2F4450", "#55CCBB", "#999FD0", "#345066", "#585B69", "#7381A0", "#B6DDE5", "#4E4E50")

/obj/item/organ/tail/fish/on_mob_remove(mob/living/carbon/owner)
. = ..()
Expand Down Expand Up @@ -129,16 +129,9 @@

/datum/bodypart_overlay/mutant/tail/fish
feature_key = "fish_tail"
color_source = ORGAN_COLOR_OVERRIDE
color_source = ORGAN_COLOR_MUTANT_OVERRIDE
mesh_in_suits = TRUE

/datum/bodypart_overlay/mutant/tail/fish/override_color(obj/item/bodypart/bodypart_owner)
//If the owner uses mutant colors, inherit the color of the bodypart
if(!bodypart_owner.owner || HAS_TRAIT(bodypart_owner.owner, TRAIT_MUTANT_COLORS))
return bodypart_owner.draw_color

return bodypart_owner.owner.dna?.features["forced_fish_color"] || bodypart_owner.draw_color

/datum/bodypart_overlay/mutant/tail/fish/get_global_feature_list()
return SSaccessories.tails_list_fish

Expand Down Expand Up @@ -213,6 +206,7 @@
texture_bodypart_overlay = /datum/bodypart_overlay/texture/fishscale
brute_modifier = 0.9
burn_modifier = 0.9
wing_types = list(/obj/item/organ/wings/functional/angel, /obj/item/organ/wings/functional/dragon)

/obj/item/bodypart/head/scaled
texture_bodypart_overlay = /datum/bodypart_overlay/texture/fishscale
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
/datum/animid_type/lizard
id = "Lizard"
components = list(
BODY_ZONE_CHEST = /obj/item/bodypart/chest/scaled,
BODY_ZONE_HEAD = /obj/item/bodypart/head/scaled,
BODY_ZONE_L_ARM = /obj/item/bodypart/arm/left/scaled,
BODY_ZONE_L_LEG = /obj/item/bodypart/leg/left/scaled,
BODY_ZONE_R_ARM = /obj/item/bodypart/arm/right/scaled,
BODY_ZONE_R_LEG = /obj/item/bodypart/leg/right/scaled,
MUTANT_ORGANS = list(
/obj/item/organ/horns = SPRITE_ACCESSORY_NONE,
/obj/item/organ/frills = SPRITE_ACCESSORY_NONE,
/obj/item/organ/spines = SPRITE_ACCESSORY_NONE,
/obj/item/organ/tail/lizard = /datum/sprite_accessory/tails/lizard/smooth::name,
),
)

name = "Reptilid"
icon = FA_ICON_DRAGON

/datum/animid_type/lizard/pre_species_gain(datum/species/human/animid/species, mob/living/carbon/human/new_animid)
// ensures we get mutant color rather than a random forced color
new_animid.dna?.features["forced_mut_color"] = new_animid.dna?.features["mcolor"]
species.mutanttongue = new_animid.dna?.features["hissing"] ? /obj/item/organ/tongue/lizard : /obj/item/organ/tongue/lizard/no_hiss

/datum/animid_type/lizard/extra_feature_keys()
return list(/datum/preference/color/mutant_color::savefile_key)

/datum/animid_type/lizard/get_readable_features()
return ..() + "Scales"

/datum/animid_type/lizard/get_extra_perks()
var/list/to_add = list()

to_add += list(
list(
SPECIES_PERK_TYPE = SPECIES_NEUTRAL_PERK,
SPECIES_PERK_ICON = FA_ICON_HAND_FIST,
SPECIES_PERK_NAME = "Scaled Defense",
SPECIES_PERK_DESC = "[name] scales provide a minor amount of resistance to bruises and burns. \
However, good luck disguising your scaled skin.",
),
)

return to_add

/datum/preference/toggle/liz_tongue_hissing
savefile_key = "liz_tongue_hissing"
savefile_identifier = PREFERENCE_CHARACTER
category = PREFERENCE_CATEGORY_SECONDARY_FEATURES
can_randomize = FALSE
default_value = FALSE

/datum/preference/toggle/liz_tongue_hissing/apply_to_human(mob/living/carbon/human/target, value)
// behavior is only applied on animids by default
target.dna.features["hissing"] = value

/datum/preference/toggle/liz_tongue_hissing/is_accessible(datum/preferences/preferences)
return ..() && ((ispath(preferences.read_preference(/datum/preference/choiced/species), /datum/species/human/animid)) && (preferences.read_preference(/datum/preference/choiced/animid_type) == /datum/animid_type/lizard::id))

/obj/item/organ/tongue/lizard/no_hiss // because modifies_speech only affects things on init
name = "mutated forked tongue"
desc = "A thin and long muscle typically found in reptilian races, apparently moonlights as a nose. The ends on this one appear more rigid than normal, reducing the amount of hissing."
modifies_speech = FALSE // no hiss for you
draw_length = 0
Original file line number Diff line number Diff line change
Expand Up @@ -167,6 +167,12 @@ export const feature_fox_tail: FeatureChoiced = {
component: FeatureDropdownInput,
};

export const liz_tongue_hissing: FeatureToggle = {
Comment thread
Wollywoger marked this conversation as resolved.
name: 'Lizard Speech',
description: 'If checked, you will sssspeak like a lizardperson.',
component: CheckboxInput,
};

export const feature_android_species: FeatureChoiced = {
name: 'Android Species',
description: 'Determines what species you are modeled after.',
Expand Down
Loading