Merge branch 'master' of https://github.com/ParadiseSS13/Paradise into lavaland_megafauna

# Conflicts:
#	code/modules/mob/living/carbon/human/appearance.dm
This commit is contained in:
Markolie
2016-10-25 18:31:39 +02:00
76 changed files with 3450 additions and 2389 deletions
+42 -22
View File
@@ -30,19 +30,27 @@
#define DNA_UI_HACC_R 11
#define DNA_UI_HACC_G 12
#define DNA_UI_HACC_B 13
#define DNA_UI_MARK_R 14
#define DNA_UI_MARK_G 15
#define DNA_UI_MARK_B 16
#define DNA_UI_EYES_R 17
#define DNA_UI_EYES_G 18
#define DNA_UI_EYES_B 19
#define DNA_UI_GENDER 20
#define DNA_UI_BEARD_STYLE 21
#define DNA_UI_HAIR_STYLE 22
#define DNA_UI_HEAD_MARK_R 14
#define DNA_UI_HEAD_MARK_G 15
#define DNA_UI_HEAD_MARK_B 16
#define DNA_UI_BODY_MARK_R 17
#define DNA_UI_BODY_MARK_G 18
#define DNA_UI_BODY_MARK_B 19
#define DNA_UI_TAIL_MARK_R 20
#define DNA_UI_TAIL_MARK_G 21
#define DNA_UI_TAIL_MARK_B 22
#define DNA_UI_EYES_R 23
#define DNA_UI_EYES_G 24
#define DNA_UI_EYES_B 25
#define DNA_UI_GENDER 26
#define DNA_UI_BEARD_STYLE 27
#define DNA_UI_HAIR_STYLE 28
/*#define DNA_UI_BACC_STYLE 23*/
#define DNA_UI_HACC_STYLE 23
#define DNA_UI_MARK_STYLE 24
#define DNA_UI_LENGTH 24 // Update this when you add something, or you WILL break shit.
#define DNA_UI_HACC_STYLE 29
#define DNA_UI_HEAD_MARK_STYLE 30
#define DNA_UI_BODY_MARK_STYLE 31
#define DNA_UI_TAIL_MARK_STYLE 32
#define DNA_UI_LENGTH 32 // Update this when you add something, or you WILL break shit.
#define DNA_SE_LENGTH 55 // Was STRUCDNASIZE, size 27. 15 new blocks added = 42, plus room to grow.
@@ -128,16 +136,18 @@ var/global/list/bad_blocks[0]
var/obj/item/organ/external/head/H = character.get_organ("head")
var/obj/item/organ/internal/eyes/eyes_organ = character.get_int_organ(/obj/item/organ/internal/eyes)
/*// Body Accessory
if(!character.body_accessory)
character.body_accessory = null
var/bodyacc = character.body_accessory*/
// Markings
if(!character.m_style)
character.m_style = "None"
var/marks = marking_styles_list.Find(character.m_style)
if(!character.m_styles)
character.m_styles = DEFAULT_MARKING_STYLES
var/head_marks = marking_styles_list.Find(character.m_styles["head"])
var/body_marks = marking_styles_list.Find(character.m_styles["body"])
var/tail_marks = marking_styles_list.Find(character.m_styles["tail"])
head_traits_to_dna(H)
eye_color_to_dna(eyes_organ)
@@ -146,15 +156,25 @@ var/global/list/bad_blocks[0]
SetUIValueRange(DNA_UI_SKIN_G, character.g_skin, 255, 1)
SetUIValueRange(DNA_UI_SKIN_B, character.b_skin, 255, 1)
SetUIValueRange(DNA_UI_MARK_R, character.r_markings, 255, 1)
SetUIValueRange(DNA_UI_MARK_G, character.g_markings, 255, 1)
SetUIValueRange(DNA_UI_MARK_B, character.b_markings, 255, 1)
SetUIValueRange(DNA_UI_HEAD_MARK_R, color2R(character.m_colours["head"]), 255, 1)
SetUIValueRange(DNA_UI_HEAD_MARK_G, color2G(character.m_colours["head"]), 255, 1)
SetUIValueRange(DNA_UI_HEAD_MARK_B, color2B(character.m_colours["head"]), 255, 1)
SetUIValueRange(DNA_UI_SKIN_TONE, 35-character.s_tone, 220, 1) // Value can be negative.
SetUIValueRange(DNA_UI_BODY_MARK_R, color2R(character.m_colours["body"]), 255, 1)
SetUIValueRange(DNA_UI_BODY_MARK_G, color2G(character.m_colours["body"]), 255, 1)
SetUIValueRange(DNA_UI_BODY_MARK_B, color2B(character.m_colours["body"]), 255, 1)
SetUIState(DNA_UI_GENDER, character.gender!=MALE, 1)
SetUIValueRange(DNA_UI_TAIL_MARK_R, color2R(character.m_colours["tail"]), 255, 1)
SetUIValueRange(DNA_UI_TAIL_MARK_G, color2G(character.m_colours["tail"]), 255, 1)
SetUIValueRange(DNA_UI_TAIL_MARK_B, color2B(character.m_colours["tail"]), 255, 1)
SetUIValueRange(DNA_UI_SKIN_TONE, 35-character.s_tone, 220, 1) // Value can be negative.
SetUIState(DNA_UI_GENDER, character.gender!=MALE, 1)
/*SetUIValueRange(DNA_UI_BACC_STYLE, bodyacc, facial_hair_styles_list.len, 1)*/
SetUIValueRange(DNA_UI_MARK_STYLE, marks, marking_styles_list.len, 1)
SetUIValueRange(DNA_UI_HEAD_MARK_STYLE, head_marks, marking_styles_list.len, 1)
SetUIValueRange(DNA_UI_BODY_MARK_STYLE, body_marks, marking_styles_list.len, 1)
SetUIValueRange(DNA_UI_TAIL_MARK_STYLE, tail_marks, marking_styles_list.len, 1)
UpdateUI()
+31 -10
View File
@@ -138,9 +138,9 @@
H.g_skin = dna.GetUIValueRange(DNA_UI_SKIN_G, 255)
H.b_skin = dna.GetUIValueRange(DNA_UI_SKIN_B, 255)
H.r_markings = dna.GetUIValueRange(DNA_UI_MARK_R, 255)
H.g_markings = dna.GetUIValueRange(DNA_UI_MARK_G, 255)
H.b_markings = dna.GetUIValueRange(DNA_UI_MARK_B, 255)
H.m_colours["head"] = rgb(dna.GetUIValueRange(DNA_UI_HEAD_MARK_R, 255), dna.GetUIValueRange(DNA_UI_HEAD_MARK_G, 255), dna.GetUIValueRange(DNA_UI_HEAD_MARK_B, 255))
H.m_colours["body"] = rgb(dna.GetUIValueRange(DNA_UI_BODY_MARK_R, 255), dna.GetUIValueRange(DNA_UI_BODY_MARK_G, 255), dna.GetUIValueRange(DNA_UI_BODY_MARK_B, 255))
H.m_colours["tail"] = rgb(dna.GetUIValueRange(DNA_UI_TAIL_MARK_R, 255), dna.GetUIValueRange(DNA_UI_TAIL_MARK_G, 255), dna.GetUIValueRange(DNA_UI_TAIL_MARK_B, 255))
H.s_tone = 35 - dna.GetUIValueRange(DNA_UI_SKIN_TONE, 220) // Value can be negative.
@@ -149,16 +149,37 @@
else
H.change_gender(MALE, 0)
//Markings
var/marks = dna.GetUIValueRange(DNA_UI_MARK_STYLE,marking_styles_list.len)
if((0 < marks) && (marks <= marking_styles_list.len))
H.m_style = marking_styles_list[marks]
var/number_head_marks = 0
var/number_body_marks = 0
var/number_tail_marks = 0
for(var/m in marking_styles_list)
var/datum/sprite_accessory/body_markings/marking = marking_styles_list[m]
if(marking.marking_location == "head")
number_head_marks++
else if(marking.marking_location == "body")
number_body_marks++
else if(marking.marking_location == "tail")
number_tail_marks++
//Head Markings
var/head_marks = dna.GetUIValueRange(DNA_UI_HEAD_MARK_STYLE, marking_styles_list.len)
if((head_marks > 0) && (head_marks <= number_head_marks))
H.m_styles["head"] = marking_styles_list[head_marks]
//Body Markings
var/body_marks = dna.GetUIValueRange(DNA_UI_BODY_MARK_STYLE, marking_styles_list.len)
if((body_marks > 0) && (body_marks <= number_body_marks))
H.m_styles["body"] = marking_styles_list[body_marks]
//Tail Markings
var/tail_marks = dna.GetUIValueRange(DNA_UI_TAIL_MARK_STYLE, marking_styles_list.len)
if((tail_marks > 0) && (tail_marks <= number_tail_marks))
H.m_styles["tail"] = marking_styles_list[tail_marks]
H.force_update_limbs()
H.update_eyes()
H.update_hair()
H.update_fhair()
H.update_markings()
H.update_tail_layer()
H.update_head_accessory()
return 1
@@ -178,7 +199,7 @@
//Hair
var/hair = GetUIValueRange(DNA_UI_HAIR_STYLE,hair_styles_list.len)
if((0 < hair) && (hair <= hair_styles_list.len))
if((hair > 0) && (hair <= hair_styles_list.len))
head_organ.h_style = hair_styles_list[hair]
head_organ.r_hair = GetUIValueRange(DNA_UI_HAIR_R, 255)
@@ -187,7 +208,7 @@
//Facial Hair
var/beard = GetUIValueRange(DNA_UI_BEARD_STYLE,facial_hair_styles_list.len)
if((0 < beard) && (beard <= facial_hair_styles_list.len))
if((beard > 0) && (beard <= facial_hair_styles_list.len))
head_organ.f_style = facial_hair_styles_list[beard]
head_organ.r_facial = GetUIValueRange(DNA_UI_BEARD_R, 255)
@@ -196,7 +217,7 @@
//Head Accessories
var/headacc = GetUIValueRange(DNA_UI_HACC_STYLE,head_accessory_styles_list.len)
if((0 < headacc) && (headacc <= head_accessory_styles_list.len))
if((headacc > 0) && (headacc <= head_accessory_styles_list.len))
head_organ.ha_style = head_accessory_styles_list[headacc]
head_organ.r_headacc = GetUIValueRange(DNA_UI_HACC_R, 255)
+66 -38
View File
@@ -54,10 +54,14 @@
eyes_blue = eyes_organ.eye_colour[3]
var/new_eyes = input("Please select eye color.", "Character Generation", rgb(eyes_red,eyes_green,eyes_blue)) as null|color
if(new_eyes)
eyes_red = hex2num(copytext(new_eyes, 2, 4))
eyes_green = hex2num(copytext(new_eyes, 4, 6))
eyes_blue = hex2num(copytext(new_eyes, 6, 8))
M.change_eye_color(eyes_red, eyes_green, eyes_blue)
M.change_eye_color(color2R(new_eyes), color2G(new_eyes), color2B(new_eyes))
//Alt heads.
if(head_organ.species.bodyflags & HAS_ALT_HEADS)
var/list/valid_alt_heads = M.generate_valid_alt_heads()
var/new_alt_head = input("Please select alternate head", "Character Generation", head_organ.alt_head) as null|anything in valid_alt_heads
if(new_alt_head)
M.change_alt_head(new_alt_head)
// hair
var/list/valid_hairstyles = M.generate_valid_hairstyles()
@@ -65,52 +69,45 @@
// if new style selected (not cancel)
if(new_style)
head_organ.h_style = new_style
M.change_hair(new_style)
var/new_hair = input("Please select hair color.", "Character Generation", rgb(head_organ.r_hair, head_organ.g_hair, head_organ.b_hair)) as null|color
if(new_hair)
head_organ.r_hair = hex2num(copytext(new_hair, 2, 4))
head_organ.g_hair = hex2num(copytext(new_hair, 4, 6))
head_organ.b_hair = hex2num(copytext(new_hair, 6, 8))
M.change_hair_color(color2R(new_hair), color2G(new_hair), color2B(new_hair))
var/datum/sprite_accessory/hair_style = hair_styles_list[head_organ.h_style]
if(hair_style.secondary_theme && !hair_style.no_sec_colour)
new_hair = input("Please select secondary hair color.", "Character Generation", rgb(head_organ.r_hair_sec, head_organ.g_hair_sec, head_organ.b_hair_sec)) as null|color
if(new_hair)
M.change_hair_color(color2R(new_hair), color2G(new_hair), color2B(new_hair), 1)
// facial hair
var/list/valid_facial_hairstyles = M.generate_valid_facial_hairstyles()
new_style = input("Please select facial style", "Character Generation", head_organ.f_style) as null|anything in valid_facial_hairstyles
if(new_style)
head_organ.f_style = new_style
M.change_facial_hair(new_style)
var/new_facial = input("Please select facial hair color.", "Character Generation", rgb(head_organ.r_facial, head_organ.g_facial, head_organ.b_facial)) as null|color
if(new_facial)
head_organ.r_facial = hex2num(copytext(new_facial, 2, 4))
head_organ.g_facial = hex2num(copytext(new_facial, 4, 6))
head_organ.b_facial = hex2num(copytext(new_facial, 6, 8))
M.change_facial_hair_color(color2R(new_facial), color2G(new_facial), color2B(new_facial))
var/datum/sprite_accessory/facial_hair_style = facial_hair_styles_list[head_organ.f_style]
if(facial_hair_style.secondary_theme && !facial_hair_style.no_sec_colour)
new_facial = input("Please select secondary facial hair color.", "Character Generation", rgb(head_organ.r_facial_sec, head_organ.g_facial_sec, head_organ.b_facial_sec)) as null|color
if(new_facial)
M.change_facial_hair_color(color2R(new_facial), color2G(new_facial), color2B(new_facial), 1)
//Head accessory.
if(head_organ.species.bodyflags & HAS_HEAD_ACCESSORY)
var/list/valid_head_accessories = M.generate_valid_head_accessories()
var/new_head_accessory = input("Please select head accessory style", "Character Generation", head_organ.ha_style) as null|anything in valid_head_accessories
if(new_head_accessory)
head_organ.ha_style = new_head_accessory
M.change_head_accessory(new_head_accessory)
var/new_head_accessory_colour = input("Please select head accessory colour.", "Character Generation", rgb(head_organ.r_headacc, head_organ.g_headacc, head_organ.b_headacc)) as null|color
if(new_head_accessory_colour)
head_organ.r_headacc = hex2num(copytext(new_head_accessory_colour, 2, 4))
head_organ.g_headacc = hex2num(copytext(new_head_accessory_colour, 4, 6))
head_organ.b_headacc = hex2num(copytext(new_head_accessory_colour, 6, 8))
//Body markings.
if(M.species.bodyflags & HAS_MARKINGS)
var/list/valid_markings = M.generate_valid_markings()
var/new_marking = input("Please select marking style", "Character Generation", M.m_style) as null|anything in valid_markings
if(new_marking)
M.m_style = new_marking
var/new_marking_colour = input("Please select marking colour.", "Character Generation", rgb(M.r_markings, M.g_markings, M.b_markings)) as null|color
if(new_marking_colour)
M.r_markings = hex2num(copytext(new_marking_colour, 2, 4))
M.g_markings = hex2num(copytext(new_marking_colour, 4, 6))
M.b_markings = hex2num(copytext(new_marking_colour, 6, 8))
M.change_head_accessory_color(color2R(new_head_accessory_colour), color2G(new_head_accessory_colour), color2B(new_head_accessory_colour))
//Body accessory.
if(M.species.tail && M.species.bodyflags & HAS_TAIL)
@@ -118,18 +115,51 @@
if(valid_body_accessories.len > 1) //By default valid_body_accessories will always have at the very least a 'none' entry populating the list, even if the user's species is not present in any of the list items.
var/new_body_accessory = input("Please select body accessory style", "Character Generation", M.body_accessory) as null|anything in valid_body_accessories
if(new_body_accessory)
M.body_accessory = body_accessory_by_name[new_body_accessory]
M.change_body_accessory(new_body_accessory)
//Head markings.
if(M.species.bodyflags & HAS_HEAD_MARKINGS)
var/list/valid_head_markings = M.generate_valid_markings("head")
var/new_marking = input("Please select head marking style", "Character Generation", M.m_styles["head"]) as null|anything in valid_head_markings
if(new_marking)
M.change_markings(new_marking, "head")
var/new_marking_colour = input("Please select head marking colour.", "Character Generation", M.m_colours["head"]) as null|color
if(new_marking_colour)
M.change_marking_color(new_marking_colour, "head")
//Body markings.
if(M.species.bodyflags & HAS_BODY_MARKINGS)
var/list/valid_body_markings = M.generate_valid_markings("body")
var/new_marking = input("Please select body marking style", "Character Generation", M.m_styles["body"]) as null|anything in valid_body_markings
if(new_marking)
M.change_markings(new_marking, "body")
var/new_marking_colour = input("Please select body marking colour.", "Character Generation", M.m_colours["body"]) as null|color
if(new_marking_colour)
M.change_marking_color(new_marking_colour, "body")
//Tail markings.
if(M.species.bodyflags & HAS_TAIL_MARKINGS)
var/list/valid_tail_markings = M.generate_valid_markings("tail")
var/new_marking = input("Please select tail marking style", "Character Generation", M.m_styles["tail"]) as null|anything in valid_tail_markings
if(new_marking)
M.change_markings(new_marking, "tail")
var/new_marking_colour = input("Please select tail marking colour.", "Character Generation", M.m_colours["tail"]) as null|color
if(new_marking_colour)
M.change_marking_color(new_marking_colour, "tail")
//Skin tone.
if(M.species.bodyflags & HAS_SKIN_TONE)
var/new_tone = input("Please select skin tone level: 1-220 (1=albino, 35=caucasian, 150=black, 220='very' black)", "Character Generation", M.s_tone) as null|text
if(!new_tone)
new_tone = 35
M.s_tone = 35 - max(min(round(text2num(new_tone)), 220), 1)
else
new_tone = 35 - max(min(round(text2num(new_tone)), 220), 1)
M.change_skin_tone(new_tone)
if(M.species.bodyflags & HAS_ICON_SKIN_TONE)
var/prompt = "Please select skin tone: 1-[M.species.icon_skin_tones.len] ("
for(var/i = 1; i <= M.species.icon_skin_tones.len; i++)
for(var/i = 1 to M.species.icon_skin_tones.len)
prompt += "[i] = [M.species.icon_skin_tones[i]]"
if(i != M.species.icon_skin_tones.len)
prompt += ", "
@@ -138,18 +168,16 @@
var/new_tone = input(prompt, "Character Generation", M.s_tone) as null|text
if(!new_tone)
new_tone = 0
M.s_tone = max(min(round(text2num(new_tone)), M.species.icon_skin_tones.len), 1)
else
new_tone = max(min(round(text2num(new_tone)), M.species.icon_skin_tones.len), 1)
M.change_skin_tone(new_tone)
//Skin colour.
if(M.species.bodyflags & HAS_SKIN_COLOR)
var/new_body_colour = input("Please select body colour.", "Character Generation", rgb(M.r_skin, M.g_skin, M.b_skin)) as null|color
if(new_body_colour)
M.r_skin = hex2num(copytext(new_body_colour, 2, 4))
M.g_skin = hex2num(copytext(new_body_colour, 4, 6))
M.b_skin = hex2num(copytext(new_body_colour, 6, 8))
M.change_skin_color(color2R(new_body_colour), color2G(new_body_colour), color2B(new_body_colour))
M.force_update_limbs()
M.regenerate_icons()
M.update_dna()
M.visible_message("<span class='notice'>[src] morphs and changes [M.get_visible_gender() == MALE ? "his" : M.get_visible_gender() == FEMALE ? "her" : "their"] appearance!</span>", "<span class='notice'>You change your appearance!</span>", "<span class='warning'>Oh, god! What the hell was that? It sounded like flesh getting squished and bone ground into a different shape!</span>")
+7 -10
View File
@@ -160,16 +160,13 @@ proc/issyndicate(mob/living/M as mob)
if(prob(5))
facial_hair_style = pick(facial_hair_styles_list)
head_organ.r_facial = hex2num(copytext(hair_c, 2, 4))
head_organ.g_facial = hex2num(copytext(hair_c, 4, 6))
head_organ.b_facial = hex2num(copytext(hair_c, 6, 8))
head_organ.r_hair = hex2num(copytext(hair_c, 2, 4))
head_organ.g_hair = hex2num(copytext(hair_c, 4, 6))
head_organ.b_hair = hex2num(copytext(hair_c, 6, 8))
var/eyes_red = hex2num(copytext(eye_c, 2, 4))
var/eyes_green = hex2num(copytext(eye_c, 4, 6))
var/eyes_blue = hex2num(copytext(eye_c, 6, 8))
M.change_eye_color(eyes_red, eyes_green, eyes_blue)
head_organ.r_facial = color2R(hair_c)
head_organ.g_facial = color2G(hair_c)
head_organ.b_facial = color2B(hair_c)
head_organ.r_hair = color2R(hair_c)
head_organ.g_hair = color2G(hair_c)
head_organ.b_hair = color2B(hair_c)
M.change_eye_color(color2R(eye_c), color2G(eye_c), color2B(eye_c))
M.s_tone = skin_tone
head_organ.h_style = hair_style
head_organ.f_style = facial_hair_style
-1
View File
@@ -129,7 +129,6 @@ var/const/access_trade_sol = 160
return 0
/obj/item/proc/GetAccess()
return list()
+33 -30
View File
@@ -1,9 +1,12 @@
#define COMM_SCREEN_MAIN 1
#define COMM_SCREEN_STAT 2
#define COMM_SCREEN_MESSAGES 3
#define COMM_SCREEN_SECLEVEL 4
#define COMM_AUTHENTICATION_NONE 0
#define COMM_AUTHENTICATION_MIN 1
#define COMM_AUTHENTICATION_MAX 2
// The communications computer
/obj/machinery/computer/communications
name = "communications console"
@@ -13,7 +16,7 @@
req_access = list(access_heads)
circuit = /obj/item/weapon/circuitboard/communications
var/prints_intercept = 1
var/authenticated = 0
var/authenticated = COMM_AUTHENTICATION_NONE
var/list/messagetitle = list()
var/list/messagetext = list()
var/currmsg = 0
@@ -39,16 +42,16 @@
crew_announcement.newscast = 1
/obj/machinery/computer/communications/proc/is_authenticated(var/mob/user, var/message = 1)
if(authenticated == 2)
return 2
if(authenticated == COMM_AUTHENTICATION_MAX)
return COMM_AUTHENTICATION_MAX
else if(user.can_admin_interact())
return 2
return COMM_AUTHENTICATION_MAX
else if(authenticated)
return 1
return COMM_AUTHENTICATION_MIN
else
if(message)
to_chat(user, "<span class='warning'>Access denied.</span>")
return 0
return COMM_AUTHENTICATION_NONE
/obj/machinery/computer/communications/Topic(href, href_list)
if(..(href, href_list))
@@ -62,23 +65,23 @@
if(!ishuman(usr))
to_chat(usr, "<span class='warning'>Access denied.</span>")
return
var/mob/living/carbon/human/M = usr
var/obj/item/card = M.get_active_hand()
var/obj/item/weapon/card/id/I = (card && card.GetID())||M.wear_id||M.wear_pda
if(istype(I, /obj/item/device/pda))
var/obj/item/device/pda/pda = I
I = pda.id
if(I && istype(I))
if(src.check_access(I))
authenticated = 1
if(access_captain in I.access)
authenticated = 2
crew_announcement.announcer = GetNameAndAssignmentFromId(I)
var/list/access = usr.get_access()
if(allowed(usr))
authenticated = COMM_AUTHENTICATION_MIN
if(access_captain in access)
authenticated = COMM_AUTHENTICATION_MAX
var/mob/living/carbon/human/H = usr
var/obj/item/weapon/card/id = H.get_idcard(TRUE)
if(istype(id))
crew_announcement.announcer = GetNameAndAssignmentFromId(id)
nanomanager.update_uis(src)
return
if(href_list["logout"])
authenticated = 0
authenticated = COMM_AUTHENTICATION_NONE
crew_announcement.announcer = ""
setMenuState(usr,COMM_SCREEN_MAIN)
nanomanager.update_uis(src)
@@ -131,13 +134,13 @@
to_chat(usr, "<span class='warning'>You need to swipe your ID.</span>")
if("announce")
if(is_authenticated(usr) == 2)
if(is_authenticated(usr) == COMM_AUTHENTICATION_MAX)
if(message_cooldown)
to_chat(usr, "<span class='warning'>Please allow at least one minute to pass between announcements.</span>")
nanomanager.update_uis(src)
return
var/input = input(usr, "Please write a message to announce to the station crew.", "Priority Announcement")
if(!input || message_cooldown || ..() || !(is_authenticated(usr) == 2))
if(!input || message_cooldown || ..() || !(is_authenticated(usr) == COMM_AUTHENTICATION_MAX))
nanomanager.update_uis(src)
return
crew_announcement.Announce(input)
@@ -213,13 +216,13 @@
setMenuState(usr,COMM_SCREEN_STAT)
if("nukerequest")
if(is_authenticated(usr) == 2)
if(is_authenticated(usr) == COMM_AUTHENTICATION_MAX)
if(centcomm_message_cooldown)
to_chat(usr, "<span class='warning'>Arrays recycling. Please stand by.</span>")
nanomanager.update_uis(src)
return
var/input = stripped_input(usr, "Please enter the reason for requesting the nuclear self-destruct codes. Misuse of the nuclear request system will not be tolerated under any circumstances. Transmission does not guarantee a response.", "Self Destruct Code Request.","") as text|null
if(!input || ..() || !(is_authenticated(usr) == 2))
if(!input || ..() || !(is_authenticated(usr) == COMM_AUTHENTICATION_MAX))
nanomanager.update_uis(src)
return
Nuke_request(input, usr)
@@ -232,13 +235,13 @@
setMenuState(usr,COMM_SCREEN_MAIN)
if("MessageCentcomm")
if(is_authenticated(usr) == 2)
if(is_authenticated(usr) == COMM_AUTHENTICATION_MAX)
if(centcomm_message_cooldown)
to_chat(usr, "<span class='warning'>Arrays recycling. Please stand by.</span>")
nanomanager.update_uis(src)
return
var/input = stripped_input(usr, "Please choose a message to transmit to Centcomm via quantum entanglement. Please be aware that this process is very expensive, and abuse will lead to... termination. Transmission does not guarantee a response.", "To abort, send an empty message.", "") as text|null
if(!input || ..() || !(is_authenticated(usr) == 2))
if(!input || ..() || !(is_authenticated(usr) == COMM_AUTHENTICATION_MAX))
nanomanager.update_uis(src)
return
Centcomm_announce(input, usr)
@@ -251,13 +254,13 @@
// OMG SYNDICATE ...LETTERHEAD
if("MessageSyndicate")
if((is_authenticated(usr) == 2) && (src.emagged))
if((is_authenticated(usr) == COMM_AUTHENTICATION_MAX) && (src.emagged))
if(centcomm_message_cooldown)
to_chat(usr, "Arrays recycling. Please stand by.")
nanomanager.update_uis(src)
return
var/input = stripped_input(usr, "Please choose a message to transmit to \[ABNORMAL ROUTING CORDINATES\] via quantum entanglement. Please be aware that this process is very expensive, and abuse will lead to... termination. Transmission does not guarantee a response.", "To abort, send an empty message.", "") as text|null
if(!input || ..() || !(is_authenticated(usr) == 2))
if(!input || ..() || !(is_authenticated(usr) == COMM_AUTHENTICATION_MAX))
nanomanager.update_uis(src)
return
Syndicate_announce(input, usr)
@@ -518,7 +521,7 @@
return ..()
shuttle_master.emergency.request(null, 0.3, null, "All communication consoles, boards, and AI's have been destroyed.")
log_game("All the AIs, comm consoles and boards are destroyed. Shuttle called.")
message_admins("All the AIs, comm consoles and boards are destroyed. Shuttle called.", 1)
log_game("All the AI's, communication consoles and boards are destroyed. Shuttle called.")
message_admins("All the AI's, communication consoles and boards are destroyed. Shuttle called.", 1)
return ..()
@@ -4,7 +4,7 @@
name = "airlock electronics"
icon = 'icons/obj/doors/door_assembly.dmi'
icon_state = "door_electronics"
w_class = 2 //It should be tiny! -Agouri
w_class = 2
materials = list(MAT_METAL=50, MAT_GLASS=50)
req_access = list(access_engine)
@@ -12,101 +12,96 @@
var/list/conf_access = null
var/one_access = 0 //if set to 1, door would receive req_one_access instead of req_access
var/last_configurator = null
var/locked = 1
var/locked = TRUE
var/const/max_brain_damage = 60 // Maximum brain damage a mob can have until it can't use the electronics
attack_self(mob/user as mob)
if(!ishuman(user) && !istype(user,/mob/living/silicon/robot))
return ..(user)
/obj/item/weapon/airlock_electronics/attack_self(mob/user)
if(!ishuman(user) && !isrobot(user))
return ..()
if(ishuman(user))
var/mob/living/carbon/human/H = user
if(H.getBrainLoss() >= 60)
if(H.getBrainLoss() >= max_brain_damage)
to_chat(user, "<span class='warning'>You forget how to use \the [src].</span>")
return
var/t1 = text("<B>Access control</B><br>\n")
var/t1 = text("<B>Access control</B><br>\n")
if(last_configurator)
t1 += "Operator: [last_configurator]<br>"
if(last_configurator)
t1 += "Operator: [last_configurator]<br>"
if(locked)
t1 += "<a href='?src=[UID()];login=1'>Swipe ID</a><hr>"
else
t1 += "<a href='?src=[UID()];logout=1'>Block</a><hr>"
if(locked)
t1 += "<a href='?src=[UID()];login=1'>Swipe ID</a><hr>"
t1 += "Access requirement is set to "
t1 += one_access ? "<a style='color: green' href='?src=[UID()];one_access=1'>ONE</a><hr>" : "<a style='color: red' href='?src=[UID()];one_access=1'>ALL</a><hr>"
t1 += conf_access == null ? "<font color=red>All</font><br>" : "<a href='?src=[UID()];access=all'>All</a><br>"
t1 += "<br>"
var/list/accesses = get_all_accesses()
for(var/acc in accesses)
var/aname = get_access_desc(acc)
if(!conf_access || !conf_access.len || !(acc in conf_access))
t1 += "<a href='?src=[UID()];access=[acc]'>[aname]</a><br>"
else if(one_access)
t1 += "<a style='color: green' href='?src=[UID()];access=[acc]'>[aname]</a><br>"
else
t1 += "<a style='color: red' href='?src=[UID()];access=[acc]'>[aname]</a><br>"
t1 += "<p><a href='?src=[UID()];close=1'>Close</a></p>\n"
var/datum/browser/popup = new(user, "airlock_electronics", name, 400, 400)
popup.set_content(t1)
popup.open(0)
onclose(user, "airlock")
/obj/item/weapon/airlock_electronics/Topic(href, href_list)
..()
if(usr.incapacitated() || (!ishuman(usr) && !isrobot(usr)))
return 1
if(href_list["close"])
usr << browse(null, "window=airlock")
return
if(href_list["login"])
if(allowed(usr))
locked = FALSE
last_configurator = usr.name
if(locked)
return
if(href_list["logout"])
locked = TRUE
if(href_list["one_access"])
one_access = !one_access
if(href_list["access"])
toggle_access(href_list["access"])
attack_self(usr)
/obj/item/weapon/airlock_electronics/proc/toggle_access(var/access)
if(access == "all")
conf_access = null
else
var/req = text2num(access)
if(conf_access == null)
conf_access = list()
if(!(req in conf_access))
conf_access += req
else
t1 += "<a href='?src=[UID()];logout=1'>Block</a><hr>"
t1 += "Access requirement is set to "
t1 += one_access ? "<a style='color: green' href='?src=[UID()];one_access=1'>ONE</a><hr>" : "<a style='color: red' href='?src=[UID()];one_access=1'>ALL</a><hr>"
t1 += conf_access == null ? "<font color=red>All</font><br>" : "<a href='?src=[UID()];access=all'>All</a><br>"
t1 += "<br>"
var/list/accesses = get_all_accesses()
for(var/acc in accesses)
var/aname = get_access_desc(acc)
if(!conf_access || !conf_access.len || !(acc in conf_access))
t1 += "<a href='?src=[UID()];access=[acc]'>[aname]</a><br>"
else if(one_access)
t1 += "<a style='color: green' href='?src=[UID()];access=[acc]'>[aname]</a><br>"
else
t1 += "<a style='color: red' href='?src=[UID()];access=[acc]'>[aname]</a><br>"
t1 += "<p><a href='?src=[UID()];close=1'>Close</a></p>\n"
var/datum/browser/popup = new(user, "airlock_electronics", name, 400, 400)
popup.set_content(t1)
popup.open(0)
onclose(user, "airlock")
Topic(href, href_list)
..()
if(usr.stat || usr.restrained() || (!ishuman(usr) && !istype(usr,/mob/living/silicon)))
return
if(href_list["close"])
usr << browse(null, "window=airlock")
return
if(href_list["login"])
if(istype(usr,/mob/living/silicon))
src.locked = 0
src.last_configurator = usr.name
else
var/obj/item/I = usr.get_active_hand()
if(istype(I, /obj/item/device/pda))
var/obj/item/device/pda/pda = I
I = pda.id
if(I && src.check_access(I))
src.locked = 0
src.last_configurator = I:registered_name
if(locked)
return
if(href_list["logout"])
locked = 1
if(href_list["one_access"])
one_access = !one_access
if(href_list["access"])
toggle_access(href_list["access"])
attack_self(usr)
proc
toggle_access(var/acc)
if(acc == "all")
conf_access -= req
if(!conf_access.len)
conf_access = null
else
var/req = text2num(acc)
if(conf_access == null)
conf_access = list()
if(!(req in conf_access))
conf_access += req
else
conf_access -= req
if(!conf_access.len)
conf_access = null
+9 -9
View File
@@ -111,21 +111,21 @@
if(do_after(user, 50, target = H))
switch(what_to_dye)
if("hair")
var/r_hair = hex2num(copytext(dye_color, 2, 4))
var/g_hair = hex2num(copytext(dye_color, 4, 6))
var/b_hair = hex2num(copytext(dye_color, 6, 8))
var/r_hair = color2R(dye_color)
var/g_hair = color2G(dye_color)
var/b_hair = color2B(dye_color)
if(H.change_hair_color(r_hair, g_hair, b_hair))
H.update_dna()
if("facial hair")
var/r_facial = hex2num(copytext(dye_color, 2, 4))
var/g_facial = hex2num(copytext(dye_color, 4, 6))
var/b_facial = hex2num(copytext(dye_color, 6, 8))
var/r_facial = color2R(dye_color)
var/g_facial = color2G(dye_color)
var/b_facial = color2B(dye_color)
if(H.change_facial_hair_color(r_facial, g_facial, b_facial))
H.update_dna()
if("body")
var/r_skin = hex2num(copytext(dye_color, 2, 4))
var/g_skin = hex2num(copytext(dye_color, 4, 6))
var/b_skin = hex2num(copytext(dye_color, 6, 8))
var/r_skin = color2R(dye_color)
var/g_skin = color2G(dye_color)
var/b_skin = color2B(dye_color)
if(H.change_skin_color(r_skin, g_skin, b_skin))
H.update_dna()
user.visible_message("<span class='notice'>[user] finishes dying [M]'s [what_to_dye]!</span>", "<span class='notice'>You finish dying [M]'s [what_to_dye]!</span>")
@@ -16,41 +16,41 @@
var/icon_closed = "lockbox"
var/icon_broken = "lockbox+b"
attackby(obj/item/weapon/W as obj, mob/user as mob, params)
if(istype(W, /obj/item/weapon/card/id))
if(src.broken)
to_chat(user, "<span class='warning'>It appears to be broken.</span>")
return
if(src.allowed(user))
src.locked = !( src.locked )
if(src.locked)
src.icon_state = src.icon_locked
to_chat(user, "<span class='warning'>You lock the [src.name]!</span>")
return
else
src.icon_state = src.icon_closed
to_chat(user, "<span class='warning'>You unlock the [src.name]!</span>")
origin_tech = null //wipe out any origin tech if it's unlocked in any way so you can't double-dip tech levels at R&D.
return
else
to_chat(user, "<span class='warning'>Access Denied</span>")
else if((istype(W, /obj/item/weapon/card/emag) || istype(W, /obj/item/weapon/melee/energy/blade)) && !broken)
emag_act(user)
/obj/item/weapon/storage/lockbox/attackby(obj/item/weapon/W as obj, mob/user as mob, params)
if(istype(W, /obj/item/weapon/card/id) || istype(W, /obj/item/device/pda))
if(broken)
to_chat(user, "<span class='warning'>It appears to be broken.</span>")
return
if(!locked)
..()
if(check_access(W))
locked = !locked
if(locked)
icon_state = icon_locked
to_chat(user, "<span class='warning'>You lock \the [src]!</span>")
return
else
icon_state = icon_closed
to_chat(user, "<span class='warning'>You unlock \the [src]!</span>")
origin_tech = null //wipe out any origin tech if it's unlocked in any way so you can't double-dip tech levels at R&D.
return
else
to_chat(user, "<span class='warning'>It's locked!</span>")
to_chat(user, "<span class='warning'>Access denied.</span>")
return
else if((istype(W, /obj/item/weapon/card/emag) || (istype(W, /obj/item/weapon/melee/energy/blade)) && !broken))
emag_act(user)
return
if(!locked)
..()
else
to_chat(user, "<span class='warning'>It's locked!</span>")
return
show_to(mob/user as mob)
if(locked)
to_chat(user, "<span class='warning'>It's locked!</span>")
else
..()
return
/obj/item/weapon/storage/lockbox/show_to(mob/user as mob)
if(locked)
to_chat(user, "<span class='warning'>It's locked!</span>")
else
..()
return
/obj/item/weapon/storage/lockbox/can_be_inserted(obj/item/W as obj, stop_messages = 0)
if(!locked)
@@ -64,7 +64,7 @@
broken = 1
locked = 0
desc = "It appears to be broken."
icon_state = src.icon_broken
icon_state = icon_broken
to_chat(user, "<span class='notice'>You unlock \the [src].</span>")
origin_tech = null //wipe out any origin tech if it's unlocked in any way so you can't double-dip tech levels at R&D.
return
@@ -84,23 +84,21 @@
name = "Lockbox (Mindshield Implants)"
req_access = list(access_security)
New()
..()
new /obj/item/weapon/implantcase/loyalty(src)
new /obj/item/weapon/implantcase/loyalty(src)
new /obj/item/weapon/implantcase/loyalty(src)
new /obj/item/weapon/implanter/loyalty(src)
/obj/item/weapon/storage/lockbox/loyalty/New()
..()
new /obj/item/weapon/implantcase/loyalty(src)
new /obj/item/weapon/implantcase/loyalty(src)
new /obj/item/weapon/implantcase/loyalty(src)
new /obj/item/weapon/implanter/loyalty(src)
/obj/item/weapon/storage/lockbox/clusterbang
name = "lockbox (clusterbang)"
desc = "You have a bad feeling about opening this."
req_access = list(access_security)
New()
..()
new /obj/item/weapon/grenade/clusterbuster(src)
/obj/item/weapon/storage/lockbox/clusterbang/New()
..()
new /obj/item/weapon/grenade/clusterbuster(src)
/obj/item/weapon/storage/lockbox/medal
name = "medal box"
@@ -116,14 +114,14 @@
icon_closed = "medalbox"
icon_broken = "medalbox+b"
New()
..()
new /obj/item/clothing/accessory/medal/gold/heroism(src)
new /obj/item/clothing/accessory/medal/silver/security(src)
new /obj/item/clothing/accessory/medal/silver/valor(src)
new /obj/item/clothing/accessory/medal/nobel_science(src)
new /obj/item/clothing/accessory/medal/bronze_heart(src)
new /obj/item/clothing/accessory/medal/conduct(src)
new /obj/item/clothing/accessory/medal/conduct(src)
new /obj/item/clothing/accessory/medal/conduct(src)
new /obj/item/clothing/accessory/medal/gold/captain(src)
/obj/item/weapon/storage/lockbox/medal/New()
..()
new /obj/item/clothing/accessory/medal/gold/heroism(src)
new /obj/item/clothing/accessory/medal/silver/security(src)
new /obj/item/clothing/accessory/medal/silver/valor(src)
new /obj/item/clothing/accessory/medal/nobel_science(src)
new /obj/item/clothing/accessory/medal/bronze_heart(src)
new /obj/item/clothing/accessory/medal/conduct(src)
new /obj/item/clothing/accessory/medal/conduct(src)
new /obj/item/clothing/accessory/medal/conduct(src)
new /obj/item/clothing/accessory/medal/gold/captain(src)
+24 -7
View File
@@ -18,20 +18,37 @@
return
switch(choice)
if("Underwear")
var/new_undies = input(user, "Select your underwear", "Changing") as null|anything in underwear_list
if(new_undies)
H.underwear = new_undies
var/list/valid_underwear = list()
for(var/underwear in underwear_list)
var/datum/sprite_accessory/S = underwear_list[underwear]
if(!(H.species.name in S.species_allowed))
continue
valid_underwear[underwear] = underwear_list[underwear]
var/new_underwear = input(user, "Choose your underwear:", "Changing") as null|anything in valid_underwear
if(new_underwear)
H.underwear = new_underwear
if("Undershirt")
var/new_undershirt = input(user, "Select your undershirt", "Changing") as null|anything in undershirt_list
var/list/valid_undershirts = list()
for(var/undershirt in undershirt_list)
var/datum/sprite_accessory/S = undershirt_list[undershirt]
if(!(H.species.name in S.species_allowed))
continue
valid_undershirts[undershirt] = undershirt_list[undershirt]
var/new_undershirt = input(user, "Choose your undershirt:", "Changing") as null|anything in valid_undershirts
if(new_undershirt)
H.undershirt = new_undershirt
if("Socks")
var/new_socks = input(user, "Select your socks", "Changing") as null|anything in socks_list
var/list/valid_sockstyles = list()
for(var/sockstyle in socks_list)
var/datum/sprite_accessory/S = socks_list[sockstyle]
if(!(H.species.name in S.species_allowed))
continue
valid_sockstyles[sockstyle] = socks_list[sockstyle]
var/new_socks = input(user, "Choose your socks:", "Changing") as null|anything in valid_sockstyles
if(new_socks)
H.socks= new_socks
H.socks = new_socks
add_fingerprint(H)
H.update_body()
+7 -10
View File
@@ -167,16 +167,13 @@ var/ert_request_answered = 0
if(prob(5))
facial_hair_style = pick(facial_hair_styles_list)
head_organ.r_facial = hex2num(copytext(hair_c, 2, 4))
head_organ.g_facial = hex2num(copytext(hair_c, 4, 6))
head_organ.b_facial = hex2num(copytext(hair_c, 6, 8))
head_organ.r_hair = hex2num(copytext(hair_c, 2, 4))
head_organ.g_hair = hex2num(copytext(hair_c, 4, 6))
head_organ.b_hair = hex2num(copytext(hair_c, 6, 8))
var/eyes_red = hex2num(copytext(eye_c, 2, 4))
var/eyes_green = hex2num(copytext(eye_c, 4, 6))
var/eyes_blue = hex2num(copytext(eye_c, 6, 8))
M.change_eye_color(eyes_red, eyes_green, eyes_blue)
head_organ.r_facial = color2R(hair_c)
head_organ.g_facial = color2G(hair_c)
head_organ.b_facial = color2B(hair_c)
head_organ.r_hair = color2R(hair_c)
head_organ.g_hair = color2G(hair_c)
head_organ.b_hair = color2B(hair_c)
M.change_eye_color(color2R(eye_c), color2G(eye_c), color2B(eye_c))
M.s_tone = skin_tone
head_organ.h_style = hair_style
head_organ.f_style = facial_hair_style