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

Add alarmed houses #77488

Merged
merged 1 commit into from
Nov 18, 2024
Merged

Conversation

Milopetilo
Copy link
Contributor

@Milopetilo Milopetilo commented Oct 31, 2024

Summary

Content "Houses sometimes have alarms"

Purpose of change

Some houses should have alarms, just like they do in real life.

Describe the solution

Add a palette param to domestic_general_and_variant_palette so houses that have alarms spawn with alarmed doors and windows.

Describe alternatives you've considered

Only have alarmed doors since there is only one kind of alarmed window which seems to be used for shops, might follow up on this PR with one that adds more kinds of alarmed windows

Testing

Game loads, houses spawn alarmed, alarms don't work :(

Additional context

Draft until #72405 gets fixed

@github-actions github-actions bot added [JSON] Changes (can be) made in JSON astyled astyled PR, label is assigned by github actions json-styled JSON lint passed, label assigned by github actions BasicBuildPassed This PR builds correctly, label assigned by github actions labels Oct 31, 2024
@GuardianDll
Copy link
Member

GuardianDll commented Oct 31, 2024

i don't see the reason to draft it, the flag not working right now is not at all a reason to not merge mapgen edits

upd: i fixed it nevertheless, in #77493, so i undraft it

@GuardianDll GuardianDll marked this pull request as ready for review October 31, 2024 22:47
@github-actions github-actions bot removed the BasicBuildPassed This PR builds correctly, label assigned by github actions label Oct 31, 2024
@XygenSS
Copy link
Contributor

XygenSS commented Nov 1, 2024

would the home security systems still function after being out of power for weeks (possibly months)?

@PatrikLundell
Copy link
Contributor

PatrikLundell commented Nov 1, 2024

I would expect alarm systems to have batteries so the old trick of cutting phone and power lines before the "attack" won't work (the former is probably dealt with by cell connection nowadays anyway). The question would then be how long the batteries last, and I'd guess they run out fairly quickly, so half a year or so on a good year.

It can also be noted that houses at least used to randomly have alarms. Has that been removed?

@Milopetilo
Copy link
Contributor Author

It can also be noted that houses at least used to randomly have alarms. Has that been removed?

The alarms that houses used to have were handled by the palette I'm changing. All this should change is make it so if one door has an alarm, the others will as well.

@GuardianDll
Copy link
Member

> how long the batteries last
At current implementation, ALARMED flag emit sound only once you smash it; so if you break the window instantly, alarm would work for only 1 second

@PatrikLundell
Copy link
Contributor

I didn't really mean how long batteries last when the alarm is activated (although that's an issue that ought to be addressed eventually, but not in this PR), but how long they'd last when active. It seems nowadays more or less everything leaks electricity when "turned off", as opposed to the old days when you actually broke the circuit when turning off things, rather than slowly leaking on "standby".

@akrieger
Copy link
Member

akrieger commented Nov 1, 2024

Quick searching seems to say home system batteries tend to only last 24 hours https://www.reddit.com/r/homesecurity/comments/17ajs9u/home_security_system_that_works_without_power_and/

@PatrikLundell
Copy link
Contributor

I suspect the duration depends on what kind of a system it is. 24 hours sounds like it would be an active system with a fair bit of surveillance having a battery backup. I've rented a house with a system for the front door, and it had to be recharged every month, I think (or was it week? I don't remember, as it was a couple of decades ago).

@akrieger
Copy link
Member

akrieger commented Nov 1, 2024

I guess it depends on what the battery is operating. The individual sensors might last a while, but the central system the sensors report to, maybe not. But IDK. My point is more that it's not obvious to me that this is actually a given.

@Milopetilo
Copy link
Contributor Author

After some googling I can see that most alarm panels will last anywhere between 12-48 hrs without power, but the individual sensors would last for years. An alternative that could be implemented is only having alarms spawn if the roof spawns with solar panels, but that would require messing about with parameters and changing all roofs to use them, something I would like to avoid.

@github-actions github-actions bot added the BasicBuildPassed This PR builds correctly, label assigned by github actions label Nov 13, 2024
@Night-Pryanik Night-Pryanik merged commit b7009ed into CleverRaven:master Nov 18, 2024
35 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 [JSON] Changes (can be) made in JSON json-styled JSON lint passed, label assigned by github actions
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants