Merge remote-tracking branch 'polaris/master' into pixel_projectiles

This commit is contained in:
kevinz000
2019-01-06 23:12:48 -08:00
225 changed files with 1742 additions and 977 deletions
+24 -24
View File
@@ -27,24 +27,24 @@
. = ..(user)
if(health == maxhealth)
user << "<span class='notice'>It looks fully intact.</span>"
to_chat(user, "<span class='notice'>It looks fully intact.</span>")
else
var/perc = health / maxhealth
if(perc > 0.75)
user << "<span class='notice'>It has a few cracks.</span>"
to_chat(user, "<span class='notice'>It has a few cracks.</span>")
else if(perc > 0.5)
user << "<span class='warning'>It looks slightly damaged.</span>"
to_chat(user, "<span class='warning'>It looks slightly damaged.</span>")
else if(perc > 0.25)
user << "<span class='warning'>It looks moderately damaged.</span>"
to_chat(user, "<span class='warning'>It looks moderately damaged.</span>")
else
user << "<span class='danger'>It looks heavily damaged.</span>"
to_chat(user, "<span class='danger'>It looks heavily damaged.</span>")
if(silicate)
if (silicate < 30)
user << "<span class='notice'>It has a thin layer of silicate.</span>"
to_chat(user, "<span class='notice'>It has a thin layer of silicate.</span>")
else if (silicate < 70)
user << "<span class='notice'>It is covered in silicate.</span>"
to_chat(user, "<span class='notice'>It is covered in silicate.</span>")
else
user << "<span class='notice'>There is a thick layer of silicate covering it.</span>"
to_chat(user, "<span class='notice'>There is a thick layer of silicate covering it.</span>")
/obj/structure/window/proc/take_damage(var/damage = 0, var/sound_effect = 1)
var/initialhealth = health
@@ -260,26 +260,26 @@
state = 3 - state
update_nearby_icons()
playsound(src, W.usesound, 75, 1)
user << (state == 1 ? "<span class='notice'>You have unfastened the window from the frame.</span>" : "<span class='notice'>You have fastened the window to the frame.</span>")
to_chat(user, "<span class='notice'>You have [state ? "un" : ""]fastened the window [state ? "from" : "to"] the frame.</span>")
else if(reinf && state == 0)
anchored = !anchored
update_nearby_icons()
update_verbs()
playsound(src, W.usesound, 75, 1)
user << (anchored ? "<span class='notice'>You have fastened the frame to the floor.</span>" : "<span class='notice'>You have unfastened the frame from the floor.</span>")
to_chat(user, "<span class='notice'>You have [anchored ? "" : "un"]fastened the frame [anchored ? "to" : "from"] the floor.</span>")
else if(!reinf)
anchored = !anchored
update_nearby_icons()
update_verbs()
playsound(src, W.usesound, 75, 1)
user << (anchored ? "<span class='notice'>You have fastened the window to the floor.</span>" : "<span class='notice'>You have unfastened the window.</span>")
to_chat(user, "<span class='notice'>You have [anchored ? "" : "un"]fastened the window [anchored ? "to" : "from"] the floor.</span>")
else if(W.is_crowbar() && reinf && state <= 1)
state = 1 - state
playsound(src, W.usesound, 75, 1)
user << (state ? "<span class='notice'>You have pried the window into the frame.</span>" : "<span class='notice'>You have pried the window out of the frame.</span>")
to_chat(user, "<span class='notice'>You have pried the window [state ? "into" : "out of"] the frame.</span>")
else if(W.is_wrench() && !anchored && (!state || !reinf))
if(!glasstype)
user << "<span class='notice'>You're not sure how to dismantle \the [src] properly.</span>"
to_chat(user, "<span class='notice'>You're not sure how to dismantle \the [src] properly.</span>")
else
playsound(src, W.usesound, 75, 1)
visible_message("<span class='notice'>[user] dismantles \the [src].</span>")
@@ -327,8 +327,8 @@
return
/obj/structure/window/proc/rotate()
set name = "Rotate Window Counter-Clockwise"
/obj/structure/window/verb/rotate_counterclockwise()
set name = "Rotate Window Counterclockwise"
set category = "Object"
set src in oview(1)
@@ -339,17 +339,17 @@
return 0
if(anchored)
usr << "It is fastened to the floor therefore you can't rotate it!"
to_chat(usr, "It is fastened to the floor therefore you can't rotate it!")
return 0
update_nearby_tiles(need_rebuild=1) //Compel updates before
set_dir(turn(dir, 90))
src.set_dir(turn(src.dir, 90))
updateSilicate()
update_nearby_tiles(need_rebuild=1)
return
/obj/structure/window/proc/revrotate()
/obj/structure/window/verb/rotate_clockwise()
set name = "Rotate Window Clockwise"
set category = "Object"
set src in oview(1)
@@ -361,11 +361,11 @@
return 0
if(anchored)
usr << "It is fastened to the floor therefore you can't rotate it!"
to_chat(usr, "It is fastened to the floor therefore you can't rotate it!")
return 0
update_nearby_tiles(need_rebuild=1) //Compel updates before
set_dir(turn(dir, 270))
src.set_dir(turn(src.dir, 270))
updateSilicate()
update_nearby_tiles(need_rebuild=1)
return
@@ -418,11 +418,11 @@
//Updates the availabiliy of the rotation verbs
/obj/structure/window/proc/update_verbs()
if(anchored || is_fulltile())
verbs -= /obj/structure/window/proc/rotate
verbs -= /obj/structure/window/proc/revrotate
verbs -= /obj/structure/window/verb/rotate_counterclockwise
verbs -= /obj/structure/window/verb/rotate_clockwise
else if(!is_fulltile())
verbs += /obj/structure/window/proc/rotate
verbs += /obj/structure/window/proc/revrotate
verbs += /obj/structure/window/verb/rotate_counterclockwise
verbs += /obj/structure/window/verb/rotate_clockwise
//merges adjacent full-tile windows into one (blatant ripoff from game/smoothwall.dm)
/obj/structure/window/update_icon()