Skip to content

Commit

Permalink
Merge branch 'dev' into rotation
Browse files Browse the repository at this point in the history
  • Loading branch information
BaraBarax authored Mar 30, 2024
2 parents f7dcbd6 + 056c345 commit f67ad01
Show file tree
Hide file tree
Showing 262 changed files with 5,046 additions and 2,524 deletions.
10 changes: 8 additions & 2 deletions baystation12.dme
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,8 @@
#include "code\__defines\preferences.dm"
#include "code\__defines\proc_presets.dm"
#include "code\__defines\process_scheduler.dm"
#include "code\__defines\procpath.dm"
#include "code\__defines\prometheus.dm"
#include "code\__defines\radiation.dm"
#include "code\__defines\radio.dm"
#include "code\__defines\rcd.dm"
Expand Down Expand Up @@ -179,6 +181,7 @@
#include "code\_helpers\type2type.dm"
#include "code\_helpers\unsorted.dm"
#include "code\_helpers\vector.dm"
#include "code\_helpers\verbs.dm"
#include "code\_helpers\warnings.dm"
#include "code\_helpers\weakref.dm"
#include "code\_helpers\sorts\__main.dm"
Expand Down Expand Up @@ -258,6 +261,7 @@
#include "code\controllers\subsystems\radio.dm"
#include "code\controllers\subsystems\shuttle.dm"
#include "code\controllers\subsystems\skybox.dm"
#include "code\controllers\subsystems\statpanels.dm"
#include "code\controllers\subsystems\sun.dm"
#include "code\controllers\subsystems\supply.dm"
#include "code\controllers\subsystems\tgui.dm"
Expand All @@ -279,6 +283,7 @@
#include "code\controllers\subsystems\processing\mobs.dm"
#include "code\controllers\subsystems\processing\movable_physics.dm"
#include "code\controllers\subsystems\processing\nano.dm"
#include "code\controllers\subsystems\processing\obj_tab_items.dm"
#include "code\controllers\subsystems\processing\processing.dm"
#include "code\controllers\subsystems\processing\projectiles.dm"
#include "code\controllers\subsystems\processing\think.dm"
Expand All @@ -295,6 +300,7 @@
#include "code\datums\http.dm"
#include "code\datums\mind.dm"
#include "code\datums\mutable_appearance.dm"
#include "code\datums\object_window_info.dm"
#include "code\datums\position_point_vector.dm"
#include "code\datums\progressbar.dm"
#include "code\datums\recipe.dm"
Expand Down Expand Up @@ -324,6 +330,7 @@
#include "code\datums\communication\~defines.dm"
#include "code\datums\components\_component.dm"
#include "code\datums\components\cardborg.dm"
#include "code\datums\components\connect_mob_behalf.dm"
#include "code\datums\components\label.dm"
#include "code\datums\components\mind_linker.dm"
#include "code\datums\components\movable_physics.dm"
Expand Down Expand Up @@ -1641,7 +1648,6 @@
#include "code\modules\client\preferences_persist.dm"
#include "code\modules\client\preferences_spawnpoints.dm"
#include "code\modules\client\preferences_storage.dm"
#include "code\modules\client\preferences_toggle.dm"
#include "code\modules\client\settings.dm"
#include "code\modules\client\ui_style.dm"
#include "code\modules\client\preference_setup\_defines.dm"
Expand Down Expand Up @@ -2182,7 +2188,6 @@
#include "code\modules\mob\living\deity\deity_phenomena.dm"
#include "code\modules\mob\living\deity\deity_pylon.dm"
#include "code\modules\mob\living\deity\deity_sources.dm"
#include "code\modules\mob\living\deity\deity_Stat.dm"
#include "code\modules\mob\living\deity\deity_topic.dm"
#include "code\modules\mob\living\deity\deity_tracking.dm"
#include "code\modules\mob\living\deity\forms.dm"
Expand Down Expand Up @@ -2530,6 +2535,7 @@
#include "code\modules\paperwork\photography.dm"
#include "code\modules\paperwork\silicon_photography.dm"
#include "code\modules\paperwork\stamps.dm"
#include "code\modules\particles\particle_emitter.dm"
#include "code\modules\particles\particles.dm"
#include "code\modules\power\apc.dm"
#include "code\modules\power\batteryrack.dm"
Expand Down
45 changes: 25 additions & 20 deletions code/__defines/__renderer.dm
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,12 @@

