ID:2152141
 
Applies to:
Status: Open

Issue hasn't been assigned a status value.
in ye olden days of BYOND 304, Dan hath released a feature as such list below
As a side-effect of these changes, it is also possible to force a specific resource to be loaded by the client. This might be useful if you do not have client.preload_rsc turned on but you need to make sure certain resources are pre-loaded in a given situation. Currently, this involves sending a query to the client each time it is called (no batching or server-side memory), so just keep that in mind. Example:
mob/verb/test()
usr.client.Export("##action=load_rsc",'whaap.wav')

usr << "Whhhhaaaap!"
usr << 'whaap.wav'

If this turns out to be a common need, we'll probably add a convenience function for the purpose, (and it would take multiple files rather than just one). Many other client.Export() actions are handled through convenience functions (such as browse(), browse_rsc(), ftp(), and so on). Hopefully this won't be the case, though, because that would circumvent the ease of use that the automatic system provides.

I believe doth time has come to turn this into a proper function, and such create a reference entry.

if such a function were to be implemented into proper function form - it'd be coo if it could accept a list of resources or something (a list of objects whose icons need to be transmitted?).
oh hey... I was just wondering if there was a way to load a resource that wasn't in the rsc to fix a bug on /tg/station

Definitely needs to be a function
In response to MrStonedOne
MrStonedOne wrote:
oh hey... I was just wondering if there was a way to load a resource that wasn't in the rsc to fix a bug on /tg/station

Definitely needs to be a function

There's no such thing as a resource that isn't in the .rsc. There are server-side files, but in order for a file to be delivered to a client it ultimately needs to be in the .rsc.

Can you elaborate on your goals there?
It's an easy way to send a file to a client's cache (non-browser cache) without displaying the file to them. The current client.Export() functionality is kind of clunky.
We have a random sound that plays right before the world reboots at round end. admins can upload a replacement sound. So i need to make sure clients already have the sound before the end of the world to ensure they actually hear it other wise the world reboots before the client actually gets the entire sound.

The other thing is the admin verb to play a sound to everybody or people in range. Having that be in sync (some what) across clients would be much better, rather then it taking much longer (up to 20/30 seconds) to play for clients on slower connections.

Because both of these are uploaded files, they don't exist in the rsc, but they exist in the rsc, (in terms of existing in the dynamic rsc, which isn't set to preload)
Oh I see. Your terminology had me confused there. So they're in the .rsc, just in the .dyn.rsc but not not in the original .rsc as it was compiled. I thought you were saying you wanted to send a file that didn't even have a cache reference at all.
512 plsu