Merge remote-tracking branch 'polaris/master' into sink

# Conflicts:
#	code/_onclick/item_attack.dm
#	code/modules/client/preferences.dm
#	code/modules/mob/living/carbon/human/examine.dm
#	code/modules/mob/living/simple_animal/hostile/hostile.dm
#	code/modules/mob/new_player/preferences_setup.dm
#	nano/images/nanomap_z1.png
#	vorestation.dme
This commit is contained in:
Leshana
2016-05-29 16:22:07 -04:00
231 changed files with 5647 additions and 3412 deletions
@@ -72,6 +72,11 @@ var/global/list/stool_cache = list() //haha stool
/obj/item/weapon/stool/attack(mob/M as mob, mob/user as mob)
if (prob(5) && istype(M,/mob/living))
user.visible_message("<span class='danger'>[user] breaks [src] over [M]'s back!</span>")
user.setClickCooldown(DEFAULT_ATTACK_COOLDOWN)
user.do_attack_animation(M)
user.drop_from_inventory(src)
user.remove_from_mob(src)
dismantle()
qdel(src)
+44 -32
View File
@@ -5,39 +5,51 @@
icon_state = "cabinet_closed"
density = 1
/obj/structure/undies_wardrobe/attack_hand(mob/user as mob)
src.add_fingerprint(user)
var/mob/living/carbon/human/H = user
if(!ishuman(user) || (H.species && !(H.species.appearance_flags & HAS_UNDERWEAR)))
/obj/structure/undies_wardrobe/attack_hand(var/mob/user)
if(!human_who_can_use_underwear(user))
user << "<span class='warning'>Sadly there's nothing in here for you to wear.</span>"
return 0
return
interact(user)
var/utype = alert("Which section do you want to pick from?",,"Underwear", "Undershirts", "Socks",)
var/list/selection
switch(utype)
if("Underwear")
utype = alert("Which section do you want to pick from?",, "Top", "Bottom",)
switch(utype)
if("Top")
selection = underwear_top_t
if("Bottom")
selection = underwear_bottom_t
if("Undershirts")
selection = undershirt_t
if("Socks")
selection = socks_t
var/pick = input("Select the style") as null|anything in selection
if(pick)
if(get_dist(src,user) > 1)
/obj/structure/undies_wardrobe/interact(var/mob/living/carbon/human/H)
var/dat = list()
dat += "<b>Underwear:</b><br>"
for(var/datum/category_group/underwear/UWC in global_underwear.categories)
var/datum/category_item/underwear/UWI = H.all_underwear[UWC.name]
var/item_name = UWI ? UWI.name : "None"
dat += "[UWC.name]: <a href='?src=\ref[src];change_underwear=[UWC.name]'>[item_name]</a> <a href='?src=\ref[src];remove_underwear=[UWC.name]'>(Remove)</a><br>"
dat = jointext(dat)
H << browse(dat, "window=wardrobe;size=400x200")
/obj/structure/undies_wardrobe/proc/human_who_can_use_underwear(var/mob/living/carbon/human/H)
if(!istype(H) || !H.species || !(H.species.appearance_flags & HAS_UNDERWEAR))
return FALSE
return TRUE
/obj/structure/undies_wardrobe/CanUseTopic(var/user)
if(!human_who_can_use_underwear(user))
return STATUS_CLOSE
return ..()
/obj/structure/undies_wardrobe/Topic(href, href_list, state)
if(..())
return TRUE
var/mob/living/carbon/human/H = usr
if(href_list["remove_underwear"])
if(href_list["remove_underwear"] in H.all_underwear)
H.all_underwear -= href_list["remove_underwear"]
. = TRUE
else if(href_list["change_underwear"])
var/datum/category_group/underwear/UWC = global_underwear.categories_by_name[href_list["change_underwear"]]
if(!UWC)
return
if(utype == "Undershirts")
H.undershirt = selection[pick]
else if(utype == "Socks")
H.socks = selection[pick]
else if(utype == "Top")
H.underwear_top = selection[pick]
else
H.underwear_bottom = selection[pick]
var/datum/category_item/underwear/selected_underwear = input(H, "Choose underwear:", "Choose underwear", H.all_underwear[UWC.name]) as null|anything in UWC.items
if(selected_underwear && CanUseTopic(H, default_state))
H.all_underwear[UWC.name] = selected_underwear
. = TRUE
if(.)
H.update_body(1)
return 1
interact(H)