#define CLICKCATCHER_PLANE -100

#define OPENSPACE_PLANE -8
#define OVER_OPENSPACE_PLANE -7
#define OPENSPACE_PLANE -9
#define OVER_OPENSPACE_PLANE -8

#define WARP_EFFECT_PLANE -6
#define WARP_EFFECT_PLANE -7

#define TEMPERATURE_EFFECT_PLANE -6

#define BLACKNESS_PLANE -5 //Blackness plane as per DM documentation.

Expand Down Expand Up @@ -181,23 +183,26 @@

//-------------------- Rendering ---------------------

#define LETTERBOX_RENDERER "LETTERBOX"
#define SPACE_RENDERER "SPACE"
#define SKYBOX_RENDERER "SKYBOX"
#define TURF_RENDERER "TURF"
#define GAME_RENDERER "GAME"
#define OBSERVERS_RENDERER "OBSERVERS"
#define LIGHTING_RENDERER "LIGHTING"
#define ABOVE_LIGHTING_RENDERER "ABOVE_LIGHTING"
#define SCREEN_EFFECTS_RENDERER "SCREEN_EFFECTS"
#define INTERFACE_RENDERER "INTERFACE"
#define OPEN_SPACE_RENDERER "OPEN_SPACE"
#define WARP_EFFECT_RENDERER "WARP_EFFECT"
#define OBFUSCATION_RENDERER "OBFUSCATION"

#define SCENE_GROUP_RENDERER "SCENE_GROUP"
#define SCREEN_GROUP_RENDERER "SCREEN_GROUP"
#define FINAL_GROUP_RENDERER "FINAL_GROUP"
#define LETTERBOX_RENDERER "LETTERBOX"
#define SPACE_RENDERER "SPACE"
#define SKYBOX_RENDERER "SKYBOX"
#define TURF_RENDERER "TURF"
#define GAME_RENDERER "GAME"
#define OBSERVERS_RENDERER "OBSERVERS"
#define LIGHTING_RENDERER "LIGHTING"
#define ABOVE_LIGHTING_RENDERER "ABOVE_LIGHTING"
#define SCREEN_EFFECTS_RENDERER "SCREEN_EFFECTS"
#define INTERFACE_RENDERER "INTERFACE"
#define OPEN_SPACE_RENDERER "OPEN_SPACE"
#define WARP_EFFECT_RENDERER "WARP_EFFECT"
#define TEMPERATURE_EFFECT_RENDERER "TEMPERATURE"
#define HEAT_EFFECT_TARGET "*heat"
#define TEMPERATURE_COMPOSITE_TARGET "*tempc"
#define OBFUSCATION_RENDERER "OBFUSCATION"

#define SCENE_GROUP_RENDERER "SCENE_GROUP"
#define SCREEN_GROUP_RENDERER "SCREEN_GROUP"
#define FINAL_GROUP_RENDERER "FINAL_GROUP"

/// Semantics - The final compositor or a filter effect renderer
#define RENDER_GROUP_NONE null
Expand Down
46 changes: 46 additions & 0 deletions code/__defines/_render.dm
Original file line number Diff line number Diff line change
Expand Up @@ -279,6 +279,7 @@ INITIALIZE_IMMEDIATE(/atom/movable/renderer)
/atom/movable/renderer/scene_group/Initialize()
. = ..()
add_filter(WARP_EFFECT_RENDERER,0,list(type = "displace", render_source = "*warp", size = 5))
add_filter(TEMPERATURE_EFFECT_RENDERER, 0, list(type = "displace", render_source = TEMPERATURE_COMPOSITE_TARGET, size = 2.5))

