Skip to content

Commit

Permalink
Merge pull request #57 from out-of-phaze/lighthouse-update/05-21-2024
Browse files Browse the repository at this point in the history
Upstream update, May 25 2024
  • Loading branch information
out-of-phaze authored May 29, 2024
2 parents 8630383 + c5bcbb8 commit f2a814b
Show file tree
Hide file tree
Showing 1,030 changed files with 44,489 additions and 38,929 deletions.
15 changes: 15 additions & 0 deletions SpacemanDMM.toml
Original file line number Diff line number Diff line change
Expand Up @@ -51,3 +51,18 @@ 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]
random = false
overlays = false
gravity-gen = false
pretty = false
icon-smoothing = false
icon-smoothing-2016 = true
smart-cables = false
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: 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
106 changes: 47 additions & 59 deletions code/__defines/hydroponics.dm
Original file line number Diff line number Diff line change
@@ -1,65 +1,53 @@
//Misc
#define DEAD_PLANT_COLOUR "#c2a180"

// Definitions for genes (trait groupings)
#define GENE_BIOCHEMISTRY "biochemistry"
#define GENE_HARDINESS "hardiness"
#define GENE_ENVIRONMENT "environment"
#define GENE_METABOLISM "metabolism"
#define GENE_STRUCTURE "appearance"
#define GENE_DIET "diet"
#define GENE_PIGMENT "pigment"
#define GENE_OUTPUT "output"
#define GENE_ATMOSPHERE "atmosphere"
#define GENE_VIGOUR "vigour"
#define GENE_FRUIT "fruit"
#define GENE_SPECIAL "special"

#define ALL_GENES list(GENE_BIOCHEMISTRY,GENE_HARDINESS,GENE_ENVIRONMENT,GENE_METABOLISM,GENE_STRUCTURE,GENE_DIET,GENE_PIGMENT,GENE_OUTPUT,GENE_ATMOSPHERE,GENE_VIGOUR,GENE_FRUIT,GENE_SPECIAL)

