mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-07-17 02:54:44 +01:00
Enables fixing mirrors.
This commit is contained in:
@@ -10,7 +10,8 @@
|
||||
|
||||
|
||||
/obj/structure/mirror/attack_hand(mob/user)
|
||||
if(shattered) return
|
||||
if(shattered)
|
||||
return
|
||||
|
||||
if(ishuman(user))
|
||||
var/mob/living/carbon/human/H = user
|
||||
@@ -23,7 +24,8 @@
|
||||
//handle facial hair (if necessary)
|
||||
if(H.gender == MALE)
|
||||
var/new_style = input(user, "Select a facial hair style", "Grooming") as null|anything in facial_hair_styles_list
|
||||
if(userloc != H.loc) return //no tele-grooming
|
||||
if(userloc != H.loc)
|
||||
return //no tele-grooming
|
||||
if(new_style)
|
||||
H.facial_hair_style = new_style
|
||||
else
|
||||
@@ -31,7 +33,8 @@
|
||||
|
||||
//handle normal hair
|
||||
var/new_style = input(user, "Select a hair style", "Grooming") as null|anything in hair_styles_list
|
||||
if(userloc != H.loc) return //no tele-grooming
|
||||
if(userloc != H.loc)
|
||||
return //no tele-grooming
|
||||
if(new_style)
|
||||
H.hair_style = new_style
|
||||
|
||||
@@ -39,7 +42,8 @@
|
||||
|
||||
|
||||
/obj/structure/mirror/proc/shatter()
|
||||
if(shattered) return
|
||||
if(shattered)
|
||||
return
|
||||
shattered = 1
|
||||
icon_state = "mirror_broke"
|
||||
playsound(src, "shatter", 70, 1)
|
||||
@@ -61,6 +65,19 @@
|
||||
if(I.damtype == STAMINA)
|
||||
return
|
||||
if(shattered)
|
||||
if(istype(I, /obj/item/weapon/weldingtool))
|
||||
var/obj/item/weapon/weldingtool/WT = I
|
||||
if(WT.remove_fuel(0, user))
|
||||
user << "<span class='notice'>You begin repairing the shaterred [src]...</span>"
|
||||
playsound(src, 'sound/items/Welder.ogg', 100, 1)
|
||||
if(do_after(user, 10, target = src))
|
||||
if(!user || !WT || !WT.isOn())
|
||||
return
|
||||
user << "<span class='notice'>You repair the shattered [src].</span>"
|
||||
shattered = 0
|
||||
icon_state = "mirror"
|
||||
desc = "Mirror mirror on the wall, who's the most robust of them all?"
|
||||
return
|
||||
playsound(src.loc, 'sound/effects/hit_on_shattered_glass.ogg', 70, 1)
|
||||
return
|
||||
|
||||
@@ -74,7 +91,8 @@
|
||||
|
||||
/obj/structure/mirror/attack_alien(mob/living/user)
|
||||
user.do_attack_animation(src)
|
||||
if(islarva(user)) return
|
||||
if(islarva(user))
|
||||
return
|
||||
if(shattered)
|
||||
playsound(src.loc, 'sound/effects/hit_on_shattered_glass.ogg', 70, 1)
|
||||
return
|
||||
@@ -83,9 +101,11 @@
|
||||
|
||||
|
||||
/obj/structure/mirror/attack_animal(mob/living/user)
|
||||
if(!isanimal(user)) return
|
||||
if(!isanimal(user))
|
||||
return
|
||||
var/mob/living/simple_animal/M = user
|
||||
if(M.melee_damage_upper <= 0) return
|
||||
if(M.melee_damage_upper <= 0)
|
||||
return
|
||||
M.do_attack_animation(src)
|
||||
if(shattered)
|
||||
playsound(src.loc, 'sound/effects/hit_on_shattered_glass.ogg', 70, 1)
|
||||
|
||||
Reference in New Issue
Block a user