/// Example of a warp filter for /renderer use
/obj/effect/effect/warp
Expand All @@ -289,6 +290,51 @@ INITIALIZE_IMMEDIATE(/atom/movable/renderer)
pixel_x = -176
pixel_y = -176

/// Renders temperature effects from cold/hot air
/atom/movable/renderer/heat
name = TEMPERATURE_EFFECT_RENDERER
group = RENDER_GROUP_NONE
plane = TEMPERATURE_EFFECT_PLANE
render_target_name = TEMPERATURE_COMPOSITE_TARGET
mouse_opacity = MOUSE_OPACITY_UNCLICKABLE

var/obj/gas_heat_object = null

/atom/movable/renderer/heat/Initialize(mapload, mob/owner)
. = ..()
Setup()

/atom/movable/renderer/heat/GraphicsUpdate()
. = ..()
Setup()

/atom/movable/renderer/heat/proc/Setup()
if(gas_heat_object)
vis_contents -= gas_heat_object
QDEL_NULL(gas_heat_object)

if(!owner?.client)
return

var/quality = owner.get_preference_value(/datum/client_preference/graphics_quality)

switch(quality)
if(GLOB.PREF_LOW)
gas_heat_object = new /atom/movable/heat_effect(null)
if(GLOB.PREF_MED)
gas_heat_object = new /atom/movable/particle_emitter/heat(null)
else
gas_heat_object = new /atom/movable/particle_emitter/heat/high(null)

vis_contents += gas_heat_object

/atom/movable/heat_effect
icon = 'icons/effects/fire.dmi'
icon_state = "3"
appearance_flags = PIXEL_SCALE | NO_CLIENT_COLOR
render_target = HEAT_EFFECT_TARGET
mouse_opacity = MOUSE_OPACITY_UNCLICKABLE


/* *
* This system works by exploiting BYONDs color matrix filter to use layers to handle emissive blockers.
Expand Down
2 changes: 2 additions & 0 deletions code/__defines/materials.dm
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
#define MATERIAL_OSMIUM_CARBIDE_PLASTEEL "osmium-carbide plasteel"
#define MATERIAL_OSMIUM "osmium"
#define MATERIAL_HYDROGEN "hydrogen"
#define MATERIAL_ADAMANTINE "adamantine"
#define MATERIAL_WASTE "waste"
#define MATERIAL_ELEVATORIUM "elevatorium"
#define MATERIAL_ALIUMIUM "aliumium"
Expand Down Expand Up @@ -84,6 +85,7 @@
MATERIAL_LEATHER = icon(MATERIALS_ICON, "leather"),
MATERIAL_IRON = icon(MATERIALS_ICON, "iron"),
MATERIAL_PLATINUM = icon(MATERIALS_ICON, "adamantine"),
MATERIAL_ADAMANTINE = icon(MATERIALS_ICON, "adamantine"),
MATERIAL_BRONZE = icon(MATERIALS_ICON, "bronze"),
MATERIAL_REINFORCED_GLASS = icon(MATERIALS_ICON, "rglass"),
MATERIAL_PLASS = icon(MATERIALS_ICON, "plass"),
Expand Down
26 changes: 26 additions & 0 deletions code/__defines/procpath.dm
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
/// Represents a proc or verb path.
///
/// Despite having no DM-defined static type, proc paths have some variables,
/// listed below. These are not modifiable, but for a given procpath P,
/// `new P(null, "Name", "Desc")` can be used to create a new procpath with the
/// same code but new `name` and `desc` values. The other variables cannot be
/// changed in this way.
///
/// This type exists only to act as an annotation, providing reasonable static
/// typing for procpaths. Previously, types like `/atom/verb` were used, with
/// the `name` and `desc` vars of `/atom` thus being accessible. Proc and verb
/// paths will fail `istype` and `ispath` checks against `/procpath`.
/procpath
// Although these variables are effectively const, if they are marked const
// below, their accesses are optimized away.

/// A text string of the verb's name.
var/name = null as text|null
/// The verb's help text or description.
var/desc = null as text|null
/// The category or tab the verb will appear in.
var/category = null as text|null
/// Only clients/mobs with `see_invisibility` higher can use the verb.
var/invisibility = null as num|null
/// Whether or not the verb appears in statpanel and commandbar when you press space
var/hidden = null as num|null
6 changes: 6 additions & 0 deletions code/__defines/prometheus.dm
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#define PROM_MASTER_ITERATIONS "master_iterations"
#define PROM_MASTER_TICK_DRIFT "master_tick_drift_ratio"
#define PROM_SUBSYSTEM_COST "subsystem_cost_seconds"
#define PROM_SUBSYSTEM_TICKS "subsystem_ticks_ratio"
#define PROM_SUBSYSTEM_TICK_USAGE "subsystem_tick_usage_ratio"
#define PROM_SUBSYSTEM_TICK_OVERRUN "subsystem_tick_overrun_ratio"
1 change: 0 additions & 1 deletion code/__defines/research.dm
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
#define TECH_MAGNET "magnets"
#define TECH_DATA "programming"
#define TECH_ILLEGAL "syndicate"
#define TECH_ARCANE "arcane"

#define IMPRINTER 0x1 //For circuits. Uses glass/chemicals.
#define PROTOLATHE 0x2 //New stuff. Uses glass/metal/chemicals
Expand Down
42 changes: 41 additions & 1 deletion code/__defines/rust_g.dm
Original file line number Diff line number Diff line change
Expand Up @@ -230,6 +230,46 @@
*/
#define rustg_generate_path_astar(start_node_id, goal_node_id) RUSTG_CALL(RUST_G, "generate_path_astar")("[start_node_id]", "[goal_node_id]")

