mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2026-08-29 07:59:01 +01:00
Object Examine Text Overhaul (#20923)
Extends and reworks how various extended information text (desc_info, desc_build, desc_upgrades) are handled to make object interactions and mechanics A.) much more clearly documented in-game and B.) much easier to support from the back-end. Almost certainly a candidate for test merge. Assembly/Disassembly instructions are noticeably sporadic, largely due to our current lack of a unified framework. That's a future thing I'd like to attack so that it can be handled programmatically, but for now I only targeted the biggest culprits as I came across them. --------- Signed-off-by: Batrachophreno <Batrochophreno@gmail.com>
This commit is contained in:
@@ -12,7 +12,6 @@
|
||||
/obj/machinery/mining/drill
|
||||
name = "mining drill head"
|
||||
desc = "A large industrial drill. Its bore does not penetrate deep enough to access the sublevels."
|
||||
desc_info = "You can upgrade this machine with better matter bins, capacitors, micro lasers, and power cells. You can also attach a mining satchel that has a warp pack and a linked ore box to it, to bluespace teleport any mined ore directly into the linked ore box."
|
||||
icon_state = "mining_drill"
|
||||
var/braces_needed = 2
|
||||
var/list/supports = list()
|
||||
@@ -58,10 +57,6 @@
|
||||
/obj/item/cell/high
|
||||
)
|
||||
|
||||
component_hint_bin = "Upgraded <b>matter bins</b> will increase ore capacity."
|
||||
component_hint_cap = "Upgraded <b>capacitors</b> will improve power efficiency."
|
||||
component_hint_laser = "Upgraded <b>micro-lasers</b> will increase the amount of ore harvested."
|
||||
|
||||
parts_power_mgmt = FALSE
|
||||
|
||||
/// The list of ores currently held within the mining drill
|
||||
@@ -70,26 +65,18 @@
|
||||
/// The last time the stored ores were updated, used as a cooldown to not nuke the server
|
||||
var/last_stored_ore_update = 0
|
||||
|
||||
/obj/machinery/mining/drill/Initialize()
|
||||
. = ..()
|
||||
spark_system = bind_spark(src, 3)
|
||||
/obj/machinery/mining/drill/mechanics_hints(mob/user, distance, is_adjacent)
|
||||
. += ..()
|
||||
. += "Attaching a mining satchel with a warp extraction pack and a linked ore box to this drill will bluespace-teleport any mined ore directly into the linked ore box."
|
||||
|
||||
/obj/machinery/mining/drill/Destroy()
|
||||
QDEL_NULL(attached_satchel)
|
||||
QDEL_NULL(spark_system)
|
||||
return ..()
|
||||
|
||||
/obj/machinery/mining/drill/proc/update_ore_count()
|
||||
stored_ores = list()
|
||||
for(var/obj/item/ore/O in contents)
|
||||
if(stored_ores[O.name])
|
||||
stored_ores[O.name]++
|
||||
else
|
||||
stored_ores[O.name] = 1
|
||||
|
||||
/obj/machinery/mining/drill/get_examine_text(mob/user, distance, is_adjacent, infix, suffix)
|
||||
. = ..()
|
||||
/obj/machinery/mining/drill/upgrade_hints(mob/user, distance, is_adjacent)
|
||||
. += ..()
|
||||
. += "Upgraded <b>matter bins</b> will increase ore capacity."
|
||||
. += "Upgraded <b>capacitors</b> will improve power efficiency."
|
||||
. += "Upgraded <b>micro-lasers</b> will increase the amount of ore harvested."
|
||||
|
||||
/obj/machinery/mining/drill/feedback_hints(mob/user, distance, is_adjacent)
|
||||
. += ..()
|
||||
if(need_player_check)
|
||||
. += SPAN_WARNING("The drill error light is flashing. The cell panel is [panel_open ? "open" : "closed"].")
|
||||
else
|
||||
@@ -123,6 +110,23 @@
|
||||
for(var/ore in stored_ores)
|
||||
. += SPAN_NOTICE("- [stored_ores[ore]] [ore]")
|
||||
|
||||
/obj/machinery/mining/drill/Initialize()
|
||||
. = ..()
|
||||
spark_system = bind_spark(src, 3)
|
||||
|
||||
/obj/machinery/mining/drill/Destroy()
|
||||
QDEL_NULL(attached_satchel)
|
||||
QDEL_NULL(spark_system)
|
||||
return ..()
|
||||
|
||||
/obj/machinery/mining/drill/proc/update_ore_count()
|
||||
stored_ores = list()
|
||||
for(var/obj/item/ore/O in contents)
|
||||
if(stored_ores[O.name])
|
||||
stored_ores[O.name]++
|
||||
else
|
||||
stored_ores[O.name] = 1
|
||||
|
||||
/obj/machinery/mining/drill/process()
|
||||
if(need_player_check)
|
||||
return
|
||||
|
||||
@@ -12,7 +12,6 @@
|
||||
/obj/machinery/mineral/processing_unit_console
|
||||
name = "ore redemption console"
|
||||
desc = "A handy console which can be use to retrieve mining points for use in the mining vendor, or to set processing values for various ore types."
|
||||
desc_info = "Up to date settings for the refinery can be found in the Aurorastation Guide to Mining wikipage."
|
||||
icon = 'icons/obj/machinery/wall/terminals.dmi'
|
||||
icon_state = "production_console"
|
||||
density = FALSE
|
||||
@@ -36,9 +35,11 @@
|
||||
/obj/item/stock_parts/console_screen
|
||||
)
|
||||
|
||||
component_hint_cap = "Upgraded <b>capacitors</b> will increase the amount of ore smelted per second."
|
||||
component_hint_laser = "Upgraded <b>micro-lasers</b> will increase the amount of ore smelted per second."
|
||||
component_hint_scan = "Upgraded <b>scanning modules</b> will increase the amount of ore smelted per second."
|
||||
/obj/machinery/mineral/processing_unit_console/upgrade_hints(mob/user, distance, is_adjacent)
|
||||
. += ..()
|
||||
. += "Upgraded <b>capacitors</b> will increase the amount of ore smelted per second."
|
||||
. += "Upgraded <b>micro-lasers</b> will increase the amount of ore smelted per second."
|
||||
. += "Upgraded <b>scanning modules</b> will increase the amount of ore smelted per second."
|
||||
|
||||
/obj/machinery/mineral/processing_unit_console/Initialize(mapload, d, populate_components)
|
||||
. = ..()
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
/obj/machinery/mineral/rigpress
|
||||
name = "hardsuit module press"
|
||||
desc = "This machine converts certain items permanently into hardsuit modules."
|
||||
desc_info = "The following devices can be made:"
|
||||
icon = 'icons/obj/stationobjs.dmi'
|
||||
icon_state = "coinpress0"
|
||||
density = TRUE
|
||||
@@ -19,12 +18,13 @@
|
||||
/obj/item/gun/energy/vaurca/thermaldrill = /obj/item/rig_module/mounted/thermalldrill
|
||||
)
|
||||
|
||||
/obj/machinery/mineral/rigpress/Initialize()
|
||||
. = ..()
|
||||
/obj/machinery/mineral/rigpress/mechanics_hints(mob/user, distance, is_adjacent)
|
||||
. += ..()
|
||||
. += "The following devices can be made:"
|
||||
for(var/press_type in press_types)
|
||||
var/obj/item/base = press_type
|
||||
var/obj/item/product = press_types[press_type]
|
||||
desc_info += "\n[initial(base.name)] -> [initial(product.name)]"
|
||||
. += "[initial(base.name)] -> [initial(product.name)]"
|
||||
|
||||
/obj/machinery/mineral/rigpress/update_icon()
|
||||
if(pressing)
|
||||
|
||||
@@ -963,12 +963,16 @@ GLOBAL_LIST_INIT_TYPED(total_extraction_beacons, /obj/structure/extraction_point
|
||||
|
||||
/obj/item/warp_core
|
||||
name = "warp extraction beacon signaller"
|
||||
desc = "Emits a signal which Warp-Item recovery devices can lock onto. Activate in hand to create a beacon."
|
||||
desc_info = "You can activate this item in-hand to create a static beacon, or you can click on an ore box with it to allow the ore box to be linked to warp packed mining satchels."
|
||||
desc = "Emits a signal which Warp-Item recovery devices can lock onto."
|
||||
icon = 'icons/obj/stock_parts.dmi'
|
||||
icon_state = "subspace_amplifier"
|
||||
origin_tech = list(TECH_BLUESPACE = 1, TECH_PHORON = 1, TECH_ENGINEERING = 2)
|
||||
|
||||
/obj/item/warp_core/mechanics_hints(mob/user, distance, is_adjacent)
|
||||
. += ..()
|
||||
. += "You can activate this item in-hand to create a static beacon."
|
||||
. += "You can click on an ore box with it to allow the ore box to be linked to warp extraction pack-enabled mining satchels."
|
||||
|
||||
/obj/item/warp_core/attack_self(mob/user)
|
||||
to_chat(user, SPAN_NOTICE("You start placing down the beacon..."))
|
||||
if(do_after(user, 15))
|
||||
|
||||
@@ -26,15 +26,14 @@
|
||||
/// The anchor used to render the ore pings on top of, this follows us around as the ore detector resets its blips
|
||||
var/obj/item/detector_anchor/anchor
|
||||
|
||||
/obj/item/ore_detector/mechanics_hints(mob/user, distance, is_adjacent)
|
||||
. += ..()
|
||||
. += "ALT-click to set the type of ore you wish to search for."
|
||||
|
||||
/obj/item/ore_detector/Initialize(mapload, ...)
|
||||
. = ..()
|
||||
anchor = new /obj/item/detector_anchor(src)
|
||||
|
||||
/obj/item/ore_detector/get_examine_text(mob/user, distance, is_adjacent, infix, suffix)
|
||||
. = ..()
|
||||
if(distance <= 1)
|
||||
. += FONT_SMALL(SPAN_NOTICE("Alt-click to set the ore you wish to search for."))
|
||||
|
||||
/obj/item/ore_detector/Destroy()
|
||||
deactivate()
|
||||
QDEL_NULL(anchor)
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
/obj/item/storage/bag/ore
|
||||
name = "mining satchel"
|
||||
desc = "This little bugger can be used to store and transport ores."
|
||||
desc_info = "You can attach a warp extraction pack to it, then click on an ore box that has a warp extraction beacon signaller attached to it to link them. Then ore put into this will be bluespace teleported into the ore box."
|
||||
icon = 'icons/obj/storage/bags.dmi'
|
||||
icon_state = "satchel"
|
||||
slot_flags = SLOT_BELT | SLOT_POCKET
|
||||
@@ -16,6 +15,15 @@
|
||||
var/linked_beacon = FALSE // can't hold an actual beacon beclause storage code a shit
|
||||
var/linked_beacon_uses = 3 // to hold the amount of uses the beacon had, storage code a shit.
|
||||
|
||||
/obj/item/storage/bag/ore/mechanics_hints(mob/user, distance, is_adjacent)
|
||||
. += ..()
|
||||
. += "You can attach a warp extraction pack to it, then click on an ore box that has a warp extraction beacon signaller attached to it to link them. Then ore put into this will be bluespace teleported into the ore box."
|
||||
|
||||
/obj/item/storage/bag/ore/feedback_hints(mob/user, distance, is_adjacent)
|
||||
. += ..()
|
||||
if(is_adjacent && linked_beacon)
|
||||
. += FONT_SMALL(SPAN_NOTICE("It has a <b>warp extraction pack</b> attached."))
|
||||
|
||||
/obj/item/storage/bag/ore/Destroy()
|
||||
if(listeningTo)
|
||||
UnregisterSignal(listeningTo, COMSIG_MOVABLE_MOVED)
|
||||
@@ -48,11 +56,6 @@
|
||||
if(location)
|
||||
pickup_items_from_loc_and_feedback(user, location, explicit_request = FALSE)
|
||||
|
||||
/obj/item/storage/bag/ore/get_examine_text(mob/user, distance, is_adjacent, infix, suffix)
|
||||
. = ..()
|
||||
if(is_adjacent && linked_beacon)
|
||||
. += FONT_SMALL(SPAN_NOTICE("It has a <b>warp extraction pack</b> inside."))
|
||||
|
||||
/obj/item/storage/bag/ore/drone
|
||||
// this used to be 400. The inventory system FUCKING DIED at this.
|
||||
max_storage_space = 200
|
||||
|
||||
@@ -4,7 +4,6 @@
|
||||
/obj/structure/ore_box
|
||||
name = "ore box"
|
||||
desc = "A heavy box used for storing ore."
|
||||
desc_info = "You can attach a warp extraction beacon signaller to this, then click on it with an ore satchel that has a warp extraction pack attached, to link them."
|
||||
icon = 'icons/obj/mining.dmi'
|
||||
icon_state = "orebox0"
|
||||
density = TRUE
|
||||
@@ -13,6 +12,32 @@
|
||||
var/obj/item/warp_core/warp_core // to set up the bluespace network
|
||||
var/list/stored_ore = list()
|
||||
|
||||
/obj/structure/ore_box/mechanics_hints(mob/user, distance, is_adjacent)
|
||||
. += ..()
|
||||
. += "You can attach a warp extraction beacon signaller to this, then click on it with an ore satchel that has a warp extraction pack attached, to link them."
|
||||
|
||||
/obj/structure/ore_box/feedback_hints(mob/user, distance, is_adjacent)
|
||||
. += ..()
|
||||
if(!is_adjacent) //Can only check the contents of ore boxes if you can physically reach them.
|
||||
return
|
||||
|
||||
add_fingerprint(user)
|
||||
|
||||
if(warp_core)
|
||||
. += FONT_SMALL(SPAN_NOTICE("It has a <b>warp extraction beacon signaller</b> attached to it."))
|
||||
|
||||
if(!length(contents))
|
||||
. += SPAN_NOTICE("It is empty.")
|
||||
return
|
||||
|
||||
if(world.time > last_update + 10)
|
||||
update_ore_count()
|
||||
last_update = world.time
|
||||
|
||||
. += SPAN_NOTICE("It holds:")
|
||||
for(var/ore in stored_ore)
|
||||
. += SPAN_NOTICE("- [stored_ore[ore]] [ore]")
|
||||
|
||||
/obj/structure/ore_box/attackby(obj/item/attacking_item, mob/user)
|
||||
if(istype(attacking_item, /obj/item/ore))
|
||||
user.drop_from_inventory(attacking_item, src)
|
||||
@@ -71,28 +96,6 @@
|
||||
else
|
||||
stored_ore[O.name] = 1
|
||||
|
||||
/obj/structure/ore_box/get_examine_text(mob/user, distance, is_adjacent, infix, suffix)
|
||||
. = ..()
|
||||
if(!is_adjacent) //Can only check the contents of ore boxes if you can physically reach them.
|
||||
return
|
||||
|
||||
add_fingerprint(user)
|
||||
|
||||
if(warp_core)
|
||||
. += FONT_SMALL(SPAN_NOTICE("It has a <b>warp extraction beacon signaller</b> attached to it."))
|
||||
|
||||
if(!length(contents))
|
||||
. += SPAN_NOTICE("It is empty.")
|
||||
return
|
||||
|
||||
if(world.time > last_update + 10)
|
||||
update_ore_count()
|
||||
last_update = world.time
|
||||
|
||||
. += SPAN_NOTICE("It holds:")
|
||||
for(var/ore in stored_ore)
|
||||
. += SPAN_NOTICE("- [stored_ore[ore]] [ore]")
|
||||
|
||||
/obj/structure/ore_box/verb/empty_box()
|
||||
set name = "Empty Ore Box"
|
||||
set category = "Object"
|
||||
|
||||
Reference in New Issue
Block a user