Skip to content

Commit bd70037

Browse files
Merge branch 'Bleeding-Edge' into surgery-room-improvements
2 parents 8881402 + 7411e5b commit bd70037

File tree

391 files changed

+4632
-1919
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

391 files changed

+4632
-1919
lines changed

.github/workflows/ci.yml

Lines changed: 19 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -38,15 +38,19 @@ jobs:
3838
steps:
3939
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
4040
- uses: actions/checkout@v3
41-
- uses: actions/setup-python@v4
42-
with:
43-
python-version: '3.x'
41+
# - uses: actions/setup-python@v4
42+
# with:
43+
# python-version: '3.x'
44+
45+
- name: Setup Python
46+
run: |
47+
tools/bootstrap/python -c ''
4448
4549
#TODO: Cache Dreamchecker install
4650
- name: Run dreamchecker
4751
run: |
4852
SPACEMAN_DMM_GIT_TAG="suite-1.8" tools/travis/install_spaceman_dmm.sh dreamchecker
49-
~/dreamchecker
53+
~/dreamchecker 2>&1 | bash tools/ci/annotate_dm.sh
5054
5155
- name: Run map checker
5256
run: python tools/travis/check_map_files.py maps/
@@ -59,6 +63,17 @@ jobs:
5963
- name: Make sure test maps or vaults aren't ticked
6064
run: find -name '*.dme' -exec cat {} \; | awk '/maps\\test.*|\.dmm/ { exit 1 }'
6165

66+
# OpenDream linting
67+
- name: Install OpenDream
68+
uses: robinraju/release-downloader@v1.9
69+
with:
70+
repository: "OpenDreamProject/OpenDream"
71+
tag: "latest"
72+
fileName: "DMCompiler_linux-x64.tar.gz"
73+
extract: true
74+
- name: Run OpenDream
75+
run: ./DMCompiler_linux-x64/DMCompiler vgstation13.dme --suppress-unimplemented --define=CIBUILDING | bash tools/ci/annotate_od.sh
76+
6277
build:
6378
name: ${{matrix.job-name}}
6479
runs-on: ubuntu-latest

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,3 +77,6 @@ Thumbs.db
7777

7878
# Bootstrapped node installation for the tgui build system
7979
.cache
80+
81+
# Running OpenDream locally
82+
vgstation13.json

__DEFINES/materials.dm

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@
3333
#define MAT_GINGERBREAD "$gingerbread"
3434

3535

36+
#define VALUE_MISC 0.1
3637
#define VALUE_IRON 0.2
3738
#define VALUE_GLASS 0.2
3839
#define VALUE_DIAMOND 50

__DEFINES/obj_defines.dm

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,3 +42,27 @@ var/list/qualityByString = list(
4242

4343
#define SPAWN_ON_TURF "turf"
4444
#define SPAWN_ON_LOC "loc"
45+
46+
// Slime extract application flags
47+
#define SLIME_GREY 1
48+
#define SLIME_GOLD 2
49+
#define SLIME_SILVER 4
50+
#define SLIME_METAL 8
51+
#define SLIME_PURPLE 16
52+
#define SLIME_DARKPURPLE 32
53+
#define SLIME_ORANGE 64
54+
#define SLIME_YELLOW 128
55+
#define SLIME_RED 256
56+
#define SLIME_BLUE 512
57+
#define SLIME_DARKBLUE 1024
58+
#define SLIME_PINK 2048
59+
#define SLIME_GREEN 4096
60+
#define SLIME_LIGHTPINK 8192
61+
#define SLIME_BLACK 16384
62+
#define SLIME_OIL 32768
63+
#define SLIME_ADAMANTINE 65536
64+
#define SLIME_BLUESPACE 131072
65+
#define SLIME_PYRITE 262144
66+
#define SLIME_CERULEAN 524288
67+
#define SLIME_SEPIA 1048576
68+
#define ALL_SLIMES 2097151 //sum of above, 2097152 - 1

__DEFINES/reagents.dm

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -531,6 +531,7 @@
531531
#define LEMONDROP "lemondrop"
532532
#define FEVERFEW "feverfew"
533533
#define SQUASH "squash"
534+
#define PRIAXATE "priaxate"
534535

535536
#define ACRYLIC "acrylic"
536537
#define ACETONE "acetone"

__DEFINES/subsystem.dm

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,7 @@
6565
#define SS_PRIORITY_INACTIVITY 1
6666
#define SS_PRIORITY_BURNABLE -50
6767
#define SS_PRIORITY_DAYNIGHT -200
68+
#define SS_PRIORITY_NEWS -1000
6869

6970
#define SS_WAIT_WEATHER 2 SECONDS
7071
#define SS_WAIT_MACHINERY 2 SECONDS //TODO move the rest of these to defines

___odlint.dm

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
// This file is included right at the start of the DME.
2+
// Its purpose is to enable multiple lints (pragmas) that are supported by OpenDream to better validate the codebase
3+
// These are essentially nitpicks the DM compiler should pick up on but doesnt
4+
5+
#if !defined(SPACEMAN_DMM) && defined(OPENDREAM)
6+
// This is in a separate file as a hack to avoid SpacemanDMM
7+
// evaluating the #pragma lines, even if its outside a block it cares about
8+
// (Also so people can code-own it. Shoutout to AA)
9+
#include "tools/ci/od_lints.dm"
10+
#endif

code/ATMOSPHERICS/atmospherics.dm

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -329,7 +329,7 @@ Pipelines + Other Objects -> Pipe network
329329
"You hear a ratchet.")
330330
var/obj/item/tool/wrench/socket/thewrench = W
331331
var/datum/gas_mixture/internal_removed = int_air.remove_volume(starting_volume)
332-
if(!thewrench.has_slime)
332+
if(!(thewrench.has_slimes & SLIME_BLUESPACE))
333333
env_air.merge(internal_removed)
334334
else
335335
to_chat(user, "<span class='warning'>You cannot unwrench this [src], it's too exerted due to internal pressure.</span>")

