Merge branch 'master' of https://github.com/PolarisSS13/Polaris into polaris-sync-2018-02-01

# Conflicts:
#	.travis.yml
#	code/_away_mission_tests.dm
#	code/modules/admin/verbs/mapping.dm
#	code/modules/mob/living/carbon/human/update_icons.dm
#	html/changelogs/.all_changelog.yml
#	maps/southern_cross/southern_cross-1.dmm
#	maps/southern_cross/southern_cross-3.dmm
#	maps/southern_cross/southern_cross-6.dmm
#	nano/images/nanomap_z1.png
#	nano/images/nanomap_z10.png
#	nano/images/nanomap_z2.png
#	nano/images/nanomap_z3.png
#	nano/images/nanomap_z5.png
#	nano/images/nanomap_z6.png
This commit is contained in:
Leshana
2018-02-01 22:21:22 -05:00
123 changed files with 2135 additions and 17043 deletions
@@ -1,6 +1,6 @@
/obj/structure/closet/secure_closet/guncabinet
name = "gun cabinet"
req_access = list(access_armory)
req_one_access = list(access_armory)
icon = 'icons/obj/guncabinet.dmi'
icon_state = "base"
icon_off ="base"
+8
View File
@@ -0,0 +1,8 @@
/obj/structure/dogbed
name = "dog bed"
desc = "A bed made especially for dogs, or other similarly sized pets."
icon = 'icons/obj/furniture.dmi'
icon_state = "dogbed"
can_buckle = 1
buckle_dir = SOUTH
buckle_lying = 1
@@ -73,6 +73,7 @@
return
is_stump = TRUE
density = FALSE
icon_state = "[base_state]_stump"
overlays.Cut() // For the Sif tree and other future glowy trees.
set_light(0)
+127 -39
View File
@@ -6,9 +6,65 @@
w_class = ITEMSIZE_HUGE
var/state = 0
var/health = 200
var/max_health = 200
var/displaced_health = 50
var/current_damage = 0
var/cover = 50 //how much cover the girder provides against projectiles.
var/default_material = DEFAULT_WALL_MATERIAL
var/material/girder_material
var/material/reinf_material
var/reinforcing = 0
var/applies_material_colour = 1
/obj/structure/girder/New(var/newloc, var/material_key)
..(newloc)
if(!material_key)
material_key = default_material
set_material(material_key)
update_icon()
/obj/structure/girder/Destroy()
if(girder_material.products_need_process())
processing_objects -= src
. = ..()
/obj/structure/girder/process()
if(!radiate())
processing_objects -= src
return
/obj/structure/girder/proc/radiate()
var/total_radiation = girder_material.radioactivity + (reinf_material ? reinf_material.radioactivity / 2 : 0)
if(!total_radiation)
return
radiation_repository.radiate(src, total_radiation)
return total_radiation
/obj/structure/girder/proc/set_material(var/new_material)
girder_material = get_material_by_name(new_material)
if(!girder_material)
qdel(src)
name = "[girder_material.display_name] [initial(name)]"
max_health = round(girder_material.integrity) //Should be 150 with default integrity (steel). Weaker than ye-olden Girders now.
health = max_health
displaced_health = round(max_health/4)
if(applies_material_colour)
color = girder_material.icon_colour
if(girder_material.products_need_process()) //Am I radioactive or some other? Process me!
processing_objects |= src
else if(src in processing_objects) //If I happened to be radioactive or s.o. previously, and am not now, stop processing.
processing_objects -= src
/obj/structure/girder/get_material()
return girder_material
/obj/structure/girder/update_icon()
if(anchored)
icon_state = "girder"
else
icon_state = "displaced"
/obj/structure/girder/displaced
icon_state = "displaced"
@@ -16,6 +72,17 @@
health = 50
cover = 25
/obj/structure/girder/displaced/New(var/newloc, var/material_key)
..(newloc, material_key)
displace()
/obj/structure/girder/proc/displace()
name = "displaced [girder_material.display_name] [initial(name)]"
icon_state = "displaced"
anchored = 0
health = (displaced_health - round(current_damage / 4))
cover = 25
/obj/structure/girder/attack_generic(var/mob/user, var/damage, var/attack_message = "smashes apart", var/wallbreaker)
if(!damage || !wallbreaker)
return 0
@@ -36,6 +103,25 @@
if(!istype(Proj, /obj/item/projectile/beam))
damage *= 0.4 //non beams do reduced damage
else if(girder_material && girder_material.reflectivity >= 0.5) // Reflect lasers.
var/new_damage = damage * girder_material.reflectivity
var/outgoing_damage = damage - new_damage
damage = round(new_damage)
Proj.damage = outgoing_damage
visible_message("<span class='danger'>\The [src] reflects \the [Proj]!</span>")
// Find a turf near or on the original location to bounce to
var/new_x = Proj.starting.x + pick(0, 0, 0, -1, 1, -2, 2)
var/new_y = Proj.starting.y + pick(0, 0, 0, -1, 1, -2, 2)
//var/turf/curloc = get_turf(src)
var/turf/curloc = get_step(src, get_dir(src, Proj.starting))
Proj.penetrating += 1 // Needed for the beam to get out of the girder.
// redirect the projectile
Proj.redirect(new_x, new_y, curloc, null)
health -= damage
..()
if(health <= 0)
@@ -47,9 +133,10 @@
dismantle()
/obj/structure/girder/proc/reset_girder()
name = "[girder_material.display_name] [initial(name)]"
anchored = 1
cover = initial(cover)
health = min(health,initial(health))
health = min(max_health - current_damage,max_health)
state = 0
icon_state = initial(icon_state)
reinforcing = 0
@@ -60,62 +147,59 @@
if(istype(W, /obj/item/weapon/wrench) && state == 0)
if(anchored && !reinf_material)
playsound(src, W.usesound, 100, 1)
user << "<span class='notice'>Now disassembling the girder...</span>"
if(do_after(user,40 * W.toolspeed))
to_chat(user, "<span class='notice'>Now disassembling the girder...</span>")
if(do_after(user,(35 + round(max_health/50)) * W.toolspeed))
if(!src) return
user << "<span class='notice'>You dissasembled the girder!</span>"
to_chat(user, "<span class='notice'>You dissasembled the girder!</span>")
dismantle()
else if(!anchored)
playsound(src, W.usesound, 100, 1)
user << "<span class='notice'>Now securing the girder...</span>"
to_chat(user, "<span class='notice'>Now securing the girder...</span>")
if(do_after(user, 40 * W.toolspeed, src))
user << "<span class='notice'>You secured the girder!</span>"
to_chat(user, "<span class='notice'>You secured the girder!</span>")
reset_girder()
else if(istype(W, /obj/item/weapon/pickaxe/plasmacutter))
user << "<span class='notice'>Now slicing apart the girder...</span>"
to_chat(user, "<span class='notice'>Now slicing apart the girder...</span>")
if(do_after(user,30 * W.toolspeed))
if(!src) return
user << "<span class='notice'>You slice apart the girder!</span>"
to_chat(user, "<span class='notice'>You slice apart the girder!</span>")
dismantle()
else if(istype(W, /obj/item/weapon/pickaxe/diamonddrill))
user << "<span class='notice'>You drill through the girder!</span>"
to_chat(user, "<span class='notice'>You drill through the girder!</span>")
dismantle()
else if(istype(W, /obj/item/weapon/screwdriver))
if(state == 2)
playsound(src, W.usesound, 100, 1)
user << "<span class='notice'>Now unsecuring support struts...</span>"
to_chat(user, "<span class='notice'>Now unsecuring support struts...</span>")
if(do_after(user,40 * W.toolspeed))
if(!src) return
user << "<span class='notice'>You unsecured the support struts!</span>"
to_chat(user, "<span class='notice'>You unsecured the support struts!</span>")
state = 1
else if(anchored && !reinf_material)
playsound(src, W.usesound, 100, 1)
reinforcing = !reinforcing
user << "<span class='notice'>\The [src] can now be [reinforcing? "reinforced" : "constructed"]!</span>"
to_chat(user, "<span class='notice'>\The [src] can now be [reinforcing? "reinforced" : "constructed"]!</span>")
else if(istype(W, /obj/item/weapon/wirecutters) && state == 1)
playsound(src, W.usesound, 100, 1)
user << "<span class='notice'>Now removing support struts...</span>"
to_chat(user, "<span class='notice'>Now removing support struts...</span>")
if(do_after(user,40 * W.toolspeed))
if(!src) return
user << "<span class='notice'>You removed the support struts!</span>"
to_chat(user, "<span class='notice'>You removed the support struts!</span>")
reinf_material.place_dismantled_product(get_turf(src))
reinf_material = null
reset_girder()
else if(istype(W, /obj/item/weapon/crowbar) && state == 0 && anchored)
playsound(src, W.usesound, 100, 1)
user << "<span class='notice'>Now dislodging the girder...</span>"
to_chat(user, "<span class='notice'>Now dislodging the girder...</span>")
if(do_after(user, 40 * W.toolspeed))
if(!src) return
user << "<span class='notice'>You dislodged the girder!</span>"
icon_state = "displaced"
anchored = 0
health = 50
cover = 25
to_chat(user, "<span class='notice'>You dislodged the girder!</span>")
displace()
else if(istype(W, /obj/item/stack/material))
if(reinforcing && !reinf_material)
@@ -130,14 +214,16 @@
/obj/structure/girder/proc/take_damage(var/damage)
health -= damage
if(health <= 0)
dismantle()
else
current_damage = current_damage + damage //Rather than calculate this every time we need to use it, just calculate it here and save it.
/obj/structure/girder/proc/construct_wall(obj/item/stack/material/S, mob/user)
var/amount_to_use = reinf_material ? 1 : 2
if(S.get_amount() < amount_to_use)
user << "<span class='notice'>There isn't enough material here to construct a wall.</span>"
to_chat(user, "<span class='notice'>There isn't enough material here to construct a wall.</span>")
return 0
var/material/M = name_to_material[S.default_type]
@@ -148,24 +234,24 @@
add_hiddenprint(usr)
if(M.integrity < 50)
user << "<span class='notice'>This material is too soft for use in wall construction.</span>"
to_chat(user, "<span class='notice'>This material is too soft for use in wall construction.</span>")
return 0
user << "<span class='notice'>You begin adding the plating...</span>"
to_chat(user, "<span class='notice'>You begin adding the plating...</span>")
if(!do_after(user,40) || !S.use(amount_to_use))
return 1 //once we've gotten this far don't call parent attackby()
if(anchored)
user << "<span class='notice'>You added the plating!</span>"
to_chat(user, "<span class='notice'>You added the plating!</span>")
else
user << "<span class='notice'>You create a false wall! Push on it to open or close the passage.</span>"
to_chat(user, "<span class='notice'>You create a false wall! Push on it to open or close the passage.</span>")
wall_fake = 1
var/turf/Tsrc = get_turf(src)
Tsrc.ChangeTurf(/turf/simulated/wall)
var/turf/simulated/wall/T = get_turf(src)
T.set_material(M, reinf_material)
T.set_material(M, reinf_material, girder_material)
if(wall_fake)
T.can_open = 1
T.add_hiddenprint(usr)
@@ -174,22 +260,22 @@
/obj/structure/girder/proc/reinforce_with_material(obj/item/stack/material/S, mob/user) //if the verb is removed this can be renamed.
if(reinf_material)
user << "<span class='notice'>\The [src] is already reinforced.</span>"
to_chat(user, "<span class='notice'>\The [src] is already reinforced.</span>")
return 0
if(S.get_amount() < 1)
user << "<span class='notice'>There isn't enough material here to reinforce the girder.</span>"
to_chat(user, "<span class='notice'>There isn't enough material here to reinforce the girder.</span>")
return 0
var/material/M = name_to_material[S.default_type]
if(!istype(M) || M.integrity < 50)
user << "You cannot reinforce \the [src] with that; it is too soft."
to_chat(user, "You cannot reinforce \the [src] with that; it is too soft.")
return 0
user << "<span class='notice'>Now reinforcing...</span>"
to_chat(user, "<span class='notice'>Now reinforcing...</span>")
if (!do_after(user,40) || !S.use(1))
return 1 //don't call parent attackby() past this point
user << "<span class='notice'>You added reinforcement!</span>"
to_chat(user, "<span class='notice'>You added reinforcement!</span>")
reinf_material = M
reinforce_girder()
@@ -197,13 +283,13 @@
/obj/structure/girder/proc/reinforce_girder()
cover = reinf_material.hardness
health = 500
health = health + round(reinf_material.integrity/2)
state = 2
icon_state = "reinforced"
reinforcing = 0
/obj/structure/girder/proc/dismantle()
new /obj/item/stack/material/steel(get_turf(src))
girder_material.place_dismantled_product(get_turf(src))
qdel(src)
/obj/structure/girder/attack_hand(mob/user as mob)
@@ -235,6 +321,8 @@
icon_state= "cultgirder"
health = 250
cover = 70
girder_material = DEFAULT_WALL_MATERIAL
applies_material_colour = 0
/obj/structure/girder/cult/dismantle()
new /obj/effect/decal/remains/human(get_turf(src))
@@ -243,18 +331,18 @@
/obj/structure/girder/cult/attackby(obj/item/W as obj, mob/user as mob)
if(istype(W, /obj/item/weapon/wrench))
playsound(src, W.usesound, 100, 1)
user << "<span class='notice'>Now disassembling the girder...</span>"
to_chat(user, "<span class='notice'>Now disassembling the girder...</span>")
if(do_after(user,40 * W.toolspeed))
user << "<span class='notice'>You dissasembled the girder!</span>"
to_chat(user, "<span class='notice'>You dissasembled the girder!</span>")
dismantle()
else if(istype(W, /obj/item/weapon/pickaxe/plasmacutter))
user << "<span class='notice'>Now slicing apart the girder...</span>"
to_chat(user, "<span class='notice'>Now slicing apart the girder...</span>")
if(do_after(user,30 * W.toolspeed))
user << "<span class='notice'>You slice apart the girder!</span>"
to_chat(user, "<span class='notice'>You slice apart the girder!</span>")
dismantle()
else if(istype(W, /obj/item/weapon/pickaxe/diamonddrill))
user << "<span class='notice'>You drill through the girder!</span>"
to_chat(user, "<span class='notice'>You drill through the girder!</span>")
new /obj/effect/decal/remains/human(get_turf(src))
dismantle()
+13
View File
@@ -156,6 +156,9 @@
/obj/structure/sign/warning/docking_area
name = "\improper KEEP CLEAR: DOCKING AREA"
/obj/structure/sign/warning/evac
name = "\improper KEEP CLEAR: EVAC DOCKING AREA"
icon_state = "evac"
/obj/structure/sign/warning/engineering_access
@@ -777,3 +780,13 @@
/obj/structure/sign/atmos/air
name = "\improper AIR"
icon_state = "atmos_air"
/obj/structure/sign/poi/engineleft
name = "I.C.V."
desc = "The charred name of a cargo ship of some description."
icon_state = "poi_engine1"
/obj/structure/sign/poi/engineright
name = "I.C.V."
desc = "The charred name of a cargo ship of some description."
icon_state = "poi_engine2"