Commit Graph
359 Commits
Author SHA1 Message Date
Athanasius cc6b52a9ed Shiplocker: while/else a failure logging 2021-08-07 14:45:46 +01:00
Athanasius dc953b49a6 shiplocker: Implement ShipLocker.json load/decoding retries
* Currently a maximum of 5 attempts, 10ms apart.
* I was going to blank `entry = {}` for this, but there's a chance the
  file load would fail when at startup and Embark the in-Journal event
  actually has all the data.  So we cross our fingers and hope that's
  the case if loading fails.
* Changed the "not all the categories" logging to WARN to call out the
  failure.
* Removed old comment about not touching Backpack here.
2021-08-07 14:38:03 +01:00
Athanasius 292b508985 monitor: Prepare for more-paranoid Shiplocker.json loading 2021-08-07 14:20:05 +01:00
Athanasius ea88a57e18 monitor: Gate Commander/LoadGame TRACE on trace_on 'startup' 2021-08-05 13:46:20 +01:00
A_D 9466d8fc81 reorder new file checks
we want to finish our current file, if anything, before continuing onto a new file
2021-08-04 15:43:00 +02:00
A_D 7c78b40090 always update with journal data 2021-07-07 11:02:11 +02:00
A_D dec2e07ce0 revert previous commit, handle \ in lang names 2021-07-03 17:23:30 +02:00
A_D edbf1263a9 Dont store version on loadgame, its content is faulty 2021-07-03 17:14:25 +02:00
A_D 1e691d306e Added support for resupply event
its a reskinned backpack, so thats how its being handled
2021-07-03 13:22:39 +02:00
A_D d63b6ad782 removed suits["slots"] (for now) 2021-07-01 12:47:07 +02:00
A_D 67df2efc8a DRY-ed setting version info
Also removed some uneeded type ignores
2021-07-01 12:27:15 +02:00
A_D e11193110f removed dashboard import 2021-06-30 14:26:45 +02:00
A_D 1a3dad34b7 Add support for SuitLoadout related added info
This is mostly classes and mods for weapons, and classes for suits. I
did not do any updating passed what we already did, I simply added the
fields where needed.

This means that if our tracking is incorrect it will still be incorrect,
but full on tracking will wait for OO based state storage to prevent
whoopsies and other silliness.
2021-06-30 14:23:25 +02:00
A_D aa4e17c846 Add support for new fields on LoadGame
These are the same as the ones on FileHeader, but it wont hurt to update
them here anyway, if they exist. Likely they wont have changed, but just
in case
2021-06-30 14:07:16 +02:00
Athanasius 9280b902d1 monitor: Use original event type string for keying into monitor.state 2021-06-18 14:09:19 +01:00
Athanasius c6a42a3877 monitor: entry_type lower-case pass & one note to fix
* This is after rebase on `develop`, so some 'new' events needed
  lowering.
* But there's one instance of entry_type being used as a key into
  monitor.state, so will need to rework that.
2021-06-18 14:06:49 +01:00
A_D 6de13b9c4d Re-cased mistakenly lowered field 2021-06-18 13:56:45 +01:00
Athanasius 6ad22541fe Made most event lookups case insensitive
Slightly more than `s/((el)?if event_type (in|==) \(?('(?:.*[A-Z].*).*')\)?:)$/\L$1`.

Closes #1087
2021-06-18 10:42:13 +01:00
Athanasius 2c8d70f67d ShipLocker: Always load from the file, but be paranoid about it
We'll log the "missing keys, file?" line at TRACE for now, until we're
sure all this code is OK.
2021-06-10 14:45:41 +01:00
Athanasius e754568b28 ShipLocker: Fix the all() generator 2021-06-10 14:31:26 +01:00
Athanasius 2353889ed2 monitor: Make 'empty ShipLocker event' log be TRACE 2021-06-10 14:21:33 +01:00
Athanasius 937aaccec4 ShipLockerJSON: Ensure initialised, and document it. 2021-06-10 14:20:27 +01:00
Athanasius 7051aba656 ShipLocker/Backpack: Use one event for the now-pass'ed ones.
Also, just dropped `TransferMicroResources` entirely as it's no longer
present (and would be irrelevant).
2021-06-10 14:08:57 +01:00
Athanasius a7722f70fe No need for [] if it's a generator inside all() anyway. 2021-06-10 14:04:38 +01:00
Athanasius 3ea0bcce5e BackPack: No need to worry about Resurrect. 2021-06-10 12:44:46 +01:00
Athanasius ae18071f13 Backpack: Factor out the "make it empty" code. 2021-06-10 12:39:53 +01:00
Athanasius 8b6c0e50ac Backpack: Zero out when we Embark, as it's all then in ShipLocker 2021-06-10 12:37:59 +01:00
Athanasius 09c81a21f6 ShipLocker: do *NOT* zero out BackPack when handling this event
Just need to ensure we do on Embark (or Death? but likely fresh events
then anyway?).