#define rustg_prom_init(port) RUSTG_CALL(RUST_G, "prom_init")(istext(port) ? port : num2text(port))

#define rustg_prom_set_labels(labels) RUSTG_CALL(RUST_G, "prom_set_labels")(json_encode(labels))

// Counters

#define rustg_prom_counter_register(id, desc) RUSTG_CALL(RUST_G, "prom_counter_register")(id, desc)

#define rustg_prom_counter_inc(id, labels) RUSTG_CALL(RUST_G, "prom_counter_inc")(id, json_encode(labels))

#define rustg_prom_counter_inc_by(id, value, labels) RUSTG_CALL(RUST_G, "prom_counter_inc_by")(id, istext(value) ? value : num2text(value), json_encode(labels))

// Integer gauges

#define rustg_prom_gauge_int_register(id, desc) RUSTG_CALL(RUST_G, "prom_gauge_int_register")(id, desc)

#define rustg_prom_gauge_int_inc(id, labels) RUSTG_CALL(RUST_G, "prom_gauge_int_inc")(id, json_encode(labels))

#define rustg_prom_gauge_int_inc_by(id, value, labels) RUSTG_CALL(RUST_G, "prom_gauge_int_inc_by")(id, istext(value) ? value : num2text(value), json_encode(labels))

#define rustg_prom_gauge_int_dec(id, labels) RUSTG_CALL(RUST_G, "prom_gauge_int_dec")(id, json_encode(labels))

#define rustg_prom_gauge_int_dec_by(id, value, labels) RUSTG_CALL(RUST_G, "prom_gauge_int_dec_by")(id, istext(value) ? value : num2text(value), json_encode(labels))

#define rustg_prom_gauge_int_set(id, value, labels) RUSTG_CALL(RUST_G, "prom_gauge_int_set")(id, istext(value) ? value : num2text(value), json_encode(labels))

// Float gauges

#define rustg_prom_gauge_float_register(id, desc) RUSTG_CALL(RUST_G, "prom_gauge_float_register")(id, desc)

#define rustg_prom_gauge_float_inc(id, labels) RUSTG_CALL(RUST_G, "prom_gauge_float_inc")(id, json_encode(labels))

#define rustg_prom_gauge_float_inc_by(id, value, labels) RUSTG_CALL(RUST_G, "prom_gauge_float_inc_by")(id, istext(value) ? value : num2text(value), json_encode(labels))

#define rustg_prom_gauge_float_dec(id, labels) RUSTG_CALL(RUST_G, "prom_gauge_float_dec")(id), json_encode(labels)

#define rustg_prom_gauge_float_dec_by(id, value, labels) RUSTG_CALL(RUST_G, "prom_gauge_float_dec_by")(id, istext(value) ? value : num2text(value), json_encode(labels))

#define rustg_prom_gauge_float_set(id, value, labels) RUSTG_CALL(RUST_G, "prom_gauge_float_set")(id, istext(value) ? value : num2text(value), json_encode(labels))

// Simple

/// Returns a random integer in range from `i32::MIN` to `i32::MAX`
Expand All @@ -255,7 +295,7 @@

/// Returns a bool with a probability of numerator/denominator of being true. I.e. gen_ratio(2, 3) has chance of 2 in 3, or about 67%, of returning true.
/// If numerator == denominator, then the returned value is guaranteed to be true. If numerator == 0, then the returned value is guaranteed to be false.
#define rustg_rand_ratio(nominator, denominator) text2num(RUSTG_CALL(RUST_G, "rand_ratio")(istext(nominator) ? nominator : num2text(nominator), istext(denominator) ? denominator : num2text(denominator)))
#define rustg_rand_ratio(nominator, denominator) ext2num(RUSTG_CALL(RUST_G, "rand_ratio")(istext(nominator) ? nominator : num2text(nominator), istext(denominator) ? denominator : num2text(denominator)))

// Related to real-valued quantities that grow linearly (e.g. errors, offsets):

Expand Down
43 changes: 29 additions & 14 deletions code/__defines/species.dm
Original file line number Diff line number Diff line change
@@ -1,18 +1,33 @@
// Species flags.
#define SPECIES_FLAG_NO_MINOR_CUT 0x0001 // Can step on broken glass with no ill-effects. Either thick skin (diona/vox), cut resistant (metroids) or incorporeal (shadows)
#define SPECIES_FLAG_IS_PLANT 0x0002 // Is a treeperson.
#define SPECIES_FLAG_NO_SCAN 0x0004 // Cannot be scanned in a DNA machine/genome-stolen.
#define SPECIES_FLAG_NO_PAIN 0x0008 // Cannot suffer halloss/recieves deceptive health indicator.
#define SPECIES_FLAG_NO_SLIP 0x0010 // Cannot fall over.
#define SPECIES_FLAG_NO_POISON 0x0020 // Cannot not suffer toxloss.
#define SPECIES_FLAG_NO_EMBED 0x0040 // Can step on broken glass with no ill-effects and cannot have shrapnel embedded in it.
#define SPECIES_FLAG_CAN_NAB 0x0080 // Uses the special set of grab rules.
#define SPECIES_FLAG_NO_BLOCK 0x0100 // Unable to block or defend itself from attackers.
#define SPECIES_FLAG_NEED_DIRECT_ABSORB 0x0200 // This species can only have their DNA taken by direct absorption.
#define SPECIES_FLAG_NO_TANGLE 0x0400 // This species wont get tangled up in weeds
#define SPECIES_FLAG_NO_BLOOD 0x0800 // Cannot be drained by vampire, machine, diona, golem.
#define SPECIES_FLAG_NO_ANTAG_TARGET 0x1000 // Cannot be randomly chosen as a target for antag objectives or traitor contracts (i.e. assassination).
#define SPECIES_FLAG_NO_FIRE 0x2000 // Cannot be ignited
/// Can step on broken glass with no ill-effects. Either thick skin (diona/vox), cut resistant (metroids) or incorporeal (shadows)
#define SPECIES_FLAG_NO_MINOR_CUT (1<<1)
/// Is a treeperson.
#define SPECIES_FLAG_IS_PLANT (1<<2)
/// Cannot be scanned in a DNA machine/genome-stolen.
#define SPECIES_FLAG_NO_SCAN (1<<3)
/// Cannot suffer halloss/recieves deceptive health indicator.
#define SPECIES_FLAG_NO_PAIN (1<<4)
/// Cannot fall over.
#define SPECIES_FLAG_NO_SLIP (1<<5)
/// Cannot not suffer toxloss.
#define SPECIES_FLAG_NO_POISON (1<<6)
/// Can step on broken glass with no ill-effects and cannot have shrapnel embedded in it.
#define SPECIES_FLAG_NO_EMBED (1<<7)
/// Uses the special set of grab rules.
#define SPECIES_FLAG_CAN_NAB (1<<8)
/// Unable to block or defend itself from attackers.
#define SPECIES_FLAG_NO_BLOCK (1<<9)
/// This species can only have their DNA taken by direct absorption.
#define SPECIES_FLAG_NEED_DIRECT_ABSORB (1<<10)
/// This species wont get tangled up in weeds
#define SPECIES_FLAG_NO_TANGLE (1<<11)
/// Cannot be drained by vampire, machine, diona, golem.
#define SPECIES_FLAG_NO_BLOOD (1<<12)
/// Cannot be randomly chosen as a target for antag objectives or traitor contracts (i.e. assassination).
#define SPECIES_FLAG_NO_ANTAG_TARGET (1<<13)
/// Cannot be ignited
#define SPECIES_FLAG_NO_FIRE (1<<14)

// unused: 0x8000 - higher than this will overflow

// Species spawn flags
Expand Down
1 change: 1 addition & 0 deletions code/__defines/subsystem-priority.dm
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@

// SS_TICKER
#define SS_PRIORITY_CHAT 100
#define SS_PRIORITY_STATPANELS 95
#define SS_PRIORITY_THINK 90 // Datums thinking.
#define SS_PRIORITY_OVERLAYS 20
#define SS_PRIORITY_ICON_UPDATE 10 // Queued icon updates. Mostly used by APCs and tables.
Expand Down
1 change: 1 addition & 0 deletions code/__defines/subsystems.dm
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@
#define SS_INIT_EXPLOSIONS -69
#define SS_INIT_ANNOUNCERS -90
#define SS_INIT_VOTE -95
#define SS_INIT_STATPANELS -99
#define SS_INIT_ORDER_CHAT -100 // Should be last to ensure chat remains smooth during init.

// Explosion Subsystem subtasks
Expand Down
1 change: 1 addition & 0 deletions code/__defines/xenobiology.dm
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,4 @@
#define METROID_ACTIVATE_MAJOR 2

#define LUMINESCENT_DEFAULT_GLOW 2
#define LUMINESCENT_ENHANCED_GLOW 10
2 changes: 1 addition & 1 deletion code/_global_vars/bitfields.dm
Original file line number Diff line number Diff line change
Expand Up @@ -90,14 +90,14 @@ DEFINE_BITFIELD(species_flags, list(
"NO_SCAN" = SPECIES_FLAG_NO_SCAN,
"NO_PAIN" = SPECIES_FLAG_NO_PAIN,
"NO_SLIP" = SPECIES_FLAG_NO_SLIP,
"NO_POISON" = SPECIES_FLAG_NO_POISON,
"NO_EMBED" = SPECIES_FLAG_NO_EMBED,
"CAN_NAB" = SPECIES_FLAG_CAN_NAB,
"NO_BLOCK" = SPECIES_FLAG_NO_BLOCK,
"NEED_DIRECT_ABSORB" = SPECIES_FLAG_NEED_DIRECT_ABSORB,
"FLAG_NO_TANGLE" = SPECIES_FLAG_NO_TANGLE,
"NO_BLOOD" = SPECIES_FLAG_NO_BLOOD,
"NO_ANTAG_TARGET" = SPECIES_FLAG_NO_ANTAG_TARGET,
"FLAG_NO_TANGLE" = SPECIES_FLAG_NO_TANGLE,
"NO_FIRE" = SPECIES_FLAG_NO_FIRE,
))

Expand Down
Loading

0 comments on commit f67ad01

Please sign in to comment.