mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2025-12-26 18:12:40 +00:00
* tgui the beginning * binaries and the like * Bring in the last of it * Example radio UI * delete example * NTOS Main Menu, start on manifest, tgui states * tasks.json * gunnery ui pt 1 * okay * fix everything * scss update * oops * manifest gigablast * downloader part 1 * download prt 2 * NTOSDownloader final * mfw committing to_worlds * gunnery console pt2 * i cooked * targeting (finished) * one vueui down * voting ui almost done * MY MIND FEELS LIKE AN ARCH ENEMYYYY * voting ui down * photocopier * ntos config + download fixes * photocopier 2 * refactor define * NTOS client manager + fixes * fax machine final (it also uses toner now) * marching forwards... left behind... * ntnrc part 1 * canister * add quotes * portable pumps pt1 + more backgrounds * oops * finish the portable pump * freezers so I'll keep on pushing forward... you haven't seen the last of me... oooooooh... * doors ui pt1 * finish doors UI (forgive me wildkins it's a bit of shitcode) * vitals monitor, make things use labeled lists, new backgrounds * mais j'envoyé aucun mayday... * maglock pt1 * pour ça je me suis perdu... * infrared * fix that * prox sensor pt1 * prox sensor * signaler (this was actually pretty hard) * atmos control pt1 * atmos control pt1.1 * atmos pt 2 * fuel injector * multitool UI * jammer * list viewer * APC * portgen * targeting console updates + SMES ui * new themes, shield generator * supermatter * Add ore detector and (shitty) NTNet Relay * orderterminal pt1 * orderterminal pt2 * smartfridge * Add (air-)tank GUI update ore detector size * Adds Transfer Valves * Add AtmoScrubber * analyzer pt1 * weapons analyzer pt2 * bodyscanner pt1 * bodyscanner pt2 * fix this shitcode * seed storage * appearance changer * appearance changer final * sleeper pt1 * sleeper * gps * vehicles * chem dispenser * lily request * holopad * tgui modules pt1 * ppanel * damage menu * fixes * im here too now * follow menu, search bars * quikpay * quikpay fixes * circuit printer * ppanel * ppanel updates * pai * turret controls (i want to kill myself) * tweak * remove the boardgame * guntracker * implant tracker * penal mechs come close to me, come close to me * chem codex * pai radio * doorjack * pai directives * signaler removal, sensors * ghost spawner * spawnpoint * fixes * teleporter * one more to the chopping block * account database * remove divider * scanner, atmos * latejoin ui pt1 * latejoin * records pt1 * RECORDS UI DONE * delete interpreter & records * CHAT FUCKING CLIENT * data updates * fix some things * final UI, log * basic nanoui fix * antag panel * remove vueui * atm update * vending update * warrants, cameras * ntmonitor * time comes for all * preserve this legacy * bring that back (oops) * rcon, ui auto update for computer UIs, remove rcon computers * alarm monitoring (a bit broke and also todo: add custom alarm monitoring programs to a few consoles) * A LIKE SUPREME * a * power monitor * lights on * fuck this code, fuck nanoui modules, and fuck nanoui * LEAVE IT OH SO FAR BEHIND * fix alarm monitoring for synths * I SAW IN YOU WHAT LIFE WAS MISSING * comms console * idcard and record updates * turn the light on * arcade * pt2 * news browser * static * crusher * f * COULD I JUST SLEIGH THE GOLD FROM THE BALLS? I'M SO FRUSTRATED OH COULD YOU TELL? IF I HEAR ONE MORE VUEUI OR ONE NANOUI I'M GONNA LOSE IT SO LET ME GOOOOOOOOOOOOOOOOO * codeowners & suit sensors * html ui style removal * make lint happy * tgchat * tgpanels pt1 * THE SOUL LONGS FOR OBLIVION!!!!!!!!!!!!!!!!! * figure out why stat isnt working * goodbye ping * shhh * stat updates * An oath sworn in scors! Omni vortex lies! * final almost edits * fix that * last skin adjustments * resist and disorder * i slowly get up and turn off the noise, already fed up... * pleaseeeeeeeeeeeeeee * THE CREDIT LARP IS NECESSARY * i hold the keys * RISE UP * fix that? * harry's suggestions xoxo * runtime fix pt2 * You are the only thing that I still care about * fix runtimes and cl * whoops * misc fixes * fix that too * adds build workflow * f * Update update_tgui.yml * adds some needed steps * ATM * misc fixes and tweaks * fixes 2 * make newscasters usable and fix use power on freezers * turret control is clearer * remove duplicate * makes some verb tabs work properly * makes verbs work properly for real * sans moi * fixes pt2 * fix the chat unnecessarily reloading * fixes * epic * fixes * fix missing consoles --------- Co-authored-by: John Wildkins <john.wildkins@gmail.com> Co-authored-by: Matt Atlas <liermattia@gmail.com> Co-authored-by: harryob <55142896+harryob@users.noreply.github.com> Co-authored-by: Werner <Arrow768@users.noreply.github.com> Co-authored-by: Geeves <ggrobler447@gmail.com> Co-authored-by: harryob <me@harryob.live>
189 lines
5.3 KiB
Plaintext
189 lines
5.3 KiB
Plaintext
/obj/structure/mirror
|
|
name = "mirror"
|
|
desc = "A SalonPro Nano-Mirror(TM) brand mirror! The leading technology in hair salon products, utilizing nano-machinery to style your hair just right."
|
|
icon = 'icons/obj/watercloset.dmi'
|
|
icon_state = "mirror"
|
|
density = 0
|
|
anchored = 1
|
|
obj_flags = OBJ_FLAG_MOVES_UNSUPPORTED
|
|
var/shattered = 0
|
|
|
|
/// Visual object for handling the viscontents
|
|
var/datum/weakref/ref
|
|
vis_flags = VIS_HIDE
|
|
var/timerid = null
|
|
|
|
/obj/structure/mirror/Initialize()
|
|
. = ..()
|
|
var/obj/effect/reflection/reflection = new(src.loc)
|
|
reflection.setup_visuals(src)
|
|
ref = WEAKREF(reflection)
|
|
|
|
entered_event.register(loc, reflection, TYPE_PROC_REF(/obj/effect/reflection, check_vampire_enter))
|
|
exited_event.register(loc, reflection, TYPE_PROC_REF(/obj/effect/reflection, check_vampire_exit))
|
|
|
|
/obj/structure/mirror/Destroy()
|
|
var/obj/effect/reflection/reflection = ref.resolve()
|
|
if(istype(reflection))
|
|
entered_event.unregister(loc, reflection)
|
|
exited_event.unregister(loc, reflection)
|
|
qdel(reflection)
|
|
ref = null
|
|
return ..()
|
|
|
|
/obj/structure/mirror/attack_hand(mob/user as mob)
|
|
if(shattered)
|
|
return
|
|
|
|
if(user.mind)
|
|
var/datum/vampire/vampire = user.mind.antag_datums[MODE_VAMPIRE]
|
|
if(vampire && !(vampire.status & VAMP_ISTHRALL))
|
|
to_chat(user, "<span class='notice'>Your reflection appears distorted on the surface of \the [src].</span>")
|
|
|
|
if(ishuman(user))
|
|
var/mob/living/carbon/human/H = user
|
|
H.change_appearance(APPEARANCE_ALL_HAIR, H, FALSE, ui_state = default_state, state_object = src)
|
|
|
|
/obj/structure/mirror/proc/shatter()
|
|
if(shattered) return
|
|
shattered = 1
|
|
icon_state = "mirror_broke"
|
|
playsound(src, /singleton/sound_category/glass_break_sound, 70, 1)
|
|
desc = "Oh no, seven years of bad luck!"
|
|
|
|
var/obj/effect/reflection/reflection = ref.resolve()
|
|
if(istype(reflection))
|
|
reflection.alpha_icon_state = "mirror_mask_broken"
|
|
reflection.update_mirror_filters()
|
|
|
|
|
|
/obj/structure/mirror/bullet_act(var/obj/item/projectile/Proj)
|
|
if(prob(Proj.get_structure_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/user as mob)
|
|
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/glass_hit.ogg', 70, 1)
|
|
|
|
/obj/structure/mirror/attack_generic(var/mob/user, var/damage)
|
|
|
|
user.do_attack_animation(src)
|
|
if(shattered)
|
|
playsound(src.loc, 'sound/effects/hit_on_shattered_glass.ogg', 70, 1)
|
|
return 0
|
|
|
|
if(damage)
|
|
user.visible_message("<span class='danger'>[user] smashes [src]!</span>")
|
|
shatter()
|
|
else
|
|
user.visible_message("<span class='danger'>[user] hits [src] and bounces off!</span>")
|
|
return 1
|
|
|
|
/obj/effect/reflection
|
|
name = "reflection"
|
|
appearance_flags = KEEP_TOGETHER|TILE_BOUND|PIXEL_SCALE
|
|
mouse_opacity = MOUSE_OPACITY_TRANSPARENT
|
|
vis_flags = VIS_HIDE
|
|
layer = ABOVE_OBJ_LAYER
|
|
var/alpha_icon = 'icons/obj/watercloset.dmi'
|
|
var/alpha_icon_state = "mirror_mask"
|
|
var/obj/mirror
|
|
desc = "Why are you locked in the bathroom?"
|
|
desc_extended = "You talking to me?"
|
|
anchored = TRUE
|
|
unacidable = TRUE
|
|
|
|
var/blur_filter
|
|
|
|
/obj/effect/reflection/proc/setup_visuals(target)
|
|
mirror = target
|
|
|
|
if(mirror.pixel_x > 0)
|
|
dir = WEST
|
|
else if (mirror.pixel_x < 0)
|
|
dir = EAST
|
|
|
|
if(mirror.pixel_y > 0)
|
|
dir = SOUTH
|
|
else if (mirror.pixel_y < 0)
|
|
dir = NORTH
|
|
|
|
pixel_x = mirror.pixel_x
|
|
pixel_y = mirror.pixel_y
|
|
|
|
blur_filter = filter(type="blur", size = 1)
|
|
|
|
update_mirror_filters()
|
|
|
|
/obj/effect/reflection/proc/update_mirror_filters()
|
|
filters = null
|
|
|
|
vis_contents = null
|
|
|
|
if(!mirror)
|
|
return
|
|
|
|
var/matrix/M = matrix()
|
|
if(dir == WEST || dir == EAST)
|
|
M.Scale(-1, 1)
|
|
else if(dir == SOUTH|| dir == NORTH)
|
|
M.Scale(1, -1)
|
|
pixel_y = mirror.pixel_y + 5
|
|
|
|
transform = M
|
|
|
|
filters += filter("type" = "alpha", "icon" = icon(alpha_icon, alpha_icon_state), "x" = 0, "y" = 0)
|
|
for(var/mob/living/carbon/human/H in loc)
|
|
check_vampire_enter(H.loc, H)
|
|
|
|
vis_contents += get_turf(mirror)
|
|
|
|
/obj/effect/reflection/proc/check_vampire_enter(var/turf/T, var/mob/living/carbon/human/H)
|
|
if(!istype(H))
|
|
return
|
|
var/datum/vampire/V = H.get_antag_datum(MODE_VAMPIRE)
|
|
if(V)
|
|
if(V.status & VAMP_ISTHRALL)
|
|
filters += blur_filter
|
|
else
|
|
H.vis_flags |= VIS_HIDE
|
|
|
|
/obj/effect/reflection/proc/check_vampire_exit(var/turf/T, var/mob/living/carbon/human/H)
|
|
if(!istype(H))
|
|
return
|
|
var/datum/vampire/V = H.get_antag_datum(MODE_VAMPIRE)
|
|
if(V)
|
|
if(V.status & VAMP_ISTHRALL)
|
|
filters -= blur_filter
|
|
else
|
|
H.vis_flags &= ~VIS_HIDE
|
|
|
|
/obj/item/mirror
|
|
name = "mirror"
|
|
desc = "A SalonPro Nano-Mirror(TM) brand mirror! Now a portable version."
|
|
icon = 'icons/obj/cosmetics.dmi'
|
|
icon_state = "mirror"
|
|
w_class = ITEMSIZE_SMALL
|
|
|
|
/obj/item/mirror/attack_self(mob/user as mob)
|
|
if(user.mind)
|
|
var/datum/vampire/vampire = user.mind.antag_datums[MODE_VAMPIRE]
|
|
if(vampire && !(vampire.status & VAMP_ISTHRALL))
|
|
to_chat(user, "<span class='notice'>Your reflection appears distorted on the surface of \the [src].</span>")
|
|
|
|
if(ishuman(user))
|
|
var/mob/living/carbon/human/H = user
|
|
H.change_appearance(APPEARANCE_HAIR, H, FALSE, ui_state = default_state, state_object = src)
|