Makes loadout xenowear species whitelists check the selected species of the character instead of whether or not the client key is whitelisted for the species.
Runtime happens when someone has a saved preferences loadout containing an item that currently is expected to have gear_tweaks, but at the time that the savefile was last saved, did *not* have gear tweaks. Thus the saved prefs have null metadata.
Also it makes no sense to check the length of a list *inside* a for loop iterating over that list..
The main cause is the 'exploitable' check from `code/game/jobs/job_controller.dm` because the proc `amend_exploitable` from `code/modules/mob/mob.dm` spawns a duplicate of the implant at the mob's feet.
Tertiary issues were...
- The `implant_loadout` proc in `code/game/objects/items/weapons/implants/implant.dm` not inserting the implant in the correct location (was passing an organ instead of a zone define like BP_HEAD, which has a string value of "head".)
- There were unnecessary post-spawn behaviours for dud and neural fluff implants.
What now happens:
- The exploitable check now occurs in the `spawn_item` proc from `code/modules/client/preference_setup/loadout/loadout.dm`.
- The loadout implants are now inserted into the correct locations within a mob.
- There won't be implants created on the floor anymore.
* Multiple loadout slots
Ported from Bay. Each character can have 3 (number can be overridden by config) loadout slots. This way, you can have different outfits for different situations without needing to have a separate character slot or edit your loadout every time.
Tested here, works as intended. The current loadout is set as slot 1, so you don't need to worry about remaking it. This also ports the to_file and from_file macros to make it work, I'm assuming they could later be used elsewhere as well.
* Log of Changing
Client Login() now calls ..() before setting up preferences, ensuring a mob has actually been assigned. Fixes#12560 (and probably other somehow subtle sanitation issues).
The alien whitelist now checks the rights of the supplied mob, not usr.
When granting xeno loadout gear the mob's current species must match the gear's whiteliste species.
While I consider Polaris' character setup screen to be mechanically better
than most others, it wasn't prettier. Well. It was a bit. But now it's
more pretty-er.
Used the fake NanoUI 'browser' datum to render the pages for the New
Player panel and the Character Setup screen.
Also allows gear tweaks to take up a whole row on their own, due to potential length.
Also fixes a couple of incorrect && logical operations. Should have been ||.