mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-25 14:08:31 +01:00
# Conflicts: # .github/CODEOWNERS # .github/workflows/compile_changelogs.yml # .github/workflows/stale.yml # SQL/database_changelog.md # _maps/map_files/CatwalkStation/CatwalkStation_2023.dmm # code/__DEFINES/atom_hud.dm # code/__DEFINES/inventory.dm # code/__DEFINES/mobs.dm # code/__DEFINES/species_clothing_paths.dm # code/__DEFINES/subsystems.dm # code/__DEFINES/surgery.dm # code/__HELPERS/global_lists.dm # code/_globalvars/lists/maintenance_loot.dm # code/_globalvars/traits/_traits.dm # code/controllers/subsystem/minor_mapping.dm # code/controllers/subsystem/processing/quirks.dm # code/controllers/subsystem/shuttle.dm # code/datums/components/palette.dm # code/datums/components/surgery_initiator.dm # code/datums/diseases/advance/advance.dm # code/datums/hud.dm # code/datums/mood.dm # code/datums/mutations/chameleon.dm # code/datums/quirks/negative_quirks/nyctophobia.dm # code/datums/status_effects/debuffs/debuffs.dm # code/datums/status_effects/debuffs/drunk.dm # code/datums/status_effects/debuffs/slime/slime_leech.dm # code/datums/weather/weather.dm # code/game/data_huds.dm # code/game/objects/items.dm # code/game/objects/items/devices/scanners/health_analyzer.dm # code/game/objects/items/frog_statue.dm # code/game/objects/items/rcd/RLD.dm # code/game/objects/items/robot/items/hypo.dm # code/game/objects/items/stacks/medical.dm # code/game/objects/items/stacks/wrap.dm # code/game/objects/items/storage/garment.dm # code/game/objects/items/tools/medical/defib.dm # code/game/objects/items/weaponry.dm # code/game/objects/items/weaponry/melee/misc.dm # code/game/objects/structures/crates_lockers/closets/secure/security.dm # code/game/objects/structures/curtains.dm # code/game/objects/structures/dresser.dm # code/game/objects/structures/girders.dm # code/game/objects/structures/maintenance.dm # code/game/objects/structures/mirror.dm # code/modules/admin/greyscale_modify_menu.dm # code/modules/admin/verbs/light_debug.dm # code/modules/antagonists/ashwalker/ashwalker.dm # code/modules/antagonists/heretic/knowledge/starting_lore.dm # code/modules/antagonists/ninja/ninjaDrainAct.dm # code/modules/art/paintings.dm # code/modules/client/preferences.dm # code/modules/client/verbs/ooc.dm # code/modules/clothing/head/wig.dm # code/modules/events/disease_outbreak.dm # code/modules/holodeck/holo_effect.dm # code/modules/jobs/job_types/head_of_security.dm # code/modules/jobs/job_types/security_officer.dm # code/modules/library/skill_learning/generic_skillchips/point.dm # code/modules/mining/lavaland/ash_flora.dm # code/modules/mining/lavaland/mining_loot/megafauna/ash_drake.dm # code/modules/mob/dead/new_player/new_player.dm # code/modules/mob/living/basic/guardian/guardian.dm # code/modules/mob/living/basic/space_fauna/space_dragon/space_dragon.dm # code/modules/mob/living/carbon/carbon.dm # code/modules/mob/living/carbon/human/human.dm # code/modules/mob/living/carbon/human/human_defines.dm # code/modules/mob/living/carbon/life.dm # code/modules/mob/living/living.dm # code/modules/mob/living/living_defines.dm # code/modules/mob/mob.dm # code/modules/mob_spawn/ghost_roles/mining_roles.dm # code/modules/mod/mod_control.dm # code/modules/mod/modules/modules_general.dm # code/modules/modular_computers/computers/item/computer_ui.dm # code/modules/paperwork/paper.dm # code/modules/paperwork/paperbin.dm # code/modules/power/lighting/light.dm # code/modules/projectiles/guns/energy/kinetic_accelerator.dm # code/modules/projectiles/projectile.dm # code/modules/reagents/chemistry/reagents/drinks/alcohol_reagents.dm # code/modules/reagents/chemistry/reagents/food_reagents.dm # code/modules/reagents/chemistry/reagents/other_reagents.dm # code/modules/reagents/chemistry/reagents/pyrotechnic_reagents.dm # code/modules/research/xenobiology/crossbreeding/_clothing.dm # code/modules/research/xenobiology/crossbreeding/prismatic.dm # code/modules/surgery/advanced/brainwashing.dm # code/modules/surgery/advanced/lobotomy.dm # code/modules/surgery/amputation.dm # code/modules/surgery/blood_filter.dm # code/modules/surgery/bodyparts/_bodyparts.dm # code/modules/surgery/brain_surgery.dm # code/modules/surgery/cavity_implant.dm # code/modules/surgery/coronary_bypass.dm # code/modules/surgery/gastrectomy.dm # code/modules/surgery/healing.dm # code/modules/surgery/limb_augmentation.dm # code/modules/surgery/organ_manipulation.dm # code/modules/surgery/revival.dm # code/modules/surgery/sleeper_protocol.dm # code/modules/surgery/surgery_helpers.dm # code/modules/surgery/surgery_step.dm # code/modules/unit_tests/_unit_tests.dm # code/modules/unit_tests/designs.dm # code/modules/unit_tests/icon_state_worn.dm # code/modules/unit_tests/screenshots/screenshot_antag_icons_cultist.png # code/modules/unit_tests/screenshots/screenshot_antag_icons_headrevolutionary.png # code/modules/unit_tests/screenshots/screenshot_antag_icons_provocateur.png # code/modules/unit_tests/screenshots/screenshot_husk_body.png # code/modules/unit_tests/screenshots/screenshot_husk_body_missing_limbs.png # icons/map_icons/clothing/head/_head.dmi # icons/map_icons/clothing/shoes.dmi # icons/map_icons/items/_item.dmi # icons/mob/huds/hud.dmi # icons/mob/inhands/64x64_lefthand.dmi # icons/mob/inhands/64x64_righthand.dmi # icons/obj/machines/computer.dmi # tgui/packages/tgui/interfaces/OperatingComputer.jsx # tgui/packages/tgui/interfaces/PreferencesMenu/CharacterPreferences/MainPage.tsx # tgui/packages/tgui/interfaces/PreferencesMenu/types.ts # tgui/packages/tgui/interfaces/SurgeryInitiator.tsx # tools/icon_cutter/check.py
140 lines
6.8 KiB
Plaintext
140 lines
6.8 KiB
Plaintext
/// Object doesn't use any of the light systems. Should be changed to add a light source to the object.
|
|
#define NO_LIGHT_SUPPORT 0
|
|
/// Light made with the lighting datums, applying a matrix.
|
|
#define COMPLEX_LIGHT 1
|
|
/// Light made by masking the lighting darkness plane.
|
|
#define OVERLAY_LIGHT 2
|
|
/// Light made by masking the lighting darkness plane, and is directional.
|
|
#define OVERLAY_LIGHT_DIRECTIONAL 3
|
|
///Light made by masking the lighting darkness plane, and is a directionally focused beam.
|
|
#define OVERLAY_LIGHT_BEAM 4
|
|
/// Nonesensical value for light color, used for null checks.
|
|
#define NONSENSICAL_VALUE -99999
|
|
|
|
/// Is our overlay light source attached to another movable (its loc), meaning that the lighting component should go one level deeper.
|
|
#define LIGHT_ATTACHED (1<<0)
|
|
/// Freezes a light in its current state, blocking any attempts at modification
|
|
#define LIGHT_FROZEN (1<<1)
|
|
/// Does this light ignore inherent offsets? (Pixels, transforms, etc)
|
|
#define LIGHT_IGNORE_OFFSET (1<<2)
|
|
|
|
#define MINIMUM_USEFUL_LIGHT_RANGE 1.5 // SKYRAT EDIT CHANGE - Original value 1.4
|
|
|
|
/// light UNDER the floor. primarily used for starlight, shouldn't fuck with this
|
|
#define LIGHTING_HEIGHT_SPACE -0.5
|
|
/// light ON the floor
|
|
#define LIGHTING_HEIGHT_FLOOR 0
|
|
/// height off the ground of light sources on the pseudo-z-axis, you should probably leave this alone
|
|
#define LIGHTING_HEIGHT 1
|
|
/// Value used to round lumcounts, values smaller than 1/129 don't matter (if they do, thanks sinking points), greater values will make lighting less precise, but in turn increase performance, VERY SLIGHTLY.
|
|
#define LIGHTING_ROUND_VALUE (1 / 64)
|
|
|
|
/// icon used for lighting shading effects
|
|
#define LIGHTING_ICON 'icons/effects/lighting_object.dmi'
|
|
|
|
/// If the max of the lighting lumcounts of each spectrum drops below this, disable luminosity on the lighting objects.
|
|
/// Set to zero to disable soft lighting. Luminosity changes then work if it's lit at all.
|
|
#define LIGHTING_SOFT_THRESHOLD 0
|
|
|
|
///How many tiles standard fires glow.
|
|
#define LIGHT_RANGE_FIRE 3
|
|
#define LIGHT_FIRE_BLOSSOM 2.1
|
|
#define LIGHT_RANGE_FIRE_BLOSSOM_HARVESTED 2.7
|
|
#define LIGHT_POWER_FIRE_BLOSSOM_HARVESTED 1.5
|
|
|
|
// Lighting cutoff defines
|
|
// These are a percentage of how much darkness to cut off (in rgb)
|
|
#define LIGHTING_CUTOFF_VISIBLE 0
|
|
#define LIGHTING_CUTOFF_REAL_LOW 4.5
|
|
#define LIGHTING_CUTOFF_LOW 10
|
|
#define LIGHTING_CUTOFF_MEDIUM 15
|
|
#define LIGHTING_CUTOFF_HIGH 30
|
|
#define LIGHTING_CUTOFF_FULLBRIGHT 100
|
|
|
|
/// What counts as being able to see in the dark
|
|
#define LIGHTING_NIGHTVISION_THRESHOLD 7
|
|
|
|
/// The amount of lumcount on a tile for it to be considered dark (used to determine reading and nyctophobia)
|
|
#define LIGHTING_TILE_IS_DARK 0.2
|
|
|
|
/// Weight of overlay lighting, in percentage of contribution towards total light
|
|
#define OVERLAY_LIGHTING_WEIGHT 0.4
|
|
|
|
//code assumes higher numbers override lower numbers.
|
|
#define LIGHTING_NO_UPDATE 0
|
|
#define LIGHTING_VIS_UPDATE 1
|
|
#define LIGHTING_CHECK_UPDATE 2
|
|
#define LIGHTING_FORCE_UPDATE 3
|
|
|
|
#define FLASH_LIGHT_DURATION 2
|
|
#define FLASH_LIGHT_POWER 2
|
|
#define FLASH_LIGHT_RANGE 3.8
|
|
|
|
// Emissive blocking.
|
|
/// Uses vis_overlays to leverage caching so that very few new items need to be made for the overlay. For anything that doesn't change outline or opaque area much or at all.
|
|
#define EMISSIVE_BLOCK_GENERIC 0
|
|
/// Uses a dedicated render_target object to copy the entire appearance in real time to the blocking layer. For things that can change in appearance a lot from the base state, like humans.
|
|
#define EMISSIVE_BLOCK_UNIQUE 1
|
|
/// Don't block any emissives. Useful for things like, pieces of paper?
|
|
#define EMISSIVE_BLOCK_NONE 2
|
|
|
|
#define _EMISSIVE_COLOR(val) list(0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,1, val,0,0,0)
|
|
#define _EMISSIVE_COLOR_NO_BLOOM(val) list(0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,1, 0,val,0,0)
|
|
#define _SPECULAR_COLOR(val) list(0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,1, 0,0,val,0)
|
|
/// The color matrix applied to all emissive overlays. Should be solely dependent on alpha and not have RGB overlap with [EM_BLOCK_COLOR].
|
|
#define EMISSIVE_COLOR _EMISSIVE_COLOR(1)
|
|
#define EMISSIVE_COLOR_NO_BLOOM _EMISSIVE_COLOR_NO_BLOOM(1)
|
|
#define SPECULAR_COLOR _SPECULAR_COLOR(1)
|
|
/// A globally cached version of [EMISSIVE_COLOR] for quick access.
|
|
GLOBAL_LIST_INIT(emissive_color, EMISSIVE_COLOR)
|
|
GLOBAL_LIST_INIT(emissive_color_no_bloom, EMISSIVE_COLOR_NO_BLOOM)
|
|
GLOBAL_LIST_INIT(specular_color, SPECULAR_COLOR)
|
|
|
|
// Types of emissives
|
|
/// Emissive that will not have bloom applied to it, encoded into the green channel
|
|
#define EMISSIVE_NO_BLOOM 0
|
|
/// Emissive that will get bloom applied to it, encoded into the red channel
|
|
#define EMISSIVE_BLOOM 1
|
|
/// Mimics a highly reflective surface, will not have any glow by itself but will amplify any lighting applied to it, encoded into the blue channel
|
|
#define EMISSIVE_SPECULAR 2
|
|
|
|
/// Light cutoff of specular emissives, controls how sharp a light must be before it starts reflecting
|
|
#define SPECULAR_EMISSIVE_CUTOFF 0.3
|
|
/// Controls how bright specular emissives sourced from overlay lights are
|
|
/// Keep in mind that overlay lights are also affected by the specular cutoff, so the maximum light value achievable is (contrast - cutoff)
|
|
#define SPECULAR_EMISSIVE_OVERLAY_CONTRAST 1.4
|
|
|
|
#define _EM_BLOCK_COLOR(val) list(0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,val, 0,0,0,0)
|
|
/// The color matrix applied to all emissive blockers. Should be solely dependent on alpha and not have RGB overlap with [EMISSIVE_COLOR].
|
|
#define EM_BLOCK_COLOR _EM_BLOCK_COLOR(1)
|
|
/// A globally cached version of [EM_BLOCK_COLOR] for quick access.
|
|
GLOBAL_LIST_INIT(em_block_color, EM_BLOCK_COLOR)
|
|
|
|
/// A set of appearance flags applied to all emissive and emissive blocker overlays.
|
|
/// KEEP_APART to prevent parent hooking, KEEP_TOGETHER for children, and we reset the color of our parent so emissives get proper coloring based on [EMISSIVE_COLOR]
|
|
#define EMISSIVE_APPEARANCE_FLAGS (KEEP_APART|KEEP_TOGETHER|RESET_COLOR)
|
|
/// The color matrix used to mask out emissive blockers on the emissive plane. Alpha should default to zero, be solely dependent on the RGB value of [EMISSIVE_COLOR], and be independent of the RGB value of [EM_BLOCK_COLOR].
|
|
#define EM_MASK_MATRIX list(0,0,0,1/3, 0,0,0,1/3, 0,0,0,1/3, 0,0,0,0, 1,1,1,0)
|
|
/// A globally cached version of [EM_MASK_MATRIX] for quick access.
|
|
GLOBAL_LIST_INIT(em_mask_matrix, EM_MASK_MATRIX)
|
|
|
|
/// Maximum selectable value for emissive bloom, minimum being 0 which just disables it outright
|
|
#define MAXIMUM_EMISSIVE_BLOOM_SIZE 5
|
|
/// Default value for emissive bloom
|
|
#define DEFAULT_EMISSIVE_BLOOM_SIZE 2
|
|
|
|
/// Parse the hexadecimal color into lumcounts of each perspective.
|
|
#define PARSE_LIGHT_COLOR(source) \
|
|
do { \
|
|
if (source.light_color != COLOR_WHITE) { \
|
|
var/list/color_parts = rgb2num(source.light_color); \
|
|
source.lum_r = color_parts[1] / 255; \
|
|
source.lum_g = color_parts[2] / 255; \
|
|
source.lum_b = color_parts[3] / 255; \
|
|
} else { \
|
|
source.lum_r = 1; \
|
|
source.lum_g = 1; \
|
|
source.lum_b = 1; \
|
|
}; \
|
|
} while (FALSE)
|