diff --git a/code/modules/client/preference_setup/loadout/loadout_cosmetics_vr.dm b/code/modules/client/preference_setup/loadout/loadout_cosmetics_vr.dm new file mode 100644 index 00000000000..c538c66410b --- /dev/null +++ b/code/modules/client/preference_setup/loadout/loadout_cosmetics_vr.dm @@ -0,0 +1,20 @@ +/datum/gear/cosmetic/nailpolish + display_name = "nail polish (colorable)" + description = "Nail polish, available in every color of the rainbow! Doesn't come with nail polish remover." + path = /obj/item/weapon/nailpolish + +/datum/gear/cosmetic/nailpolish/New() + ..() + // can't set description, it'll look funny + gear_tweaks = list(gear_tweak_free_color_choice, gear_tweak_free_name) + +/datum/gear/cosmetic/nailpolish/spawn_item(var/location, var/metadata) + var/obj/item/weapon/nailpolish/polish = ..() + polish.set_colour(polish.color) + polish.color = null + return polish + +/datum/gear/cosmetic/nailpolish_remover + display_name = "nail polish remover" + description = "Nail polish remover, for when the fun's over. Doesn't come with nail polish." + path = /obj/item/weapon/nailpolish_remover \ No newline at end of file diff --git a/code/modules/makeup/nailpolish.dm b/code/modules/makeup/nailpolish.dm new file mode 100644 index 00000000000..4cd989959fb --- /dev/null +++ b/code/modules/makeup/nailpolish.dm @@ -0,0 +1,145 @@ +/obj/item/organ/external/var/datum/nail_polish/nail_polish + +/obj/item/weapon/nailpolish + name = "nail polish" + desc = "to paint your nails with. Or someone else's!" + icon = 'icons/obj/nailpolish_vr.dmi' + icon_state = "nailpolish" + var/colour = "#FFFFFF" + var/image/top_underlay + var/image/color_underlay + var/open = FALSE + drop_sound = 'sound/items/drop/glass.ogg' + pickup_sound = 'sound/items/pickup/glass.ogg' + +/obj/item/weapon/nailpolish/Initialize() + . = ..() + desc = "Nail polish, " + initial(desc) + top_underlay = image(icon, "top") + color_underlay = image(icon, "color") + update_icon() + +/obj/item/weapon/nailpolish/proc/set_colour(var/_colour) + colour = _colour + desc = "Nail polish, " + initial(desc) + update_icon() + +/obj/item/weapon/nailpolish/attack_self(var/mob/user) + open = !open + to_chat(user, SPAN_NOTICE("You [open ? "open" : "close"] \the [src].")) + update_icon() + +/obj/item/weapon/nailpolish/update_icon() + . = ..() + icon_state = "[initial(icon_state)][open ? "-open" : ""]" + top_underlay.icon_state = "top[open ? "-open" : ""]" + color_underlay.icon_state = "color[open ? "-open" : ""]" + color_underlay.color = colour + underlays = list(color_underlay, top_underlay) + +/obj/item/organ/external/proc/get_polish(var/colour) + var/static/forbidden_parts = BP_ALL - list(BP_L_HAND, BP_R_HAND, BP_L_FOOT, BP_R_FOOT) + if(organ_tag in forbidden_parts) + return FALSE + var/ico + var/icostate + if(length(markings)) + for(var/mark_name in markings) + var/mark_data = markings[mark_name] + var/datum/sprite_accessory/marking/mark = mark_data["datum"] + if(length(mark.body_parts & forbidden_parts)) + continue + ico = mark.icon + icostate = "[mark.icon_state]-[organ_tag]" + break + else + ico = 'icons/obj/nailpolish_vr.dmi' + icostate = organ_tag + return new /datum/nail_polish(ico, icostate, colour) + +/obj/item/weapon/nailpolish/attack(var/mob/user, var/mob/living/carbon/human/target) + if(!open) + return + + if(!istype(target)) + return + + var/bp = user.zone_sel.selecting + var/obj/item/organ/external/body_part = target.get_organ(bp) + if(!body_part) + to_chat(user, SPAN_WARNING("[target] is missing that limb!")) + return + if(body_part.nail_polish) + to_chat(user, SPAN_NOTICE("[target]'s [body_part.name] already has nail polish on!")) + return + var/datum/nail_polish/polish = body_part.get_polish(colour) + if(!polish) + to_chat(user, SPAN_NOTICE("You can't find any nails on [body_part] to paint.")) + return + if(user == target) + user.visible_message("\The [user] paints their nails with \the [src].", "You paint your nails with \the [src].") + else + if(do_after(user, 2 SECONDS, target)) + user.visible_message("\The [user] paints \the [target]'s nails with \the [src].", "You paint \the [target]'s nails with \the [src].") + else + to_chat(user, SPAN_NOTICE("Both you and [target] must stay still!")) + return + body_part.set_polish(polish) + +/obj/item/organ/external/proc/set_polish(var/datum/nail_polish/polish) + nail_polish = polish + owner?.update_icons_body() + +/obj/item/weapon/nailpolish_remover + name = "nail polish remover" + desc = "Paint thinner, acetone, nail polish remover; whatever you call it, it gets the job done." + drop_sound = 'sound/items/drop/helm.ogg' + pickup_sound = 'sound/items/pickup/helm.ogg' + icon = 'icons/obj/nailpolish_vr.dmi' + icon_state = "nailpolishremover" + var/open = FALSE + +/obj/item/weapon/nailpolish_remover/attack_self(var/mob/user) + open = !open + to_chat(user, SPAN_NOTICE("You [open ? "open" : "close"] \the [src].")) + update_icon() + +/obj/item/weapon/nailpolish_remover/update_icon() + . = ..() + icon_state = "[initial(icon_state)][open ? "-open" : ""]" + +/obj/item/weapon/nailpolish_remover/attack(var/mob/user, var/mob/living/carbon/human/target) + if(!open) + return + + if(!istype(target)) + return + + var/bp = user.zone_sel.selecting + var/obj/item/organ/external/body_part = target.get_organ(bp) + if(!body_part) + to_chat(user, SPAN_WARNING("[target] is missing that limb!")) + return + if(!body_part.nail_polish) + to_chat(user, SPAN_NOTICE("[target]'s [body_part.name] has no nail polish to remove!")) + return + if(user == target) + user.visible_message("\The [user] removes their nail polish with \the [src].", "You remove your nail polish with \the [src].") + else + if(do_after(user, 2 SECONDS, target)) + user.visible_message("\The [user] removes \the [target]'s nail polish with \the [src].", "You remove \the [target]'s nail polish with \the [src].") + else + to_chat(user, SPAN_NOTICE("Both you and [target] must stay still!")) + return + body_part.set_polish(null) + +/datum/nail_polish + var/icon = 'icons/obj/nailpolish_vr.dmi' + var/icon_state + var/color + +/datum/nail_polish/New(var/_icon, var/_icon_state, var/_color) + icon = _icon + icon_state = _icon_state + color = _color + \ No newline at end of file diff --git a/code/modules/mob/living/carbon/human/update_icons.dm b/code/modules/mob/living/carbon/human/update_icons.dm index 7f8d44a742e..0b77148d307 100644 --- a/code/modules/mob/living/carbon/human/update_icons.dm +++ b/code/modules/mob/living/carbon/human/update_icons.dm @@ -271,6 +271,11 @@ var/global/list/damage_icon_parts = list() //see UpdateDamageIcon() for(var/M in part.markings) icon_key += "[M][part.markings[M]["color"]]" + + // VOREStation Edit Start + if(part.nail_polish) + icon_key += "_[part.nail_polish.icon]_[part.nail_polish.icon_state]_[part.nail_polish.color]" + // VOREStation Edit End if(part.robotic >= ORGAN_ROBOT) icon_key += "2[part.model ? "-[part.model]": ""]" diff --git a/code/modules/organs/organ_icon.dm b/code/modules/organs/organ_icon.dm index 7216540734a..d35a5aa5165 100644 --- a/code/modules/organs/organ_icon.dm +++ b/code/modules/organs/organ_icon.dm @@ -131,6 +131,15 @@ var/global/list/limb_icon_cache = list() I.Blend(rgb(h_col[1],h_col[2],h_col[3]), ICON_MULTIPLY) //VOREStation edit limb_icon_cache[cache_key] = I mob_icon.Blend(limb_icon_cache[cache_key], ICON_OVERLAY) + + // VOREStation edit start + if(nail_polish) + var/icon/I = new(nail_polish.icon, nail_polish.icon_state) + I.Blend(nail_polish.color, ICON_MULTIPLY) + add_overlay(I) + mob_icon.Blend(I, ICON_OVERLAY) + icon_cache_key += "_[nail_polish.icon]_[nail_polish.icon_state]_[nail_polish.color]" + // VOREStation edit end if(model) icon_cache_key += "_model_[model]" diff --git a/icons/obj/nailpolish_vr.dmi b/icons/obj/nailpolish_vr.dmi new file mode 100644 index 00000000000..e3bddf098e8 Binary files /dev/null and b/icons/obj/nailpolish_vr.dmi differ diff --git a/vorestation.dme b/vorestation.dme index 0c94909587d..ace485438f6 100644 --- a/vorestation.dme +++ b/vorestation.dme @@ -1852,6 +1852,7 @@ #include "code\modules\client\preference_setup\loadout\loadout_accessories.dm" #include "code\modules\client\preference_setup\loadout\loadout_accessories_vr.dm" #include "code\modules\client\preference_setup\loadout\loadout_cosmetics.dm" +#include "code\modules\client\preference_setup\loadout\loadout_cosmetics_vr.dm" #include "code\modules\client\preference_setup\loadout\loadout_cyberware.dm" #include "code\modules\client\preference_setup\loadout\loadout_ears.dm" #include "code\modules\client\preference_setup\loadout\loadout_eyes.dm" @@ -2482,6 +2483,7 @@ #include "code\modules\lore_codex\robutt_data\bybrand.dm" #include "code\modules\lore_codex\robutt_data\main_robutts.dm" #include "code\modules\lore_codex\robutt_data\more.dm" +#include "code\modules\makeup\nailpolish.dm" #include "code\modules\maps\tg\dmm_suite.dm" #include "code\modules\maps\tg\map_template.dm" #include "code\modules\maps\tg\map_template_vr.dm"