mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2025-12-30 20:22:32 +00:00
Before it wouldn't update skin colour or eye colour, and ended up breaking the sprite such that C.M.A wouldn't have an effect on it after. Now it works perfectly fine, C.M.A works just fine too before and after STAGE 2: Refactors Morph So you change gender first and thus can actually access male beard styles, then you choose hair style and hair colour, then beard style and beard colour, then skin tone or body colour at the very end. STAGE 3 Adds Head Accessory, Head Accessory colour, marking style and body accessory to Morph and C.M.A.
86 lines
2.5 KiB
Plaintext
86 lines
2.5 KiB
Plaintext
//wip wip wup
|
|
/obj/structure/mirror
|
|
name = "mirror"
|
|
desc = "Mirror mirror on the wall, who's the most robust of them all?"
|
|
icon = 'icons/obj/watercloset.dmi'
|
|
icon_state = "mirror"
|
|
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/datum/nano_module/appearance_changer/AC = ui_users[user]
|
|
if(!AC)
|
|
AC = new(src, user)
|
|
AC.name = "SalonPro Nano-Mirror™"
|
|
AC.flags = APPEARANCE_ALL_BODY
|
|
ui_users[user] = AC
|
|
AC.ui_interact(user)
|
|
|
|
/obj/structure/mirror/proc/shatter()
|
|
if(shattered) return
|
|
shattered = 1
|
|
icon_state = "mirror_broke"
|
|
playsound(src, "shatter", 70, 1)
|
|
desc = "Oh no, seven years of bad luck!"
|
|
|
|
|
|
/obj/structure/mirror/bullet_act(var/obj/item/projectile/Proj)
|
|
if(prob(Proj.damage * 2))
|
|
if(!shattered)
|
|
shatter()
|
|
else
|
|
playsound(src, 'sound/effects/hit_on_shattered_glass.ogg', 70, 1)
|
|
..()
|
|
|
|
|
|
/obj/structure/mirror/attackby(obj/item/I as obj, mob/living/user as mob, params)
|
|
user.do_attack_animation(src)
|
|
if(shattered)
|
|
playsound(src.loc, 'sound/effects/hit_on_shattered_glass.ogg', 70, 1)
|
|
return
|
|
|
|
if(prob(I.force * 2))
|
|
visible_message("<span class='warning'>[user] smashes [src] with [I]!</span>")
|
|
shatter()
|
|
else
|
|
visible_message("<span class='warning'>[user] hits [src] with [I]!</span>")
|
|
playsound(src.loc, 'sound/effects/Glasshit.ogg', 70, 1)
|
|
|
|
|
|
/obj/structure/mirror/attack_alien(mob/living/user as mob)
|
|
if(islarva(user)) return
|
|
user.do_attack_animation(src)
|
|
if(shattered)
|
|
playsound(src.loc, 'sound/effects/hit_on_shattered_glass.ogg', 70, 1)
|
|
return
|
|
user.visible_message("<span class='danger'>[user] smashes [src]!</span>")
|
|
shatter()
|
|
|
|
|
|
/obj/structure/mirror/attack_animal(mob/living/user as mob)
|
|
if(!isanimal(user)) return
|
|
var/mob/living/simple_animal/M = user
|
|
if(M.melee_damage_upper <= 0) return
|
|
M.do_attack_animation(src)
|
|
if(shattered)
|
|
playsound(src.loc, 'sound/effects/hit_on_shattered_glass.ogg', 70, 1)
|
|
return
|
|
user.visible_message("<span class='danger'>[user] smashes [src]!</span>")
|
|
shatter()
|
|
|
|
|
|
/obj/structure/mirror/attack_slime(mob/living/user as mob)
|
|
var/mob/living/carbon/slime/S = user
|
|
if (!S.is_adult)
|
|
return
|
|
user.do_attack_animation(src)
|
|
if(shattered)
|
|
playsound(src.loc, 'sound/effects/hit_on_shattered_glass.ogg', 70, 1)
|
|
return
|
|
user.visible_message("<span class='danger'>[user] smashes [src]!</span>")
|
|
shatter() |