@rpgm-tools/neo-angband-core 0.18.0 → 0.19.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/dist/agent/perceive.d.ts.map +1 -1
- package/dist/agent/perceive.js +2 -2
- package/dist/agent/perceive.js.map +1 -1
- package/dist/combat/blow-vectors.d.ts +78 -0
- package/dist/combat/blow-vectors.d.ts.map +1 -0
- package/dist/combat/blow-vectors.fixtures.d.ts +19 -0
- package/dist/combat/blow-vectors.fixtures.d.ts.map +1 -0
- package/dist/combat/blow-vectors.fixtures.js +81 -0
- package/dist/combat/blow-vectors.fixtures.js.map +1 -0
- package/dist/combat/blow-vectors.js +195 -0
- package/dist/combat/blow-vectors.js.map +1 -0
- package/dist/combat/brand-slay.d.ts +22 -9
- package/dist/combat/brand-slay.d.ts.map +1 -1
- package/dist/combat/brand-slay.js +37 -10
- package/dist/combat/brand-slay.js.map +1 -1
- package/dist/combat/index.d.ts +1 -1
- package/dist/combat/index.js +1 -1
- package/dist/combat/melee.d.ts +25 -13
- package/dist/combat/melee.d.ts.map +1 -1
- package/dist/combat/melee.js +23 -19
- package/dist/combat/melee.js.map +1 -1
- package/dist/combat/mon-melee.d.ts +166 -7
- package/dist/combat/mon-melee.d.ts.map +1 -1
- package/dist/combat/mon-melee.js +469 -338
- package/dist/combat/mon-melee.js.map +1 -1
- package/dist/combat/ranged.d.ts +15 -13
- package/dist/combat/ranged.d.ts.map +1 -1
- package/dist/combat/ranged.js +31 -29
- package/dist/combat/ranged.js.map +1 -1
- package/dist/constants.d.ts +14 -0
- package/dist/constants.d.ts.map +1 -1
- package/dist/constants.js +14 -0
- package/dist/constants.js.map +1 -1
- package/dist/datafile.d.ts +48 -0
- package/dist/datafile.d.ts.map +1 -0
- package/dist/datafile.js +102 -0
- package/dist/datafile.js.map +1 -0
- package/dist/effects/effect-info-registry.d.ts +237 -0
- package/dist/effects/effect-info-registry.d.ts.map +1 -0
- package/dist/effects/effect-info-registry.js +138 -0
- package/dist/effects/effect-info-registry.js.map +1 -0
- package/dist/effects/effect-info-vectors.d.ts +92 -0
- package/dist/effects/effect-info-vectors.d.ts.map +1 -0
- package/dist/effects/effect-info-vectors.fixtures.d.ts +18 -0
- package/dist/effects/effect-info-vectors.fixtures.d.ts.map +1 -0
- package/dist/effects/effect-info-vectors.fixtures.js +51 -0
- package/dist/effects/effect-info-vectors.fixtures.js.map +1 -0
- package/dist/effects/effect-info-vectors.js +315 -0
- package/dist/effects/effect-info-vectors.js.map +1 -0
- package/dist/effects/effect-info.d.ts +5 -1
- package/dist/effects/effect-info.d.ts.map +1 -1
- package/dist/effects/effect-info.js +245 -143
- package/dist/effects/effect-info.js.map +1 -1
- package/dist/effects/effect.d.ts +4 -3
- package/dist/effects/effect.d.ts.map +1 -1
- package/dist/effects/effect.js +88 -70
- package/dist/effects/effect.js.map +1 -1
- package/dist/effects/handlers.d.ts +1 -1
- package/dist/effects/handlers.d.ts.map +1 -1
- package/dist/effects/handlers.js +5 -2
- package/dist/effects/handlers.js.map +1 -1
- package/dist/effects/interpreter.d.ts +11 -0
- package/dist/effects/interpreter.d.ts.map +1 -1
- package/dist/effects/interpreter.js +13 -0
- package/dist/effects/interpreter.js.map +1 -1
- package/dist/game/cave-cmd.d.ts +9 -5
- package/dist/game/cave-cmd.d.ts.map +1 -1
- package/dist/game/cave-cmd.js +56 -11
- package/dist/game/cave-cmd.js.map +1 -1
- package/dist/game/cave-square.d.ts +42 -0
- package/dist/game/cave-square.d.ts.map +1 -0
- package/dist/game/cave-square.js +73 -0
- package/dist/game/cave-square.js.map +1 -0
- package/dist/game/char-sheet.d.ts +12 -8
- package/dist/game/char-sheet.d.ts.map +1 -1
- package/dist/game/char-sheet.js +41 -8
- package/dist/game/char-sheet.js.map +1 -1
- package/dist/game/chest.d.ts +2 -3
- package/dist/game/chest.d.ts.map +1 -1
- package/dist/game/chest.js +17 -6
- package/dist/game/chest.js.map +1 -1
- package/dist/game/context.d.ts +213 -22
- package/dist/game/context.d.ts.map +1 -1
- package/dist/game/context.js +109 -17
- package/dist/game/context.js.map +1 -1
- package/dist/game/describe.d.ts +13 -0
- package/dist/game/describe.d.ts.map +1 -1
- package/dist/game/describe.js +32 -4
- package/dist/game/describe.js.map +1 -1
- package/dist/game/display.d.ts +97 -8
- package/dist/game/display.d.ts.map +1 -1
- package/dist/game/display.js +157 -13
- package/dist/game/display.js.map +1 -1
- package/dist/game/dump-level.d.ts.map +1 -1
- package/dist/game/dump-level.js +3 -2
- package/dist/game/dump-level.js.map +1 -1
- package/dist/game/effect-attack.d.ts.map +1 -1
- package/dist/game/effect-attack.js +36 -27
- package/dist/game/effect-attack.js.map +1 -1
- package/dist/game/effect-detect.d.ts +4 -4
- package/dist/game/effect-detect.d.ts.map +1 -1
- package/dist/game/effect-detect.js +42 -9
- package/dist/game/effect-detect.js.map +1 -1
- package/dist/game/effect-env.d.ts +7 -1
- package/dist/game/effect-env.d.ts.map +1 -1
- package/dist/game/effect-env.js +1 -0
- package/dist/game/effect-env.js.map +1 -1
- package/dist/game/effect-general.d.ts +5 -3
- package/dist/game/effect-general.d.ts.map +1 -1
- package/dist/game/effect-general.js +94 -43
- package/dist/game/effect-general.js.map +1 -1
- package/dist/game/effect-item.d.ts +2 -1
- package/dist/game/effect-item.d.ts.map +1 -1
- package/dist/game/effect-item.js +136 -82
- package/dist/game/effect-item.js.map +1 -1
- package/dist/game/effect-melee.d.ts +10 -4
- package/dist/game/effect-melee.d.ts.map +1 -1
- package/dist/game/effect-melee.js +44 -19
- package/dist/game/effect-melee.js.map +1 -1
- package/dist/game/effect-monster.d.ts +26 -4
- package/dist/game/effect-monster.d.ts.map +1 -1
- package/dist/game/effect-monster.js +52 -9
- package/dist/game/effect-monster.js.map +1 -1
- package/dist/game/effect-teleport.d.ts +58 -19
- package/dist/game/effect-teleport.d.ts.map +1 -1
- package/dist/game/effect-teleport.js +143 -27
- package/dist/game/effect-teleport.js.map +1 -1
- package/dist/game/effect-terrain.d.ts +1 -3
- package/dist/game/effect-terrain.d.ts.map +1 -1
- package/dist/game/effect-terrain.js +38 -22
- package/dist/game/effect-terrain.js.map +1 -1
- package/dist/game/equip-cmp.d.ts.map +1 -1
- package/dist/game/equip-cmp.js +10 -7
- package/dist/game/equip-cmp.js.map +1 -1
- package/dist/game/floor.d.ts +16 -4
- package/dist/game/floor.d.ts.map +1 -1
- package/dist/game/floor.js +22 -4
- package/dist/game/floor.js.map +1 -1
- package/dist/game/gear.d.ts +101 -13
- package/dist/game/gear.d.ts.map +1 -1
- package/dist/game/gear.js +183 -24
- package/dist/game/gear.js.map +1 -1
- package/dist/game/harness.d.ts +2 -1
- package/dist/game/harness.d.ts.map +1 -1
- package/dist/game/harness.js +12 -1
- package/dist/game/harness.js.map +1 -1
- package/dist/game/ignore-cmd.d.ts +47 -8
- package/dist/game/ignore-cmd.d.ts.map +1 -1
- package/dist/game/ignore-cmd.js +76 -8
- package/dist/game/ignore-cmd.js.map +1 -1
- package/dist/game/known.d.ts +223 -34
- package/dist/game/known.d.ts.map +1 -1
- package/dist/game/known.js +301 -67
- package/dist/game/known.js.map +1 -1
- package/dist/game/loop.d.ts +4 -3
- package/dist/game/loop.d.ts.map +1 -1
- package/dist/game/loop.js +49 -29
- package/dist/game/loop.js.map +1 -1
- package/dist/game/lore-color.d.ts.map +1 -1
- package/dist/game/lore-color.js +13 -1
- package/dist/game/lore-color.js.map +1 -1
- package/dist/game/mon-cast.d.ts +3 -4
- package/dist/game/mon-cast.d.ts.map +1 -1
- package/dist/game/mon-cast.js +30 -2
- package/dist/game/mon-cast.js.map +1 -1
- package/dist/game/mon-cmd.d.ts +4 -5
- package/dist/game/mon-cmd.d.ts.map +1 -1
- package/dist/game/mon-cmd.js +80 -27
- package/dist/game/mon-cmd.js.map +1 -1
- package/dist/game/mon-death.d.ts +8 -4
- package/dist/game/mon-death.d.ts.map +1 -1
- package/dist/game/mon-death.js +6 -9
- package/dist/game/mon-death.js.map +1 -1
- package/dist/game/mon-group.d.ts +9 -5
- package/dist/game/mon-group.d.ts.map +1 -1
- package/dist/game/mon-group.js +9 -5
- package/dist/game/mon-group.js.map +1 -1
- package/dist/game/mon-message.d.ts +90 -40
- package/dist/game/mon-message.d.ts.map +1 -1
- package/dist/game/mon-message.js +267 -59
- package/dist/game/mon-message.js.map +1 -1
- package/dist/game/mon-place.d.ts +11 -1
- package/dist/game/mon-place.d.ts.map +1 -1
- package/dist/game/mon-place.js +15 -3
- package/dist/game/mon-place.js.map +1 -1
- package/dist/game/mon-ranged.d.ts +2 -1
- package/dist/game/mon-ranged.d.ts.map +1 -1
- package/dist/game/mon-ranged.js +11 -5
- package/dist/game/mon-ranged.js.map +1 -1
- package/dist/game/mon-side.d.ts +3 -2
- package/dist/game/mon-side.d.ts.map +1 -1
- package/dist/game/mon-side.js +15 -14
- package/dist/game/mon-side.js.map +1 -1
- package/dist/game/monster-turn.d.ts +20 -10
- package/dist/game/monster-turn.d.ts.map +1 -1
- package/dist/game/monster-turn.js +110 -83
- package/dist/game/monster-turn.js.map +1 -1
- package/dist/game/notice.d.ts +36 -0
- package/dist/game/notice.d.ts.map +1 -0
- package/dist/game/notice.js +79 -0
- package/dist/game/notice.js.map +1 -0
- package/dist/game/obj-cmd.d.ts +14 -3
- package/dist/game/obj-cmd.d.ts.map +1 -1
- package/dist/game/obj-cmd.js +109 -35
- package/dist/game/obj-cmd.js.map +1 -1
- package/dist/game/obj-list.d.ts +13 -2
- package/dist/game/obj-list.d.ts.map +1 -1
- package/dist/game/obj-list.js +42 -27
- package/dist/game/obj-list.js.map +1 -1
- package/dist/game/object-inspect.d.ts +9 -0
- package/dist/game/object-inspect.d.ts.map +1 -1
- package/dist/game/object-inspect.js +4 -0
- package/dist/game/object-inspect.js.map +1 -1
- package/dist/game/pickup.d.ts +0 -2
- package/dist/game/pickup.d.ts.map +1 -1
- package/dist/game/pickup.js +18 -3
- package/dist/game/pickup.js.map +1 -1
- package/dist/game/player-side-vectors.d.ts +174 -0
- package/dist/game/player-side-vectors.d.ts.map +1 -0
- package/dist/game/player-side-vectors.fixtures.d.ts +33 -0
- package/dist/game/player-side-vectors.fixtures.d.ts.map +1 -0
- package/dist/game/player-side-vectors.fixtures.js +191 -0
- package/dist/game/player-side-vectors.fixtures.js.map +1 -0
- package/dist/game/player-side-vectors.js +292 -0
- package/dist/game/player-side-vectors.js.map +1 -0
- package/dist/game/player-side.d.ts +129 -1
- package/dist/game/player-side.d.ts.map +1 -1
- package/dist/game/player-side.js +520 -338
- package/dist/game/player-side.js.map +1 -1
- package/dist/game/player-turn.d.ts +26 -7
- package/dist/game/player-turn.d.ts.map +1 -1
- package/dist/game/player-turn.js +180 -33
- package/dist/game/player-turn.js.map +1 -1
- package/dist/game/poly.d.ts +38 -0
- package/dist/game/poly.d.ts.map +1 -0
- package/dist/game/poly.js +82 -0
- package/dist/game/poly.js.map +1 -0
- package/dist/game/project-cast.d.ts +20 -3
- package/dist/game/project-cast.d.ts.map +1 -1
- package/dist/game/project-cast.js +49 -6
- package/dist/game/project-cast.js.map +1 -1
- package/dist/game/project-feat-vectors.d.ts +124 -0
- package/dist/game/project-feat-vectors.d.ts.map +1 -0
- package/dist/game/project-feat-vectors.fixtures.d.ts +13 -0
- package/dist/game/project-feat-vectors.fixtures.d.ts.map +1 -0
- package/dist/game/project-feat-vectors.fixtures.js +94 -0
- package/dist/game/project-feat-vectors.fixtures.js.map +1 -0
- package/dist/game/project-feat-vectors.js +229 -0
- package/dist/game/project-feat-vectors.js.map +1 -0
- package/dist/game/project-feat.d.ts +53 -1
- package/dist/game/project-feat.d.ts.map +1 -1
- package/dist/game/project-feat.js +374 -247
- package/dist/game/project-feat.js.map +1 -1
- package/dist/game/project-monster.d.ts +21 -8
- package/dist/game/project-monster.d.ts.map +1 -1
- package/dist/game/project-monster.js +45 -21
- package/dist/game/project-monster.js.map +1 -1
- package/dist/game/project-obj.d.ts +62 -0
- package/dist/game/project-obj.d.ts.map +1 -1
- package/dist/game/project-obj.js +72 -41
- package/dist/game/project-obj.js.map +1 -1
- package/dist/game/project-player.d.ts +8 -0
- package/dist/game/project-player.d.ts.map +1 -1
- package/dist/game/project-player.js.map +1 -1
- package/dist/game/projection-handlers.d.ts +81 -0
- package/dist/game/projection-handlers.d.ts.map +1 -0
- package/dist/game/projection-handlers.js +93 -0
- package/dist/game/projection-handlers.js.map +1 -0
- package/dist/game/quest.d.ts +23 -0
- package/dist/game/quest.d.ts.map +1 -1
- package/dist/game/quest.js +42 -0
- package/dist/game/quest.js.map +1 -1
- package/dist/game/ranged-cmd.d.ts +13 -2
- package/dist/game/ranged-cmd.d.ts.map +1 -1
- package/dist/game/ranged-cmd.js +32 -15
- package/dist/game/ranged-cmd.js.map +1 -1
- package/dist/game/repeat.d.ts +78 -0
- package/dist/game/repeat.d.ts.map +1 -0
- package/dist/game/repeat.js +88 -0
- package/dist/game/repeat.js.map +1 -0
- package/dist/game/shape-inspect.d.ts +74 -0
- package/dist/game/shape-inspect.d.ts.map +1 -0
- package/dist/game/shape-inspect.js +114 -0
- package/dist/game/shape-inspect.js.map +1 -0
- package/dist/game/spell-cmd.d.ts +15 -4
- package/dist/game/spell-cmd.d.ts.map +1 -1
- package/dist/game/spell-cmd.js +35 -6
- package/dist/game/spell-cmd.js.map +1 -1
- package/dist/game/spoil.d.ts.map +1 -1
- package/dist/game/spoil.js +89 -40
- package/dist/game/spoil.js.map +1 -1
- package/dist/game/steal.d.ts +3 -3
- package/dist/game/steal.d.ts.map +1 -1
- package/dist/game/steal.js +9 -4
- package/dist/game/steal.js.map +1 -1
- package/dist/game/target-loop.d.ts +10 -4
- package/dist/game/target-loop.d.ts.map +1 -1
- package/dist/game/target-loop.js +14 -8
- package/dist/game/target-loop.js.map +1 -1
- package/dist/game/target.d.ts +4 -4
- package/dist/game/target.d.ts.map +1 -1
- package/dist/game/target.js +19 -8
- package/dist/game/target.js.map +1 -1
- package/dist/game/ui-entry.d.ts +63 -4
- package/dist/game/ui-entry.d.ts.map +1 -1
- package/dist/game/ui-entry.js +151 -23
- package/dist/game/ui-entry.js.map +1 -1
- package/dist/game/wizard.d.ts +23 -5
- package/dist/game/wizard.d.ts.map +1 -1
- package/dist/game/wizard.js +93 -11
- package/dist/game/wizard.js.map +1 -1
- package/dist/game/world.d.ts.map +1 -1
- package/dist/game/world.js +6 -0
- package/dist/game/world.js.map +1 -1
- package/dist/gen/cave.d.ts +49 -8
- package/dist/gen/cave.d.ts.map +1 -1
- package/dist/gen/cave.js +200 -28
- package/dist/gen/cave.js.map +1 -1
- package/dist/gen/generate.d.ts +54 -9
- package/dist/gen/generate.d.ts.map +1 -1
- package/dist/gen/generate.js +55 -8
- package/dist/gen/generate.js.map +1 -1
- package/dist/gen/glyph-vectors.d.ts +109 -0
- package/dist/gen/glyph-vectors.d.ts.map +1 -0
- package/dist/gen/glyph-vectors.fixtures.d.ts +18 -0
- package/dist/gen/glyph-vectors.fixtures.d.ts.map +1 -0
- package/dist/gen/glyph-vectors.fixtures.js +94 -0
- package/dist/gen/glyph-vectors.fixtures.js.map +1 -0
- package/dist/gen/glyph-vectors.js +218 -0
- package/dist/gen/glyph-vectors.js.map +1 -0
- package/dist/gen/glyph.d.ts +104 -0
- package/dist/gen/glyph.d.ts.map +1 -0
- package/dist/gen/glyph.js +72 -0
- package/dist/gen/glyph.js.map +1 -0
- package/dist/gen/room.d.ts +26 -2
- package/dist/gen/room.d.ts.map +1 -1
- package/dist/gen/room.js +414 -264
- package/dist/gen/room.js.map +1 -1
- package/dist/gen/util.d.ts +11 -2
- package/dist/gen/util.d.ts.map +1 -1
- package/dist/gen/util.js +31 -9
- package/dist/gen/util.js.map +1 -1
- package/dist/i18n/i18n.d.ts +207 -0
- package/dist/i18n/i18n.d.ts.map +1 -0
- package/dist/i18n/i18n.js +405 -0
- package/dist/i18n/i18n.js.map +1 -0
- package/dist/i18n/text.d.ts +62 -0
- package/dist/i18n/text.d.ts.map +1 -0
- package/dist/i18n/text.js +120 -0
- package/dist/i18n/text.js.map +1 -0
- package/dist/index.d.ts +25 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +38 -0
- package/dist/index.js.map +1 -1
- package/dist/mod/extension.d.ts +115 -0
- package/dist/mod/extension.d.ts.map +1 -0
- package/dist/mod/extension.js +85 -0
- package/dist/mod/extension.js.map +1 -0
- package/dist/mod/ids.d.ts +10 -0
- package/dist/mod/ids.d.ts.map +1 -1
- package/dist/mod/ids.js +90 -21
- package/dist/mod/ids.js.map +1 -1
- package/dist/mod/record-keys.d.ts +43 -0
- package/dist/mod/record-keys.d.ts.map +1 -0
- package/dist/mod/record-keys.js +100 -0
- package/dist/mod/record-keys.js.map +1 -0
- package/dist/mod/registry-host.d.ts +472 -0
- package/dist/mod/registry-host.d.ts.map +1 -1
- package/dist/mod/registry-host.js +313 -0
- package/dist/mod/registry-host.js.map +1 -1
- package/dist/mod/save-blocks.d.ts +1 -1
- package/dist/mon/bind.d.ts.map +1 -1
- package/dist/mon/bind.js +6 -3
- package/dist/mon/bind.js.map +1 -1
- package/dist/mon/knowledge-groups.d.ts +0 -6
- package/dist/mon/knowledge-groups.d.ts.map +1 -1
- package/dist/mon/knowledge-groups.js +12 -8
- package/dist/mon/knowledge-groups.js.map +1 -1
- package/dist/mon/lore-describe.d.ts +46 -10
- package/dist/mon/lore-describe.d.ts.map +1 -1
- package/dist/mon/lore-describe.js +74 -22
- package/dist/mon/lore-describe.js.map +1 -1
- package/dist/mon/lore-file.d.ts +126 -0
- package/dist/mon/lore-file.d.ts.map +1 -0
- package/dist/mon/lore-file.js +291 -0
- package/dist/mon/lore-file.js.map +1 -0
- package/dist/mon/lore.d.ts +9 -3
- package/dist/mon/lore.d.ts.map +1 -1
- package/dist/mon/lore.js +9 -3
- package/dist/mon/lore.js.map +1 -1
- package/dist/mon/make.d.ts +4 -2
- package/dist/mon/make.d.ts.map +1 -1
- package/dist/mon/make.js +4 -2
- package/dist/mon/make.js.map +1 -1
- package/dist/mon/monster.d.ts +1 -1
- package/dist/mon/monster.js +1 -1
- package/dist/mon/predicate.d.ts +14 -9
- package/dist/mon/predicate.d.ts.map +1 -1
- package/dist/mon/predicate.js +14 -9
- package/dist/mon/predicate.js.map +1 -1
- package/dist/mon/project-mon.d.ts +16 -3
- package/dist/mon/project-mon.d.ts.map +1 -1
- package/dist/mon/project-mon.js +14 -5
- package/dist/mon/project-mon.js.map +1 -1
- package/dist/mon/steal.d.ts +31 -4
- package/dist/mon/steal.d.ts.map +1 -1
- package/dist/mon/steal.js +20 -7
- package/dist/mon/steal.js.map +1 -1
- package/dist/mon/take-hit.d.ts +8 -3
- package/dist/mon/take-hit.d.ts.map +1 -1
- package/dist/mon/take-hit.js +8 -3
- package/dist/mon/take-hit.js.map +1 -1
- package/dist/mon/timed.d.ts +15 -9
- package/dist/mon/timed.d.ts.map +1 -1
- package/dist/mon/timed.js +13 -8
- package/dist/mon/timed.js.map +1 -1
- package/dist/mon/types.d.ts +11 -4
- package/dist/mon/types.d.ts.map +1 -1
- package/dist/mon/types.js.map +1 -1
- package/dist/msg.d.ts +40 -1
- package/dist/msg.d.ts.map +1 -1
- package/dist/msg.js +42 -1
- package/dist/msg.js.map +1 -1
- package/dist/obj/artifact-fake.d.ts +46 -14
- package/dist/obj/artifact-fake.d.ts.map +1 -1
- package/dist/obj/artifact-fake.js +46 -17
- package/dist/obj/artifact-fake.js.map +1 -1
- package/dist/obj/bind.d.ts +23 -0
- package/dist/obj/bind.d.ts.map +1 -1
- package/dist/obj/bind.js +49 -9
- package/dist/obj/bind.js.map +1 -1
- package/dist/obj/desc-vectors.d.ts +68 -0
- package/dist/obj/desc-vectors.d.ts.map +1 -0
- package/dist/obj/desc-vectors.fixtures.d.ts +12 -0
- package/dist/obj/desc-vectors.fixtures.d.ts.map +1 -0
- package/dist/obj/desc-vectors.fixtures.js +95 -0
- package/dist/obj/desc-vectors.fixtures.js.map +1 -0
- package/dist/obj/desc-vectors.js +86 -0
- package/dist/obj/desc-vectors.js.map +1 -0
- package/dist/obj/desc.d.ts +17 -2
- package/dist/obj/desc.d.ts.map +1 -1
- package/dist/obj/desc.js +129 -54
- package/dist/obj/desc.js.map +1 -1
- package/dist/obj/effects-info.d.ts.map +1 -1
- package/dist/obj/effects-info.js +87 -58
- package/dist/obj/effects-info.js.map +1 -1
- package/dist/obj/fake-object.d.ts +70 -0
- package/dist/obj/fake-object.d.ts.map +1 -0
- package/dist/obj/fake-object.js +104 -0
- package/dist/obj/fake-object.js.map +1 -0
- package/dist/obj/ignore.d.ts +55 -12
- package/dist/obj/ignore.d.ts.map +1 -1
- package/dist/obj/ignore.js +68 -31
- package/dist/obj/ignore.js.map +1 -1
- package/dist/obj/knowledge.d.ts +46 -3
- package/dist/obj/knowledge.d.ts.map +1 -1
- package/dist/obj/knowledge.js +169 -151
- package/dist/obj/knowledge.js.map +1 -1
- package/dist/obj/known-object.d.ts +68 -8
- package/dist/obj/known-object.d.ts.map +1 -1
- package/dist/obj/known-object.js +90 -10
- package/dist/obj/known-object.js.map +1 -1
- package/dist/obj/make.d.ts +15 -4
- package/dist/obj/make.d.ts.map +1 -1
- package/dist/obj/make.js +49 -27
- package/dist/obj/make.js.map +1 -1
- package/dist/obj/object-info.d.ts +10 -0
- package/dist/obj/object-info.d.ts.map +1 -1
- package/dist/obj/object-info.js +93 -7
- package/dist/obj/object-info.js.map +1 -1
- package/dist/obj/object.d.ts +42 -4
- package/dist/obj/object.d.ts.map +1 -1
- package/dist/obj/object.js +362 -147
- package/dist/obj/object.js.map +1 -1
- package/dist/obj/power.d.ts +23 -4
- package/dist/obj/power.d.ts.map +1 -1
- package/dist/obj/power.js +231 -65
- package/dist/obj/power.js.map +1 -1
- package/dist/obj/randart-build.d.ts +27 -22
- package/dist/obj/randart-build.d.ts.map +1 -1
- package/dist/obj/randart-build.js +435 -357
- package/dist/obj/randart-build.js.map +1 -1
- package/dist/obj/randart-data.d.ts +62 -24
- package/dist/obj/randart-data.d.ts.map +1 -1
- package/dist/obj/randart-data.js +333 -189
- package/dist/obj/randart-data.js.map +1 -1
- package/dist/obj/randart-file.d.ts +21 -0
- package/dist/obj/randart-file.d.ts.map +1 -0
- package/dist/obj/randart-file.js +119 -0
- package/dist/obj/randart-file.js.map +1 -0
- package/dist/obj/randart-log.d.ts +63 -0
- package/dist/obj/randart-log.d.ts.map +1 -0
- package/dist/obj/randart-log.js +72 -0
- package/dist/obj/randart-log.js.map +1 -0
- package/dist/obj/randart-registry.d.ts +178 -0
- package/dist/obj/randart-registry.d.ts.map +1 -0
- package/dist/obj/randart-registry.js +140 -0
- package/dist/obj/randart-registry.js.map +1 -0
- package/dist/obj/randart-vectors.d.ts +97 -0
- package/dist/obj/randart-vectors.d.ts.map +1 -0
- package/dist/obj/randart-vectors.fixtures.d.ts +18 -0
- package/dist/obj/randart-vectors.fixtures.d.ts.map +1 -0
- package/dist/obj/randart-vectors.fixtures.js +50 -0
- package/dist/obj/randart-vectors.fixtures.js.map +1 -0
- package/dist/obj/randart-vectors.js +311 -0
- package/dist/obj/randart-vectors.js.map +1 -0
- package/dist/obj/randart.d.ts +53 -15
- package/dist/obj/randart.d.ts.map +1 -1
- package/dist/obj/randart.js +166 -44
- package/dist/obj/randart.js.map +1 -1
- package/dist/obj/rune-registry.d.ts +180 -0
- package/dist/obj/rune-registry.d.ts.map +1 -0
- package/dist/obj/rune-registry.js +161 -0
- package/dist/obj/rune-registry.js.map +1 -0
- package/dist/obj/rune-vectors.d.ts +99 -0
- package/dist/obj/rune-vectors.d.ts.map +1 -0
- package/dist/obj/rune-vectors.fixtures.d.ts +44 -0
- package/dist/obj/rune-vectors.fixtures.d.ts.map +1 -0
- package/dist/obj/rune-vectors.fixtures.js +125 -0
- package/dist/obj/rune-vectors.fixtures.js.map +1 -0
- package/dist/obj/rune-vectors.js +159 -0
- package/dist/obj/rune-vectors.js.map +1 -0
- package/dist/obj/tval-registry.d.ts +174 -0
- package/dist/obj/tval-registry.d.ts.map +1 -0
- package/dist/obj/tval-registry.js +151 -0
- package/dist/obj/tval-registry.js.map +1 -0
- package/dist/obj/tval-vectors.d.ts +85 -0
- package/dist/obj/tval-vectors.d.ts.map +1 -0
- package/dist/obj/tval-vectors.fixtures.d.ts +24 -0
- package/dist/obj/tval-vectors.fixtures.d.ts.map +1 -0
- package/dist/obj/tval-vectors.fixtures.js +41 -0
- package/dist/obj/tval-vectors.fixtures.js.map +1 -0
- package/dist/obj/tval-vectors.js +76 -0
- package/dist/obj/tval-vectors.js.map +1 -0
- package/dist/obj/types.d.ts +18 -7
- package/dist/obj/types.d.ts.map +1 -1
- package/dist/obj/types.js.map +1 -1
- package/dist/obj/value.d.ts.map +1 -1
- package/dist/obj/value.js +23 -20
- package/dist/obj/value.js.map +1 -1
- package/dist/parser.d.ts +116 -0
- package/dist/parser.d.ts.map +1 -0
- package/dist/parser.js +205 -0
- package/dist/parser.js.map +1 -0
- package/dist/player/bind.d.ts.map +1 -1
- package/dist/player/bind.js +3 -2
- package/dist/player/bind.js.map +1 -1
- package/dist/player/birth.d.ts +2 -1
- package/dist/player/birth.d.ts.map +1 -1
- package/dist/player/birth.js +2 -1
- package/dist/player/birth.js.map +1 -1
- package/dist/player/calcs.d.ts +58 -23
- package/dist/player/calcs.d.ts.map +1 -1
- package/dist/player/calcs.js +93 -36
- package/dist/player/calcs.js.map +1 -1
- package/dist/player/death.d.ts +50 -0
- package/dist/player/death.d.ts.map +1 -0
- package/dist/player/death.js +46 -0
- package/dist/player/death.js.map +1 -0
- package/dist/player/options-file.d.ts +129 -0
- package/dist/player/options-file.d.ts.map +1 -0
- package/dist/player/options-file.js +309 -0
- package/dist/player/options-file.js.map +1 -0
- package/dist/player/options.d.ts +2 -1
- package/dist/player/options.d.ts.map +1 -1
- package/dist/player/options.js +2 -1
- package/dist/player/options.js.map +1 -1
- package/dist/player/player.d.ts +50 -3
- package/dist/player/player.d.ts.map +1 -1
- package/dist/player/player.js +10 -1
- package/dist/player/player.js.map +1 -1
- package/dist/player/shape-lore.d.ts +11 -7
- package/dist/player/shape-lore.d.ts.map +1 -1
- package/dist/player/shape-lore.js +24 -11
- package/dist/player/shape-lore.js.map +1 -1
- package/dist/player/timed.d.ts +5 -3
- package/dist/player/timed.d.ts.map +1 -1
- package/dist/player/timed.js +11 -2
- package/dist/player/timed.js.map +1 -1
- package/dist/player/types.d.ts +29 -4
- package/dist/player/types.d.ts.map +1 -1
- package/dist/player/types.js +24 -1
- package/dist/player/types.js.map +1 -1
- package/dist/session/boot.d.ts +26 -2
- package/dist/session/boot.d.ts.map +1 -1
- package/dist/session/boot.js +21 -2
- package/dist/session/boot.js.map +1 -1
- package/dist/session/game.d.ts +15 -0
- package/dist/session/game.d.ts.map +1 -1
- package/dist/session/game.js +616 -140
- package/dist/session/game.js.map +1 -1
- package/dist/session/save-migrate.d.ts.map +1 -1
- package/dist/session/save-migrate.js +76 -1
- package/dist/session/save-migrate.js.map +1 -1
- package/dist/session/save.d.ts +75 -12
- package/dist/session/save.d.ts.map +1 -1
- package/dist/session/save.js +177 -18
- package/dist/session/save.js.map +1 -1
- package/dist/store/bind.d.ts +1 -1
- package/dist/store/bind.d.ts.map +1 -1
- package/dist/store/bind.js +4 -3
- package/dist/store/bind.js.map +1 -1
- package/dist/store/mass-produce-vectors.d.ts +40 -0
- package/dist/store/mass-produce-vectors.d.ts.map +1 -0
- package/dist/store/mass-produce-vectors.fixtures.d.ts +13 -0
- package/dist/store/mass-produce-vectors.fixtures.d.ts.map +1 -0
- package/dist/store/mass-produce-vectors.fixtures.js +52 -0
- package/dist/store/mass-produce-vectors.fixtures.js.map +1 -0
- package/dist/store/mass-produce-vectors.js +44 -0
- package/dist/store/mass-produce-vectors.js.map +1 -0
- package/dist/store/store.d.ts +104 -7
- package/dist/store/store.d.ts.map +1 -1
- package/dist/store/store.js +199 -77
- package/dist/store/store.js.map +1 -1
- package/dist/store/transact.d.ts +14 -5
- package/dist/store/transact.d.ts.map +1 -1
- package/dist/store/transact.js +17 -16
- package/dist/store/transact.js.map +1 -1
- package/dist/store/types.d.ts +3 -2
- package/dist/store/types.d.ts.map +1 -1
- package/dist/store/types.js +1 -1
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/dist/visuals/index.d.ts +1 -0
- package/dist/visuals/index.d.ts.map +1 -1
- package/dist/visuals/index.js +1 -0
- package/dist/visuals/index.js.map +1 -1
- package/dist/visuals/map-text.d.ts +8 -0
- package/dist/visuals/map-text.d.ts.map +1 -1
- package/dist/visuals/map-text.js +1 -1
- package/dist/visuals/map-text.js.map +1 -1
- package/dist/visuals/object-glyph.d.ts +56 -0
- package/dist/visuals/object-glyph.d.ts.map +1 -0
- package/dist/visuals/object-glyph.js +52 -0
- package/dist/visuals/object-glyph.js.map +1 -0
- package/dist/visuals/prefs.d.ts +14 -22
- package/dist/visuals/prefs.d.ts.map +1 -1
- package/dist/visuals/prefs.js +4 -23
- package/dist/visuals/prefs.js.map +1 -1
- package/dist/visuals/tile-prefs.d.ts +26 -0
- package/dist/visuals/tile-prefs.d.ts.map +1 -1
- package/dist/visuals/tile-prefs.js +28 -0
- package/dist/visuals/tile-prefs.js.map +1 -1
- package/dist/world/feature.d.ts +2 -1
- package/dist/world/feature.d.ts.map +1 -1
- package/dist/world/feature.js +2 -0
- package/dist/world/feature.js.map +1 -1
- package/dist/world/project.d.ts +10 -2
- package/dist/world/project.d.ts.map +1 -1
- package/dist/world/project.js +18 -6
- package/dist/world/project.js.map +1 -1
- package/dist/world/projection.d.ts +37 -3
- package/dist/world/projection.d.ts.map +1 -1
- package/dist/world/projection.js +69 -7
- package/dist/world/projection.js.map +1 -1
- package/dist/world/trap.d.ts +2 -1
- package/dist/world/trap.d.ts.map +1 -1
- package/dist/world/trap.js +2 -1
- package/dist/world/trap.js.map +1 -1
- package/dist/world/view.d.ts +1 -1
- package/dist/world/view.d.ts.map +1 -1
- package/dist/world/view.js +11 -3
- package/dist/world/view.js.map +1 -1
- package/package.json +1 -1
- package/src/agent/perceive.ts +2 -3
- package/src/combat/blow-vectors.fixtures.ts +99 -0
- package/src/combat/blow-vectors.json +482 -0
- package/src/combat/blow-vectors.ts +280 -0
- package/src/combat/brand-slay.ts +42 -11
- package/src/combat/index.ts +1 -1
- package/src/combat/melee.ts +37 -19
- package/src/combat/mon-melee.ts +611 -364
- package/src/combat/ranged.ts +43 -26
- package/src/constants.ts +15 -0
- package/src/datafile.ts +148 -0
- package/src/effects/effect-info-registry.ts +313 -0
- package/src/effects/effect-info-vectors.fixtures.ts +61 -0
- package/src/effects/effect-info-vectors.json +11532 -0
- package/src/effects/effect-info-vectors.ts +376 -0
- package/src/effects/effect-info.ts +1005 -859
- package/src/effects/effect.ts +96 -62
- package/src/effects/handlers.ts +5 -2
- package/src/effects/interpreter.ts +14 -0
- package/src/game/cave-cmd.ts +54 -11
- package/src/game/cave-square.ts +80 -0
- package/src/game/char-sheet.ts +59 -16
- package/src/game/chest.ts +25 -8
- package/src/game/context.ts +293 -27
- package/src/game/describe.ts +34 -4
- package/src/game/display.ts +215 -19
- package/src/game/dump-level.ts +3 -2
- package/src/game/effect-attack.ts +41 -28
- package/src/game/effect-detect.ts +45 -8
- package/src/game/effect-env.ts +8 -0
- package/src/game/effect-general.ts +110 -47
- package/src/game/effect-item.ts +1075 -999
- package/src/game/effect-melee.ts +51 -18
- package/src/game/effect-monster.ts +55 -9
- package/src/game/effect-teleport.ts +173 -38
- package/src/game/effect-terrain.ts +38 -22
- package/src/game/equip-cmp.ts +483 -480
- package/src/game/floor.ts +22 -4
- package/src/game/gear.ts +210 -21
- package/src/game/harness.ts +12 -1
- package/src/game/ignore-cmd.ts +96 -8
- package/src/game/known.ts +392 -73
- package/src/game/loop.ts +52 -27
- package/src/game/lore-color.ts +13 -1
- package/src/game/mon-cast.ts +31 -6
- package/src/game/mon-cmd.ts +95 -30
- package/src/game/mon-death.ts +14 -12
- package/src/game/mon-group.ts +9 -5
- package/src/game/mon-message.ts +363 -65
- package/src/game/mon-place.ts +15 -3
- package/src/game/mon-ranged.ts +14 -5
- package/src/game/mon-side.ts +16 -12
- package/src/game/monster-turn.ts +120 -87
- package/src/game/notice.ts +85 -0
- package/src/game/obj-cmd.ts +126 -37
- package/src/game/obj-list.ts +44 -26
- package/src/game/object-inspect.ts +13 -0
- package/src/game/pickup.ts +29 -5
- package/src/game/player-side-vectors.fixtures.ts +215 -0
- package/src/game/player-side-vectors.json +6914 -0
- package/src/game/player-side-vectors.ts +420 -0
- package/src/game/player-side.ts +622 -340
- package/src/game/player-turn.ts +228 -31
- package/src/game/poly.ts +107 -0
- package/src/game/project-cast.ts +63 -6
- package/src/game/project-feat-vectors.fixtures.ts +106 -0
- package/src/game/project-feat-vectors.json +6554 -0
- package/src/game/project-feat-vectors.ts +323 -0
- package/src/game/project-feat.ts +417 -248
- package/src/game/project-monster.ts +69 -30
- package/src/game/project-obj-vectors.json +1 -0
- package/src/game/project-obj.ts +115 -47
- package/src/game/project-player.ts +8 -0
- package/src/game/projection-handlers.ts +110 -0
- package/src/game/quest.ts +48 -0
- package/src/game/ranged-cmd.ts +45 -11
- package/src/game/repeat.ts +92 -0
- package/src/game/shape-inspect.ts +166 -0
- package/src/game/spell-cmd.ts +39 -6
- package/src/game/spoil.ts +92 -39
- package/src/game/steal.ts +9 -4
- package/src/game/target-loop.ts +14 -7
- package/src/game/target.ts +18 -7
- package/src/game/ui-entry.ts +172 -22
- package/src/game/wizard.ts +97 -10
- package/src/game/world.ts +6 -0
- package/src/gen/cave.ts +225 -26
- package/src/gen/generate.ts +62 -9
- package/src/gen/glyph-vectors.fixtures.ts +122 -0
- package/src/gen/glyph-vectors.json +5996 -0
- package/src/gen/glyph-vectors.ts +280 -0
- package/src/gen/glyph.ts +132 -0
- package/src/gen/room.ts +446 -265
- package/src/gen/util.ts +32 -9
- package/src/i18n/i18n.ts +492 -0
- package/src/i18n/text.ts +117 -0
- package/src/index.ts +307 -254
- package/src/mod/extension.ts +136 -0
- package/src/mod/ids.ts +92 -21
- package/src/mod/record-keys.ts +102 -0
- package/src/mod/registry-host.ts +1063 -234
- package/src/mon/bind.ts +14 -8
- package/src/mon/knowledge-groups.ts +12 -12
- package/src/mon/lore-describe.ts +93 -26
- package/src/mon/lore-file.ts +365 -0
- package/src/mon/lore.ts +9 -3
- package/src/mon/make.ts +4 -2
- package/src/mon/monster.ts +1 -1
- package/src/mon/predicate.ts +14 -9
- package/src/mon/project-mon.ts +23 -5
- package/src/mon/steal.ts +39 -7
- package/src/mon/take-hit.ts +8 -3
- package/src/mon/timed.ts +15 -9
- package/src/mon/types.ts +11 -4
- package/src/msg.ts +55 -1
- package/src/obj/artifact-fake.ts +47 -17
- package/src/obj/bind.ts +52 -9
- package/src/obj/desc-vectors.fixtures.ts +119 -0
- package/src/obj/desc-vectors.json +2360 -0
- package/src/obj/desc-vectors.ts +128 -0
- package/src/obj/desc.ts +159 -55
- package/src/obj/effects-info.ts +90 -59
- package/src/obj/fake-object.ts +135 -0
- package/src/obj/ignore.ts +95 -28
- package/src/obj/knowledge.ts +291 -139
- package/src/obj/known-object.ts +126 -11
- package/src/obj/make.ts +53 -29
- package/src/obj/object-info.ts +103 -6
- package/src/obj/object.ts +392 -151
- package/src/obj/power.ts +297 -59
- package/src/obj/randart-build.ts +1875 -1705
- package/src/obj/randart-data.ts +1547 -1344
- package/src/obj/randart-file.ts +130 -0
- package/src/obj/randart-log.ts +78 -0
- package/src/obj/randart-registry.ts +247 -0
- package/src/obj/randart-vectors.fixtures.ts +61 -0
- package/src/obj/randart-vectors.json +836 -0
- package/src/obj/randart-vectors.ts +369 -0
- package/src/obj/randart.ts +722 -552
- package/src/obj/rune-registry.ts +270 -0
- package/src/obj/rune-vectors.fixtures.ts +164 -0
- package/src/obj/rune-vectors.json +121 -0
- package/src/obj/rune-vectors.ts +229 -0
- package/src/obj/tval-kind-vectors.json +391 -0
- package/src/obj/tval-registry.ts +243 -0
- package/src/obj/tval-vectors.fixtures.ts +50 -0
- package/src/obj/tval-vectors.json +38 -0
- package/src/obj/tval-vectors.ts +126 -0
- package/src/obj/types.ts +18 -7
- package/src/obj/value.ts +26 -20
- package/src/parser.ts +214 -0
- package/src/player/bind.ts +5 -2
- package/src/player/birth.ts +2 -1
- package/src/player/calcs.ts +123 -42
- package/src/player/death.ts +78 -0
- package/src/player/options-file.ts +387 -0
- package/src/player/options.ts +2 -1
- package/src/player/player.ts +60 -4
- package/src/player/shape-lore.ts +33 -14
- package/src/player/timed.ts +14 -4
- package/src/player/types.ts +30 -4
- package/src/session/boot.ts +51 -1
- package/src/session/game.ts +720 -163
- package/src/session/save-migrate.ts +81 -1
- package/src/session/save.ts +264 -22
- package/src/store/bind.ts +4 -3
- package/src/store/mass-produce-vectors.fixtures.ts +64 -0
- package/src/store/mass-produce-vectors.json +1169 -0
- package/src/store/mass-produce-vectors.ts +67 -0
- package/src/store/store.ts +266 -63
- package/src/store/transact.ts +39 -16
- package/src/store/types.ts +3 -2
- package/src/version.ts +1 -1
- package/src/visuals/index.ts +1 -0
- package/src/visuals/map-text.ts +1 -1
- package/src/visuals/object-glyph.ts +76 -0
- package/src/visuals/prefs.ts +22 -32
- package/src/visuals/tile-prefs.ts +32 -0
- package/src/world/feature.ts +4 -1
- package/src/world/project.ts +19 -4
- package/src/world/projection.ts +79 -8
- package/src/world/trap.ts +25 -21
- package/src/world/view.ts +11 -1
|
@@ -0,0 +1,129 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The customised-defaults option files, ported from reference/src/option.c
|
|
3
|
+
* L207-L328: `options_save_custom`, `options_restore_custom` and
|
|
4
|
+
* `options_restore_maintainer`, plus the `options_init_defaults` ordering that
|
|
5
|
+
* makes them matter.
|
|
6
|
+
*
|
|
7
|
+
* WHAT THESE ARE, AND WHY THEY ARE NOT THE SAVEFILE
|
|
8
|
+
*
|
|
9
|
+
* Upstream keeps two entirely separate persistences for options:
|
|
10
|
+
*
|
|
11
|
+
* - the SAVEFILE holds the options this character is playing with;
|
|
12
|
+
* - `customized_birth_options.txt` and `customized_interface_options.txt` in
|
|
13
|
+
* ANGBAND_DIR_USER hold the defaults the PLAYER wants every NEW character
|
|
14
|
+
* to start from.
|
|
15
|
+
*
|
|
16
|
+
* The second is read by `options_init_defaults` (option.c L192-199, called from
|
|
17
|
+
* `player_init`, player.c:491) BEFORE any birth choice is made, so it sets what
|
|
18
|
+
* the birth screen opens on. That is the whole point of it, and it is why the
|
|
19
|
+
* port's previous position - recorded in web/src/options.ts as "the port has no
|
|
20
|
+
* separate custom-defaults snapshot: the game save IS the persistence" - was a
|
|
21
|
+
* behavioural gap rather than a filing decision. The savefile cannot seed the
|
|
22
|
+
* NEXT character; there is no savefile yet.
|
|
23
|
+
*
|
|
24
|
+
* Only BIRTH and INTERFACE are restored at init. `options_init_defaults` names
|
|
25
|
+
* those two pages and no others, so a `customized_cheat_options.txt` written by
|
|
26
|
+
* hand is never read - and upstream cannot write one either, because
|
|
27
|
+
* `option_toggle_menu` only gives `cmd_keys` containing S/R/X to the interface
|
|
28
|
+
* page and the AT-BIRTH birth page (ui-options.c L333-348).
|
|
29
|
+
*
|
|
30
|
+
* SHAPE. These functions take `OptionOpts`, a plain name -> boolean map, which
|
|
31
|
+
* is the port's spelling of `struct player_options.opt[]`. They deliberately do
|
|
32
|
+
* NOT take an `OptionState`: `OptionState.set` refuses birth options after
|
|
33
|
+
* construction (they lock at birth, as upstream's read-only in-game page shows),
|
|
34
|
+
* and every one of upstream's calls here happens either before birth or on a
|
|
35
|
+
* page whose options are not locked. Passing the raw map keeps the lock where it
|
|
36
|
+
* belongs instead of adding a bypass to it.
|
|
37
|
+
*
|
|
38
|
+
* The grammar is `parser.c`'s, not a lookalike - see parser.ts Strtok for the
|
|
39
|
+
* three strtok behaviours a `split(":")` gets wrong, all of which are reachable
|
|
40
|
+
* from a hand-edited file.
|
|
41
|
+
*/
|
|
42
|
+
import { OPTION_ENTRIES } from "../generated/options.js";
|
|
43
|
+
import type { HostIo } from "../host/io.js";
|
|
44
|
+
import type { ParserState } from "../parser.js";
|
|
45
|
+
/**
|
|
46
|
+
* `struct player_options.opt[]` (player.h): every option's boolean value, keyed
|
|
47
|
+
* by the option's internal name rather than its OPT_ index.
|
|
48
|
+
*/
|
|
49
|
+
export type OptionOpts = Record<string, boolean>;
|
|
50
|
+
/** The `type` field of OPTION_ENTRIES - upstream's OP_* option page. */
|
|
51
|
+
export type OptionPage = (typeof OPTION_ENTRIES)[number]["type"];
|
|
52
|
+
/**
|
|
53
|
+
* option_type_name (option.c L280-311): the lower-case short name that goes in
|
|
54
|
+
* the file name and in the file's own first line. The `unknown` arm is
|
|
55
|
+
* upstream's `default:`; in the port the page is a string union, so it is only
|
|
56
|
+
* reachable from a caller that widened the type.
|
|
57
|
+
*/
|
|
58
|
+
export declare function optionTypeName(page: string): string;
|
|
59
|
+
/**
|
|
60
|
+
* `strnfmt(file_name, ..., "customized_%s_options.txt", page_name)` - the same
|
|
61
|
+
* expression in both options_save_custom (L221) and options_restore_custom
|
|
62
|
+
* (L271), which is why it is one function here.
|
|
63
|
+
*/
|
|
64
|
+
export declare function customOptionsFileName(page: string): string;
|
|
65
|
+
/**
|
|
66
|
+
* The exact bytes options_save_custom writes (option.c L226-246): a three-line
|
|
67
|
+
* header naming the page, then two lines per option - its description as a
|
|
68
|
+
* comment, then the `option:name:yes|no` line the reader parses back.
|
|
69
|
+
*
|
|
70
|
+
* Pure, so the file can be compared against the C's format string by eye and by
|
|
71
|
+
* test without a host.
|
|
72
|
+
*/
|
|
73
|
+
export declare function optionsSaveCustomText(opts: Readonly<OptionOpts>, page: string): string;
|
|
74
|
+
/**
|
|
75
|
+
* options_save_custom (option.c L212-254). Returns false when the file could
|
|
76
|
+
* not be opened OR could not be closed - upstream folds both into one boolean
|
|
77
|
+
* here (unlike wiz-spoil.c, which reports them separately), and the caller
|
|
78
|
+
* prints "Save failed." either way.
|
|
79
|
+
*/
|
|
80
|
+
export declare function optionsSaveCustom(io: HostIo, opts: Readonly<OptionOpts>, page: string): boolean;
|
|
81
|
+
/**
|
|
82
|
+
* The whole read loop of options_restore_custom (option.c L285-306) over
|
|
83
|
+
* already-read text, applied to `opts`. Returns every error it reported, in
|
|
84
|
+
* order, capped exactly as upstream caps it.
|
|
85
|
+
*
|
|
86
|
+
* The cap is not cosmetic. `if (maxe) { if (counte >= maxe - 1) break; ++counte; }`
|
|
87
|
+
* BREAKS the read loop, so with the default limit of 20 upstream stops applying
|
|
88
|
+
* the file after its twentieth bad line and everything below is ignored.
|
|
89
|
+
*/
|
|
90
|
+
export declare function parseCustomOptionsText(text: string, opts: OptionOpts, page: string, errorLimit?: number): ParserState[];
|
|
91
|
+
/**
|
|
92
|
+
* options_restore_maintainer (option.c L313-322): every option on the page back
|
|
93
|
+
* to its table `normal`. No file, no failure mode, and no return value.
|
|
94
|
+
*/
|
|
95
|
+
export declare function optionsRestoreMaintainer(opts: OptionOpts, page: string): void;
|
|
96
|
+
/**
|
|
97
|
+
* The plog_fmt an unparseable line produces (option.c L299-302). Identical in
|
|
98
|
+
* shape to ui-prefs.c's print_error, because both print a parser_state.
|
|
99
|
+
*/
|
|
100
|
+
export declare function optionFileErrorMessage(path: string, e: ParserState): string;
|
|
101
|
+
/**
|
|
102
|
+
* options_restore_custom (option.c L263-309).
|
|
103
|
+
*
|
|
104
|
+
* Returns TRUE when there was nothing to restore (the page's file does not
|
|
105
|
+
* exist, so the maintainer's defaults are applied instead) and true again when
|
|
106
|
+
* the file was read, however badly it parsed. It returns FALSE for exactly one
|
|
107
|
+
* case: the file is present but could not be opened. Upstream's caller reads
|
|
108
|
+
* that distinction - "Restore failed." is printed only for the false.
|
|
109
|
+
*/
|
|
110
|
+
export declare function optionsRestoreCustom(io: HostIo, opts: OptionOpts, page: string, plog?: (message: string) => void): boolean;
|
|
111
|
+
/** What options_init_defaults produces: the opt[] map plus the two scalars. */
|
|
112
|
+
export interface InitialOptions {
|
|
113
|
+
opts: OptionOpts;
|
|
114
|
+
delayFactor: number;
|
|
115
|
+
hitpointWarn: number;
|
|
116
|
+
}
|
|
117
|
+
/**
|
|
118
|
+
* options_init_defaults (option.c L186-205), whole and in order: the table
|
|
119
|
+
* defaults, then the player's customised BIRTH defaults, then their customised
|
|
120
|
+
* INTERFACE defaults, then delay_factor = 40 and hitpoint_warn = 3.
|
|
121
|
+
*
|
|
122
|
+
* The order is the interesting part. The two scalars are set AFTER the files,
|
|
123
|
+
* so a customised-options file cannot influence them - which is consistent,
|
|
124
|
+
* because the files only carry booleans. And the two restore calls have their
|
|
125
|
+
* return values discarded: an unreadable customised file leaves the page on the
|
|
126
|
+
* table defaults and does not stop a character being made.
|
|
127
|
+
*/
|
|
128
|
+
export declare function optionsInitDefaults(io: HostIo, plog?: (message: string) => void): InitialOptions;
|
|
129
|
+
//# sourceMappingURL=options-file.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"options-file.d.ts","sourceRoot":"","sources":["../../src/player/options-file.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAwCG;AAGH,OAAO,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAC;AAEzD,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,eAAe,CAAC;AAQ5C,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAGhD;;;GAGG;AACH,MAAM,MAAM,UAAU,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;AAEjD,wEAAwE;AACxE,MAAM,MAAM,UAAU,GAAG,CAAC,OAAO,cAAc,CAAC,CAAC,MAAM,CAAC,CAAC,MAAM,CAAC,CAAC;AAEjE;;;;;GAKG;AACH,wBAAgB,cAAc,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAenD;AAED;;;;GAIG;AACH,wBAAgB,qBAAqB,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAE1D;AAgBD;;;;;;;GAOG;AACH,wBAAgB,qBAAqB,CAAC,IAAI,EAAE,QAAQ,CAAC,UAAU,CAAC,EAAE,IAAI,EAAE,MAAM,GAAG,MAAM,CAUtF;AAED;;;;;GAKG;AACH,wBAAgB,iBAAiB,CAC/B,EAAE,EAAE,MAAM,EACV,IAAI,EAAE,QAAQ,CAAC,UAAU,CAAC,EAC1B,IAAI,EAAE,MAAM,GACX,OAAO,CAUT;AA2GD;;;;;;;;GAQG;AACH,wBAAgB,sBAAsB,CACpC,IAAI,EAAE,MAAM,EACZ,IAAI,EAAE,UAAU,EAChB,IAAI,EAAE,MAAM,EACZ,UAAU,SAAwB,GACjC,WAAW,EAAE,CA0Bf;AAED;;;GAGG;AACH,wBAAgB,wBAAwB,CAAC,IAAI,EAAE,UAAU,EAAE,IAAI,EAAE,MAAM,GAAG,IAAI,CAI7E;AAED;;;GAGG;AACH,wBAAgB,sBAAsB,CAAC,IAAI,EAAE,MAAM,EAAE,CAAC,EAAE,WAAW,GAAG,MAAM,CAI3E;AAED;;;;;;;;GAQG;AACH,wBAAgB,oBAAoB,CAClC,EAAE,EAAE,MAAM,EACV,IAAI,EAAE,UAAU,EAChB,IAAI,EAAE,MAAM,EACZ,IAAI,CAAC,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,IAAI,GAC/B,OAAO,CAeT;AAMD,+EAA+E;AAC/E,MAAM,WAAW,cAAc;IAC7B,IAAI,EAAE,UAAU,CAAC;IACjB,WAAW,EAAE,MAAM,CAAC;IACpB,YAAY,EAAE,MAAM,CAAC;CACtB;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,mBAAmB,CACjC,EAAE,EAAE,MAAM,EACV,IAAI,CAAC,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,IAAI,GAC/B,cAAc,CAUhB"}
|
|
@@ -0,0 +1,309 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The customised-defaults option files, ported from reference/src/option.c
|
|
3
|
+
* L207-L328: `options_save_custom`, `options_restore_custom` and
|
|
4
|
+
* `options_restore_maintainer`, plus the `options_init_defaults` ordering that
|
|
5
|
+
* makes them matter.
|
|
6
|
+
*
|
|
7
|
+
* WHAT THESE ARE, AND WHY THEY ARE NOT THE SAVEFILE
|
|
8
|
+
*
|
|
9
|
+
* Upstream keeps two entirely separate persistences for options:
|
|
10
|
+
*
|
|
11
|
+
* - the SAVEFILE holds the options this character is playing with;
|
|
12
|
+
* - `customized_birth_options.txt` and `customized_interface_options.txt` in
|
|
13
|
+
* ANGBAND_DIR_USER hold the defaults the PLAYER wants every NEW character
|
|
14
|
+
* to start from.
|
|
15
|
+
*
|
|
16
|
+
* The second is read by `options_init_defaults` (option.c L192-199, called from
|
|
17
|
+
* `player_init`, player.c:491) BEFORE any birth choice is made, so it sets what
|
|
18
|
+
* the birth screen opens on. That is the whole point of it, and it is why the
|
|
19
|
+
* port's previous position - recorded in web/src/options.ts as "the port has no
|
|
20
|
+
* separate custom-defaults snapshot: the game save IS the persistence" - was a
|
|
21
|
+
* behavioural gap rather than a filing decision. The savefile cannot seed the
|
|
22
|
+
* NEXT character; there is no savefile yet.
|
|
23
|
+
*
|
|
24
|
+
* Only BIRTH and INTERFACE are restored at init. `options_init_defaults` names
|
|
25
|
+
* those two pages and no others, so a `customized_cheat_options.txt` written by
|
|
26
|
+
* hand is never read - and upstream cannot write one either, because
|
|
27
|
+
* `option_toggle_menu` only gives `cmd_keys` containing S/R/X to the interface
|
|
28
|
+
* page and the AT-BIRTH birth page (ui-options.c L333-348).
|
|
29
|
+
*
|
|
30
|
+
* SHAPE. These functions take `OptionOpts`, a plain name -> boolean map, which
|
|
31
|
+
* is the port's spelling of `struct player_options.opt[]`. They deliberately do
|
|
32
|
+
* NOT take an `OptionState`: `OptionState.set` refuses birth options after
|
|
33
|
+
* construction (they lock at birth, as upstream's read-only in-game page shows),
|
|
34
|
+
* and every one of upstream's calls here happens either before birth or on a
|
|
35
|
+
* page whose options are not locked. Passing the raw map keeps the lock where it
|
|
36
|
+
* belongs instead of adding a bypass to it.
|
|
37
|
+
*
|
|
38
|
+
* The grammar is `parser.c`'s, not a lookalike - see parser.ts Strtok for the
|
|
39
|
+
* three strtok behaviours a `split(":")` gets wrong, all of which are reachable
|
|
40
|
+
* from a hand-edited file.
|
|
41
|
+
*/
|
|
42
|
+
import { PARSE_ERROR } from "../generated/index.js";
|
|
43
|
+
import { OPTION_ENTRIES } from "../generated/options.js";
|
|
44
|
+
import { FileMode, FileType, HostDir } from "../host/io.js";
|
|
45
|
+
import { containsOnlySpaces, getParserErrorLimit, parserErrorText, parserSkipBlankOrComment, Strtok, } from "../parser.js";
|
|
46
|
+
import { DEFAULT_DELAY_FACTOR, DEFAULT_HITPOINT_WARN } from "./options.js";
|
|
47
|
+
/**
|
|
48
|
+
* option_type_name (option.c L280-311): the lower-case short name that goes in
|
|
49
|
+
* the file name and in the file's own first line. The `unknown` arm is
|
|
50
|
+
* upstream's `default:`; in the port the page is a string union, so it is only
|
|
51
|
+
* reachable from a caller that widened the type.
|
|
52
|
+
*/
|
|
53
|
+
export function optionTypeName(page) {
|
|
54
|
+
switch (page) {
|
|
55
|
+
case "INTERFACE":
|
|
56
|
+
return "interface";
|
|
57
|
+
case "BIRTH":
|
|
58
|
+
return "birth";
|
|
59
|
+
case "CHEAT":
|
|
60
|
+
return "cheat";
|
|
61
|
+
case "SCORE":
|
|
62
|
+
return "score";
|
|
63
|
+
case "SPECIAL":
|
|
64
|
+
return "special";
|
|
65
|
+
default:
|
|
66
|
+
return "unknown";
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
/**
|
|
70
|
+
* `strnfmt(file_name, ..., "customized_%s_options.txt", page_name)` - the same
|
|
71
|
+
* expression in both options_save_custom (L221) and options_restore_custom
|
|
72
|
+
* (L271), which is why it is one function here.
|
|
73
|
+
*/
|
|
74
|
+
export function customOptionsFileName(page) {
|
|
75
|
+
return `customized_${optionTypeName(page)}_options.txt`;
|
|
76
|
+
}
|
|
77
|
+
/**
|
|
78
|
+
* The options on one page, in table order. Upstream walks `opt` from 0 to
|
|
79
|
+
* OPT_MAX and tests `options[opt].type == page`, so index 0 (OPT_none, type
|
|
80
|
+
* SPECIAL, empty description) is included on the SPECIAL page exactly as it is
|
|
81
|
+
* here.
|
|
82
|
+
*/
|
|
83
|
+
function pageEntries(page) {
|
|
84
|
+
return OPTION_ENTRIES.filter((e) => e.type === page);
|
|
85
|
+
}
|
|
86
|
+
/* ------------------------------------------------------------------------
|
|
87
|
+
* The writer
|
|
88
|
+
* ------------------------------------------------------------------------ */
|
|
89
|
+
/**
|
|
90
|
+
* The exact bytes options_save_custom writes (option.c L226-246): a three-line
|
|
91
|
+
* header naming the page, then two lines per option - its description as a
|
|
92
|
+
* comment, then the `option:name:yes|no` line the reader parses back.
|
|
93
|
+
*
|
|
94
|
+
* Pure, so the file can be compared against the C's format string by eye and by
|
|
95
|
+
* test without a host.
|
|
96
|
+
*/
|
|
97
|
+
export function optionsSaveCustomText(opts, page) {
|
|
98
|
+
const pageName = optionTypeName(page);
|
|
99
|
+
let out = `# These are customized defaults for the ${pageName} options.\n`;
|
|
100
|
+
out += `# All lines begin with "option:" followed by the internal option name.\n`;
|
|
101
|
+
out += `# After the name is a colon followed by yes or no for the option's state.\n`;
|
|
102
|
+
for (const entry of pageEntries(page)) {
|
|
103
|
+
out += `# ${entry.description}\n`;
|
|
104
|
+
out += `option:${entry.name}:${opts[entry.name] ? "yes" : "no"}\n`;
|
|
105
|
+
}
|
|
106
|
+
return out;
|
|
107
|
+
}
|
|
108
|
+
/**
|
|
109
|
+
* options_save_custom (option.c L212-254). Returns false when the file could
|
|
110
|
+
* not be opened OR could not be closed - upstream folds both into one boolean
|
|
111
|
+
* here (unlike wiz-spoil.c, which reports them separately), and the caller
|
|
112
|
+
* prints "Save failed." either way.
|
|
113
|
+
*/
|
|
114
|
+
export function optionsSaveCustom(io, opts, page) {
|
|
115
|
+
const text = optionsSaveCustomText(opts, page);
|
|
116
|
+
const outcome = io.write(HostDir.USER, customOptionsFileName(page), text, FileMode.WRITE, FileType.TEXT);
|
|
117
|
+
return outcome === "ok";
|
|
118
|
+
}
|
|
119
|
+
/* ------------------------------------------------------------------------
|
|
120
|
+
* The reader
|
|
121
|
+
* ------------------------------------------------------------------------ */
|
|
122
|
+
/**
|
|
123
|
+
* parse_option (option.c L44-77) over one already-tokenised line, applied to
|
|
124
|
+
* `opts`. Returns the parser_error code, or PARSE_ERROR.NONE.
|
|
125
|
+
*
|
|
126
|
+
* The name must be on THIS page: upstream's search loop tests
|
|
127
|
+
* `options[opt].type == ctx->page` before comparing names, so
|
|
128
|
+
* `option:birth_force_descend:yes` inside customized_interface_options.txt is
|
|
129
|
+
* PARSE_ERROR_INVALID_OPTION rather than a cross-page write. That is the
|
|
130
|
+
* mechanism that keeps a birth option out of the interface file.
|
|
131
|
+
*/
|
|
132
|
+
function applyOptionLine(opts, page, name, yno) {
|
|
133
|
+
const entry = pageEntries(page).find((e) => e.name === name);
|
|
134
|
+
if (!entry)
|
|
135
|
+
return PARSE_ERROR.INVALID_OPTION;
|
|
136
|
+
/* strncmp("yes", yno, 3) == 0 && contains_only_spaces(yno + 3). Prefix, NOT
|
|
137
|
+
* equality: "yes " is accepted and "yesterday" is not, and the tail may
|
|
138
|
+
* hold only spaces and tabs. */
|
|
139
|
+
if (yno.startsWith("yes") && containsOnlySpaces(yno.slice(3))) {
|
|
140
|
+
opts[entry.name] = true;
|
|
141
|
+
return PARSE_ERROR.NONE;
|
|
142
|
+
}
|
|
143
|
+
if (yno.startsWith("no") && containsOnlySpaces(yno.slice(2))) {
|
|
144
|
+
opts[entry.name] = false;
|
|
145
|
+
return PARSE_ERROR.NONE;
|
|
146
|
+
}
|
|
147
|
+
return PARSE_ERROR.INVALID_VALUE;
|
|
148
|
+
}
|
|
149
|
+
/**
|
|
150
|
+
* `parser_parse` for the one grammar this file registers:
|
|
151
|
+
* `parser_reg(p, "option sym name str yno", parse_option)` (option.c L288).
|
|
152
|
+
*
|
|
153
|
+
* `errmsg` is threaded through rather than reset per line, and that is
|
|
154
|
+
* deliberate: upstream's `p->errmsg` is a buffer on the parser that only the
|
|
155
|
+
* FIELD-level errors write to (parser.c L256, L284-298). A handler error
|
|
156
|
+
* (INVALID_OPTION / INVALID_VALUE) leaves whatever the last field error put
|
|
157
|
+
* there, so the first such error in a file reports an empty `msg` (mem_zalloc)
|
|
158
|
+
* and a later one can inherit "name" or "yno" from an earlier bad line. It is
|
|
159
|
+
* scruffy, it is only ever printed, and reproducing it costs one parameter.
|
|
160
|
+
*/
|
|
161
|
+
function parseOptionLine(raw, opts, page, lineNo, errmsg) {
|
|
162
|
+
const line = parserSkipBlankOrComment(raw);
|
|
163
|
+
if (line === null)
|
|
164
|
+
return { state: null, errmsg };
|
|
165
|
+
const tok = new Strtok(line);
|
|
166
|
+
/* strtok(cline, ":") - the directive. */
|
|
167
|
+
const directive = tok.next(":");
|
|
168
|
+
if (directive === null) {
|
|
169
|
+
return {
|
|
170
|
+
state: { line: lineNo, col: 1, msg: errmsg, error: PARSE_ERROR.MISSING_FIELD },
|
|
171
|
+
errmsg,
|
|
172
|
+
};
|
|
173
|
+
}
|
|
174
|
+
if (directive !== "option") {
|
|
175
|
+
return {
|
|
176
|
+
state: {
|
|
177
|
+
line: lineNo,
|
|
178
|
+
col: 1,
|
|
179
|
+
msg: directive,
|
|
180
|
+
error: PARSE_ERROR.UNDEFINED_DIRECTIVE,
|
|
181
|
+
},
|
|
182
|
+
errmsg: directive,
|
|
183
|
+
};
|
|
184
|
+
}
|
|
185
|
+
/* `sym name` - colon-tokenised (parser.c L272-274). colno is bumped per spec
|
|
186
|
+
* BEFORE the token is taken, so a missing name reports column 2. */
|
|
187
|
+
const name = tok.next(":");
|
|
188
|
+
if (name === null) {
|
|
189
|
+
return {
|
|
190
|
+
state: { line: lineNo, col: 2, msg: "name", error: PARSE_ERROR.MISSING_FIELD },
|
|
191
|
+
errmsg: "name",
|
|
192
|
+
};
|
|
193
|
+
}
|
|
194
|
+
/* `str yno` - strtok(sp, "") takes the whole remainder, colons included. */
|
|
195
|
+
const yno = tok.next("");
|
|
196
|
+
if (yno === null) {
|
|
197
|
+
return {
|
|
198
|
+
state: { line: lineNo, col: 3, msg: "yno", error: PARSE_ERROR.MISSING_FIELD },
|
|
199
|
+
errmsg: "yno",
|
|
200
|
+
};
|
|
201
|
+
}
|
|
202
|
+
const error = applyOptionLine(opts, page, name, yno);
|
|
203
|
+
if (error === PARSE_ERROR.NONE)
|
|
204
|
+
return { state: null, errmsg };
|
|
205
|
+
return { state: { line: lineNo, col: 3, msg: errmsg, error }, errmsg };
|
|
206
|
+
}
|
|
207
|
+
/**
|
|
208
|
+
* The whole read loop of options_restore_custom (option.c L285-306) over
|
|
209
|
+
* already-read text, applied to `opts`. Returns every error it reported, in
|
|
210
|
+
* order, capped exactly as upstream caps it.
|
|
211
|
+
*
|
|
212
|
+
* The cap is not cosmetic. `if (maxe) { if (counte >= maxe - 1) break; ++counte; }`
|
|
213
|
+
* BREAKS the read loop, so with the default limit of 20 upstream stops applying
|
|
214
|
+
* the file after its twentieth bad line and everything below is ignored.
|
|
215
|
+
*/
|
|
216
|
+
export function parseCustomOptionsText(text, opts, page, errorLimit = getParserErrorLimit()) {
|
|
217
|
+
const errors = [];
|
|
218
|
+
let counte = 0;
|
|
219
|
+
let errmsg = ""; /* mem_zalloc'd parser: the buffer starts empty. */
|
|
220
|
+
let lineNo = 0;
|
|
221
|
+
for (const rawLine of text.split("\n")) {
|
|
222
|
+
lineNo++;
|
|
223
|
+
/* file_getl strips the newline; a CRLF file leaves the CR behind on
|
|
224
|
+
* platforms whose fgets does not, so drop it here as the pref reader does. */
|
|
225
|
+
const line = rawLine.replace(/\r$/, "");
|
|
226
|
+
const res = parseOptionLine(line, opts, page, lineNo, errmsg);
|
|
227
|
+
errmsg = res.errmsg;
|
|
228
|
+
if (res.state === null)
|
|
229
|
+
continue;
|
|
230
|
+
errors.push(res.state);
|
|
231
|
+
if (errorLimit) {
|
|
232
|
+
if (counte >= errorLimit - 1)
|
|
233
|
+
break;
|
|
234
|
+
counte++;
|
|
235
|
+
}
|
|
236
|
+
}
|
|
237
|
+
/* A trailing newline makes split() yield one extra empty element, which
|
|
238
|
+
* file_getl would never have returned. It parses as a blank line and is
|
|
239
|
+
* skipped, so the only visible effect would be lineNo counting one line too
|
|
240
|
+
* many - and it never reaches an error report, because a blank line cannot
|
|
241
|
+
* produce one. */
|
|
242
|
+
return errors;
|
|
243
|
+
}
|
|
244
|
+
/**
|
|
245
|
+
* options_restore_maintainer (option.c L313-322): every option on the page back
|
|
246
|
+
* to its table `normal`. No file, no failure mode, and no return value.
|
|
247
|
+
*/
|
|
248
|
+
export function optionsRestoreMaintainer(opts, page) {
|
|
249
|
+
for (const entry of pageEntries(page)) {
|
|
250
|
+
opts[entry.name] = entry.normal;
|
|
251
|
+
}
|
|
252
|
+
}
|
|
253
|
+
/**
|
|
254
|
+
* The plog_fmt an unparseable line produces (option.c L299-302). Identical in
|
|
255
|
+
* shape to ui-prefs.c's print_error, because both print a parser_state.
|
|
256
|
+
*/
|
|
257
|
+
export function optionFileErrorMessage(path, e) {
|
|
258
|
+
return `Parse error in ${path} line ${e.line} column ${e.col}: ${e.msg}: ${parserErrorText(e.error)}`;
|
|
259
|
+
}
|
|
260
|
+
/**
|
|
261
|
+
* options_restore_custom (option.c L263-309).
|
|
262
|
+
*
|
|
263
|
+
* Returns TRUE when there was nothing to restore (the page's file does not
|
|
264
|
+
* exist, so the maintainer's defaults are applied instead) and true again when
|
|
265
|
+
* the file was read, however badly it parsed. It returns FALSE for exactly one
|
|
266
|
+
* case: the file is present but could not be opened. Upstream's caller reads
|
|
267
|
+
* that distinction - "Restore failed." is printed only for the false.
|
|
268
|
+
*/
|
|
269
|
+
export function optionsRestoreCustom(io, opts, page, plog) {
|
|
270
|
+
const name = customOptionsFileName(page);
|
|
271
|
+
if (!io.exists(HostDir.USER, name)) {
|
|
272
|
+
optionsRestoreMaintainer(opts, page);
|
|
273
|
+
return true;
|
|
274
|
+
}
|
|
275
|
+
const text = io.read(HostDir.USER, name);
|
|
276
|
+
if (text === null)
|
|
277
|
+
return false;
|
|
278
|
+
const errors = parseCustomOptionsText(text, opts, page);
|
|
279
|
+
if (plog) {
|
|
280
|
+
const path = io.displayPath(HostDir.USER, name);
|
|
281
|
+
for (const e of errors)
|
|
282
|
+
plog(optionFileErrorMessage(path, e));
|
|
283
|
+
}
|
|
284
|
+
return true;
|
|
285
|
+
}
|
|
286
|
+
/**
|
|
287
|
+
* options_init_defaults (option.c L186-205), whole and in order: the table
|
|
288
|
+
* defaults, then the player's customised BIRTH defaults, then their customised
|
|
289
|
+
* INTERFACE defaults, then delay_factor = 40 and hitpoint_warn = 3.
|
|
290
|
+
*
|
|
291
|
+
* The order is the interesting part. The two scalars are set AFTER the files,
|
|
292
|
+
* so a customised-options file cannot influence them - which is consistent,
|
|
293
|
+
* because the files only carry booleans. And the two restore calls have their
|
|
294
|
+
* return values discarded: an unreadable customised file leaves the page on the
|
|
295
|
+
* table defaults and does not stop a character being made.
|
|
296
|
+
*/
|
|
297
|
+
export function optionsInitDefaults(io, plog) {
|
|
298
|
+
const opts = {};
|
|
299
|
+
for (const entry of OPTION_ENTRIES)
|
|
300
|
+
opts[entry.name] = entry.normal;
|
|
301
|
+
optionsRestoreCustom(io, opts, "BIRTH", plog);
|
|
302
|
+
optionsRestoreCustom(io, opts, "INTERFACE", plog);
|
|
303
|
+
return {
|
|
304
|
+
opts,
|
|
305
|
+
delayFactor: DEFAULT_DELAY_FACTOR,
|
|
306
|
+
hitpointWarn: DEFAULT_HITPOINT_WARN,
|
|
307
|
+
};
|
|
308
|
+
}
|
|
309
|
+
//# sourceMappingURL=options-file.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"options-file.js","sourceRoot":"","sources":["../../src/player/options-file.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAwCG;AAEH,OAAO,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AACpD,OAAO,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAC;AACzD,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AAE5D,OA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,IAAI,IAAI,KAAK,IAAI;QAAE,OAAO,KAAK,CAAC;IAEhC,MAAM,MAAM,GAAG,sBAAsB,CAAC,IAAI,EAAE,IAAI,EAAE,IAAI,CAAC,CAAC;IACxD,IAAI,IAAI,EAAE,CAAC;QACT,MAAM,IAAI,GAAG,EAAE,CAAC,WAAW,CAAC,OAAO,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;QAChD,KAAK,MAAM,CAAC,IAAI,MAAM;YAAE,IAAI,CAAC,sBAAsB,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC,CAAC;IAChE,CAAC;IACD,OAAO,IAAI,CAAC;AACd,CAAC;AAaD;;;;;;;;;;GAUG;AACH,MAAM,UAAU,mBAAmB,CACjC,EAAU,EACV,IAAgC;IAEhC,MAAM,IAAI,GAAe,EAAE,CAAC;IAC5B,KAAK,MAAM,KAAK,IAAI,cAAc;QAAE,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,GAAG,KAAK,CAAC,MAAM,CAAC;IACpE,oBAAoB,CAAC,EAAE,EAAE,IAAI,EAAE,OAAO,EAAE,IAAI,CAAC,CAAC;IAC9C,oBAAoB,CAAC,EAAE,EAAE,IAAI,EAAE,WAAW,EAAE,IAAI,CAAC,CAAC;IAClD,OAAO;QACL,IAAI;QACJ,WAAW,EAAE,oBAAoB;QACjC,YAAY,EAAE,qBAAqB;KACpC,CAAC;AACJ,CAAC"}
|
package/dist/player/options.d.ts
CHANGED
|
@@ -7,7 +7,8 @@
|
|
|
7
7
|
* delay_factor = 40 and hitpoint_warn = 3 defaults) and the cheat/score
|
|
8
8
|
* coupling in option_set (turning a cheat_* option on forces its score_*
|
|
9
9
|
* twin, which suppresses scoring). This module is the pure data half of
|
|
10
|
-
* that; the option MENU (ui-options.c, the keypress screens) is
|
|
10
|
+
* that; the option MENU (ui-options.c, the keypress screens) is the shell's -
|
|
11
|
+
* web/src/options.ts runOptionsMenu, bound to "=" - and is treated here as
|
|
11
12
|
* a platform-native menu concern (see parity/ledger/options.yaml).
|
|
12
13
|
*
|
|
13
14
|
* Faithful notes:
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"options.d.ts","sourceRoot":"","sources":["../../src/player/options.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"options.d.ts","sourceRoot":"","sources":["../../src/player/options.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AAEH,OAAO,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAC;AAEzD,2EAA2E;AAC3E,MAAM,MAAM,UAAU,GAAG,CAAC,OAAO,cAAc,CAAC,CAAC,MAAM,CAAC,CAAC,MAAM,CAAC,CAAC;AAEjE,4EAA4E;AAC5E,eAAO,MAAM,qBAAqB,IAAI,CAAC;AAEvC,yEAAyE;AACzE,eAAO,MAAM,oBAAoB,KAAK,CAAC;AAEvC;;;;GAIG;AACH,eAAO,MAAM,sBAAsB,IAAI,CAAC;AAExC,yEAAyE;AACzE,MAAM,MAAM,YAAY,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;AAEnD,gDAAgD;AAChD,MAAM,WAAW,eAAe;IAC9B,yCAAyC;IACzC,MAAM,EAAE,YAAY,CAAC;IACrB,oCAAoC;IACpC,YAAY,EAAE,MAAM,CAAC;IACrB,4BAA4B;IAC5B,WAAW,EAAE,MAAM,CAAC;IACpB,4CAA4C;IAC5C,aAAa,EAAE,MAAM,CAAC;IACtB,0DAA0D;IAC1D,KAAK,EAAE,YAAY,CAAC;CACrB;AAED,uEAAuE;AACvE,MAAM,WAAW,UAAU;IACzB,2EAA2E;IAC3E,SAAS,CAAC,EAAE,OAAO,CAAC,MAAM,CAAC,UAAU,EAAE,OAAO,CAAC,CAAC,CAAC;IACjD,+CAA+C;IAC/C,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,wCAAwC;IACxC,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,uDAAuD;IACvD,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB;AAwBD;;;;GAIG;AACH,qBAAa,WAAW;IACtB,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAoB;IAC3C,oCAAoC;IACpC,YAAY,EAAE,MAAM,CAAC;IACrB,4BAA4B;IAC5B,WAAW,EAAE,MAAM,CAAC;IACpB,4CAA4C;IAC5C,aAAa,EAAE,MAAM,CAAC;IACtB,6EAA6E;IAC7E,OAAO,CAAC,QAAQ,CAAC,KAAK,CAAe;gBAEzB,IAAI,GAAE,UAAe;IAoBjC,2EAA2E;IAC3E,OAAO,CAAC,QAAQ;IAUhB,gEAAgE;IAChE,GAAG,CAAC,IAAI,EAAE,UAAU,GAAG,MAAM,GAAG,OAAO;IAIvC;;;;;OAKG;IACH,GAAG,CAAC,IAAI,EAAE,UAAU,GAAG,MAAM,EAAE,KAAK,EAAE,OAAO,GAAG,OAAO;IAOvD,qDAAqD;IACrD,OAAO,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO;IAI9B,qDAAqD;IACrD,OAAO,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO;IAI9B,qDAAqD;IACrD,OAAO,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO;IAI9B;;;OAGG;IACH,UAAU,CAAC,IAAI,EAAE,UAAU,GAAG,MAAM,GAAG,OAAO;IAI9C;;;;OAIG;IACH,WAAW,IAAI,OAAO;IAOtB,+CAA+C;IAC/C,KAAK,IAAI,SAAS,MAAM,EAAE;IAI1B,iDAAiD;IACjD,QAAQ,IAAI,eAAe;IAU3B;;;;OAIG;IACH,MAAM,CAAC,OAAO,CAAC,IAAI,EAAE,eAAe,GAAG,WAAW;CAwBnD"}
|
package/dist/player/options.js
CHANGED
|
@@ -7,7 +7,8 @@
|
|
|
7
7
|
* delay_factor = 40 and hitpoint_warn = 3 defaults) and the cheat/score
|
|
8
8
|
* coupling in option_set (turning a cheat_* option on forces its score_*
|
|
9
9
|
* twin, which suppresses scoring). This module is the pure data half of
|
|
10
|
-
* that; the option MENU (ui-options.c, the keypress screens) is
|
|
10
|
+
* that; the option MENU (ui-options.c, the keypress screens) is the shell's -
|
|
11
|
+
* web/src/options.ts runOptionsMenu, bound to "=" - and is treated here as
|
|
11
12
|
* a platform-native menu concern (see parity/ledger/options.yaml).
|
|
12
13
|
*
|
|
13
14
|
* Faithful notes:
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"options.js","sourceRoot":"","sources":["../../src/player/options.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"options.js","sourceRoot":"","sources":["../../src/player/options.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AAEH,OAAO,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAC;AAKzD,4EAA4E;AAC5E,MAAM,CAAC,MAAM,qBAAqB,GAAG,CAAC,CAAC;AAEvC,yEAAyE;AACzE,MAAM,CAAC,MAAM,oBAAoB,GAAG,EAAE,CAAC;AAEvC;;;;GAIG;AACH,MAAM,CAAC,MAAM,sBAAsB,GAAG,CAAC,CAAC;AA+BxC,kFAAkF;AAClF,MAAM,SAAS,GAAsB,cAAc,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC;AACvE,MAAM,WAAW,GAAwB,IAAI,GAAG,CAC9C,cAAc,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,KAAK,OAAO,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,CACpE,CAAC;AACF,MAAM,WAAW,GAAwB,IAAI,GAAG,CAC9C,cAAc,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,KAAK,OAAO,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,CACpE,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;SAClB,CAAC,CAAC;QACH,OAAO,KAAK,CAAC;IACf,CAAC;CACF"}
|
package/dist/player/player.d.ts
CHANGED
|
@@ -20,9 +20,15 @@ import type { HistoryInfo } from "./history.js";
|
|
|
20
20
|
import type { NameProbs } from "../obj/randname.js";
|
|
21
21
|
import type { Rng } from "../rng.js";
|
|
22
22
|
/**
|
|
23
|
-
* Minimal struct player_upkeep:
|
|
24
|
-
*
|
|
25
|
-
*
|
|
23
|
+
* Minimal struct player_upkeep: the derived counters the headless core needs,
|
|
24
|
+
* plus the one mask that is a queue of work rather than a dirty bit.
|
|
25
|
+
*
|
|
26
|
+
* The inventory and quiver arrays are Gear.inven / Gear.quiver (game/gear.ts,
|
|
27
|
+
* sized by calcInventory). The `update` (PU_*) and `redraw` (PR_*) masks are a
|
|
28
|
+
* ratified divergence, not an omission: see game/known.ts:153. `notice` (PN_*)
|
|
29
|
+
* is here because nothing else can do its work - the previous version of this
|
|
30
|
+
* comment claimed the notice mask "lives in game/gear.ts", and it did not live
|
|
31
|
+
* anywhere, which is how PORT_TODO 1.1 stayed open.
|
|
26
32
|
*/
|
|
27
33
|
export interface PlayerUpkeep {
|
|
28
34
|
playing: boolean;
|
|
@@ -30,6 +36,47 @@ export interface PlayerUpkeep {
|
|
|
30
36
|
newSpells: number;
|
|
31
37
|
/** Total weight of carried gear (tenths of a pound). */
|
|
32
38
|
totalWeight: number;
|
|
39
|
+
/**
|
|
40
|
+
* player->upkeep->notice: the PN_* mask (player/types.ts PN), drained by
|
|
41
|
+
* noticeStuff (game/notice.ts). Transient within a turn - deliberately NOT
|
|
42
|
+
* serialized, exactly as upstream's savefile omits it, because every writer
|
|
43
|
+
* is a live action and the loop drains it before the player is asked for
|
|
44
|
+
* input again.
|
|
45
|
+
*/
|
|
46
|
+
notice: number;
|
|
47
|
+
/**
|
|
48
|
+
* player->upkeep->dropping: "the player has auto-dropped stuff this command".
|
|
49
|
+
* Set by ignore_drop when it queues a drop (obj-ignore.c:687), read once by
|
|
50
|
+
* process_player_cleanup to skip the monster housekeeping (game-world.c:867),
|
|
51
|
+
* and cleared there unconditionally (L909). Transient within a turn and so not
|
|
52
|
+
* serialized, like `notice`.
|
|
53
|
+
*/
|
|
54
|
+
dropping: boolean;
|
|
55
|
+
/**
|
|
56
|
+
* cmd-core.c's `repeat_prev_allowed` static (L260): whether the repeat key may
|
|
57
|
+
* re-dispatch the remembered command. Set true before every command's handler
|
|
58
|
+
* runs (L353) and cleared by the handlers that must not be repeated.
|
|
59
|
+
*
|
|
60
|
+
* UPSTREAM KEEPS THIS IN cmd-core.c, not in upkeep, and the move is deliberate
|
|
61
|
+
* rather than sloppy. Three of its seven writers - gear_object_for_use,
|
|
62
|
+
* inven_wield, combine_pack - are in game/gear.ts, which sits BELOW
|
|
63
|
+
* game/context.ts and cannot see a GameState. The alternatives were a
|
|
64
|
+
* `disableRepeat?: () => void` parameter threaded through four call chains,
|
|
65
|
+
* which is a seam every future caller has to remember
|
|
66
|
+
* ([[a-parameter-the-caller-must-remember]]), or this. It is the same kind of
|
|
67
|
+
* per-command transient as `notice` and `dropping` above, and it lands where
|
|
68
|
+
* everything that writes it can already reach.
|
|
69
|
+
*/
|
|
70
|
+
repeatPrevAllowed: boolean;
|
|
71
|
+
/**
|
|
72
|
+
* Whether the last command addressed a FLOOR object, for
|
|
73
|
+
* cmd_disable_repeat_floor_item (cmd-core.c:548). Upstream walks the queued
|
|
74
|
+
* command's args for an `arg_ITEM` whose object has a real grid, to avoid
|
|
75
|
+
* dereferencing a freed pointer. This port addresses a floor object as
|
|
76
|
+
* `args.floor`, an INDEX into the pile, and an index does not dangle - it
|
|
77
|
+
* silently re-binds to whatever is at that position now.
|
|
78
|
+
*/
|
|
79
|
+
lastCmdUsedFloorItem: boolean;
|
|
33
80
|
}
|
|
34
81
|
/**
|
|
35
82
|
* obj_k: the player's cumulative object-knowledge, i.e. the learned "rune"
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"player.d.ts","sourceRoot":"","sources":["../../src/player/player.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAGH,OAAO,KAAK,EAAE,UAAU,EAAE,WAAW,EAAE,UAAU,EAAE,KAAK,EAAE,MAAM,YAAY,CAAC;AAE7E,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AACnD,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AAC7C,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAEhD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AACpD,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,WAAW,CAAC;AAErC
|
|
1
|
+
{"version":3,"file":"player.d.ts","sourceRoot":"","sources":["../../src/player/player.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAGH,OAAO,KAAK,EAAE,UAAU,EAAE,WAAW,EAAE,UAAU,EAAE,KAAK,EAAE,MAAM,YAAY,CAAC;AAE7E,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AACnD,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AAC7C,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAEhD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AACpD,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,WAAW,CAAC;AAErC;;;;;;;;;;GAUG;AACH,MAAM,WAAW,YAAY;IAC3B,OAAO,EAAE,OAAO,CAAC;IACjB,2CAA2C;IAC3C,SAAS,EAAE,MAAM,CAAC;IAClB,wDAAwD;IACxD,WAAW,EAAE,MAAM,CAAC;IACpB;;;;;;OAMG;IACH,MAAM,EAAE,MAAM,CAAC;IACf;;;;;;OAMG;IACH,QAAQ,EAAE,OAAO,CAAC;IAClB;;;;;;;;;;;;;;OAcG;IACH,iBAAiB,EAAE,OAAO,CAAC;IAC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AO,EAAE,MAAM,CAAC;IAEhB;;;;;OAKG;IACH,IAAI,EAAE,WAAW,EAAE,CAAC;IAEpB,+DAA+D;IAC/D,IAAI,EAAE,UAAU,CAAC;IACjB;;;OAGG;IACH,SAAS,EAAE,MAAM,EAAE,CAAC;IAEpB;;;OAGG;IACH,QAAQ,EAAE,qBAAqB,CAAC;IAEhC;;;;OAIG;IACH,MAAM,EAAE,WAAW,EAAE,CAAC;IAEtB;;;OAGG;IACH,WAAW,EAAE,OAAO,CAAC;IAErB,4CAA4C;IAC5C,KAAK,EAAE,KAAK,GAAG,IAAI,CAAC;IAEpB;;;OAGG;IACH,MAAM,EAAE,MAAM,EAAE,CAAC;IAEjB,MAAM,EAAE,YAAY,CAAC;CACtB;AAED;;;;GAIG;AACH,wBAAgB,WAAW,CACzB,IAAI,EAAE,UAAU,EAChB,GAAG,EAAE,WAAW,EAChB,IAAI,EAAE,UAAU,GACf,MAAM,CA2DR;AAED;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,gBAAgB,CAAC,GAAG,EAAE,GAAG,EAAE,KAAK,EAAE,SAAS,GAAG,IAAI,GAAG,MAAM,CAK1E"}
|
package/dist/player/player.js
CHANGED
|
@@ -91,7 +91,16 @@ export function blankPlayer(race, cls, body) {
|
|
|
91
91
|
totalWinner: false,
|
|
92
92
|
shape: null,
|
|
93
93
|
skills: new Array(SKILL_MAX).fill(0),
|
|
94
|
-
upkeep: {
|
|
94
|
+
upkeep: {
|
|
95
|
+
playing: false,
|
|
96
|
+
newSpells: 0,
|
|
97
|
+
totalWeight: 0,
|
|
98
|
+
notice: 0,
|
|
99
|
+
dropping: false,
|
|
100
|
+
/* cmd-core.c:260's static initialiser. */
|
|
101
|
+
repeatPrevAllowed: false,
|
|
102
|
+
lastCmdUsedFloorItem: false,
|
|
103
|
+
},
|
|
95
104
|
};
|
|
96
105
|
}
|
|
97
106
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"player.js","sourceRoot":"","sources":["../../src/player/player.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,YAAY,EAAE,SAAS,EAAE,QAAQ,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AAExE,OAAO,EAAE,WAAW,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAIvE,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;
|
|
1
|
+
{"version":3,"file":"player.js","sourceRoot":"","sources":["../../src/player/player.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,YAAY,EAAE,SAAS,EAAE,QAAQ,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AAExE,OAAO,EAAE,WAAW,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAIvE,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AA2IlD,qEAAqE;AACrE,MAAM,UAAU,iBAAiB;IAC/B,OAAO;QACL,SAAS,EAAE,IAAI,KAAK,CAAS,WAAW,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC;QACjD;;oFAE4E;QAC5E,GAAG,EAAE,CAAC;QACN,GAAG,EAAE,CAAC;QACN,GAAG,EAAE,CAAC;QACN;+EACuE;QACvE,EAAE,EAAE,CAAC;QACL,EAAE,EAAE,CAAC;QACL,EAAE,EAAE,CAAC;QACL,MAAM,EAAE,WAAW,EAAE;QACrB,KAAK,EAAE,UAAU,EAAE;QACnB,MAAM,EAAE,EAAE;QACV,KAAK,EAAE,EAAE;QACT,MAAM,EAAE,EAAE;KACX,CAAC;AACJ,CAAC;AA2ID;;;;GAIG;AACH,MAAM,UAAU,WAAW,CACzB,IAAgB,EAChB,GAAgB,EAChB,IAAgB;IAEhB,OAAO;QACL,IAAI;QACJ,GAAG;QACH,MAAM,EAAE,CAAC;QACT,SAAS,EAAE,CAAC;QACZ,GAAG,EAAE,CAAC;QACN,EAAE,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