Fixes and ready up.

This commit is contained in:
Ghommie
2019-12-13 02:26:59 +01:00
parent 3fcb7808fd
commit 7d7bcc7c34
6 changed files with 54 additions and 69 deletions
+5 -10
View File
@@ -130,21 +130,16 @@
#define NECK (1<<11)
#define FULL_BODY (~0)
//flags for alternate styles: These are hard sprited so don't set this if you didn't put the effort in
#define NORMAL_STYLE 0
#define ALT_STYLE 1
//flags for female outfits: How much the game can safely "take off" the uniform without it looking weird
#define NO_FEMALE_UNIFORM 0
#define FEMALE_UNIFORM_FULL 1
#define FEMALE_UNIFORM_TOP 2
//Helmets/masks for muzzles or beaks
#define NORMAL_FACED 0
#define MUZZLE_FACED 1
#define BEAKED_FACED 2
//flags for alternate styles: These are hard sprited so don't set this if you didn't put the effort in
#define NORMAL_STYLE 0
#define ALT_STYLE 1
//flags for outfits that have mutantrace variants
//flags for outfits that have mutantrace variants: These are hard sprited too.
#define STYLE_DIGITIGRADE (1<<0) //jumpsuits, suits and shoes
#define STYLE_MUZZLE (1<<1) //hats or masks
#define STYLE_SNEK_TAURIC (1<<2) //taur-friendly suits
+2 -2
View File
@@ -2319,9 +2319,9 @@ GLOBAL_LIST_EMPTY(preferences_datums)
pref_species.species_traits -= DIGITIGRADE
if(DIGITIGRADE in pref_species.species_traits)
character.Digitigrade_Leg_Swap(FALSE, TRUE)
character.Digitigrade_Leg_Swap(FALSE)
else
character.Digitigrade_Leg_Swap(TRUE, TRUE)
character.Digitigrade_Leg_Swap(TRUE)
//let's be sure the character updates
if(icon_updates)
+12 -12
View File
@@ -290,7 +290,7 @@ GLOBAL_LIST_EMPTY(roundstart_race_names)
// this needs to be FIRST because qdel calls update_body which checks if we have DIGITIGRADE legs or not and if not then removes DIGITIGRADE from species_traits
if(("legs" in C.dna.species.mutant_bodyparts) && (C.dna.features["legs"] == "Digitigrade" || C.dna.features["legs"] == "Avian"))
species_traits += DIGITIGRADE
species_traits |= DIGITIGRADE
if(DIGITIGRADE in species_traits)
C.Digitigrade_Leg_Swap(FALSE)
@@ -608,34 +608,34 @@ GLOBAL_LIST_EMPTY(roundstart_race_names)
return
var/obj/item/bodypart/head/HD = H.get_bodypart(BODY_ZONE_HEAD)
var/tauric = H.dna.features["taur"] && H.dna.features["taur"] != "None"
if("tail_lizard" in mutant_bodyparts)
if((H.wear_suit && (H.wear_suit.flags_inv & HIDETAUR)) || !H.dna.features["taur"] || H.dna.features["taur"] == "None")
if((H.wear_suit && (H.wear_suit.flags_inv & HIDETAUR)) || tauric)
bodyparts_to_add -= "tail_lizard"
if("waggingtail_lizard" in mutant_bodyparts)
if((H.wear_suit && (H.wear_suit.flags_inv & HIDETAUR)) || !H.dna.features["taur"] || H.dna.features["taur"] == "None")
if((H.wear_suit && (H.wear_suit.flags_inv & HIDETAUR)) || tauric)
bodyparts_to_add -= "waggingtail_lizard"
else if ("tail_lizard" in mutant_bodyparts)
bodyparts_to_add -= "waggingtail_lizard"
if("tail_human" in mutant_bodyparts)
if((H.wear_suit && (H.wear_suit.flags_inv & HIDETAUR)) || !H.dna.features["taur"] || H.dna.features["taur"] == "None")
if((H.wear_suit && (H.wear_suit.flags_inv & HIDETAUR)) || tauric)
bodyparts_to_add -= "tail_human"
if("waggingtail_human" in mutant_bodyparts)
if((H.wear_suit && (H.wear_suit.flags_inv & HIDETAUR)) || !H.dna.features["taur"] || H.dna.features["taur"] == "None")
if((H.wear_suit && (H.wear_suit.flags_inv & HIDETAUR)) || tauric)
bodyparts_to_add -= "waggingtail_human"
else if ("tail_human" in mutant_bodyparts)
bodyparts_to_add -= "waggingtail_human"
if("spines" in mutant_bodyparts)
if(!H.dna.features["spines"] || H.dna.features["spines"] == "None" || H.wear_suit && (H.wear_suit.flags_inv & HIDEJUMPSUIT))
if(!H.dna.features["spines"] || H.dna.features["spines"] == "None" || H.wear_suit && (H.wear_suit.flags_inv & HIDETAUR))
bodyparts_to_add -= "spines"
if("waggingspines" in mutant_bodyparts)
if(!H.dna.features["spines"] || H.dna.features["spines"] == "None" || H.wear_suit && (H.wear_suit.flags_inv & HIDEJUMPSUIT))
if(!H.dna.features["spines"] || H.dna.features["spines"] == "None" || H.wear_suit && (H.wear_suit.flags_inv & HIDETAUR))
bodyparts_to_add -= "waggingspines"
else if ("tail" in mutant_bodyparts)
bodyparts_to_add -= "waggingspines"
@@ -685,11 +685,11 @@ GLOBAL_LIST_EMPTY(roundstart_race_names)
//Other Races
if("mam_tail" in mutant_bodyparts)
if((H.wear_suit && (H.wear_suit.flags_inv & HIDETAUR)) || !H.dna.features["taur"] || H.dna.features["taur"] == "None")
if((H.wear_suit && (H.wear_suit.flags_inv & HIDETAUR)) || (H.dna.features["taur"] && H.dna.features["taur"] != "None"))
bodyparts_to_add -= "mam_tail"
if("mam_waggingtail" in mutant_bodyparts)
if((H.wear_suit && (H.wear_suit.flags_inv & HIDETAUR)) || !H.dna.features["taur"] || H.dna.features["taur"] == "None")
if((H.wear_suit && (H.wear_suit.flags_inv & HIDETAUR)) || (H.dna.features["taur"] && H.dna.features["taur"] != "None"))
bodyparts_to_add -= "mam_waggingtail"
else if ("mam_tail" in mutant_bodyparts)
bodyparts_to_add -= "mam_waggingtail"
@@ -703,7 +703,7 @@ GLOBAL_LIST_EMPTY(roundstart_race_names)
bodyparts_to_add -= "mam_snouts"
if("taur" in mutant_bodyparts)
if(!H.dna.features["taur"] || H.dna.features["taur"] == "None" || (H.wear_suit && (H.wear_suit.flags_inv & HIDETAUR)))
if(!tauric || (H.wear_suit && (H.wear_suit.flags_inv & HIDETAUR)))
bodyparts_to_add -= "taur"
//END EDIT
@@ -720,7 +720,7 @@ GLOBAL_LIST_EMPTY(roundstart_race_names)
species_traits += DIGITIGRADE
var/should_be_squished = FALSE
if(H.wear_suit)
if(!(H.wear_suit.mutantrace_variation & STYLE_DIGITIGRADE)) //we got digitigrade suits now fam
if(!(H.wear_suit.mutantrace_variation & STYLE_DIGITIGRADE) || (tauric && (H.wear_suit.mutantrace_variation & STYLE_ALL_TAURIC))) //digitigrade/taur suits
should_be_squished = TRUE
if(H.w_uniform && !H.wear_suit)
if(!(H.w_uniform.mutantrace_variation & STYLE_DIGITIGRADE))
@@ -73,16 +73,6 @@
mutant_bodyparts |= "spines"
H.update_body()
/datum/species/lizard/on_species_gain(mob/living/carbon/human/C, datum/species/old_species)
if(("legs" in C.dna.species.mutant_bodyparts) && (C.dna.features["legs"] == "Digitigrade" || C.dna.features["legs"] == "Avian"))
species_traits += DIGITIGRADE
return ..()
/datum/species/lizard/on_species_loss(mob/living/carbon/human/C, datum/species/new_species)
if(("legs" in C.dna.species.mutant_bodyparts) && C.dna.features["legs"] == "Plantigrade")
species_traits -= DIGITIGRADE
return ..()
/*
Lizard subspecies: ASHWALKERS
*/
@@ -104,45 +104,46 @@ There are several things that need to be remembered:
var/obj/screen/inventory/inv = hud_used.inv_slots[SLOT_W_UNIFORM]
inv.update_icon()
var/obj/item/clothing/under/U = w_uniform
U.screen_loc = ui_iclothing
if(client && hud_used && hud_used.hud_shown)
if(hud_used.inventory_shown)
client.screen += w_uniform
update_observer_view(w_uniform,1)
if(istype(w_uniform, /obj/item/clothing/under))
var/obj/item/clothing/under/U = w_uniform
U.screen_loc = ui_iclothing
if(client && hud_used && hud_used.hud_shown)
if(hud_used.inventory_shown)
client.screen += w_uniform
update_observer_view(w_uniform,1)
if(wear_suit && (wear_suit.flags_inv & HIDEJUMPSUIT))
return
if(wear_suit && (wear_suit.flags_inv & HIDEJUMPSUIT))
return
var/t_color = U.item_color
if(!t_color)
t_color = U.icon_state
if(U.adjusted == ALT_STYLE)
t_color = "[t_color]_d"
var/t_color = U.item_color
if(!t_color)
t_color = U.icon_state
if(U.adjusted == ALT_STYLE)
t_color = "[t_color]_d"
var/alt_worn = U.alternate_worn_icon
var/variant_flag = NONE
var/alt_worn = U.alternate_worn_icon
var/variant_flag = NONE
if((DIGITIGRADE in dna.species.species_traits) && U.mutantrace_variation & STYLE_DIGITIGRADE)
alt_worn = 'icons/mob/uniform_digi.dmi'
variant_flag |= STYLE_DIGITIGRADE
if((DIGITIGRADE in dna.species.species_traits) && U.mutantrace_variation & STYLE_DIGITIGRADE)
alt_worn = 'icons/mob/uniform_digi.dmi'
variant_flag |= STYLE_DIGITIGRADE
var/mutable_appearance/uniform_overlay
var/mutable_appearance/uniform_overlay
if(dna && dna.species.sexes)
var/G = (gender == FEMALE) ? "f" : "m"
if(G == "f" && U.fitted != NO_FEMALE_UNIFORM)
uniform_overlay = U.build_worn_icon("[t_color]", UNIFORM_LAYER, alt_worn ? alt_worn : 'icons/mob/uniform.dmi', FALSE, U.fitted, variant_flag)
if(dna && dna.species.sexes)
var/G = (gender == FEMALE) ? "f" : "m"
if(G == "f" && U.fitted != NO_FEMALE_UNIFORM)
uniform_overlay = U.build_worn_icon("[t_color]", UNIFORM_LAYER, alt_worn ? alt_worn : 'icons/mob/uniform.dmi', FALSE, U.fitted, variant_flag)
if(!uniform_overlay)
uniform_overlay = U.build_worn_icon("[t_color]", UNIFORM_LAYER, alt_worn ? alt_worn : 'icons/mob/uniform.dmi', FALSE, style_flags = variant_flag)
if(!uniform_overlay)
uniform_overlay = U.build_worn_icon("[t_color]", UNIFORM_LAYER, alt_worn ? alt_worn : 'icons/mob/uniform.dmi', FALSE, style_flags = variant_flag)
if(OFFSET_UNIFORM in dna.species.offset_features)
uniform_overlay.pixel_x += dna.species.offset_features[OFFSET_UNIFORM][1]
uniform_overlay.pixel_y += dna.species.offset_features[OFFSET_UNIFORM][2]
overlays_standing[UNIFORM_LAYER] = uniform_overlay
if(OFFSET_UNIFORM in dna.species.offset_features)
uniform_overlay.pixel_x += dna.species.offset_features[OFFSET_UNIFORM][1]
uniform_overlay.pixel_y += dna.species.offset_features[OFFSET_UNIFORM][2]
overlays_standing[UNIFORM_LAYER] = uniform_overlay
apply_overlay(UNIFORM_LAYER)
update_mutant_bodyparts()
@@ -671,6 +672,8 @@ generate/load female uniform sprites matching all previously decided variables
. += "-robotic"
if(BP.use_digitigrade)
. += "-digitigrade[BP.use_digitigrade]"
if(BP.digitigrade_type)
. += "-[BP.digitigrade_type]"
if(BP.dmg_overlay_type)
. += "-[BP.dmg_overlay_type]"
if(BP.body_markings)
+3 -6
View File
@@ -286,15 +286,12 @@
if("orange")
. = "ffc905"
/mob/living/carbon/proc/Digitigrade_Leg_Swap(swap_back, update = FALSE)
var/body_plan_changed = FALSE
/mob/living/carbon/proc/Digitigrade_Leg_Swap(swap_back)
for(var/X in bodyparts)
var/obj/item/bodypart/O = X
if((O.body_part == LEG_LEFT || O.body_part == LEG_RIGHT) && ((!O.use_digitigrade && !swap_back) || (O.use_digitigrade && swap_back)))
O.use_digitigrade = FULL_DIGITIGRADE
body_plan_changed = TRUE
if(update && body_plan_changed) // most times this proc is called on on_species_gain and on_species_loss, so set_species() already handles the update.
update_body()
O.use_digitigrade = swap_back ? FULL_DIGITIGRADE : NOT_DIGITIGRADE
O.update_limb()
if(ishuman(src))
var/mob/living/carbon/human/H = src