Skip to content

Commit

Permalink
Merge branch 'dev' of github.com:NebulaSS13/Nebula into fork/crux
Browse files Browse the repository at this point in the history
  • Loading branch information
MistakeNot4892 committed Jun 15, 2024
2 parents 1e00e4c + 019f0b0 commit 2e1b620
Show file tree
Hide file tree
Showing 4,034 changed files with 275,273 additions and 159,213 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
30 changes: 26 additions & 4 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@ on:
workflow_dispatch:

env:
BYOND_MAJOR: "514"
BYOND_MINOR: "1575"
SPACEMAN_DMM_VERSION: suite-1.7.2
BYOND_MAJOR: "515"
BYOND_MINOR: "1633"
SPACEMAN_DMM_VERSION: suite-1.8

jobs:
DreamChecker:
Expand Down Expand Up @@ -50,6 +50,28 @@ jobs:
wget https://raw.githubusercontent.com/DiscordHooks/github-actions-discord-webhook/master/send.sh
chmod +x send.sh
./send.sh failure $WEBHOOK_URL
OpenDream:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Python setup
uses: actions/setup-python@v4
with:
python-version: '3.x'
- name: Setup Cache
uses: actions/cache@v3
with:
path: $HOME/spaceman_dmm/$SPACEMAN_DMM_VERSION
key: ${{ runner.os }}-spacemandmm-${{ env.SPACEMAN_DMM_VERSION }}
- name: Install OpenDream
uses: robinraju/[email protected]
with:
repository: "OpenDreamProject/OpenDream"
tag: "latest"
fileName: "DMCompiler_linux-x64.tar.gz"
extract: true
- name: Run OpenDream
run: ./DMCompiler_linux-x64/DMCompiler nebula.dme --suppress-unimplemented --skip-anything-typecheck --version=${BYOND_MAJOR}.${BYOND_MINOR} | python tools/od_annotator/__main__.py "$@"
Code:
runs-on: ubuntu-latest
steps:
Expand Down Expand Up @@ -80,7 +102,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
map_path: [away_sites_testing, crux, example, exodus, ministation, modpack_testing, planets_testing, tradeship]
map_path: [crux, example, tradeship, exodus, ministation, shaded_hills, away_sites_testing, modpack_testing, planets_testing]
steps:
- uses: actions/checkout@v3
- name: Setup Cache
Expand Down
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -50,3 +50,6 @@ lib/*.so
# python
*.pyc
__pycache__

# Running OpenDream locally
nebula.json
19 changes: 19 additions & 0 deletions SpacemanDMM.toml
Original file line number Diff line number Diff line change
Expand Up @@ -51,3 +51,22 @@ macro_undefined_no_definition = "error"

# Raised by Object Tree
override_precedes_definition = "error"

[map_renderer]
hide_invisible = [
"/obj/effect/step_trigger",
"/obj/abstract",
]

[map_renderer.render_passes]
overlays = false
gravity-gen = false
pretty = false
icon-smoothing = false
icon-smoothing-2016 = true
smart-cables = false
# TODO: add support for directional_offsets var to Jupyterkat's fork?
offsets = false
# maybe also add support for our random spawners?
random = false
spawners = false
34 changes: 34 additions & 0 deletions code/___opendream_linting.dm
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
#ifdef OPENDREAM
//1000-1999
#pragma FileAlreadyIncluded error
#pragma MissingIncludedFile error
#pragma MisplacedDirective error
#pragma UndefineMissingDirective error
#pragma DefinedMissingParen error
#pragma ErrorDirective error
#pragma WarningDirective warning
#pragma MiscapitalizedDirective error

//2000-2999
#pragma SoftReservedKeyword error
#pragma DuplicateVariable error
#pragma DuplicateProcDefinition error
#pragma PointlessParentCall error
#pragma PointlessBuiltinCall error
#pragma SuspiciousMatrixCall error
#pragma FallbackBuiltinArgument error
#pragma MalformedRange error
#pragma InvalidRange error
#pragma InvalidSetStatement error
#pragma InvalidOverride error
#pragma DanglingVarType error
#pragma MissingInterpolatedExpression error
#pragma AmbiguousResourcePath error

//3000-3999
#pragma EmptyBlock error
#pragma EmptyProc disabled
#pragma UnsafeClientAccess disabled
#pragma SuspiciousSwitchCase error
#pragma AssignmentInConditional error
#endif
2 changes: 1 addition & 1 deletion code/__defines/ZAS.dm
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@

#define ATMOS_CANPASS_MOVABLE(ret, AM, TARG_TURF) \
switch (AM.atmos_canpass) { \
if (CANPASS_ALWAYS) { } \
if (CANPASS_ALWAYS) { EMPTY_BLOCK_GUARD } \
if (CANPASS_DENSITY) { \
if (AM.density) { \
ret |= AIR_BLOCKED; \
Expand Down
46 changes: 2 additions & 44 deletions code/__defines/_byond_version_compat.dm
Original file line number Diff line number Diff line change
@@ -1,47 +1,5 @@
#define REQUIRED_DM_VERSION 514
#define REQUIRED_DM_VERSION 515

#if DM_VERSION < REQUIRED_DM_VERSION
#warn Nebula is not tested on BYOND versions older than 514. The code may not compile, and if it does compile it may have severe problems.
#endif

// 515 split call for external libraries into call_ext
#if DM_VERSION < 515
#define LIBCALL call
#else
#define LIBCALL call_ext
#endif

// So we want to have compile time guarantees these methods exist on local type, unfortunately 515 killed the .proc/procname and .verb/verbname syntax so we have to use nameof()
// For the record: GLOBAL_VERB_REF would be useless as verbs can't be global.

#if DM_VERSION < 515

/// Call by name proc references, checks if the proc exists on either this type or as a global proc.
#define PROC_REF(X) (.proc/##X)
/// Call by name verb references, checks if the verb exists on either this type or as a global verb.
#define VERB_REF(X) (.verb/##X)

/// Call by name proc reference, checks if the proc exists on either the given type or as a global proc
#define TYPE_PROC_REF(TYPE, X) (##TYPE.proc/##X)
/// Call by name verb reference, checks if the verb exists on either the given type or as a global verb
#define TYPE_VERB_REF(TYPE, X) (##TYPE.verb/##X)

/// Call by name proc reference, checks if the proc is an existing global proc
#define GLOBAL_PROC_REF(X) (/proc/##X)

#else

/// Call by name proc references, checks if the proc exists on either this type or as a global proc.
#define PROC_REF(X) (nameof(.proc/##X))
/// Call by name verb references, checks if the verb exists on either this type or as a global verb.
#define VERB_REF(X) (nameof(.verb/##X))

/// Call by name proc reference, checks if the proc exists on either the given type or as a global proc
#define TYPE_PROC_REF(TYPE, X) (nameof(##TYPE.proc/##X))
/// Call by name verb reference, checks if the verb exists on either the given type or as a global verb
#define TYPE_VERB_REF(TYPE, X) (nameof(##TYPE.verb/##X))

/// Call by name proc reference, checks if the proc is an existing global proc
#define GLOBAL_PROC_REF(X) (/proc/##X)

#warn Nebula is not tested on BYOND versions older than 515. The code may not compile, and if it does compile it may have severe problems.
#endif
4 changes: 4 additions & 0 deletions code/__defines/_compile_helpers.dm
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
#define BITSHIFT_LEFT(X, N) (X << (N))
#define BITSHIFT_RIGHT(X, N) (X >> (N))
#define BITFLAG(X) BITSHIFT_LEFT(1, X)

/// A null statement to guard against EmptyBlock lint without necessitating the use of pass()
/// Used to avoid proc-call overhead. But use sparingly. Probably pointless in most places.
#define EMPTY_BLOCK_GUARD ;
21 changes: 12 additions & 9 deletions code/__defines/_planes+layers.dm
Original file line number Diff line number Diff line change
Expand Up @@ -76,16 +76,19 @@ What is the naming convention for planes or layers?
#define OVER_OPENSPACE_PLANE -3

#define DEFAULT_PLANE 0
#define PLATING_LAYER 1
//BELOW PLATING
#define UNDER_TURF_LAYER 1
//PLATING
#define PLATING_LAYER 1.5
//ABOVE PLATING
#define HOLOMAP_LAYER 1.01
#define DECAL_PLATING_LAYER 1.02
#define DISPOSALS_PIPE_LAYER 1.03
#define LATTICE_LAYER 1.04
#define PIPE_LAYER 1.05
#define WIRE_LAYER 1.06
#define WIRE_TERMINAL_LAYER 1.07
#define ABOVE_WIRE_LAYER 1.08
#define HOLOMAP_LAYER 1.51
#define DECAL_PLATING_LAYER 1.52
#define DISPOSALS_PIPE_LAYER 1.53
#define LATTICE_LAYER 1.54
#define PIPE_LAYER 1.55
#define WIRE_LAYER 1.56
#define WIRE_TERMINAL_LAYER 1.57
#define ABOVE_WIRE_LAYER 1.58
//TURF PLANE
//TURF_LAYER = 2
#define TURF_DETAIL_LAYER 2.01
Expand Down
68 changes: 34 additions & 34 deletions code/__defines/ao_misc.dm
Original file line number Diff line number Diff line change
Expand Up @@ -8,38 +8,38 @@ Define for getting a bitfield of adjacent turfs that meet a condition.
var/result = 0
CALCULATE_NEIGHBORS(src, result, T, isopenturf(T))
*/
#define CALCULATE_NEIGHBORS(ORIGIN, VAR, TVAR, FUNC) \
for (var/_tdir in global.cardinal) { \
TVAR = get_step(ORIGIN, _tdir); \
if ((TVAR) && (FUNC)) { \
VAR |= BITFLAG(_tdir); \
} \
} \
if (VAR & N_NORTH) { \
if (VAR & N_WEST) { \
TVAR = get_step(ORIGIN, NORTHWEST); \
if (FUNC) { \
VAR |= N_NORTHWEST; \
} \
} \
if (VAR & N_EAST) { \
TVAR = get_step(ORIGIN, NORTHEAST); \
if (FUNC) { \
VAR |= N_NORTHEAST; \
} \
} \
} \
if (VAR & N_SOUTH) { \
if (VAR & N_WEST) { \
TVAR = get_step(ORIGIN, SOUTHWEST); \
if (FUNC) { \
VAR |= N_SOUTHWEST; \
} \
} \
if (VAR & N_EAST) { \
TVAR = get_step(ORIGIN, SOUTHEAST); \
if (FUNC) { \
VAR |= N_SOUTHEAST; \
} \
} \
#define CALCULATE_NEIGHBORS(ORIGIN, VAR, TVAR, FUNC) \
for (var/_tdir in global.cardinal) { \
TVAR = get_step_resolving_mimic(ORIGIN, _tdir); \
if ((TVAR) && (FUNC)) { \
VAR |= BITFLAG(_tdir); \
} \
} \
if (VAR & N_NORTH) { \
if (VAR & N_WEST) { \
TVAR = get_step_resolving_mimic(ORIGIN, NORTHWEST); \
if (FUNC) { \
VAR |= N_NORTHWEST; \
} \
} \
if (VAR & N_EAST) { \
TVAR = get_step_resolving_mimic(ORIGIN, NORTHEAST); \
if (FUNC) { \
VAR |= N_NORTHEAST; \
} \
} \
} \
if (VAR & N_SOUTH) { \
if (VAR & N_WEST) { \
TVAR = get_step_resolving_mimic(ORIGIN, SOUTHWEST); \
if (FUNC) { \
VAR |= N_SOUTHWEST; \
} \
} \
if (VAR & N_EAST) { \
TVAR = get_step_resolving_mimic(ORIGIN, SOUTHEAST); \
if (FUNC) { \
VAR |= N_SOUTHEAST; \
} \
} \
}
4 changes: 2 additions & 2 deletions code/__defines/bodytype.dm
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
#define BODY_FLAG_EXCLUDE BITFLAG(0)
#define BODY_FLAG_HUMANOID BITFLAG(1)
#define BODY_FLAG_MONKEY BITFLAG(2)
#define BODY_FLAG_QUADRUPED BITFLAG(3)

#define BODYTYPE_HUMANOID "humanoid body"
#define BODYTYPE_QUADRUPED "quadruped body"
#define BODYTYPE_OTHER "alien body"
#define BODYTYPE_MONKEY "small humanoid body"

// Bodytype appearance flags
#define HAS_SKIN_TONE_NORMAL BITFLAG(0) // Skin tone selectable in chargen for baseline humans (0-220)
#define HAS_SKIN_COLOR BITFLAG(1) // Skin colour selectable in chargen. (RGB)
#define HAS_LIPS BITFLAG(2) // Lips are drawn onto the mob icon. (lipstick)
#define HAS_UNDERWEAR BITFLAG(3) // Underwear is drawn onto the mob icon.
#define HAS_EYE_COLOR BITFLAG(4) // Eye colour selectable in chargen. (RGB)
#define HAS_HAIR_COLOR BITFLAG(5) // Hair colour selectable in chargen. (RGB)
#define RADIATION_GLOWS BITFLAG(6) // Radiation causes this character to glow.
#define HAS_SKIN_TONE_GRAV BITFLAG(7) // Skin tone selectable in chargen for grav-adapted humans (0-100)
#define HAS_SKIN_TONE_SPCR BITFLAG(8) // Skin tone selectable in chargen for spacer humans (0-165)
Expand Down
10 changes: 6 additions & 4 deletions code/__defines/chemistry.dm
Original file line number Diff line number Diff line change
Expand Up @@ -57,10 +57,12 @@
#define REAGENT_VOLUME(REAGENT_HOLDER, REAGENT_TYPE) (REAGENT_HOLDER?.reagent_volumes && REAGENT_HOLDER.reagent_volumes[REAGENT_TYPE])
#define REAGENT_DATA(REAGENT_HOLDER, REAGENT_TYPE) (REAGENT_HOLDER?.reagent_data && REAGENT_HOLDER.reagent_data[REAGENT_TYPE])

#define MAT_SOLVENT_NONE 0
#define MAT_SOLVENT_MILD 1
#define MAT_SOLVENT_MODERATE 2
#define MAT_SOLVENT_STRONG 3
#define MAT_SOLVENT_NONE 0
#define MAT_SOLVENT_MILD 1
#define MAT_SOLVENT_MODERATE 2
#define MAT_SOLVENT_STRONG 3
#define MAT_SOLVENT_VERY_STRONG 7
#define MAT_SOLVENT_STRONGEST 10
#define MAT_SOLVENT_IMMUNE INFINITY

#define DIRTINESS_DECONTAMINATE -3
Expand Down
4 changes: 2 additions & 2 deletions code/__defines/colors.dm
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@
#define COLOR_ROYAL_BLUE "#0033ff"
#define COLOR_VERDANT_GREEN "#287d00"
#define COLOR_SCIENCE_PURPLE "#6633cc"

#define COLOR_DAYLIGHT "#f3e6ca"

#define PIPE_COLOR_GREY "#808080"
#define PIPE_COLOR_RED "#ff0000"
Expand Down Expand Up @@ -148,7 +148,7 @@ var/global/list/telecomms_colours = list(
#define WOOD_COLOR_RICH "#792f27"
#define WOOD_COLOR_PALE "#d2bc9d"
#define WOOD_COLOR_PALE2 "#e6d2ba"
#define WOOD_COLOR_BLACK "#332521"
#define WOOD_COLOR_BLACK "#39342c"
#define WOOD_COLOR_CHOCOLATE "#543c30"
#define WOOD_COLOR_YELLOW "#e3994e"

Expand Down
14 changes: 14 additions & 0 deletions code/__defines/cooking.dm
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
#define COOKING_HEAT_ANY 0
#define COOKING_HEAT_DIRECT 1
#define COOKING_HEAT_INDIRECT 2

#define FOOD_RAW -1
#define FOOD_PREPARED 0
#define FOOD_COOKED 1

#define INGREDIENT_FLAG_PLAIN 0
#define INGREDIENT_FLAG_MEAT BITFLAG(0)
#define INGREDIENT_FLAG_FISH BITFLAG(1)
#define INGREDIENT_FLAG_VEGETABLE BITFLAG(2)
#define INGREDIENT_FLAG_DAIRY BITFLAG(3)
#define INGREDIENT_FLAG_EGG BITFLAG(4)
7 changes: 7 additions & 0 deletions code/__defines/damage_organs.dm
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
#define OXY "oxy"
#define CLONE "clone"
#define PAIN "pain"
#define BRAIN "brain"
#define ELECTROCUTE "electrocute"

#define CUT "cut"
Expand Down Expand Up @@ -70,6 +71,12 @@
#define ORGAN_FLAG_CAN_DISLOCATE BITFLAG(7) // The organ can be dislocated.
#define ORGAN_FLAG_SKELETAL BITFLAG(8) // The organ has been skeletonized.

// Organ category defines.
/// Limb contributes only to stance damage calculation (foot)
#define ORGAN_CATEGORY_STANCE "stance"
/// Limb is considered the 'root' of a given stance limb (leg) - also counted for stance damage a la ORGAN_CATEGORY_STANCE
#define ORGAN_CATEGORY_STANCE_ROOT "stance_root"

// Droplimb types.
#define DISMEMBER_METHOD_EDGE 0
#define DISMEMBER_METHOD_BLUNT 1
Expand Down
1 change: 0 additions & 1 deletion code/__defines/dna.dm
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@ var/global/CLUMSYBLOCK = 0
var/global/FAKEBLOCK = 0
var/global/COUGHBLOCK = 0
var/global/GLASSESBLOCK = 0
var/global/EPILEPSYBLOCK = 0
var/global/TWITCHBLOCK = 0
var/global/NERVOUSBLOCK = 0
var/global/MONKEYBLOCK = STRUCDNASIZE
Expand Down
2 changes: 1 addition & 1 deletion code/__defines/fires.dm
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#define FUEL_VALUE_RETARDANT -1
#define FUEL_VALUE_SUPPRESSANT -1
#define FUEL_VALUE_NONE 0
#define FUEL_VALUE_ACCELERANT 1
#define FUEL_VALUE_VOLATILE 2
Loading

0 comments on commit 2e1b620

Please sign in to comment.