Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix #71315 Add ereader power consumption to read_activity_actor #71340

Merged
merged 1 commit into from
Jan 31, 2024

Conversation

random-cdda-modder
Copy link
Contributor

@random-cdda-modder random-cdda-modder commented Jan 29, 2024

Summary

Features "Add ereader power consumption to read_activity_actor"

Purpose of change

Fixes #71315

Currently EBOOKREAD capable items can be used indefinitely in a naturally bright area to read ebooks stored in the devices.

Power consumption to provide lighting (eink backlight or smartphone flashlight) is separate at code starting from

// Only turn on the eBook light, if it's too dark to read
.

Describe the solution

Consumption in PR is simulated for just keeping the screen active while reading. Based on expectation that a smart_phone should be able to keep the screen on for roughly 10 hours, following values were used as baseline:

Item Max charges available Battery lifetime without using the light-providing features of the item
integrated_ar implant potentially infinite
ar_glasses_advanced max 300 charges from disposable light battery 25 hours of reading
eink_tablet_pc max 300 charges from disposable light battery 25 hours of reading
laptop max 1200 charges from disposable medium battery 100 hours of reading
smart_phone 120 UPS charges 10 hours of reading

Describe alternatives you've considered

Implement feature to allow activities to impose temporary power_draw or other property changes on related items, to allow more combinations than the smart_phone_on type variants that are now hard-coded as transformations. But this way the PR is a two-liner.

Testing

Looks OK.

Additional context

@github-actions github-actions bot added [C++] Changes (can be) made in C++. Previously named `Code` <Enhancement / Feature> New features, or enhancements on existing json-styled JSON lint passed, label assigned by github actions Code: Tests Measurement, self-control, statistics, balancing. astyled astyled PR, label is assigned by github actions and removed astyled astyled PR, label is assigned by github actions labels Jan 29, 2024
@ashGlaw
Copy link
Contributor

ashGlaw commented Jan 29, 2024

Just to ask clarifying question, specifically, the ink reader, your cost increases for having the backlight turned on, not for a reading in a already lit area, correct? Those things can last a week on a charge if they don't use a backlight.

@github-actions github-actions bot added the astyled astyled PR, label is assigned by github actions label Jan 29, 2024
@random-cdda-modder
Copy link
Contributor Author

the consumption in PR is the base cost to flip through pages and have the display on. The backlight energy consumption is separate (the item is auto transformed to "backlight on" state by the code linked in description.

Which JSON property would you use to represent eink_tablet_pc being that efficient in power consumption?

@random-cdda-modder
Copy link
Contributor Author

random-cdda-modder commented Jan 29, 2024

note that the eink_tablet_pc represented in game is running off a single light battery (should be AA sized if I've understood correctly) and not an integrated energy cell (NiCd or Li etc).

If we'd give eink_tablet_pc a laptop-sized medium battery then it'd last close to the expected week. (or switch them to UPS to represent an internal unswappable cell)

@random-cdda-modder random-cdda-modder marked this pull request as ready for review January 29, 2024 22:13
@random-cdda-modder random-cdda-modder changed the title Fix #71315 Add ereader power consumption to read_activity_actor::do_turn Fix #71315 Add ereader power consumption to read_activity_actor Jan 29, 2024
@github-actions github-actions bot added the BasicBuildPassed This PR builds correctly, label assigned by github actions label Jan 29, 2024
@Maleclypse Maleclypse merged commit e1eb2a2 into CleverRaven:master Jan 31, 2024
36 of 42 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
astyled astyled PR, label is assigned by github actions BasicBuildPassed This PR builds correctly, label assigned by github actions [C++] Changes (can be) made in C++. Previously named `Code` Code: Tests Measurement, self-control, statistics, balancing. <Enhancement / Feature> New features, or enhancements on existing json-styled JSON lint passed, label assigned by github actions
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Reading books on a smartphone does not cost battery charges
3 participants