Certainly if Journal event order is ever Backpack *then* ShipLocker this
would erroneously zero out the backpack.
2021-06-10 12:34:30 +01:00
Athanasius b02729ebdc Backpack/ShipLocker: TransferMicroResources is gone as of 4.0.0.400 2021-06-10 12:32:40 +01:00
Athanasius f942e76313 monitor: BackPackMaterials shouldn't be a thing any more 2021-06-10 12:28:37 +01:00
Athanasius c2d75e7f1d Credits: UpgradeWeapon should now include a credits cost.
Need to see 4.0.0.400 event for this and UpgradeSuit to be sure they
don't also cite materials costs.  But the hope is there'd be a new
empty/file `ShipLocker` event anyway.
2021-06-10 12:24:13 +01:00
Athanasius 59b410341c ShipLocker: Can now ignore SellMicroResources for inventory purposes
`ShipLocker` empty/file event has full new inventory.
2021-06-10 12:22:56 +01:00
Athanasius db43442504 ShipLocker: Ignore TradeMicroResources for inventory purposes
We get `ShipLocker`/file with full new inventory.
2021-06-10 12:21:40 +01:00
Athanasius c3a46a8415 ShipLocker: 4.0.0.400 - can ignore BuyMicroResources for inventory purposes
As the new `ShipLocker` is present in 'empty' form, with full new
inventory in the file.
2021-06-10 12:19:35 +01:00
Athanasius f852a185e4 Backpack: 4.0.0.400 - Can still ignore this for inventory purposes 2021-06-10 12:18:00 +01:00
Athanasius 8f05282d63 Backpack: 4.0.0.400 - can still ignore CollectItems 2021-06-10 12:17:15 +01:00
Athanasius 2b1ca8031c Backpack: Still don't need to worry about UseConsumable in 4.0.0.400 2021-06-10 12:16:14 +01:00
Athanasius 7934754482 ShipLocker: New event that replaces ShipLockerMaterials
On startup, embark, disembark this is a full event, otherwise it signals
writing of new ShipLocker.json file.
2021-06-10 12:12:02 +01:00
Athanasius 52dffc5c53 Merge pull request #1139 from A-UNDERSCORE-D/fix/1138-empty-backpack-json
Fixed erroring on empty backpack.json
2021-06-07 10:50:06 +01:00
A_D caf594752f Made use of guard clauses where possible 2021-06-04 16:26:07 +02:00
A_D f9efe0e5a9 Fixed erroring on empty backpack.json
closes EDCD/EDMarketConnector#1138
2021-06-04 12:19:10 +02:00
A_D 6a02b6efc7 Fixed taxi log 2021-06-02 13:00:49 +02:00
A_D 71afdf0bdb Added missing BodyType init 2021-06-02 11:58:33 +02:00
A_D 2f684a91e3 removed monitor.planet use 2021-06-02 11:57:28 +02:00
A_D a7a9de77d7 Added rudimentry taxi status tracking 2021-05-31 12:58:20 +02:00
A_D 6a1a2673ec Update MicroResource tracking for 4.0.0.200
This updates our TransferMicroResources handler with the changes from
v4.0.0.200, and BackPack handler to also handle Backpack as the event
name.

Additionally Fixed various events
  (CollectItems, DropItems, TransferMicroResources)
  doubling up BackpackChange work, thus causing offset counts.

Fixes #1115
2021-05-27 12:51:43 +02:00
Athanasius a3598a1c40 Suits: The symbol -> name code is a WORKAROUND 2021-05-27 11:31:06 +01:00
Athanasius d982fc44af Merge pull request #1112 from EDCD/fix/1111/engineerprogress-with-one-engineer
EngineerProgress: Progress can be for a single engineer, no array
2021-05-27 11:26:19 +01:00
Athanasius 6f100a3ebf EngineerProgress: Duh, we already checked for the array, this is the array-less form
This was never properly edited after copy/paste from the "we have an
array" form.
2021-05-26 16:17:20 +01:00
Athanasius af5ffabd30 EngineerProgress: Cope with no Rank/RankProgress in 'single engineer' form
Yes, this isn't DRY, if we do the check a third time I'll pull it out
into a helper function.
2021-05-26 16:10:36 +01:00