aboutsummaryrefslogtreecommitdiff
path: root/src/agent.rs
AgeCommit message (Collapse)Author
2021-11-12remove superfluous semicolonsDaniel Schadt
2021-11-12Fix player name parsing logicDaniel Schadt
The old code seemed to choke on WvW players, as the subgroup-calculating code did 0 - b'0', which underflowed. The proper way to parse a subgroup is not to take a single character anyway, because subgroups can be bigger than 10. The new code fixes that by properly extracting the "subgroup str literal" and then parsing it as an integer, with some special logic to detect an "empty" subgroup as it is in WvW.
2020-10-01implement sequence deserialization for AgentDaniel Schadt
2020-10-01remove another redundant static qualifierDaniel Schadt
2020-10-01remove redundant static qualifierDaniel Schadt
2020-10-01fix documentation linksDaniel Schadt
2020-10-01add Agent serialization testsDaniel Schadt
2020-10-01move Agent definition to a separate fileDaniel Schadt
Just like with Event, we now have Agent defined in its own submodule. The amount of code that it entailed was a lot, so it made sense to split it off, especially with the deserialization being another big chunk of Agent related code in lib.rs The main issue was that the processing submodule accessed private fields of the Agent struct, which is now no longer possible (since processing is no longer a submodule of the module in which Agent is defined). Therefore, some simple crate-public setters for those fields have been added. Those setters are not public because we do not want outside crates to mess with the innards of Agent (yet). Although with (de)serialization being a thing, we need to ensure that we can handle nonsensical values anyway, since we can no longer guarantee that we have full control over all of the values, even without setters.