Skip to content

Commit

Permalink
Separates mothpeople antennae into a mutant bodypart (tgstation#53928)
Browse files Browse the repository at this point in the history
Removes the antennae part of the original moth wing sprites and adds them back as a mutant bodypart.
Seeing as they were then separated I made it a preference so that players can choose which antennae sprite they would like to have, instead of being restricted solely to the ones built into the wing sprite.
  • Loading branch information
ArcaneDefence authored Sep 25, 2020
1 parent e416283 commit 2eb6b13
Show file tree
Hide file tree
Showing 14 changed files with 120 additions and 9 deletions.
1 change: 1 addition & 0 deletions code/__HELPERS/global_lists.dm
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
init_sprite_accessory_subtypes(/datum/sprite_accessory/wings, GLOB.r_wings_list,roundstart = TRUE)
init_sprite_accessory_subtypes(/datum/sprite_accessory/caps, GLOB.caps_list)
init_sprite_accessory_subtypes(/datum/sprite_accessory/moth_wings, GLOB.moth_wings_list)
init_sprite_accessory_subtypes(/datum/sprite_accessory/moth_antennae, GLOB.moth_antennae_list)
init_sprite_accessory_subtypes(/datum/sprite_accessory/moth_markings, GLOB.moth_markings_list)

//Species
Expand Down
4 changes: 3 additions & 1 deletion code/__HELPERS/mobs.dm
Original file line number Diff line number Diff line change
Expand Up @@ -73,10 +73,12 @@
init_sprite_accessory_subtypes(/datum/sprite_accessory/wings, GLOB.wings_list)
if(!GLOB.moth_wings_list.len)
init_sprite_accessory_subtypes(/datum/sprite_accessory/moth_wings, GLOB.moth_wings_list)
if(!GLOB.moth_antennae_list.len)
init_sprite_accessory_subtypes(/datum/sprite_accessory/moth_antennae, GLOB.moth_antennae_list)
if(!GLOB.moth_markings_list.len)
init_sprite_accessory_subtypes(/datum/sprite_accessory/moth_markings, GLOB.moth_markings_list)
//For now we will always return none for tail_human and ears.
return(list("mcolor" = pick("FFFFFF","7F7F7F", "7FFF7F", "7F7FFF", "FF7F7F", "7FFFFF", "FF7FFF", "FFFF7F"),"ethcolor" = GLOB.color_list_ethereal[pick(GLOB.color_list_ethereal)], "tail_lizard" = pick(GLOB.tails_list_lizard), "tail_human" = "None", "wings" = "None", "snout" = pick(GLOB.snouts_list), "horns" = pick(GLOB.horns_list), "ears" = "None", "frills" = pick(GLOB.frills_list), "spines" = pick(GLOB.spines_list), "body_markings" = pick(GLOB.body_markings_list), "legs" = "Normal Legs", "caps" = pick(GLOB.caps_list), "moth_wings" = pick(GLOB.moth_wings_list), "moth_markings" = pick(GLOB.moth_markings_list)))
return(list("mcolor" = pick("FFFFFF","7F7F7F", "7FFF7F", "7F7FFF", "FF7F7F", "7FFFFF", "FF7FFF", "FFFF7F"),"ethcolor" = GLOB.color_list_ethereal[pick(GLOB.color_list_ethereal)], "tail_lizard" = pick(GLOB.tails_list_lizard), "tail_human" = "None", "wings" = "None", "snout" = pick(GLOB.snouts_list), "horns" = pick(GLOB.horns_list), "ears" = "None", "frills" = pick(GLOB.frills_list), "spines" = pick(GLOB.spines_list), "body_markings" = pick(GLOB.body_markings_list), "legs" = "Normal Legs", "caps" = pick(GLOB.caps_list), "moth_wings" = pick(GLOB.moth_wings_list), "moth_antennae" = pick(GLOB.moth_antennae_list), "moth_markings" = pick(GLOB.moth_markings_list)))

/proc/random_hairstyle(gender)
switch(gender)
Expand Down
1 change: 1 addition & 0 deletions code/_globalvars/lists/flavor_misc.dm
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ GLOBAL_LIST_EMPTY(wings_list)
GLOBAL_LIST_EMPTY(wings_open_list)
GLOBAL_LIST_EMPTY(r_wings_list)
GLOBAL_LIST_EMPTY(moth_wings_list)
GLOBAL_LIST_EMPTY(moth_antennae_list)
GLOBAL_LIST_EMPTY(moth_markings_list)
GLOBAL_LIST_EMPTY(caps_list)

Expand Down
1 change: 1 addition & 0 deletions code/modules/admin/create_mob.dm
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@
H.dna.features["spines"] = pick(GLOB.spines_list)
H.dna.features["body_markings"] = pick(GLOB.body_markings_list)
H.dna.features["moth_wings"] = pick(GLOB.moth_wings_list)
H.dna.features["moth_antennae"] = pick(GLOB.moth_antennae_list)

H.update_body()
H.update_hair()
Expand Down
21 changes: 20 additions & 1 deletion code/modules/client/preferences.dm
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ GLOBAL_LIST_EMPTY(preferences_datums)
var/skin_tone = "caucasian1" //Skin color
var/eye_color = "000" //Eye color
var/datum/species/pref_species = new /datum/species/human() //Mutant race
var/list/features = list("mcolor" = "FFF", "ethcolor" = "9c3030", "tail_lizard" = "Smooth", "tail_human" = "None", "snout" = "Round", "horns" = "None", "ears" = "None", "wings" = "None", "frills" = "None", "spines" = "None", "body_markings" = "None", "legs" = "Normal Legs", "moth_wings" = "Plain", "moth_markings" = "None")
var/list/features = list("mcolor" = "FFF", "ethcolor" = "9c3030", "tail_lizard" = "Smooth", "tail_human" = "None", "snout" = "Round", "horns" = "None", "ears" = "None", "wings" = "None", "frills" = "None", "spines" = "None", "body_markings" = "None", "legs" = "Normal Legs", "moth_wings" = "Plain", "moth_antennae" = "Plain", "moth_markings" = "None")
var/list/randomise = list(RANDOM_UNDERWEAR = TRUE, RANDOM_UNDERWEAR_COLOR = TRUE, RANDOM_UNDERSHIRT = TRUE, RANDOM_SOCKS = TRUE, RANDOM_BACKPACK = TRUE, RANDOM_JUMPSUIT_STYLE = TRUE, RANDOM_HAIRSTYLE = TRUE, RANDOM_HAIR_COLOR = TRUE, RANDOM_FACIAL_HAIRSTYLE = TRUE, RANDOM_FACIAL_HAIR_COLOR = TRUE, RANDOM_SKIN_TONE = TRUE, RANDOM_EYE_COLOR = TRUE)
var/phobia = "spiders"

Expand Down Expand Up @@ -479,6 +479,19 @@ GLOBAL_LIST_EMPTY(preferences_datums)
dat += "</td>"
mutant_category = 0

if("moth_antennae" in pref_species.default_features)
if(!mutant_category)
dat += APPEARANCE_CATEGORY_COLUMN

dat += "<h3>Moth antennae</h3>"

dat += "<a href='?_src_=prefs;preference=moth_antennae;task=input'>[features["moth_antennae"]]</a><BR>"

mutant_category++
if(mutant_category >= MAX_MUTANT_ROWS)
dat += "</td>"
mutant_category = 0

if("moth_markings" in pref_species.default_features)
if(!mutant_category)
dat += APPEARANCE_CATEGORY_COLUMN
Expand Down Expand Up @@ -1462,6 +1475,12 @@ GLOBAL_LIST_EMPTY(preferences_datums)
if(new_moth_wings)
features["moth_wings"] = new_moth_wings

if("moth_antennae")
var/new_moth_antennae
new_moth_antennae = input(user, "Choose your character's antennae:", "Character Preference") as null|anything in GLOB.moth_antennae_list
if(new_moth_antennae)
features["moth_antennae"] = new_moth_antennae

if("moth_markings")
var/new_moth_markings
new_moth_markings = input(user, "Choose your character's markings:", "Character Preference") as null|anything in GLOB.moth_markings_list
Expand Down
3 changes: 3 additions & 0 deletions code/modules/client/preferences_savefile.dm
Original file line number Diff line number Diff line change
Expand Up @@ -340,6 +340,7 @@ SAVEFILE UPDATING/VERSIONING - 'Simplified', or rather, more coder-friendly ~Car
READ_FILE(S["feature_lizard_body_markings"], features["body_markings"])
READ_FILE(S["feature_lizard_legs"], features["legs"])
READ_FILE(S["feature_moth_wings"], features["moth_wings"])
READ_FILE(S["feature_moth_antennae"], features["moth_antennae"])
READ_FILE(S["feature_moth_markings"], features["moth_markings"])
READ_FILE(S["persistent_scars"] , persistent_scars)
if(!CONFIG_GET(flag/join_with_mutant_humans))
Expand Down Expand Up @@ -430,6 +431,7 @@ SAVEFILE UPDATING/VERSIONING - 'Simplified', or rather, more coder-friendly ~Car
features["body_markings"] = sanitize_inlist(features["body_markings"], GLOB.body_markings_list)
features["feature_lizard_legs"] = sanitize_inlist(features["legs"], GLOB.legs_list, "Normal Legs")
features["moth_wings"] = sanitize_inlist(features["moth_wings"], GLOB.moth_wings_list, "Plain")
features["moth_antennae"] = sanitize_inlist(features["moth_antennae"], GLOB.moth_antennae_list, "Plain")
features["moth_markings"] = sanitize_inlist(features["moth_markings"], GLOB.moth_markings_list, "None")

persistent_scars = sanitize_integer(persistent_scars)
Expand Down Expand Up @@ -488,6 +490,7 @@ SAVEFILE UPDATING/VERSIONING - 'Simplified', or rather, more coder-friendly ~Car
WRITE_FILE(S["feature_lizard_body_markings"] , features["body_markings"])
WRITE_FILE(S["feature_lizard_legs"] , features["legs"])
WRITE_FILE(S["feature_moth_wings"] , features["moth_wings"])
WRITE_FILE(S["feature_moth_antennae"] , features["moth_antennae"])
WRITE_FILE(S["feature_moth_markings"] , features["moth_markings"])
WRITE_FILE(S["persistent_scars"] , persistent_scars)

Expand Down
1 change: 1 addition & 0 deletions code/modules/mining/lavaland/necropolis_chests.dm
Original file line number Diff line number Diff line change
Expand Up @@ -614,6 +614,7 @@
if(exposed_carbon.dna.species.has_innate_wings)
to_chat(exposed_carbon, "<span class='userdanger'>A terrible pain travels down your back as your wings change shape!</span>")
exposed_carbon.dna.features["moth_wings"] = "None"
exposed_carbon.dna.features["moth_antennae"] = "Regal"
else
to_chat(exposed_carbon, "<span class='userdanger'>A terrible pain travels down your back as wings burst out!</span>")
exposed_carbon.dna.species.GiveSpeciesFlight(exposed_carbon)
Expand Down
78 changes: 73 additions & 5 deletions code/modules/mob/dead/new_player/sprite_accessories.dm
Original file line number Diff line number Diff line change
Expand Up @@ -1862,9 +1862,9 @@
name = "White Fly"
icon_state = "whitefly"

/datum/sprite_accessory/moth_wings/punished
/datum/sprite_accessory/moth_wings/burnt_off
name = "Burnt Off"
icon_state = "punished"
icon_state = "burnt_off"
locked = TRUE

/datum/sprite_accessory/moth_wings/firewatch
Expand Down Expand Up @@ -1903,6 +1903,74 @@
name = "Witch Wing"
icon_state = "witchwing"

/datum/sprite_accessory/moth_antennae //Finally splitting the sprite
icon = 'icons/mob/moth_antennae.dmi'
color_src = null

/datum/sprite_accessory/moth_antennae/plain
name = "Plain"
icon_state = "plain"

/datum/sprite_accessory/moth_antennae/reddish
name = "Reddish"
icon_state = "reddish"

/datum/sprite_accessory/moth_antennae/royal
name = "Royal"
icon_state = "royal"

/datum/sprite_accessory/moth_antennae/gothic
name = "Gothic"
icon_state = "gothic"

/datum/sprite_accessory/moth_antennae/whitefly
name = "White Fly"
icon_state = "whitefly"

/datum/sprite_accessory/moth_antennae/lovers
name = "Lovers"
icon_state = "lovers"

/datum/sprite_accessory/moth_antennae/burnt_off
name = "Burnt Off"
icon_state = "burnt_off"

/datum/sprite_accessory/moth_antennae/firewatch
name = "Firewatch"
icon_state = "firewatch"

/datum/sprite_accessory/moth_antennae/deathhead
name = "Deathshead"
icon_state = "deathhead"

/datum/sprite_accessory/moth_antennae/poison
name = "Poison"
icon_state = "poison"

/datum/sprite_accessory/moth_antennae/ragged
name = "Ragged"
icon_state = "ragged"

/datum/sprite_accessory/moth_antennae/moonfly
name = "Moon Fly"
icon_state = "moonfly"

/datum/sprite_accessory/moth_antennae/oakworm
name = "Oak Worm"
icon_state = "oakworm"

/datum/sprite_accessory/moth_antennae/jungle
name = "Jungle"
icon_state = "jungle"

/datum/sprite_accessory/moth_antennae/witchwing
name = "Witch Wing"
icon_state = "witchwing"

/datum/sprite_accessory/moth_antennae/regal
name = "Regal"
icon_state = "regal"

/datum/sprite_accessory/moth_markings // the markings that moths can have. finally something other than the boring tan
icon = 'icons/mob/moth_markings.dmi'
color_src = null
Expand Down Expand Up @@ -1931,9 +1999,9 @@
name = "Lovers"
icon_state = "lovers"

/datum/sprite_accessory/moth_markings/punished
name = "Punished"
icon_state = "punished"
/datum/sprite_accessory/moth_markings/burnt_off
name = "Burnt Off"
icon_state = "burnt_off"

/datum/sprite_accessory/moth_markings/firewatch
name = "Firewatch"
Expand Down
6 changes: 6 additions & 0 deletions code/modules/mob/living/carbon/human/species.dm
Original file line number Diff line number Diff line change
Expand Up @@ -747,6 +747,10 @@ GLOBAL_LIST_EMPTY(roundstart_races)
else if ("wings" in mutant_bodyparts)
bodyparts_to_add -= "wings_open"

if("moth_antennae" in mutant_bodyparts)
if(!H.dna.features["moth_antennae"] || H.dna.features["moth_antennae"] == "None" || !HD)
bodyparts_to_add -= "moth_antennae"

//Digitigrade legs are stuck in the phantom zone between true limbs and mutant bodyparts. Mainly it just needs more agressive updating than most limbs.
var/update_needed = FALSE
var/not_digitigrade = TRUE
Expand Down Expand Up @@ -812,6 +816,8 @@ GLOBAL_LIST_EMPTY(roundstart_races)
S = GLOB.legs_list[H.dna.features["legs"]]
if("moth_wings")
S = GLOB.moth_wings_list[H.dna.features["moth_wings"]]
if("moth_antennae")
S = GLOB.moth_antennae_list[H.dna.features["moth_antennae"]]
if("moth_markings")
S = GLOB.moth_markings_list[H.dna.features["moth_markings"]]
if("caps")
Expand Down
13 changes: 11 additions & 2 deletions code/modules/mob/living/carbon/human/species_types/mothmen.dm
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
default_color = "00FF00"
species_traits = list(LIPS, NOEYESPRITES, HAS_FLESH, HAS_BONE)
inherent_biotypes = MOB_ORGANIC|MOB_HUMANOID|MOB_BUG
mutant_bodyparts = list("moth_wings", "moth_markings")
default_features = list("moth_wings" = "Plain", "moth_markings" = "None")
mutant_bodyparts = list("moth_wings", "moth_antennae", "moth_markings")
default_features = list("moth_wings" = "Plain", "moth_antennae" = "Plain", "moth_markings" = "None")
attack_verb = "slash"
attack_sound = 'sound/weapons/slash.ogg'
miss_sound = 'sound/weapons/slashmiss.ogg'
Expand Down Expand Up @@ -46,6 +46,8 @@
to_chat(H, "<span class='danger'>Your precious wings burn to a crisp!</span>")
H.dna.features["original_moth_wings"] = H.dna.features["moth_wings"] //Fire apparently destroys DNA, so let's preserve that elsewhere
H.dna.features["moth_wings"] = "Burnt Off"
H.dna.features["original_moth_antennae"] = H.dna.features["moth_antennae"]
H.dna.features["moth_antennae"] = "Burnt Off"
if(flying_species) //This is all exclusive to if the person has the effects of a potion of flight
if(H.movement_type & FLYING)
ToggleFlight(H)
Expand Down Expand Up @@ -78,6 +80,13 @@
. = ..()
if(H.dna.features["original_moth_wings"] != null)
H.dna.features["moth_wings"] = H.dna.features["original_moth_wings"]

if(H.dna.features["original_moth_wings"] == null && H.dna.features["moth_wings"] == "Burnt Off")
H.dna.features["moth_wings"] = "Plain"

if(H.dna.features["original_moth_antennae"] != null)
H.dna.features["moth_antennae"] = H.dna.features["original_moth_antennae"]

if(H.dna.features["original_moth_antennae"] == null && H.dna.features["moth_antennae" == "Burnt Off"])
H.dna.features["moth_antennae"] = "Plain"
handle_mutant_bodyparts(H)
Binary file modified icons/mob/clothing/wings.dmi
Binary file not shown.
Binary file added icons/mob/moth_antennae.dmi
Binary file not shown.
Binary file modified icons/mob/moth_markings.dmi
Binary file not shown.
Binary file modified icons/mob/moth_wings.dmi
Binary file not shown.

0 comments on commit 2eb6b13

Please sign in to comment.