//Definitions for traits (individual descriptors)
#define TRAIT_CHEMS 1
#define TRAIT_EXUDE_GASSES 2
#define TRAIT_ALTER_TEMP 3
#define TRAIT_POTENCY 4
#define TRAIT_HARVEST_REPEAT 5
#define TRAIT_PRODUCES_POWER 6
#define TRAIT_JUICY 7
#define TRAIT_PRODUCT_ICON 8
#define TRAIT_PLANT_ICON 9
#define TRAIT_CONSUME_GASSES 10
#define TRAIT_REQUIRES_NUTRIENTS 11
#define TRAIT_NUTRIENT_CONSUMPTION 12
#define TRAIT_REQUIRES_WATER 13
#define TRAIT_WATER_CONSUMPTION 14
#define TRAIT_CARNIVOROUS 15
#define TRAIT_PARASITE 16
#define TRAIT_STINGS 17
#define TRAIT_IDEAL_HEAT 18
#define TRAIT_HEAT_TOLERANCE 19
#define TRAIT_IDEAL_LIGHT 20
#define TRAIT_LIGHT_TOLERANCE 21
#define TRAIT_LOWKPA_TOLERANCE 22
#define TRAIT_HIGHKPA_TOLERANCE 23
#define TRAIT_EXPLOSIVE 24
#define TRAIT_TOXINS_TOLERANCE 25
#define TRAIT_PEST_TOLERANCE 26
#define TRAIT_WEED_TOLERANCE 27
#define TRAIT_ENDURANCE 28
#define TRAIT_YIELD 29
#define TRAIT_SPREAD 30
#define TRAIT_MATURATION 31
#define TRAIT_PRODUCTION 32
#define TRAIT_TELEPORTING 33
#define TRAIT_PLANT_COLOUR 34
#define TRAIT_PRODUCT_COLOUR 35
#define TRAIT_BIOLUM 36
#define TRAIT_BIOLUM_COLOUR 37
#define TRAIT_IMMUTABLE 38
#define TRAIT_FLESH_COLOUR 39
#define TRAIT_LARGE 40
#define TRAIT_LEAVES_COLOUR 41
#define TRAIT_PHOTOSYNTHESIS 42
// Defining these to point to the relevant decl types just to avoid a massive changeset.
// TODO: rename to PLANT_TRAIT or bare decls to avoid mixing up with GetTrait etc.
#define TRAIT_CHEMS /decl/plant_trait/chems
#define TRAIT_EXUDE_GASSES /decl/plant_trait/exude_gasses
#define TRAIT_ALTER_TEMP /decl/plant_trait/alter_temp
#define TRAIT_POTENCY /decl/plant_trait/potency
#define TRAIT_HARVEST_REPEAT /decl/plant_trait/harvest_repeat
#define TRAIT_PRODUCES_POWER /decl/plant_trait/produces_power
#define TRAIT_JUICY /decl/plant_trait/juicy
#define TRAIT_PRODUCT_ICON /decl/plant_trait/product_icon
#define TRAIT_PLANT_ICON /decl/plant_trait/plant_icon
#define TRAIT_CONSUME_GASSES /decl/plant_trait/consume_gasses
#define TRAIT_REQUIRES_NUTRIENTS /decl/plant_trait/requires_nutrients
#define TRAIT_NUTRIENT_CONSUMPTION /decl/plant_trait/nutrient_consumption
#define TRAIT_REQUIRES_WATER /decl/plant_trait/requires_water
#define TRAIT_WATER_CONSUMPTION /decl/plant_trait/water_consumption
#define TRAIT_CARNIVOROUS /decl/plant_trait/carnivorous
#define TRAIT_PARASITE /decl/plant_trait/parasite
#define TRAIT_STINGS /decl/plant_trait/stings
#define TRAIT_IDEAL_HEAT /decl/plant_trait/ideal_heat
#define TRAIT_HEAT_TOLERANCE /decl/plant_trait/heat_tolerance
#define TRAIT_IDEAL_LIGHT /decl/plant_trait/ideal_light
#define TRAIT_LIGHT_TOLERANCE /decl/plant_trait/light_tolerance
#define TRAIT_LOWKPA_TOLERANCE /decl/plant_trait/lowkpa_tolerance
#define TRAIT_HIGHKPA_TOLERANCE /decl/plant_trait/highkpa_tolerance
#define TRAIT_EXPLOSIVE /decl/plant_trait/explosive
#define TRAIT_TOXINS_TOLERANCE /decl/plant_trait/toxins_tolerance
#define TRAIT_PEST_TOLERANCE /decl/plant_trait/pest_tolerance
#define TRAIT_WEED_TOLERANCE /decl/plant_trait/weed_tolerance
#define TRAIT_ENDURANCE /decl/plant_trait/endurance
#define TRAIT_YIELD /decl/plant_trait/yield
#define TRAIT_SPREAD /decl/plant_trait/spread
#define TRAIT_MATURATION /decl/plant_trait/maturation
#define TRAIT_PRODUCTION /decl/plant_trait/production
#define TRAIT_TELEPORTING /decl/plant_trait/teleporting
#define TRAIT_PLANT_COLOUR /decl/plant_trait/plant_colour
#define TRAIT_PRODUCT_COLOUR /decl/plant_trait/product_colour
#define TRAIT_BIOLUM /decl/plant_trait/biolum
#define TRAIT_BIOLUM_COLOUR /decl/plant_trait/biolum_colour
#define TRAIT_IMMUTABLE /decl/plant_trait/immutable
#define TRAIT_FLESH_COLOUR /decl/plant_trait/flesh_colour
#define TRAIT_LARGE /decl/plant_trait/large
#define TRAIT_LEAVES_COLOUR /decl/plant_trait/leaves_colour
#define TRAIT_PHOTOSYNTHESIS /decl/plant_trait/photosynthesis
#define TRAIT_PRODUCT_TYPE /decl/plant_trait/product_type
#define TRAIT_SLICE_PRODUCT /decl/plant_trait/slice_product
#define TRAIT_SLICE_AMOUNT /decl/plant_trait/slice_amount

// Seed noun datums
#define SEED_NOUN_SPORES "spores"
Expand Down
15 changes: 14 additions & 1 deletion code/__defines/items_clothing.dm
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,20 @@
// Accessory will only be shown on 'view accessories'.
#define ACCESSORY_VISIBILITY_HIDDEN 2

#define UNIFORM_DEFAULT_ACCESSORIES list( \
ACCESSORY_SLOT_SENSORS, \
ACCESSORY_SLOT_UTILITY, \
ACCESSORY_SLOT_HOLSTER, \
ACCESSORY_SLOT_ARMBAND, \
ACCESSORY_SLOT_RANK, \
ACCESSORY_SLOT_DEPT, \
ACCESSORY_SLOT_DECOR, \
ACCESSORY_SLOT_NECK, \
ACCESSORY_SLOT_MEDAL, \
ACCESSORY_SLOT_INSIGNIA, \
ACCESSORY_SLOT_OVER \
)

