Skip to content

Commit

Permalink
Some miscellaneous fixes (shiptest-ss13#389)
Browse files Browse the repository at this point in the history
* DME

* AREAS

* SLEEPERS

* MONOCHROMACY

* Update ci_suite.yml

* SECOND

* Valid

* Update ci_suite.yml

Fix names

* add shiptest stuff to docker ignore

* update dockerfile for new dme name

* update comment

* update run and compile tasks

* resolve incorrect deploy mapping

Co-authored-by: Zephyr <[email protected]>
Co-authored-by: Matthew <[email protected]>
  • Loading branch information
3 people authored Nov 4, 2021
1 parent 91fc1d1 commit 67bf225
Show file tree
Hide file tree
Showing 18 changed files with 81 additions and 74 deletions.
5 changes: 5 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,11 @@ tgstation.int
tgstation.rsc
tgstation.lk
tgstation.dyn.rsc
shiptest.dmb
shiptest.int
shiptest.rsc
shiptest.lk
shiptest.dyn.rsc
*.dll
Dockerfile
tools/bootstrap/.cache
6 changes: 3 additions & 3 deletions .github/workflows/ci_suite.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ jobs:
tools/bootstrap/python -c ''
- name: Run Linters
run: |
bash tools/ci/check_filedirs.sh tgstation.dme
bash tools/ci/check_filedirs.sh shiptest.dme
bash tools/ci/check_changelogs.sh
find . -name "*.php" -print0 | xargs -0 -n1 php -l
find . -name "*.json" -not -path "*/node_modules/*" -print0 | xargs -0 python3 ./tools/json_verifier.py
Expand Down Expand Up @@ -72,7 +72,7 @@ jobs:
source $HOME/BYOND/byond/bin/byondsetup
python3 tools/ci/template_dm_generator.py
tgui/bin/tgui --build
bash tools/ci/dm.sh -DCIBUILDING -DCITESTING -DALL_MAPS tgstation.dme
bash tools/ci/dm.sh -DCIBUILDING -DCITESTING -DALL_MAPS shiptest.dme
run_all_tests:
name: Integration Tests
Expand Down Expand Up @@ -116,7 +116,7 @@ jobs:
run: |
source $HOME/BYOND/byond/bin/byondsetup
tgui/bin/tgui --build
bash tools/ci/dm.sh -DCIBUILDING tgstation.dme
bash tools/ci/dm.sh -DCIBUILDING shiptest.dme
bash tools/ci/run_server.sh
test_windows:
Expand Down
4 changes: 2 additions & 2 deletions .vscode/tasks.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,12 @@
},
{
"type": "dreammaker",
"dme": "tgstation.dme",
"dme": "shiptest.dme",
"problemMatcher": [
"$dreammaker"
],
"group": "build",
"label": "dm: build - tgstation.dme"
"label": "dm: build - shiptest.dme"
},
{
"type": "shell",
Expand Down
12 changes: 6 additions & 6 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,9 @@ RUN . ./dependencies.sh \
&& cd .. \
&& rm -rf byond byond.zip

# build = byond + tgstation compiled and deployed to /deploy
# build = byond + shiptest compiled and deployed to /deploy
FROM byond AS build
WORKDIR /tgstation
WORKDIR /shiptest

RUN apt-get install -y --no-install-recommends \
curl
Expand Down Expand Up @@ -71,17 +71,17 @@ RUN . ./dependencies.sh \

# final = byond + runtime deps + rust_g + build
FROM byond
WORKDIR /tgstation
WORKDIR /shiptest

RUN apt-get install -y --no-install-recommends \
libssl1.0.0:i386 \
zlib1g:i386
#auxtools fexists memes
RUN ln -s /tgstation/auxtools/libauxmos.so /root/.byond/bin/libauxmos.so
RUN ln -s /shiptest/auxtools/libauxmos.so /root/.byond/bin/libauxmos.so

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", "tgstation.dmb", "-port", "1337", "-trusted", "-close", "-verbose" ]
VOLUME [ "/shiptest/config", "/shiptest/data" ]
ENTRYPOINT [ "DreamDaemon", "shiptest.dmb", "-port", "1337", "-trusted", "-close", "-verbose" ]
EXPOSE 1337
4 changes: 2 additions & 2 deletions code/datums/status_effects/debuffs.dm
Original file line number Diff line number Diff line change
Expand Up @@ -530,7 +530,7 @@
return FALSE
RegisterSignal(owner, COMSIG_MOVABLE_HEAR, .proc/hypnotize)
ADD_TRAIT(owner, TRAIT_MUTE, "trance")
owner.add_client_colour(/datum/client_colour/monochrome/trance)
owner.add_client_colour(/datum/client_colour/monochrome)
owner.visible_message("[stun ? "<span class='warning'>[owner] stands still as [owner.p_their()] eyes seem to focus on a distant point.</span>" : ""]", \
"<span class='warning'>[pick("You feel your thoughts slow down...", "You suddenly feel extremely dizzy...", "You feel like you're in the middle of a dream...","You feel incredibly relaxed...")]</span>")
return TRUE
Expand All @@ -544,7 +544,7 @@
UnregisterSignal(owner, COMSIG_MOVABLE_HEAR)
REMOVE_TRAIT(owner, TRAIT_MUTE, "trance")
owner.dizziness = 0
owner.remove_client_colour(/datum/client_colour/monochrome/trance)
owner.remove_client_colour(/datum/client_colour/monochrome)
to_chat(owner, "<span class='warning'>You snap out of your trance!</span>")

/datum/status_effect/trance/proc/hypnotize(datum/source, list/hearing_args)
Expand Down
2 changes: 1 addition & 1 deletion code/datums/traits/neutral.dm
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@
medical_record_text = "Patient is afflicted with almost complete color blindness."

/datum/quirk/monochromatic/add()
quirk_holder.add_client_colour(/datum/client_colour/monochrome)
quirk_holder.add_client_colour(/datum/client_colour/monochrome/blind/permanent)

/datum/quirk/monochromatic/post_add()
if(quirk_holder.mind.assigned_role == "Detective")
Expand Down
5 changes: 1 addition & 4 deletions code/modules/client/client_colour.dm
Original file line number Diff line number Diff line change
Expand Up @@ -192,10 +192,7 @@
fade_in = 20
fade_out = 20

/datum/client_colour/monochrome/trance
priority = PRIORITY_ABSOLUTE

/datum/client_colour/monochrome/blind
/datum/client_colour/monochrome/blind/permanent //For the permanently colorblind
priority = PRIORITY_ABSOLUTE

/datum/client_colour/bloodlust
Expand Down
2 changes: 1 addition & 1 deletion tgstation.dme → shiptest.dme
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
g// DM Environment file for tgstation.dme.
g// DM Environment file for shiptest.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
62 changes: 31 additions & 31 deletions tools/TGUICompiler.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
//MOVE (not copy) the node_modules folder next to this file
try{
//CONFIG
$repo_dir = 'tgstation';
$repo_dir = 'shiptest';
$path_to_tgui_from_repo = '/tgui';
$full_path_to_gulp = 'C:/Users/Cyberboss/AppData/Roaming/npm/gulp'; //this needs to be read/executable by the PHP app pool
$max_number_of_uploads = 20;
Expand Down Expand Up @@ -44,50 +44,50 @@ function extrapolate_git_url(){
}

function download_file($path){
header('Content-type: application/zip');
header('Content-type: application/zip');
header('Content-Disposition: attachment; filename=' . basename($path));
header('Content-length: ' . filesize($path));
header('Pragma: no-cache');
header('Expires: 0');
header('Pragma: no-cache');
header('Expires: 0');
readfile($path);
}

function recurse_copy($src,$dst) {
$dir = opendir($src);
@mkdir($dst);
while(false !== ( $file = readdir($dir)) ) {
if (( $file != '.' ) && ( $file != '..' )) {
if ( is_dir($src . '/' . $file) ) {
recurse_copy($src . '/' . $file,$dst . '/' . $file);
}
else {
copy($src . '/' . $file,$dst . '/' . $file);
}
}
}
closedir($dir);
}

function rrmdir($dir) {
if (is_dir($dir)) {
$objects = scandir($dir);
foreach ($objects as $object) {
if ($object != "." && $object != "..") {
function recurse_copy($src,$dst) {
$dir = opendir($src);
@mkdir($dst);
while(false !== ( $file = readdir($dir)) ) {
if (( $file != '.' ) && ( $file != '..' )) {
if ( is_dir($src . '/' . $file) ) {
recurse_copy($src . '/' . $file,$dst . '/' . $file);
}
else {
copy($src . '/' . $file,$dst . '/' . $file);
}
}
}
closedir($dir);
}

function rrmdir($dir) {
if (is_dir($dir)) {
$objects = scandir($dir);
foreach ($objects as $object) {
if ($object != "." && $object != "..") {
if (is_dir($dir."/".$object))
rrmdir($dir."/".$object);
else
unlink($dir."/".$object);
}
unlink($dir."/".$object);
}
}
rmdir($dir);
}
rmdir($dir);
}
}

function update_git(){
global $tgdir;
shell_exec('cd ' . $tgdir . ' && git pull');
}

$full_path_to_gulp = str_replace('/', '\\', $full_path_to_gulp);
$parent_dir = str_replace('\\', '/', realpath(dirname(__FILE__)));
$tgdir = $parent_dir . '/' . $repo_dir;
Expand Down Expand Up @@ -137,7 +137,7 @@ function update_git(){
unlink($target_name); //remove the file
move_uploaded_file($F['tmp_name'], $target_name);
}

//compile
$command = '"' . $full_path_to_gulp . '" --cwd "' . str_replace('/', '\\', $target_path) . '" --min 2>&1';
$output = shell_exec($command);
Expand Down
8 changes: 4 additions & 4 deletions tools/build/build.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,9 +49,9 @@ const taskDm = new Task('dm')
.depends('tgui/public/tgui.html')
.depends('tgui/public/*.bundle.*')
.depends('tgui/public/*.chunk.*')
.depends('tgstation.dme')
.provides('tgstation.dmb')
.provides('tgstation.rsc')
.depends('shiptest.dme')
.provides('shiptest.dmb')
.provides('shiptest.rsc')
.build(async () => {
let compiler = 'dm';
// Let's do some registry queries on Windows, because dm is not in PATH.
Expand All @@ -70,7 +70,7 @@ const taskDm = new Task('dm')
} else {
compiler = 'DreamMaker';
}
await exec(compiler, ['tgstation.dme']);
await exec(compiler, ['shiptest.dme']);
});

// Frontend
Expand Down
2 changes: 1 addition & 1 deletion tools/ci/build.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,5 @@ if(!(Test-Path -Path "C:/byond")){
bash tools/ci/install_node.sh
bash tgui/bin/tgui --build

&"C:/byond/bin/dm.exe" -max_errors 0 tgstation.dme
&"C:/byond/bin/dm.exe" -max_errors 0 shiptest.dme
exit $LASTEXITCODE
2 changes: 1 addition & 1 deletion tools/ci/run_server.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ mkdir ci_test/config
cp tools/ci/ci_config.txt ci_test/config/config.txt

cd ci_test
DreamDaemon tgstation.dmb -close -trusted -verbose -params "log-directory=ci" || EXIT_CODE=$?
DreamDaemon shiptest.dmb -close -trusted -verbose -params "log-directory=ci" || EXIT_CODE=$?

cd ..
cat ci_test/data/logs/ci/clean_run.lk
2 changes: 1 addition & 1 deletion tools/deploy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ if [ -d ".git" ]; then
cp -r .git/logs/* $1/.git/logs/
fi

cp tgstation.dmb tgstation.rsc $1/
cp shiptest.dmb shiptest.rsc $1/
cp -r _maps/* $1/_maps/
cp -r icons/runtime/* $1/icons/runtime/
cp -r sound/runtime/* $1/sound/runtime/
Expand Down
6 changes: 3 additions & 3 deletions tools/expand_filedir_paths.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
def read_filedirs(filename):
result = []
dme_file = file(filename, "rt")

# Read each line from the file and check for regex pattern match
for row in dme_file:
match = filedir_pattern.match(row)
Expand Down Expand Up @@ -63,7 +63,7 @@ def replace_func(name):
else:
replacement = name.group(1)
return "'" + replacement + "'"

# Search recursively for all .dm and .dmm files
for (dirpath, dirs, files) in os.walk("."):
for name in files:
Expand All @@ -88,6 +88,6 @@ def replace_func(name):
os.remove(path)
os.rename(path + ".tmp", path)

dirs = read_filedirs("tgstation.dme");
dirs = read_filedirs("shiptest.dme");
resources = index_files(dirs)
rewrite_sources(resources)
4 changes: 2 additions & 2 deletions tools/linux_build.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ def stage2(map):
txt = "-M{}".format(map)
else:
txt = ''
args = "bash tools/travis/dm.sh {} tgstation.dme".format(txt)
args = "bash tools/travis/dm.sh {} shiptest.dme".format(txt)
print(args)
p = subprocess.Popen(args, shell=True)
wait(p)
Expand All @@ -42,7 +42,7 @@ def stage3(profile_mode=False):
play("sound/misc/compiler-stage2.ogg")
logfile = open('server.log~','w')
p = subprocess.Popen(
"DreamDaemon tgstation.dmb 25001 -trusted",
"DreamDaemon shiptest.dmb 25001 -trusted",
shell=True, stdout=PIPE, stderr=STDOUT)
try:
while p.returncode is None:
Expand Down
4 changes: 2 additions & 2 deletions tools/tgs4_scripts/PreCompile.bat
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ set TG_BOOTSTRAP_CACHE=%cd%
IF NOT "%1" == "" (
rem TGS4: we are passed the game directory on the command line
cd %1
) ELSE IF EXIST "..\Game\B\tgstation.dmb" (
rem TGS3: Game/B/tgstation.dmb exists, so build in Game/A
) ELSE IF EXIST "..\Game\B\shiptest.dmb" (
rem TGS3: Game/B/shiptest.dmb exists, so build in Game/A
cd ..\Game\A
) ELSE (
rem TGS3: Otherwise build in Game/B
Expand Down
11 changes: 6 additions & 5 deletions whitesands/code/game/area/ship_areas.dm
Original file line number Diff line number Diff line change
Expand Up @@ -298,29 +298,30 @@ NOTE: there are two lists of areas in the end of this file: centcom and station

/// Maintenance Areas ///
/area/ship/maintenance
name = "Maintenance"
ambientsounds = MAINTENANCE
lighting_colour_tube = "#ffe5cb"
lighting_colour_bulb = "#ffdbb4"
sound_environment = SOUND_AREA_TUNNEL_ENCLOSED

/area/ship/maintenance/aft
name = "Aft Hallway"
name = "Aft Maintenance"
icon_state = "amaint"

/area/ship/maintenance/fore
name = "Fore Hallway"
name = "Fore Maintenance"
icon_state = "fmaint"

/area/ship/maintenance/starboard
name = "Starboard Hallway"
name = "Starboard Maintenance"
icon_state = "smaint"

/area/ship/maintenance/port
name = "Port Hallway"
name = "Port Maintenance"
icon_state = "pmaint"

/area/ship/maintenance/central
name = "Central Hallway"
name = "Central Maintenance"
icon_state = "maintcentral"

/area/ship/construction
Expand Down
Loading

0 comments on commit 67bf225

Please sign in to comment.