Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/dev' into fix-a-star
Browse files Browse the repository at this point in the history
  • Loading branch information
Doster-d committed Apr 11, 2024
2 parents 4299182 + e6806cb commit 0b054cd
Show file tree
Hide file tree
Showing 993 changed files with 24,603 additions and 13,081 deletions.
65 changes: 48 additions & 17 deletions baystation12.dme

Large diffs are not rendered by default.

49 changes: 0 additions & 49 deletions code/__defines/MC.dm
Original file line number Diff line number Diff line change
Expand Up @@ -73,55 +73,6 @@ if(Datum.is_processing) {\
// This flag overrides SS_KEEP_TIMING
#define SS_POST_FIRE_TIMING 64

//! ## Timing subsystem
/**
* Don't run if there is an identical unique timer active
*
* if the arguments to addtimer are the same as an existing timer, it doesn't create a new timer,
* and returns the id of the existing timer
*/
#define TIMER_UNIQUE (1<<0)

/// For unique timers: Replace the old timer rather then not start this one
#define TIMER_OVERRIDE (1<<1)

/**
* Timing should be based on how timing progresses on clients, not the server.
*
* Tracking this is more expensive,
* should only be used in conjuction with things that have to progress client side, such as
* animate() or sound()
*/
#define TIMER_CLIENT_TIME (1<<2)

/// Timer can be stopped using deltimer()
#define TIMER_STOPPABLE (1<<3)

/// prevents distinguishing identical timers with the wait variable
///
/// To be used with TIMER_UNIQUE
#define TIMER_NO_HASH_WAIT (1<<4)

/// Loops the timer repeatedly until qdeleted
///
/// In most cases you want a subsystem instead, so don't use this unless you have a good reason
#define TIMER_LOOP (1<<5)

/// Delete the timer on parent datum Destroy() and when deltimer'd
#define TIMER_DELETE_ME (1<<6)

/// Empty ID define
#define TIMER_ID_NULL -1

/**
Create a new timer and add it to the queue.
* Arguments:
* * callback the callback to call on timer finish
* * wait deciseconds to run the timer for
* * flags flags for this timer, see: code\__DEFINES\subsystems.dm
*/
#define addtimer(args...) _addtimer(args, file = __FILE__, line = __LINE__)

//SUBSYSTEM STATES
#define SS_IDLE 0 //aint doing shit.
#define SS_QUEUED 1 //queued to run
Expand Down
2 changes: 1 addition & 1 deletion code/__defines/__initialization.dm
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
#define INITIALIZE_HINT_QDEL 2 //Call qdel on the atom
#define INITIALIZE_HINT_QDEL_FORCE 3// Call qdel with a force of TRUE after initialization

#define ATOM_FLAG_INITIALIZED 0x0001 // The atom has been initialized. Also see flags.dm
#define ATOM_FLAG_INITIALIZED (1<<0) // The atom has been initialized. Also see flags.dm

//type and all subtypes should always call Initialize in New()
#define INITIALIZE_IMMEDIATE(X) ##X/New(loc, ...){\
Expand Down
2 changes: 1 addition & 1 deletion code/__defines/__qdel.dm
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,6 @@
#define QDEL_NULL(x) if(x) { qdel(x) ; x = null }
#define QDEL_LIST(L) if(L) { for(var/I in L) qdel(I); L.Cut(); }
#define QDEL_NULL_LIST(x) if(x) { for(var/y in x) { qdel(y) } ; x = null }
#define QDEL_IN(item, time) addtimer(CALLBACK(GLOBAL_PROC, /proc/qdel, time > GC_FILTER_QUEUE ? weakref(item) : item), time, TIMER_STOPPABLE)
#define QDEL_IN(item, ttl) spawn(ttl) {qdel(item)}
#define QDEL_LIST_ASSOC(L) if(L) { for(var/I in L) { qdel(L[I]); qdel(I); } L.Cut(); }
#define QDEL_LIST_ASSOC_VAL(L) if(L) { for(var/I in L) qdel(L[I]); L.Cut(); }
47 changes: 27 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,28 @@

//-------------------- 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 STEAM_EFFECT_TARGET "*steam"
#define STEAM_COMPOSITE_TARGET "*steamc"
#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
61 changes: 61 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,66 @@ 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
var/obj/steam_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(steam_object)
vis_contents -= steam_object
QDEL_NULL(steam_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)
steam_object = new /atom/movable/steam_effect(null)
if(GLOB.PREF_MED)
gas_heat_object = new /atom/movable/particle_emitter/heat(null)
steam_object = new /atom/movable/particle_emitter/steam(null)
else
gas_heat_object = new /atom/movable/particle_emitter/heat/high(null)
steam_object = new /atom/movable/particle_emitter/steam(null)

vis_contents += gas_heat_object
vis_contents += steam_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

/atom/movable/steam_effect
icon = 'icons/effects/effects.dmi'
icon_state = "smoke"
appearance_flags = PIXEL_SCALE | NO_CLIENT_COLOR
render_target = STEAM_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
12 changes: 12 additions & 0 deletions code/__defines/ces/signals_atom.dm
Original file line number Diff line number Diff line change
Expand Up @@ -30,3 +30,15 @@

/// Called on `/atom/movable/set_glide_size` (new_glide_size)
#define SIGNAL_UPDATE_GLIDE_SIZE "movable_glide_size"

/// Called on `/atom/proc/examine` (mob/user, list/examine_result)
#define SIGNAL_EXAMINED "examined"

/// Called on `/atom/proc/examine` (mob/user, list/examine_result)
#define SIGNAL_EXAMINED_MORE "examined_more"

/// Called on `/atom/AltClick` (/atom)
#define SIGNAL_ALT_CLICKED "atom_alt_click"

/// Called on `/atom/CtrlAltClick` (/atom)
#define SIGNAL_CTRL_ALT_CLICKED "atom_ctrl_alt_click"
9 changes: 6 additions & 3 deletions code/__defines/ces/signals_mob.dm
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,11 @@
/// from turf CtrlClickOn(): (/mob)
#define SIGNAL_MOB_CTRL_CLICK "mob_ctrl_click"

/// Called on '/mob/proc/add_spell' (/mob, )
#define SIGNAL_MOB_SPELL_LEARNED "mob_spell_learned"

/// Called on '/mob/proc/update_movespeed()' (/mob)
#define SIGNAL_MOB_MOVESPEED_UPDATED "mob_movespeed_updated"

/// Called on `/atom/proc/examine` (mob/user, list/examine_result)
#define SIGNAL_MOB_EXAMINED "mob_examined"

/// Called on `/atom/proc/examine` (mob/user, list/examine_result)
#define SIGNAL_MOB_EXAMINED_MORE "mob_examined_more"
1 change: 1 addition & 0 deletions code/__defines/dna.dm
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
#define MUTATION_LASER 8 // Harm intent - click anywhere to shoot lasers from eyes.
#define MUTATION_SKELETON 9
#define MUTATION_BARTENDER 10 // You can professionally do miracles with bottles and other vessels
#define MUTATION_STRONG 11 // Basically hulk, but without greens.

// Other Mutations:
#define mRemotetalk 100 // Remote talking.
Expand Down
45 changes: 32 additions & 13 deletions code/__defines/flags.dm
Original file line number Diff line number Diff line change
Expand Up @@ -12,20 +12,39 @@ GLOBAL_LIST_INIT(bitflags, list(1, 2, 4, 8, 16, 32, 64, 128, 256, 512, 1024, 204
// Flags bitmasks.

// NOTE: We declare ATOM_FLAG_INITIALIZED earlier, in __initialization.dm, as FLAG(0)
#define ATOM_FLAG_CHECKS_BORDER 0x0002 // If a dense atom (potentially) only blocks movements from a given direction, i.e. window panes
#define ATOM_FLAG_CLIMBABLE 0x0004 // This object can be climbed on
#define ATOM_FLAG_NO_BLOOD 0x0008 // Used for items if they don't want to get a blood overlay.
#define ATOM_FLAG_NO_REACT 0x0010 // Reagents don't react inside this container.
#define ATOM_FLAG_OPEN_CONTAINER 0x0020 // Is an open container for chemistry purposes.
#define ATOM_FLAG_FULLTILE_OBJECT 0x0040 // Blocks interactions with most atoms on the same tile, except mobs, items and anything that has the flag below, i.e. fulltile windows
#define ATOM_FLAG_ADJACENT_EXCEPTION 0x0080 // Skips adjacent checks for atoms that should always be reachable in window tiles
#define ATOM_FLAG_IGNORE_RADIATION 0x0100 // It will not produce any radiation when it will be a radiation source.
#define ATOM_AWAITING_OVERLAY_UPDATE 0x0400 // SSoverlays must update this atom's overlays.
#define ATOM_FLAG_SILENTCONTAINER 0x0800 // Chemical reaction won't trigger bubbling sound
#define ATOM_FLAG_UNPUSHABLE 0x1000 // This atom can't be pushed when bumped
/// If a dense atom (potentially) only blocks movements from a given direction, i.e. window panes
#define ATOM_FLAG_CHECKS_BORDER (1<<1)
/// This object can be climbed on.
#define ATOM_FLAG_CLIMBABLE (1<<2)
/// Used for items if they don't want to get a blood overlay.
#define ATOM_FLAG_NO_BLOOD (1<<3)
/// Reagents don't react inside this container.
#define ATOM_FLAG_NO_REACT (1<<4)
/// Is an open container for chemistry purposes.
#define ATOM_FLAG_OPEN_CONTAINER (1<<5)
/// Blocks interactions with most atoms on the same tile, except mobs, items and anything that has the flag below, i.e. fulltile windows.
#define ATOM_FLAG_FULLTILE_OBJECT (1<<6)
/// Skips adjacent checks for atoms that should always be reachable in window tiles.
#define ATOM_FLAG_ADJACENT_EXCEPTION (1<<7)
/// It will not produce any radiation when it will be a radiation source.
#define ATOM_FLAG_IGNORE_RADIATION (1<<8)
/// SSoverlays must update this atom's overlays.
#define ATOM_AWAITING_OVERLAY_UPDATE (1<<9)
/// Chemical reaction won't trigger bubbling sound.
#define ATOM_FLAG_SILENTCONTAINER (1<<10)
/// This atom can't be pushed when bumped.
#define ATOM_FLAG_UNPUSHABLE (1<<11)
/// This atom was spawned inside a holodeck as a hologram, handle accrodingly.
#define ATOM_FLAG_HOLOGRAM (1<<12)
/// This atom can'be deconstructed by a normal means.
#define ATOM_FLAG_NO_DECONSTRUCTION (1<<13)

#define OBJ_FLAG_ANCHORABLE 0x0001 // This object can be stuck in place with a tool
#define OBJ_FLAG_CONDUCTIBLE 0x0002 // Conducts electricity. (metal etc.)
/// This object can be stuck in place with a tool
#define OBJ_FLAG_ANCHORABLE (1<<0)
/// Conducts electricity. (metal etc.)
#define OBJ_FLAG_CONDUCTIBLE (1<<1)
/// Can't rotate while anchored
#define OBJ_FLAG_ANCHOR_BLOCKS_ROTATION (1<<2)

#define MOB_FLAG_HOLY_BAD 0x001 // If this mob is allergic to holiness

Expand Down
30 changes: 20 additions & 10 deletions code/__defines/languages.dm
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,23 @@
#define LANGUAGE_SPIDER "Spider"

// Language flags.
#define WHITELISTED 1 // Language is available if the speaker is whitelisted.
#define RESTRICTED 2 // Language can only be acquired by spawning or an admin.
#define NONVERBAL 4 // Language has a significant non-verbal component. Speech is garbled without line-of-sight.
#define SIGNLANG 8 // Language is completely non-verbal. Speech is displayed through emotes for those who can understand.
#define HIVEMIND 16 // Broadcast to all mobs with this language.
#define NONGLOBAL 32 // Do not add to general languages list.
#define INNATE 64 // All mobs can be assumed to speak and understand this language. (audible emotes)
#define NO_TALK_MSG 128 // Do not show the "\The [speaker] talks into \the [radio]" message
#define NO_STUTTER 256 // No stuttering, slurring, or other speech problems
#define ALT_TRANSMIT 512 // Language is not based on vision or sound (Todo: add this into the say code and use it for the rootspeak languages)
/// Language is available if the speaker is whitelisted
#define WHITELISTED (1<<0)
/// Language can only be acquired by spawning or an admin.
#define RESTRICTED (1<<1)
/// Language has a significant non-verbal component. Speech is garbled without line-of-sight.
#define NONVERBAL (1<<2)
/// Language is completely non-verbal. Speech is displayed through emotes for those who can understand.
#define SIGNLANG (1<<3)
/// Broadcast to all mobs with this language.
#define HIVEMIND (1<<4)
/// Do not add to general languages list.
#define NONGLOBAL (1<<5)
/// All mobs can be assumed to speak and understand this language. (audible emotes)
#define INNATE (1<<6)
/// Do not show the "\The [speaker] talks into \the [radio]" message
#define NO_TALK_MSG (1<<7)
/// No stuttering, slurring, or other speech problems
#define NO_STUTTER (1<<8)
/// Language is not based on vision or sound (Todo: add this into the say code and use it for the rootspeak languages)
#define ALT_TRANSMIT (1<<9)
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
3 changes: 0 additions & 3 deletions code/__defines/misc.dm
Original file line number Diff line number Diff line change
Expand Up @@ -252,9 +252,6 @@
#define CLIENT_FROM_VAR(I) (ismob(I) ? I:client : (istype(I, /client) ? I : (istype(I, /datum/mind) ? I:current?:client : null)))
#define GRAYSCALE list(0.3,0.3,0.3,0,0.59,0.59,0.59,0,0.11,0.11,0.11,0,0,0,0,1,0,0,0,0)

#define ADD_VERB_IN(the_atom,time,verb) addtimer(CALLBACK(the_atom, nameof(/atom.proc/add_verb), verb), time, TIMER_UNIQUE | TIMER_OVERRIDE | TIMER_NO_HASH_WAIT)
#define ADD_VERB_IN_IF(the_atom,time,verb,callback) addtimer(CALLBACK(the_atom, nameof(/atom.proc/add_verb), verb, callback), time, TIMER_UNIQUE | TIMER_OVERRIDE | TIMER_NO_HASH_WAIT)

//Wiki book styles
#define WIKI_FULL 1 // This is a standart web page. Beware, navigaton throw the internet is allowed!
#define WIKI_MINI 2 // This is a beautiful copy of wiki topic. Beware, font is really small!
Expand Down
1 change: 1 addition & 0 deletions code/__defines/mobs.dm
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@

// Grab Types
#define GRAB_NORMAL "normal"
#define GRAB_QUICKCHOKE "choke"

// Grab levels.
#define NORM_PASSIVE "normal passive"
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
Loading

0 comments on commit 0b054cd

Please sign in to comment.