98-4.0g
No matter how I bring a lightsource into the world, be it by adding using the according hexvalue, the gm menu or by crafting it, it's dir is always set to 0.
For instance tinker together a lantern, set it down on the ground, and tadaa, looks like a window.
.tweak shows no dir entry on those lightsources, but you can ".set dir 1".
I added dir=1 to all the single entries in lighting.dfn, I even tried to create a base item for light sources to pick from, but no matter what I do, the "dir=" setting just doesn't get carried over into the world when you bring a lightsource into being.
Intentional?
[FIXED] Lightsources in 2D client
- Xuri
- Site Admin
- Posts: 3704
- Joined: Mon Jun 02, 2003 9:11 am
- Location: Norway
- Has thanked: 48 times
- Been thanked: 8 times
- Contact:
Fixed on CVS:
Code: Select all
Fixed a bug that stopped UOX3 from reading and applying DIR values from item-DFNs correctly
Added DIR values to all lightsources in DFNDATA/ITEMS/BUILDING/lighting.dfn
Added DIR values to all .js files in JS/SERVER/LIGHT/ folder, enabling players to turn on/off lightsources-= Ho Eyo He Hum =-
I'm not sure why this was necessary, I thought the dir values in the dfns would suffice?Added DIR values to all .js files in JS/SERVER/LIGHT/ folder, enabling players to turn on/off lightsources
At any rate, the dir values in the lightsource scripts override any dir you assign to a light should somebody actually feel the need to turn it on and off.
And turning lights on and off seemed to work alright before?
edit: ah, it seems the 9fb wall sconces (maybe others - but I havent found any. all the others seem to work fine without dir values in the scripts) are the problem - they don't want to be turned off without the script changes. either way, setting them to dir=0 when off makes them shine like a window (default behaviour). I tried -1, and in case this doesn't break stuff: it does indeed turn off the light. but i really wouldnt be surprised if its just the wall sconces (the ones sticking to west walls) that are somehow borked.
edit2: also, the last torch in the list in the gm menu... it really freaks me out with it's weird name
- Xuri
- Site Admin
- Posts: 3704
- Joined: Mon Jun 02, 2003 9:11 am
- Location: Norway
- Has thanked: 48 times
- Been thanked: 8 times
- Contact:
Without the DIR entries in the js files, any lightsource that you add to the world as "off" would, when "turned on", have the default light-type - i.e. the one that fits a window. So if you're using custom settings for the lightsources I guess you should update the js files as well.
Not much that can be done with items like the wall sconces, I'm afraid. Since there's no "off" light-type, and these seem to have a hardcoded one, you're stuck with it unless you edit the client files directly. :/
As for the torch... Yeah someone appears to have tried to be smart, setting the name of the entry to "torch%es%" as if to try to enable some plural thing for it? Not sure. Renamed it to "torch" in my ItemMenu.bulk.dfn here, and will include that when I commit to CVS next time.
Not much that can be done with items like the wall sconces, I'm afraid. Since there's no "off" light-type, and these seem to have a hardcoded one, you're stuck with it unless you edit the client files directly. :/
As for the torch... Yeah someone appears to have tried to be smart, setting the name of the entry to "torch%es%" as if to try to enable some plural thing for it? Not sure. Renamed it to "torch" in my ItemMenu.bulk.dfn here, and will include that when I commit to CVS next time.
-= Ho Eyo He Hum =-