Athanasius
6d58863a40
Suits: Fix 'mame' typo
2021-04-30 15:42:10 +01:00
Athanasius
60b2045ea4
Items: Fix DropItems
and CollectItems
...
Tested as actually working.
2021-04-30 15:21:47 +01:00
Athanasius
e1a63c2879
Items: Correct UseConsumable
code
2021-04-30 15:12:12 +01:00
Athanasius
f89ed7999e
Items: Implement CollectItems
, DropItems
and UseConsumable
...
The paranoia when subtracting from counts is because of the lack of
fresh `BackPackMaterials` if relogging whilst on foot.
2021-04-30 14:44:20 +01:00
Athanasius
422b766586
Items: Decrement BackPack Consumable on UseConsumable
2021-04-30 14:30:37 +01:00
Athanasius
1f8215ed92
Items: ShipLockerMaterials
now has Data
...
But also, we're not getting a `BackPackMaterials` at the same time to be
sure of the state of things.
2021-04-30 13:56:26 +01:00
Athanasius
8e8c9fa3ff
Items: Data
is now in BackPackMaterials
as well
2021-04-30 13:50:52 +01:00
Athanasius
eed4402340
Suits: Init monitor.state['Suits'] to empty dict
2021-04-30 10:53:38 +01:00
Athanasius
30b8a5eead
Suits: Log if a buy/sell event doesn't contain Price
2021-04-30 10:49:39 +01:00
Athanasius
203fb051b0
Suits: Simplify BuySuit
code.
2021-04-30 10:47:09 +01:00
Athanasius
ac4f052695
Suits: Update credits on BuyWeapon
...
Also cleaning out some verbose comments.
2021-04-29 12:38:01 +01:00
Athanasius
7b76e327ce
Suits: Always set 'id' to None
...
Better to get a `None` value than a KeyError.
2021-04-29 12:32:31 +01:00
Athanasius
d27075cb38
Suits: Handle LoadoutEquipModule
event
...
We're assuming weapons only at this point. Might need adjustment when
we get access to engineering.
2021-04-29 12:28:45 +01:00
Athanasius
d35f64ebd5
Suits: Handle LoadoutRemoveModule
...
Currently this seems to only trigger if you 'overwrite' an equipped
weapon with another one. The one being removed will be cited in this
event.
2021-04-29 12:21:08 +01:00
Athanasius
218073ed73
Suits: Remove weapon from all loadouts if sold.
...
Also update credits total for the sale.
2021-04-29 12:07:48 +01:00
Athanasius
2253e45c18
Suits: Add some paranoia around Loadouts
...
* Initialise to empty dict.
* try/except in case CAPI pull hasn't happened yet when parsing Journal
events.
2021-04-29 11:45:06 +01:00
Athanasius
e796684fc6
Suits: Handle RenameSuitLoadout
2021-04-29 11:40:59 +01:00
Athanasius
e24e0b3547
Suits: Update DeleteSuitLoadout
code with alpha4 example
...
Also slightly simplified this. Leaving the try/except for now, although
it should no longer be necessary.
2021-04-29 11:34:29 +01:00
Athanasius
addb178d3d
Suits: Handle 'CreateSuitLoadout'
...
This entails converting the Journal supplied data into CAPI form.
2021-04-29 11:23:14 +01:00
Athanasius
29a517ce11
Suits: Note that we need an 'UpgradeSuit' example still
...
The journal document has to be mistaken about cost being in credits.
2021-04-29 10:34:03 +01:00
Athanasius
aeca211a88
Suits: Handle 'SellSuit'
2021-04-29 10:26:55 +01:00
Athanasius
c8d98bba2e
suits: Guard against "no CAPI pull yet" on BuySuit
2021-04-29 10:23:39 +01:00
Athanasius
7b8c113962
suits: Record a newly bought suit in monitor.state['Suits']
...
We can't fill in the 'id' field, but this is likely the FDevID of the
suit type ?
2021-04-29 10:12:49 +01:00
Athanasius
96d9a80956
odyssey-4: Add outlines/comments for all upcoming events
2021-04-27 11:54:15 +01:00
Athanasius
f6611148e6
Suits: Add Artemis (ExplorationSuit_Class1) suit to ON_FOOT regex
2021-04-15 16:38:56 +01:00
Athanasius
8e8e57024d
Suits: Location Ship "TacticalSuit_Class1" is also on-foot
...
This is the 'Dominator' suit.
2021-04-15 14:20:00 +01:00
Athanasius
d9d36dd12b
Suits: Comments about suit/weapon events not having instance ID
2021-04-15 10:55:51 +01:00
Athanasius
d095e8b054
Suits: We can't do anything on SellSuit
yet, placeholder.
2021-04-15 10:43:42 +01:00
Athanasius
550ca61e44
Suits: Support DeleteSuitLoadout
event
...
* Factored "find CAPI slot id from journal LoadoutID" into its own
function.
2021-04-14 10:16:34 +01:00
Athanasius
1509bcde2b
Suits: Placeholders for DeleteSuitLoadout and CreateSuitLoadout
2021-04-14 10:01:36 +01:00
Athanasius
bb90d0fb59
Suits: If user switches to an unknown loadout, say so
2021-04-13 16:56:48 +01:00
Athanasius
c28dd8c55d
Suits: Set/update suit text as necessary.
...
* After any Journal event we might as well set it.
* Attempt to update on a `SwitchSuitLoadout` event, assuming the new
slot is one we heard about in the last CAPI data.
2021-04-13 16:48:16 +01:00
Athanasius
2246278286
Odyssey Suits: Store available data from CAPI.
...
I've gone with 'None' for when there's no data, rather than {}. That
makes for simpler checks on if there is data (a dict.get('foo') only
checks for that, not the dict structure otherwise).
If no 'suit' in the data we assume no Odyssey, but otherwise plough on
with dict.get() statements as they'll default to None if it's not
present.
*Users* of this monitor.state[] extra data get to choose what to do if
some data is present but not other.
2021-04-13 12:12:51 +01:00
A_D
1a9983f331
Fixed edge case with reading old ship loadout
2021-04-12 19:58:23 +02:00
Athanasius
9a6b59fbd3
monitor.py: Initialise EDLogs self.systempopulation
...
This is the *one* field that wasn't always initialised.
2021-04-12 09:10:25 +01:00
Athanasius
79729d683e
CQC game mode LoadGame has fewer fields, no Ship
2021-04-12 08:45:10 +01:00
Athanasius
13824c53bc
monitor: Only forget station on Disembark if not from own ship
2021-04-12 08:31:48 +01:00
Athanasius
960cb17cfb
Also handle 'Data' category ShipLocker and BackPack
...
I missed this because it is NOT in `ShipLockerItems`, but does show up
in `TransferMicroResources`.
2021-04-12 08:31:47 +01:00
Athanasius
020eb36d84
Add comment about why we empty backpack on ShipLockerMaterials
2021-04-12 08:31:47 +01:00
Athanasius
112525c31e
Add paranoia check for BackPack material counts going negative.
...
Reset them to zero if they're negative. It's probably from an
Embark-related TransferMicroResources event, so they should now be
zeroes anyway.
2021-04-12 08:31:47 +01:00
Athanasius
5f59487a7b
Zero out BackPack Materials on ShipLockerMaterials
...
This at least ensures we're correct after logging back in at a station.
If you relog whilst out at a Settlement then counts will definitely be
wrong now. But there are no events for using consumables, or picking
anything up anyway, so it's almost always going to be off there.
2021-04-12 08:31:47 +01:00
Athanasius
9609286ff4
Support for 'TransferMicroResources' event.
2021-04-12 08:31:47 +01:00
Athanasius
c5d2300ba5
Support for 'TradeMicroResources' event
...
This has an array 'Offered' listing what was traded away.
'Category' & 'Received' is what you got in return, 'Count' many.
Again, we assume this only interacts with ShipLocker, not BackPack.
2021-04-12 08:31:47 +01:00
Athanasius
c94ebad54c
Support for event 'SellMicroResources'
...
These are being sold to a Bar Tender.
There's a MicroResources array, one per item name. We assume this is
always selling from ShipLocker, not BackPack.
2021-04-12 08:31:47 +01:00
Athanasius
a2c48fdd70
Support for 'BuyMicroResources' event
...
This is currently only when buying Consumables from a Pioneer Supplies
vendor.
One event per Item type, it's not an array.
We're assuming these go into ShipLocker, not BackPack.
2021-04-12 08:31:47 +01:00
Athanasius
28c4fa03b1
Add support for BacKPackMaterials event
...
It's unclear from my Journals if this is adding to the current or is the
total state at the time. I think it's the latter, despite not finding
where a '737844537' had come from (looks like from a mission, but that
would be reward and should have gone straight to ShipLocker?).
2021-04-12 08:31:47 +01:00
Athanasius
7040975bd2
Add support for 'ShipLockerMaterials'
2021-04-12 08:31:47 +01:00
Athanasius
ad677d73f6
monitor.state: Group all Odyssey, and add other ShipLocker categories
2021-04-12 08:31:47 +01:00
Athanasius
c4df5b2822
DRY init of self.state
...
It's identical in both places, so use a common function.
2021-04-12 08:31:47 +01:00
Athanasius
5c5e5b507e
monitor.py: Fix up legavy config.get() calls
2021-04-12 08:31:47 +01:00