Merge pull request #3133 from Citadel-Station-13/upstream-merge-31275

[MIRROR] Adds deconstruction hints to various things
This commit is contained in:
LetterJay
2017-10-04 18:44:50 -04:00
committed by GitHub
13 changed files with 106 additions and 12 deletions
@@ -21,6 +21,10 @@
var/buildstacktype = /obj/item/stack/sheet/metal
var/buildstackamount = 2
/obj/structure/bed/examine(mob/user)
..()
to_chat(user, "<span class='notice'>It's held together by a couple of <b>bolts</b>.</span>")
/obj/structure/bed/deconstruct(disassembled = TRUE)
if(!(flags_1 & NODECONSTRUCT_1))
if(buildstacktype)
@@ -1,6 +1,6 @@
/obj/structure/chair
name = "chair"
desc = "You sit in this. Either by will or force.\n<span class='notice'>Drag your sprite to sit in the chair. Alt-click to rotate it clockwise.</span>"
desc = "You sit in this. Either by will or force."
icon = 'icons/obj/chairs.dmi'
icon_state = "chair"
anchored = TRUE
@@ -14,6 +14,14 @@
var/item_chair = /obj/item/chair // if null it can't be picked up
layer = OBJ_LAYER
/obj/structure/chair/examine(mob/user)
..()
to_chat(user, "<span class='notice'>It's held together by a couple of <b>bolts</b>.</span>")
if(!has_buckled_mobs())
to_chat(user, "<span class='notice'>Drag your sprite to sit in it. Alt-click to rotate.</span>")
else
to_chat(user, "<span class='notice'>Alt-click to rotate.</span>")
/obj/structure/chair/Initialize()
. = ..()
if(!anchored) //why would you put these on the shuttle?
@@ -140,7 +148,7 @@
/obj/structure/chair/comfy
name = "comfy chair"
desc = "It looks comfy.\n<span class='notice'>Alt-click to rotate it clockwise.</span>"
desc = "It looks comfy."
icon_state = "comfychair"
color = rgb(255,255,255)
resistance_flags = FLAMMABLE
@@ -76,8 +76,12 @@
/obj/structure/closet/examine(mob/user)
..()
if(welded)
to_chat(user, "<span class='notice'>It's welded shut.</span>")
if(anchored)
to_chat(user, "It is anchored to the ground.")
to_chat(user, "<span class='notice'>It is <b>bolted</b> to the ground.</span>")
if(opened)
to_chat(user, "<span class='notice'>The parts are <b>welded</b> together.</span>")
else if(secure && !opened)
to_chat(user, "<span class='notice'>Alt-click to [locked ? "unlock" : "lock"].</span>")
@@ -453,4 +457,4 @@
/obj/structure/closet/return_temperature()
return
return
+8 -1
View File
@@ -1,5 +1,5 @@
/obj/structure/grille
desc = "A flimsy lattice of metal rods, with screws to secure it to the floor."
desc = "A flimsy framework of metal rods."
name = "grille"
icon = 'icons/obj/structures.dmi'
icon_state = "grille"
@@ -17,6 +17,13 @@
var/grille_type = null
var/broken_type = /obj/structure/grille/broken
/obj/structure/grille/examine(mob/user)
..()
if(anchored)
to_chat(user, "<span class='notice'>It's secured in place with <b>screws</b>. The rods look like they could be <b>cut</b> through.</span>")
if(!anchored)
to_chat(user, "<span class='notice'>The anchoring screws are <i>unscrewed</i>. The rods look like they could be <b>cut</b> through.</span>")
/obj/structure/grille/rcd_vals(mob/user, obj/item/construction/rcd/the_rcd)
switch(the_rcd.mode)
if(RCD_DECONSTRUCT)
+10
View File
@@ -16,6 +16,13 @@
smooth = SMOOTH_MORE
// flags_1 = CONDUCT_1
/obj/structure/lattice/examine(mob/user)
..()
deconstruction_hints(user)
/obj/structure/lattice/proc/deconstruction_hints(mob/user)
to_chat(user, "<span class='notice'>The rods look like they could be <b>cut</b>. There's space for more <i>rods</i> or a <i>tile</i>.</span>")
/obj/structure/lattice/Initialize(mapload)
. = ..()
for(var/obj/structure/lattice/LAT in loc)
@@ -79,6 +86,9 @@
smooth = SMOOTH_TRUE
canSmoothWith = null
/obj/structure/lattice/catwalk/deconstruction_hints(mob/user)
to_chat(user, "<span class='notice'>The supporting rods look like they could be <b>cut</b>.</span>")
/obj/structure/lattice/catwalk/ratvar_act()
new /obj/structure/lattice/catwalk/clockwork(loc)
+18 -1
View File
@@ -34,6 +34,13 @@
smooth = SMOOTH_TRUE
canSmoothWith = list(/obj/structure/table, /obj/structure/table/reinforced)
/obj/structure/table/examine(mob/user)
..()
deconstruction_hints(user)
/obj/structure/table/proc/deconstruction_hints(mob/user)
to_chat(user, "<span class='notice'>The top is <b>screwed</b> on, but the main <b>bolts</b> are also visible.</span>")
/obj/structure/table/Initialize()
. = ..()
for(var/obj/structure/table/T in src.loc)
@@ -285,7 +292,7 @@
*/
/obj/structure/table/reinforced
name = "reinforced table"
desc = "A reinforced version of the four legged table, much harder to simply deconstruct."
desc = "A reinforced version of the four legged table."
icon = 'icons/obj/smooth_structures/reinforced_table.dmi'
icon_state = "r_table"
deconstruction_ready = 0
@@ -295,6 +302,12 @@
integrity_failure = 50
armor = list(melee = 10, bullet = 30, laser = 30, energy = 100, bomb = 20, bio = 0, rad = 0, fire = 80, acid = 70)
/obj/structure/table/reinforced/deconstruction_hints(mob/user)
if(deconstruction_ready)
to_chat(user, "<span class='notice'>The top cover has been <i>welded</i> loose and the main frame's <b>bolts</b> are exposed.</span>")
else
to_chat(user, "<span class='notice'>The top cover is firmly <b>welded</b> on.</span>")
/obj/structure/table/reinforced/attackby(obj/item/W, mob/user, params)
if(istype(W, /obj/item/weldingtool))
var/obj/item/weldingtool/WT = W
@@ -405,6 +418,10 @@
pass_flags = LETPASSTHROW //You can throw objects over this, despite it's density.
max_integrity = 20
/obj/structure/rack/examine(mob/user)
..()
to_chat(user, "<span class='notice'>It's held together by a couple of <b>bolts</b>.</span>")
/obj/structure/rack/CanPass(atom/movable/mover, turf/target)
if(src.density == 0) //Because broken racks -Agouri |TODO: SPRITE!|
return 1
+2 -2
View File
@@ -161,10 +161,10 @@
broken = 0
burnt = 0
if(user && !silent)
to_chat(user, "<span class='danger'>You remove the broken plating.</span>")
to_chat(user, "<span class='notice'>You remove the broken plating.</span>")
else
if(user && !silent)
to_chat(user, "<span class='danger'>You remove the floor tile.</span>")
to_chat(user, "<span class='notice'>You remove the floor tile.</span>")
if(floor_tile && make_tile)
new floor_tile(src)
return make_plating()
+13 -4
View File
@@ -8,10 +8,15 @@
*/
/turf/open/floor/wood
desc = "Stylish dark wood."
icon_state = "wood"
floor_tile = /obj/item/stack/tile/wood
broken_states = list("wood-broken", "wood-broken2", "wood-broken3", "wood-broken4", "wood-broken5", "wood-broken6", "wood-broken7")
/turf/open/floor/wood/examine(mob/user)
..()
to_chat(user, "<span class='notice'>There's a few <b>screws</b> and a <b>small crack</b> visible.</span>")
/turf/open/floor/wood/attackby(obj/item/C, mob/user, params)
if(..())
return
@@ -42,16 +47,16 @@
broken = 0
burnt = 0
if(user && !silent)
to_chat(user, "<span class='danger'>You remove the broken planks.</span>")
to_chat(user, "<span class='notice'>You remove the broken planks.</span>")
else
if(make_tile)
if(user && !silent)
to_chat(user, "<span class='danger'>You unscrew the planks.</span>")
to_chat(user, "<span class='notice'>You unscrew the planks.</span>")
if(floor_tile)
new floor_tile(src)
else
if(user && !silent)
to_chat(user, "<span class='danger'>You forcefully pry off the planks, destroying them in the process.</span>")
to_chat(user, "<span class='notice'>You forcefully pry off the planks, destroying them in the process.</span>")
return make_plating()
/turf/open/floor/wood/cold
@@ -78,7 +83,7 @@
if(istype(C, /obj/item/shovel) && params)
new ore_type(src)
new ore_type(src) //Make some sand if you shovel grass
user.visible_message("<span class='notice'>[user] digs up [src].</span>", "<span class='notice'>You [src.turfverb] [src].</span>")
user.visible_message("[user] digs up [src].", "<span class='notice'>You [src.turfverb] [src].</span>")
playsound(src, 'sound/effects/shovel_dig.ogg', 50, 1)
make_plating()
if(..())
@@ -143,6 +148,10 @@
canSmoothWith = list(/turf/open/floor/carpet)
flags_1 = NONE
/turf/open/floor/carpet/examine(mob/user)
..()
to_chat(user, "<span class='notice'>There's a <b>small crack</b> on the edge of it.</span>")
/turf/open/floor/carpet/Initialize()
. = ..()
update_icon()
@@ -12,6 +12,10 @@
var/can_modify_colour = TRUE
/turf/open/floor/light/examine(mob/user)
..()
to_chat(user, "<span class='notice'>There's a <b>small crack</b> on the edge of it.</span>")
/turf/open/floor/light/Initialize()
. = ..()
update_icon()
@@ -4,6 +4,10 @@
broken_states = list("damaged1", "damaged2", "damaged3", "damaged4", "damaged5")
burnt_states = list("floorscorched1", "floorscorched2")
/turf/open/floor/plasteel/examine(mob/user)
..()
to_chat(user, "<span class='notice'>There's a <b>small crack</b> on the edge of it.</span>")
/turf/open/floor/plasteel/update_icon()
if(!..())
return 0
@@ -12,6 +12,13 @@
icon_state = "plating"
intact = FALSE
/turf/open/floor/plating/examine(mob/user)
..()
if(broken || burnt)
to_chat(user, "<span class='notice'>It looks like the dents could be <i>welded</i> smooth.</span>")
return
to_chat(user, "<span class='notice'>There are few attachment holes for a new <i>tile</i> or reinforcement <i>rods</i>.</span>")
/turf/open/floor/plating/Initialize()
if (!broken_states)
broken_states = list("platingdmg1", "platingdmg2", "platingdmg3")
@@ -1,11 +1,16 @@
/turf/open/floor/engine
name = "reinforced floor"
desc = "Extremely sturdy."
icon_state = "engine"
thermal_conductivity = 0.025
heat_capacity = INFINITY
floor_tile = /obj/item/stack/rods
/turf/open/floor/engine/examine(mob/user)
..()
to_chat(user, "<span class='notice'>The reinforcement rods are <b>wrenched</b> firmly in place.</span>")
/turf/open/floor/engine/airless
initial_gas_mix = "TEMP=2.7"
+15
View File
@@ -25,6 +25,21 @@
var/list/allowed_books = list(/obj/item/book, /obj/item/spellbook, /obj/item/storage/book) //Things allowed in the bookcase
/obj/structure/bookcase/examine(mob/user)
..()
if(!anchored)
to_chat(user, "<span class='notice'>The <i>bolts</i> on the bottom are unsecured.</span>")
if(anchored)
to_chat(user, "<span class='notice'>It's secured in place with <b>bolts</b>.</span>")
switch(state)
if(0)
to_chat(user, "<span class='notice'>There's a <b>small crack</b> visible on the back panel.</span>")
if(1)
to_chat(user, "<span class='notice'>There's space inside for a <i>wooden</i> shelf.</span>")
if(2)
to_chat(user, "<span class='notice'>There's a <b>small crack</b> visible on the shelf.</span>")
/obj/structure/bookcase/Initialize(mapload)
. = ..()
if(!mapload)