Closed Darkcyde13 closed 1 year ago
These are stored as a DateTime object rather than as a unix timstamp so SecondsSince() will not work. Essentially, they are intended to be accessed like a boolean value (either null or true).
That said, the fields from the object are still accessible from the Speech responder as follows:
{set Day to reportBody.scanned.Day}
{set Month to reportBody.scanned.Month}
{set Year to reportBody.scanned.Year}
You scanned {reportBody.name} on {Month}-{Day}-{Year}.
Oh, OK, I see. My plan was to check to see if the body was scanned (or mapped) more than a few seconds ago, for use just after a scan. I wanted to check if the 'Surface signals detected' script triggers immediately after a scan, or if it gets triggered when you approach the body after having scanned it some time in the past.
I see there are also elements for Hour, Minute, and Second, so maybe I can use these to create a kind of timestamp that I can compare to find out how long ago a body was scanned.
Thank you, this gives me something I can work on now. 🙂
As a side note, would it be possible to expand the variables help page to better describe these two properties? At the moment it just says it's a 'DateTime' with no explanation on how it's formatted. Also, would it not be better to change it to a UNIX timestamp, as that's how other date/time properties are recorded? Or would that be too much of a problem with existing data from past scans?
I'll have to think about this but I agree that moving to a UNIX timestamp may be preferable.
Cool, thank you.
Well, I have come up with a solution to my problem now, so there's no hurry for this one. 😄
What's Wrong (please be as specific as possible)
Expected
The
.scanned
and.mapped
properties of bodies to give a timestamp of when they were scanned or mapped, or be void if not yet done.Observed
Both properties appear to be an array (map) and always seem to report the current number of seconds since 01-01-70.
Steps to reproduce
body
to BodyDetails() for one you have scanned and/or mapped.body.scanned
andbody.mapped
.SecondsSince(body.scanned)
results in the number of seconds since 01-01-1970.format(body.scanned, "d:MM-dd-yy")
always results in 01-01-70.Configuration
My Investigation
Investigation Notes
I wanted to find out when I had scanned or mapped a body, but I just keep getting 01-01-70 as a result by using the above method. It seems like they are not being populated or converted correctly maybe?
I tried
type(body.scanned)
and it resulted in "map", but I can't see why these would be a map. UsingList(body.scanned)
gave some very odd results:Doing
len(body.scanned)
gave 16, and usingbody.scanned[16]
(or and number between 0 and 16) resulted in1672709779 01-01-70
.If I tried to use
dump()
on them it crashes EDDI.Are these broken, or am I doing something wrong?
EDDI Logs
N/A
Player journals
N/A