Skip to content

Commit

Permalink
Moves all of our tooling to the Daedalus name. (#12)
Browse files Browse the repository at this point in the history
* daedalussy

* Updates hub status to look sexier uwu
  • Loading branch information
Kapu1178 authored Aug 14, 2022
1 parent 4051909 commit 53f0a96
Show file tree
Hide file tree
Showing 26 changed files with 61 additions and 103 deletions.
10 changes: 5 additions & 5 deletions .dockerignore
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,11 @@ cfg
data
SQL
node_modules
pariah.dmb
pariah.int
pariah.rsc
pariah.lk
pariah.dyn.rsc
daedalus.dmb
daedalus.int
daedalus.rsc
daedalus.lk
daedalus.dyn.rsc
*.dll
Dockerfile
tools/bootstrap/.cache
13 changes: 1 addition & 12 deletions .github/guides/DOWNLOADING.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,6 @@ Option 1:
Follow this: https://www.tgstation13.org/wiki/Setting_up_git

Option 2: Download the source code as a zip by clicking the ZIP button in the
code tab of https://github.com/tgstation/tgstation
code tab of https://github.com/DaedalusDock/Gameserver
(note: this will use a lot of bandwidth if you wish to update and is a lot of
hassle if you want to make any changes at all, so it's not recommended.)

Option 3: Download a pre-compiled nightly at https://tgstation13.download/nightlies/ (same caveats as option 2)

*Warning: option 4 is out of date, and not maintained, use at your own risk*

Option 4: Use our docker image that tracks the master branch (See commits for build status. Again, same caveats as option 2)

```
docker run -d -p <your port>:1337 -v /path/to/your/config:/tgstation/config -v /path/to/your/data:/tgstation/data tgstation/tgstation <dream daemon options i.e. -public or -params>
```

6 changes: 3 additions & 3 deletions .github/guides/RUNNING_A_SERVER.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ Double-click `BUILD.bat` in the root directory of the source code. This'll take
a little while, and if everything's done right you'll get a message like this:

```
saving pariah.dmb (DEBUG mode)
pariah.dmb - 0 errors, 0 warnings
saving daedalus.dmb (DEBUG mode)
daedalus.dmb - 0 errors, 0 warnings
```

If you see any errors or warnings, something has gone wrong - possibly a corrupt
Expand Down Expand Up @@ -43,7 +43,7 @@ and install it themselves. Directions can be found at the [rust-g
repo](https://github.com/tgstation/rust-g).

Finally, to start the server, run Dream Daemon and enter the path to your
compiled pariah.dmb file. Make sure to set the port to the one you
compiled daedalus.dmb file. Make sure to set the port to the one you
specified in the config.txt, and set the Security box to 'Safe'. Then press GO
and the server should start up and be ready to join. It is also recommended that
you set up the SQL backend (see below).
Expand Down
2 changes: 1 addition & 1 deletion .github/guides/STANDARDS.md
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ Instead you can use object orientation, or simply placing repeated code in a fun

### Prefer `Initialize()` over `New()` for atoms

Our game controller is pretty good at handling long operations and lag, but it can't control what happens when the map is loaded, which calls `New` for all atoms on the map. If you're creating a new atom, use the `Initialize` proc to do what you would normally do in `New`. This cuts down on the number of proc calls needed when the world is loaded. See here for details on `Initialize`: https://github.com/tgstation/tgstation/blob/34775d42a2db4e0f6734560baadcfcf5f5540910/code/game/atoms.dm#L166
Our game controller is pretty good at handling long operations and lag, but it can't control what happens when the map is loaded, which calls `New` for all atoms on the map. If you're creating a new atom, use the `Initialize` proc to do what you would normally do in `New`. This cuts down on the number of proc calls needed when the world is loaded. See here for details on `Initialize`: https://github.com/DaedalusDock/Gameserver/blob/34775d42a2db4e0f6734560baadcfcf5f5540910/code/game/atoms.dm#L166
While we normally encourage (and in some cases, even require) bringing out of date code up to date when you make unrelated changes near the out of date code, that is not the case for `New` -> `Initialize` conversions. These systems are generally more dependent on parent and children procs so unrelated random conversions of existing things can cause bugs that take months to figure out.

### Files
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ci_suite.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ jobs:
tools/bootstrap/python -c ''
- name: Run Linters
run: |
bash tools/ci/check_filedirs.sh pariah.dme
bash tools/ci/check_filedirs.sh daedalus.dme
bash tools/ci/check_changelogs.sh
bash tools/ci/check_grep.sh
bash tools/ci/check_misc.sh
Expand Down
4 changes: 2 additions & 2 deletions .vscode/tasks.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,12 @@
},
{
"type": "dreammaker",
"dme": "pariah.dme",
"dme": "daedalus.dme",
"problemMatcher": [
"$dreammaker"
],
"group": "build",
"label": "dm: build - pariah.dme"
"label": "dm: build - daedalus.dme"
},
{
"command": "${command:dreammaker.reparse}",
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -80,5 +80,5 @@ COPY --from=build /deploy ./
COPY --from=rust_g /rust_g/target/i686-unknown-linux-gnu/release/librust_g.so ./librust_g.so

VOLUME [ "/tgstation/config", "/tgstation/data" ]
ENTRYPOINT [ "DreamDaemon", "pariah.dmb", "-port", "1337", "-trusted", "-close", "-verbose" ]
ENTRYPOINT [ "DreamDaemon", "daedalus.dmb", "-port", "1337", "-trusted", "-close", "-verbose" ]
EXPOSE 1337
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ On **2021-01-04**, /TG/station changed the way to compile the codebase.

**The quick way**. Find `bin/server.cmd` in this folder and double click it to automatically build and host the server on port 1337.

**The long way**. Find `bin/build.cmd` in this folder, and double click it to initiate the build. It consists of multiple steps and might take around 1-5 minutes to compile. If it closes, it means it has finished its job. You can then [setup the server](.github/guides/RUNNING_A_SERVER.md) normally by opening `pariah.dmb` in DreamDaemon.
**The long way**. Find `bin/build.cmd` in this folder, and double click it to initiate the build. It consists of multiple steps and might take around 1-5 minutes to compile. If it closes, it means it has finished its job. You can then [setup the server](.github/guides/RUNNING_A_SERVER.md) normally by opening `daedalus.dmb` in DreamDaemon.

**Building tgstation in DreamMaker directly is now deprecated and might produce errors**, such as `'tgui.bundle.js': cannot find file`.

Expand All @@ -46,9 +46,9 @@ On **2021-01-04**, /TG/station changed the way to compile the codebase.

## LICENSE

All code after [commit 333c566b88108de218d882840e61928a9b759d8f on 2014/31/12 at 4:38 PM PST](https://github.com/tgstation/tgstation/commit/333c566b88108de218d882840e61928a9b759d8f) is licensed under [GNU AGPL v3](https://www.gnu.org/licenses/agpl-3.0.html).
All code after [commit 333c566b88108de218d882840e61928a9b759d8f on 2014/31/12 at 4:38 PM PST](https://github.com/DaedalusDock/Gameserver/commit/333c566b88108de218d882840e61928a9b759d8f) is licensed under [GNU AGPL v3](https://www.gnu.org/licenses/agpl-3.0.html).

All code before [commit 333c566b88108de218d882840e61928a9b759d8f on 2014/31/12 at 4:38 PM PST](https://github.com/tgstation/tgstation/commit/333c566b88108de218d882840e61928a9b759d8f) is licensed under [GNU GPL v3](https://www.gnu.org/licenses/gpl-3.0.html).
All code before [commit 333c566b88108de218d882840e61928a9b759d8f on 2014/31/12 at 4:38 PM PST](https://github.com/DaedalusDock/Gameserver/commit/333c566b88108de218d882840e61928a9b759d8f) is licensed under [GNU GPL v3](https://www.gnu.org/licenses/gpl-3.0.html).
(Including tools unless their readme specifies otherwise.)

See LICENSE and GPLv3.txt for more details.
Expand Down
2 changes: 1 addition & 1 deletion SpacemanDMM.toml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
environment = "pariah.dme"
environment = "daedalus.dme"

[langserver]
dreamchecker = true
Expand Down
1 change: 0 additions & 1 deletion code/__DEFINES/time.dm
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
///displays the current time into the round, with a lot of extra code just there for ensuring it looks okay after an entire day passes
#define ROUND_TIME ( "[world.time - SSticker.round_start_time > MIDNIGHT_ROLLOVER ? "[round((world.time - SSticker.round_start_time)/MIDNIGHT_ROLLOVER)]:[worldtime2text()]" : worldtime2text()]" )


#define JANUARY 1
#define FEBRUARY 2
#define MARCH 3
Expand Down
8 changes: 4 additions & 4 deletions code/controllers/configuration/entries/general.dm
Original file line number Diff line number Diff line change
Expand Up @@ -278,16 +278,16 @@
/datum/config_entry/string/banappeals

/datum/config_entry/string/wikiurl
default = "https://wiki.pariahstation.org/index.php/Main_Page"
default = "https://daedalus13.net/"

/datum/config_entry/string/forumurl
default = "https://discord.gg/96dfjqwfVM" /// Until we actually get a forum, we will use this as a placeholder.
default = "https://daedalus13.net/" /// Until we actually get a forum, we will use this as a placeholder.

/datum/config_entry/string/rulesurl
default = "https://wiki.pariahstation.org/index.php/Our_Rules"
default = "https://daedalus13.net/"

/datum/config_entry/string/githuburl
default = "https://github.com/pariahstation/Pariah-Station"
default = "https://github.com/DaedalusDock/Gameserver"

/datum/config_entry/string/discordbotcommandprefix
default = "?"
Expand Down
2 changes: 1 addition & 1 deletion code/datums/helper_datums/getrev.dm
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@

/datum/getrev/proc/get_log_message()
var/list/msg = list()
msg += "Running Pariah revision: [date]"
msg += "Running Daedalus Dock revision: [date]"
if(originmastercommit)
msg += "origin/master: [originmastercommit]"

Expand Down
54 changes: 12 additions & 42 deletions code/game/world.dm
Original file line number Diff line number Diff line change
Expand Up @@ -294,56 +294,26 @@ GLOBAL_VAR(restart_counter)
..()

/world/proc/update_status()

var/list/features = list()

if(LAZYACCESS(SSlag_switch.measures, DISABLE_NON_OBSJOBS))
features += "closed"

var/s = ""
var/hostedby
var/new_status = ""
if(config)
var/server_name = CONFIG_GET(string/servername)
if (server_name)
s += "<b>[server_name]</b> "
features += "[CONFIG_GET(flag/norespawn) ? "no " : ""]respawn"
if(CONFIG_GET(flag/allow_ai))
features += "AI allowed"
hostedby = CONFIG_GET(string/hostedby)

if (CONFIG_GET(flag/station_name_in_hub_entry))
s += " &#8212; <b>[station_name()]</b>"

s += " ("
s += "<a href=\"https://pariahstation.org/\">" //Change this to wherever you want the hub to link to.
s += "Website" //Replace this with something else. Or ever better, delete it and uncomment the game version.
s += "</a>"
s += ")"
var/website_url = CONFIG_GET(string/forumurl)
if(server_name)
new_status += "<b>[website_url ? server_name : "<a href=\"[website_url]\">[server_name]</a>"]</b>]"
new_status += " — (<a href=\"https://discord.daedalus13.net\">Discord</a>) — (<a href =\"https://github.com/DaedalusDock/Gameserver\">Code</a>)"

var/players = GLOB.clients.len

var/popcaptext = ""
var/popcap = max(CONFIG_GET(number/extreme_popcap), CONFIG_GET(number/hard_popcap), CONFIG_GET(number/soft_popcap))
if (popcap)
popcaptext = "/[popcap]"

if (players > 1)
features += "[players][popcaptext] players"
else if (players > 0)
features += "[players][popcaptext] player"

game_state = (CONFIG_GET(number/extreme_popcap) && players >= CONFIG_GET(number/extreme_popcap)) //tells the hub if we are full

if (!host && hostedby)
features += "hosted by <b>[hostedby]</b>"

if (features)
s += ": [jointext(features, ", ")]"

s += "<br>Round time: <b>[gameTimestamp("hh:mm")]</b>"
s += "<br>Alert level: <b>[capitalize(get_security_level())]</b>"
new_status += "<br><i>Running custom code!</i><br>"
if(SSmapping.config)
new_status += "<br>Map: <b>[SSmapping.config.map_path == CUSTOM_MAP_PATH ? "Uncharted Territory" : SSmapping.config.map_name]</b>"
if(SSticker.current_state >= GAME_STATE_PLAYING)
new_status += "<br>Active Users: <b>[get_active_player_count()]</b>"

status = s
new_status += "<br>\[Round Time: <b>[SSticker.round_start_timeofday ? time2text(REALTIMEOFDAY - SSticker.round_start_timeofday, "hh:mm:ss", 0) : "The round hasn't started yet!"]</b>"
status = new_status

/world/proc/update_hub_visibility(new_visibility)
if(new_visibility == GLOB.hub_visibility)
Expand Down
2 changes: 1 addition & 1 deletion code/modules/mapping/mapping_helpers.dm
Original file line number Diff line number Diff line change
Expand Up @@ -402,7 +402,7 @@ INITIALIZE_IMMEDIATE(/obj/effect/mapping_helpers/no_lava)
icon_state = "sound"
///This is the var that will be set with the fetched sound.
var/target_variable = "hitsound"
///This should return raw sound in response to http get request. For example: "https://github.com/tgstation/tgstation/blob/master/sound/misc/bang.ogg?raw=true"
///This should return raw sound in response to http get request. For example: "https://github.com/DaedalusDock/Gameserver/blob/master/sound/misc/bang.ogg?raw=true"
var/sound_url
///The sound file we fetched from the http get request.
var/sound_file
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -255,7 +255,7 @@ This will not clean any inverted reagents. Inverted reagents will still be corre
say("This [src] is missing an output beaker!")
return
if(processing_reagents)
say("You shouldn't be seeing this message! Please report this bug to https://github.com/tgstation/tgstation/issues . Thank you!")
say("You shouldn't be seeing this message! Please report this bug to https://github.com/DaedalusDock/Gameserver/issues . Thank you!")
stack_trace("Someone managed to break the HPLC and tried to get it to activate when it's already activated!")
return
processing_reagents = TRUE
Expand Down
2 changes: 1 addition & 1 deletion code/modules/surgery/organs/helpers.dm
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
* This will return a list of all the organs that are relevant to the zone that is passedin
*
* Arguments:
* * zone [a BODY_ZONE_X define](https://github.com/tgstation/tgstation/blob/master/code/__DEFINES/combat.dm#L187-L200)
* * zone [a BODY_ZONE_X define](https://github.com/DaedalusDock/Gameserver/blob/master/code/__DEFINES/combat.dm#L187-L200)
*/
/mob/proc/getorganszone(zone)
return
Expand Down
6 changes: 3 additions & 3 deletions code/modules/unit_tests/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

## What is unit testing?

Unit tests are automated code to verify that parts of the game work exactly as they should. For example, [a test to make sure that the amputation surgery actually amputates the limb](https://github.com/tgstation/tgstation/blob/e416283f162b86345a8623125ab866839b1ac40d/code/modules/unit_tests/surgeries.dm#L1-L13). These are ran every time a PR is made, and thus are very helpful for preventing bugs from cropping up in your code that would've otherwise gone unnoticed. For example, would you have thought to check [that beach boys would still work the same after editing pizza](https://github.com/tgstation/tgstation/pull/53641#issuecomment-691384934)? If you value your time, probably not.
Unit tests are automated code to verify that parts of the game work exactly as they should. For example, [a test to make sure that the amputation surgery actually amputates the limb](https://github.com/DaedalusDock/Gameserver/blob/e416283f162b86345a8623125ab866839b1ac40d/code/modules/unit_tests/surgeries.dm#L1-L13). These are ran every time a PR is made, and thus are very helpful for preventing bugs from cropping up in your code that would've otherwise gone unnoticed. For example, would you have thought to check [that beach boys would still work the same after editing pizza](https://github.com/DaedalusDock/Gameserver/pull/53641#issuecomment-691384934)? If you value your time, probably not.

On their most basic level, when `UNIT_TESTS` is defined, all subtypes of `/datum/unit_test` will have their `Run` proc executed. From here, if `Fail` is called at any point, then the tests will report as failed.

Expand Down Expand Up @@ -39,11 +39,11 @@ Open `code/_compile_options.dm` and uncomment the following line.
//#define UNIT_TESTS //If this is uncommented, we do a single run though of the game setup and tear down process with unit tests in between
```

Then, run pariah.dmb in Dream Daemon. Don't bother trying to connect, you won't need to. You'll be able to see the outputs of all the tests. You'll get to see which tests failed and for what reason. If they all pass, you're set!
Then, run daedalus.dmb in Dream Daemon. Don't bother trying to connect, you won't need to. You'll be able to see the outputs of all the tests. You'll get to see which tests failed and for what reason. If they all pass, you're set!

## How to think about tests

Unit tests exist to prevent bugs that would happen in a real game. Thus, they should attempt to emulate the game world wherever possible. For example, the [quick swap sanity test](https://github.com/tgstation/tgstation/blob/e416283f162b86345a8623125ab866839b1ac40d/code/modules/unit_tests/quick_swap_sanity.dm) emulates a *real* scenario of the bug it fixed occurring by creating a character and giving it real items. The unrecommended alternative would be to create special test-only items. This isn't a hard rule, the [reagent method exposure tests](https://github.com/tgstation/tgstation/blob/e416283f162b86345a8623125ab866839b1ac40d/code/modules/unit_tests/reagent_mod_expose.dm) create a test-only reagent for example, but do keep it in mind.
Unit tests exist to prevent bugs that would happen in a real game. Thus, they should attempt to emulate the game world wherever possible. For example, the [quick swap sanity test](https://github.com/DaedalusDock/Gameserver/blob/e416283f162b86345a8623125ab866839b1ac40d/code/modules/unit_tests/quick_swap_sanity.dm) emulates a *real* scenario of the bug it fixed occurring by creating a character and giving it real items. The unrecommended alternative would be to create special test-only items. This isn't a hard rule, the [reagent method exposure tests](https://github.com/DaedalusDock/Gameserver/blob/e416283f162b86345a8623125ab866839b1ac40d/code/modules/unit_tests/reagent_mod_expose.dm) create a test-only reagent for example, but do keep it in mind.

Unit tests should also be just that--testing *units* of code. For example, instead of having one massive test for reagents, there are instead several smaller tests for testing exposure, metabolization, etc.

Expand Down
14 changes: 7 additions & 7 deletions config/config.txt
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,13 @@ $include pariah/pariah_config.txt
# There are various options which are hard-locked for security reasons.

## Server name: This appears at the top of the screen in-game and in the BYOND hub. Uncomment and replace 'tgstation' with the name of your choice.
SERVERNAME Pariah Station
SERVERNAME Daedalus Dock

## Server SQL name: This is the name used to identify the server to the SQL DB, distinct from SERVERNAME as it must be at most 32 characters.
SERVERSQLNAME pariahstation
SERVERSQLNAME daedalusdock

## Station name: The name of the station as it is referred to in-game. If commented out, the game will generate a random name instead.
STATIONNAME Space Station 13
STATIONNAME Daedalus Outpost

## Put on byond hub: Uncomment this to put your server on the byond hub.
#HUB
Expand Down Expand Up @@ -253,16 +253,16 @@ CHECK_RANDOMIZER
# SERVER ss13.example.com:2506

## forum address
# FORUMURL http://tgstation13.org/phpBB/index.php
# FORUMURL https://daedalus13.net/

## Wiki address
# WIKIURL http://www.tgstation13.org/wiki
# WIKIURL https://daedalus13.net/

## Rules address
# RULESURL http://www.tgstation13.org/wiki/Rules
# RULESURL https://daedalus13.net/

## Github address
GITHUBURL https://github.com/Tokorizo/Pariah-Station
GITHUBURL https://github.com/DaedalusDock/Gameserver

## Discord bot command prefix, if the discord bot is used
# DISCORDBOTCOMMANDPREFIX ?
Expand Down
4 changes: 2 additions & 2 deletions config/motd.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<!-- Most valid html will work in here, excluding images. -->

<h1>Welcome to Pariah Station!</h1>
<h1>Welcome to Daedalus Dock!</h1>

<i>This server is running a /tg/station 13 Git build.</i>
<i>This server is running a crafted with care lovechild of Baystation12 and TGStation.</i>

<i>Enjoy your stay!</i>
2 changes: 1 addition & 1 deletion pariah.dme → daedalus.dme
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// DM Environment file for pariah.dme.
// DM Environment file for daedalus.dme.
// All manual changes should be made outside the BEGIN_ and END_ blocks.
// New source code should be placed in .dm files: choose File/New --> Code File.
// BEGIN_INTERNALS
Expand Down
8 changes: 4 additions & 4 deletions tools/Upload tgstation.rsc to external FTP/upload_rsc.bat
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
@REM Script to easily upload pariah.rsc to your FTP-server so that clients download it from an
@REM Script to easily upload daedalus.rsc to your FTP-server so that clients download it from an
@REM external webserver instead of from your connection when joining your game server.
@REM
@REM Run this script every time you have compiled your code, otherwise joining players will get errors.
@REM
@REM Replace USERNAME with your FTP username
@REM Replace PASSWORD with your FTP password
@REM Replace FOLDER/FOLDER with the folder on the FTP server where you want to store pariah.rsc, for example: cd www/rsc
@REM Replace FOLDER/FOLDER with the folder on the FTP server where you want to store daedalus.rsc, for example: cd www/rsc
@REM Replace FTP.DOMAIN.COM with the IP-address or domain name of your FTP server
@REM Add the URL to the location of pariah.rsc on your webserver into data\external_rsc_urls.txt
@REM Add the URL to the location of daedalus.rsc on your webserver into data\external_rsc_urls.txt
@REM
@echo off
echo user USERNAME> ftpcmd.dat
echo PASSWORD>> ftpcmd.dat
echo bin>> ftpcmd.dat
echo cd FOLDER/FOLDER>> ftpcmd.dat
echo put ..\..\pariah.rsc>> ftpcmd.dat
echo put ..\..\daedalus.rsc>> ftpcmd.dat
echo quit>> ftpcmd.dat
ftp -n -s:ftpcmd.dat FTP.DOMAIN.COM
del ftpcmd.dat
Loading

0 comments on commit 53f0a96

Please sign in to comment.