mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2026-08-22 12:29:46 +01:00
Mirror and ERT appearance improvement.
NanoUI-based appearance changer, with flags to set exactly which parts of the appearance which can be changed.
This commit is contained in:
@@ -7,59 +7,19 @@
|
||||
density = 0
|
||||
anchored = 1
|
||||
var/shattered = 0
|
||||
var/list/ui_users = list()
|
||||
|
||||
/obj/structure/mirror/attack_hand(mob/user as mob)
|
||||
|
||||
if(shattered) return
|
||||
|
||||
if(ishuman(user))
|
||||
var/mob/living/carbon/human/H = user
|
||||
|
||||
if(H.a_intent == "hurt")
|
||||
if(prob(30) || H.species.can_shred(H))
|
||||
attack_generic(user,1)
|
||||
else
|
||||
attack_generic(user)
|
||||
return
|
||||
|
||||
var/userloc = H.loc
|
||||
|
||||
//see code/modules/mob/new_player/preferences.dm at approx line 545 for comments!
|
||||
//this is largely copypasted from there.
|
||||
|
||||
//handle facial hair (if necessary)
|
||||
if(H.gender == MALE)
|
||||
var/list/species_facial_hair = list()
|
||||
if(H.species)
|
||||
for(var/i in facial_hair_styles_list)
|
||||
var/datum/sprite_accessory/facial_hair/tmp_facial = facial_hair_styles_list[i]
|
||||
if(H.species.name in tmp_facial.species_allowed)
|
||||
species_facial_hair += i
|
||||
else
|
||||
species_facial_hair = facial_hair_styles_list
|
||||
|
||||
var/new_style = input(user, "Select a facial hair style", "Grooming") as null|anything in species_facial_hair
|
||||
if(userloc != H.loc) return //no tele-grooming
|
||||
if(new_style)
|
||||
H.f_style = new_style
|
||||
|
||||
//handle normal hair
|
||||
var/list/species_hair = list()
|
||||
if(H.species)
|
||||
for(var/i in hair_styles_list)
|
||||
var/datum/sprite_accessory/hair/tmp_hair = hair_styles_list[i]
|
||||
if(H.species.name in tmp_hair.species_allowed)
|
||||
species_hair += i
|
||||
else
|
||||
species_hair = hair_styles_list
|
||||
|
||||
var/new_style = input(user, "Select a hair style", "Grooming") as null|anything in species_hair
|
||||
if(userloc != H.loc) return //no tele-grooming
|
||||
if(new_style)
|
||||
H.h_style = new_style
|
||||
|
||||
H.update_hair()
|
||||
|
||||
var/obj/nano_module/appearance_changer/AC = ui_users[user]
|
||||
if(!AC)
|
||||
AC = new(src, user)
|
||||
AC.name = "SalonPro Nano-Mirror(TM)"
|
||||
ui_users[user] = AC
|
||||
AC.ui_interact(user)
|
||||
|
||||
/obj/structure/mirror/proc/shatter()
|
||||
if(shattered) return
|
||||
|
||||
Reference in New Issue
Block a user