Skip to content

Make block placements remove ghost snitches#18

Merged
Gjum merged 1 commit intoGjum:masterfrom
awoo-civ:pr6
Jun 9, 2022
Merged

Make block placements remove ghost snitches#18
Gjum merged 1 commit intoGjum:masterfrom
awoo-civ:pr6

Conversation

@awoo-civ
Copy link
Copy Markdown
Collaborator

@awoo-civ awoo-civ commented Jun 9, 2022

Use case:

  1. I place a snitch.
  2. Somebody else destroys it.
  3. The snitch outline is still there.
  4. There's nothing I can do about it.

This change fixes that - I can now place a block where the snitch was to clear the outline.

May not be the best idea:

  1. Snitch lookups are kinda slow (linear traversal of a generic collection) and we're doing it on every block placement.
  2. This issue could be solved by deleting snitches not present in /jalist.

@Gjum
Copy link
Copy Markdown
Owner

Gjum commented Jun 9, 2022

I'm merging this but will make some changes: a98c6c5

  • mark snitch as gone instead of deleting the entry
  • find existing snitch by worldpos instead of iterating all known snitches

@Gjum Gjum merged commit 2f5d76e into Gjum:master Jun 9, 2022
@Gjum Gjum added this to the 1.4.0 milestone Jun 17, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants