From 2be15e49d7dbb20511620b79129043861c1c58d7 Mon Sep 17 00:00:00 2001 From: ChillerDragon Date: Sun, 17 Sep 2023 19:19:06 +0200 Subject: [PATCH] Fix and doc set_startinfo --- docs/classes/TeeworldsClient.md | 27 +++++++++++++++++++++++++-- examples/04_player_infos.rb | 2 +- 2 files changed, 26 insertions(+), 3 deletions(-) diff --git a/docs/classes/TeeworldsClient.md b/docs/classes/TeeworldsClient.md index a031663..ae3f02d 100644 --- a/docs/classes/TeeworldsClient.md +++ b/docs/classes/TeeworldsClient.md @@ -449,8 +449,31 @@ client.connect('localhost', 8303, detach: false) ```ruby client = TeeworldsClient.new -# TODO: generated documentation -client.set_startinfo(info) +# all keys are optional +# if not provided they will fall back to the default value +client.set_startinfo( + name: 'ruby gamer', + clan: '', + country: -1, + body: 'spiky', + marking: 'duodonny', + decoration: '', + hands: 'standard', + feet: 'standard', + eyes: 'standard', + custom_color_body: 0, + custom_color_marking: 0, + custom_color_decoration: 0, + custom_color_hands: 0, + custom_color_feet: 0, + custom_color_eyes: 0, + color_body: 0, + color_marking: 0, + color_decoration: 0, + color_hands: 0, + color_feet: 0, + color_eyes: 0 +) client.connect('localhost', 8303, detach: false) ``` diff --git a/examples/04_player_infos.rb b/examples/04_player_infos.rb index aad3c27..fefbf36 100755 --- a/examples/04_player_infos.rb +++ b/examples/04_player_infos.rb @@ -9,7 +9,7 @@ client = TeeworldsClient.new(verbose: true) # all keys are optional # if not provided they will fall back to the default value -client.set_start_info( +client.set_startinfo( name: 'ruby gamer', clan: '', country: -1,