Austinb / GameQ

A PHP Gameserver Status Query Library
https://austinb.github.io/GameQ/
GNU Lesser General Public License v3.0
404 stars 137 forks source link

Initial class for Stationeers protocol for #659 with tests. #660

Open Austinb opened 2 years ago

Austinb commented 2 years ago

Initial stab at the protocol class for Stationeers with simple tests. Please provide feedback.

Austinb commented 2 years ago

For issue #659

coveralls commented 2 years ago

Coverage Status

Coverage decreased (-0.5%) to 88.015% when pulling f22c42e901bbbb88ca52d9d7a564a8579aac5cfb on features/Stationeers into 44e7906661ae90c68d77005f42cbbf151caea478 on v3.

scrutinizer-notifier commented 2 years ago

The inspection completed: 3 updated code elements

Erani0 commented 2 years ago

Currently you query the list to find the servers but if someone doesn't show his server in the list he will be shown as offline so it's really more advisable to wait for an official support or to enable this via the linked api.

Austinb commented 1 year ago

Well without any information from the game developer it is either this method or no method. It doesn't matter to me but this PR should either be merged or closed to keep things tidy.

Erani0 commented 1 year ago

Please Check its not working! {"35.134.96.237:27016":{"gq_address":"40.82.200.175","gq_dedicated":null,"gq_hostname":null,"gq_joinlink":"","gq_mapname":null,"gq_maxplayers":null,"gq_name":"Stationeers","gq_numplayers":null,"gq_online":false,"gq_password":null,"gq_port_client":27016,"gq_port_query":8081,"gq_protocol":"stationeers","gq_transport":"tcp","gq_type":"stationeers","players":[],"teams":[]}}

Austinb commented 1 year ago

Please Check its not working! {"35.134.96.237:27016":{"gq_address":"40.82.200.175","gq_dedicated":null,"gq_hostname":null,"gq_joinlink":"","gq_mapname":null,"gq_maxplayers":null,"gq_name":"Stationeers","gq_numplayers":null,"gq_online":false,"gq_password":null,"gq_port_client":27016,"gq_port_query":8081,"gq_protocol":"stationeers","gq_transport":"tcp","gq_type":"stationeers","players":[],"teams":[]}}

That server is not listed in the hosting list at http://40.82.200.175:8081/list. I am not sure how you add it to that list but this list is the only known way for getting information for this type of server.

Erani0 commented 1 year ago

5 days later I can not guarantee that the server is still in the list. i tested several servers and none worked

Austinb commented 1 year ago

Using the following code it still does not show the server information for your server.

$gq = \GameQ\GameQ::factory();
$gq->addServer([
    'type' => 'source',
    'host' => '35.134.96.237:27016',
]);
$results = $gq->process();
print_r($results);

According to the post at https://stationeers.fandom.com/wiki/Dedicated_server there is a section for -updateport which is supposed to be the query port for the server. See if you can make a simple query using the parent source protocol work. If so we can move towards that. This is assuming the previous wiki link is accurate with its information.