Skip to content

(WIP) Radiation Detector Hardware#224

Closed
btmeadows wants to merge 2 commits intosimon987:masterfrom
btmeadows:RadiationDetector
Closed

(WIP) Radiation Detector Hardware#224
btmeadows wants to merge 2 commits intosimon987:masterfrom
btmeadows:RadiationDetector

Conversation

@btmeadows
Copy link

Added radiation detector hardware to the radioactive cloud plugin.
This is not complete and still a work in progress.

Relates to Issue #136

(This is my first pull request so I wanted to keep it small with just a basic outline for the hardware so I know if I'm doing everything correctly. Please tell me if I need to change anything or what more I could do!)

@simon987
Copy link
Owner

simon987 commented May 2, 2020

Hi, thanks a lot for the contribution, for the next steps you need to

  1. Create a method that returns a list of tiles or (x,y) coordinates in a line segment between two points.

image

  1. Create a method that calculates the Euclidean distance between two points

  2. Classes that implement the Radioactive interface must have a getAlphaCounts(distance), which returns the total counts of alpha particles based on the distance. The formula right now is not that important but it should follow inverse square law

  3. The radiation detection hardware iterates every Entity in the current World, if the entity is Radioactive, get the path between the Cubot and the entity (1), subtract a constant from the getAlphaCounts(distance) value for each blocked tile in the path. Finally, return the total value (same thing for beta and gamma)

Don't hesitate if you have questions

@simon987 simon987 marked this pull request as draft May 2, 2020 12:27
@simon987
Copy link
Owner

Superseeded by #235

@simon987 simon987 closed this Sep 17, 2020
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