// Bitmasks for the flags_inv variable. These determine when a piece of clothing hides another, i.e. a helmet hiding glasses.
// WARNING: The following flags apply only to the external suit!
#define HIDEGLOVES BITFLAG(0)
Expand Down Expand Up @@ -61,7 +75,6 @@
#define slot_wear_id_str "slot_wear_id"
#define slot_gloves_str "slot_gloves"
#define slot_glasses_str "slot_glasses"
#define slot_tie_str "slot_tie"
#define slot_l_store_str "slot_l_store"
#define slot_r_store_str "slot_r_store"
#define slot_s_store_str "slot_s_store"
Expand Down
2 changes: 2 additions & 0 deletions code/__defines/lists.dm
Original file line number Diff line number Diff line change
Expand Up @@ -71,3 +71,5 @@
__BIN_LIST.Insert(__BIN_MID, INPUT);\
};\
} while(FALSE)

#define LIST_CLEAR_NULLS(L) L.RemoveAll(null)
37 changes: 23 additions & 14 deletions code/__defines/misc.dm
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,6 @@

///Width or height of a transition edge area along the map's borders where transition edge turfs are placed to connect levels together.
#define TRANSITIONEDGE 7
///Extra spacing needed between any random level templates and the transition edge of a level.
#define TEMPLATE_TAG_MAP_EDGE_PAD 15

///Enum value for a level edge that's to be untouched
#define LEVEL_EDGE_NONE 0
Expand Down Expand Up @@ -103,12 +101,13 @@
#define AREA_FLAG_HIDE_FROM_HOLOMAP BITFLAG(12) // if we shouldn't be drawn on station holomaps

//Map template flags
#define TEMPLATE_FLAG_ALLOW_DUPLICATES BITFLAG(0) // Lets multiple copies of the template to be spawned
#define TEMPLATE_FLAG_SPAWN_GUARANTEED BITFLAG(1) // Makes it ignore away site budget and just spawn (only for away sites)
#define TEMPLATE_FLAG_CLEAR_CONTENTS BITFLAG(2) // if it should destroy objects it spawns on top of
#define TEMPLATE_FLAG_NO_RUINS BITFLAG(3) // if it should forbid ruins from spawning on top of it
#define TEMPLATE_FLAG_NO_RADS BITFLAG(4) // Removes all radiation from the template after spawning.
#define TEMPLATE_FLAG_TEST_DUPLICATES BITFLAG(5) // Makes unit testing attempt to spawn mutliple copies of this template. Assumes unit testing is spawning at least one copy.
#define TEMPLATE_FLAG_ALLOW_DUPLICATES BITFLAG(0) // Lets multiple copies of the template to be spawned
#define TEMPLATE_FLAG_SPAWN_GUARANTEED BITFLAG(1) // Makes it ignore away site budget and just spawn (only for away sites)
#define TEMPLATE_FLAG_CLEAR_CONTENTS BITFLAG(2) // if it should destroy objects it spawns on top of
#define TEMPLATE_FLAG_NO_RUINS BITFLAG(3) // if it should forbid ruins from spawning on top of it
#define TEMPLATE_FLAG_NO_RADS BITFLAG(4) // Removes all radiation from the template after spawning.
#define TEMPLATE_FLAG_TEST_DUPLICATES BITFLAG(5) // Makes unit testing attempt to spawn mutliple copies of this template. Assumes unit testing is spawning at least one copy.
#define TEMPLATE_FLAG_GENERIC_REPEATABLE BITFLAG(6) // Template can be picked repeatedly for the same level gen run.

// Convoluted setup so defines can be supplied by Bay12 main server compile script.
// Should still work fine for people jamming the icons into their repo.
Expand Down Expand Up @@ -358,12 +357,6 @@
// Can groom properly (long hair with a brush)
#define GROOMING_RESULT_SUCCESS 2

#if DM_VERSION < 515
#define TYPE_INITIAL(REF, VAR) initial(REF.VAR)
#else
#define TYPE_INITIAL(REF, VAR) (REF::VAR)
#endif

// Used by recipe selection.
#define RECIPE_CATEGORY_MICROWAVE BITFLAG(0)
#define RECIPE_CATEGORY_POT BITFLAG(1)
Expand All @@ -372,3 +365,19 @@
#define RECIPE_CATEGORY_OVEN BITFLAG(4)
#define RECIPE_CATEGORY_SKILLET BITFLAG(5)
#define RECIPE_CATEGORY_SAUCEPAN BITFLAG(6)

