Coder Social home page Coder Social logo

tgstation13.org's Introduction

tgstation13-website

Website shit for tgstation13.org

tgstation13.org's People

Contributors

81denton avatar affectedarc07 avatar anturk avatar bawhoppen avatar cyberboss avatar daxdupont avatar dragomagol avatar gamer025 avatar iamgoofball avatar jamieh avatar jjrcop avatar jordie0608 avatar kopoba avatar lzimann avatar mothblocks avatar mrstonedone avatar nfreader avatar optimumtact avatar palladinium avatar pjb3005 avatar remierichards avatar shizcalev avatar xdtm avatar zephyrtfa avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

tgstation13.org's Issues

Riding Janicart after fireman carrying doesn't reset offhand status

While fireman carrying a body, I jumped on a janicart to move a bit faster. After getting off of it, I was unable to interact with the medbay fridge with my offhand, with it saying the fridge refuses to accept the offhand.

As per my ahelp reply
'Namely, you may want to note that /obj/item/riding_offhand wasn't removed when you left your janicart.'

(tgdb) Notes.php not updated to newest sql schema

Notes were merged into the messages table, so those lines need to be updated:
https://github.com/tgstation/tgstation13.org/blob/master/tgdb/notes.php#L34 should be 'targetckey LIKE' instead of 'ckey LIKE'

https://github.com/tgstation/tgstation13.org/blob/master/tgdb/notes.php#L40 should be 'text LIKE' instead of 'notetext LIKE'

https://github.com/tgstation/tgstation13.org/blob/master/tgdb/notes.php#L53 should become
$sqlwhere = " WHERE type LIKE 'note' AND ".join(" ".$sqlwheresep." ", $sqlwherea);
to atleast get the notes, although this could be expanded to also get watchlist/messages/idk i guess

https://github.com/tgstation/tgstation13.org/blob/master/tgdb/notes.php#L58
$res = $mysqli->query("SELECT id, targetckey, timestamp, text, adminckey, server FROM ".fmttable("notes").$sqlwhere." ORDER BY timestamp DESC LIMIT ".$limit.";");
(although server doesn't work and i am not too sure why)

https://github.com/tgstation/tgstation13.org/blob/master/tgdb/notes.php#L63
should be $row['targetckey']

https://github.com/tgstation/tgstation13.org/blob/master/tgdb/notes.php#L67
should be $row['text']

server field doesn't appear,that's the only weird thing i've noticed, rest seems to work

Landing page redesign

I'd like to pitch my design before committing to coding it.
Please do let me know of things that need changing! (or if you're against this as a whole)

Notes:

  • Intro-block "What is Space Station 13?" moved to top (for newbies) and made dismissible (for veterans).
  • Background animated (demo), respects prefers-reduced-motion
  • Image with open dropdown here

tgstation redesign

Makeshift Cable Layer has no sprite

I made a Makeshift Cable Layer and there was no sprite but it was there. I picked it up and put it in my bag and it was still spriteless.

Fetching player details fails due to new database schema

When trying to open a players detail page like: https://tgstation13.org/tgdb/playerdetails.php?ckey=Booktower a blank page is returned. Inspecting the response via the developer console shows that the request fails with a 500 Internal Server Error response code. The response is empty, firefox shows a blank page instead of an error message.

If adminobservers have insufficient permissions an error message indicating that should be returned. Additonally, a 500 internal server error response should display an error page, I'm guessing browsers use their own if none is supplied? Currently it responds the full response header followed by a few newlines.

Small error with borgs and APC battery (APC won't load)

Hello,

i found an issue when i was Building a BSA room with the APC behind armory . (room added to plan normaly & power conduit with power).

By using the borg circuit fabricator i builded a basic battery for an APC But it just won't load.
After getting a human to change the battery for a blue space one (fabricated version from science)
it began to function normaly.

That is all if you need futher information please contact me. I'm trying to see if the error will repeat itself.

Vendor trays do not work with food

[Round ID]: Literally any round you trontobringus

Testmerges:

I remember now why I hate making issue reports

Reproduction:

  1. Find a vending tray
  2. Swipe your ID on it (thud)
  3. Try to put a brainburger (your mother's recipe) or any food on it
  4. The tray (display case) tells you to fuck off with that shit

I should also note that you can't put food in the food cart either, making almost all of my food-based RP extremely difficult

Avatar fighting

Chrome, Version 64.0.3282.119 (Official Build) (64-bit), using ublock origin.

Scrolled down the pol 2018 thread page 5, scrolled up a little, my avatar was appearing on XSI's. Mine is a gif, XSI's is a jaypeg. It was similar to Z layer fighting though slow. My gif swaps frame at 100ms, I'm assuming it was flickering between mine and XSI's close to that speed. When I scrolled up more to get a better look, the fighting stopped. It didn't displace XSI's details nor extend the page, but it was being drawn over the web page. I didn't watch it for long enough to make sure it was being drawn over the top of XSI's avatar or to see if it animated like mine. I did see it long enough for me to hope I'm not insane.

For the sake of reference, my and XSI's avatars:
xsi
full raspberry neinhaus colour and shade

Raw float in IGN time report.

It's a minor gripe, but I'm pretty sure the server buttons on the site aren't intended to display "IGN 1.457457457457457..." as a raw number.

Optimize old gamebanner code

https://github.com/tgstation/tgstation13.org/blob/819893ed40d8a4ca06806341686684e980aaf0fb/getserverdata.php

I was messing around with a port I did for this code ages ago and realized that it was terribly unoptimized, so I took a shot at trying to see if I could make it better. I haven't tested the below code at all, but figured I'd throw it here in case someone wanted to update it at some point.

<?php
if (php_sapi_name() != "cli") {
    return;
}

$error = false;

include("serverinfo.php");

function export($addr, $port, $str)
{
    $error = false;
    if ($str{0} !== '?') {
        $str = ('?' . $str);
    }

    $query = "\x00\x83" . pack('n', strlen($str) + 6) . "\x00\x00\x00\x00\x00" . $str . "\x00";
    $server = socket_create(AF_INET, SOCK_STREAM, SOL_TCP);
    stream_set_timeout($server, 2);
    socket_set_option($server, SOL_SOCKET, SO_RCVTIMEO, ['sec' => 2, 'usec' => 0]);
    socket_set_option($server, SOL_SOCKET, SO_SNDTIMEO, ['sec' => 2, 'usec' => 0]);
    if (!socket_connect($server, $addr, $port)) {
        $error = true;
        return "ERROR";
    }

    $bytestosend = strlen($query);
    $bytessent = 0;
    while ($bytessent < $bytestosend) {
        $result = socket_write($server, substr($query, $bytessent), $bytestosend - $bytessent);
        if ($result === FALSE) {
            die(socket_strerror(socket_last_error()));
        }
        $bytessent += $result;
    }

    $result = socket_read($server, 10000, PHP_BINARY_READ);
    socket_close($server);
    if ($result !== "") {
        if ($result{0} === "\x00" || $result{1} === "\x83") {
            $sizebytes = unpack('n', $result{2} . $result{3});
            $size = $sizebytes[1] - 1;

            if ($result{4} === "\x2a") {
                $unpackint = unpack('f', $result{5} . $result{6} . $result{7} . $result{8});
                return $unpackint[1];
            } elseif ($result{4} === "\x06") {
                $unpackstr = "";
                $index = 5;

                while ($size > 0) {
                    $size--;
                    $unpackstr .= $result{$index};
                    $index++;
                }
                return $unpackstr;
            }
        }
    }
    $error = true;
    return "ERROR";
}

// Create arrays for sockets and servers
$sockets = array();
$addresses = array();
foreach ($servers as $server) {
    $address = $server['address'];
    $port = $server['port'];
    $key = "$address:$port";
    $addresses[$key] = $address;
    $sockets[$key] = socket_create(AF_INET, SOCK_DGRAM, SOL_UDP);
    socket_set_nonblock($sockets[$key]);
    socket_connect($sockets[$key], $address, $port);
}

// Set timeout for socket_select
$timeout = array('sec' => 0, 'usec' => 1000);

// Create an array to hold the serverinfo data
$serverinfo = array();

// Check if cache file exists and load data if it does
if (file_exists('serverinfo.json')) {
    $cache = json_decode(file_get_contents('serverinfo.json'), true);
}

// Loop through the sockets and get all the data we can
foreach ($sockets as $key => $socket) {
    $address = $addresses[$key];
    $port = explode(':', $key)[1];

    $lastinfo = (is_array($cache) && count($cache) > $n ? $cache[$n] : array());

    $data = export($address, $port, '?status');
    if (is_string($data)) {
        $data = str_replace("\x00", "", $data);
    }

    $variable_value_array = array();

    if ((!$data || strpos($data, 'ERROR') !== false) && (array_key_exists('restarting', $lastinfo))) {
        $variable_value_array['restarting'] = $lastinfo['restarting'] + 1;
    }

    $data_array = explode('&', $data);

    foreach ($data_array as $row) {
        $parts = explode('=', $row);
        if (isset($parts[1])) {
            $variable_value_array[$parts[0]] = $parts[1];
        } else {
            $variable_value_array[$parts[0]] = null;
        }
    }

    $variable_value_array['cachetime'] = time();

    if (array_key_exists('gamestate', $variable_value_array)) {
        if ($variable_value_array['gamestate'] == 4) {
            $variable_value_array['restarting'] = 1;
        }
    }

    $serverinfo[] = $variable_value_array;
}

$jsonserverinfo = json_encode($serverinfo);
file_put_contents('serverinfo.json', $jsonserverinfo);

// Close sockets
foreach ($sockets as $socket) {
    socket_close($socket);
}

I only thought to come back to this code as I was working on optimizing Civ13's bot code for retrieving players, and remembered that I originally developed it using this repository as an example. https://github.com/VZGCoders/Civilizationbot/blob/c2c37167020c468ba6f15b280413fc9359ddbe27/civ13.php#L803

Looks Very Bland

It couldn't hurt to have a bit of a visual update to the website, because (IMO) it's kind of boring.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.