Revert "12/21 modernizations from TG live"
This commit is contained in:
@@ -6,13 +6,11 @@
|
||||
icon_state = "mirror"
|
||||
density = 0
|
||||
anchored = 1
|
||||
obj_integrity = 200
|
||||
max_integrity = 200
|
||||
integrity_failure = 100
|
||||
var/shattered = 0
|
||||
|
||||
|
||||
/obj/structure/mirror/attack_hand(mob/user)
|
||||
if(broken || !Adjacent(user))
|
||||
if(shattered || !Adjacent(user))
|
||||
return
|
||||
|
||||
if(ishuman(user))
|
||||
@@ -43,44 +41,81 @@
|
||||
H.update_hair()
|
||||
|
||||
|
||||
/obj/structure/mirror/obj_break(damage_flag)
|
||||
if(!broken && !(flags & NODECONSTRUCT))
|
||||
icon_state = "mirror_broke"
|
||||
playsound(src, "shatter", 70, 1)
|
||||
desc = "Oh no, seven years of bad luck!"
|
||||
broken = 1
|
||||
/obj/structure/mirror/proc/shatter()
|
||||
icon_state = "mirror_broke"
|
||||
playsound(src, "shatter", 70, 1)
|
||||
desc = "Oh no, seven years of bad luck!"
|
||||
shattered = 1
|
||||
|
||||
|
||||
/obj/structure/mirror/bullet_act(obj/item/projectile/P)
|
||||
. = ..()
|
||||
take_damage(P.damage, P.damage_type, 0)
|
||||
|
||||
/obj/structure/mirror/deconstruct(disassembled = TRUE)
|
||||
if(!(flags & NODECONSTRUCT))
|
||||
if(!disassembled)
|
||||
new /obj/item/weapon/shard( src.loc )
|
||||
qdel(src)
|
||||
|
||||
/obj/structure/mirror/attackby(obj/item/I, mob/living/user, params)
|
||||
if(istype(I, /obj/item/weapon/weldingtool) && user.a_intent != INTENT_HARM)
|
||||
if(istype(I, /obj/item/weapon/weldingtool) && user.a_intent != "harm")
|
||||
var/obj/item/weapon/weldingtool/WT = I
|
||||
if(broken)
|
||||
if(shattered)
|
||||
user.changeNext_move(CLICK_CD_MELEE)
|
||||
if(WT.remove_fuel(0, user))
|
||||
user << "<span class='notice'>You begin repairing [src]...</span>"
|
||||
playsound(src, 'sound/items/Welder.ogg', 100, 1)
|
||||
if(do_after(user, 10*I.toolspeed, target = src))
|
||||
if(do_after(user, 10/I.toolspeed, target = src))
|
||||
if(!user || !WT || !WT.isOn())
|
||||
return
|
||||
user << "<span class='notice'>You repair [src].</span>"
|
||||
broken = 0
|
||||
shattered = 0
|
||||
icon_state = initial(icon_state)
|
||||
desc = initial(desc)
|
||||
else
|
||||
return ..()
|
||||
|
||||
/obj/structure/mirror/play_attack_sound(damage_amount, damage_type = BRUTE, damage_flag = 0)
|
||||
/obj/structure/mirror/attacked_by(obj/item/I, mob/living/user)
|
||||
..()
|
||||
take_damage(I.force, I.damtype)
|
||||
|
||||
/obj/structure/mirror/ex_act(severity)
|
||||
switch(severity)
|
||||
if(1)
|
||||
qdel(src)
|
||||
if(2)
|
||||
if(prob(50))
|
||||
qdel(src)
|
||||
else
|
||||
take_damage(5)
|
||||
if(3)
|
||||
if(prob(75))
|
||||
take_damage(5)
|
||||
|
||||
/obj/structure/mirror/proc/take_damage(damage, damage_type = BRUTE, sound_effect = 1)
|
||||
switch(damage_type)
|
||||
if(BRUTE)
|
||||
playsound(src.loc, 'sound/effects/hit_on_shattered_glass.ogg', 70, 1)
|
||||
if(BURN)
|
||||
playsound(src.loc, 'sound/effects/hit_on_shattered_glass.ogg', 70, 1)
|
||||
else
|
||||
return
|
||||
if(!shattered)
|
||||
if(damage)
|
||||
shatter()
|
||||
else if(sound_effect)
|
||||
playsound(src.loc, 'sound/effects/hit_on_shattered_glass.ogg', 70, 1)
|
||||
|
||||
/obj/structure/mirror/proc/attack_generic(mob/living/user)
|
||||
user.changeNext_move(CLICK_CD_MELEE)
|
||||
user.do_attack_animation(src)
|
||||
user.visible_message("<span class='danger'>[user] smashes [src]!</span>")
|
||||
take_damage(5)
|
||||
|
||||
/obj/structure/mirror/attack_alien(mob/living/user)
|
||||
attack_generic(user)
|
||||
|
||||
/obj/structure/mirror/attack_animal(mob/living/simple_animal/M)
|
||||
if(M.melee_damage_upper <= 0)
|
||||
return
|
||||
attack_generic(M)
|
||||
|
||||
/obj/structure/mirror/attack_slime(mob/living/user)
|
||||
attack_generic(user)
|
||||
|
||||
/obj/structure/mirror/magic
|
||||
name = "magic mirror"
|
||||
@@ -151,7 +186,7 @@
|
||||
H.skin_tone = new_s_tone
|
||||
H.dna.update_ui_block(DNA_SKIN_TONE_BLOCK)
|
||||
|
||||
if(MUTCOLORS in H.dna.species.species_traits)
|
||||
if(MUTCOLORS in H.dna.species.specflags)
|
||||
var/new_mutantcolor = input(user, "Choose your skin color:", "Race change") as color|null
|
||||
if(new_mutantcolor)
|
||||
var/temp_hsv = RGBtoHSV(new_mutantcolor)
|
||||
|
||||
Reference in New Issue
Block a user