Skip to content

Commit

Permalink
Secondary Mutcolours, Synthetics, and Lizard Prosthetics (Yes, they'r…
Browse files Browse the repository at this point in the history
…e synths.) (Sprites by Thgvr!) (#1931)

<!-- Write **BELOW** The Headers and **ABOVE** The comments else it may
not be viewable. -->
<!-- You can view Contributing.MD for a detailed description of the pull
request process. -->

## About The Pull Request
Currently a work-in-progress, so the in-game sprites don't yet reflect
what the end result will look like. (That's why there's no screenshots.)

Sprites, once again, by @thgvr !

TODO:
- [x] Find a way to have synthetic replacements for lizard external
organs (frills, horns, snout)
- [x] Add synth eyes
- [x] Add parts to the protolathe design
- ~~[ ] Split the synthetic choice into being organic, a synthetic, OR a
FBP.~~ no
- ~~[ ] Find a way to re-add the BP_BLOCK_CHANGE_SPECIES flag on robotic
bodyparts without breaking things~~ fuk u
- ~~[ ] Make the big list of bodypart vars a list, or perhaps a struct~~
some other time
- [x] Fix FBP brains spawning in their chest, should just be normal
brains probably

## Why It's Good For The Game
More customisation, a little bit more uniqueness for prosthetics, and
hopefully a structure for a few things including bi-tone lizards and
co., as well as POSSIBLY maybe maybe maybe possibly maybe phorids. I
don't know. Depends on a lot of things.

Also it gets rid of text2path() usages that include variables linked to
player input which always scare me so that's good

## Changelog

:cl: Thgvr. Halcyon, Mark Suckerberg
add: Adds new preferences to make characters fully prosthetic or a FBP
(only difference being brain type)
add: Lizard prosthetic/synthetic bodyparts with absolutely wonderful
sprites by <b>Thgvr</b>! It's just a visual difference, and any species
can use them, but they most resemble lizards, so.
add: Adds missing robotic vox bodyparts
tweak: All species have the ability to change their two mutcolours. I
don't think this is really a loss at all.
/:cl:

<!-- Both :cl:'s are required for the changelog to work! You can put
your name to the right of the first :cl: if you want to overwrite your
GitHub username as author ingame. -->
<!-- You can use multiple of the same prefix (they're only used for the
icon ingame) and delete the unneeded ones. Despite some of the tags,
changelogs should generally represent how a player might be affected by
the changes rather than a summary of the PR's contents. -->
  • Loading branch information
MarkSuckerberg authored Jul 14, 2023
1 parent 0b07041 commit 5cdd929
Show file tree
Hide file tree
Showing 41 changed files with 524 additions and 278 deletions.
4 changes: 2 additions & 2 deletions check_regex.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,9 @@ standards:
- exactly: [1, "/area text paths", '"/area']
- exactly: [17, "/datum text paths", '"/datum']
- exactly: [4, "/mob text paths", '"/mob']
- exactly: [53, "/obj text paths", '"/obj']
- exactly: [51, "/obj text paths", '"/obj']
- exactly: [0, "/turf text paths", '"/turf']
- exactly: [118, "text2path uses", "text2path"]
- exactly: [116, "text2path uses", "text2path"]

- exactly: [18, "world<< uses", 'world[ \t]*<<']
- exactly: [0, "world.log<< uses", 'world.log[ \t]*<<']
Expand Down
3 changes: 2 additions & 1 deletion code/__DEFINES/DNA.dm
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,8 @@
#define NOHUSK 22 // Can't be husked.
#define NOMOUTH 23
#define NOSOCKS 24 // You cannot wear sock
#define NO_BONES 25 // You don't have bones to break
#define NO_BONES 25 //! You don't have any bones for breaking
#define MUTCOLORS_SECONDARY 26 //! A second mutant colour for other things

//organ slots
#define ORGAN_SLOT_BRAIN "brain"
Expand Down
1 change: 1 addition & 0 deletions code/__DEFINES/bodyparts.dm
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
#define IS_ORGANIC_LIMB(A) (A.bodytype & BODYTYPE_ORGANIC)
#define IS_ROBOTIC_LIMB(A) (A.bodytype & BODYTYPE_ROBOTIC)
3 changes: 0 additions & 3 deletions code/__DEFINES/mobs.dm
Original file line number Diff line number Diff line change
Expand Up @@ -71,9 +71,6 @@
#define LARVA_BODYPART "larva"
#define DEVIL_BODYPART "devil"

//Bodypart change blocking flags
#define BP_BLOCK_CHANGE_SPECIES (1<<0)

//Defines for Species IDs
#define SPECIES_ABDUCTOR "abductor"
#define SPECIES_ANDROID "android"
Expand Down
3 changes: 2 additions & 1 deletion code/__DEFINES/preferences.dm
Original file line number Diff line number Diff line change
Expand Up @@ -131,4 +131,5 @@
#define PROSTHETIC_AMPUTATED "amputated"
#define PROSTHETIC_ROBOTIC "prosthetic"


#define NOT_SYNTHETIC FALSE
#define IS_SYNTHETIC TRUE
1 change: 1 addition & 0 deletions code/__HELPERS/mobs.dm
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,7 @@
"kepori_tail_feathers" = pick(GLOB.kepori_tail_feathers_list),
"legs" = "Normal Legs",
"mcolor" = pick("FFFFFF","7F7F7F", "7FFF7F", "7F7FFF", "FF7F7F", "7FFFFF", "FF7FFF", "FFFF7F"),
"mcolor2" = pick("FFFFFF","7F7F7F", "7FFF7F", "7F7FFF", "FF7F7F", "7FFFFF", "FF7FFF", "FFFF7F"),
"moth_fluff" = pick(GLOB.moth_fluff_list),
"moth_markings" = pick(GLOB.moth_markings_list),
"moth_wings" = pick(GLOB.moth_wings_list),
Expand Down
7 changes: 4 additions & 3 deletions code/datums/dna.dm
Original file line number Diff line number Diff line change
Expand Up @@ -320,7 +320,7 @@
stored_dna.species = mrace //not calling any species update procs since we're a brain, not a monkey/human


/mob/living/carbon/set_species(datum/species/mrace, icon_update = TRUE, pref_load = FALSE)
/mob/living/carbon/set_species(datum/species/mrace, icon_update = TRUE, pref_load = FALSE, robotic = FALSE)
if(mrace && has_dna())
var/datum/species/new_race
if(ispath(mrace))
Expand All @@ -345,14 +345,15 @@
quirks_to_remove -= quirks_resolved
for(var/quirk_type in quirks_to_remove)
remove_quirk(quirk_type)
dna.species.on_species_gain(src, old_species, pref_load)
dna.species.on_species_gain(src, old_species, pref_load, robotic)
if(ishuman(src))
qdel(language_holder)
var/species_holder = initial(mrace.species_language_holder)
language_holder = new species_holder(src)
update_atom_languages()

/mob/living/carbon/human/set_species(datum/species/mrace, icon_update = TRUE, pref_load = FALSE)
/mob/living/carbon/human/set_species(datum/species/mrace, icon_update = TRUE, pref_load = FALSE, robotic = FALSE)
robotic ||= fbp
..()
if(icon_update)
update_hair()
Expand Down
4 changes: 2 additions & 2 deletions code/datums/status_effects/buffs.dm
Original file line number Diff line number Diff line change
Expand Up @@ -397,15 +397,15 @@
if(!itemUser.has_hand_for_held_index(hand))
//If user does not have the corresponding hand anymore, give them one and return the rod to their hand
if(((hand % 2) == 0))
var/obj/item/bodypart/L = itemUser.newBodyPart(BODY_ZONE_R_ARM, FALSE, FALSE)
var/obj/item/bodypart/L = itemUser.new_body_part(BODY_ZONE_R_ARM, FALSE, FALSE)
if(L.attach_limb(itemUser))
itemUser.put_in_hand(newRod, hand, forced = TRUE)
else
qdel(L)
consume_owner() //we can't regrow, abort abort
return
else
var/obj/item/bodypart/L = itemUser.newBodyPart(BODY_ZONE_L_ARM, FALSE, FALSE)
var/obj/item/bodypart/L = itemUser.new_body_part(BODY_ZONE_L_ARM, FALSE, FALSE)
if(L.attach_limb(itemUser))
itemUser.put_in_hand(newRod, hand, forced = TRUE)
else
Expand Down
6 changes: 1 addition & 5 deletions code/game/machinery/limbgrower.dm
Original file line number Diff line number Diff line change
Expand Up @@ -244,11 +244,7 @@
var/obj/item/bodypart/limb
limb = new buildpath(loc)
limb.name = "\improper synthetic [limb.bodytype & BODYTYPE_DIGITIGRADE ? "digitigrade ":""][selected_category] [limb.plaintext_zone]"
//super snowflake code to make digitigrade work with the rest of the limbs
if(limb.bodytype & BODYTYPE_DIGITIGRADE)
limb.limb_id = "digitigrade"
else
limb.limb_id = selected_category
limb.limb_id = selected_category
//fun override colors
limb.mutation_color = random_color()
limb.update_icon_dropped()
Expand Down
13 changes: 12 additions & 1 deletion code/game/objects/structures/mirror.dm
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@
H.dna.update_ui_block(DNA_SKIN_TONE_BLOCK)

if(MUTCOLORS in H.dna.species.species_traits)
var/new_mutantcolor = input(user, "Choose your skin color:", "Race change","#"+H.dna.features["mcolor"]) as color|null
var/new_mutantcolor = input(user, "Choose your skin color:", "Race change","#" + H.dna.features["mcolor"]) as color|null
if(!user.canUseTopic(src, BE_CLOSE, FALSE, NO_TK))
return
if(new_mutantcolor)
Expand All @@ -183,6 +183,17 @@
else
to_chat(H, "<span class='notice'>Invalid color. Your color is not bright enough.</span>")

if(MUTCOLORS_SECONDARY in H.dna.species.species_traits)
var/new_secondary_mutantcolor = input(user, "Choose your secondary skin color:", "Race change","#" + H.dna.features["mcolor2"]) as color|null
if(new_secondary_mutantcolor)
var/temp_hsv = RGBtoHSV(new_secondary_mutantcolor)

if(ReadHSV(temp_hsv)[3] >= ReadHSV("#191919")[3]) // mutantcolors must be bright
H.dna.features["mcolor2"] = sanitize_hexcolor(new_secondary_mutantcolor)

else
to_chat(H, "<span class='notice'>Invalid color. Your secondary color is not bright enough.</span>")

H.update_body()
H.update_hair()
H.update_body_parts(TRUE)
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 @@ -26,6 +26,7 @@

// Mutant randomizing, doesn't affect the mob appearance unless it's the specific mutant.
H.dna.features["mcolor"] = random_short_color()
H.dna.features["mcolor2"] = random_short_color()
H.dna.features["ethcolor"] = GLOB.color_list_ethereal[pick(GLOB.color_list_ethereal)]
H.dna.features["tail_lizard"] = pick(GLOB.tails_list_lizard)
H.dna.features["snout"] = pick(GLOB.snouts_list)
Expand Down
Loading

0 comments on commit 5cdd929

Please sign in to comment.