Merge pull request #4705 from DJSnapshot/jumpsuits

Undershirts and rolling down jumpsuits!
This commit is contained in:
Ccomp5950
2014-04-07 02:12:59 -05:00
9 changed files with 60 additions and 2 deletions

View File

@@ -39,6 +39,8 @@ var/global/list/skin_styles_female_list = list() //unused
//Underwear
var/global/list/underwear_m = list("White", "Grey", "Green", "Blue", "Black", "Mankini", "None") //Curse whoever made male/female underwear diffrent colours
var/global/list/underwear_f = list("Red", "White", "Yellow", "Blue", "Black", "Thong", "None")
//undershirt
var/global/list/undershirt_t = list("Black Tank top", "White Tank top", "Black shirt", "White shirt", "None")
//Backpacks
var/global/list/backbaglist = list("Nothing", "Backpack", "Satchel", "Satchel Alt")

View File

@@ -54,6 +54,7 @@ datum/preferences
var/age = 30 //age of character
var/b_type = "A+" //blood type (not-chooseable)
var/underwear = 1 //underwear type
var/undershirt = 1 //undershirt type
var/backbag = 2 //backpack type
var/h_style = "Bald" //Hair type
var/r_hair = 0 //Hair color
@@ -338,6 +339,8 @@ datum/preferences
else
dat += "Underwear: <a href ='?_src_=prefs;preference=underwear;task=input'><b>[underwear_f[underwear]]</b></a><br>"
dat += "Undershirt: <a href='?_src_=prefs;preference=undershirt;task=input'><b>[undershirt_t[undershirt]]</b></a><br>"
dat += "Backpack Type:<br><a href ='?_src_=prefs;preference=bag;task=input'><b>[backbaglist[backbag]]</b></a><br>"
dat += "Nanotrasen Relation:<br><a href ='?_src_=prefs;preference=nt_relation;task=input'><b>[nanotrasen_relation]</b></a><br>"
@@ -843,6 +846,9 @@ datum/preferences
if("underwear")
underwear = rand(1,underwear_m.len)
ShowChoices(user)
if("undershirt")
undershirt = rand(1,undershirt_t.len)
ShowChoices(user)
if("eyes")
r_eyes = rand(0,255)
g_eyes = rand(0,255)
@@ -1019,6 +1025,15 @@ datum/preferences
underwear = underwear_options.Find(new_underwear)
ShowChoices(user)
if("undershirt")
var/list/undershirt_options
undershirt_options = undershirt_t
var/new_undershirt = input(user, "Choose your character's undershirt:", "Character Preference") as null|anything in undershirt_options
if (new_undershirt)
undershirt = undershirt_options.Find(new_undershirt)
ShowChoices(user)
if("eyes")
var/new_eyes = input(user, "Choose your character's eye colour:", "Character Preference") as color|null
if(new_eyes)
@@ -1295,6 +1310,10 @@ datum/preferences
underwear = 0 //I'm sure this is 100% unnecessary, but I'm paranoid... sue me. //HAH NOW NO MORE MAGIC CLONING UNDIES
character.underwear = underwear
if(undershirt > undershirt_t.len || undershirt < 1)
undershirt = 0
character.undershirt = undershirt
if(backbag > 4 || backbag < 1)
backbag = 1 //Same as above
character.backbag = backbag

View File

@@ -84,8 +84,6 @@
S["be_special"] << be_special
S["default_slot"] << default_slot
S["toggles"] << toggles
S["UI_style_color"] << UI_style_color
S["UI_style_alpha"] << UI_style_alpha
return 1
@@ -125,6 +123,7 @@
S["eyes_green"] >> g_eyes
S["eyes_blue"] >> b_eyes
S["underwear"] >> underwear
S["undershirt"] >> undershirt
S["backbag"] >> backbag
S["b_type"] >> b_type
@@ -158,6 +157,9 @@
S["uplinklocation"] >> uplinklocation
S["UI_style_color"] << UI_style_color
S["UI_style_alpha"] << UI_style_alpha
//Sanitize
metadata = sanitize_text(metadata, initial(metadata))
real_name = reject_bad_name(real_name)
@@ -181,6 +183,7 @@
g_eyes = sanitize_integer(g_eyes, 0, 255, initial(g_eyes))
b_eyes = sanitize_integer(b_eyes, 0, 255, initial(b_eyes))
underwear = sanitize_integer(underwear, 1, underwear_m.len, initial(underwear))
undershirt = sanitize_integer(undershirt, 1, undershirt_t.len, initial(undershirt))
backbag = sanitize_integer(backbag, 1, backbaglist.len, initial(backbag))
b_type = sanitize_text(b_type, initial(b_type))
@@ -231,6 +234,7 @@
S["eyes_green"] << g_eyes
S["eyes_blue"] << b_eyes
S["underwear"] << underwear
S["undershirt"] << undershirt
S["backbag"] << backbag
S["b_type"] << b_type
@@ -264,6 +268,9 @@
S["uplinklocation"] << uplinklocation
S["UI_style_color"] << UI_style_color
S["UI_style_alpha"] << UI_style_alpha
return 1

