mirror of
https://github.com/goonstation/goonstation-2016.git
synced 2026-05-18 06:29:01 +01:00
dc4217b498
this is all very alpha please don't hate me too much if i fucked it up
28 lines
925 B
Plaintext
28 lines
925 B
Plaintext
///// FOR EXPORTING DATA TO A SERVER /////
|
|
var/global/stat_server = "http://goonhub.com/parser.php?"
|
|
var/global/server_token = "butt bicycles"
|
|
|
|
// Called in world.dm at new()
|
|
/proc/round_start_data()
|
|
set background = 1
|
|
|
|
var/message[] = new()
|
|
message["token"] = md5(server_token)
|
|
message["round_name"] = url_encode(station_name())
|
|
message["round_server"] = "[(world.port % 1000) / 100]"
|
|
message["round_status"] = "start"
|
|
|
|
world.Export("[stat_server][list2params(message)]")
|
|
|
|
// Called in gameticker.dm at the end of the round.
|
|
/proc/round_end_data(var/reason)
|
|
set background = 1
|
|
|
|
var/message[] = new()
|
|
message["token"] = md5(server_token)
|
|
message["round_server"] = "[(world.port % 1000) / 100]"
|
|
message["round_status"] = "end"
|
|
message["end_reason"] = reason
|
|
message["game_type"] = ticker && ticker.mode ? ticker.mode.name : "pre"
|
|
|
|
world.Export("[stat_server][list2params(message)]") |