Huds now scale with client view.
Exceptions : pretty sure damageoverlay, darkmask, blurry vision which all have unique sprites and dont use screen locs. To fix those we need to use scale() along with a standardized proc for changing view size.
Shaves off another ~10% of human life() I'd say.
How it works right now:
Makes a new image of the action object from its icon state and icon.
Blends it with the obj/screen button.
For up to 5 objects, every tick.
How it works after I optimized it:
Makes a new image once, sets its appearance to that of the action object (costless)
Since the image's loc is the obj/screen button it requires no blending
Does nothing else because my system isn't shit
- Added a thing to remove screen obj references to logout in addition to being called in destroy instead of relying fully on the reset screen obj proc.
- Moved some hud creation from AI to the hud datums where it should have been, might fix an issue or two
- My teeth still hurt from the dentist
- Adds robot module backgrounds to one of the screen objs that should be removed on logout as well so all screen objs should always be accounted for going in/out
Man you have to be reeeally careful with pooling about this kind of shit.
Fixes#4903, one check was accidentally not.
Fixes#4385, C4 is now removed from overlays regardless of success.
Fixes#4902, throwing an offhand now makes you throw the main hand instead.
Fixes#4914, Ian now checks for Adjacency before tucking in.
Tries #5112, spell objects should now remove refs properly.
Fixes#5121, all put_in_hand code now checks that the item can be held.
Fixes#5151, designs with no materials now make their own again.
Fixes#5199, money bags now use cointype instead of stupid path code.
Fixes#5208, the dropped cable coil after a shock is now only 1 long.
Fixes#5278, now only mapped telesci consoles start with a cell.
Fixes#5306, coins on a string are now no longer placed into the coinbox if pulled out.
Fixes#5367, MoMMIs can now have their wires fiddled with and can be deconstructed.
Patches up another obj/screen leak, this time with robot hud storage. Obj/screen pooling breaks when pooling objects that aren't refreshed by a new hud in mob/login() because all the objects currently on the client.screen are refreshed.
Robot module huds were one example of this thanks to someone *cough* ririchiyo *cough* putting them in new() instead of where all other hud elements are kept.
Spells now contain a ref to their UI element.
The UI element is now shown in the stat panel, and can be clicked. There are no easy workarounds on this.
Mind Transfer changed to use add_spell(), which should fix spells not being transferred with UI.
Fixes#4605Fixes#4628
I found out why these were being improperly pooled, thanks to skowron for producing a case to reproduce and view the variables of. On login or when reset_screen() was called for a mob that had an inventory open the inventory obj/screen's were being pooled and being reused elsewhere on other objects.
Hilarity ensues!