Module: Lich::Common::XMLParserDelta::Base
- Included in:
- Default, DragonRealms::XMLDelta, Gemstone::XMLDelta
- Defined in:
- documented/common/xmlparser/game_delta.rb
Overview
The hook interface, with the behavior for a game that is not (yet) known. Game deltas extend this and override only the hooks that differ.
Instance Method Summary collapse
-
#apply_crtr_status(_id, _flags, in_room_objs: false) ⇒ Boolean, Symbol
Applies a
immediately, if this game can. -
#main_subtitle(subtitle, nav_uid_pending:) ⇒ Hash
Parses the main window's streamWindow subtitle.
Instance Method Details
#apply_crtr_status(_id, _flags, in_room_objs: false) ⇒ Boolean, Symbol
Applies a
Returns true when applied and the id should be collected: only the DragonRealms prompt handler drains that list (pairing ids to legacy-stream bold names). Returns :applied when applied with no pairing and nothing to stash (GemStone's standalone tags for a creature already in the current room). Returns false to have the parser stash the flags for the creature's next room-objs link, which registers it and applies them. Opening room objs or
90 91 92 |
# File 'documented/common/xmlparser/game_delta.rb', line 90 def apply_crtr_status(_id, _flags, in_room_objs: false) # rubocop:disable Lint/UnusedMethodArgument false end |
#main_subtitle(subtitle, nav_uid_pending:) ⇒ Hash
Parses the main window's streamWindow subtitle. Returns the parser state to update; omitted keys are left as they are. XMLParser applies only the keys listed under @return, so a new key needs a matching line at the call site. A hook may also update global (non-parser) state (GemStone's turns on Lich.display_uid), so call it once per subtitle and never speculatively.
69 70 71 |
# File 'documented/common/xmlparser/game_delta.rb', line 69 def main_subtitle(subtitle, nav_uid_pending:) # rubocop:disable Lint/UnusedMethodArgument { room_title: String.new } end |