Skip to content

Medical - Fix ace_medical_fnc_serializeState modifying unit medications array#11309

Merged
PabstMirror merged 3 commits intoacemod:masterfrom
some-evil-kitty:patch-2
Mar 9, 2026
Merged

Medical - Fix ace_medical_fnc_serializeState modifying unit medications array#11309
PabstMirror merged 3 commits intoacemod:masterfrom
some-evil-kitty:patch-2

Conversation

@some-evil-kitty
Copy link
Contributor

When merged this pull request will:

  • title

I noticed that running serializeState on a unit will modify the unit's medications array with the "time" offsets. Issue was due to arrays being references. Fixes issue #11308

@PabstMirror PabstMirror added this to the 3.21.0 milestone Mar 8, 2026
@PabstMirror PabstMirror added the kind/bug-fix Release Notes: **FIXED:** label Mar 8, 2026
@PabstMirror
Copy link
Contributor

looks good

Copy link
Contributor

@johnb432 johnb432 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Otherwise LGTM

Co-authored-by: johnb432 <58661205+johnb432@users.noreply.github.com>
@PabstMirror PabstMirror enabled auto-merge (squash) March 9, 2026 19:10
@PabstMirror PabstMirror merged commit 564346c into acemod:master Mar 9, 2026
2 of 3 checks passed
@johnb432 johnb432 linked an issue Mar 10, 2026 that may be closed by this pull request
@some-evil-kitty some-evil-kitty deleted the patch-2 branch March 10, 2026 12:16
tbeswick96 added a commit to tbeswick96/ACE3 that referenced this pull request Mar 17, 2026
Serialize wound entries, medications, triage card, IV bags, occluded
medications, and log entries as named hashmaps instead of positional
arrays. Deserializer supports both formats via isEqualType guards.

- Wounds: [classComplex, amountOf, bleedingRate, woundDamage] → hashmap
- Medications: [med, timeOffset, ttme, mtis, hr, pain, flow, dose] → hashmap
- TriageCard: [item, count, timestamp] → hashmap
- IvBags: [volume, type, partIndex, treatment, rateCoef, item] → hashmap
- OccludedMedications: [partIndex, className] → hashmap
- Logs: [logType, entries] → hashmap with entry hashmaps

Also includes upstream merge (upstream/master → uksfcustom) which brings:
- Fix serializeState modifying unit medications array (acemod#11309)
- Add API to directly add wounds to units (acemod#11211)
- Markers: allow placing quick number markers (acemod#11019)
- Maverick displayname consistency (acemod#11310)
- arma-rs 1.12.1, extension bump

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

kind/bug-fix Release Notes: **FIXED:**

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Medical - ace_fnc_serializeState modifies medications array

3 participants