From 25cf971fef6ab890146eb2c2609a9a1155214003 Mon Sep 17 00:00:00 2001 From: oranges Date: Thu, 5 Oct 2017 10:33:09 +1300 Subject: [PATCH 1/2] Merge pull request #31275 from kingofkosmos/moredeconhints Adds deconstruction hints to various things --- .../objects/structures/beds_chairs/bed.dm | 4 ++++ .../objects/structures/beds_chairs/chair.dm | 12 ++++++++++-- .../structures/crates_lockers/closets.dm | 8 ++++++-- code/game/objects/structures/grille.dm | 9 ++++++++- code/game/objects/structures/lattice.dm | 10 ++++++++++ code/game/objects/structures/tables_racks.dm | 19 ++++++++++++++++++- code/game/turfs/simulated/floor.dm | 4 ++-- .../game/turfs/simulated/floor/fancy_floor.dm | 17 +++++++++++++---- .../game/turfs/simulated/floor/light_floor.dm | 4 ++++ .../turfs/simulated/floor/plasteel_floor.dm | 4 ++++ code/game/turfs/simulated/floor/plating.dm | 7 +++++++ .../game/turfs/simulated/floor/reinf_floor.dm | 5 +++++ code/modules/library/lib_items.dm | 15 +++++++++++++++ 13 files changed, 106 insertions(+), 12 deletions(-) diff --git a/code/game/objects/structures/beds_chairs/bed.dm b/code/game/objects/structures/beds_chairs/bed.dm index 935b62f46a..5c36c5a6ba 100644 --- a/code/game/objects/structures/beds_chairs/bed.dm +++ b/code/game/objects/structures/beds_chairs/bed.dm @@ -21,6 +21,10 @@ var/buildstacktype = /obj/item/stack/sheet/metal var/buildstackamount = 2 +/obj/structure/bed/examine(mob/user) + ..() + to_chat(user, "It's held together by a couple of bolts.") + /obj/structure/bed/deconstruct(disassembled = TRUE) if(!(flags_1 & NODECONSTRUCT_1)) if(buildstacktype) diff --git a/code/game/objects/structures/beds_chairs/chair.dm b/code/game/objects/structures/beds_chairs/chair.dm index aed1679322..9d6985c620 100644 --- a/code/game/objects/structures/beds_chairs/chair.dm +++ b/code/game/objects/structures/beds_chairs/chair.dm @@ -1,6 +1,6 @@ /obj/structure/chair name = "chair" - desc = "You sit in this. Either by will or force.\nDrag your sprite to sit in the chair. Alt-click to rotate it clockwise." + 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, "It's held together by a couple of bolts.") + if(!has_buckled_mobs()) + to_chat(user, "Drag your sprite to sit in it. Alt-click to rotate.") + else + to_chat(user, "Alt-click to rotate.") + /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.\nAlt-click to rotate it clockwise." + desc = "It looks comfy." icon_state = "comfychair" color = rgb(255,255,255) resistance_flags = FLAMMABLE diff --git a/code/game/objects/structures/crates_lockers/closets.dm b/code/game/objects/structures/crates_lockers/closets.dm index c7b63be32b..3d77be1bb5 100644 --- a/code/game/objects/structures/crates_lockers/closets.dm +++ b/code/game/objects/structures/crates_lockers/closets.dm @@ -76,8 +76,12 @@ /obj/structure/closet/examine(mob/user) ..() + if(welded) + to_chat(user, "It's welded shut.") if(anchored) - to_chat(user, "It is anchored to the ground.") + to_chat(user, "It is bolted to the ground.") + if(opened) + to_chat(user, "The parts are welded together.") else if(secure && !opened) to_chat(user, "Alt-click to [locked ? "unlock" : "lock"].") @@ -453,4 +457,4 @@ /obj/structure/closet/return_temperature() - return \ No newline at end of file + return diff --git a/code/game/objects/structures/grille.dm b/code/game/objects/structures/grille.dm index 914be24cfd..1683ac00e6 100644 --- a/code/game/objects/structures/grille.dm +++ b/code/game/objects/structures/grille.dm @@ -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, "It's secured in place with screws. The rods look like they could be cut through.") + if(!anchored) + to_chat(user, "The anchoring screws are unscrewed. The rods look like they could be cut through.") + /obj/structure/grille/rcd_vals(mob/user, obj/item/construction/rcd/the_rcd) switch(the_rcd.mode) if(RCD_DECONSTRUCT) diff --git a/code/game/objects/structures/lattice.dm b/code/game/objects/structures/lattice.dm index d578b307db..c0dcd866d8 100644 --- a/code/game/objects/structures/lattice.dm +++ b/code/game/objects/structures/lattice.dm @@ -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, "The rods look like they could be cut. There's space for more rods or a tile.") + /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, "The supporting rods look like they could be cut.") + /obj/structure/lattice/catwalk/ratvar_act() new /obj/structure/lattice/catwalk/clockwork(loc) diff --git a/code/game/objects/structures/tables_racks.dm b/code/game/objects/structures/tables_racks.dm index 116ced183f..c54661066a 100644 --- a/code/game/objects/structures/tables_racks.dm +++ b/code/game/objects/structures/tables_racks.dm @@ -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, "The top is screwed on, but the main bolts are also visible.") + /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, "The top cover has been welded loose and the main frame's bolts are exposed.") + else + to_chat(user, "The top cover is firmly welded on.") + /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, "It's held together by a couple of bolts.") + /obj/structure/rack/CanPass(atom/movable/mover, turf/target) if(src.density == 0) //Because broken racks -Agouri |TODO: SPRITE!| return 1 diff --git a/code/game/turfs/simulated/floor.dm b/code/game/turfs/simulated/floor.dm index 02206646d2..97634f7629 100644 --- a/code/game/turfs/simulated/floor.dm +++ b/code/game/turfs/simulated/floor.dm @@ -161,10 +161,10 @@ broken = 0 burnt = 0 if(user && !silent) - to_chat(user, "You remove the broken plating.") + to_chat(user, "You remove the broken plating.") else if(user && !silent) - to_chat(user, "You remove the floor tile.") + to_chat(user, "You remove the floor tile.") if(floor_tile && make_tile) new floor_tile(src) return make_plating() diff --git a/code/game/turfs/simulated/floor/fancy_floor.dm b/code/game/turfs/simulated/floor/fancy_floor.dm index a24642c735..428c965197 100644 --- a/code/game/turfs/simulated/floor/fancy_floor.dm +++ b/code/game/turfs/simulated/floor/fancy_floor.dm @@ -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, "There's a few screws and a small crack visible.") + /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, "You remove the broken planks.") + to_chat(user, "You remove the broken planks.") else if(make_tile) if(user && !silent) - to_chat(user, "You unscrew the planks.") + to_chat(user, "You unscrew the planks.") if(floor_tile) new floor_tile(src) else if(user && !silent) - to_chat(user, "You forcefully pry off the planks, destroying them in the process.") + to_chat(user, "You forcefully pry off the planks, destroying them in the process.") 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("[user] digs up [src].", "You [src.turfverb] [src].") + user.visible_message("[user] digs up [src].", "You [src.turfverb] [src].") 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, "There's a small crack on the edge of it.") + /turf/open/floor/carpet/Initialize() . = ..() update_icon() diff --git a/code/game/turfs/simulated/floor/light_floor.dm b/code/game/turfs/simulated/floor/light_floor.dm index 247382d03c..0dd3673f6a 100644 --- a/code/game/turfs/simulated/floor/light_floor.dm +++ b/code/game/turfs/simulated/floor/light_floor.dm @@ -12,6 +12,10 @@ var/can_modify_colour = TRUE +/turf/open/floor/light/examine(mob/user) + ..() + to_chat(user, "There's a small crack on the edge of it.") + /turf/open/floor/light/Initialize() . = ..() update_icon() diff --git a/code/game/turfs/simulated/floor/plasteel_floor.dm b/code/game/turfs/simulated/floor/plasteel_floor.dm index 63c883f88c..b194127de8 100644 --- a/code/game/turfs/simulated/floor/plasteel_floor.dm +++ b/code/game/turfs/simulated/floor/plasteel_floor.dm @@ -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, "There's a small crack on the edge of it.") + /turf/open/floor/plasteel/update_icon() if(!..()) return 0 diff --git a/code/game/turfs/simulated/floor/plating.dm b/code/game/turfs/simulated/floor/plating.dm index 8ad6657784..3e16da8b9f 100644 --- a/code/game/turfs/simulated/floor/plating.dm +++ b/code/game/turfs/simulated/floor/plating.dm @@ -12,6 +12,13 @@ icon_state = "plating" intact = FALSE +/turf/open/floor/plating/examine(mob/user) + ..() + if(broken || burnt) + to_chat(user, "It looks like the dents could be welded smooth.") + return + to_chat(user, "There are few attachment holes for a new tile or reinforcement rods.") + /turf/open/floor/plating/Initialize() if (!broken_states) broken_states = list("platingdmg1", "platingdmg2", "platingdmg3") diff --git a/code/game/turfs/simulated/floor/reinf_floor.dm b/code/game/turfs/simulated/floor/reinf_floor.dm index 04c97aa7d5..74354e78c7 100644 --- a/code/game/turfs/simulated/floor/reinf_floor.dm +++ b/code/game/turfs/simulated/floor/reinf_floor.dm @@ -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, "The reinforcement rods are wrenched firmly in place.") + /turf/open/floor/engine/airless initial_gas_mix = "TEMP=2.7" diff --git a/code/modules/library/lib_items.dm b/code/modules/library/lib_items.dm index ae5f5c2fbb..33f02bc759 100644 --- a/code/modules/library/lib_items.dm +++ b/code/modules/library/lib_items.dm @@ -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, "The bolts on the bottom are unsecured.") + if(anchored) + to_chat(user, "It's secured in place with bolts.") + switch(state) + if(0) + to_chat(user, "There's a small crack visible on the back panel.") + if(1) + to_chat(user, "There's space inside for a wooden shelf.") + if(2) + to_chat(user, "There's a small crack visible on the shelf.") + + /obj/structure/bookcase/Initialize(mapload) . = ..() if(!mapload)