mirror of
https://github.com/PolarisSS13/Polaris.git
synced 2025-12-17 13:42:44 +00:00
* Better notifications * Add buttons to del/move tabs in edit mode * Add a <span> to emotes * Fix duplicate IDs in VChat and add more logging * VChat: Redone chat output in Vue.js * Ported tg asset cache * VChat DME Update * Replace \image macro with bicon() * NanoUI Subsystem Fixes Don't do this, the asset subsystem does this for you * Allow narrate/globalnarrate shenanigans Allows HTML if your entire thing is HTML * Disable bicon() icon object cache, and create text tag cache * Ore Scanner is written incorrectly Only revealed by vchat * Fixes 2 VChat bugs * Underline links in VChat * Fix LOOC color * VChat Improvements Hopefully, anyway. - Arbitrary font size setting - Line height setting - Multiple crush settings - Rewrote how tabs work hopefully for performance - Hidden messages are actually put elsewhere - Attempts to correct chat backlog restore on rejoin * Surgery steps to use <span> * Some VChat Tweaks - Chat remains between client reconnects if your client didn't close (so things like using the reconnect button, or autoreconnects at round end when that feels like working) - The client doesn't send pings to the server, the server sends pings to the client. This fixes AFK measurements for AFK kick purposes. - Turn latency indicator into a green/red indicator to show if you're connected, and when clicked will perform a one-time ping (and block doing it again for 10 seconds). It will display '?ms' if it never got a reply, or '999ms' if it did, but it was over 1s. * Include date in filename for VChat log save * Merge pull request #6767 from Cyantime/patch-2 Change chat export naming scheme * Adds VChat tab saving Saves every time you enter/exit edit mode. Persists between rounds, VChat reloads via verb, etc. * Fix chat exporting when someone has used unicode Only affects clients still using 512 * Use CLIENT_FROM_VAR for ease of code reading * Update code/modules/client/asset_cache.dm Co-Authored-By: Novacat <35587478+Novacat@users.noreply.github.com> * Fix runtime when client disconnects before vchat loads * Fix polaris version of command reports * Fix LOOC color in oldchat * Put some styles in various adminpm messages * Round info and advanced who spans * Fix missing tag-end * Maybe fix images for linux and statpanel but also doom everyone Co-authored-by: ShadowLarkens <ShadowLarkens@users.noreply.github.com> Co-authored-by: Novacat <35587478+Novacat@users.noreply.github.com>
65 lines
1.9 KiB
Plaintext
65 lines
1.9 KiB
Plaintext
/obj/item/weapon/mining_scanner
|
|
name = "ore detector"
|
|
desc = "A complex device used to locate ore deep underground."
|
|
icon = 'icons/obj/device.dmi'
|
|
icon_state = "forensic0-old" //GET A BETTER SPRITE.
|
|
item_state = "electronic"
|
|
origin_tech = list(TECH_MAGNET = 1, TECH_ENGINEERING = 1)
|
|
matter = list(DEFAULT_WALL_MATERIAL = 150)
|
|
var/scan_time = 5 SECONDS
|
|
|
|
/obj/item/weapon/mining_scanner/attack_self(mob/user as mob)
|
|
to_chat(user, "<span class='notice'>You begin sweeping \the [src] about, scanning for metal deposits.</span>")
|
|
playsound(loc, 'sound/items/goggles_charge.ogg', 50, 1, -6)
|
|
|
|
if(!do_after(user, scan_time))
|
|
return
|
|
|
|
ScanTurf(get_turf(user), user)
|
|
|
|
/obj/item/weapon/mining_scanner/proc/ScanTurf(var/atom/target, var/mob/user, var/exact = FALSE)
|
|
var/list/metals = list(
|
|
"surface minerals" = 0,
|
|
"precious metals" = 0,
|
|
"nuclear fuel" = 0,
|
|
"exotic matter" = 0,
|
|
"anomalous matter" = 0
|
|
)
|
|
|
|
var/turf/Turf = get_turf(target)
|
|
|
|
for(var/turf/simulated/T in range(2, Turf))
|
|
|
|
if(!T.has_resources)
|
|
continue
|
|
|
|
for(var/metal in T.resources)
|
|
var/ore_type
|
|
|
|
switch(metal)
|
|
if("silicates", "carbon", "hematite", "marble") ore_type = "surface minerals"
|
|
if("gold", "silver", "diamond", "lead") ore_type = "precious metals"
|
|
if("uranium") ore_type = "nuclear fuel"
|
|
if("phoron", "osmium", "hydrogen") ore_type = "exotic matter"
|
|
if("verdantium") ore_type = "anomalous matter"
|
|
|
|
if(ore_type) metals[ore_type] += T.resources[metal]
|
|
|
|
var/message = "[bicon(src)] <span class='notice'>The scanner beeps and displays a readout.</span>"
|
|
|
|
for(var/ore_type in metals)
|
|
var/result = "no sign"
|
|
|
|
if(!exact)
|
|
switch(metals[ore_type])
|
|
if(1 to 25) result = "trace amounts"
|
|
if(26 to 75) result = "significant amounts"
|
|
if(76 to INFINITY) result = "huge quantities"
|
|
|
|
else
|
|
result = metals[ore_type]
|
|
|
|
message += "<br><span class='notice'>- [result] of [ore_type].</span>"
|
|
|
|
to_chat(user, message)
|