Skip to content

Commit

Permalink
Merge branch 'master' into dropship_rotation_sprites
Browse files Browse the repository at this point in the history
  • Loading branch information
mullenpaul committed Sep 6, 2023
2 parents a3533f7 + 0537cfb commit a95af59
Show file tree
Hide file tree
Showing 416 changed files with 21,259 additions and 17,608 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/autowiki.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ permissions:

jobs:
autowiki:
runs-on: ubuntu-20.04
runs-on: ubuntu-latest
steps:
- name: "Check for AUTOWIKI_USERNAME"
id: secrets_set
Expand All @@ -32,7 +32,7 @@ jobs:
run: |
sudo dpkg --add-architecture i386
sudo apt update || true
sudo apt install -o APT::Immediate-Configure=false libssl1.1:i386
sudo apt install -o APT::Immediate-Configure=false zlib1g-dev:i386 libssl-dev:i386
bash tools/ci/install_rust_g.sh
- name: Compile and generate Autowiki files
if: steps.secrets_set.outputs.SECRETS_ENABLED
Expand Down
5 changes: 1 addition & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
## CM-SS13 codebase

[![resentment](https://forthebadge.com/images/badges/built-with-resentment.svg)](https://www.monkeyuser.com/assets/images/2019/131-bug-free.png) [![resentment](https://forthebadge.com/images/badges/contains-technical-debt.svg)](https://user-images.githubusercontent.com/8171642/50290880-ffef5500-043a-11e9-8270-a2e5b697c86c.png) [![forinfinityandbyond](https://user-images.githubusercontent.com/5211576/29499758-4efff304-85e6-11e7-8267-62919c3688a9.gif)](https://www.reddit.com/r/SS13/comments/5oplxp/what_is_the_main_problem_with_byond_as_an_engine/dclbu1a)
<a href="https://www.monkeyuser.com/assets/images/2019/131-bug-free.png"><img src="https://img.shields.io/badge/Built_with-Resentment-orange?style=for-the-badge&labelColor=%23D47439&color=%23C36436" width=260px></a> <a href="https://user-images.githubusercontent.com/8171642/50290880-ffef5500-043a-11e9-8270-a2e5b697c86c.png"><img src="https://img.shields.io/badge/Contains-Technical_Debt-blue?style=for-the-badge&color=5598D0&labelColor=62C1EE" width=280px></a> [![forinfinityandbyond](https://user-images.githubusercontent.com/5211576/29499758-4efff304-85e6-11e7-8267-62919c3688a9.gif)](https://www.reddit.com/r/SS13/comments/5oplxp/what_is_the_main_problem_with_byond_as_an_engine/dclbu1a)

[![Build Status](https://github.com/cmss13-devs/cmss13/workflows/CI%20Suite/badge.svg)](https://github.com/cmss13-devs/cmss13/actions?query=workflow%3A%22CI+Suite%22)

* **Website:** https://forum.cm-ss13.com/
* **Code:** https://github.com/cmss13-devs/cmss13
* **Wiki:** https://cm-ss13.com/wiki/Main_Page
Expand Down Expand Up @@ -36,5 +35,3 @@ The code for CM-SS13 is licensed under the [GNU Affero General Public License v3
Assets including icons and sound are under the [Creative Commons 3.0 BY-SA license](https://creativecommons.org/licenses/by-sa/3.0/) unless otherwise indicated. Authorship for assets including art and sound under the CC BY-SA license is defined as the active development team of CM-SS13 unless stated otherwise (by author of the commit).

All code is assumed to be licensed under AGPL v3 unless stated otherwise by file header. Commits before 9a001bf520f889b434acd295253a1052420860af are assumed to be licensed under GPLv3 and can be used in closed source repo.


3 changes: 3 additions & 0 deletions code/__DEFINES/colours.dm
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,9 @@
*
* Important note: colours can end up significantly different from the basic html picture, especially when saturated
*/

/// Full white. rgb(255, 255, 255)
#define LIGHT_COLOR_WHITE "#FFFFFF"
/// Bright but quickly dissipating neon green. rgb(100, 200, 100)
#define LIGHT_COLOUR_GREEN "#64C864"
/// Electric green. rgb(0, 255, 0)
Expand Down
7 changes: 6 additions & 1 deletion code/__DEFINES/conflict.dm
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@
#define GUN_ANTIQUE (1<<13)
/// Whether the gun has been fired by its current user (reset upon `dropped()`)
#define GUN_RECOIL_BUILDUP (1<<14)
/// support weapon, bipod will grant IFF
/// support weapon, bipod will grant autofire
#define GUN_SUPPORT_PLATFORM (1<<15)
/// No gun description, only base desc
#define GUN_NO_DESCRIPTION (1<<16)
Expand All @@ -90,6 +90,8 @@
#define ATTACH_IGNORE_EMPTY (1<<5)
/// This attachment should activate if you attack() with it attached.
#define ATTACH_MELEE (1<<6)
/// Override for attachies so you can fire them with a single hand . ONLY FOR PROJECTILES!!
#define ATTACH_WIELD_OVERRIDE (1<<7)

//Ammo magazine defines, for flags_magazine

Expand All @@ -99,6 +101,8 @@
#define AMMUNITION_HANDFUL_BOX (1<<2)
#define AMMUNITION_HIDE_AMMO (1<<3)
#define AMMUNITION_CANNOT_REMOVE_BULLETS (1<<4)
/// If this magazine can transfer to other magazines of the same type by slapping one with the other
#define AMMUNITION_SLAP_TRANSFER (1<<5)
//Slowdown from various armors.

/// How much shoes slow you down by default. Negative values speed you up
Expand Down Expand Up @@ -216,6 +220,7 @@
#define UNIFORM_HAS_SENSORS 1
#define UNIFORM_FORCED_SENSORS 2

#define EYE_PROTECTION_NEGATIVE -1
#define EYE_PROTECTION_NONE 0
#define EYE_PROTECTION_FLAVOR 1
#define EYE_PROTECTION_FLASH 2
Expand Down
1 change: 1 addition & 0 deletions code/__DEFINES/cooldowns.dm
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
#define COOLDOWN_HIJACK_BARRAGE "gamemode_explosive_barrage"
#define COOLDOWN_HIJACK_GROUND_CHECK "gamemode_ground_check"
#define COOLDOWN_ITEM_HOOD_SOUND "item_hood_sound"
#define COOLDOWN_LIGHT "cooldown_light"

//Define for ship alt
#define COOLDOWN_ALTITUDE_CHANGE "altitude_change"
Expand Down
17 changes: 17 additions & 0 deletions code/__DEFINES/dcs/signals/atom/signals_atom.dm
Original file line number Diff line number Diff line change
Expand Up @@ -26,5 +26,22 @@
///from /turf/ChangeTurf
#define COMSIG_ATOM_TURF_CHANGE "movable_turf_change"

//from atom/set_light(): (l_range, l_power, l_color)
#define COMSIG_ATOM_SET_LIGHT "atom_set_light"

///Called right before the atom changes the value of light_range to a different one, from base atom/set_light_range(): (new_range)
#define COMSIG_ATOM_SET_LIGHT_RANGE "atom_set_light_range"
///Called right before the atom changes the value of light_power to a different one, from base atom/set_light_power(): (new_power)
#define COMSIG_ATOM_SET_LIGHT_POWER "atom_set_light_power"
///Called right before the atom changes the value of light_color to a different one, from base atom/set_light_color(): (new_color)
#define COMSIG_ATOM_SET_LIGHT_COLOR "atom_set_light_color"
///Called right before the atom changes the value of light_on to a different one, from base atom/set_light_on(): (new_value)
#define COMSIG_ATOM_SET_LIGHT_ON "atom_set_light_on"
///Called right before the atom changes the value of light_flags to a different one, from base atom/set_light_flags(): (new_value)
#define COMSIG_ATOM_SET_LIGHT_FLAGS "atom_set_light_flags"

///from base of atom/set_opacity(): (new_opacity)
#define COMSIG_ATOM_SET_OPACITY "atom_set_opacity"

///When the transform or an atom is varedited through vv topic.
#define COMSIG_ATOM_VV_MODIFY_TRANSFORM "atom_vv_modify_transform"
6 changes: 6 additions & 0 deletions code/__DEFINES/dcs/signals/atom/signals_item.dm
Original file line number Diff line number Diff line change
Expand Up @@ -54,3 +54,9 @@
#define COMSIG_GUN_AUTOFIREDELAY_MODIFIED "gun_autofiredelay_modified"
#define COMSIG_GUN_BURST_SHOTS_TO_FIRE_MODIFIED "gun_burst_shots_to_fire_modified"
#define COMSIG_GUN_BURST_SHOT_DELAY_MODIFIED "gun_burst_shot_delay_modified"

/// from /obj/item/weapon/gun/proc/recalculate_attachment_bonuses() : ()
#define COMSIG_GUN_RECALCULATE_ATTACHMENT_BONUSES "gun_recalculate_attachment_bonuses"

/// from /obj/item/weapon/gun/proc/load_into_chamber() : ()
#define COMSIG_GUN_INTERRUPT_FIRE "gun_interrupt_fire"
4 changes: 4 additions & 0 deletions code/__DEFINES/dcs/signals/signals_global.dm
Original file line number Diff line number Diff line change
Expand Up @@ -59,3 +59,7 @@

/// From
#define COMSIG_GLOB_YAUTJA_ARMORY_OPENED "yautja_armory_opened"

/// From /proc/biohazard_lockdown()
#define COMSIG_GLOB_RESEARCH_LOCKDOWN "research_lockdown_closed"
#define COMSIG_GLOB_RESEARCH_LIFT "research_lockdown_opened"
6 changes: 6 additions & 0 deletions code/__DEFINES/hud.dm
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,9 @@
#define APPEARANCE_UI_IGNORE_ALPHA (RESET_COLOR|RESET_TRANSFORM|NO_CLIENT_COLOR|RESET_ALPHA|PIXEL_SCALE)
/// Used for HUD objects
#define APPEARANCE_UI (RESET_COLOR|RESET_TRANSFORM|NO_CLIENT_COLOR|PIXEL_SCALE)

// Notification action types
#define NOTIFY_JUMP "jump"
#define NOTIFY_ATTACK "attack"
#define NOTIFY_ORBIT "orbit"
#define NOTIFY_JOIN_XENO "join_xeno"
15 changes: 8 additions & 7 deletions code/__DEFINES/human.dm
Original file line number Diff line number Diff line change
Expand Up @@ -116,14 +116,15 @@
#define ORDER_FOCUS_MAX_LEVEL 50

//Human Overlays Indexes used in update_icons/////////
#define UNDERWEAR_LAYER 41
#define UNDERSHIRT_LAYER 40
#define MUTANTRACE_LAYER 39
#define BODYPARTS_LAYER 42
#define DAMAGE_LAYER 41

/// For use by Hunter Flay
#define FLAY_LAYER 38
#define UNDERWEAR_LAYER 40
#define UNDERSHIRT_LAYER 39
#define MUTANTRACE_LAYER 38

#define DAMAGE_LAYER 37
/// For use by Hunter Flay
#define FLAY_LAYER 37
#define UNIFORM_LAYER 36

/// bs12 specific. this hack is probably gonna come back to haunt me
Expand Down Expand Up @@ -176,7 +177,7 @@
/// If you're hit by an acid DoT
#define EFFECTS_LAYER 1

#define TOTAL_LAYERS 41
#define TOTAL_LAYERS 42
//////////////////////////////////

//Synthetic Defines
Expand Down
40 changes: 36 additions & 4 deletions code/__DEFINES/layers.dm
Original file line number Diff line number Diff line change
Expand Up @@ -136,8 +136,6 @@

#define ABOVE_FLY_LAYER 6

#define ABOVE_LIGHTING_PLANE 16

/// blip from motion detector
#define BELOW_FULLSCREEN_LAYER 16.9
#define FULLSCREEN_LAYER 17
Expand All @@ -163,11 +161,44 @@

#define CINEMATIC_LAYER 21

#define TYPING_LAYER 500

/// for areas, so they appear above everything else on map file.
#define AREAS_LAYER 999

//---------- EMISSIVES -------------
//Layering order of these is not particularly meaningful.
//Important part is the seperation of the planes for control via plane_master

/// This plane masks out lighting to create an "emissive" effect, ie for glowing lights in otherwise dark areas.
#define EMISSIVE_PLANE 90
/// The render target used by the emissive layer.
#define EMISSIVE_RENDER_TARGET "*EMISSIVE_PLANE"
/// The layer you should use if you _really_ don't want an emissive overlay to be blocked.
#define EMISSIVE_LAYER_UNBLOCKABLE 9999

#define LIGHTING_BACKPLANE_LAYER 14.5

#define LIGHTING_RENDER_TARGET "LIGHT_PLANE"

#define SHADOW_RENDER_TARGET "SHADOW_RENDER_TARGET"

/// Plane for balloon text (text that fades up)
#define BALLOON_CHAT_PLANE 110
/// Bubble for typing indicators
#define TYPING_LAYER 500

#define O_LIGHTING_VISUAL_PLANE 120
#define O_LIGHTING_VISUAL_LAYER 16
#define O_LIGHTING_VISUAL_RENDER_TARGET "O_LIGHT_VISUAL_PLANE"

#define LIGHTING_PRIMARY_LAYER 15 //The layer for the main lights of the station
#define LIGHTING_PRIMARY_DIMMER_LAYER 15.1 //The layer that dims the main lights of the station
#define LIGHTING_SECONDARY_LAYER 16 //The colourful, usually small lights that go on top

#define LIGHTING_SHADOW_LAYER 17 //Where the shadows happen

#define ABOVE_LIGHTING_PLANE 150
#define ABOVE_LIGHTING_LAYER 18

/*=============================*\
| |
| PLANE DEFINES |
Expand All @@ -189,6 +220,7 @@

#define GHOST_PLANE 80

///--------------- FULLSCREEN RUNECHAT BUBBLES ------------
#define LIGHTING_PLANE 100
#define EXTERIOR_LIGHTING_PLANE 101

Expand Down
104 changes: 104 additions & 0 deletions code/__DEFINES/lighting.dm
Original file line number Diff line number Diff line change
@@ -1,5 +1,109 @@
///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 STATIC_LIGHT 1
///Light made by masking the lighting darkness plane.
#define MOVABLE_LIGHT 2
///A mix of the above, cheaper on moving items than dynamic, but heavier on rendering than movable
#define HYBRID_LIGHT 3
///Pointy light
#define DIRECTIONAL_LIGHT 4

#define LIGHT_ATTACHED (1<<0)

#define MINIMUM_USEFUL_LIGHT_RANGE 1.4

#define LIGHTING_ICON 'icons/effects/lighting_object.dmi' // icon used for lighting shading effects
#define LIGHTING_ICON_BIG 'icons/effects/lighting_object_big.dmi' //! icon used for lighting shading effects

#define ALPHA_TO_INTENSITY(alpha) (-(((clamp(alpha, 0, 22) - 22) / 6) ** 4) + 255)


#define LIGHT_RANGE_FIRE 3 //How many tiles standard fires glow.

#define LIGHTING_PLANE_ALPHA_VISIBLE 255
///The dim natural vision of Yautja
#define LIGHTING_PLANE_ALPHA_YAUTJA 235
#define LIGHTING_PLANE_ALPHA_MOSTLY_VISIBLE 192
#define LIGHTING_PLANE_ALPHA_MOSTLY_INVISIBLE 127
#define LIGHTING_PLANE_ALPHA_INVISIBLE 0


#define FLASH_LIGHT_DURATION 2
#define FLASH_LIGHT_POWER 3
#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 1
/// 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 2

/// 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 list(0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,1, 1,1,1,0)
/// A globaly cached version of [EMISSIVE_COLOR] for quick access.
GLOBAL_LIST_INIT(emissive_color, EMISSIVE_COLOR)
/// 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 list(0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,1, 0,0,0,0)
/// A globaly 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.
#define EMISSIVE_APPEARANCE_FLAGS (KEEP_APART|KEEP_TOGETHER|RESET_COLOR|RESET_TRANSFORM)
/// 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 independant 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 globaly cached version of [EM_MASK_MATRIX] for quick access.
GLOBAL_LIST_INIT(em_mask_matrix, EM_MASK_MATRIX)

/// Returns the red part of a #RRGGBB hex sequence as number
#define GETREDPART(hexa) hex2num(copytext(hexa, 2, 4))

/// Returns the green part of a #RRGGBB hex sequence as number
#define GETGREENPART(hexa) hex2num(copytext(hexa, 4, 6))

/// Returns the blue part of a #RRGGBB hex sequence as number
#define GETBLUEPART(hexa) hex2num(copytext(hexa, 6, 8))

/// Parse the hexadecimal color into lumcounts of each perspective.
#define PARSE_LIGHT_COLOR(source) \
do { \
if (source.light_color != COLOR_WHITE) { \
var/__light_color = source.light_color; \
source.lum_r = GETREDPART(__light_color) / 255; \
source.lum_g = GETGREENPART(__light_color) / 255; \
source.lum_b = GETBLUEPART(__light_color) / 255; \
} else { \
source.lum_r = 1; \
source.lum_g = 1; \
source.lum_b = 1; \
}; \
} while (FALSE)


//Bay lighting engine shit, not in /code/modules/lighting because BYOND is being shit about it //thats how defines work, hello?
#define LIGHTING_INTERVAL 5 // frequency, in 1/10ths of a second, of the lighting process

#define MOVABLE_MAX_RANGE 7

#define LIGHTING_FALLOFF 1 // type of falloff to use for lighting; 1 for circular, 2 for square
#define LIGHTING_LAMBERTIAN 0 // use lambertian shading for light sources
#define LIGHTING_HEIGHT 1 // height off the ground of light sources on the pseudo-z-axis, you should probably leave this alone
#define LIGHTING_ROUND_VALUE (1 / 64) //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.

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

// If I were you I'd leave this alone.
#define LIGHTING_BASE_MATRIX \
list \
( \
1, 1, 1, 0, \
1, 1, 1, 0, \
1, 1, 1, 0, \
1, 1, 1, 0, \
0, 0, 0, 1 \
) \

#define LIGHTING_NO_UPDATE 0
#define LIGHTING_VIS_UPDATE 1
#define LIGHTING_CHECK_UPDATE 2
#define LIGHTING_FORCE_UPDATE 3
3 changes: 3 additions & 0 deletions code/__DEFINES/mob_hud.dm
Original file line number Diff line number Diff line change
Expand Up @@ -65,3 +65,6 @@
#define TRACKER_HIVE "Hive Core"
#define TRACKER_LEADER "Leader"
#define TRACKER_TUNNEL "Tunnel"

//These are used to manage the same HUD having multiple sources
#define HUD_SOURCE_ADMIN "admin"
1 change: 1 addition & 0 deletions code/__DEFINES/mode.dm
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@
#define MODE_SHIPSIDE_SD (1<<8) /// Toggles whether Predators can big SD when not on the groundmap
#define MODE_HARDCORE_PERMA (1<<9) /// Toggles Hardcore for all marines, meaning they instantly perma upon death
#define MODE_DISPOSABLE_MOBS (1<<10) // Toggles if mobs fit in disposals or not. Off by default.
#define MODE_BYPASS_JOE (1<<11) // Toggles if ghosts can bypass Working Joe spawn limitations, does NOT bypass WL requirement. Off by default.

#define ROUNDSTATUS_FOG_DOWN 1
#define ROUNDSTATUS_PODDOORS_OPEN 2
Expand Down
5 changes: 5 additions & 0 deletions code/__DEFINES/objects.dm
Original file line number Diff line number Diff line change
Expand Up @@ -168,3 +168,8 @@ var/list/RESTRICTED_CAMERA_NETWORKS = list( //Those networks can only be accesse
// For reinforced table status
#define RTABLE_WEAKENED 1
#define RTABLE_NORMAL 2

//Lights define
#define CHECKS_PASSED 1
#define STILL_ON_COOLDOWN 2
#define NO_LIGHT_STATE_CHANGE 3
1 change: 1 addition & 0 deletions code/__DEFINES/pred.dm
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#define PRED_MATERIALS list("ebony", "silver", "bronze", "crimson", "bone")
#define PRED_TRANSLATORS list("Modern", "Retro", "Combo")
#define PRED_LEGACIES list("None", "Dragon", "Swamp", "Enforcer", "Collector")
#define PRED_SKIN_COLOR list("tan", "green", "purple", "blue", "red", "black")

#define PRED_YAUTJA_CAPE "yautja cape"
Expand Down
1 change: 1 addition & 0 deletions code/__DEFINES/radio.dm
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
#define RADIO_CHANNEL_HEADSET "headset"
#define RADIO_CHANNEL_ENGI "Engi"
#define RADIO_CHANNEL_HIGHCOM "HighCom"
#define RADIO_CHANNEL_PROVOST "Provost"
#define RADIO_CHANNEL_INTERCOM "intercom"
#define RADIO_CHANNEL_INTEL "Intel"
#define RADIO_CHANNEL_JTAC "JTAC"
Expand Down
1 change: 1 addition & 0 deletions code/__DEFINES/sounds.dm
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
#define ITEM_EQUIP_VOLUME 50

//Reserved channels
#define SOUND_CHANNEL_NOTIFY 1016
#define SOUND_CHANNEL_VOX 1017
#define SOUND_CHANNEL_MUSIC 1018
#define SOUND_CHANNEL_AMBIENCE 1019
Expand Down
Loading

0 comments on commit a95af59

Please sign in to comment.