Skip to content
This repository has been archived by the owner on Jan 22, 2024. It is now read-only.

feat(equipment): Add equipment to entity snapshots #39

Merged
merged 4 commits into from
Jun 8, 2020

Conversation

LarsKoelpin
Copy link
Contributor

Hi,
as stated in #38 I'd like to have the equipment in he snapshots.

The implementation seems to work, but the test is failing and I'm not really sure how to exactly fix them.
(something with default value comparison)

@markus-wa
Copy link
Owner

Ahh yes, classic 😄

Check out this one 🙂 https://github.com/markus-wa/cs-demo-minifier/blob/master/replay/nondefault/nondefault_replay.go

You'll need to add the new data in the init() func. The package doc there also explains what it is.

@markus-wa markus-wa added the enhancement New feature or request label Jun 7, 2020
@LarsKoelpin
Copy link
Contributor Author

LarsKoelpin commented Jun 7, 2020

If I understood correctly, I just have to add:

Equipment:     make([]rep.EntityEquipment, 0),

Unfortunately, this results in the same test failure :(

@markus-wa
Copy link
Owner

You will need at least one EntityEquipment entry, not an empty slice. (this is due to omitempty)

@LarsKoelpin
Copy link
Contributor Author

If you have some spare time, would you have a look on the failing snapshots tests related to the protobuf files, as I never have worked with protobuf.

I guess somehow the build get stuck?!

@markus-wa
Copy link
Owner

this should do it: 066b9e0 🙂

protobuf mappings for new fields need to be added manually (while events are just generic key/value pairs, so new ones are automatically mapped)

@codecov
Copy link

codecov bot commented Jun 8, 2020

Codecov Report

Merging #39 into master will decrease coverage by 0.04%.
The diff coverage is 92.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #39      +/-   ##
==========================================
- Coverage   93.10%   93.06%   -0.05%     
==========================================
  Files           6        6              
  Lines         595      620      +25     
==========================================
+ Hits          554      577      +23     
- Misses         22       23       +1     
- Partials       19       20       +1     
Impacted Files Coverage Δ
protobuf/unmarshal.go 85.81% <77.77%> (-0.55%) ⬇️
csminify.go 92.00% <100.00%> (+0.69%) ⬆️
protobuf/marshal.go 98.43% <100.00%> (+0.10%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 3cbf92a...066b9e0. Read the comment docs.

@markus-wa markus-wa merged commit 82c563e into markus-wa:master Jun 8, 2020
@markus-wa
Copy link
Owner

@LarsKoelpin
Copy link
Contributor Author

nice! ty

@markus-wa
Copy link
Owner

Thank YOU! @LarsKoelpin 😄😄

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants