Skip to content

Commit

Permalink
Adds wigs (tgstation#31304)
Browse files Browse the repository at this point in the history
* Adds wigs

* spaces to tabs

* Move up
  • Loading branch information
AnturK authored and Cyberboss committed Oct 5, 2017
1 parent 3aeb8b3 commit d17d66f
Show file tree
Hide file tree
Showing 2 changed files with 45 additions and 2 deletions.
5 changes: 3 additions & 2 deletions code/game/machinery/vending.dm
Original file line number Diff line number Diff line change
Expand Up @@ -1009,8 +1009,9 @@ IF YOU MODIFY THE PRODUCTS LIST OF A MACHINE, MAKE SURE TO UPDATE ITS RESUPPLY C
/obj/item/clothing/mask/joy = 1,
/obj/item/clothing/head/cueball = 1,
/obj/item/clothing/under/scratch = 1,
/obj/item/clothing/under/sailor = 1,
/obj/item/clothing/ears/headphones = 2)
/obj/item/clothing/under/sailor = 1,
/obj/item/clothing/ears/headphones = 2,
/obj/item/clothing/head/wig/random = 3)
contraband = list(/obj/item/clothing/suit/judgerobe = 1, /obj/item/clothing/head/powdered_wig = 1, /obj/item/gun/magic/wand = 2, /obj/item/clothing/glasses/sunglasses/garb = 2, /obj/item/clothing/glasses/sunglasses/blindfold = 1, /obj/item/clothing/mask/muzzle = 2)
premium = list(/obj/item/clothing/suit/pirate/captain = 2, /obj/item/clothing/head/pirate/captain = 2, /obj/item/clothing/head/helmet/roman = 1, /obj/item/clothing/head/helmet/roman/legionaire = 1, /obj/item/clothing/under/roman = 1, /obj/item/clothing/shoes/roman = 1, /obj/item/shield/riot/roman = 1, /obj/item/skub = 1)
refill_canister = /obj/item/vending_refill/autodrobe
Expand Down
42 changes: 42 additions & 0 deletions code/modules/clothing/head/misc_special.dm
Original file line number Diff line number Diff line change
Expand Up @@ -177,3 +177,45 @@
/obj/item/clothing/head/cardborg/dropped(mob/living/user)
..()
user.remove_alt_appearance("standard_borg_disguise")



/obj/item/clothing/head/wig
name = "wig"
desc = "A bunch of hair without a head attached."
icon_state = ""
item_state = "pwig"
flags_inv = HIDEHAIR
var/hair_style = "Very Long Hair"
var/hair_color = "#000"

/obj/item/clothing/head/wig/Initialize(mapload)
. = ..()
update_icon()

/obj/item/clothing/head/wig/update_icon()
cut_overlays()
var/datum/sprite_accessory/S = GLOB.hair_styles_list[hair_style]
if(!S)
icon_state = "pwig"
else
var/mutable_appearance/M = mutable_appearance(S.icon,S.icon_state)
M.appearance_flags |= RESET_COLOR
M.color = hair_color
add_overlay(M)

/obj/item/clothing/head/wig/worn_overlays(isinhands = FALSE, file2use)
. = list()
if(!isinhands)
var/datum/sprite_accessory/S = GLOB.hair_styles_list[hair_style]
if(!S)
return
var/mutable_appearance/M = mutable_appearance(S.icon, S.icon_state,layer = -HAIR_LAYER)
M.appearance_flags |= RESET_COLOR
M.color = hair_color
. += M

/obj/item/clothing/head/wig/random/Initialize(mapload)
hair_style = pick(GLOB.hair_styles_list - "Bald") //Don't want invisible wig
hair_color = "#[random_short_color()]"
. = ..()

0 comments on commit d17d66f

Please sign in to comment.