// 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.

/// 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)
3 changes: 3 additions & 0 deletions code/__defines/tools.dm
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,9 @@
#define IS_HAMMER(A) IS_TOOL(A, TOOL_HAMMER)
#define IS_HOE(A) IS_TOOL(A, TOOL_HOE)

#define IS_HEMOSTAT(A) IS_TOOL(A, TOOL_HEMOSTAT)
#define IS_RETRACTOR(A) IS_TOOL(A, TOOL_RETRACTOR)

// Structure interaction flags
#define TOOL_INTERACTION_NONE 0
#define TOOL_INTERACTION_ANCHOR BITFLAG(0)
Expand Down
1 change: 0 additions & 1 deletion code/_global_vars/lists/clothing.dm
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ var/global/list/airtight_slots = list(

var/global/list/abstract_inventory_slots = list(
slot_in_backpack_str,
slot_tie_str,
slot_undershirt_str,
slot_underpants_str,
slot_socks_str
Expand Down
1 change: 0 additions & 1 deletion code/_global_vars/lists/names.dm
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ var/global/list/descriptive_slot_names = list(
slot_wear_id_str = "ID",
slot_gloves_str = "Gloves",
slot_glasses_str = "Glasses",
slot_tie_str = "Accessory",
slot_l_store_str = "Left Pocket",
slot_r_store_str = "Right Pocket",
slot_s_store_str = "Suit Storage",
Expand Down
1 change: 0 additions & 1 deletion code/_global_vars/lists/objects.dm
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ var/global/list/listening_objects = list() // List of objects that need to be ab
var/global/list/global_map = list()

var/global/host = null //only here until check @ code\modules\ghosttrap\trap.dm:112 is fixed
var/global/datum/sun/sun = new
var/global/datum/universal_state/universe = new

/// Vowels.
Expand Down
4 changes: 2 additions & 2 deletions code/_helpers/auxtools.dm
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,11 @@ var/global/auxtools_debug_server = world.GetConfig("env", "AUXTOOLS_DEBUG_DLL")

/hook/startup/proc/auxtools_init()
if (global.auxtools_debug_server)
LIBCALL(global.auxtools_debug_server, "auxtools_init")()
call_ext(global.auxtools_debug_server, "auxtools_init")()
enable_debugging()
return TRUE

/hook/shutdown/proc/auxtools_shutdown()
if (global.auxtools_debug_server)
LIBCALL(global.auxtools_debug_server, "auxtools_shutdown")()
call_ext(global.auxtools_debug_server, "auxtools_shutdown")()
return TRUE
2 changes: 1 addition & 1 deletion code/_helpers/cmp.dm
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
return a.sort_order - b.sort_order

/proc/cmp_name_or_type_asc(atom/a, atom/b)
return sorttext(istype(b) || ("name" in b.vars) ? b.name : b.type, istype(a) || ("name" in a.vars) ? a.name : a.type)
return sorttext("[b]", "[a]")

/proc/cmp_name_asc(atom/a, atom/b)
return sorttext(b.name, a.name)
Expand Down
2 changes: 1 addition & 1 deletion code/_helpers/icons.dm
Original file line number Diff line number Diff line change
Expand Up @@ -865,7 +865,7 @@ The _flatIcons list is a cache for generated icon files.
var/turf/T = locate(target_x + x_offset, target_y + y_offset, target_z)
if(checker && !checker?.can_capture_turf(T))
continue
else
else if(T)
render_turfs.Add(T)

// - Collecting list of atoms to render -
Expand Down
2 changes: 1 addition & 1 deletion code/_helpers/profiling.dm
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@
if(UNIX) lib = "libprof.so"
else CRASH("unsupported platform")

var/init = LIBCALL(lib, "init")()
var/init = call_ext(lib, "init")()
if("0" != init) CRASH("[lib] init error: [init]")

/world/New()
Expand Down
5 changes: 5 additions & 0 deletions code/_helpers/text.dm
Original file line number Diff line number Diff line change
Expand Up @@ -778,3 +778,8 @@ var/global/list/plural_words_unchanged = list(
for(var/i = 1 to num)
. += str
. = JOINTEXT(.)

/proc/jointext_no_nulls(list/L, Glue, Start = 1, End = 0)
var/list/temp = L.Copy()
LIST_CLEAR_NULLS(temp)
return jointext(temp, Glue, Start, End)
Loading

0 comments on commit f2a814b

Please sign in to comment.