Files
Paradise/code/game/objects/structures/mirror.dm
Kyani fdcf4899a2 Frankenstein Station 13: Introducing dissections and alien organs to xenobiology (#29093)
* ddsadsa

ddsadsa

* moderate again

* revert

* beginning with rebase

* organssssssssss

* organs now process!

* analyzer finished! + mapping

* tool bit implementation and quality

* organs and fixes and reworks

* more organ work

* more organs done

* more organ progress!

* more organ work

* MORE. ORGANS.

* temp

* more organsssss

* ITS DONE!!!!!!!!

* oops

* also oops

* linter stuff

* forgot this + oops

* linter

* i forgot to save!

* lots of improvements and tweaks

* move icon over

* icon tweaks

* icon mistake

* oops

* dumb

* more icon validations

* i think thisll fix it?

* Apply suggestions from code review

Co-authored-by: PollardTheDragon <144391971+PollardTheDragon@users.noreply.github.com>
Signed-off-by: Kyani <65205627+EmeraldCandy@users.noreply.github.com>

* fixes

* fixes+tweaks

* fix

* oops

* linter

* i didnt save....

* this should give -some- warning

* forgot a span

* Apply suggestions from code review

Co-authored-by: 1080pCat <96908085+1080pCat@users.noreply.github.com>
Signed-off-by: Kyani <65205627+EmeraldCandy@users.noreply.github.com>

* Apply suggestions from code review

Co-authored-by: 1080pCat <96908085+1080pCat@users.noreply.github.com>
Signed-off-by: Kyani <65205627+EmeraldCandy@users.noreply.github.com>

* beginning edits

* more fixed and tweaks with cooldowns

* Apply suggestions from code review

Co-authored-by: Luc <89928798+lewcc@users.noreply.github.com>
Signed-off-by: Kyani <65205627+EmeraldCandy@users.noreply.github.com>

* lots of tweaks

* more review changes

* comment change

* Apply suggestions from code review

Co-authored-by: Luc <89928798+lewcc@users.noreply.github.com>
Signed-off-by: Kyani <65205627+EmeraldCandy@users.noreply.github.com>

* returns start back to gland

* Apply suggestions from code review

Co-authored-by: 1080pCat <96908085+1080pCat@users.noreply.github.com>
Signed-off-by: Kyani <65205627+EmeraldCandy@users.noreply.github.com>

* code review fixes

* trying to make surgery work....

* might as well push this

* perfection. now i need text

* text + small tweaks and bugfixing

* linting

* forgot to implement this

* deconflicting maps

* modifying for xenos again

* i guess this wasnt needed???

* added surgical belts to xeno

* minor swap

* quick fix

* small tweaks

* small tweak

* tiny tweak

* some slime updates

* more tweaks

* more updates

* first batch of fixes

* hiero audio fix

* robotic fauna fixes

* more rounds of bugfixes

* prevents teleporting

* tiny fix

* makes sharp more common

* misc fixes

* surgery and revenant fixes + extractor

* adds cursed organ logging

* small bananium organ tweak

* actually gives teleporter access

* adds a message to the analyzer

* can now drag naughts

* slime behavior tweaks

* headslug tweak, cant eat organs

* Update code/datums/components/special_tastes.dm

Co-authored-by: warriorstar-orion <orion@snowfrost.garden>
Signed-off-by: Kyani <65205627+EmeraldCandy@users.noreply.github.com>

* Update code/datums/components/special_tastes.dm

Co-authored-by: warriorstar-orion <orion@snowfrost.garden>
Signed-off-by: Kyani <65205627+EmeraldCandy@users.noreply.github.com>

* Update code/datums/components/special_tastes.dm

Co-authored-by: warriorstar-orion <orion@snowfrost.garden>
Signed-off-by: Kyani <65205627+EmeraldCandy@users.noreply.github.com>

* Update code/modules/mob/living/simple_animal/slime/slime_mob.dm

Co-authored-by: warriorstar-orion <orion@snowfrost.garden>
Signed-off-by: Kyani <65205627+EmeraldCandy@users.noreply.github.com>

* Update code/modules/mob/living/simple_animal/slime/slime_mob.dm

Co-authored-by: warriorstar-orion <orion@snowfrost.garden>
Signed-off-by: Kyani <65205627+EmeraldCandy@users.noreply.github.com>

* Update code/game/gamemodes/miniantags/revenant/revenant.dm

Co-authored-by: warriorstar-orion <orion@snowfrost.garden>
Signed-off-by: Kyani <65205627+EmeraldCandy@users.noreply.github.com>

* Update code/datums/components/special_tastes.dm

Co-authored-by: warriorstar-orion <orion@snowfrost.garden>
Signed-off-by: Kyani <65205627+EmeraldCandy@users.noreply.github.com>

* Update code/game/gamemodes/miniantags/abduction/gland.dm

Co-authored-by: warriorstar-orion <orion@snowfrost.garden>
Signed-off-by: Kyani <65205627+EmeraldCandy@users.noreply.github.com>

* Update code/game/gamemodes/miniantags/abduction/gland.dm

Co-authored-by: warriorstar-orion <orion@snowfrost.garden>
Signed-off-by: Kyani <65205627+EmeraldCandy@users.noreply.github.com>

* moved this

* major rework prep

* didnt save

* rework done

* small fix

* makes aliens draggable by crew after death

* shouldnt have cut this

* xeno organ tweak + tips

* oops

* fixes and tweaks to slimes

* not used

* temp revert

* rebase map files to master

* re-applying changes

* access fix

* access tweak

* big fix for new refactor

* more refactoring

* forgot a span

* Update code/datums/components/surgery_initiator.dm

Co-authored-by: warriorstar-orion <orion@snowfrost.garden>
Signed-off-by: Kyani <65205627+EmeraldCandy@users.noreply.github.com>

* hiero only doesnt target dead megafauna

* various fixes

* fix requests

* fixed weird conflict markers

* deconflict

* deconflicting

* antimagic flags

* merge fixing

* Update code/modules/mining/lavaland/loot/hierophant_loot.dm

Signed-off-by: Burzah <116982774+Burzah@users.noreply.github.com>

* regen mesh fix

* small fixes

* tick fix

* Apply suggestions from code review

Co-authored-by: Luc <89928798+lewcc@users.noreply.github.com>
Signed-off-by: Kyani <65205627+EmeraldCandy@users.noreply.github.com>

* grammar

* Update code/modules/surgery/organs/organ_internal.dm

Co-authored-by: Luc <89928798+lewcc@users.noreply.github.com>
Signed-off-by: Kyani <65205627+EmeraldCandy@users.noreply.github.com>

* Update code/modules/surgery/organs/organ_internal.dm

Co-authored-by: Luc <89928798+lewcc@users.noreply.github.com>
Signed-off-by: Kyani <65205627+EmeraldCandy@users.noreply.github.com>

* Update code/modules/research/xenobiology/xenobiology_organs.dm

Co-authored-by: Luc <89928798+lewcc@users.noreply.github.com>
Signed-off-by: Kyani <65205627+EmeraldCandy@users.noreply.github.com>

* Update code/modules/research/xenobiology/xenobiology_organs.dm

Co-authored-by: Luc <89928798+lewcc@users.noreply.github.com>
Signed-off-by: Kyani <65205627+EmeraldCandy@users.noreply.github.com>

* Update code/modules/research/xenobiology/xenobiology_organs.dm

Co-authored-by: Luc <89928798+lewcc@users.noreply.github.com>
Signed-off-by: Kyani <65205627+EmeraldCandy@users.noreply.github.com>

* tweaks

---------

Signed-off-by: Kyani <65205627+EmeraldCandy@users.noreply.github.com>
Signed-off-by: Burzah <116982774+Burzah@users.noreply.github.com>
Co-authored-by: BeagleGaming1 <56142455+BeagleGaming1@users.noreply.github.com>
Co-authored-by: PollardTheDragon <144391971+PollardTheDragon@users.noreply.github.com>
Co-authored-by: 1080pCat <96908085+1080pCat@users.noreply.github.com>
Co-authored-by: Luc <89928798+lewcc@users.noreply.github.com>
Co-authored-by: warriorstar-orion <orion@snowfrost.garden>
Co-authored-by: Burzah <116982774+Burzah@users.noreply.github.com>
2025-06-10 16:46:56 +00:00

191 lines
5.6 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 = FALSE
anchored = TRUE
max_integrity = 200
integrity_failure = 100
var/list/ui_users = list()
var/broken_icon_state = "mirror_broke"
/obj/structure/mirror/organ
/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
/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 class='notice'>[user] begins to unfasten [src].</span>", "<span class='notice'>You begin to unfasten [src].</span>")
if(!I.use_tool(src, user, 30, volume = I.tool_volume))
return
if(broken)
user.visible_message("<span class='notice'>[user] drops the broken shards to the floor.</span>", "<span class='notice'>You drop the broken shards on the floor.</span>")
new /obj/item/shard(get_turf(user))
else
user.visible_message("<span class='notice'>[user] carefully places [src] on the floor.</span>", "<span class='notice'>You carefully place [src] on the floor.</span>")
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/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
/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 class='boldwarning'>Using the mirror will destroy any non biochip implants in you!</span>")
var/list/race_list = list("Human", "Tajaran", "Skrell", "Unathi", "Diona", "Vulpkanin", "Nian", "Grey", "Drask")
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/attackby__legacy__attackchain(obj/item/I, mob/living/user, params)
return
/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