[MIRROR] Makes obj_integrity private and only updated through procs (#6125)

* Makes obj_integrity only updated through procs (#59474)

Having things updating integrity directly is just going to cause more problems down the line as more elements and components depend on being notified of integrity changes. It's an easy mistake to make so making it private should deal with the problem.

get_integrity() might be useful in the future but is mainly a side effect of making obj_integrity private as that also disallows reads.

* Makes obj_integrity private and only updated through procs

* Mirror!

Co-authored-by: Emmett Gaines <ninjanomnom@gmail.com>
Co-authored-by: Funce <funce.973@gmail.com>
This commit is contained in:
SkyratBot
2021-06-05 06:35:09 +02:00
committed by GitHub
parent dc57646706
commit fbb78302cf
54 changed files with 141 additions and 106 deletions

View File

@@ -129,7 +129,7 @@
return
data["active"] = TRUE
data["SM_integrity"] = active.get_integrity()
data["SM_integrity"] = active.get_integrity_percent()
data["SM_power"] = active.power
data["SM_ambienttemp"] = air.temperature
data["SM_ambientpressure"] = air.return_pressure()
@@ -159,7 +159,7 @@
if(A)
SMS.Add(list(list(
"area_name" = A.name,
"integrity" = S.get_integrity(),
"integrity" = S.get_integrity_percent(),
"uid" = S.uid
)))