Alt-clicking descriptions when examining (#30988)

* Adds what alt-clicking does into examine-messages.

* whoops fix

* AI holopad examine remove

* Fixed cigarette pack alt-clicking.

* Spear alt-click-message set to show only if explosive lance.
This commit is contained in:
kingofkosmos
2017-09-29 05:51:31 +03:00
committed by oranges
parent 5ec9bd8d03
commit 086d636b17
22 changed files with 105 additions and 19 deletions

View File

@@ -328,7 +328,7 @@ Congratulations! You are now trained for invasive xenobiology research!"}
return
/obj/item/paper/guides/antag/abductor/AltClick()
return
return //otherwise it would fold into a paperplane.
#define BATON_STUN 0
#define BATON_SLEEP 1

View File

@@ -11,6 +11,9 @@
var/initial_icon_state
var/static/list/style_list_icons = list("standard" = 'icons/mob/augmentation/augments.dmi', "engineer" = 'icons/mob/augmentation/augments_engineer.dmi', "security" = 'icons/mob/augmentation/augments_security.dmi', "mining" = 'icons/mob/augmentation/augments_mining.dmi')
/obj/machinery/aug_manipulator/examine(mob/user)
..()
to_chat(user, "<span class='notice'>Alt-click to eject the limb.</span>")
/obj/machinery/aug_manipulator/Initialize()
initial_icon_state = initial(icon_state)

View File

@@ -110,13 +110,17 @@
/obj/item/grenade/barrier
name = "barrier grenade"
desc = "Instant cover. Alt+click to toggle modes."
desc = "Instant cover."
icon = 'icons/obj/grenade.dmi'
icon_state = "flashbang"
item_state = "flashbang"
actions_types = list(/datum/action/item_action/toggle_barrier_spread)
var/mode = SINGLE
/obj/item/grenade/barrier/examine(mob/user)
..()
to_chat(user, "<span class='notice'>Alt-click to toggle modes.</span>")
/obj/item/grenade/barrier/AltClick(mob/living/user)
if(!istype(user) || user.incapacitated())
return

View File

@@ -66,6 +66,13 @@ GLOBAL_LIST_EMPTY(PDAs)
var/obj/item/inserted_item //Used for pen, crayon, and lipstick insertion or removal. Same as above.
var/overlays_x_offset = 0 //x offset to use for certain overlays
/obj/item/device/pda/examine(mob/user)
..()
if(!id && !inserted_item)
return
else
to_chat(user, "<span class='notice'>Alt-click to remove contents.</span>")
/obj/item/device/pda/Initialize()
. = ..()
if(fon)

View File

@@ -1,7 +1,7 @@
GLOBAL_LIST_EMPTY(GPS_list)
/obj/item/device/gps
name = "global positioning system"
desc = "Helping lost spacemen find their way through the planets since 2016. Alt+click to toggle power."
desc = "Helping lost spacemen find their way through the planets since 2016."
icon = 'icons/obj/telescience.dmi'
icon_state = "gps-c"
w_class = WEIGHT_CLASS_SMALL
@@ -15,6 +15,9 @@ GLOBAL_LIST_EMPTY(GPS_list)
var/updating = TRUE //Automatic updating of GPS list. Can be set to manual by user.
var/global_mode = TRUE //If disabled, only GPS signals of the same Z level are shown
/obj/item/device/gps/examine(mob/user)
..()
to_chat(user, "<span class='notice'>Alt-click to switch it [tracking ? "off":"on"].</span>")
/obj/item/device/gps/Initialize()
. = ..()

View File

@@ -1,6 +1,6 @@
/obj/item/device/radio/headset
name = "radio headset"
desc = "An updated, modular intercom that fits over the head. Takes encryption keys. \nTo speak on the general radio frequency, use ; before speaking."
desc = "An updated, modular intercom that fits over the head. Takes encryption keys."
icon_state = "headset"
item_state = "headset"
materials = list(MAT_METAL=75)
@@ -11,6 +11,12 @@
var/obj/item/device/encryptionkey/keyslot2 = null
dog_fashion = null
/obj/item/device/radio/headset/examine(mob/user)
..()
to_chat(user, "<span class='notice'>To speak on the general radio frequency, use ; before speaking.</span>")
if (command)
to_chat(user, "<span class='notice'>Alt-click to toggle the high-volume mode.</span>")
/obj/item/device/radio/headset/Initialize()
. = ..()
recalculateChannels()

View File

@@ -68,6 +68,7 @@
..()
if(reagents.total_volume)
to_chat(user, "It contains [round(reagents.total_volume)] units.")
to_chat(user, "<span class='notice'>Alt-click to empty it.</span>")
else
to_chat(user, "It is empty.")

View File

@@ -76,6 +76,7 @@
to_chat(user, "There are [get_amount()] in the stack.")
else
to_chat(user, "There is [get_amount()] in the stack.")
to_chat(user, "<span class='notice'>Alt-click to take a custom amount.</span>")
/obj/item/stack/proc/get_amount()
if(is_cyborg)

View File

@@ -125,13 +125,21 @@
icon_type = "cigarette"
spawn_type = /obj/item/clothing/mask/cigarette/space_cigarette
/obj/item/storage/fancy/cigarettes/examine(mob/user)
..()
to_chat(user, "<span class='notice'>Alt-click to extract contents.</span>")
/obj/item/storage/fancy/cigarettes/AltClick(mob/user)
if(user.get_active_held_item())
if(user.stat || user.restrained())
return
for(var/obj/item/lighter/lighter in src)
remove_from_storage(lighter, user.loc)
user.put_in_active_hand(lighter)
break
var/obj/item/clothing/mask/cigarette/W = locate(/obj/item/clothing/mask/cigarette) in contents
if(W && contents.len > 0)
remove_from_storage(W, user)
user.put_in_hands(W)
contents -= W
to_chat(user, "<span class='notice'>You take a [icon_type] out of the pack.</span>")
else
to_chat(user, "<span class='notice'>There are no [icon_type]s left in the pack.</span>")
/obj/item/storage/fancy/cigarettes/update_icon()
if(fancy_open || !contents.len)

View File

@@ -123,6 +123,11 @@
icon_broken = "medalbox+b"
can_hold = list(/obj/item/clothing/accessory/medal)
/obj/item/storage/lockbox/medal/examine(mob/user)
..()
if(!locked)
to_chat(user, "<span class='notice'>Alt-click to [open ? "close":"open"] it.</span>")
/obj/item/storage/lockbox/medal/AltClick()
if(!locked)
open = (open ? FALSE : TRUE)

View File

@@ -427,6 +427,11 @@
var/obj/item/grenade/explosive = null
var/war_cry = "AAAAARGH!!!"
/obj/item/twohanded/spear/examine(mob/user)
..()
if(explosive)
to_chat(user, "<span class='notice'>Alt-click to set your war cry.</span>")
/obj/item/twohanded/spear/update_icon()
if(explosive)
icon_state = "spearbomb[wielded]"
@@ -475,7 +480,7 @@
if(G)
explosive = G
name = "explosive lance"
desc = "A makeshift spear with [G] attached to it. Alt+click on the spear to set your war cry!"
desc = "A makeshift spear with [G] attached to it."
update_icon()
// CHAINSAW

View File

@@ -10,6 +10,10 @@
var/obj/item/extinguisher/stored_extinguisher
var/opened = 0
/obj/structure/extinguisher_cabinet/examine(mob/user)
..()
to_chat(user, "<span class='notice'>Alt-click to [opened ? "close":"open"] it.</span>")
/obj/structure/extinguisher_cabinet/New(loc, ndir, building)
..()
if(building)

View File

@@ -13,6 +13,10 @@
var/buildstacktype = /obj/item/stack/sheet/metal
var/buildstackamount = 0
/obj/structure/reflector/examine(mob/user)
..()
to_chat(user, "<span class='notice'>Alt-click to adjust its direction.</span>")
/obj/structure/reflector/bullet_act(obj/item/projectile/P)
var/turf/reflector_turf = get_turf(src)
var/turf/reflect_turf

View File

@@ -34,6 +34,11 @@ Pipelines + Other Objects -> Pipe network
var/device_type = 0
var/list/obj/machinery/atmospherics/nodes
/obj/machinery/atmospherics/examine(mob/living/user)
..()
if(is_type_in_list(src, GLOB.ventcrawl_machinery) && user.ventcrawler)
to_chat(user, "<span class='notice'>Alt-click to crawl through it.</span>")
/obj/machinery/atmospherics/New(loc, process = TRUE)
nodes = new(device_type)
if (!armor)
@@ -297,4 +302,3 @@ Pipelines + Other Objects -> Pipe network
//Used for certain children of obj/machinery/atmospherics to not show pipe vision when mob is inside it.
/obj/machinery/atmospherics/proc/can_see_pipes()
return TRUE

View File

@@ -3,6 +3,11 @@
materials = list(MAT_GLASS = 250)
var/glass_colour_type = null //colors your vision when worn
/obj/item/clothing/glasses/examine(mob/user)
..()
if(glass_colour_type && ishuman(user))
to_chat(user, "<span class='notice'>Alt-click to toggle its colors.</span>")
/obj/item/clothing/glasses/visor_toggling()
..()
if(visor_vars_to_toggle & VISOR_VISIONFLAGS)

View File

@@ -82,6 +82,10 @@
pockets = /obj/item/storage/internal/pocket/small/detective
dog_fashion = /datum/dog_fashion/head/detective
/obj/item/clothing/head/fedora/det_hat/examine(mob/user)
..()
to_chat(user, "<span class='notice'>Alt-click to take a candy corn.</span>")
/obj/item/clothing/head/fedora/det_hat/AltClick()
..()
if(ismob(loc))

View File

@@ -104,12 +104,14 @@
var/buffertext = "A funny bit of text."
/obj/item/toy/cards/singlecard/cas/examine(mob/user)
..()
if (flipped)
to_chat(user, "<span class='notice'>The card is face down.</span>")
else if (blank)
to_chat(user, "<span class='notice'>The card is blank. Write on it with a pen.</span>")
else
to_chat(user, "<span class='notice'>The card reads: [name]</span>")
to_chat(user, "<span class='notice'>Alt-click to flip it.</span>")
/obj/item/toy/cards/singlecard/cas/Flip()
set name = "Flip Card"

View File

@@ -184,7 +184,7 @@
/obj/structure/closet/crate/secure/loot/AltClick(mob/living/user)
if(!user.canUseTopic(src))
return
attack_hand(user)
attack_hand(user) //this helps you not blow up so easily by overriding unlocking which results in an immediate boom.
/obj/structure/closet/crate/secure/loot/attackby(obj/item/W, mob/user)
if(locked)

View File

@@ -21,6 +21,11 @@
var/w_class_open = WEIGHT_CLASS_BULKY
var/slowdown_open = TRUE
/obj/item/device/modular_computer/laptop/examine(mob/user)
..()
if(screen_on)
to_chat(user, "<span class='notice'>Alt-click to close it.</span>")
/obj/item/device/modular_computer/laptop/Initialize()
. = ..()

View File

@@ -44,6 +44,10 @@
desc = "A stationary computer. This one comes preloaded with research programs."
_has_ai = 1
/obj/machinery/modular_computer/console/preset/research/examine(mob/user)
..()
to_chat(user, "<span class='notice'>Alt-click to eject the intelliCard.</span>")
/obj/machinery/modular_computer/console/preset/research/install_programs()
var/obj/item/computer_hardware/hard_drive/hard_drive = cpu.all_components[MC_HDD]
hard_drive.store_file(new/datum/computer_file/program/ntnetmonitor())
@@ -59,6 +63,10 @@
_has_id_slot = 1
_has_printer = 1
/obj/machinery/modular_computer/console/preset/command/examine(mob/user)
..()
to_chat(user, "<span class='notice'>Alt-click [src] to eject the identification card.</span>")
/obj/machinery/modular_computer/console/preset/command/install_programs()
var/obj/item/computer_hardware/hard_drive/hard_drive = cpu.all_components[MC_HDD]
hard_drive.store_file(new/datum/computer_file/program/chatclient())

View File

@@ -64,6 +64,8 @@
/obj/item/paper/examine(mob/user)
..()
to_chat(user, "<span class='notice'>Alt-click to fold it.</span>")
var/datum/asset/assets = get_asset_datum(/datum/asset/simple/paper)
assets.send(user)
@@ -79,7 +81,7 @@
user << browse("<HTML><HEAD><TITLE>[name]</TITLE></HEAD><BODY>[stars(info)]<HR>[stamps]</BODY></HTML>", "window=[name]")
onclose(user, "[name]")
else
to_chat(user, "<span class='notice'>It is too far away.</span>")
to_chat(user, "<span class='warning'>You're too far away to read it!</span>")
/obj/item/paper/verb/rename()
@@ -101,10 +103,12 @@
name = "paper[(n_name ? text("- '[n_name]'") : null)]"
add_fingerprint(usr)
/obj/item/paper/suicide_act(mob/user)
user.visible_message("<span class='suicide'>[user] scratches a grid on [user.p_their()] wrist with the paper! It looks like [user.p_theyre()] trying to commit sudoku...</span>")
return (BRUTELOSS)
/obj/item/paper/attack_self(mob/user)
user.examinate(src)
if(rigged && (SSevents.holidays && SSevents.holidays[APRIL_FOOLS]))
@@ -400,4 +404,3 @@
/obj/item/paper/crumpled/bloody
icon_state = "scrap_bloodied"

View File

@@ -213,6 +213,10 @@
var/toggled = FALSE
var/obj/item/ammo_box/magazine/internal/shot/alternate_magazine
/obj/item/gun/ballistic/shotgun/automatic/dual_tube/examine(mob/user)
..()
to_chat(user, "<span class='notice'>Alt-click to pump it.</span>")
/obj/item/gun/ballistic/shotgun/automatic/dual_tube/Initialize()
. = ..()
if (!alternate_magazine)