05-16-2018, 12:18 PM
(This post was last modified: 05-16-2018, 01:16 PM by kyle2143. Edited 3 times in total.)
Okay, this has a couple of things in it. To start, This is a new shield generator, similar is style to the Meteor Shield generator. The new shield, can be dragged and then activated in much the same way. It currently has 3 modes: atmos, liquid, solid, I wasn't sure whether to make each mode it's own individual object or not, but if that turns out to be the way to go it wouldn't be too much to change from here. (Naturally the liquid one doesn't actually work at this point since I don't have access to that code, but I made the mode and colour just for fun).
Each mode requires different amount of power for a similarly ranged shield, I wanted the power requirements to be high, but not so obscene that it can't be used with a battery. In that vein, I've also added the ability for it to be connected to an area's equipment power if you wrench it on top of a wire. This change also applies to the Meteor Shield Generator.
Here is a video of what they look like. Apparently the way I captured the video didn't show the popup screens, but in part of it I'm changing the range and power level of one of the shield generators:
https://streamable.com/wbncz
Now you might be asking yourself, surely this sort of thing already exists in the code, and you would be right! As far as I could find, there is obj/item/device/energy_shield_gen and /obj/atmos_field. The latter is actually pretty similar to my original plans for this project in design. But the main reason why I thought these weren't what we needed was that neither used any power and I thought it best to make it similar in design the obj/machinery/meteor_shield which uses /machinery's process(). Also, one of them didn't work at all as far as I could tell. I started work in there, but decided it wasn't right, so I took most of Meteor Shield and made it into a parent class for shield generators, and overrode the methods not needed in my new shield in that file.
I'm not super attached to the name or the look. I made up the sprites pretty quick. I actually had a cooler looking shield image, but I sort of lost it along the way and I didn't have it in me to find it or try making it again.
My original idea for this was a shield for pod doors and airlocks to prevent air escaping, like in sifi things like Star Wars/Trek. But I kinda shelved that in favor of the emergency e-shield for now since I thought that would be more popular. But If this change is implemented, making that would really just be a stone's throw away. Since the only major difference would be activating the shield remotely and the configuration.
EDIT: Forgot the pull link https://github.com/goonstation/goonstation-2016/pull/59
Each mode requires different amount of power for a similarly ranged shield, I wanted the power requirements to be high, but not so obscene that it can't be used with a battery. In that vein, I've also added the ability for it to be connected to an area's equipment power if you wrench it on top of a wire. This change also applies to the Meteor Shield Generator.
Here is a video of what they look like. Apparently the way I captured the video didn't show the popup screens, but in part of it I'm changing the range and power level of one of the shield generators:
https://streamable.com/wbncz
Now you might be asking yourself, surely this sort of thing already exists in the code, and you would be right! As far as I could find, there is obj/item/device/energy_shield_gen and /obj/atmos_field. The latter is actually pretty similar to my original plans for this project in design. But the main reason why I thought these weren't what we needed was that neither used any power and I thought it best to make it similar in design the obj/machinery/meteor_shield which uses /machinery's process(). Also, one of them didn't work at all as far as I could tell. I started work in there, but decided it wasn't right, so I took most of Meteor Shield and made it into a parent class for shield generators, and overrode the methods not needed in my new shield in that file.
I'm not super attached to the name or the look. I made up the sprites pretty quick. I actually had a cooler looking shield image, but I sort of lost it along the way and I didn't have it in me to find it or try making it again.
My original idea for this was a shield for pod doors and airlocks to prevent air escaping, like in sifi things like Star Wars/Trek. But I kinda shelved that in favor of the emergency e-shield for now since I thought that would be more popular. But If this change is implemented, making that would really just be a stone's throw away. Since the only major difference would be activating the shield remotely and the configuration.
EDIT: Forgot the pull link https://github.com/goonstation/goonstation-2016/pull/59