View File

@@ -241,6 +241,9 @@ BLIND // can't see anything
*/
var/obj/item/clothing/tie/hastie = null
var/displays_id = 1
var/rolled_down = 0
var/basecolor
/obj/item/clothing/under/attackby(obj/item/I, mob/user)
if(!hastie && istype(I, /obj/item/clothing/tie))
@@ -307,6 +310,21 @@ BLIND // can't see anything
usr << "Your suit will now report your vital lifesigns as well as your coordinate position."
..()
/obj/item/clothing/under/verb/rollsuit()
set name = "Roll Down Jumpsuit"
set category = "Object"
set src in usr
if(!istype(usr, /mob/living)) return
if(usr.stat) return
if(copytext(item_color,-2) != "_d")
basecolor = item_color
if(basecolor + "_d_s" in icon_states('icons/mob/uniform.dmi'))
item_color = item_color == "[basecolor]" ? "[basecolor]_d" : "[basecolor]"
usr.update_inv_w_uniform()
else
usr << "<span class='notice'>You cannot roll down the uniform!</span>"
/obj/item/clothing/under/verb/removetie()
set name = "Remove Accessory"
set category = "Object"

View File

@@ -24,6 +24,7 @@
var/b_type = "A+" //Player's bloodtype
var/underwear = 1 //Which underwear the player wants
var/undershirt = 1 //Which undershirt the player wants.
var/backbag = 2 //Which backpack type the player has chosen. Nothing, Satchel or Backpack.
//Equipment slots

View File

@@ -310,6 +310,9 @@ proc/get_damage_icon_part(damage_state, body_part)
if(!fat && !skeleton)
stand_icon.Blend(new /icon('icons/mob/human.dmi', "underwear[underwear]_[g]_s"), ICON_OVERLAY)
if(undershirt>0 && undershirt < 5 && species.flags & HAS_UNDERWEAR)
stand_icon.Blend(new /icon('icons/mob/human.dmi', "undershirt[undershirt]_s"), ICON_OVERLAY)
if(update_icons)
update_icons()

View File

@@ -13,6 +13,7 @@ datum/preferences
randomize_hair_color("facial")
randomize_eyes_color()
underwear = rand(1,underwear_m.len)
undershirt = rand(1,undershirt_t.len)
backbag = 2
age = rand(AGE_MIN,AGE_MAX)
if(H)
@@ -188,6 +189,10 @@ datum/preferences
if(underwear > 0 && underwear < 7 && current_species.flags & HAS_UNDERWEAR)
underwear_s = new/icon("icon" = 'icons/mob/human.dmi', "icon_state" = "underwear[underwear]_[g]_s")
var/icon/undershirt_s = null
if(undershirt > 0 && undershirt < 5 && current_species.flags & HAS_UNDERWEAR)
undershirt_s = new/icon("icon" = 'icons/mob/human.dmi', "icon_state" = "undershirt[undershirt]_s")
var/icon/clothes_s = null
if(job_civilian_low & ASSISTANT)//This gives the preview icon clothes depending on which job(if any) is set to 'high'
clothes_s = new /icon('icons/mob/uniform.dmi', "grey_s")
@@ -610,6 +615,8 @@ datum/preferences
preview_icon.Blend(eyes_s, ICON_OVERLAY)
if(underwear_s)
preview_icon.Blend(underwear_s, ICON_OVERLAY)
if(undershirt_s)
preview_icon.Blend(undershirt_s, ICON_OVERLAY)
if(clothes_s)
preview_icon.Blend(clothes_s, ICON_OVERLAY)
preview_icon_front = new(preview_icon, dir = SOUTH)
@@ -617,4 +624,5 @@ datum/preferences
del(eyes_s)
del(underwear_s)
del(undershirt_s)
del(clothes_s)

Binary file not shown.

Before

Width:  |  Height:  |  Size: 10 KiB

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 196 KiB

After

Width:  |  Height:  |  Size: 225 KiB