Work Lamps, and Locks vs. AI
Hey Folks! Hope everyone had a good weekend. Mostly relaxing here, and discovering just how little insulation our old house's walls have :)
Back at work, I set about fixing the way AIs interact with locks. Previously, they could just grab anything they wanted from any container. But now that we have locks, that won't do.
Instead, I added code to selectively control whether the various "get item" functions allow bypassing locks. And the need for this varies quite a lot!
Some places, it's just an AI looking for a usable tool. Other cases are the ship hardware detecting the presence of an object. Still other places are spawning loot, or bartering between characters.
It was a lot of variation, but I think I've got all cases covered now. And so far, nothing's blowing up. And most importantly, it does what I set out to do: stop AIs from robbing locked crates automatically when trying to fulfill tasks :)
In other news, I decided to finally add a portable work lamp to the game. Since the only portable light in the game is an EVA helmet, which might not be available to players right away, I wanted to add a lower-cost, more common tool they can get a hold of.
Re: EVA suit availability, I'm thinking there will be a lower tier pressure suit that is easier to afford/find. Something like a direct pressure/flight suit with a helmet that at least maintains a bubble around the head, if not also some sort of rebreather/O2 supply. Basically, a poor-man's EVA suit.
Anyway, you can see the work lamp in today's screenshot. Plop it anywhere you want, and you can at least see a bit better. You can even equip it to your right hand (for now), providing similar lighting to the headlamp, except omnidirectional.
It's far from perfect. No batteries, no on/off yet. Doesn't really look great when equipped. But it gets the job done, and puts us one step closer to more effectively salvaging!
Michael's also got a batch of inventory grid upgrades on the way, which I'm itching to get my hands on. Things like the grid remembering item positions, more item transfer options, and some bug fixes involving non-applicable items (e.g. crew, wall sprites). Should be an interesting week!