Invasion of the moffs (#17000)

Co-authored-by: AffectedArc07 <25063394+AffectedArc07@users.noreply.github.com>
Co-authored-by: mochi <1496804+dearmochi@users.noreply.github.com>
This commit is contained in:
S34N
2022-02-23 19:37:37 +00:00
committed by GitHub
parent 1aa4222695
commit a5bc67cd43
55 changed files with 880 additions and 161 deletions
+51 -42
View File
@@ -18,7 +18,8 @@
var/list/m_styles = list(
"head" = "None",
"body" = "None",
"tail" = "None"
"tail" = "None",
"wing" = "None"
) //Marking styles.
var/list/m_colours = list(
"head" = "#000000",
@@ -39,6 +40,7 @@
var/language = "None" //Secondary language
var/autohiss_mode = AUTOHISS_OFF //Species autohiss level. OFF, BASIC, FULL.
/// The body accessory name of the mob (e.g. wings, tail).
var/body_accessory = null
var/speciesprefs = 0 //I hate having to do this, I really do (Using this for oldvox code, making names universal I guess
@@ -578,10 +580,8 @@
underwear = random_underwear(gender, species)
undershirt = random_undershirt(gender, species)
socks = random_socks(gender, species)
if(GLOB.body_accessory_by_species[species])
body_accessory = random_body_accessory(species)
if(body_accessory == "None") //Required to prevent a bug where the information/icons in the character preferences screen wouldn't update despite the data being changed.
body_accessory = null
if(length(GLOB.body_accessory_by_species[species]))
body_accessory = random_body_accessory(species, S.optional_body_accessory)
if(S.bodyflags & (HAS_SKIN_TONE|HAS_ICON_SKIN_TONE))
s_tone = random_skin_tone(species)
h_style = random_hair_style(gender, species, robohead)
@@ -768,6 +768,12 @@
clothes_s.Blend(new /icon('icons/mob/clothing/back.dmi', "satchel"), ICON_OVERLAY)
return clothes_s
#define ICON_SHIFT_XY(I, X, Y)\
if(X)\
I.Shift(EAST, X);\
if(Y)\
I.Shift(NORTH, Y);\
/datum/character_save/proc/update_preview_icon(for_observer=0) //seriously. This is horrendous.
qdel(preview_icon_front)
qdel(preview_icon_side)
@@ -830,49 +836,52 @@
else
preview_icon.Blend(rgb(-s_tone, -s_tone, -s_tone), ICON_SUBTRACT)
//Tail
if(current_species && (current_species.bodyflags & HAS_TAIL))
var/tail_icon
var/tail_icon_state
var/tail_shift_x
var/tail_shift_y
// Body accessory
if(current_species && (current_species.bodyflags & HAS_BODY_ACCESSORY))
var/icon
var/icon_state
var/offset_x = 0
var/offset_y = 0
var/blend_mode = ICON_ADD
var/icon/underlay = null
if(body_accessory)
var/datum/body_accessory/accessory = GLOB.body_accessory_by_name[body_accessory]
tail_icon = accessory.icon
tail_icon_state = accessory.icon_state
if(accessory.blend_mode)
blend_mode = accessory.blend_mode
if(accessory.pixel_x_offset)
tail_shift_x = accessory.pixel_x_offset
if(accessory.pixel_y_offset)
tail_shift_y = accessory.pixel_y_offset
else
tail_icon = "icons/effects/species.dmi"
var/datum/body_accessory/BA = GLOB.body_accessory_by_name[body_accessory]
if(BA)
icon = BA.icon
icon_state = BA.icon_state
blend_mode = BA.blend_mode || blend_mode
offset_x = BA.pixel_x_offset
offset_y = BA.pixel_y_offset
// If the body accessory has an underlay, account for it.
if(BA.has_behind)
underlay = new(icon, "[icon_state]_BEHIND")
else if(current_species.bodyflags & HAS_TAIL)
icon = "icons/effects/species.dmi"
if(coloured_tail)
tail_icon_state = "[coloured_tail]_s"
icon_state = "[coloured_tail]_s"
else
tail_icon_state = "[current_species.tail]_s"
icon_state = "[current_species.tail]_s"
if(icon)
var/icon/temp = new(icon, icon_state)
if(current_species.bodyflags & HAS_SKIN_COLOR)
temp.Blend(s_colour, blend_mode)
if(current_species.bodyflags & HAS_TAIL_MARKINGS)
var/tail_marking = m_styles["tail"]
var/datum/sprite_accessory/body_markings/BM = GLOB.marking_styles_list[tail_marking]
if(BM)
var/icon/t_marking_s = new(BM.icon, "[BM.icon_state]_s")
t_marking_s.Blend(m_colours["tail"], ICON_ADD)
temp.Blend(t_marking_s, ICON_OVERLAY)
var/icon/temp = new/icon("icon" = tail_icon, "icon_state" = tail_icon_state)
if(tail_shift_x)
temp.Shift(EAST, tail_shift_x)
if(tail_shift_y)
temp.Shift(NORTH, tail_shift_y)
// Body accessory has an underlay, add it too.
if(underlay)
ICON_SHIFT_XY(underlay, offset_x, offset_y)
preview_icon.Blend(underlay, ICON_UNDERLAY)
if(current_species && (current_species.bodyflags & HAS_SKIN_COLOR))
temp.Blend(s_colour, blend_mode)
if(current_species && (current_species.bodyflags & HAS_TAIL_MARKINGS))
var/tail_marking = m_styles["tail"]
var/datum/sprite_accessory/tail_marking_style = GLOB.marking_styles_list[tail_marking]
if(tail_marking_style && tail_marking_style.species_allowed)
var/icon/t_marking_s = new/icon("icon" = tail_marking_style.icon, "icon_state" = "[tail_marking_style.icon_state]_s")
t_marking_s.Blend(m_colours["tail"], ICON_ADD)
temp.Blend(t_marking_s, ICON_OVERLAY)
preview_icon.Blend(temp, ICON_OVERLAY)
ICON_SHIFT_XY(temp, offset_x, offset_y)
preview_icon.Blend(temp, ICON_OVERLAY)
//Markings
if(current_species && ((current_species.bodyflags & HAS_HEAD_MARKINGS) || (current_species.bodyflags & HAS_BODY_MARKINGS)))
@@ -1490,7 +1499,7 @@
qdel(socks_s)
qdel(clothes_s)
#undef ICON_SHIFT_XY
/datum/character_save/proc/get_gear_metadata(datum/gear/G) // NYI
. = loadout_gear[G.type]
@@ -216,7 +216,7 @@
if(new_age)
active_character.age = max(min(round(text2num(new_age)), AGE_MAX),AGE_MIN)
if("species")
var/list/new_species = list("Human", "Tajaran", "Skrell", "Unathi", "Diona", "Vulpkanin")
var/list/new_species = list("Human", "Tajaran", "Skrell", "Unathi", "Diona", "Vulpkanin", "Nian")
var/prev_species = active_character.species
for(var/_species in GLOB.whitelisted_species)
@@ -290,8 +290,7 @@
active_character.alt_head = "None" //No alt heads on species that don't have them.
active_character.speciesprefs = 0 //My Vox tank shouldn't change how my future Grey talks.
active_character.body_accessory = null //no vulptail on humans damnit
active_character.body_accessory = random_body_accessory(NS.name, NS.optional_body_accessory)
//Reset prosthetics.
active_character.organ_data = list()
@@ -544,11 +543,14 @@
else
for(var/B in GLOB.body_accessory_by_name)
var/datum/body_accessory/accessory = GLOB.body_accessory_by_name[B]
if(!istype(accessory))
possible_body_accessories += "None" //the only null entry should be the "None" option
if(isnull(accessory)) // None
continue
if(active_character.species in accessory.allowed_species)
possible_body_accessories += B
if(S.optional_body_accessory)
possible_body_accessories += "None" //the only null entry should be the "None" option
else
possible_body_accessories -= "None" // in case an admin is viewing it
sortTim(possible_body_accessories, /proc/cmp_text_asc)
var/new_body_accessory = input(user, "Choose your body accessory:", "Character Preference") as null|anything in possible_body_accessories
if(new_body_accessory)
+24 -24
View File
@@ -227,37 +227,37 @@ GLOBAL_LIST_INIT(special_role_times, list( //minimum age (in days) for accounts
dat += "<b>Tail Markings:</b> "
dat += "<a href='?_src_=prefs;preference=m_style_tail;task=input'>[active_character.m_styles["tail"]]</a>"
dat += "<a href='?_src_=prefs;preference=m_tail_colour;task=input'>Color</a> [color_square(active_character.m_colours["tail"])]<br>"
if(!(S.bodyflags & BALD))
dat += "<b>Hair:</b> "
dat += "<a href='?_src_=prefs;preference=h_style;task=input'>[active_character.h_style]</a>"
dat += "<a href='?_src_=prefs;preference=hair;task=input'>Color</a> [color_square(active_character.h_colour)]"
var/datum/sprite_accessory/temp_hair_style = GLOB.hair_styles_public_list[active_character.h_style]
if(temp_hair_style && temp_hair_style.secondary_theme && !temp_hair_style.no_sec_colour)
dat += " <a href='?_src_=prefs;preference=secondary_hair;task=input'>Color #2</a> [color_square(active_character.h_sec_colour)]"
// Hair gradient
dat += "<br>"
dat += "- <b>Gradient:</b>"
dat += " <a href='?_src_=prefs;preference=h_grad_style;task=input'>[active_character.h_grad_style]</a>"
dat += " <a href='?_src_=prefs;preference=h_grad_colour;task=input'>Color</a> [color_square(active_character.h_grad_colour)]"
dat += " <a href='?_src_=prefs;preference=h_grad_alpha;task=input'>[active_character.h_grad_alpha]</a>"
dat += "<br>"
dat += "- <b>Gradient Offset:</b> <a href='?_src_=prefs;preference=h_grad_offset;task=input'>[active_character.h_grad_offset_x],[active_character.h_grad_offset_y]</a>"
dat += "<br>"
dat += "<b>Hair:</b> "
dat += "<a href='?_src_=prefs;preference=h_style;task=input'>[active_character.h_style]</a>"
dat += "<a href='?_src_=prefs;preference=hair;task=input'>Color</a> [color_square(active_character.h_colour)]"
var/datum/sprite_accessory/temp_hair_style = GLOB.hair_styles_public_list[active_character.h_style]
if(temp_hair_style && temp_hair_style.secondary_theme && !temp_hair_style.no_sec_colour)
dat += " <a href='?_src_=prefs;preference=secondary_hair;task=input'>Color #2</a> [color_square(active_character.h_sec_colour)]"
// Hair gradient
dat += "<br>"
dat += "- <b>Gradient:</b>"
dat += " <a href='?_src_=prefs;preference=h_grad_style;task=input'>[active_character.h_grad_style]</a>"
dat += " <a href='?_src_=prefs;preference=h_grad_colour;task=input'>Color</a> [color_square(active_character.h_grad_colour)]"
dat += " <a href='?_src_=prefs;preference=h_grad_alpha;task=input'>[active_character.h_grad_alpha]</a>"
dat += "<br>"
dat += "- <b>Gradient Offset:</b> <a href='?_src_=prefs;preference=h_grad_offset;task=input'>[active_character.h_grad_offset_x],[active_character.h_grad_offset_y]</a>"
dat += "<br>"
dat += "<b>Facial Hair:</b> "
dat += "<a href='?_src_=prefs;preference=f_style;task=input'>[active_character.f_style ? "[active_character.f_style]" : "Shaved"]</a>"
dat += "<a href='?_src_=prefs;preference=facial;task=input'>Color</a> [color_square(active_character.f_colour)]"
var/datum/sprite_accessory/temp_facial_hair_style = GLOB.facial_hair_styles_list[active_character.f_style]
if(temp_facial_hair_style && temp_facial_hair_style.secondary_theme && !temp_facial_hair_style.no_sec_colour)
dat += " <a href='?_src_=prefs;preference=secondary_facial;task=input'>Color #2</a> [color_square(active_character.f_sec_colour)]"
dat += "<br>"
dat += "<b>Facial Hair:</b> "
dat += "<a href='?_src_=prefs;preference=f_style;task=input'>[active_character.f_style ? "[active_character.f_style]" : "Shaved"]</a>"
dat += "<a href='?_src_=prefs;preference=facial;task=input'>Color</a> [color_square(active_character.f_colour)]"
var/datum/sprite_accessory/temp_facial_hair_style = GLOB.facial_hair_styles_list[active_character.f_style]
if(temp_facial_hair_style && temp_facial_hair_style.secondary_theme && !temp_facial_hair_style.no_sec_colour)
dat += " <a href='?_src_=prefs;preference=secondary_facial;task=input'>Color #2</a> [color_square(active_character.f_sec_colour)]"
dat += "<br>"
if(!(S.bodyflags & ALL_RPARTS))
dat += "<b>Eyes:</b> "
dat += "<a href='?_src_=prefs;preference=eyes;task=input'>Color</a> [color_square(active_character.e_colour)]<br>"
if((S.bodyflags & HAS_SKIN_COLOR) || GLOB.body_accessory_by_species[active_character.species] || check_rights(R_ADMIN, 0, user)) //admins can always fuck with this, because they are admins
if((S.bodyflags & HAS_SKIN_COLOR) || ((S.bodyflags & HAS_BODYACC_COLOR) && GLOB.body_accessory_by_species[active_character.species]) || check_rights(R_ADMIN, 0, user)) //admins can always fuck with this, because they are admins
dat += "<b>Body Color:</b> "
dat += "<a href='?_src_=prefs;preference=skin;task=input'>Color</a> [color_square(active_character.s_colour)]<br>"