code/ZAS/Fire.dm

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -546,6 +546,10 @@ var/ZAS_fuel_energy_release_rate = zas_settings.Get(/datum/ZAS_Setting/fire_fuel
546546
if(!flammable || check_fire_protection() || thermal_mass <= 0)
547547
return FALSE
548548

549+
var/datum/gas_mixture/air_contents = return_air()
550+
if(air_contents[GAS_OXYGEN] < 1)
551+
return FALSE
552+
549553
var/in_fire = FALSE
550554
on_fire=1
551555

@@ -625,7 +629,6 @@ var/ZAS_fuel_energy_release_rate = zas_settings.Get(/datum/ZAS_Setting/fire_fuel
625629
//Fires shouldn't spawn in areas or mobs, but it has happened...
626630
if(!istype(loc,/turf))
627631
qdel(src)
628-
CRASH("Fire was created at src->loc: [src]->[loc] instead of a turf.")
629632

630633
// Get location and check if it is in a proper ZAS zone.
631634
var/turf/simulated/S = get_turf(loc)
@@ -641,7 +644,7 @@ var/ZAS_fuel_energy_release_rate = zas_settings.Get(/datum/ZAS_Setting/fire_fuel
641644
if(!air_contents.check_recombustability(S))
642645
Extinguish()
643646
else if(air_contents.check_recombustability(S) == 1)
644-
if((air_contents.molar_ratio(GAS_OXYGEN)) < (MINOXY2BURN + rand(-2,2)*0.01))
647+
if((air_contents.molar_ratio(GAS_OXYGEN)) < (MINOXY2BURN + rand(-2,2)*0.01) || (air_contents[GAS_OXYGEN] < 1)) //extinguish if the ratio of fuel:oxygen is too low or if there isn't enough oxygen present at all
645648
Extinguish()
646649
return
647650

code/__HELPERS/lists.dm

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -157,6 +157,55 @@
157157
return
158158
return chosen
159159

160+
/*
161+
* Returns the length of a common prefix in a list, if any
162+
* Requires a SORTED list
163+
*/
164+
/proc/find_string_list_prefix(var/list/inputlist)
165+
if(!inputlist.len)
166+
return
167+
if(inputlist.len==1)
168+
return inputlist[1]
169+
var/i = 0
170+
var/first = "[inputlist[1]]"
171+
var/last = "[inputlist[inputlist.len]]"
172+
while(i < length(first) && first[i+1] == last[i+1])
173+
i++
174+
return i
175+
176+
/*
177+
* Returns a choice from an input typelist, given a string filter
178+
* If only one thing is returned, just gives us that with no input list.
179+
*/
180+
/proc/filter_typelist_input(input_text, input_heading, var/list/matches)
181+
if(!matches.len)
182+
return
183+
if(matches.len==1)
184+
return matches[1]
185+
matches = sortList(matches)
186+
var/prefix = ""
187+
var/common = find_string_list_prefix(matches)
188+
if(common)
189+
prefix = copytext("[matches[1]]", 1, common+1)
190+
var/foundpartial = findlasttext(prefix, "/")
191+
if(foundpartial)
192+
prefix = copytext(prefix, 1, foundpartial)
193+
common = foundpartial
194+
var/list/results = list()
195+
for(var/x in matches)
196+
if(common)
197+
results += copytext("[x]", common)
198+
else
199+
results += "[x]"
200+
var/newvalue = input("[input_text][(input_text && prefix) ? "\n" : ""][prefix ? "Prefix: [prefix]" : ""]",input_heading) as null|anything in results
201+
if(isnull(newvalue))
202+
return
203+
if(prefix)
204+
newvalue = text2path(prefix + newvalue)
205+
else
206+
newvalue = text2path(newvalue)
207+
return newvalue
208+
160209
/*
161210
* Returns list containing all the entries from first list that are not present in second.
162211
* If skiprep = 1, repeated elements are treated as one.

0 commit comments

Comments
 (0)