Files
Paradise/code/game/objects/structures/mirror.dm
Qwertytoforty daca998981 [TM READY] Ports lavaland elites from TG. (#18448)
* startup, expect like 50 unneeded icons, not bug free™️

* Hope works. Cloak works. Buffs for AI controlled. Faction fix.

* map speed buffs, fixes resummon health decay

* Adds roles. Adds Mirror walk. Nerfs revival, especialy for non antag summoned.

* I am denser than bluespace ore

* x2 antag cooldown, update desc for cloak

* removes 66% burn damage resist from elites

* honestly just knock that down

* herald not speaking right, fuckup with max hp fix

* Thanks hal!

Co-authored-by: Charlie <69320440+hal9000PR@users.noreply.github.com>

* changes, changes, and more changes, oh my!

* Update code/datums/status_effects/buffs.dm

Co-authored-by: Charlie <69320440+hal9000PR@users.noreply.github.com>

* GC stuff

* oh, and just one more thing

* no gibtonite gaming

* Huston we have a FUCKING PROBLEM

* oopsy doopsy

* but just one more thing (again, gc stuff)

* Lets all elites speak their mind

* NO LAVA

* grab ghost, legion charge red.

* dust the dusting from the code

* no mirror cargo shuttle crossing

* need to stop making small changes, x2 broodmother

* herald no longer crashes the MC

* Lower broodmother cooldown, herald down 5 brute and , legionare gets more smoke and thermals, pandora gets chasers

* remove extra brackets, x 2 on aoe squares

* pandora now respects factions

* fixes teleporting to tumor if reactivated by someone else. Herald has light, boost elites make message

* requested changes

* mirroring a wanted change

Co-authored-by: AffectedArc07 <25063394+AffectedArc07@users.noreply.github.com>

Co-authored-by: Charlie <69320440+hal9000PR@users.noreply.github.com>
Co-authored-by: AffectedArc07 <25063394+AffectedArc07@users.noreply.github.com>
2022-07-30 20:22:28 +01:00

170 lines
4.8 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()
/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 = "mirror_broke"
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/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"
/obj/structure/mirror/magic/attack_hand(mob/user)
if(!ishuman(user) || broken)
return
var/mob/living/carbon/human/H = user
var/choice = input(user, "Something to change?", "Magical Grooming") as null|anything in list("Name", "Body", "Voice")
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")
var/list/race_list = list("Human", "Tajaran", "Skrell", "Unathi", "Diona", "Vulpkanin")
for(var/species in GLOB.whitelisted_species)
if(can_use_species(H, species))
race_list += species
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
AC.ui_interact(user)
if("Voice")
var/voice_choice = input(user, "Perhaps...", "Voice effects") as null|anything in 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(obj/item/I, mob/living/user, params)
return
/obj/structure/mirror/magic/proc/curse(mob/living/user)
return