Files
Paradise/code/game/objects/structures/mirror.dm
AVeryReluctantSpider 6a1fc4f5c2 Praise Be and Skkula: The PR (Skkulakin Race 2025) [READY FOR REVIEW] (#30744)
* skulk.dm placeholder for testing purposes

* Made an oopsie, fixed

* Skulk flesh color and language color testing

* Adding working language key, fixed language color

* Changed skulk flesh color, may change it again soon

* Ran tgui, hopefully fixed language color

* Changed skulk language color, hopefully for good this time

* Missed a spot

* Tgui fuckery

* If at first you don't succeed, cry to yourself for a bit then try again

* Tgui makes me violent

* Eyewear no longer save Skkulakin from flashes

* Skulk bones now hurt really bad

* Adds Skulk Sprites, Back Accessories, and other Placeholders

* Desperately trying to get body_accessories to work

* Minor name changes

* Skkulakin now have colorable eyes

* Makes the silk-spinning ability somewhat work, more changes need to be made

* Fixes the Skulks' ability to spin silk, however still needs changes

* Changed Skulks easier bone breaks into a trait

* Skulks (Now with 100% ethically sourced back spines!)

* Gives Skkulakin the Vox clothing sprites (Not counting head, glasses, or masks)

* Added update_spines_layer() for testing and help purposes

* Working on getting Skulk Backspines to change color depending on preset

* Skulk Backspines are now colored the same as your preset up spawning in (Thank you, Qwerty)

* Undefines SILK_NUTRITION_AMOUNT (I made a woopsie)

* Readds a return I may have accidentally removed at some point

* Skkulakin can now chitter

* Silk now be used to craft cloth and has an icon

* TGUI is going to make me do things

* Fixes the Brittle Bones Trait to work with Frail Quirk

* Sprite Fix

* Adds masking helpers

* Made a small woopsie

* I'm genuinely a fucking idiot

* Adds a bunch of new clothing

* Changes some clothing descriptions

* Fixes more placeholders and adds two new outfits

* Made small mistake, fixed

* Temporary change (Will revert soon)

* Reverted previous changes as the event is now over

* New Skulk Clothing, added some to the racial tab in the loadout, and made low-inquis robes orderable from cargo

* Adds High-Inquis Robes into cargo console

* Adds Skkulakin Flag (Orderable From Merch Vendor)

* Made small mistake, fixed it

* Inquisitorial Crate only has Low-Inquisitor clothing again

* Commits all offered suggestions

* Converts spans to defines and sorts out the rest of Skulk clothing (No MODs just yet)

* Gives Skulks the Nian Butt Sprite for now

* Fixes a small error with biosuits

* Fixes small coding error

* Fixes a few mor small coding errors

* Update code/modules/mob/living/carbon/human/appearance.dm

Co-authored-by: Contrabang <91113370+Contrabang@users.noreply.github.com>
Signed-off-by: AVeryReluctantSpider <102713858+AVeryReluctantSpider@users.noreply.github.com>

* Update code/game/objects/items/stacks/sheets/sheet_types.dm

Co-authored-by: Contrabang <91113370+Contrabang@users.noreply.github.com>
Signed-off-by: AVeryReluctantSpider <102713858+AVeryReluctantSpider@users.noreply.github.com>

* Update code/modules/economy/merch_items.dm

Co-authored-by: Contrabang <91113370+Contrabang@users.noreply.github.com>
Signed-off-by: AVeryReluctantSpider <102713858+AVeryReluctantSpider@users.noreply.github.com>

* Removes 'collective' from outfit_admin.dm

* Basic Pixel-Shifting (Not Yet Complete)

* improve skulk headwear offset

* Revert "improve skulk headwear offset"

This reverts commit 2d93d61699.

* improve skulk headwear offset

* Cleans up some code and fixes ALL hats for Skkulakin

* Lets the AI speak Skkula-Runespeak, fixes Bomber Jackets and Winter Coats, makes Backpacks look better, fixes other small sprite issues

* Let them wear pants

* Update code/modules/mob/language.dm

Co-authored-by: DGamerL <108773801+DGamerL@users.noreply.github.com>
Signed-off-by: AVeryReluctantSpider <102713858+AVeryReluctantSpider@users.noreply.github.com>

* Fixes masks and glasses for skkulakin

* Fixes Inquisitor Masks and adds missing Engineering Outfits

* Fixes Explorer Suits and HECK Suit for Skulks

* Fixes a few small issues and resolves some suggested changes

* Rebuilds TGUI

* Fixes Science Jumpsuits & Radsuits

* Fix Skkulakin chef belt disappearance.

* fix string assoc lookups for alists

* Update code/game/objects/structures/mirror.dm

Co-authored-by: Contrabang <91113370+Contrabang@users.noreply.github.com>
Signed-off-by: AVeryReluctantSpider <102713858+AVeryReluctantSpider@users.noreply.github.com>

* Update code/modules/mob/living/carbon/human/species/skulk.dm

Co-authored-by: DGamerL <108773801+DGamerL@users.noreply.github.com>
Signed-off-by: AVeryReluctantSpider <102713858+AVeryReluctantSpider@users.noreply.github.com>

---------

Signed-off-by: AVeryReluctantSpider <102713858+AVeryReluctantSpider@users.noreply.github.com>
Co-authored-by: PollardTheDragon <144391971+PollardTheDragon@users.noreply.github.com>
Co-authored-by: Contrabang <91113370+Contrabang@users.noreply.github.com>
Co-authored-by: warriorstar-orion <orion@snowfrost.garden>
Co-authored-by: DGamerL <108773801+DGamerL@users.noreply.github.com>
Co-authored-by: Alfalfa Scout <alfalfascout@proton.me>
2026-01-17 20:54:56 +00:00

224 lines
6.9 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"
anchored = TRUE
max_integrity = 200
integrity_failure = 100
var/list/ui_users = list()
var/broken_icon_state = "mirror_broke"
/// what to show when a ghost Boo!'s this mirror
var/icon/spooked_icon
/// Whether a mirror can be Boo!'d or not. Magic mirrors are animated, so this is used to stop them from looking weird
var/can_be_spooked = TRUE
/obj/structure/mirror/organ
can_be_spooked = FALSE
/obj/structure/mirror/Initialize(mapload, newdir = SOUTH, building = FALSE)
. = ..()
if(building)
switch(newdir)
if(NORTH)
pixel_y = -32
if(SOUTH)
pixel_y = 32
if(EAST)
pixel_x = -32
if(WEST)
pixel_x = 32
GLOB.mirrors += src
spooked_icon = update_spooked_icon(icon("icons/mob/human.dmi", "husk_s"), SOUTH, 8, 0)
/obj/structure/mirror/Destroy()
QDEL_LIST_ASSOC_VAL(ui_users)
GLOB.mirrors -= src
return ..()
/obj/structure/mirror/attack_hand(mob/user)
if(broken)
return
if(ishuman(user))
var/datum/ui_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/obj_break(damage_flag, mapload)
if(!broken && !(flags & NODECONSTRUCT))
icon_state = broken_icon_state
if(!mapload)
playsound(src, "shatter", 70, TRUE)
if(desc == initial(desc))
desc = "Oh no, seven years of bad luck!"
broken = TRUE
GLOB.mirrors -= src
/obj/structure/mirror/organ/obj_break(damage_flag, mapload)
playsound(src, "shatter", 70, TRUE)
qdel(src)
/obj/structure/mirror/screwdriver_act(mob/user, obj/item/I)
. = TRUE
if(!I.tool_use_check(user, 0))
return
user.visible_message(SPAN_NOTICE("[user] begins to unfasten [src]."), SPAN_NOTICE("You begin to unfasten [src]."))
if(!I.use_tool(src, user, 30, volume = I.tool_volume))
return
if(broken)
user.visible_message(SPAN_NOTICE("[user] drops the broken shards to the floor."), SPAN_NOTICE("You drop the broken shards on the floor."))
new /obj/item/shard(get_turf(user))
else
user.visible_message(SPAN_NOTICE("[user] carefully places [src] on the floor."), SPAN_NOTICE("You carefully place [src] on the floor."))
new /obj/item/mounted/mirror(get_turf(user))
qdel(src)
/obj/structure/mirror/deconstruct(disassembled = TRUE)
if(!(flags & NODECONSTRUCT))
if(!disassembled)
new /obj/item/shard( src.loc )
qdel(src)
/obj/structure/mirror/play_attack_sound(damage_amount, damage_type = BRUTE, damage_flag = 0)
switch(damage_type)
if(BRUTE)
playsound(src, 'sound/effects/hit_on_shattered_glass.ogg', 70, TRUE)
if(BURN)
playsound(src, 'sound/effects/hit_on_shattered_glass.ogg', 70, TRUE)
/obj/structure/mirror/get_spooked()
if(!can_be_spooked || broken)
return
flicker_ghost(spooked_icon)
return TRUE
/// This proc sets the icon that will show up in the mirror when spooked
/// * icon_to_show - which icon
/// * offset_dir - you might want to move the icon so it appears in the mirror
/// * offset_pixels - how many pixels you need to move the icon
/// * wrap - if the icon should wrap around
/obj/structure/mirror/proc/update_spooked_icon(icon/icon_to_show, offset_dir, offset_pixels, wrap)
var/icon/our_icon = icon_to_show
our_icon.Shift(offset_dir,offset_pixels,wrap)
var/icon/alpha_mask = new("icons/obj/watercloset.dmi", "mirror_mask")
our_icon.AddAlphaMask(alpha_mask)
var/icon/added_icons = new("icons/obj/watercloset.dmi", "mirror")
added_icons.Blend(our_icon, ICON_OVERLAY)
return added_icons
/// Shows the icon in the mirror with its mask
/obj/structure/mirror/proc/flicker_ghost(icon/icon_to_show)
icon = icon_to_show
sleep(rand(5,10))
icon = initial(icon)
return
/obj/item/mounted/mirror
name = "mirror"
desc = "Some reflective glass ready to be hung on a wall. Don't break it!"
icon = 'icons/obj/watercloset.dmi'
icon_state = "mirror"
/obj/item/mounted/mirror/do_build(turf/on_wall, mob/user)
var/obj/structure/mirror/M = new /obj/structure/mirror(get_turf(user), get_dir(on_wall, user), 1)
transfer_prints_to(M, TRUE)
qdel(src)
/obj/structure/mirror/magic
name = "magic mirror"
icon_state = "magic_mirror"
broken_icon_state = "magic_mirror_broke"
var/options = list("Name", "Body", "Voice")
var/organ_warn = FALSE
var/actually_magical = TRUE
can_be_spooked = FALSE
/obj/structure/mirror/magic/Initialize(mapload, newdir, building)
. = ..()
RegisterSignal(src, COMSIG_ATTACK_BY, TYPE_PROC_REF(/datum, signal_cancel_attack_by))
/obj/structure/mirror/magic/attack_hand(mob/user)
if(!ishuman(user) || broken)
return
var/mob/living/carbon/human/H = user
var/choice = tgui_input_list(user, "Something to change?", "Magical Grooming", options)
switch(choice)
if("Name")
var/newname = copytext(sanitize(input(H, "Who are we again?", "Name change", H.name) as null|text),1,MAX_NAME_LEN)
if(!newname)
return
H.real_name = newname
H.name = newname
if(H.dna)
H.dna.real_name = newname
if(H.mind)
H.mind.name = newname
if(newname)
curse(user)
if("Body")
if(organ_warn)
to_chat(user, SPAN_BOLDWARNING("Using the mirror will destroy any non biochip implants in you!"))
var/list/race_list = list("Human", "Tajaran", "Skrell", "Unathi", "Diona", "Vulpkanin", "Nian", "Grey", "Drask", "Skkulakin")
if(actually_magical)
race_list = list("Human", "Tajaran", "Skrell", "Unathi", "Diona", "Vulpkanin", "Nian", "Grey", "Drask", "Vox", "Plasmaman", "Kidan", "Slime People")
var/datum/ui_module/appearance_changer/AC = ui_users[user]
if(!AC)
AC = new(src, user)
AC.name = "Magic Mirror"
AC.flags = APPEARANCE_ALL
AC.whitelist = race_list
ui_users[user] = AC
if(user.Adjacent(src))
AC.ui_interact(user)
if("Voice")
var/voice_choice = tgui_input_list(user, "Perhaps...", "Voice effects", list("Comic Sans", "Wingdings", "Swedish", "Chav", "Mute"))
var/voice_mutation
switch(voice_choice)
if("Comic Sans")
voice_mutation = GLOB.comicblock
if("Wingdings")
voice_mutation = GLOB.wingdingsblock
if("Swedish")
voice_mutation = GLOB.swedeblock
if("Chav")
voice_mutation = GLOB.chavblock
if("Mute")
voice_mutation = GLOB.muteblock
if(voice_mutation)
if(H.dna.GetSEState(voice_mutation))
H.dna.SetSEState(voice_mutation, FALSE)
singlemutcheck(H, voice_mutation, MUTCHK_FORCED)
else
H.dna.SetSEState(voice_mutation, TRUE)
singlemutcheck(H, voice_mutation, MUTCHK_FORCED)
if(voice_choice)
curse(user)
/obj/structure/mirror/magic/ui_close(mob/user)
curse(user)
/obj/structure/mirror/magic/proc/curse(mob/living/user)
return
/obj/structure/mirror/magic/nuclear
name = "M.A.G.I.C mirror"
desc = "The M.A.G.I.C mirror will let you change your species in a flash! Be careful, any implants (not biochips) in you will be destroyed on use."
options = list("Body")
organ_warn = TRUE
actually_magical = FALSE