Releases: Cosmoverse/NpcDialogue
Releases · Cosmoverse/NpcDialogue
v0.1.1
- Added a property
$update_existing
toNpcDialogueManager::send()
to update existing dialogue - Added an await-generator based asynchronous mechanism to request dialogues
https://i.imgur.com/2ky23TD.mp4
$name = "Hello, " . $player->getName(); $text = "Click the Button!"; $buttons = [SimpleNpcDialogueButton::simple("Click me")]; $update_existing = false; while(true){ try{ $response = yield from NpcDialogueManager::request($player, $name, $text, buttons: $buttons, update_existing: $update_existing); }catch(NpcDialogueException){ break; // closed, disconnected, or gave invalid response - see NpcDialogueException::getCode() } assert(isset($buttons[$response])); $update_existing = true; $text = "You clicked the button on " . (new DateTimeImmutable())->format("Y-m-d H:i:s"); }
- Fixed crashes when sending dialogues to players post-quit
v0.0.3
- Added NPC texture constants for apiary, teacher, construction, agriculture, businessmobs, everydaybusiness, and kiosk.
The following constants were added:DefaultNpcDialogueTexture::TEXTURE_APIARY_1
DefaultNpcDialogueTexture::TEXTURE_APIARY_2
DefaultNpcDialogueTexture::TEXTURE_APIARY_3
DefaultNpcDialogueTexture::TEXTURE_APIARY_4
DefaultNpcDialogueTexture::TEXTURE_APIARY_5
DefaultNpcDialogueTexture::TEXTURE_TEACHER_1
DefaultNpcDialogueTexture::TEXTURE_TEACHER_2
DefaultNpcDialogueTexture::TEXTURE_TEACHER_3
DefaultNpcDialogueTexture::TEXTURE_TEACHER_4
DefaultNpcDialogueTexture::TEXTURE_TEACHER_5
DefaultNpcDialogueTexture::TEXTURE_CONSTRUCTION_1
DefaultNpcDialogueTexture::TEXTURE_CONSTRUCTION_2
DefaultNpcDialogueTexture::TEXTURE_CONSTRUCTION_3
DefaultNpcDialogueTexture::TEXTURE_CONSTRUCTION_4
DefaultNpcDialogueTexture::TEXTURE_CONSTRUCTION_5
DefaultNpcDialogueTexture::TEXTURE_AGRICULTURE_1
DefaultNpcDialogueTexture::TEXTURE_AGRICULTURE_2
DefaultNpcDialogueTexture::TEXTURE_AGRICULTURE_3
DefaultNpcDialogueTexture::TEXTURE_AGRICULTURE_4
DefaultNpcDialogueTexture::TEXTURE_AGRICULTURE_5
DefaultNpcDialogueTexture::TEXTURE_AGRICULTURE_6
DefaultNpcDialogueTexture::TEXTURE_AGRICULTURE_7
DefaultNpcDialogueTexture::TEXTURE_AGRICULTURE_8
DefaultNpcDialogueTexture::TEXTURE_AGRICULTURE_9
DefaultNpcDialogueTexture::TEXTURE_AGRICULTURE_10
DefaultNpcDialogueTexture::TEXTURE_BUSINESSMOBS_1
DefaultNpcDialogueTexture::TEXTURE_BUSINESSMOBS_2
DefaultNpcDialogueTexture::TEXTURE_BUSINESSMOBS_3
DefaultNpcDialogueTexture::TEXTURE_BUSINESSMOBS_4
DefaultNpcDialogueTexture::TEXTURE_BUSINESSMOBS_5
DefaultNpcDialogueTexture::TEXTURE_EVERYDAYBUSINESS_1
DefaultNpcDialogueTexture::TEXTURE_EVERYDAYBUSINESS_2
DefaultNpcDialogueTexture::TEXTURE_EVERYDAYBUSINESS_3
DefaultNpcDialogueTexture::TEXTURE_EVERYDAYBUSINESS_4
DefaultNpcDialogueTexture::TEXTURE_EVERYDAYBUSINESS_5
DefaultNpcDialogueTexture::TEXTURE_KIOSK_1
DefaultNpcDialogueTexture::TEXTURE_KIOSK_2
DefaultNpcDialogueTexture::TEXTURE_KIOSK_3
DefaultNpcDialogueTexture::TEXTURE_KIOSK_4
DefaultNpcDialogueTexture::TEXTURE_KIOSK_5